This commit is contained in:
parent
07e176ae4f
commit
ceaaece007
|
@ -4,10 +4,6 @@ import Section from 'salix/components/section';
|
||||||
class Controller extends Section {
|
class Controller extends Section {
|
||||||
constructor($element, $) {
|
constructor($element, $) {
|
||||||
super($element, $);
|
super($element, $);
|
||||||
this.maritalStatus = [
|
|
||||||
{code: 'M', name: this.$t('Married')},
|
|
||||||
{code: 'S', name: this.$t('Single')}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
return this.$.watcher.submit()
|
return this.$.watcher.submit()
|
||||||
|
|
|
@ -16,35 +16,19 @@ class Controller extends Descriptor {
|
||||||
}
|
}
|
||||||
loadData() {
|
loadData() {
|
||||||
const filter = {
|
const filter = {
|
||||||
|
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
|
||||||
|
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMai', 'hasToMistake', 'clientFk'],
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
relation: 'user',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
include: {
|
|
||||||
relation: 'emailUser',
|
|
||||||
scope: {
|
|
||||||
fields: ['email']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
relation: 'client',
|
relation: 'client',
|
||||||
scope: {
|
scope: {fields: ['name']}
|
||||||
fields: ['fi']
|
},
|
||||||
}
|
{
|
||||||
}, {
|
relation: 'worker',
|
||||||
relation: 'sip',
|
scope: {fields: ['name']}
|
||||||
scope: {
|
|
||||||
fields: ['extension']
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
relation: 'department',
|
relation: 'department',
|
||||||
scope: {
|
scope: {fields: ['name']}
|
||||||
include: {
|
|
||||||
relation: 'department'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<h5>
|
<h5>
|
||||||
<a ng-if="::$ctrl.department.id"
|
<a ng-if="::$ctrl.department.id"
|
||||||
vn-tooltip="Go to the department"
|
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">
|
name="goToSummary">
|
||||||
<vn-icon-button icon="launch"></vn-icon-button>
|
<vn-icon-button icon="work"></vn-icon-button>
|
||||||
</a>
|
</a>
|
||||||
<span>{{department.name}}</span>
|
<span>{{department.name}}</span>
|
||||||
</h5>
|
</h5>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<h4 ng-show="$ctrl.isHr">
|
<h4 ng-show="$ctrl.isHr">
|
||||||
<a
|
<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>
|
<span translate vn-tooltip="Go to">Basic data</span>
|
||||||
</a>
|
</a>
|
||||||
</h4>
|
</h4>
|
||||||
|
@ -24,21 +24,17 @@
|
||||||
<vn-label-value label="Nombre"
|
<vn-label-value label="Nombre"
|
||||||
value="{{department.name}}">
|
value="{{department.name}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value label="Code" no-ellipsize
|
<vn-label-value label="Code"
|
||||||
value="{{department.code}}">
|
value="{{department.code}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value label="Chat"
|
<vn-label-value label="Chat"
|
||||||
value="{{department.chat}}">
|
value="{{department.chat}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Boss department">
|
label="Boss department"
|
||||||
<span
|
value="{{$ctrl.worker.department.workerFk}}">
|
||||||
ng-click="workerDescriptor.show($event, worker.boss.id)"
|
|
||||||
class="link">
|
|
||||||
{{::worker.boss.nickname}}
|
|
||||||
</span>
|
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value label="Email:"
|
<vn-label-value label="Email"
|
||||||
value="{{department.notificationEmail}}">
|
value="{{department.notificationEmail}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value label="Self-consumption customer"
|
<vn-label-value label="Self-consumption customer"
|
||||||
|
|
|
@ -13,7 +13,8 @@ class Controller extends Summary {
|
||||||
|
|
||||||
const query = `Departments/${value.id}`;
|
const query = `Departments/${value.id}`;
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['chatName', 'notificationEmail'],
|
fields: ['id', 'name', 'code', 'workerFk', 'isProduction', 'chatName',
|
||||||
|
'isTeleworking', 'notificationEmail', 'hasToRefill', 'hasToSendMai', 'hasToMistake', 'clientFk'],
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
relation: 'client',
|
relation: 'client',
|
||||||
|
@ -22,8 +23,10 @@ class Controller extends Summary {
|
||||||
{
|
{
|
||||||
relation: 'worker',
|
relation: 'worker',
|
||||||
scope: {fields: ['name']}
|
scope: {fields: ['name']}
|
||||||
|
}, {
|
||||||
|
relation: 'department',
|
||||||
|
scope: {fields: ['name']}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue