71 lines
2.9 KiB
HTML
71 lines
2.9 KiB
HTML
<mg-ajax path="/api/ticketWeeklies" options="vnPost"></mg-ajax>
|
|
<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">
|
|
<vn-horizontal>
|
|
<vn-autocomplete vn-one vn-id="ticket"
|
|
url="/api/tickets"
|
|
field="$ctrl.ticketWeekly.ticketFk"
|
|
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"
|
|
field="$ctrl.ticketWeekly.weekDay"
|
|
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="/api/clients"
|
|
fields="['id', 'name', 'salesPersonFk']"
|
|
field="$ctrl.ticketWeekly.clientFk"
|
|
show-field="name"
|
|
value-field="id"
|
|
label="Client"
|
|
selection="$ctrl.clientSelection">
|
|
</vn-autocomplete>
|
|
<vn-autocomplete vn-one disabled="true"
|
|
field="$ctrl.ticketWeekly.warehouseFk"
|
|
url="/api/warehouses"
|
|
show-field="name"
|
|
value-field="id"
|
|
label="Warehouse">
|
|
</vn-autocomplete>
|
|
<vn-autocomplete vn-one disabled="true"
|
|
field="$ctrl.ticketWeekly.salesPersonFk"
|
|
url="/api/clients/activeWorkersWithRole"
|
|
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> |