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

45 lines
1.3 KiB
HTML

<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)"
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>