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

39 lines
807 B
JavaScript

import ngModule from '../module';
import Component from 'core/lib/component';
class Controller extends Component {
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: '<'
}
});