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

46 lines
1.1 KiB
JavaScript
Raw Normal View History

2019-03-26 13:27:08 +00:00
import ngModule from '../module';
class Controller {
set invoiceOut(value) {
this._invoiceOut = value;
if (value) {
this._quicklinks = {
btnOne: {
icon: 'icon-person',
state: `client.card.summary({id: ${value.clientFk}})`,
tooltip: 'Client card'
},
btnTwo: {
icon: 'icon-ticket',
state: `ticket.index({q: '{"refFk": "${value.ref}"}'})`,
tooltip: 'Invoice ticket list'
}
};
}
}
get invoiceOut() {
return this._invoiceOut;
}
set quicklinks(value = {}) {
this._quicklinks = Object.assign(value, this._quicklinks);
}
get quicklinks() {
return this._quicklinks;
}
}
Controller.$inject = ['$http', '$state'];
ngModule.component('vnInvoiceOutDescriptor', {
template: require('./index.html'),
bindings: {
invoiceOut: '<',
quicklinks: '<'
},
controller: Controller
});