2017-02-21 15:21:55 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="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"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="AddressObservations"
|
2019-06-13 11:08:11 +00:00
|
|
|
fields="['id', 'addressFk', 'observationTypeFk', 'description']"
|
|
|
|
link="{addressFk: $ctrl.$stateParams.addressId}"
|
|
|
|
data="observations"
|
|
|
|
auto-load="true">
|
|
|
|
</vn-crud-model>
|
2019-11-10 10:08:44 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-check
|
|
|
|
vn-one
|
|
|
|
label="Default" ng-model="$ctrl.data.isDefaultAddress">
|
|
|
|
</vn-check>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Consignee"
|
|
|
|
ng-model="$ctrl.address.nickname"
|
|
|
|
rule
|
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Street address"
|
|
|
|
ng-model="$ctrl.address.street"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
vn-id="province"
|
|
|
|
ng-model="$ctrl.address.provinceFk"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="Provinces"
|
2019-07-26 11:05:22 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
label="Province">
|
|
|
|
</vn-autocomplete>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
2019-09-18 08:35:46 +00:00
|
|
|
label="City"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.address.city"
|
|
|
|
rule>
|
2019-09-18 08:35:46 +00:00
|
|
|
</vn-textfield>
|
|
|
|
<!-- <vn-autocomplete vn-id="town" vn-one
|
2019-07-26 11:05:22 +00:00
|
|
|
label="City"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="Towns"
|
2019-07-26 11:05:22 +00:00
|
|
|
fields="['id', 'name']"
|
|
|
|
where="{provinceFk: province.selection.id}"
|
|
|
|
show-field="name"
|
|
|
|
value-field="name"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.address.city">
|
2019-07-26 11:05:22 +00:00
|
|
|
</vn-autocomplete>
|
2019-07-08 12:07:09 +00:00
|
|
|
<vn-autocomplete vn-one
|
2019-10-24 22:53:53 +00:00
|
|
|
url="Postcodes/location"
|
2019-07-26 11:05:22 +00:00
|
|
|
fields="['code', 'townFk']"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$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>
|
2019-09-18 08:35:46 +00:00
|
|
|
</vn-autocomplete> -->
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
2019-09-18 08:35:46 +00:00
|
|
|
label="Postcode"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.address.postalCode"
|
|
|
|
rule>
|
2019-09-18 08:35:46 +00:00
|
|
|
</vn-textfield>
|
2019-10-04 22:16:57 +00:00
|
|
|
<!--
|
|
|
|
<vn-icon-button
|
|
|
|
vn-auto
|
|
|
|
class="vn-my-md"
|
2019-07-08 12:07:09 +00:00
|
|
|
icon="add_circle"
|
|
|
|
vn-tooltip="New postcode"
|
|
|
|
ng-click="postcode.open()">
|
2019-10-04 22:16:57 +00:00
|
|
|
</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
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.address.agencyModeFk"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="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>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Phone"
|
|
|
|
ng-model="$ctrl.address.phone"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Mobile"
|
|
|
|
ng-model="$ctrl.address.mobile"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
2018-03-01 22:38:14 +00:00
|
|
|
</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>
|
2019-10-18 19:36:30 +00:00
|
|
|
<vn-button
|
|
|
|
label="Cancel"
|
2019-10-09 22:47:29 +00:00
|
|
|
ui-sref="client.card.address.index">
|
2019-10-18 19:36:30 +00:00
|
|
|
</vn-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"
|
2019-10-30 15:57:14 +00:00
|
|
|
on-response="$ctrl.onResponse($response)">
|
2019-07-08 12:07:09 +00:00
|
|
|
</vn-client-postcode>
|