salix/modules/ticket/front/create/card.html

46 lines
1.3 KiB
HTML

<vn-title>New ticket</vn-title>
<vn-autocomplete
vn-focus
vn-id="client"
url="/api/Clients"
label="Client"
search-function="{or: [{id: {regexp: $search}}, {name: {regexp: $search}}]}"
show-field="name"
value-field="id"
field="$ctrl.clientFk"
order="id">
<tpl-item>{{id}}: {{name}}</tpl-item>
</vn-autocomplete>
<vn-autocomplete
disabled="!$ctrl.clientFk"
url="{{ $ctrl.clientFk ? '/api/Clients/'+ $ctrl.clientFk +'/addresses' : null }}"
fields="['nickname', 'street', 'city']"
field="$ctrl.addressFk"
show-field="nickname"
value-field="id"
label="Address">
<tpl-item>{{nickname}}: {{street}}, {{city}}</tpl-item>
</vn-autocomplete>
<vn-date-picker
label="Landed"
model="$ctrl.landed"
ini-options="{enableTime: false}">
</vn-date-picker>
<vn-autocomplete
vn-one
disabled="!$ctrl.clientFk || !$ctrl.landed"
field="$ctrl.warehouseFk"
url="/agency/api/Warehouses"
show-field="name"
value-field="id"
label="Warehouse">
</vn-autocomplete>
<vn-autocomplete
disabled="!$ctrl.clientFk || !$ctrl.landed || !$ctrl.warehouseFk"
data="$ctrl._availableAgencies"
label="Agency"
show-field="agency"
value-field="id"
field="$ctrl.ticket.agencyModeFk">
</vn-autocomplete>