This commit is contained in:
parent
26187898e1
commit
1dcaba1fdc
|
@ -1,4 +1,4 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
import DescriptorPopover from 'salix/components/descriptor-popover';
|
import DescriptorPopover from 'salix/components/descriptor-popover';
|
||||||
|
|
||||||
class Controller extends DescriptorPopover {}
|
class Controller extends DescriptorPopover {}
|
||||||
|
|
|
@ -30,7 +30,10 @@
|
||||||
value="{{$ctrl.department.worker.firstName}} {{$ctrl.department.worker.secondName}}">
|
value="{{$ctrl.department.worker.firstName}} {{$ctrl.department.worker.secondName}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
</div>
|
</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>
|
</slot-body>
|
||||||
</vn-descriptor-content>
|
</vn-descriptor-content>
|
||||||
<vn-popup vn-id="summary">
|
<vn-popup vn-id="summary">
|
||||||
|
|
|
@ -15,6 +15,14 @@ class Controller extends Descriptor {
|
||||||
this.entity = value;
|
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() {
|
deleteDepartment() {
|
||||||
return this.$http.post(`Departments/${this.id}/setDeleted`)
|
return this.$http.post(`Departments/${this.id}/setDeleted`)
|
||||||
.then(() => this.reload())
|
.then(() => this.reload())
|
||||||
|
|
|
@ -2,3 +2,4 @@ New department: Nuevo departamento
|
||||||
Delete department: Eliminar departamento
|
Delete department: Eliminar departamento
|
||||||
Are you sure you want to delete it?: ¿Seguro que quieres eliminarlo?
|
Are you sure you want to delete it?: ¿Seguro que quieres eliminarlo?
|
||||||
Name can't be empty: El nombre esta vacio
|
Name can't be empty: El nombre esta vacio
|
||||||
|
Department workers: Trabajadores del departamento
|
|
@ -31,7 +31,7 @@
|
||||||
<span
|
<span
|
||||||
ng-click="workerDepartmentDescriptor.show($event, worker.department.department.id)"
|
ng-click="workerDepartmentDescriptor.show($event, worker.department.department.id)"
|
||||||
class="link">
|
class="link">
|
||||||
{{::worker.department.department.name}}
|
{{worker.department.department.name}}
|
||||||
</span>
|
</span>
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
|
|
Loading…
Reference in New Issue