2017-02-21 15:21:55 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2019-02-28 07:55:34 +00:00
|
|
|
url="/client/api/Addresses/createDefaultAddress"
|
2017-02-21 15:21:55 +00:00
|
|
|
id-field="id"
|
2019-02-28 07:55:34 +00:00
|
|
|
data="$ctrl.data"
|
2018-02-08 11:57:57 +00:00
|
|
|
save="post"
|
2017-02-21 15:21:55 +00:00
|
|
|
form="form">
|
|
|
|
</vn-watcher>
|
2019-06-13 11:08:11 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="/client/api/AddressObservations"
|
|
|
|
fields="['id', 'addressFk', 'observationTypeFk', 'description']"
|
|
|
|
link="{addressFk: $ctrl.$stateParams.addressId}"
|
|
|
|
data="observations"
|
|
|
|
auto-load="true">
|
|
|
|
</vn-crud-model>
|
2019-02-28 07:55:34 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-card pad-large>
|
2018-05-31 11:45:51 +00:00
|
|
|
<vn-horizontal pad-small-v>
|
2019-02-28 07:55:34 +00:00
|
|
|
<vn-check vn-one label="Default" field="$ctrl.data.isDefaultAddress"></vn-check>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield vn-one label="Consignee" field="$ctrl.address.nickname" vn-focus></vn-textfield>
|
|
|
|
<vn-textfield vn-one label="Street address" field="$ctrl.address.street"></vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2019-07-26 11:05:22 +00:00
|
|
|
<vn-autocomplete vn-id="province" vn-one
|
|
|
|
field="$ctrl.address.provinceFk"
|
|
|
|
url="/api/Provinces"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
label="Province">
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-autocomplete vn-id="town" vn-one
|
|
|
|
label="City"
|
|
|
|
url="/api/Towns"
|
|
|
|
fields="['id', 'name']"
|
|
|
|
where="{provinceFk: province.selection.id}"
|
|
|
|
show-field="name"
|
|
|
|
value-field="name"
|
|
|
|
field="$ctrl.address.city">
|
|
|
|
</vn-autocomplete>
|
2019-07-08 12:07:09 +00:00
|
|
|
<vn-autocomplete vn-one
|
2019-07-26 11:05:22 +00:00
|
|
|
url="/api/Postcodes/location"
|
|
|
|
fields="['code', 'townFk']"
|
2019-06-13 11:08:11 +00:00
|
|
|
field="$ctrl.address.postalCode"
|
2019-07-08 12:07:09 +00:00
|
|
|
selection="$ctrl.postcodeSelection"
|
2019-06-13 11:08:11 +00:00
|
|
|
search-function="{code: $search}"
|
2019-07-26 11:05:22 +00:00
|
|
|
where="{townFk: town.selection.id}"
|
|
|
|
order="code, townFk"
|
2019-06-13 11:08:11 +00:00
|
|
|
show-field="code"
|
|
|
|
value-field="code"
|
|
|
|
label="Postcode">
|
|
|
|
<tpl-item>
|
|
|
|
{{code}}, {{town.name}} - {{town.province.name}}
|
|
|
|
({{town.province.country.country}})
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
2019-07-08 12:07:09 +00:00
|
|
|
<vn-icon-button vn-auto margin-medium-v
|
|
|
|
icon="add_circle"
|
|
|
|
vn-tooltip="New postcode"
|
|
|
|
ng-click="postcode.open()">
|
|
|
|
</vn-icon-button>
|
2019-07-26 11:05:22 +00:00
|
|
|
</vn-horizontal>
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-horizontal>
|
2018-09-10 11:00:01 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
2018-03-01 22:38:14 +00:00
|
|
|
field="$ctrl.address.agencyModeFk"
|
2019-06-13 11:08:11 +00:00
|
|
|
url="/api/AgencyModes/isActive"
|
2018-03-01 22:38:14 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2018-03-28 07:30:33 +00:00
|
|
|
label="Agency">
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-textfield vn-one label="Phone" field="$ctrl.address.phone"></vn-textfield>
|
|
|
|
<vn-textfield vn-one label="Mobile" field="$ctrl.address.mobile"></vn-textfield>
|
|
|
|
</vn-horizontal>
|
2017-01-31 13:13:06 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2017-06-07 06:39:40 +00:00
|
|
|
<vn-submit label="Save"></vn-submit>
|
2018-04-22 14:25:44 +00:00
|
|
|
<button
|
|
|
|
class="mdl-button mdl-button--raised mdl-button--colored"
|
|
|
|
translate
|
2018-05-23 12:26:51 +00:00
|
|
|
ui-sref="client.card.address.index"
|
2018-04-22 14:25:44 +00:00
|
|
|
>Cancel
|
|
|
|
</button>
|
2017-01-31 13:13:06 +00:00
|
|
|
</vn-button-bar>
|
2017-02-07 11:58:25 +00:00
|
|
|
</form>
|
2019-07-08 12:07:09 +00:00
|
|
|
|
|
|
|
<!-- New postcode dialog -->
|
|
|
|
<vn-client-postcode vn-id="postcode"
|
|
|
|
on-response="$ctrl.onResponse(response)">
|
|
|
|
</vn-client-postcode>
|