refs #5334 fix descriptor, basic-data, summary
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2023-05-30 09:16:02 +02:00
parent 9ee653dbd1
commit d9a64211de
7 changed files with 28 additions and 25 deletions

View File

@ -8,8 +8,8 @@
},
"properties": {
"id": {
"id": true,
"type": "number",
"id": true,
"description": "Identifier"
},
"code": {
@ -38,6 +38,9 @@
},
"hasToMistake": {
"type": "number"
},
"isTeleworking": {
"type": "boolean"
}
},
"relations": {

View File

@ -1,9 +1,8 @@
<mg-ajax path="Departments/{{patch.params.id}}" options="vnPatch"></mg-ajax>
<vn-watcher
vn-id="watcher"
data="$ctrl.department"
form="form"
save="patch">
url="Departments">
</vn-watcher>
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">

View File

@ -11,24 +11,24 @@
</vn-item>
</slot-menu>
<slot-body>
<h2>{{worker.department.name}}</h2>
<p>{{worker.department.id}}</p>
<h2>{{department}}</h2>
<p>{{department.id}}</p>
<div class="attributes">
<vn-label-value
label="Chat"
value="{{$ctrl.worker.department.chatName}}">
value="{{$ctrl.department.chatName}}">
</vn-label-value>
<vn-label-value
label="Email"
value="{{$ctrl.worker.department.emailNotification}}">
value="{{$ctrl.department.emailNotification}}">
</vn-label-value>
<vn-label-value
label="Self-consumption customer"
value="{{$ctrl.worker.department.clientFK}}">
value="{{$ctrl.department.clientFK}}">
</vn-label-value>
<vn-label-value
label="Boss department"
value="{{$ctrl.worker.department.workerFk}}">
value="{{$ctrl.department.workerFk}}">
</vn-label-value>
</div>
</div>

View File

@ -26,14 +26,11 @@ class Controller extends Descriptor {
{
relation: 'worker',
scope: {fields: ['name']}
}, {
relation: 'department',
scope: {fields: ['name']}
}
]
};
return this.getData(`Workers/${this.id}`, {filter})
return this.getData(`Departments/${this.id}`, {filter})
.then(res => this.entity = res.data);
}
}
@ -44,6 +41,6 @@ ngModule.vnComponent('vnWorkerDepartmentDescriptor', {
template: require('./index.html'),
controller: Controller,
bindings: {
worker: '<'
department: '<'
}
});

View File

@ -1,4 +1,5 @@
<vn-card class="summary">
<h5>
<span>{{summary.name}}</span>
</h5>
<vn-horizontal class="vn-pa-md">
@ -21,7 +22,7 @@
value="{{summary.code}}">
</vn-label-value>
<vn-label-value label="Chat"
value="{{summary.chat}}">
value="{{summary.chatName}}">
</vn-label-value>
<vn-label-value
label="Boss department"
@ -37,23 +38,28 @@
<vn-vertical>
<vn-check
label="Telecommutes"
ng-model="$ctrl.summary.isTeleworking">
ng-model="summary.isTeleworking"
disabled="true">
</vn-check>
<vn-check
label="Notificate errors"
ng-model="$ctrl.summary.hasToMistake">
ng-model="summary.hasToMistake"
disabled="true">
</vn-check>
<vn-check
label="Is on production"
ng-model="$ctrl.summary.isProduction">
ng-model="summary.isProduction"
disabled="true">
</vn-check>
<vn-check
label="Fill in days without physical check-ins"
ng-model="$ctrl.summary.hasToRefill">
ng-model="summary.hasToRefill"
disabled="true">
</vn-check>
<vn-check
label="Send check-ins by email"
ng-model="$ctrl.summary.hasToSendMail">
ng-model="summary.hasToSendMail"
disabled="true">
</vn-check>
</vn-vertical>
</vn-horizontal>

View File

@ -10,8 +10,7 @@ class Controller extends Component {
const filter = {
include: [
{relation: 'client'},
{relation: 'worker'},
{relation: 'department'}
{relation: 'worker'}
]
};

View File

@ -146,9 +146,8 @@
"component": "vn-worker-department-basic-data",
"description": "Basic data",
"params": {
"item-type": "$ctrl.itemType"
},
"acl": ["buyer"]
"department": "$ctrl.department"
}
},
{
"url": "/dms",