46 lines
881 B
JavaScript
46 lines
881 B
JavaScript
import ngModule from '../module';
|
|
|
|
class Controller {
|
|
constructor($state) {
|
|
this.$state = $state;
|
|
}
|
|
|
|
get claim() {
|
|
return this._claim;
|
|
}
|
|
|
|
set claim(value) {
|
|
this._claim = 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;
|
|
}
|
|
}
|
|
|
|
Controller.$inject = ['$state'];
|
|
|
|
ngModule.component('vnClaimDescriptor', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
claim: '<',
|
|
tags: '<',
|
|
quicklinks: '<'
|
|
}
|
|
});
|