2018-08-24 11:16:11 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
|
|
|
|
class Controller {
|
|
|
|
constructor($state) {
|
|
|
|
this.$state = $state;
|
2018-10-03 06:00:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
};
|
2018-08-24 11:16:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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: '<'
|
|
|
|
}
|
|
|
|
});
|