refs #5334 department workers list
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-05-30 15:13:16 +02:00
parent 26187898e1
commit 1dcaba1fdc
5 changed files with 16 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import ngModule from '../module';
import ngModule from '../../module';
import DescriptorPopover from 'salix/components/descriptor-popover';
class Controller extends DescriptorPopover {}

View File

@ -30,7 +30,10 @@
value="{{$ctrl.department.worker.firstName}} {{$ctrl.department.worker.secondName}}">
</vn-label-value>
</div>
</div>
<vn-icon-button vn-anchor="{state: 'worker.index', params: {q: {departmentFk: $ctrl.department.id}}}"
vn-tooltip="Department workers"
icon="icon-ticket">
</vn-icon-button>
</slot-body>
</vn-descriptor-content>
<vn-popup vn-id="summary">

View File

@ -15,6 +15,14 @@ class Controller extends Descriptor {
this.entity = value;
}
filterDepartments(department, event) {
if (event.defaultPrevented) return;
event.preventDefault();
event.stopPropagation();
this.$state.go(`worker.index`,
{q: JSON.stringify({departmentFk: department.id})});
}
deleteDepartment() {
return this.$http.post(`Departments/${this.id}/setDeleted`)
.then(() => this.reload())

View File

@ -2,3 +2,4 @@ New department: Nuevo departamento
Delete department: Eliminar departamento
Are you sure you want to delete it?: ¿Seguro que quieres eliminarlo?
Name can't be empty: El nombre esta vacio
Department workers: Trabajadores del departamento

View File

@ -31,7 +31,7 @@
<span
ng-click="workerDepartmentDescriptor.show($event, worker.department.department.id)"
class="link">
{{::worker.department.department.name}}
{{worker.department.department.name}}
</span>
</vn-label-value>
<vn-label-value