salix/modules/route/front/tickets/index.html

161 lines
6.3 KiB
HTML
Raw Normal View History

2019-04-04 11:06:41 +00:00
<vn-crud-model
vn-id="model"
url="Routes/getTickets"
filter="{id: $ctrl.$params.id}"
2019-04-04 11:06:41 +00:00
order="priority ASC"
data="$ctrl.tickets"
auto-load="true">
</vn-crud-model>
<vn-data-viewer
2022-06-14 11:52:32 +00:00
model="model">
2021-05-10 08:32:00 +00:00
<form
class="vn-w-xl"
name="form">
<vn-card class="vn-pa-lg">
2019-11-22 12:23:43 +00:00
<vn-tool-bar>
<vn-button
icon="icon-wand"
ng-click="$ctrl.guessPriority()"
vn-tooltip="Sort routes">
</vn-button>
<vn-button
disabled="!$ctrl.isChecked"
ng-click="$ctrl.goToBuscaman()"
vn-tooltip="Open buscaman"
icon="icon-buscaman">
</vn-button>
<vn-button
disabled="!$ctrl.isChecked"
ng-click="$ctrl.deletePriority()()"
vn-tooltip="Delete priority"
icon="contact_support">
</vn-button>
</vn-tool-bar>
2019-11-22 12:23:43 +00:00
</vn-card>
<vn-card class="vn-mt-lg">
2022-06-14 11:52:32 +00:00
<vn-table model="model" auto-load="false" vn-droppable="$ctrl.onDrop($event)">
<vn-thead>
<vn-tr>
<vn-th shrink>
<vn-multi-check
model="model">
</vn-multi-check>
</vn-th>
<vn-th shrink></vn-th>
<vn-th field="priority">Order</vn-th>
<vn-th field="street" expand>Street</vn-th>
<vn-th field="city">City</vn-th>
<vn-th field="postalCode" translate-attr="{title: 'Postcode'}" shrink>PC</vn-th>
<vn-th field="clientFk" expand>Client</vn-th>
<vn-th field="packages" shrink>Packages</vn-th>
<vn-th field="volume" shrink></vn-th>
<vn-th field="id" number>Ticket</vn-th>
<vn-th shrink></vn-th>
<vn-th shrink></vn-th>
<vn-th shrink></vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
2022-06-14 11:52:32 +00:00
<vn-tr ng-repeat="ticket in $ctrl.tickets">
<vn-td shrink>
<vn-check
2022-06-14 11:52:32 +00:00
ng-model="ticket.checked">
</vn-check>
</vn-td>
<vn-td>
<vn-icon-button
icon="add_circle"
ng-click="$ctrl.setHighestPriority(ticket.id)"
2022-06-14 11:52:32 +00:00
tabindex="-1">
</vn-icon-button>
</vn-td>
<vn-td>
<vn-input-number
on-change="$ctrl.setPriority(ticket.id, ticket.priority)"
ng-model="ticket.priority"
2019-11-22 12:23:43 +00:00
rule="Ticket"
2022-06-14 11:52:32 +00:00
class="dense">
</vn-input-number>
</vn-td>
<vn-td expand title="{{::ticket.street}}">{{::ticket.street}}</vn-td>
<vn-td expand>{{::ticket.city}}</vn-td>
<vn-td shrink>{{::ticket.postalCode}}</vn-td>
2020-10-07 08:52:28 +00:00
<vn-td expand>
<span
2020-04-25 09:50:04 +00:00
ng-click="clientDescriptor.show($event, ticket.clientFk)"
2022-06-14 11:52:32 +00:00
class="link">
{{::ticket.nickname}}
</span>
</vn-td>
<vn-td shrink>{{::ticket.packages}}</vn-td>
2021-05-27 09:41:45 +00:00
<vn-td shrink>{{::ticket.volume | number:2}}</vn-td>
<vn-td number>
<span
ng-click="ticketDescriptor.show($event, ticket.id)"
2022-06-14 11:52:32 +00:00
class="link">
{{::ticket.id}}
</span>
</vn-td>
<vn-td shrink>
2020-05-06 12:38:09 +00:00
<vn-icon
ng-if="::ticket.notes.length"
title="{{::ticket.notes[0].description}}"
2020-05-06 12:38:09 +00:00
icon="insert_drive_file"
2022-06-14 11:52:32 +00:00
class="bright">
2020-05-06 12:38:09 +00:00
</vn-icon>
</vn-td>
<vn-td>
<vn-icon-button
translate-attr="{title: 'Remove ticket'}"
icon="delete"
ng-click="$ctrl.showDeleteConfirm(ticket.id)"
2022-06-14 11:52:32 +00:00
tabindex="-1">
</vn-icon-button>
</vn-td>
<vn-td>
<vn-icon-button
ng-if="::ticket.description"
vn-tooltip="{{::ticket.description}}"
icon="icon-notes"
2022-06-14 11:52:32 +00:00
tabindex="-1">
</vn-icon-button>
</vn-td>
2022-06-09 11:48:57 +00:00
</a>
</vn-tbody>
</vn-table>
</vn-card>
</form>
</vn-data-viewer>
2019-04-04 11:06:41 +00:00
<vn-ticket-descriptor-popover
vn-id="ticketDescriptor">
</vn-ticket-descriptor-popover>
<vn-client-descriptor-popover
vn-id="clientDescriptor">
</vn-client-descriptor-popover>
<vn-confirm
vn-id="confirm"
question="Delete ticket from route?"
on-accept="$ctrl.removeTicketFromRoute($index)">
</vn-confirm>
<vn-route-ticket-popup
vn-id="ticketPopup"
route="$ctrl.$params"
parent-reload="$ctrl.$.model.refresh()">
</vn-route-ticket-popup>
<vn-float-button
icon="add"
ng-click="$ctrl.$.ticketPopup.show()"
vn-tooltip="Add ticket"
vn-acl="delivery"
vn-acl-action="remove"
vn-bind="+"
fixed-bottom-right>
</vn-float-button>
<vn-ticket-descriptor-popover
vn-id="ticket-descriptor">
</vn-ticket-descriptor-popover>
<vn-client-descriptor-popover
vn-id="client-descriptor">
</vn-client-descriptor-popover>