2019-03-12 14:04:09 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="/worker/api/departments/getLeaves"
|
|
|
|
auto-load="false">
|
|
|
|
</vn-crud-model>
|
2019-10-01 13:09:55 +00:00
|
|
|
<div class="content-block" compact>
|
|
|
|
<form name="form" compact>
|
2019-10-08 11:03:19 +00:00
|
|
|
<vn-card class="vn-my-md vn-pa-md">
|
2019-10-08 05:22:38 +00:00
|
|
|
<vn-treeview vn-id="treeview" root-label="Departments" read-only="false"
|
|
|
|
fetch-func="$ctrl.onFetch($item)"
|
2019-10-04 05:41:24 +00:00
|
|
|
remove-func="$ctrl.onRemove($item)"
|
2019-10-08 05:22:38 +00:00
|
|
|
create-func="$ctrl.onCreate($parent)"
|
|
|
|
sort-func="$ctrl.onSort($a, $b)">
|
2019-10-02 12:12:17 +00:00
|
|
|
{{::item.name}}
|
2019-03-12 14:04:09 +00:00
|
|
|
</vn-treeview>
|
|
|
|
</vn-card>
|
2019-10-01 13:09:55 +00:00
|
|
|
<vn-button-bar>
|
|
|
|
<vn-button ui-sref="worker.index" label="Back"></vn-button>
|
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|
|
|
|
</div>
|
2019-03-12 14:04:09 +00:00
|
|
|
<vn-confirm
|
|
|
|
vn-id="deleteNode"
|
|
|
|
on-response="$ctrl.onRemoveResponse(response)"
|
|
|
|
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()"
|
|
|
|
on-response="$ctrl.onCreateResponse(response)">
|
|
|
|
<tpl-body>
|
2019-10-08 11:03:19 +00:00
|
|
|
<h5 class="vn-py-sm" translate>New department</h5>
|
2019-03-12 14:04:09 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield vn-one
|
|
|
|
label="Name"
|
2019-10-04 05:41:24 +00:00
|
|
|
model="$ctrl.newChild.name">
|
2019-03-12 14:04:09 +00:00
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="CANCEL" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="ACCEPT" translate>Create</button>
|
|
|
|
</tpl-buttons>
|
2019-10-08 11:06:50 +00:00
|
|
|
</vn-dialog>
|