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

139 lines
5.4 KiB
HTML
Raw Permalink Normal View History

2019-10-11 15:38:04 +00:00
<vn-crud-model
2018-10-30 13:57:22 +00:00
vn-id="model"
url="TicketWeeklies/filter"
2018-10-30 13:57:22 +00:00
filter="::$ctrl.filter"
limit="20"
data="weeklies"
2022-06-21 12:26:34 +00:00
order="weekDay, ticketFk"
2019-10-11 15:38:04 +00:00
primary-key="ticketFk"
auto-load="true">
2018-10-30 13:57:22 +00:00
</vn-crud-model>
2019-11-10 10:08:44 +00:00
<vn-portal slot="topbar">
<vn-searchbar
2020-10-06 06:17:12 +00:00
vn-focus
2020-06-12 08:53:33 +00:00
placeholder="Search by weekly ticket"
2020-03-17 13:01:25 +00:00
info="Search weekly ticket by id or client id"
auto-state="false"
model="model">
2019-11-10 10:08:44 +00:00
</vn-searchbar>
</vn-portal>
<vn-card>
<smart-table
model="model"
options="$ctrl.smartTableOptions"
2023-05-05 06:12:38 +00:00
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>
2023-05-05 06:12:38 +00:00
<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>
2019-10-11 15:38:04 +00:00
<vn-client-descriptor-popover
vn-id="clientDescriptor">
</vn-client-descriptor-popover>
2019-05-21 07:03:57 +00:00
<vn-ticket-descriptor-popover
2018-10-30 13:57:22 +00:00
vn-id="ticketDescriptor">
</vn-ticket-descriptor-popover>
2019-05-21 07:03:57 +00:00
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
2018-10-30 13:57:22 +00:00
<vn-confirm
vn-id="deleteWeekly"
on-accept="$ctrl.onDeleteWeeklyAccept($data)"
2019-07-29 11:12:36 +00:00
question="This ticket will be removed from weekly tickets! Continue anyway?"
message="You are going to delete this weekly ticket">
2023-05-05 06:12:38 +00:00
</vn-confirm>