Solverd bug related to Bug #312
This commit is contained in:
parent
df8d3078d9
commit
cb34b11b99
|
@ -8,8 +8,8 @@
|
||||||
label="Client"
|
label="Client"
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
field="$ctrl.ticket.clientFk"
|
field="$ctrl.clientFk"
|
||||||
initial-data="$ctrl.ticket.clientFk"
|
initial-data="$ctrl.clientFk"
|
||||||
on-change="$ctrl.onChange()">
|
on-change="$ctrl.onChange()">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
<vn-autocomplete vn-one
|
<vn-autocomplete vn-one
|
||||||
|
|
|
@ -9,17 +9,22 @@ class Controller {
|
||||||
this.vnApp = vnApp;
|
this.vnApp = vnApp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set clientFk(value) {
|
||||||
|
this.ticket.clientFk = value;
|
||||||
|
this.ticket.addressFk = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
get clientFk() {
|
||||||
|
if (this.ticket)
|
||||||
|
return this.ticket.clientFk;
|
||||||
|
}
|
||||||
|
|
||||||
$onInit() {
|
$onInit() {
|
||||||
this.data.registerChild(this);
|
this.data.registerChild(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange() {
|
|
||||||
if (this.ticket)
|
|
||||||
this.ticket.addressFk = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
getAddresses() {
|
getAddresses() {
|
||||||
if (this.ticket)
|
if (this.ticket && this.ticket.addressFk)
|
||||||
return `/api/Clients/${this.ticket.clientFk}/addresses`;
|
return `/api/Clients/${this.ticket.clientFk}/addresses`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue