fix: execute updatePortfolio after submit changes
This commit is contained in:
parent
c7db8c6b06
commit
9e06538fd0
|
@ -10,7 +10,7 @@
|
|||
url="ContactChannels"
|
||||
data="contactChannels">
|
||||
</vn-crud-model>
|
||||
<form name="form" vn-http-submit="watcher.submit()" class="vn-w-md">
|
||||
<form name="form" vn-http-submit="$ctrl.onSubmit()" class="vn-w-md">
|
||||
<vn-card class="vn-pa-lg">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
@ -68,8 +68,7 @@
|
|||
value-field="id"
|
||||
where="{role: 'salesPerson'}"
|
||||
label="Salesperson"
|
||||
vn-acl="salesAssistant"
|
||||
on-change="$ctrl.updatePortfolio()">
|
||||
vn-acl="salesAssistant">
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
|
|
|
@ -8,11 +8,11 @@ export default class Controller extends Section {
|
|||
: {name: {like: '%' + $search + '%'}};
|
||||
}
|
||||
|
||||
updatePortfolio() {
|
||||
// if (this.newDiscount != claimedSale.discount) {
|
||||
const query = `Clients/updatePortfolio`;
|
||||
this.$http.get(query);
|
||||
// }
|
||||
onSubmit() {
|
||||
return this.$.watcher.submit().then(() => {
|
||||
const query = `Clients/updatePortfolio`;
|
||||
this.$http.get(query);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue