salix/modules/ticket/front/weekly/create/index.html

71 lines
2.9 KiB
HTML
Raw Normal View History

<mg-ajax path="ticketWeeklies" options="vnPost"></mg-ajax>
2019-07-29 11:12:36 +00:00
<vn-watcher
vn-id="watcher"
data="$ctrl.ticketWeekly"
form="form"
save="post">
</vn-watcher>
<div class="content-block">
<form name="form" vn-http-submit="$ctrl.onSubmit()" compact>
<vn-card class="vn-pa-lg">
2019-07-29 11:12:36 +00:00
<vn-horizontal>
<vn-autocomplete vn-one vn-id="ticket"
url="tickets"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.ticketWeekly.ticketFk"
2019-07-29 11:12:36 +00:00
fields="['id', 'nickname', 'clientFk', 'warehouseFk']"
search-function="{nickname: $search}"
show-field="id"
value-field="id"
label="Ticket"
on-change="$ctrl.onChangeTicket(ticket.selection)">
<tpl-item>#{{id}} - {{nickname}}</tpl-item>
</vn-autocomplete>
<vn-autocomplete vn-one label="Weekday"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.ticketWeekly.weekDay"
2019-07-29 11:12:36 +00:00
data="$ctrl.weekdays"
show-field="name"
value-field="id"
translate-fields="['name']"
order="id">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete vn-id="client" vn-one disabled="true"
url="clients"
2019-07-29 11:12:36 +00:00
fields="['id', 'name', 'salesPersonFk']"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.ticketWeekly.clientFk"
2019-07-29 11:12:36 +00:00
show-field="name"
value-field="id"
label="Client"
selection="$ctrl.clientSelection">
</vn-autocomplete>
<vn-autocomplete vn-one disabled="true"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.ticketWeekly.warehouseFk"
url="warehouses"
2019-07-29 11:12:36 +00:00
show-field="name"
value-field="id"
label="Warehouse">
</vn-autocomplete>
<vn-autocomplete vn-one disabled="true"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.ticketWeekly.salesPersonFk"
url="clients/activeWorkersWithRole"
2019-07-29 11:12:36 +00:00
search-function="{firstName: $search}"
show-field="firstName"
value-field="id"
where="{role: 'employee'}"
label="Salesperson">
<tpl-item>{{firstName}} {{lastName}}</tpl-item>
</vn-autocomplete>
</vn-horizontal>
</vn-card>
<vn-button-bar>
<vn-submit label="Create"></vn-submit>
<vn-button ui-sref="ticket.weekly.index" label="Cancel"></vn-button>
</vn-button-bar>
</form>
<!-- New postcode dialog -->
<vn-client-postcode vn-id="postcode"
on-response="$ctrl.onResponse(response)">
</vn-client-postcode>
</div>