115 lines
4.0 KiB
HTML
115 lines
4.0 KiB
HTML
<vn-crud-model
|
|
vn-id="model"
|
|
url="TicketWeeklies/filter"
|
|
filter="::$ctrl.filter"
|
|
limit="20"
|
|
data="weeklies"
|
|
order="ticketFk"
|
|
primary-key="ticketFk"
|
|
auto-load="true">
|
|
</vn-crud-model>
|
|
<vn-portal slot="topbar">
|
|
<vn-searchbar
|
|
placeholder="Search by weekly ticket"
|
|
info="Search weekly ticket by id or client id"
|
|
auto-state="false"
|
|
model="model">
|
|
</vn-searchbar>
|
|
</vn-portal>
|
|
<vn-data-viewer
|
|
model="model"
|
|
class="vn-w-md vn-mb-xl">
|
|
<vn-card>
|
|
<vn-table model="model">
|
|
<vn-thead>
|
|
<vn-tr>
|
|
<vn-th field="ticketFk" number>Ticket ID</vn-th>
|
|
<vn-th field="weekDay">Client</vn-th>
|
|
<vn-th>Weekday</vn-th>
|
|
<vn-th>Agency</vn-th>
|
|
<vn-th>Warehouse</vn-th>
|
|
<vn-th>Salesperson</vn-th>
|
|
<vn-th shrink></vn-th>
|
|
</vn-tr>
|
|
</vn-thead>
|
|
<vn-tbody>
|
|
<vn-tr
|
|
ng-repeat="weekly in weeklies"
|
|
ui-sref="ticket.card.summary({id: {{::weekly.ticketFk}}})"
|
|
class="clickable">
|
|
<vn-td number>
|
|
<span
|
|
vn-click-stop="ticketDescriptor.show($event, weekly.ticketFk)"
|
|
class="link">
|
|
{{weekly.ticketFk}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>
|
|
<span
|
|
vn-click-stop="clientDescriptor.show($event, weekly.clientFk)"
|
|
title ="{{::weekly.clientName}}"
|
|
class="link">
|
|
{{::weekly.clientName}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-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>
|
|
</vn-td>
|
|
<vn-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>
|
|
</vn-td>
|
|
<vn-td>{{::weekly.warehouseName}}</vn-td>
|
|
<vn-td>
|
|
<span
|
|
vn-click-stop="workerDescriptor.show($event, weekly.workerFk)"
|
|
class="link" >
|
|
{{::weekly.nickName}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-icon-button
|
|
icon="delete"
|
|
vn-click-stop="deleteWeekly.show(weekly.ticketFk)"
|
|
vn-tooltip="Delete">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
</vn-tr>
|
|
</vn-tbody>
|
|
</vn-table>
|
|
</vn-card>
|
|
</vn-data-viewer>
|
|
<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>
|