2019-04-04 11:06:41 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2021-05-12 07:51:32 +00:00
|
|
|
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>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-data-viewer
|
2022-06-14 11:52:32 +00:00
|
|
|
model="model">
|
2023-01-30 11:19:11 +00:00
|
|
|
<form
|
2021-05-10 08:32:00 +00:00
|
|
|
class="vn-w-xl"
|
|
|
|
name="form">
|
2022-06-15 10:53:13 +00:00
|
|
|
<vn-card>
|
|
|
|
<section class="vn-pa-md">
|
2019-11-22 12:23:43 +00:00
|
|
|
<vn-tool-bar>
|
2019-10-23 07:25:28 +00:00
|
|
|
<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>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-button
|
2022-06-14 10:36:08 +00:00
|
|
|
disabled="!$ctrl.isChecked"
|
2022-06-15 10:53:13 +00:00
|
|
|
ng-click="$ctrl.deletePriority()"
|
2022-06-14 10:36:08 +00:00
|
|
|
vn-tooltip="Delete priority"
|
2022-10-20 13:04:59 +00:00
|
|
|
icon="filter_alt">
|
2022-06-15 10:53:13 +00:00
|
|
|
</vn-button>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-button
|
2022-06-15 10:53:13 +00:00
|
|
|
ng-click="$ctrl.setOrderedPriority($ctrl.tickets)"
|
2022-07-29 12:12:53 +00:00
|
|
|
vn-tooltip="Renumber all tickets in the order you see on the screen"
|
2022-06-15 10:53:13 +00:00
|
|
|
icon="format_list_numbered">
|
2022-06-14 10:36:08 +00:00
|
|
|
</vn-button>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-button
|
2022-10-25 11:15:19 +00:00
|
|
|
vn-acl="deliveryBoss"
|
|
|
|
vn-acl-action="remove"
|
2022-10-24 06:22:04 +00:00
|
|
|
disabled="!$ctrl.isChecked"
|
2022-10-20 13:04:59 +00:00
|
|
|
icon="sms"
|
|
|
|
vn-tooltip="Send SMS to all clients"
|
|
|
|
ng-click="$ctrl.sendSms()">
|
|
|
|
</vn-button>
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-tool-bar>
|
2022-06-15 10:53:13 +00:00
|
|
|
<vn-table class="vn-pt-md" model="model" auto-load="false" vn-droppable="$ctrl.onDrop($event)">
|
2019-10-23 07:25:28 +00:00
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th shrink>
|
|
|
|
<vn-multi-check
|
|
|
|
model="model">
|
|
|
|
</vn-multi-check>
|
|
|
|
</vn-th>
|
2022-06-14 10:36:08 +00:00
|
|
|
<vn-th shrink></vn-th>
|
2021-05-12 07:51:32 +00:00
|
|
|
<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>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-th field="warehouse" expand>Warehouse</vn-th>
|
2021-05-12 07:51:32 +00:00
|
|
|
<vn-th field="packages" shrink>Packages</vn-th>
|
|
|
|
<vn-th field="volume" shrink>m³</vn-th>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-th field="packaging" shrink>Packaging</vn-th>
|
2021-05-12 07:51:32 +00:00
|
|
|
<vn-th field="id" number>Ticket</vn-th>
|
2019-10-23 07:25:28 +00:00
|
|
|
<vn-th shrink></vn-th>
|
|
|
|
<vn-th shrink></vn-th>
|
2022-06-14 10:36:08 +00:00
|
|
|
<vn-th shrink></vn-th>
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
2022-06-14 11:52:32 +00:00
|
|
|
<vn-tr ng-repeat="ticket in $ctrl.tickets">
|
2019-10-23 07:25:28 +00:00
|
|
|
<vn-td shrink>
|
|
|
|
<vn-check
|
2022-06-14 11:52:32 +00:00
|
|
|
ng-model="ticket.checked">
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-check>
|
|
|
|
</vn-td>
|
2022-06-14 10:36:08 +00:00
|
|
|
<vn-td>
|
|
|
|
<vn-icon-button
|
2022-06-15 10:53:13 +00:00
|
|
|
icon="low_priority"
|
|
|
|
ng-click="$ctrl.setHighestPriority(ticket)"
|
|
|
|
vn-tooltip="Assign highest priority"
|
2022-06-14 11:52:32 +00:00
|
|
|
tabindex="-1">
|
2022-06-14 10:36:08 +00:00
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
2023-07-21 11:05:55 +00:00
|
|
|
<vn-td-editable number>
|
|
|
|
<text>
|
|
|
|
<strong>{{ticket.priority}}</strong>
|
|
|
|
</text>
|
|
|
|
<field>
|
|
|
|
<vn-input-number
|
|
|
|
rule="Ticket"
|
|
|
|
ng-model="ticket.priority"
|
|
|
|
on-change="$ctrl.setPriority(ticket.id, ticket.priority)"
|
|
|
|
step="1"
|
|
|
|
class="dense"
|
|
|
|
vn-focus>
|
|
|
|
</vn-input-number>
|
|
|
|
</field>
|
|
|
|
</vn-td-editable>
|
2021-06-02 08:29:56 +00:00
|
|
|
<vn-td expand title="{{::ticket.street}}">{{::ticket.street}}</vn-td>
|
2023-01-30 11:33:28 +00:00
|
|
|
<vn-td
|
|
|
|
expand
|
|
|
|
ng-click="$ctrl.goToBuscaman(ticket)"
|
|
|
|
class="link"
|
|
|
|
vn-tooltip="Open buscaman"
|
|
|
|
tooltip-position="up">
|
|
|
|
{{::ticket.city}}
|
|
|
|
</vn-td>
|
2021-05-12 07:51:32 +00:00
|
|
|
<vn-td shrink>{{::ticket.postalCode}}</vn-td>
|
2020-10-07 08:52:28 +00:00
|
|
|
<vn-td expand>
|
2019-10-23 07:25:28 +00:00
|
|
|
<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">
|
2021-06-02 08:29:56 +00:00
|
|
|
{{::ticket.nickname}}
|
2019-10-23 07:25:28 +00:00
|
|
|
</span>
|
|
|
|
</vn-td>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-td>{{ticket.warehouseName}}</vn-td>
|
2021-05-12 07:51:32 +00:00
|
|
|
<vn-td shrink>{{::ticket.packages}}</vn-td>
|
2021-05-27 09:41:45 +00:00
|
|
|
<vn-td shrink>{{::ticket.volume | number:2}}</vn-td>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-td shrink>{{::ticket.ipt}}</vn-td>
|
2021-05-05 11:36:54 +00:00
|
|
|
<vn-td number>
|
|
|
|
<span
|
|
|
|
ng-click="ticketDescriptor.show($event, ticket.id)"
|
2022-06-14 11:52:32 +00:00
|
|
|
class="link">
|
2021-05-12 07:51:32 +00:00
|
|
|
{{::ticket.id}}
|
2021-05-05 11:36:54 +00:00
|
|
|
</span>
|
|
|
|
</vn-td>
|
2019-10-23 07:25:28 +00:00
|
|
|
<vn-td shrink>
|
2020-05-06 12:38:09 +00:00
|
|
|
<vn-icon
|
2021-06-02 08:29:56 +00:00
|
|
|
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>
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<vn-icon-button
|
2020-03-06 12:06:01 +00:00
|
|
|
translate-attr="{title: 'Remove ticket'}"
|
2019-10-23 07:25:28 +00:00
|
|
|
icon="delete"
|
|
|
|
ng-click="$ctrl.showDeleteConfirm(ticket.id)"
|
2022-06-14 11:52:32 +00:00
|
|
|
tabindex="-1">
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
2022-06-14 10:36:08 +00:00
|
|
|
<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">
|
2022-06-14 10:36:08 +00:00
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
2022-06-09 11:48:57 +00:00
|
|
|
</a>
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
2022-06-15 10:53:13 +00:00
|
|
|
</section>
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-card>
|
|
|
|
</form>
|
|
|
|
</vn-data-viewer>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-ticket-descriptor-popover
|
2019-04-04 11:06:41 +00:00
|
|
|
vn-id="ticketDescriptor">
|
|
|
|
</vn-ticket-descriptor-popover>
|
|
|
|
<vn-client-descriptor-popover
|
|
|
|
vn-id="clientDescriptor">
|
|
|
|
</vn-client-descriptor-popover>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-confirm
|
2019-04-04 11:06:41 +00:00
|
|
|
vn-id="confirm"
|
|
|
|
question="Delete ticket from route?"
|
2021-05-14 17:21:04 +00:00
|
|
|
on-accept="$ctrl.removeTicketFromRoute($index)">
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-confirm>
|
2022-03-08 14:17:18 +00:00
|
|
|
|
2022-03-09 07:08:13 +00:00
|
|
|
<vn-route-ticket-popup
|
|
|
|
vn-id="ticketPopup"
|
|
|
|
route="$ctrl.$params"
|
|
|
|
parent-reload="$ctrl.$.model.refresh()">
|
|
|
|
</vn-route-ticket-popup>
|
2022-10-20 13:04:59 +00:00
|
|
|
<div fixed-bottom-right>
|
|
|
|
<vn-vertical style="align-items: center;">
|
|
|
|
<a vn-bind="+">
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-button
|
2022-10-20 13:04:59 +00:00
|
|
|
class="round md vn-mb-sm"
|
|
|
|
ng-click="$ctrl.$.ticketPopup.show()"
|
|
|
|
icon="add"
|
|
|
|
vn-tooltip="Add ticket"
|
|
|
|
vn-acl="delivery"
|
|
|
|
vn-acl-action="remove"
|
|
|
|
tooltip-position="left">
|
|
|
|
</vn-button>
|
|
|
|
</a>
|
|
|
|
</vn-vertical>
|
|
|
|
</div>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-ticket-descriptor-popover
|
2021-06-11 11:02:18 +00:00
|
|
|
vn-id="ticket-descriptor">
|
|
|
|
</vn-ticket-descriptor-popover>
|
2023-01-30 11:19:11 +00:00
|
|
|
<vn-client-descriptor-popover
|
2021-06-11 11:02:18 +00:00
|
|
|
vn-id="client-descriptor">
|
2022-10-20 13:04:59 +00:00
|
|
|
</vn-client-descriptor-popover>
|
|
|
|
<!-- SMS Dialog -->
|
|
|
|
<vn-route-sms
|
|
|
|
vn-id="sms"
|
|
|
|
sms="$ctrl.newSMS">
|
2023-01-30 11:19:11 +00:00
|
|
|
</vn-route-sms>
|