2019-03-28 10:55:23 +00:00
|
|
|
import ngModule from '../module';
|
2020-11-23 12:41:51 +00:00
|
|
|
import Summary from 'salix/components/summary';
|
2019-03-28 10:55:23 +00:00
|
|
|
import './style.scss';
|
|
|
|
|
2020-11-23 12:41:51 +00:00
|
|
|
class Controller extends Summary {
|
2019-03-28 10:55:23 +00:00
|
|
|
set invoiceOut(value) {
|
|
|
|
this._invoiceOut = value;
|
|
|
|
if (value && value.id)
|
|
|
|
this.getSummary();
|
|
|
|
}
|
|
|
|
|
|
|
|
get invoiceOut() {
|
|
|
|
return this._invoiceOut;
|
|
|
|
}
|
|
|
|
|
|
|
|
getSummary() {
|
2020-04-25 09:50:04 +00:00
|
|
|
return this.$http.get(`InvoiceOuts/${this.invoiceOut.id}/summary`)
|
|
|
|
.then(res => this.summary = res.data);
|
2019-03-28 10:55:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnInvoiceOutSummary', {
|
2019-03-28 10:55:23 +00:00
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller,
|
|
|
|
bindings: {
|
|
|
|
invoiceOut: '<'
|
|
|
|
}
|
|
|
|
});
|