2019-03-12 14:04:09 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="/worker/api/departments/getLeaves"
|
|
|
|
params="::$ctrl.params"
|
|
|
|
auto-load="false">
|
|
|
|
</vn-crud-model>
|
|
|
|
|
|
|
|
<form name="form">
|
2019-10-04 22:16:57 +00:00
|
|
|
<div class="vn-ma-md">
|
|
|
|
<vn-card class="vn-my-md vn-pa-md">
|
2019-03-12 14:04:09 +00:00
|
|
|
<vn-treeview vn-id="treeview" model="model"
|
|
|
|
on-selection="$ctrl.onSelection(item, value)"
|
|
|
|
on-create="$ctrl.onCreate(parent)"
|
2019-04-23 06:29:23 +00:00
|
|
|
on-drop="$ctrl.onDrop(item, dragged, dropped)"
|
2019-04-29 09:49:43 +00:00
|
|
|
icons="$ctrl.icons"
|
|
|
|
draggable="true" droppable="true"
|
|
|
|
acl-role="hr" editable="true">
|
2019-03-12 14:04:09 +00:00
|
|
|
</vn-treeview>
|
|
|
|
</vn-card>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<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-04 22:16:57 +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"
|
|
|
|
model="$ctrl.newNode.name">
|
|
|
|
</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>
|
|
|
|
</vn-dialog>
|