103 lines
3.6 KiB
HTML
103 lines
3.6 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
|
|
vn-id="turnSearchbar"
|
|
style="width: 100%"
|
|
on-search="$ctrl.onSearch($params)"
|
|
info="Search weekly ticket by id or client id"
|
|
vn-focus>
|
|
</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>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" class="clickable" ui-sref="ticket.card.summary({id: {{::weekly.ticketFk}}})">
|
|
<vn-td number>
|
|
<span class="link"
|
|
ng-click="$ctrl.showTicketDescriptor($event, weekly.ticketFk)">
|
|
{{weekly.ticketFk}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>
|
|
<span class="link"
|
|
ng-click="$ctrl.showClientDescriptor($event, weekly.clientFk)"
|
|
title ="{{::weekly.clientName}}">
|
|
{{::weekly.clientName}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td ng-click="$ctrl.preventNavigation($event)">
|
|
<vn-autocomplete
|
|
vn-one
|
|
vn-id="weekday"
|
|
ng-model="weekly.weekDay"
|
|
data="$ctrl.weekdays"
|
|
show-field="name"
|
|
translate-fields="['name']"
|
|
value-field="id"
|
|
on-change="$ctrl.onWeekdayUpdate(weekly.ticketFk, weekday.selection.id)"
|
|
order="id"
|
|
class="dense">
|
|
</vn-autocomplete>
|
|
</vn-td>
|
|
<vn-td>{{::weekly.warehouseName}}</vn-td>
|
|
<vn-td>
|
|
<span class="link"
|
|
ng-click="$ctrl.showWorkerDescriptor($event, weekly.workerFk)">
|
|
{{::weekly.nickName}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-icon-button
|
|
icon="delete"
|
|
ng-click="$ctrl.deleteWeekly($index)"
|
|
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-response="$ctrl.returnDialog($response)"
|
|
question="This ticket will be removed from weekly tickets! Continue anyway?"
|
|
message="You are going to delete this weekly ticket">
|
|
</vn-confirm>
|
|
<a ui-sref="ticket.weekly.create"
|
|
vn-tooltip="Add weekly ticket"
|
|
vn-bind="+"
|
|
fixed-bottom-right>
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
</a> |