salix/modules/worker/front/department/card/index.js

30 lines
770 B
JavaScript
Raw Normal View History

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 = {
fields: ['chatName', 'notificationEmail'],
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
});