2023-05-16 06:54:54 +00:00
|
|
|
import ngModule from '../../module';
|
2023-05-15 11:15:33 +00:00
|
|
|
import ModuleCard from 'salix/components/module-card';
|
|
|
|
|
|
|
|
class Controller extends ModuleCard {
|
|
|
|
reload() {
|
|
|
|
const filter = {
|
2023-05-17 07:05:28 +00:00
|
|
|
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
|
2023-05-26 12:23:34 +00:00
|
|
|
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMail', 'hasToMistake', 'clientFk'],
|
2023-05-15 11:15:33 +00:00
|
|
|
include: [
|
2023-05-30 09:54:14 +00:00
|
|
|
{relation: 'client',
|
|
|
|
scope: {
|
|
|
|
fields: ['id', 'name']
|
|
|
|
}},
|
2023-05-15 11:15:33 +00:00
|
|
|
{
|
|
|
|
relation: 'worker',
|
2023-05-30 09:54:14 +00:00
|
|
|
scope: {
|
|
|
|
fields: ['id', 'firstName', 'lastName']
|
|
|
|
}
|
2023-05-15 11:15:33 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
this.$http.get(`Departments/${this.$params.id}`, {filter})
|
|
|
|
.then(res => this.department = res.data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ngModule.vnComponent('vnWorkerDepartmentCard', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|