refs #5334 popover
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-05-30 14:02:34 +02:00
parent 8860c77147
commit 26187898e1
4 changed files with 24 additions and 3 deletions

View File

@ -0,0 +1,4 @@
<slot-descriptor>
<vn-worker-department-descriptor>
</vn-worker-department-descriptor>
</slot-descriptor>

View File

@ -0,0 +1,9 @@
import ngModule from '../module';
import DescriptorPopover from 'salix/components/descriptor-popover';
class Controller extends DescriptorPopover {}
ngModule.vnComponent('vnWorkerDepartmentDescriptorPopover', {
slotTemplate: require('./index.html'),
controller: Controller
});

View File

@ -27,8 +27,12 @@
<vn-label-value label="Email" no-ellipsize
value="{{worker.user.emailUser.email}}">
</vn-label-value>
<vn-label-value label="Department"
value="{{worker.department.department.name}}">
<vn-label-value label="Department">
<span
ng-click="workerDepartmentDescriptor.show($event, worker.department.department.id)"
class="link">
{{::worker.department.department.name}}
</span>
</vn-label-value>
<vn-label-value
label="Boss">
@ -71,3 +75,6 @@
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
<vn-worker-department-descriptor-popover
vn-id="workerDepartmentDescriptor">
</vn-worker-department-descriptor-popover>

View File

@ -48,7 +48,8 @@ class Controller extends Summary {
relation: 'department',
scope: {
include: {
relation: 'department'
relation: 'department',
scope: {fields: ['id', 'code', 'name']}
}
}
}