2018-02-01 12:28:45 +00:00
|
|
|
<mg-ajax path="/client/api/Addresses/{{edit.params.addressId}}" actions="$ctrl.address=edit.model;$ctrl._setIconAdd();" options="mgEdit"></mg-ajax>
|
2017-02-21 15:21:55 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
url="/client/api/Addresses"
|
|
|
|
id-field="id"
|
2017-06-03 11:01:47 +00:00
|
|
|
data="$ctrl.address"
|
2017-02-21 15:21:55 +00:00
|
|
|
form="form">
|
|
|
|
</vn-watcher>
|
2018-02-01 12:28:45 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.submit()" pad-medium>
|
2017-01-31 13:13:06 +00:00
|
|
|
<vn-card>
|
|
|
|
<vn-vertical pad-large>
|
2017-06-07 06:39:40 +00:00
|
|
|
<vn-title>Address</vn-title>
|
2017-01-31 13:13:06 +00:00
|
|
|
<vn-horizontal>
|
2017-11-02 07:46:09 +00:00
|
|
|
<vn-one>
|
2018-01-29 11:37:54 +00:00
|
|
|
<vn-check label="Enabled" field="$ctrl.address.isActive"></vn-check>
|
2017-11-02 07:46:09 +00:00
|
|
|
</vn-one>
|
|
|
|
<vn-one>
|
2017-11-21 11:07:37 +00:00
|
|
|
<vn-check label="Is equalizated" field="$ctrl.address.isEqualizated" vn-acl="administrative"></vn-check>
|
2017-11-02 07:46:09 +00:00
|
|
|
</vn-one>
|
2017-01-31 13:13:06 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2018-01-29 11:37:54 +00:00
|
|
|
<vn-textfield vn-one label="Consignee" field="$ctrl.address.nickname" vn-focus></vn-textfield>
|
2017-06-07 06:39:40 +00:00
|
|
|
<vn-textfield vn-one label="Street" field="$ctrl.address.street"></vn-textfield>
|
2017-01-31 13:13:06 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2018-02-15 10:44:03 +00:00
|
|
|
<vn-textfield vn-one label="Postcode" field="$ctrl.address.postalCode"></vn-textfield>
|
2017-06-07 06:39:40 +00:00
|
|
|
<vn-textfield vn-one label="City" field="$ctrl.address.city"></vn-textfield>
|
2017-01-31 13:13:06 +00:00
|
|
|
<vn-autocomplete vn-one
|
2017-09-28 09:29:01 +00:00
|
|
|
initial-data="$ctrl.address.province"
|
2017-06-03 11:01:47 +00:00
|
|
|
field="$ctrl.address.provinceFk"
|
2017-01-31 13:13:06 +00:00
|
|
|
url="/client/api/Provinces"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2017-06-07 06:39:40 +00:00
|
|
|
label="Province">
|
2017-01-31 13:13:06 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete vn-one
|
2018-01-29 11:37:54 +00:00
|
|
|
initial-data="$ctrl.address.agency"
|
|
|
|
field="$ctrl.address.agencyFk"
|
2017-10-19 07:21:34 +00:00
|
|
|
url="/client/api/AgencyModes"
|
2017-01-31 13:13:06 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2017-06-07 06:39:40 +00:00
|
|
|
label="Agency">
|
2017-01-31 13:13:06 +00:00
|
|
|
</vn-autocomplete>
|
2017-06-07 06:39:40 +00:00
|
|
|
<vn-textfield vn-one label="Phone" field="$ctrl.address.phone"></vn-textfield>
|
|
|
|
<vn-textfield vn-one label="Mobile" field="$ctrl.address.mobile"></vn-textfield>
|
2017-01-31 13:13:06 +00:00
|
|
|
</vn-horizontal>
|
2018-01-30 13:47:47 +00:00
|
|
|
<vn-one margin-medium-top>
|
|
|
|
<vn-title>Notes</vn-title>
|
|
|
|
<mg-ajax path="/client/api/ObservationTypes" options="mgIndex as observationsTypes"></mg-ajax>
|
2018-02-01 12:28:45 +00:00
|
|
|
<vn-horizontal ng-repeat="observation in $ctrl.observations track by $index">
|
2018-01-30 13:47:47 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
2018-02-26 13:23:26 +00:00
|
|
|
initial-data="observation.observationType"
|
|
|
|
field="observation.observationTypeFk"
|
|
|
|
data="observationsTypes.model"
|
|
|
|
show-field="description"
|
|
|
|
label="Observation type"
|
|
|
|
order="description ASC"
|
2018-02-19 19:52:07 +00:00
|
|
|
filter-search="{where: {description: {regexp: 'search'}}}">
|
2018-01-30 13:47:47 +00:00
|
|
|
<tpl-item>{{$parent.$parent.item.description}}</tpl-item>
|
|
|
|
</vn-autocomplete>
|
2018-02-26 13:23:26 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-auto
|
|
|
|
label="Description"
|
|
|
|
model="observation.description"
|
|
|
|
rule="addressObservation.description">
|
|
|
|
</vn-textfield>
|
2018-01-30 13:47:47 +00:00
|
|
|
<vn-one pad-medium-top>
|
|
|
|
<vn-icon
|
|
|
|
pointer
|
|
|
|
medium-grey
|
|
|
|
icon="remove_circle_outline"
|
2018-02-13 08:32:07 +00:00
|
|
|
ng-click="$ctrl.removeObservation($index)">
|
2018-01-30 13:47:47 +00:00
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
pointer
|
|
|
|
margin-medium-left
|
|
|
|
orange
|
|
|
|
icon="add_circle"
|
2018-02-26 13:23:26 +00:00
|
|
|
ng-if="observation.showAddIcon && observationsTypes.model.length > $ctrl.observations.length"
|
2018-02-19 19:52:07 +00:00
|
|
|
ng-click="$ctrl.addObservation()">
|
|
|
|
</vn-icon>
|
2018-01-30 13:47:47 +00:00
|
|
|
</vn-one>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-one>
|
2017-01-31 13:13:06 +00:00
|
|
|
</vn-vertical>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2017-06-07 06:39:40 +00:00
|
|
|
<vn-submit label="Save"></vn-submit>
|
2017-01-31 13:13:06 +00:00
|
|
|
</vn-button-bar>
|
2017-02-07 11:58:25 +00:00
|
|
|
</form>
|