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",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"boss": {
|
||||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "bossFk"
|
||||
},
|
||||
"client": {
|
||||
"type": "belongsTo",
|
||||
"model": "Client",
|
||||
|
|
|
@ -29,6 +29,15 @@
|
|||
ng-model="$ctrl.worker.phone"
|
||||
rule>
|
||||
</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-vertical>
|
||||
</vn-card>
|
||||
|
|
|
@ -7,6 +7,7 @@ Extension: Extensión
|
|||
Fiscal identifier: NIF
|
||||
Go to client: Ir al cliente
|
||||
Last name: Apellidos
|
||||
Boss: Jefe
|
||||
Log: Historial
|
||||
Private Branch Exchange: Centralita
|
||||
Role: Rol
|
||||
|
|
|
@ -30,6 +30,14 @@
|
|||
<vn-label-value label="Department"
|
||||
value="{{worker.department.department.name}}">
|
||||
</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"
|
||||
value="{{worker.phone}}">
|
||||
</vn-label-value>
|
||||
|
@ -51,3 +59,6 @@
|
|||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-worker-descriptor-popover
|
||||
vn-id="workerDescriptor">
|
||||
</vn-worker-descriptor-popover>
|
|
@ -11,8 +11,8 @@ class Controller extends Summary {
|
|||
this.$.worker = null;
|
||||
if (!value) return;
|
||||
|
||||
let query = `Workers/${value.id}`;
|
||||
let filter = {
|
||||
const query = `Workers/${value.id}`;
|
||||
const filter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'user',
|
||||
|
@ -31,13 +31,20 @@ class Controller extends Summary {
|
|||
}
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
relation: 'client',
|
||||
scope: {fields: ['fi']}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
relation: 'boss',
|
||||
scope: {fields: ['id', 'nickname']}
|
||||
},
|
||||
{
|
||||
relation: 'sip',
|
||||
scope: {fields: ['extension']}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
relation: 'department',
|
||||
scope: {
|
||||
include: {
|
||||
|
|
Loading…
Reference in New Issue