31 lines
912 B
JavaScript
31 lines
912 B
JavaScript
import ngModule from '../../module';
|
|
import ModuleCard from 'salix/components/module-card';
|
|
|
|
class Controller extends ModuleCard {
|
|
reload() {
|
|
const filter = {
|
|
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
|
|
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMai', 'hasToMistake', 'clientFk'],
|
|
include: [
|
|
{
|
|
relation: 'client',
|
|
scope: {fields: ['name']}
|
|
},
|
|
{
|
|
relation: 'worker',
|
|
scope: {fields: ['name']}
|
|
}
|
|
|
|
]
|
|
};
|
|
|
|
this.$http.get(`Departments/${this.$params.id}`, {filter})
|
|
.then(res => this.department = res.data);
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnWorkerDepartmentCard', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|