autoload refreshes the model when url is set
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-07-27 15:59:59 +02:00
parent faab039022
commit 6d4b97443e
2 changed files with 2 additions and 9 deletions

View File

@ -1,6 +1,7 @@
<vn-crud-model
vn-id="ticketsModel"
limit="10"
auto-load="true"
data="tickets">
</vn-crud-model>
<vn-card class="summary">

View File

@ -7,7 +7,7 @@ class Controller extends Summary {
this._invoiceOut = value;
if (value && value.id) {
this.getSummary();
this.getTickets();
this.$.ticketsModel.url = `InvoiceOuts/${this.invoiceOut.id}/getTickets`;
}
}
@ -19,14 +19,6 @@ class Controller extends Summary {
return this.$http.get(`InvoiceOuts/${this.invoiceOut.id}/summary`)
.then(res => this.summary = res.data);
}
getTickets() {
this.$.$applyAsync(() => {
const query = `InvoiceOuts/${this.invoiceOut.id}/getTickets`;
this.$.ticketsModel.url = query;
this.$.ticketsModel.refresh();
});
}
}
ngModule.vnComponent('vnInvoiceOutSummary', {