refs #5334 fix descriptor, basic-data, summary
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
9ee653dbd1
commit
d9a64211de
|
@ -8,8 +8,8 @@
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"id": true,
|
|
||||||
"type": "number",
|
"type": "number",
|
||||||
|
"id": true,
|
||||||
"description": "Identifier"
|
"description": "Identifier"
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
|
@ -38,6 +38,9 @@
|
||||||
},
|
},
|
||||||
"hasToMistake": {
|
"hasToMistake": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
|
},
|
||||||
|
"isTeleworking": {
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<mg-ajax path="Departments/{{patch.params.id}}" options="vnPatch"></mg-ajax>
|
|
||||||
<vn-watcher
|
<vn-watcher
|
||||||
vn-id="watcher"
|
vn-id="watcher"
|
||||||
data="$ctrl.department"
|
data="$ctrl.department"
|
||||||
form="form"
|
form="form"
|
||||||
save="patch">
|
url="Departments">
|
||||||
</vn-watcher>
|
</vn-watcher>
|
||||||
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
||||||
<vn-card class="vn-pa-lg">
|
<vn-card class="vn-pa-lg">
|
||||||
|
|
|
@ -11,24 +11,24 @@
|
||||||
</vn-item>
|
</vn-item>
|
||||||
</slot-menu>
|
</slot-menu>
|
||||||
<slot-body>
|
<slot-body>
|
||||||
<h2>{{worker.department.name}}</h2>
|
<h2>{{department}}</h2>
|
||||||
<p>{{worker.department.id}}</p>
|
<p>{{department.id}}</p>
|
||||||
<div class="attributes">
|
<div class="attributes">
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Chat"
|
label="Chat"
|
||||||
value="{{$ctrl.worker.department.chatName}}">
|
value="{{$ctrl.department.chatName}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Email"
|
label="Email"
|
||||||
value="{{$ctrl.worker.department.emailNotification}}">
|
value="{{$ctrl.department.emailNotification}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Self-consumption customer"
|
label="Self-consumption customer"
|
||||||
value="{{$ctrl.worker.department.clientFK}}">
|
value="{{$ctrl.department.clientFK}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Boss department"
|
label="Boss department"
|
||||||
value="{{$ctrl.worker.department.workerFk}}">
|
value="{{$ctrl.department.workerFk}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -26,14 +26,11 @@ class Controller extends Descriptor {
|
||||||
{
|
{
|
||||||
relation: 'worker',
|
relation: 'worker',
|
||||||
scope: {fields: ['name']}
|
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);
|
.then(res => this.entity = res.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,6 +41,6 @@ ngModule.vnComponent('vnWorkerDepartmentDescriptor', {
|
||||||
template: require('./index.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
worker: '<'
|
department: '<'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<vn-card class="summary">
|
<vn-card class="summary">
|
||||||
|
<h5>
|
||||||
<span>{{summary.name}}</span>
|
<span>{{summary.name}}</span>
|
||||||
</h5>
|
</h5>
|
||||||
<vn-horizontal class="vn-pa-md">
|
<vn-horizontal class="vn-pa-md">
|
||||||
|
@ -21,7 +22,7 @@
|
||||||
value="{{summary.code}}">
|
value="{{summary.code}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value label="Chat"
|
<vn-label-value label="Chat"
|
||||||
value="{{summary.chat}}">
|
value="{{summary.chatName}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Boss department"
|
label="Boss department"
|
||||||
|
@ -37,23 +38,28 @@
|
||||||
<vn-vertical>
|
<vn-vertical>
|
||||||
<vn-check
|
<vn-check
|
||||||
label="Telecommutes"
|
label="Telecommutes"
|
||||||
ng-model="$ctrl.summary.isTeleworking">
|
ng-model="summary.isTeleworking"
|
||||||
|
disabled="true">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
<vn-check
|
<vn-check
|
||||||
label="Notificate errors"
|
label="Notificate errors"
|
||||||
ng-model="$ctrl.summary.hasToMistake">
|
ng-model="summary.hasToMistake"
|
||||||
|
disabled="true">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
<vn-check
|
<vn-check
|
||||||
label="Is on production"
|
label="Is on production"
|
||||||
ng-model="$ctrl.summary.isProduction">
|
ng-model="summary.isProduction"
|
||||||
|
disabled="true">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
<vn-check
|
<vn-check
|
||||||
label="Fill in days without physical check-ins"
|
label="Fill in days without physical check-ins"
|
||||||
ng-model="$ctrl.summary.hasToRefill">
|
ng-model="summary.hasToRefill"
|
||||||
|
disabled="true">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
<vn-check
|
<vn-check
|
||||||
label="Send check-ins by email"
|
label="Send check-ins by email"
|
||||||
ng-model="$ctrl.summary.hasToSendMail">
|
ng-model="summary.hasToSendMail"
|
||||||
|
disabled="true">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
|
|
@ -10,8 +10,7 @@ class Controller extends Component {
|
||||||
const filter = {
|
const filter = {
|
||||||
include: [
|
include: [
|
||||||
{relation: 'client'},
|
{relation: 'client'},
|
||||||
{relation: 'worker'},
|
{relation: 'worker'}
|
||||||
{relation: 'department'}
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -146,9 +146,8 @@
|
||||||
"component": "vn-worker-department-basic-data",
|
"component": "vn-worker-department-basic-data",
|
||||||
"description": "Basic data",
|
"description": "Basic data",
|
||||||
"params": {
|
"params": {
|
||||||
"item-type": "$ctrl.itemType"
|
"department": "$ctrl.department"
|
||||||
},
|
}
|
||||||
"acl": ["buyer"]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/dms",
|
"url": "/dms",
|
||||||
|
|
Loading…
Reference in New Issue