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

97 lines
3.4 KiB
HTML
Raw Normal View History

2019-10-11 15:38:04 +00:00
<vn-crud-model
2018-10-30 13:57:22 +00:00
vn-id="model"
url="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-10-11 15:38:04 +00:00
primary-key="ticketFk"
auto-load="true">
2018-10-30 13:57:22 +00:00
</vn-crud-model>
2019-11-10 10:08:44 +00:00
<vn-portal slot="topbar">
<vn-searchbar
2019-11-10 13:13:55 +00:00
info="Search weekly ticket by id or client id">
2019-11-10 10:08:44 +00:00
</vn-searchbar>
</vn-portal>
2019-11-10 13:13:55 +00:00
<vn-auto-search
on-search="$ctrl.onSearch($params)">
</vn-auto-search>
2019-11-10 10:08:44 +00:00
<vn-data-viewer
model="model"
class="vn-w-md vn-mb-xl">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th field="ticketFk" number>Ticket ID</vn-th>
<vn-th field="weekDay">Client</vn-th>
<vn-th>Weekday</vn-th>
<vn-th>Warehouse</vn-th>
<vn-th>Salesperson</vn-th>
<vn-th shrink></vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="weekly in weeklies" class="clickable" ui-sref="ticket.card.summary({id: {{::weekly.ticketFk}}})">
<vn-td number>
<span class="link"
ng-click="$ctrl.showTicketDescriptor($event, weekly.ticketFk)">
{{weekly.ticketFk}}
</span>
</vn-td>
<vn-td>
<span class="link"
ng-click="$ctrl.showClientDescriptor($event, weekly.clientFk)"
title ="{{::weekly.clientName}}">
{{::weekly.clientName}}
</span>
</vn-td>
<vn-td ng-click="$ctrl.preventNavigation($event)">
<vn-autocomplete
vn-one
vn-id="weekday"
ng-model="weekly.weekDay"
data="$ctrl.weekdays"
show-field="name"
translate-fields="['name']"
value-field="id"
on-change="$ctrl.onWeekdayUpdate(weekly.ticketFk, weekday.selection.id)"
order="id"
class="dense">
</vn-autocomplete>
</vn-td>
<vn-td>{{::weekly.warehouseName}}</vn-td>
<vn-td>
<span class="link"
ng-click="$ctrl.showWorkerDescriptor($event, weekly.workerFk)">
{{::weekly.nickName}}
</span>
</vn-td>
<vn-td shrink>
<vn-icon-button
icon="delete"
ng-click="$ctrl.deleteWeekly($index)"
vn-tooltip="Delete">
</vn-icon-button>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
2019-10-11 15:38:04 +00:00
</vn-card>
2019-11-10 10:08:44 +00:00
</vn-data-viewer>
2019-10-11 15:38:04 +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"
2019-10-30 15:57:14 +00:00
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>