2509 - Added forms to create new locations + e2e #412
|
@ -74,6 +74,8 @@ export default class Controller extends Section {
|
|||
|
||||
onResponse(response) {
|
||||
this.address.postalCode = response.code;
|
||||
this.address.city = response.city;
|
||||
this.address.provinceFk = response.provinceFk;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,8 @@ export default class Controller extends Section {
|
|||
|
||||
onResponse(response) {
|
||||
this.address.postalCode = response.code;
|
||||
this.address.city = response.city;
|
||||
this.address.provinceFk = response.provinceFk;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,12 +5,6 @@
|
|||
insert-mode="true"
|
||||
form="form">
|
||||
</vn-watcher>
|
||||
<vn-crud-model
|
||||
auto-load="true"
|
||||
url="Towns/location"
|
||||
data="townLocations"
|
||||
order="name">
|
||||
</vn-crud-model>
|
||||
<form name="form" vn-http-submit="$ctrl.onSubmit()" class="vn-w-md">
|
||||
<vn-card class="vn-pa-lg">
|
||||
<vn-horizontal>
|
||||
|
@ -82,7 +76,7 @@
|
|||
label="City"
|
||||
ng-model="$ctrl.client.city"
|
||||
selection="$ctrl.town"
|
||||
data="townsLocation"
|
||||
url="Towns/location"
|
||||
fields="['id', 'name', 'provinceFk']"
|
||||
value-field="name">
|
||||
<tpl-item>
|
||||
|
|
|
@ -81,6 +81,9 @@ export default class Controller extends Section {
|
|||
|
||||
onResponse(response) {
|
||||
this.client.postcode = response.code;
|
||||
this.client.city = response.city;
|
||||
this.client.provinceFk = response.provinceFk;
|
||||
this.client.countryFk = response.countryFk;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue