refs #5334 fix acl, filter
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2023-06-22 15:00:59 +02:00
parent 4931745cde
commit 137e01e60c
4 changed files with 8 additions and 27 deletions

View File

@ -7,11 +7,12 @@ class Controller extends ModuleCard {
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMail', 'hasToMistake', 'clientFk'],
include: [
{relation: 'client',
{
relation: 'client',
scope: {
fields: ['id', 'name']
}},
{
}
}, {
relation: 'worker',
scope: {
fields: ['id', 'firstName', 'lastName']

View File

@ -6,26 +6,7 @@ class Controller extends Component {
this._department = value;
this.$.summary = null;
if (!value) return;
const filter = {
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMail', 'hasToMistake', 'clientFk'],
include: [
{relation: 'client',
scope: {
fields: ['id', 'name']
}},
{
relation: 'worker',
scope: {
fields: ['id', 'firstName', 'lastName']
}
}
]
};
this.$http.get(`Departments/${value.id}`, {filter})
.then(res => this.$.summary = res.data);
this.$.summary = this.department;
}
get department() {
return this._department;

View File

@ -124,8 +124,7 @@
"url": "/department?q",
"state": "worker.department",
"component": "vn-worker-department",
"description":"Departments",
"acl":["hr"]
"description":"Departments"
}, {
"url": "/:id",
"state": "worker.department.card",