132 lines
4.5 KiB
HTML
132 lines
4.5 KiB
HTML
<vn-auto-search
|
|
model="model">
|
|
</vn-auto-search>
|
|
<vn-data-viewer
|
|
model="model"
|
|
class="vn-w-lg vn-mb-xl">
|
|
<vn-card>
|
|
<vn-table model="model">
|
|
<vn-thead>
|
|
<vn-tr>
|
|
<vn-th shrink>
|
|
<vn-multi-check
|
|
model="model">
|
|
</vn-multi-check>
|
|
</vn-th>
|
|
<vn-th field="id" number>Id</vn-th>
|
|
<vn-th th-id="worker">Worker</vn-th>
|
|
<vn-th th-id="agency">Agency</vn-th>
|
|
<vn-th th-id="vehicle">Vehicle</vn-th>
|
|
<vn-th th-id="created" shrink-date>Date</vn-th>
|
|
<vn-th th-id="m3" number>m³</vn-th>
|
|
<vn-th th-id="description">Description</vn-th>
|
|
<vn-th shrink></vn-th>
|
|
</vn-tr>
|
|
</vn-thead>
|
|
<vn-tbody>
|
|
<a ng-repeat="route in model.data"
|
|
class="clickable vn-tr search-result"
|
|
ui-sref="route.card.summary({id: {{::route.id}}})"
|
|
ng-attr-id="{{::route.id}}" vn-droppable="$ctrl.onDrop($event)">
|
|
<vn-td shrink>
|
|
<vn-check
|
|
ng-model="route.checked"
|
|
vn-click-stop>
|
|
</vn-check>
|
|
</vn-td>
|
|
<vn-td number>{{::route.id | dashIfEmpty}}</vn-td>
|
|
<vn-td expand>
|
|
<span
|
|
class="link"
|
|
vn-click-stop="workerDescriptor.show($event, route.workerFk)">
|
|
{{::route.workerUserName}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>{{::route.agencyName | dashIfEmpty}}</vn-td>
|
|
<vn-td>{{::route.vehiclePlateNumber | dashIfEmpty}}</vn-td>
|
|
<vn-td shrink-date>{{::route.created | dashIfEmpty | date:'dd/MM/yyyy'}}</vn-td>
|
|
<vn-td number>{{::route.m3 | dashIfEmpty}}</vn-td>
|
|
<vn-td>{{::route.description | dashIfEmpty}}</vn-td>
|
|
<vn-td>
|
|
<vn-icon-button
|
|
vn-click-stop="$ctrl.showTicketPopup(route)"
|
|
vn-tooltip="Añadir tickets"
|
|
icon="icon-ticketAdd">
|
|
</vn-icon-button>
|
|
<vn-icon-button
|
|
vn-click-stop="$ctrl.preview(route)"
|
|
vn-tooltip="Preview"
|
|
icon="preview">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
</a>
|
|
</vn-tbody>
|
|
</vn-table>
|
|
</vn-card>
|
|
</vn-data-viewer>
|
|
|
|
<vn-popup vn-id="summary">
|
|
<vn-route-summary
|
|
route="$ctrl.routeSelected">
|
|
</vn-route-summary>
|
|
</vn-popup>
|
|
|
|
<vn-route-ticket-popup
|
|
vn-id="ticketPopup"
|
|
route="$ctrl.routeSelected">
|
|
</vn-route-ticket-popup>
|
|
|
|
<vn-worker-descriptor-popover
|
|
vn-id="workerDescriptor">
|
|
</vn-worker-descriptor-popover>
|
|
<vn-ticket-descriptor-popover
|
|
vn-id="ticketDescriptor">
|
|
</vn-ticket-descriptor-popover>
|
|
<vn-client-descriptor-popover
|
|
vn-id="clientDescriptor">
|
|
</vn-client-descriptor-popover>
|
|
|
|
<div fixed-bottom-right>
|
|
<vn-vertical style="align-items: center;">
|
|
<vn-button class="round sm vn-mb-sm"
|
|
icon="icon-clone"
|
|
ng-show="$ctrl.totalChecked > 0"
|
|
ng-click="$ctrl.openClonationDialog()"
|
|
vn-tooltip="Clone selected routes"
|
|
tooltip-position="left">
|
|
</vn-button>
|
|
<vn-button class="round sm vn-mb-sm"
|
|
icon="cloud_download"
|
|
ng-show="$ctrl.totalChecked > 0"
|
|
ng-click="$ctrl.showRouteReport()"
|
|
vn-tooltip="Download selected routes as PDF"
|
|
tooltip-position="left">
|
|
</vn-button>
|
|
<a ui-sref="route.create" vn-bind="+">
|
|
<vn-button class="round md vn-mb-sm"
|
|
icon="add"
|
|
vn-tooltip="New route"
|
|
tooltip-position="left">
|
|
</vn-button>
|
|
</a>
|
|
</vn-vertical>
|
|
</div>
|
|
|
|
<!-- Clonation dialog -->
|
|
<vn-dialog class="edit"
|
|
vn-id="clonationDialog"
|
|
on-accept="$ctrl.cloneSelectedRoutes()"
|
|
message="Select the starting date">
|
|
<tpl-body>
|
|
<vn-horizontal>
|
|
<vn-date-picker
|
|
label="Starting date"
|
|
ng-model="$ctrl.createdDate">
|
|
</vn-date-picker>
|
|
</vn-horizontal>
|
|
</tpl-body>
|
|
<tpl-buttons>
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
<button response="accept" translate>Clone</button>
|
|
</tpl-buttons>
|
|
</vn-dialog> |