salix/modules/invoiceOut/front/index/index.js

20 lines
507 B
JavaScript
Raw Normal View History

2019-03-13 13:10:45 +00:00
import ngModule from '../module';
2020-03-17 13:43:46 +00:00
import Section from 'salix/components/section';
2019-03-13 13:10:45 +00:00
2020-03-17 13:43:46 +00:00
export default class Controller extends Section {
2020-04-25 09:50:04 +00:00
preview(invoiceOut) {
2019-03-28 10:55:23 +00:00
this.selectedInvoiceOut = invoiceOut;
this.$.summary.show();
2019-03-13 13:10:45 +00:00
}
2020-04-25 09:50:04 +00:00
openPdf(id) {
2020-03-17 13:43:46 +00:00
let url = `api/InvoiceOuts/${id}/download?access_token=${this.vnToken.token}`;
2019-03-13 13:10:45 +00:00
window.open(url, '_blank');
}
}
ngModule.vnComponent('vnInvoiceOutIndex', {
2019-03-13 13:10:45 +00:00
template: require('./index.html'),
controller: Controller
});