salix/modules/ticket/front/advance/index.html

183 lines
7.7 KiB
HTML
Raw Normal View History

2022-11-14 13:30:35 +00:00
<vn-crud-model
vn-id="model"
2022-12-20 10:36:37 +00:00
url="Tickets/getTicketsAdvance"
2022-12-20 10:36:58 +00:00
auto-load="false">
2022-11-14 13:30:35 +00:00
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar
vn-focus
panel="vn-advance-ticket-search-panel"
placeholder="Search tickets"
info="Search advance tickets by date"
2022-11-16 09:57:15 +00:00
suggested-filter="$ctrl.filterParams"
2022-11-14 13:30:35 +00:00
auto-state="false"
model="model">
</vn-searchbar>
</vn-portal>
<vn-card>
<smart-table
model="model"
options="$ctrl.smartTableOptions"
expr-builder="$ctrl.exprBuilder(param, value)"
>
<slot-actions>
<vn-button disabled="$ctrl.checked.length === 0"
icon="keyboard_double_arrow_left"
ng-click="moveTicketsAdvance.show($event)"
vn-tooltip="Advance tickets">
</vn-button>
</slot-actions>
<slot-table>
<table>
<thead>
2022-12-20 10:36:37 +00:00
<tr second-header>
<td></td>
2023-02-10 07:46:54 +00:00
<th colspan="7" translate>Destination</th>
<th colspan="9" translate>Origin</th>
2022-12-20 10:36:37 +00:00
</tr>
2022-11-14 13:30:35 +00:00
<tr>
<th shrink>
<vn-multi-check
model="model"
checked="$ctrl.checkAll"
check-field="checked">
</vn-multi-check>
</th>
2023-02-10 07:46:54 +00:00
<th shrink>
</th>
<th field="id">
2022-12-20 10:36:37 +00:00
<span translate>ID</span>
2022-11-14 13:30:35 +00:00
</th>
2023-02-10 07:46:54 +00:00
<th field="shipped">
2022-12-20 10:36:37 +00:00
<span translate>Date</span>
2022-11-14 13:30:35 +00:00
</th>
2023-02-10 07:46:54 +00:00
<th field="ipt" title="{{'Item Packing Type' | translate}}">
2022-11-14 13:30:35 +00:00
<span>IPT</span>
</th>
2023-02-10 07:46:54 +00:00
<th field="state">
2022-12-20 10:36:37 +00:00
<span translate>State</span>
</th>
2023-02-10 07:46:54 +00:00
<th field="liters">
<span translate>Liters</span>
</th>
<th field="lines">
<span translate>Lines</span>
</th>
2022-11-15 14:30:00 +00:00
<th field="totalWithVat">
<span translate>Import</span>
</th>
2023-02-10 07:46:54 +00:00
<th separator field="futureId">
2022-12-20 10:36:37 +00:00
<span translate>ID</span>
2022-11-14 13:30:35 +00:00
</th>
2023-02-10 07:46:54 +00:00
<th field="futureShipped">
2022-12-20 10:36:37 +00:00
<span translate>Date</span>
2022-11-15 14:30:00 +00:00
</th>
<th field="futureIpt" title="{{'Item Packing Type' | translate}}">
2022-12-20 10:36:37 +00:00
<span>IPT</span>
</th>
2023-02-10 07:46:54 +00:00
<th field="futureState">
2022-12-20 10:36:37 +00:00
<span translate>State</span>
2022-11-14 13:30:35 +00:00
</th>
<th field="futureLiters">
2022-11-14 13:30:35 +00:00
<span translate>Liters</span>
</th>
<th field="hasStock">
<span>Stock</span>
</th>
<th field="futureLines">
2022-12-20 10:36:37 +00:00
<span translate>Lines</span>
2022-11-14 13:30:35 +00:00
</th>
<th field="futureTotalWithVat">
2022-11-14 13:30:35 +00:00
<span translate>Import</span>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="ticket in model.data">
<td>
<vn-check
ng-model="ticket.checked"
vn-click-stop>
</vn-check>
</td>
2023-02-10 07:46:54 +00:00
<td>
<vn-icon
ng-show="ticket.futureAgency !== ticket.agency"
icon="icon-agency-term"
title="{{$ctrl.agencies(ticket.futureAgency, ticket.agency)}}">
</vn-icon>
</td>
2022-11-14 13:30:35 +00:00
<td>
<span
2023-02-10 07:46:54 +00:00
ng-click="ticketDescriptor.show($event, ticket.id)"
2022-11-14 13:30:35 +00:00
class="link">
2023-02-10 07:46:54 +00:00
{{::ticket.id | dashIfEmpty}}
2022-12-20 10:36:37 +00:00
</span>
</td>
<td shrink-date>
2023-02-10 07:46:54 +00:00
<span class="chip {{$ctrl.compareDate(ticket.shipped)}}">
{{::ticket.shipped | date: 'dd/MM/yyyy'}}
2022-11-14 13:30:35 +00:00
</span>
</td>
2023-02-10 07:46:54 +00:00
<td>{{::ticket.ipt | dashIfEmpty}}</td>
2022-11-14 13:30:35 +00:00
<td>
<span
2023-02-10 07:46:54 +00:00
class="chip {{$ctrl.stateColor(ticket.state)}}">
{{::ticket.state | dashIfEmpty}}
2022-11-14 13:30:35 +00:00
</span>
</td>
2023-02-10 07:46:54 +00:00
<td>{{::ticket.liters | dashIfEmpty}}</td>
<td>{{::ticket.lines | dashIfEmpty}}</td>
2022-11-15 14:30:00 +00:00
<td>
2023-02-10 07:46:54 +00:00
<span
class="chip {{$ctrl.totalPriceColor(ticket.totalWithVat)}}"
title="{{$ctrl.totalPriceTitle(ticket.totalWithVat) | translate}}">
{{::(ticket.totalWithVat ? ticket.totalWithVat : 0) | currency: 'EUR': 2}}
2022-11-15 14:30:00 +00:00
</span>
</td>
2023-02-10 07:46:54 +00:00
<td separator>
2022-11-14 13:30:35 +00:00
<span
2023-02-10 07:46:54 +00:00
ng-click="ticketDescriptor.show($event, ticket.futureId)"
2022-11-14 13:30:35 +00:00
class="link">
2023-02-10 07:46:54 +00:00
{{::ticket.futureId | dashIfEmpty}}
2022-11-14 13:30:35 +00:00
</span>
</td>
2022-11-15 14:30:00 +00:00
<td shrink-date>
2023-02-10 07:46:54 +00:00
<span class="chip {{$ctrl.compareDate(ticket.futureShipped)}}">
{{::ticket.futureShipped | date: 'dd/MM/yyyy'}}
2022-11-15 14:30:00 +00:00
</span>
</td>
2023-02-10 07:46:54 +00:00
<td>{{::ticket.futureIpt | dashIfEmpty}}</td>
2022-11-14 13:30:35 +00:00
<td>
<span
2023-02-10 07:46:54 +00:00
class="chip {{$ctrl.stateColor(ticket.futureState)}}">
{{::ticket.futureState | dashIfEmpty}}
2022-11-14 13:30:35 +00:00
</span>
</td>
2023-02-10 09:13:41 +00:00
<td>{{::ticket.futureLiters | dashIfEmpty}}</td>
<td>{{::ticket.hasStock | dashIfEmpty}}</td>
<td>{{::ticket.futureLines | dashIfEmpty}}</td>
2022-11-14 13:30:35 +00:00
<td>
2023-02-10 07:46:54 +00:00
<span
class="chip {{$ctrl.totalPriceColor(ticket.futureTotalWithVat)}}"
title="{{$ctrl.totalPriceTitle(ticket.futureTotalWithVat) | translate}}">
{{::(ticket.futureTotalWithVat ? ticket.futureTotalWithVat : 0) | currency: 'EUR': 2}}
2022-11-14 13:30:35 +00:00
</span>
</td>
2023-02-10 07:46:54 +00:00
2022-11-14 13:30:35 +00:00
</tr>
</tbody>
</table>
</slot-table>
</smart-table>
</vn-card>
<vn-confirm
vn-id="moveTicketsAdvance"
on-accept="$ctrl.moveTicketsAdvance()"
question="{{$ctrl.confirmationMessage}}"
message="Advance tickets">
</vn-confirm>
<vn-ticket-descriptor-popover
vn-id="ticketDescriptor">
</vn-ticket-descriptor-popover>