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"
|
2019-02-06 13:56:36 +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"
|
2019-02-06 13:56:36 +00:00
|
|
|
selection="$ctrl.selection"
|
|
|
|
fields="['defaultAddressFk']">
|
|
|
|
<tpl-item>{{::id}}: {{::name}}</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"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.order.addressFk">
|
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>
|
2018-11-30 10:45:17 +00:00
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Landed"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.order.landed">
|
2018-11-30 10:45:17 +00:00
|
|
|
</vn-date-picker>
|
2019-02-06 13:56:36 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
2019-10-24 22:53:53 +00:00
|
|
|
url="AgencyModes"
|
2019-02-06 13:56:36 +00:00
|
|
|
label="Agency"
|
|
|
|
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.order.agencyModeFk">
|
2019-02-06 13:56:36 +00:00
|
|
|
<tpl-item>{{::id}}: {{::name}}</tpl-item>
|
|
|
|
</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
|
2018-11-30 10:45:17 +00:00
|
|
|
label="Observation"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.order.note"
|
|
|
|
rule>
|
2018-11-30 10:45:17 +00:00
|
|
|
</vn-textarea>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2019-01-07 15:53:34 +00:00
|
|
|
<vn-submit label="Save"></vn-submit>
|
2019-09-18 07:41:25 +00:00
|
|
|
<vn-button label="Undo changes" ng-if="watcher.dataChanged()" ng-click="watcher.loadOriginalData()"></vn-button>
|
2018-11-30 10:45:17 +00:00
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|