salix/modules/ticket/front/weekly/index/index.html

100 lines
4.2 KiB
HTML
Raw Normal View History

2018-11-27 14:02:54 +00:00
<vn-crud-model auto-load="false"
2018-10-30 13:57:22 +00:00
vn-id="model"
2019-05-21 07:03:57 +00:00
url="/ticket/api/TicketWeeklies/filter"
2018-10-30 13:57:22 +00:00
filter="::$ctrl.filter"
limit="20"
data="weeklies"
2019-09-06 06:00:19 +00:00
order="ticketFk"
2019-05-21 07:03:57 +00:00
primary-key="ticketFk">
2018-10-30 13:57:22 +00:00
</vn-crud-model>
2019-05-21 07:03:57 +00:00
<div class="content-block">
<div class="vn-list">
<vn-card pad-medium-h>
<vn-horizontal>
<vn-searchbar
vn-id="turnSearchbar"
style="width: 100%"
on-search="$ctrl.onSearch($params)"
2019-07-29 11:12:36 +00:00
info="Search weekly ticket by id or client id"
2019-05-21 07:03:57 +00:00
vn-focus>
</vn-searchbar>
</vn-horizontal>
</vn-card>
</div>
2018-10-30 13:57:22 +00:00
<div margin-medium>
2019-07-29 11:12:36 +00:00
<vn-card margin-medium-v pad-medium compact>
2018-10-30 13:57:22 +00:00
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th number field="ticketFk">Ticket ID</vn-th>
<vn-th field="weekDay">Client</vn-th>
2019-07-29 11:12:36 +00:00
<vn-th>Weekday</vn-th>
2018-10-30 13:57:22 +00:00
<vn-th>Warehouse</vn-th>
<vn-th>Salesperson</vn-th>
2019-07-29 11:12:36 +00:00
<vn-th shrink></vn-th>
2018-10-30 13:57:22 +00:00
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="weekly in weeklies" class="clickable" ui-sref="ticket.card.summary({id: {{::weekly.ticketFk}}})">
2018-10-30 13:57:22 +00:00
<vn-td number>
<span class="link"
ng-click="$ctrl.showTicketDescriptor($event, weekly.ticketFk)">
{{weekly.ticketFk}}
</span>
</vn-td>
<vn-td>
2019-05-21 07:03:57 +00:00
<span class="link"
ng-click="$ctrl.showClientDescriptor($event, weekly.clientFk)"
title ="{{::weekly.clientName}}">
{{::weekly.clientName}}
2018-10-30 13:57:22 +00:00
</span>
</vn-td>
<vn-td ng-click="$ctrl.preventNavigation($event)">
2019-05-21 07:03:57 +00:00
<vn-autocomplete vn-one
vn-id="weekday"
2018-10-30 13:57:22 +00:00
field="weekly.weekDay"
data="$ctrl.weekdays"
show-field="name"
translate-fields="['name']"
value-field="id"
2019-05-21 07:03:57 +00:00
on-change="$ctrl.onWeekdayUpdate(weekly.ticketFk, weekday.selection.id)"
2018-10-30 13:57:22 +00:00
order="id">
</vn-autocomplete>
</vn-td>
2019-05-21 07:03:57 +00:00
<vn-td>{{::weekly.warehouseName}}</vn-td>
<vn-td>
<span class="link"
ng-click="$ctrl.showWorkerDescriptor($event, weekly.workerFk)">
{{::weekly.nickName}}
</span>
</vn-td>
2019-07-29 11:12:36 +00:00
<vn-td shrink>
2018-10-30 13:57:22 +00:00
<vn-icon-button
icon="delete"
2019-05-21 07:03:57 +00:00
ng-click="$ctrl.deleteWeekly($index)"
2018-10-30 13:57:22 +00:00
vn-tooltip="Delete">
</vn-icon-button>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
2019-01-20 17:48:03 +00:00
<vn-pagination model="model"></vn-pagination>
2018-10-30 13:57:22 +00:00
</div>
2019-05-21 07:03:57 +00:00
</div>
2018-10-30 13:57:22 +00:00
<vn-client-descriptor-popover vn-id="clientDescriptor"></vn-client-descriptor-popover>
2019-05-21 07:03:57 +00:00
<vn-ticket-descriptor-popover
2018-10-30 13:57:22 +00:00
vn-id="ticketDescriptor">
</vn-ticket-descriptor-popover>
2019-05-21 07:03:57 +00:00
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
2018-10-30 13:57:22 +00:00
<vn-confirm
vn-id="deleteWeekly"
on-response="$ctrl.returnDialog(response)"
2019-07-29 11:12:36 +00:00
question="This ticket will be removed from weekly tickets! Continue anyway?"
message="You are going to delete this weekly ticket">
2019-05-21 07:03:57 +00:00
</vn-confirm>
2019-07-29 11:12:36 +00:00
<a ui-sref="ticket.weekly.create" vn-tooltip="Add weekly ticket" vn-bind="+" fixed-bottom-right>
<vn-float-button icon="person_add"></vn-float-button>
</a>