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

30 lines
649 B
JavaScript
Raw Normal View History

2019-01-28 15:24:45 +00:00
import ngModule from '../module';
2020-04-25 09:50:04 +00:00
import Descriptor from 'salix/components/descriptor';
2019-01-28 15:24:45 +00:00
2020-04-25 09:50:04 +00:00
class Controller extends Descriptor {
2019-10-21 12:21:52 +00:00
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'
}
};
}
}
2020-04-25 09:50:04 +00:00
ngModule.vnComponent('vnWorkerDescriptor', {
2019-01-28 15:24:45 +00:00
template: require('./index.html'),
2019-10-21 12:21:52 +00:00
controller: Controller,
2019-01-28 15:24:45 +00:00
bindings: {
worker: '<'
}
});