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">
|
|
|
|
<div margin-medium>
|
|
|
|
<vn-card margin-medium-v pad-medium>
|
|
|
|
<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-03-12 14:04:09 +00:00
|
|
|
icons="$ctrl.icons" editable="true" acl-role="hr">
|
|
|
|
</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>
|
|
|
|
<h5 pad-small-v translate>New department</h5>
|
|
|
|
<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>
|