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