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

75 lines
2.9 KiB
HTML

<vn-crud-model
vn-id="model"
url="/worker/api/Workers/filter"
limit="20"
order="id"
data="workers">
</vn-crud-model>
<div class="content-block">
<div class="vn-list">
<vn-card pad-medium-h>
<vn-horizontal>
<vn-searchbar
style="width: 100%"
panel="vn-worker-search-panel"
on-search="$ctrl.onSearch($params)"
info="Search workers by id, firstName, lastName or user name"
vn-focus>
</vn-searchbar>
<vn-icon-menu
vn-id="more-button"
icon="more_vert"
show-filter="false"
value-field="callback"
translate-fields="['name']"
data="$ctrl.moreOptions"
on-change="$ctrl.onMoreChange(value)">
</vn-icon-menu>
</vn-horizontal>
</vn-card>
<vn-card margin-medium-v>
<a
ng-repeat="worker in workers track by worker.id"
ui-sref="worker.card.summary({id: worker.id})"
translate-attr="{title: 'View worker'}"
class="vn-list-item searchResult">
<vn-horizontal>
<vn-one>
<h6>{{::worker.nickname}}</h6>
<vn-label-value label="Id"
value="{{::worker.id}}">
</vn-label-value>
<vn-label-value label="User"
value="{{::worker.userName}}">
</vn-label-value>
<vn-label-value label="Email"
value="{{::worker.email}}">
</vn-label-value>
<vn-label-value label="Department"
value="{{::worker.department}}">
</vn-label-value>
</vn-one>
<vn-horizontal class="buttons">
<vn-icon-button
ng-click="$ctrl.preview($event, worker)"
vn-tooltip="Preview"
icon="desktop_windows">
</vn-icon-button>
</vn-horizontal>
</vn-horizontal>
</a>
<vn-empty-rows translate ng-if="model.data.length === 0">
No results
</vn-empty-rows>
<vn-empty-rows translate ng-if="model.data === null">
Enter a new search
</vn-empty-rows>
</vn-card>
<vn-pagination model="model"></vn-pagination>
</div>
</div>
<vn-dialog vn-id="preview" class="dialog-summary">
<tpl-body>
<vn-worker-summary worker="$ctrl.selectedWorker"></vn-worker-summary>
</tpl-body>
</vn-dialog>