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

43 lines
843 B
JavaScript

import ngModule from '../module';
class Controller {
constructor($http, $state) {
this.$state = $state;
this.$http = $http;
}
get worker() {
return this._worker;
}
set worker(value) {
this._worker = value;
if (!value) return;
this._quicklinks = {
btnOne: {
icon: 'person',
state: `client.card.summary({id: ${value.userFk}})`,
tooltip: 'Go to client'
}
};
}
set quicklinks(value = {}) {
this._quicklinks = Object.assign(value, this._quicklinks);
}
get quicklinks() {
return this._quicklinks;
}
}
ngModule.component('vnWorkerDescriptor', {
template: require('./index.html'),
controller: Controller,
bindings: {
worker: '<'
}
});