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

139 lines
5.4 KiB
HTML

<vn-crud-model
vn-id="model"
url="TicketWeeklies/filter"
filter="::$ctrl.filter"
limit="20"
data="weeklies"
order="weekDay, ticketFk"
primary-key="ticketFk"
auto-load="true">
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar
vn-focus
placeholder="Search by weekly ticket"
info="Search weekly ticket by id or client id"
auto-state="false"
model="model">
</vn-searchbar>
</vn-portal>
<vn-card>
<smart-table
model="model"
options="$ctrl.smartTableOptions"
view-config-id="ticketsMonitor"
expr-builder="$ctrl.exprBuilder(param, value)"
>
<slot-actions>
<vn-check
label="Auto-refresh"
vn-tooltip="Toggle auto-refresh every 2 minutes"
on-change="$ctrl.autoRefresh(value)">
</vn-check>
</slot-actions>
<slot-table>
<table>
<thead>
<tr>
<th field="ticketFk">
<span translate>Ticket ID</span>
</th>
<th field="clientName">
<span translate>Client</span>
</th>
<th field="weekDay">
<span translate>Shipment</span>
</th>
<th field="agencyModeFk">
<span translate>Agency</span>
</th>
<th field="warehouseFk">
<span translate>Warehouse</span>
</th>
<th field="nickName">
<span translate>Salesperson</span>
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat="weekly in weeklies"
ui-sref="ticket.card.summary({id: {{::weekly.ticketFk}}})"
class="clickable">
<td number>
<span
vn-click-stop="ticketDescriptor.show($event, weekly.ticketFk)"
class="link">
{{weekly.ticketFk}}
</span>
</td>
<td>
<span
vn-click-stop="clientDescriptor.show($event, weekly.clientFk)"
title ="{{::weekly.clientName}}"
class="link">
{{::weekly.clientName}}
</span>
</td>
<td vn-click-stop>
<vn-autocomplete
vn-id="weekday"
ng-model="weekly.weekDay"
data="$ctrl.weekdays"
show-field="name"
translate-fields="['name']"
value-field="id"
on-change="$ctrl.onUpdate(weekly.ticketFk, 'weekDay', value)"
order="id"
class="dense">
</vn-autocomplete>
</td>
<td vn-click-stop>
<vn-autocomplete
vn-id="agencyMode"
ng-model="weekly.agencyModeFk"
url="AgencyModes/isActive"
show-field="name"
value-field="id"
on-change="$ctrl.onUpdate(weekly.ticketFk, 'agencyModeFk', value)"
order="name"
class="dense">
</vn-autocomplete>
</td>
<td vn-click-stop>{{weekly.warehouseName}}</td>
<td>
<span
vn-click-stop="workerDescriptor.show($event, weekly.workerFk)"
class="link" >
{{::weekly.userName}}
</span>
</td>
<td shrink>
<vn-icon-button
icon="delete"
vn-click-stop="deleteWeekly.show(weekly.ticketFk)"
vn-tooltip="Delete">
</vn-icon-button>
</td>
</tr>
</tbody>
</table>
</slot-table>
</smart-table>
</vn-card>
<vn-client-descriptor-popover
vn-id="clientDescriptor">
</vn-client-descriptor-popover>
<vn-ticket-descriptor-popover
vn-id="ticketDescriptor">
</vn-ticket-descriptor-popover>
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
<vn-confirm
vn-id="deleteWeekly"
on-accept="$ctrl.onDeleteWeeklyAccept($data)"
question="This ticket will be removed from weekly tickets! Continue anyway?"
message="You are going to delete this weekly ticket">
</vn-confirm>