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

147 lines
5.9 KiB
HTML
Raw Normal View History

2022-11-14 13:30:35 +00:00
<vn-crud-model
vn-id="model"
url="Tickets/getTicketsAdvance"
limit="20">
</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"
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>
<tr>
<th shrink>
<vn-multi-check
model="model"
checked="$ctrl.checkAll"
check-field="checked">
</vn-multi-check>
</th>
<th field="ticketFk">
<span translate>Origin ID</span>
</th>
<th field="state">
<span translate>Origin State</span>
</th>
<th field="ipt">
<span>IPT</span>
</th>
2022-11-15 14:30:00 +00:00
<th field="totalWithVat">
<span translate>Import</span>
</th>
2022-11-14 13:30:35 +00:00
<th field="ticketFuture">
<span translate>Destination ID</span>
</th>
2022-11-15 14:30:00 +00:00
<th field="destETD">
<span translate>Destination ETD</span>
</th>
2022-11-14 13:30:35 +00:00
<th field="tfState">
<span translate>Destination State</span>
</th>
<th field="liters">
<span translate>Liters</span>
</th>
<th field="lines">
<span translate>Lines</span>
</th>
<th field="hasStock">
<span>Stock</span>
</th>
<th field="tfIpt">
<span>IPT</span>
</th>
<th field="tfTotalWithVat">
<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>
<td>
<span
ng-click="ticketDescriptor.show($event, ticket.id)"
class="link">
{{::ticket.id | dashIfEmpty}}
</span>
</td>
<td>
<span
class="chip {{$ctrl.stateColor(ticket.state)}}">
{{::ticket.state | dashIfEmpty}}
</span>
</td>
<td>{{::ticket.ipt | dashIfEmpty}}</td>
2022-11-15 14:30:00 +00:00
<td>
<span class="chip {{$ctrl.totalPriceColor(ticket.totalWithVat)}}">
{{::(ticket.totalWithVat ? ticket.totalWithVat : 0) | currency: 'EUR': 2}}
</span>
</td>
2022-11-14 13:30:35 +00:00
<td>
<span
ng-click="ticketDescriptor.show($event, ticket.ticketFuture)"
class="link">
{{::ticket.ticketFuture | dashIfEmpty}}
</span>
</td>
2022-11-15 14:30:00 +00:00
<td shrink-date>
<span class="chip {{$ctrl.compareDate(ticket.destETD)}}">
{{::ticket.destETD | date: 'dd/MM/yyyy'}}
</span>
</td>
2022-11-14 13:30:35 +00:00
<td>
<span
class="chip {{$ctrl.stateColor(ticket.tfState)}}">
{{::ticket.tfState | dashIfEmpty}}
</span>
</td>
<td>{{::ticket.liters | dashIfEmpty}}</td>
<td>{{::ticket.lines | dashIfEmpty}}</td>
<td>{{::ticket.hasStock | dashIfEmpty}}</td>
<td>{{::ticket.tfIpt | dashIfEmpty}}</td>
<td>
<span class="chip {{$ctrl.totalPriceColor(ticket.tfTotalWithVat)}}">
{{::(ticket.tfTotalWithVat ? ticket.tfTotalWithVat : 0) | currency: 'EUR': 2}}
</span>
</td>
</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>