2019-04-04 11:06:41 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2020-03-06 12:06:01 +00:00
|
|
|
url="Routes/{{$ctrl.$params.id}}/getTickets"
|
2019-04-04 11:06:41 +00:00
|
|
|
order="priority ASC"
|
|
|
|
data="$ctrl.tickets"
|
|
|
|
auto-load="true">
|
|
|
|
</vn-crud-model>
|
2019-10-23 07:25:28 +00:00
|
|
|
<vn-data-viewer model="model">
|
|
|
|
<form name="form">
|
2019-11-22 12:23:43 +00:00
|
|
|
<vn-card class="vn-pa-md">
|
|
|
|
<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>
|
|
|
|
</vn-tool-bar>
|
2019-11-22 12:23:43 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-card class="vn-mt-md">
|
2020-03-06 12:06:01 +00:00
|
|
|
<vn-table 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>
|
2020-12-21 11:37:36 +00:00
|
|
|
<vn-th class="order-field">Order</vn-th>
|
2019-10-23 07:25:28 +00:00
|
|
|
<vn-th number>Ticket</vn-th>
|
2019-11-22 12:23:43 +00:00
|
|
|
<vn-th expand>Client</vn-th>
|
2020-10-07 08:52:28 +00:00
|
|
|
<vn-th shrink>Packages</vn-th>
|
2020-12-21 11:37:36 +00:00
|
|
|
<vn-th shrink>m³</vn-th>
|
2019-11-22 12:23:43 +00:00
|
|
|
<vn-th>Warehouse</vn-th>
|
2020-12-21 11:37:36 +00:00
|
|
|
<vn-th translate-attr="{title: 'Postcode'}" shrink>PC</vn-th>
|
2019-11-22 12:23:43 +00:00
|
|
|
<vn-th expand>Street</vn-th>
|
2019-10-23 07:25:28 +00:00
|
|
|
<vn-th shrink></vn-th>
|
|
|
|
<vn-th shrink></vn-th>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
|
|
|
<vn-tr ng-repeat="ticket in $ctrl.tickets">
|
|
|
|
<vn-td shrink>
|
|
|
|
<vn-check
|
|
|
|
ng-model="ticket.checked">
|
|
|
|
</vn-check>
|
|
|
|
</vn-td>
|
2020-12-21 11:37:36 +00:00
|
|
|
<vn-td class="order-field">
|
2019-10-23 07:25:28 +00:00
|
|
|
<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"
|
|
|
|
class="dense">
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-input-number>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
<span
|
2020-04-25 09:50:04 +00:00
|
|
|
ng-click="ticketDescriptor.show($event, ticket.id)"
|
2019-10-23 07:25:28 +00:00
|
|
|
class="link">
|
|
|
|
{{ticket.id}}
|
|
|
|
</span>
|
|
|
|
</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)"
|
2019-10-23 07:25:28 +00:00
|
|
|
class="link">
|
|
|
|
{{ticket.nickname}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2020-10-07 08:52:28 +00:00
|
|
|
<vn-td shrink>{{ticket.packages}}</vn-td>
|
2020-12-21 11:37:36 +00:00
|
|
|
<vn-td shrink>{{::ticket.volume | number:1}}</vn-td>
|
2019-11-22 12:23:43 +00:00
|
|
|
<vn-td expand>{{ticket.warehouse.name}}</vn-td>
|
2020-12-21 11:37:36 +00:00
|
|
|
<vn-td shrink>{{ticket.address.postalCode}}</vn-td>
|
2019-10-23 07:25:28 +00:00
|
|
|
<vn-td expand title="{{ticket.address.street}}">{{ticket.address.street}}</vn-td>
|
|
|
|
<vn-td shrink>
|
2020-05-06 12:38:09 +00:00
|
|
|
<vn-icon
|
2019-10-23 07:25:28 +00:00
|
|
|
ng-if="ticket.notes.length"
|
2021-03-23 16:19:05 +00:00
|
|
|
title="{{ticket.notes[0].description}}"
|
2020-05-06 12:38:09 +00:00
|
|
|
icon="insert_drive_file"
|
|
|
|
class="bright">
|
|
|
|
</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)"
|
|
|
|
tabindex="-1">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</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?"
|
2020-07-29 08:47:48 +00:00
|
|
|
on-accept="$ctrl.removeTicketFromRoute()">
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-confirm>
|
2021-03-15 10:32:17 +00:00
|
|
|
<vn-crud-model
|
2019-10-23 07:25:28 +00:00
|
|
|
vn-id="possibleTicketsModel"
|
2021-03-15 10:32:17 +00:00
|
|
|
url="Routes/{{$ctrl.$params.id}}/getSuggestedTickets"
|
2021-03-23 12:19:11 +00:00
|
|
|
data="$ctrl.possibleTickets">
|
2019-10-23 07:25:28 +00:00
|
|
|
</vn-crud-model>
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="possibleTicketsDialog"
|
2020-07-29 08:47:48 +00:00
|
|
|
on-accept="$ctrl.setTicketsRoute()"
|
2020-05-06 12:38:09 +00:00
|
|
|
message="Tickets to add">
|
2019-10-23 07:25:28 +00:00
|
|
|
<tpl-body>
|
|
|
|
<vn-data-viewer class="vn-pa-md" model="possibleTicketsModel">
|
|
|
|
<vn-table model="possibleTicketsModel" auto-load="false">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th shrink>
|
|
|
|
<vn-multi-check
|
|
|
|
model="possibleTicketsModel">
|
|
|
|
</vn-multi-check>
|
|
|
|
</vn-th>
|
|
|
|
<vn-th number>Ticket</vn-th>
|
|
|
|
<vn-th>Client</vn-th>
|
|
|
|
<vn-th number shrink>Packages</vn-th>
|
|
|
|
<vn-th shrink>Warehouse</vn-th>
|
|
|
|
<vn-th expand>Postcode</vn-th>
|
|
|
|
<vn-th>Address</vn-th>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
|
|
|
<vn-tr ng-repeat="ticket in $ctrl.possibleTickets">
|
|
|
|
<vn-td shrink>
|
|
|
|
<vn-check
|
|
|
|
ng-model="ticket.checked">
|
|
|
|
</vn-check>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td number>{{ticket.id}}</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
<span
|
|
|
|
ng-click="$ctrl.showClientDescriptor($event, ticket.clientFk)"
|
|
|
|
class="link">
|
|
|
|
{{ticket.nickname}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td number shrink>{{ticket.packages}}</vn-td>
|
|
|
|
<vn-td expand>{{ticket.warehouse.name}}</vn-td>
|
|
|
|
<vn-td number shrink>{{ticket.address.postalCode}}</vn-td>
|
|
|
|
<vn-td expand title="{{ticket.address.street}}">{{ticket.address.street}}</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
</vn-data-viewer>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
2019-10-30 15:57:14 +00:00
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Add</button>
|
2019-10-23 07:25:28 +00:00
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|
|
|
|
<vn-float-button
|
|
|
|
icon="add"
|
|
|
|
ng-click="$ctrl.openPossibleTicketsDialog()"
|
|
|
|
vn-tooltip="Add ticket"
|
|
|
|
vn-acl="delivery"
|
|
|
|
vn-acl-action="remove"
|
|
|
|
vn-bind="+"
|
|
|
|
fixed-bottom-right>
|
2020-04-30 10:48:52 +00:00
|
|
|
</vn-float-button>
|