Merge pull request '2776 Show on summary and basic data the boss of the worker' (#554) from 2776-add_boss_summary into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #554 Reviewed-by: Carlos Jimenez Ruiz <carlosjr@verdnatura.es>
This commit is contained in:
commit
12111be861
|
@ -42,6 +42,11 @@
|
||||||
"model": "Account",
|
"model": "Account",
|
||||||
"foreignKey": "userFk"
|
"foreignKey": "userFk"
|
||||||
},
|
},
|
||||||
|
"boss": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "Account",
|
||||||
|
"foreignKey": "bossFk"
|
||||||
|
},
|
||||||
"client": {
|
"client": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Client",
|
"model": "Client",
|
||||||
|
|
|
@ -29,6 +29,15 @@
|
||||||
ng-model="$ctrl.worker.phone"
|
ng-model="$ctrl.worker.phone"
|
||||||
rule>
|
rule>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
|
<vn-autocomplete
|
||||||
|
disabled="false"
|
||||||
|
ng-model="$ctrl.worker.bossFk"
|
||||||
|
url="Clients/activeWorkersWithRole"
|
||||||
|
show-field="nickname"
|
||||||
|
search-function="{firstName: $search}"
|
||||||
|
where="{role: 'employee'}"
|
||||||
|
label="Boss">
|
||||||
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
|
|
|
@ -7,6 +7,7 @@ Extension: Extensión
|
||||||
Fiscal identifier: NIF
|
Fiscal identifier: NIF
|
||||||
Go to client: Ir al cliente
|
Go to client: Ir al cliente
|
||||||
Last name: Apellidos
|
Last name: Apellidos
|
||||||
|
Boss: Jefe
|
||||||
Log: Historial
|
Log: Historial
|
||||||
Private Branch Exchange: Centralita
|
Private Branch Exchange: Centralita
|
||||||
Role: Rol
|
Role: Rol
|
||||||
|
|
|
@ -30,6 +30,14 @@
|
||||||
<vn-label-value label="Department"
|
<vn-label-value label="Department"
|
||||||
value="{{worker.department.department.name}}">
|
value="{{worker.department.department.name}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
|
<vn-label-value
|
||||||
|
label="Boss">
|
||||||
|
<span
|
||||||
|
ng-click="workerDescriptor.show($event, worker.boss.id)"
|
||||||
|
class="link">
|
||||||
|
{{::worker.boss.nickname}}
|
||||||
|
</span>
|
||||||
|
</vn-label-value>
|
||||||
<vn-label-value label="Phone"
|
<vn-label-value label="Phone"
|
||||||
value="{{worker.phone}}">
|
value="{{worker.phone}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
|
@ -51,3 +59,6 @@
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
|
<vn-worker-descriptor-popover
|
||||||
|
vn-id="workerDescriptor">
|
||||||
|
</vn-worker-descriptor-popover>
|
|
@ -11,8 +11,8 @@ class Controller extends Summary {
|
||||||
this.$.worker = null;
|
this.$.worker = null;
|
||||||
if (!value) return;
|
if (!value) return;
|
||||||
|
|
||||||
let query = `Workers/${value.id}`;
|
const query = `Workers/${value.id}`;
|
||||||
let filter = {
|
const filter = {
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
relation: 'user',
|
relation: 'user',
|
||||||
|
@ -31,13 +31,20 @@ class Controller extends Summary {
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
relation: 'client',
|
relation: 'client',
|
||||||
scope: {fields: ['fi']}
|
scope: {fields: ['fi']}
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
|
relation: 'boss',
|
||||||
|
scope: {fields: ['id', 'nickname']}
|
||||||
|
},
|
||||||
|
{
|
||||||
relation: 'sip',
|
relation: 'sip',
|
||||||
scope: {fields: ['extension']}
|
scope: {fields: ['extension']}
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
relation: 'department',
|
relation: 'department',
|
||||||
scope: {
|
scope: {
|
||||||
include: {
|
include: {
|
||||||
|
|
Loading…
Reference in New Issue