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