Added boss on basic data and summary
This commit is contained in:
parent
ddb443ab8f
commit
8deb11d333
|
@ -61,6 +61,11 @@
|
|||
"type": "hasMany",
|
||||
"model": "WorkerTeamCollegues",
|
||||
"foreignKey": "workerFk"
|
||||
},
|
||||
"boss": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "bossFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
<vn-label-value label="Department"
|
||||
value="{{worker.department.department.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Boss"
|
||||
value="{{worker.boss.firstName}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Phone"
|
||||
value="{{worker.phone}}">
|
||||
</vn-label-value>
|
||||
|
|
|
@ -34,6 +34,9 @@ class Controller extends Summary {
|
|||
}, {
|
||||
relation: 'client',
|
||||
scope: {fields: ['fi']}
|
||||
}, {
|
||||
relation: 'boss',
|
||||
scope: {fields: ['id', 'firstName']}
|
||||
}, {
|
||||
relation: 'sip',
|
||||
scope: {fields: ['extension']}
|
||||
|
|
Loading…
Reference in New Issue