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',
|
||||
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMail', 'hasToMistake', 'clientFk'],
|
||||
include: [
|
||||
{relation: 'client',
|
||||
{
|
||||
relation: 'client',
|
||||
scope: {
|
||||
fields: ['id', 'name']
|
||||
}},
|
||||
{
|
||||
}
|
||||
}, {
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
fields: ['id', 'firstName', 'lastName']
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
<div class="quicklinks">
|
||||
<div ng-transclude="btnOne">
|
||||
<vn-quick-link vn-anchor="{state: 'worker.index', params: {q: {departmentFk: $ctrl.$params.id} } }"
|
||||
vn-tooltip="Department workers"
|
||||
icon="icon-ticket">
|
||||
vn-tooltip="Department workers"
|
||||
icon="icon-ticket">
|
||||
</vn-quick-link>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue