refs #5334 fix acl, filter
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
4931745cde
commit
137e01e60c
|
@ -7,11 +7,12 @@ class Controller extends ModuleCard {
|
||||||
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
|
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
|
||||||
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMail', 'hasToMistake', 'clientFk'],
|
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMail', 'hasToMistake', 'clientFk'],
|
||||||
include: [
|
include: [
|
||||||
{relation: 'client',
|
{
|
||||||
|
relation: 'client',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['id', 'name']
|
fields: ['id', 'name']
|
||||||
}},
|
}
|
||||||
{
|
}, {
|
||||||
relation: 'worker',
|
relation: 'worker',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['id', 'firstName', 'lastName']
|
fields: ['id', 'firstName', 'lastName']
|
||||||
|
|
|
@ -6,26 +6,7 @@ class Controller extends Component {
|
||||||
this._department = value;
|
this._department = value;
|
||||||
this.$.summary = null;
|
this.$.summary = null;
|
||||||
if (!value) return;
|
if (!value) return;
|
||||||
|
this.$.summary = this.department;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
get department() {
|
get department() {
|
||||||
return this._department;
|
return this._department;
|
||||||
|
|
|
@ -124,8 +124,7 @@
|
||||||
"url": "/department?q",
|
"url": "/department?q",
|
||||||
"state": "worker.department",
|
"state": "worker.department",
|
||||||
"component": "vn-worker-department",
|
"component": "vn-worker-department",
|
||||||
"description":"Departments",
|
"description":"Departments"
|
||||||
"acl":["hr"]
|
|
||||||
}, {
|
}, {
|
||||||
"url": "/:id",
|
"url": "/:id",
|
||||||
"state": "worker.department.card",
|
"state": "worker.department.card",
|
||||||
|
|
Loading…
Reference in New Issue