2019-10-24 22:53:53 +00:00
|
|
|
<mg-ajax path="Orders/{{patch.params.id}}/updateBasicData" options="vnPatch"></mg-ajax>
|
2019-02-06 13:56:36 +00:00
|
|
|
<vn-crud-model
|
2020-09-17 18:12:52 +00:00
|
|
|
autoload="true"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="Addresses"
|
2019-02-06 13:56:36 +00:00
|
|
|
data="address"
|
|
|
|
order="nickname"
|
2020-09-17 18:12:52 +00:00
|
|
|
vn-id="address-model">
|
2019-02-06 13:56:36 +00:00
|
|
|
</vn-crud-model>
|
2018-11-30 10:45:17 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.order"
|
|
|
|
form="form"
|
|
|
|
save="patch">
|
|
|
|
</vn-watcher>
|
2019-11-10 10:08:44 +00:00
|
|
|
<form name="form" ng-submit="watcher.submit()" class="vn-w-md">
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
2018-11-30 10:45:17 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
2019-10-24 22:53:53 +00:00
|
|
|
url="Clients"
|
2018-11-30 10:45:17 +00:00
|
|
|
label="Client"
|
2023-05-05 06:12:38 +00:00
|
|
|
search-function="{or: [{id: $search}, {name: {like: '%'+ $search +'%'}}]}"
|
2018-11-30 10:45:17 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.order.clientFk"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="client"
|
2019-02-06 13:56:36 +00:00
|
|
|
selection="$ctrl.selection"
|
|
|
|
fields="['defaultAddressFk']">
|
2023-05-05 06:12:38 +00:00
|
|
|
<tpl-item>
|
|
|
|
<div>{{::name}}</div>
|
|
|
|
<div class="text-secondary text-caption">#{{::id}}</div>
|
|
|
|
</tpl-item>
|
2018-11-30 10:45:17 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
2019-02-19 07:42:36 +00:00
|
|
|
fields="['id', 'nickname']"
|
2019-02-06 13:56:36 +00:00
|
|
|
data="address"
|
|
|
|
label="Address"
|
2019-02-19 07:42:36 +00:00
|
|
|
search-function="$search"
|
2019-02-06 13:56:36 +00:00
|
|
|
show-field="nickname"
|
2018-11-30 10:45:17 +00:00
|
|
|
value-field="id"
|
2021-08-31 12:10:37 +00:00
|
|
|
ng-model="$ctrl.order.addressFk"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="address"
|
2021-08-31 12:10:37 +00:00
|
|
|
on-change="$ctrl.getAvailableAgencies()">
|
2019-02-06 13:56:36 +00:00
|
|
|
<tpl-item>{{::nickname}}</tpl-item>
|
2018-11-30 10:45:17 +00:00
|
|
|
</vn-autocomplete>
|
2019-02-06 13:56:36 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2023-05-05 06:12:38 +00:00
|
|
|
<vn-date-picker
|
2018-11-30 10:45:17 +00:00
|
|
|
vn-one
|
2023-05-05 06:12:38 +00:00
|
|
|
label="Landed"
|
2021-08-31 11:02:14 +00:00
|
|
|
ng-model="$ctrl.order.landed"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="landed"
|
2021-08-31 11:02:14 +00:00
|
|
|
on-change="$ctrl.getAvailableAgencies()">
|
2018-11-30 10:45:17 +00:00
|
|
|
</vn-date-picker>
|
2019-02-06 13:56:36 +00:00
|
|
|
<vn-autocomplete
|
2021-08-31 12:10:37 +00:00
|
|
|
disabled="!$ctrl.order.addressFk || !$ctrl.order.landed"
|
2021-08-31 11:02:14 +00:00
|
|
|
data="$ctrl._availableAgencies"
|
2019-02-06 13:56:36 +00:00
|
|
|
label="Agency"
|
2021-08-31 11:02:14 +00:00
|
|
|
show-field="agencyMode"
|
|
|
|
value-field="agencyModeFk"
|
2023-05-05 06:12:38 +00:00
|
|
|
ng-model="$ctrl.order.agencyModeFk"
|
|
|
|
vn-name="agencyMode">
|
2019-02-06 13:56:36 +00:00
|
|
|
</vn-autocomplete>
|
2018-11-30 10:45:17 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textarea
|
2019-10-09 22:47:29 +00:00
|
|
|
vn-one
|
2023-05-05 06:12:38 +00:00
|
|
|
label="Notes"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.order.note"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="note"
|
2019-10-09 22:47:29 +00:00
|
|
|
rule>
|
2018-11-30 10:45:17 +00:00
|
|
|
</vn-textarea>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2020-12-13 12:55:54 +00:00
|
|
|
<vn-submit
|
2020-12-15 15:16:02 +00:00
|
|
|
disabled="!watcher.dataChanged()"
|
2020-12-13 12:55:54 +00:00
|
|
|
label="Save">
|
|
|
|
</vn-submit>
|
|
|
|
<vn-button
|
2020-12-15 15:16:02 +00:00
|
|
|
class="cancel"
|
2020-12-13 12:55:54 +00:00
|
|
|
label="Undo changes"
|
2020-12-15 15:16:02 +00:00
|
|
|
disabled="!watcher.dataChanged()"
|
2020-12-13 12:55:54 +00:00
|
|
|
ng-click="watcher.loadOriginalData()">
|
|
|
|
</vn-button>
|
2018-11-30 10:45:17 +00:00
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|