161 lines
6.5 KiB
HTML
161 lines
6.5 KiB
HTML
<vn-crud-model
|
|
vn-id="model"
|
|
url="/ticket/api/Tickets/filter"
|
|
limit="20"
|
|
data="tickets"
|
|
order="shipped ASC, clientFk"
|
|
auto-load="false">
|
|
</vn-crud-model>
|
|
<div class="content-block">
|
|
<div class="vn-list">
|
|
<vn-card pad-medium-h>
|
|
<vn-horizontal>
|
|
<vn-searchbar
|
|
vn-id="ticketSearchbar"
|
|
style="width: 100%"
|
|
panel="vn-ticket-search-panel"
|
|
on-search="$ctrl.onSearch($params)"
|
|
info="Search ticket by id or alias"
|
|
vn-focus>
|
|
</vn-searchbar>
|
|
<vn-icon-menu
|
|
vn-id="more-button"
|
|
icon="more_vert"
|
|
show-filter="false"
|
|
value-field="callback"
|
|
translate-fields="['name']"
|
|
on-change="$ctrl.onMoreChange(value)"
|
|
on-open="$ctrl.onMoreOpen()">
|
|
</vn-icon-menu>
|
|
</vn-horizontal>
|
|
</vn-card>
|
|
</div>
|
|
<vn-card margin-medium-v>
|
|
<vn-table model="model" auto-load="false">
|
|
<vn-thead>
|
|
<vn-tr>
|
|
<vn-th shrink>
|
|
<vn-multi-check
|
|
model="model">
|
|
</vn-multi-check>
|
|
</vn-th>
|
|
<vn-th></vn-th>
|
|
<vn-th field="id" number>Id</vn-th>
|
|
<vn-th field="salesPerson">Salesperson</vn-th>
|
|
<vn-th field="shipped">Date</vn-th>
|
|
<vn-th>Hour</vn-th>
|
|
<vn-th field="nickname">Alias</vn-th>
|
|
<vn-th field="province">Province</vn-th>
|
|
<vn-th field="state" >State</vn-th>
|
|
<vn-th field="agencyMode">Agency</vn-th>
|
|
<vn-th field="warehouse">Warehouse</vn-th>
|
|
<vn-th field="invoice">Invoice</vn-th>
|
|
<vn-th number>Total</vn-th>
|
|
<vn-th></vn-th>
|
|
</vn-tr>
|
|
</vn-thead>
|
|
<vn-tbody>
|
|
<a ng-repeat="ticket in tickets"
|
|
class="clickable vn-tr searchResult"
|
|
ui-sref="ticket.card.summary({id: {{::ticket.id}}})">
|
|
<vn-td shrink>
|
|
<vn-check
|
|
field="ticket.checked"
|
|
ng-click="$ctrl.preventDefault($event)">
|
|
</vn-check>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-icon
|
|
ng-show="ticket.hasTicketRequest"
|
|
class="bright"
|
|
vn-tooltip="Purchase request"
|
|
icon="icon-100">
|
|
</vn-icon>
|
|
<vn-icon
|
|
ng-show="ticket.isAvailable === 0"
|
|
class="bright"
|
|
vn-tooltip="Not available"
|
|
icon="icon-unavailable">
|
|
</vn-icon>
|
|
<vn-icon
|
|
ng-show="ticket.isFreezed"
|
|
class="bright"
|
|
vn-tooltip="Client frozen"
|
|
icon="icon-frozen">
|
|
</vn-icon>
|
|
<vn-icon
|
|
ng-show="ticket.risk"
|
|
class="bright"
|
|
vn-tooltip="{{::$ctrl.$translate.instant('Risk')}}: {{ticket.risk}}"
|
|
icon="icon-risk">
|
|
</vn-icon>
|
|
</vn-td>
|
|
<vn-td number>{{::ticket.id}}</vn-td>
|
|
<vn-td expand>
|
|
<span
|
|
class="link"
|
|
ng-click="$ctrl.showWorkerDescriptor($event, ticket.salesPersonFk)">
|
|
{{::ticket.userNickname | dashIfEmpty}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>
|
|
<span class="chip {{$ctrl.compareDate(ticket.shipped)}}">
|
|
{{::ticket.shipped | dateTime: 'dd/MM/yyyy'}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>{{::ticket.shipped | dateTime: 'HH:mm'}}</vn-td>
|
|
<vn-td expand>
|
|
<span
|
|
class="link"
|
|
ng-click="$ctrl.showClientDescriptor($event, ticket.clientFk)">
|
|
{{::ticket.nickname}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>{{::ticket.province}}</vn-td>
|
|
<vn-td>
|
|
<span class="chip {{$ctrl.stateColor(ticket)}}">
|
|
{{::ticket.state}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>{{::ticket.agencyMode}}</vn-td>
|
|
<vn-td>{{::ticket.warehouse}}</vn-td>
|
|
<vn-td>{{::ticket.refFk | dashIfEmpty}}</vn-td>
|
|
<vn-td number>{{::ticket.total | currency: 'EUR': 2}}</vn-td>
|
|
<vn-td actions>
|
|
<vn-icon-button
|
|
ng-click="$ctrl.goToLines($event, ticket.id)"
|
|
vn-tooltip="Go to lines"
|
|
icon="icon-lines">
|
|
</vn-icon-button>
|
|
<vn-icon-button
|
|
ng-click="$ctrl.preview($event, ticket)"
|
|
vn-tooltip="Preview"
|
|
icon="desktop_windows">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
</a>
|
|
</vn-tbody>
|
|
</vn-table>
|
|
</vn-card>
|
|
<vn-pagination model="model"></vn-pagination>
|
|
</div>
|
|
<a ui-sref="ticket.create" vn-tooltip="New ticket" vn-bind="+" fixed-bottom-right>
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
</a>
|
|
<vn-dialog
|
|
vn-id="summary"
|
|
class="dialog-summary">
|
|
<tpl-body>
|
|
<vn-ticket-summary ticket="$ctrl.selectedTicket"></vn-ticket-summary>
|
|
</tpl-body>
|
|
</vn-dialog>
|
|
<vn-client-descriptor-popover
|
|
vn-id="clientDescriptor">
|
|
</vn-client-descriptor-popover>
|
|
<vn-worker-descriptor-popover
|
|
vn-id="workerDescriptor"
|
|
worker-fk="$ctrl.selectedWorker">
|
|
</vn-worker-descriptor-popover>
|
|
<vn-client-balance-create
|
|
vn-id="balanceCreateDialog">
|
|
</vn-client-balance-create> |