2019-03-12 14:04:09 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="departments/getLeaves"
|
2019-03-12 14:04:09 +00:00
|
|
|
auto-load="false">
|
|
|
|
</vn-crud-model>
|
2023-06-01 12:19:50 +00:00
|
|
|
<vn-portal slot="topbar">
|
|
|
|
<vn-searchbar
|
|
|
|
vn-focus
|
|
|
|
info="Search departments by id, name or code"
|
|
|
|
on-search="$ctrl.onSearch($params)"
|
|
|
|
base-state="worker.department">
|
|
|
|
</vn-searchbar>
|
|
|
|
</vn-portal>
|
2019-11-10 10:08:44 +00:00
|
|
|
<form name="form" class="vn-w-md">
|
|
|
|
<vn-card class="vn-pa-md">
|
|
|
|
<vn-treeview vn-id="treeview" root-label="Departments" read-only="false"
|
|
|
|
fetch-func="$ctrl.onFetch($item)"
|
|
|
|
remove-func="$ctrl.onRemove($item)"
|
|
|
|
create-func="$ctrl.onCreate($parent)"
|
|
|
|
sort-func="$ctrl.onSort($a, $b)"
|
|
|
|
on-drop="$ctrl.onDrop($dropped, $dragged)"
|
|
|
|
on-drag-start="$ctrl.onDragStart(item)"
|
2023-05-26 09:43:51 +00:00
|
|
|
on-drag-end="$ctrl.onDragEnd(item)">
|
|
|
|
<a
|
2023-06-30 11:52:46 +00:00
|
|
|
style="display: block; color: inherit;"
|
2023-05-26 09:43:51 +00:00
|
|
|
ui-sref="worker.department.card.summary({id: item.id})"
|
|
|
|
translate>
|
|
|
|
{{::item.name}}
|
|
|
|
</a>
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-treeview>
|
|
|
|
</vn-card>
|
|
|
|
</form>
|
2019-03-12 14:04:09 +00:00
|
|
|
<vn-confirm
|
|
|
|
vn-id="deleteNode"
|
2020-07-29 08:47:48 +00:00
|
|
|
on-accept="$ctrl.onRemoveResponse()"
|
2019-03-12 14:04:09 +00:00
|
|
|
question="Delete department"
|
|
|
|
message="Are you sure you want to delete it?">
|
|
|
|
</vn-confirm>
|
|
|
|
<!-- Create department dialog -->
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="createNode"
|
|
|
|
on-open="$ctrl.onCreateDialogOpen()"
|
2020-07-29 08:47:48 +00:00
|
|
|
on-accept="$ctrl.onCreateResponse()"
|
2020-05-06 12:38:09 +00:00
|
|
|
message="New department">
|
2019-03-12 14:04:09 +00:00
|
|
|
<tpl-body>
|
2020-05-06 12:38:09 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Name"
|
|
|
|
ng-model="$ctrl.newChild.name"
|
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
2019-03-12 14:04:09 +00:00
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
2019-10-30 15:57:14 +00:00
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Create</button>
|
2019-03-12 14:04:09 +00:00
|
|
|
</tpl-buttons>
|
2019-10-08 11:06:50 +00:00
|
|
|
</vn-dialog>
|