36 lines
1007 B
JavaScript
36 lines
1007 B
JavaScript
import ngModule from '../module';
|
|
import Section from 'salix/components/section';
|
|
|
|
export default class Controller extends Section {
|
|
showClientDescriptor(event, clientFk) {
|
|
this.$.clientDescriptor.clientFk = clientFk;
|
|
this.$.clientDescriptor.parent = event.target;
|
|
this.$.clientDescriptor.show();
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
}
|
|
|
|
preview(event, invoiceOut) {
|
|
this.selectedInvoiceOut = invoiceOut;
|
|
this.$.summary.show();
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
}
|
|
|
|
onDescriptorLoad() {
|
|
this.$.popover.relocate();
|
|
}
|
|
|
|
openPdf(id, event) {
|
|
let url = `api/InvoiceOuts/${id}/download?access_token=${this.vnToken.token}`;
|
|
window.open(url, '_blank');
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
}
|
|
}
|
|
|
|
ngModule.component('vnInvoiceOutIndex', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|