29 lines
644 B
JavaScript
29 lines
644 B
JavaScript
import ngModule from '../module';
|
|
import Summary from 'salix/components/summary';
|
|
import './style.scss';
|
|
|
|
class Controller extends Summary {
|
|
set invoiceIn(value) {
|
|
this._invoiceIn = value;
|
|
if (value && value.id)
|
|
this.getSummary();
|
|
}
|
|
|
|
get invoiceIn() {
|
|
return this._invoiceIn;
|
|
}
|
|
|
|
getSummary() {
|
|
return this.$http.get(`InvoiceIns/${this.invoiceIn.id}/summary`)
|
|
.then(res => this.summary = res.data);
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnInvoiceInSummary', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
invoiceIn: '<'
|
|
}
|
|
});
|