41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
import ngModule from '../module';
|
|
import Section from 'salix/components/section';
|
|
|
|
export default class Controller extends Section {
|
|
/* preview(invoiceOut) {
|
|
this.selectedInvoiceOut = invoiceOut;
|
|
this.$.summary.show();
|
|
}
|
|
|
|
openPdf(id) {
|
|
let url = `api/InvoiceOuts/${id}/download?access_token=${this.vnToken.token}`;
|
|
window.open(url, '_blank');
|
|
} */
|
|
|
|
exprBuilder(param, value) {
|
|
switch (param) {
|
|
case 'shipped':
|
|
return {'t.shipped': {
|
|
between: this.dateRange(value)}
|
|
};
|
|
case 'id':
|
|
case 'supplierFk':
|
|
case 'supplierRef':
|
|
case 'serialNumber':
|
|
case 'serial':
|
|
case 'issued':
|
|
case 'created':
|
|
case 'isBooked':
|
|
return {[`ii.${param}`]: value};
|
|
case 'account':
|
|
case 'fi':
|
|
return {[`s.${param}`]: value};
|
|
}
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnInvoiceInIndex', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|