salix/modules/worker/front/department/index.html

49 lines
1.6 KiB
HTML
Raw Normal View History

2019-03-12 14:04:09 +00:00
<vn-crud-model
vn-id="model"
url="departments/getLeaves"
2019-03-12 14:04:09 +00:00
auto-load="false">
</vn-crud-model>
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)"
on-drag-end="$ctrl.onDragEnd(item)">
{{::item.name}}
</vn-treeview>
</vn-card>
<vn-button-bar>
<vn-button ui-sref="worker.index" label="Back"></vn-button>
</vn-button-bar>
</form>
2019-03-12 14:04:09 +00:00
<vn-confirm
vn-id="deleteNode"
2019-10-30 15:57:14 +00:00
on-response="$ctrl.onRemoveResponse($response)"
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()"
2019-10-30 15:57:14 +00:00
on-response="$ctrl.onCreateResponse($response)">
2019-03-12 14:04:09 +00:00
<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>
2019-10-09 22:47:29 +00:00
<vn-textfield
vn-one
2019-03-12 14:04:09 +00:00
label="Name"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.newChild.name">
2019-03-12 14:04:09 +00:00
</vn-textfield>
</vn-horizontal>
</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>