refs #5334 label-value
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2023-05-26 14:08:37 +02:00
parent 07e176ae4f
commit ceaaece007
4 changed files with 20 additions and 41 deletions

View File

@ -4,10 +4,6 @@ import Section from 'salix/components/section';
class Controller extends Section {
constructor($element, $) {
super($element, $);
this.maritalStatus = [
{code: 'M', name: this.$t('Married')},
{code: 'S', name: this.$t('Single')}
];
}
onSubmit() {
return this.$.watcher.submit()

View File

@ -16,35 +16,19 @@ class Controller extends Descriptor {
}
loadData() {
const filter = {
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMai', 'hasToMistake', 'clientFk'],
include: [
{
relation: 'user',
scope: {
fields: ['name'],
include: {
relation: 'emailUser',
scope: {
fields: ['email']
}
}
}
}, {
relation: 'client',
scope: {
fields: ['fi']
}
}, {
relation: 'sip',
scope: {
fields: ['extension']
}
scope: {fields: ['name']}
},
{
relation: 'worker',
scope: {fields: ['name']}
}, {
relation: 'department',
scope: {
include: {
relation: 'department'
}
}
scope: {fields: ['name']}
}
]
};

View File

@ -2,9 +2,9 @@
<h5>
<a ng-if="::$ctrl.department.id"
vn-tooltip="Go to the department"
ui-sref="worker.department.card.summary({id: {{::$ctrl.department.id}}})"
ui-sref="worker.department.card.summary({id: {{::$ctrl.worker.department.id}}})"
name="goToSummary">
<vn-icon-button icon="launch"></vn-icon-button>
<vn-icon-button icon="work"></vn-icon-button>
</a>
<span>{{department.name}}</span>
</h5>
@ -12,7 +12,7 @@
<vn-one>
<h4 ng-show="$ctrl.isHr">
<a
ui-sref="department.card.basicData({id:$ctrl.department.id})">
ui-sref="department.card.basicData({id:$ctrl.worker.department.id})">
<span translate vn-tooltip="Go to">Basic data</span>
</a>
</h4>
@ -24,21 +24,17 @@
<vn-label-value label="Nombre"
value="{{department.name}}">
</vn-label-value>
<vn-label-value label="Code" no-ellipsize
<vn-label-value label="Code"
value="{{department.code}}">
</vn-label-value>
<vn-label-value label="Chat"
value="{{department.chat}}">
</vn-label-value>
<vn-label-value
label="Boss department">
<span
ng-click="workerDescriptor.show($event, worker.boss.id)"
class="link">
{{::worker.boss.nickname}}
</span>
label="Boss department"
value="{{$ctrl.worker.department.workerFk}}">
</vn-label-value>
<vn-label-value label="Email:"
<vn-label-value label="Email"
value="{{department.notificationEmail}}">
</vn-label-value>
<vn-label-value label="Self-consumption customer"

View File

@ -13,7 +13,8 @@ class Controller extends Summary {
const query = `Departments/${value.id}`;
const filter = {
fields: ['chatName', 'notificationEmail'],
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMai', 'hasToMistake', 'clientFk'],
include: [
{
relation: 'client',
@ -22,8 +23,10 @@ class Controller extends Summary {
{
relation: 'worker',
scope: {fields: ['name']}
}, {
relation: 'department',
scope: {fields: ['name']}
}
]
};