salix/client/item/src/ticket-descriptor/index.js

45 lines
891 B
JavaScript
Raw Normal View History

import ngModule from '../module';
class Controller {
2018-09-04 09:49:00 +00:00
constructor($state, $scope) {
this.$scope = $scope;
2018-09-04 09:49:00 +00:00
this.$state = $state;
}
2018-09-04 09:49:00 +00:00
get ticket() {
return this._ticket;
}
2018-09-04 09:49:00 +00:00
set ticket(value) {
this._ticket = value;
if (!value) return;
this._quicklinks = {
btnOne: {
icon: 'person',
state: `client.card.summary({id: ${value.clientFk}})`,
tooltip: 'Client card'
}
};
}
set quicklinks(value = {}) {
this._quicklinks = Object.assign(value, this._quicklinks);
}
get quicklinks() {
return this._quicklinks;
}
}
2018-09-04 09:49:00 +00:00
Controller.$inject = ['$state', '$scope'];
ngModule.component('vnTicketDescriptor', {
template: require('./index.html'),
bindings: {
ticket: '<'
},
controller: Controller
});