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

213 lines
9.1 KiB
HTML
Raw Permalink Normal View History

2019-11-10 10:08:44 +00:00
<vn-auto-search
2020-03-13 19:33:12 +00:00
model="model">
2019-11-10 10:08:44 +00:00
</vn-auto-search>
2022-06-23 12:14:13 +00:00
<div class="vn-w-xl">
2019-11-10 10:08:44 +00:00
<vn-card>
2022-06-23 12:14:13 +00:00
<smart-table
model="model"
options="$ctrl.smartTableOptions"
expr-builder="$ctrl.exprBuilder(param, value)">
2022-09-13 11:34:32 +00:00
<slot-actions>
<section class="header">
<vn-tool-bar class="vn-mb-md">
<vn-button
icon="icon-clone"
ng-show="$ctrl.totalChecked > 0"
ng-click="$ctrl.openClonationDialog()"
vn-tooltip="Clone selected routes">
</vn-button>
<vn-button
icon="cloud_download"
ng-show="$ctrl.totalChecked > 0"
ng-click="$ctrl.showRouteReport()"
vn-tooltip="Download selected routes as PDF">
</vn-button>
<vn-button
icon="check"
ng-show="$ctrl.totalChecked > 0"
ng-click="$ctrl.markAsServed()"
vn-tooltip="Mark as served">
</vn-button>
</section>
</slot-actions>
2022-06-23 12:14:13 +00:00
<slot-table>
<table model="model">
<thead>
<tr>
<th shrink>
<vn-multi-check
model="model">
</vn-multi-check>
</th>
<th field="id" number>
<span translate>Id</span>
</th>
<th field="workerFk">
<span translate>Worker</span>
</th>
<th field="agencyName">
<span translate>Agency</span>
</th>
<th field="vehiclePlateNumber">
<span translate>Vehicle</span>
</th>
<th field="created" shrink-date>
<span translate>Date</span>
</th>
<th field="m3" number>
<span translate></span>
</th>
<th field="description">
<span translate>Description</span>
</th>
<th field="started">
<span translate>Hour started</span>
</th>
<th field="finished">
<span translate>Hour finished</span>
</th>
<th shrink></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="route in model.data"
class="clickable vn-tr search-result"
ng-attr-id="{{::route.id}}" vn-droppable="$ctrl.onDrop($event)">
<td shrink>
<vn-check
ng-model="route.checked"
vn-click-stop>
</vn-check>
</td>
2022-07-29 12:12:53 +00:00
<td number>{{::route.id | dashIfEmpty}}</td>
2022-06-23 12:14:13 +00:00
<td>
<vn-autocomplete
ng-model="route.workerFk"
url="Workers/activeWithInheritedRole"
show-field="nickname"
search-function="{firstName: $search}"
value-field="id"
where="{role: 'employee'}"
on-change="$ctrl.updateAttributes(route)"
vn-click-stop>
<tpl-item>
<div>{{name}} - {{nickname}}</div>
</tpl-item>
</vn-autocomplete>
</td>
<td expand>
<vn-autocomplete
ng-model="route.agencyModeFk"
url="AgencyModes"
show-field="name"
value-field="id"
on-change="$ctrl.updateAttributes(route)"
vn-click-stop>
</vn-autocomplete>
</td>
<td expand>
<vn-autocomplete
ng-model="route.vehicleFk"
url="Vehicles"
show-field="numberPlate"
value-field="id"
on-change="$ctrl.updateAttributes(route)"
vn-click-stop>
</vn-autocomplete>
</td >
<td>
<vn-date-picker
ng-model="route.created"
on-change="$ctrl.updateAttributes(route)">
</vn-horizontal>
</td>
<td number>{{::route.m3 | dashIfEmpty}}</td>
<td>
<vn-textfield
ng-model="route.description"
on-change="$ctrl.updateAttributes(route)">
</vn-textfield>
</td>
<td expand>
<vn-input-time
ng-model="route.started"
on-change="$ctrl.updateAttributes(route)">
</vn-input-time>
</td>
<td expand>
<vn-input-time
ng-model="route.finished"
on-change="$ctrl.updateAttributes(route)">
</vn-input-time>
</td>
<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>
</td>
</tr>
</tbody>
</table>
</slot-table>
</smart-table>
</vn-card>
2022-06-23 12:14:13 +00:00
</div>
2020-12-24 10:31:20 +00:00
2019-10-26 23:30:01 +00:00
<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>
2020-12-24 10:31:20 +00:00
2019-03-21 12:46:14 +00:00
<vn-worker-descriptor-popover
2020-04-25 09:50:04 +00:00
vn-id="workerDescriptor">
2019-03-21 12:46:14 +00:00
</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>
2020-08-25 08:00:21 +00:00
<div fixed-bottom-right>
<vn-vertical style="align-items: center;">
2020-09-02 12:08:56 +00:00
<a ui-sref="route.create" vn-bind="+">
2020-08-25 08:00:21 +00:00
<vn-button class="round md vn-mb-sm"
icon="add"
vn-tooltip="New route"
tooltip-position="left">
</vn-button>
</a>
</vn-vertical>
2020-12-24 10:31:20 +00:00
</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
2021-03-30 07:55:51 +00:00
label="Starting date"
ng-model="$ctrl.createdDate">
2020-12-24 10:31:20 +00:00
</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>