2021-10-13 12:19:29 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
auto-load="true"
|
|
|
|
url="SalesMonitors/salesFilter"
|
|
|
|
params="::$ctrl.filterParams"
|
2021-05-12 10:39:45 +00:00
|
|
|
limit="20"
|
2021-10-13 12:17:45 +00:00
|
|
|
order="shippedDate DESC, preparationHour ASC, zoneLanding ASC, id">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-crud-model>
|
|
|
|
<vn-portal slot="topbar">
|
2021-10-13 12:19:29 +00:00
|
|
|
<vn-searchbar vn-focus
|
|
|
|
panel="vn-monitor-sales-search-panel"
|
2021-05-11 07:43:15 +00:00
|
|
|
placeholder="Search tickets"
|
2021-10-13 12:19:29 +00:00
|
|
|
info="Search ticket by id or alias"
|
|
|
|
model="model"
|
2021-05-11 07:43:15 +00:00
|
|
|
fetch-params="$ctrl.fetchParams($params)"
|
2021-10-13 12:19:29 +00:00
|
|
|
suggested-filter="$ctrl.filterParams"
|
2021-05-11 07:43:15 +00:00
|
|
|
auto-state="false">
|
|
|
|
</vn-searchbar>
|
|
|
|
</vn-portal>
|
|
|
|
<vn-horizontal class="header">
|
|
|
|
<vn-one translate>
|
|
|
|
Tickets monitor
|
2021-10-13 12:17:45 +00:00
|
|
|
</vn-one>
|
2021-05-11 07:43:15 +00:00
|
|
|
<vn-none>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-icon icon="refresh" vn-tooltip="Refresh" ng-click="model.refresh()">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-icon>
|
|
|
|
</vn-none>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-card>
|
2021-05-25 08:01:18 +00:00
|
|
|
<vn-table model="model">
|
2021-05-11 07:43:15 +00:00
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
2021-09-03 14:30:25 +00:00
|
|
|
<vn-th field="totalProblems" menu-enabled="false">Problems</vn-th>
|
2021-06-04 09:46:09 +00:00
|
|
|
<vn-th field="nickname">Client</vn-th>
|
2021-05-11 07:43:15 +00:00
|
|
|
<vn-th field="salesPersonFk" class="expendable" shrink>Salesperson</vn-th>
|
|
|
|
<vn-th field="shipped" shrink-date>Date</vn-th>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-th field="preparationHour">Prep.</vn-th>
|
|
|
|
<vn-th field="theoreticalHour">Theoretical</vn-th>
|
2021-09-09 14:07:46 +00:00
|
|
|
<vn-th field="practicalHour">Practical</vn-th>
|
2021-05-11 07:43:15 +00:00
|
|
|
<vn-th field="provinceFk" class="expendable">Province</vn-th>
|
2021-06-28 10:06:21 +00:00
|
|
|
<vn-th field="stateFk">State</vn-th>
|
2021-05-11 07:43:15 +00:00
|
|
|
<vn-th field="zoneFk">Zone</vn-th>
|
2021-08-12 11:55:10 +00:00
|
|
|
<vn-th field="totalWithVat" shrink>Total</vn-th>
|
2021-05-11 07:43:15 +00:00
|
|
|
<vn-th></vn-th>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
2021-10-13 12:17:45 +00:00
|
|
|
<a ng-repeat="ticket in model.data" class="clickable vn-tr search-result"
|
2021-05-18 06:41:36 +00:00
|
|
|
ui-sref="ticket.card.summary({id: {{::ticket.id}}})" target="_blank">
|
2021-06-28 10:06:21 +00:00
|
|
|
<vn-td class="icon-field">
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-icon ng-show="::ticket.isTaxDataChecked === 0" translate-attr="{title: 'No verified data'}"
|
|
|
|
class="bright" icon="icon-no036">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-icon>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-icon ng-show="::ticket.hasTicketRequest" translate-attr="{title: 'Purchase request'}"
|
|
|
|
class="bright" icon="icon-100">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-icon>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-icon ng-show="::ticket.isAvailable === 0" translate-attr="{title: 'Not available'}"
|
|
|
|
class="bright" icon="icon-unavailable">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-icon>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-icon ng-show="::ticket.isFreezed" translate-attr="{title: 'Client frozen'}" class="bright"
|
2021-05-11 07:43:15 +00:00
|
|
|
icon="icon-frozen">
|
|
|
|
</vn-icon>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-icon ng-show="::ticket.risk" ng-class="::{'highRisk': ticket.hasHighRisk}"
|
|
|
|
title="{{::$ctrl.$t('Risk')}}: {{ticket.risk}}" class="bright" icon="icon-risk">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-icon>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-icon ng-show="::ticket.hasComponentLack" translate-attr="{title: 'Component lack'}"
|
|
|
|
class="bright" icon="icon-components">
|
2021-05-25 08:01:18 +00:00
|
|
|
</vn-icon>
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-td>
|
2021-06-28 10:06:21 +00:00
|
|
|
<vn-td name="nickname">
|
2021-10-13 12:17:45 +00:00
|
|
|
<span title="{{::ticket.nickname}}" vn-click-stop="clientDescriptor.show($event, ticket.clientFk)"
|
2021-05-11 07:43:15 +00:00
|
|
|
class="link">
|
|
|
|
{{::ticket.nickname}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td class="expendable" shrink>
|
2021-10-13 12:17:45 +00:00
|
|
|
<span title="{{::ticket.userName}}"
|
|
|
|
vn-click-stop="workerDescriptor.show($event, ticket.salesPersonFk)" class="link">
|
2021-05-11 07:43:15 +00:00
|
|
|
{{::ticket.userName | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink-date>
|
2021-06-04 09:46:09 +00:00
|
|
|
<span class="chip {{::$ctrl.compareDate(ticket.shipped)}}">
|
2021-05-11 07:43:15 +00:00
|
|
|
{{::ticket.shipped | date: 'dd/MM/yyyy'}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>{{::ticket.shipped | date: 'HH:mm'}}</vn-td>
|
|
|
|
<vn-td shrink>{{::ticket.zoneLanding | date: 'HH:mm'}}</vn-td>
|
2021-09-09 14:07:46 +00:00
|
|
|
<vn-td shrink>{{::ticket.practicalHour | date: 'HH:mm'}}</vn-td>
|
2021-05-11 07:43:15 +00:00
|
|
|
<vn-td class="expendable">{{::ticket.province}}</vn-td>
|
2021-06-28 10:06:21 +00:00
|
|
|
<vn-td class="expendable">
|
2021-10-13 12:17:45 +00:00
|
|
|
<span ng-show="::ticket.refFk" title="{{::ticket.refFk}}"
|
|
|
|
vn-click-stop="invoiceOutDescriptor.show($event, ticket.invoiceOutId)" class="link">
|
2021-05-11 07:43:15 +00:00
|
|
|
{{::ticket.refFk}}
|
|
|
|
</span>
|
2021-10-13 12:17:45 +00:00
|
|
|
<span ng-show="::!ticket.refFk" class="chip {{::$ctrl.stateColor(ticket)}}">
|
2021-06-04 09:46:09 +00:00
|
|
|
{{::ticket.state}}
|
2021-05-11 07:43:15 +00:00
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td>
|
2021-10-13 12:17:45 +00:00
|
|
|
<span title="{{::ticket.zoneName}}" vn-click-stop="zoneDescriptor.show($event, ticket.zoneFk)"
|
2021-05-11 07:43:15 +00:00
|
|
|
class="link">
|
|
|
|
{{::ticket.zoneName | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>
|
2021-09-03 14:30:25 +00:00
|
|
|
<span class="chip {{::$ctrl.totalPriceColor(ticket)}}">
|
2021-05-11 07:43:15 +00:00
|
|
|
{{::(ticket.totalWithVat ? ticket.totalWithVat : 0) | currency: 'EUR': 2}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td actions>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-icon-button vn-anchor="::{
|
2021-05-11 07:43:15 +00:00
|
|
|
state: 'ticket.card.sale',
|
|
|
|
params: {id: ticket.id},
|
|
|
|
target: '_blank'
|
2021-10-13 12:17:45 +00:00
|
|
|
}" vn-tooltip="Go to lines" icon="icon-lines">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-icon-button>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-icon-button vn-click-stop="$ctrl.preview(ticket)" vn-tooltip="Preview" icon="preview">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</a>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-pagination model="model" class="vn-pt-xs">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-pagination>
|
|
|
|
</vn-card>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-worker-descriptor-popover vn-id="workerDescriptor">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-worker-descriptor-popover>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-client-descriptor-popover vn-id="clientDescriptor">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-client-descriptor-popover>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-zone-descriptor-popover vn-id="zoneDescriptor">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-zone-descriptor-popover>
|
|
|
|
<vn-popup vn-id="summary">
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-ticket-summary ticket="$ctrl.selectedTicket" model="model">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-ticket-summary>
|
|
|
|
</vn-popup>
|
|
|
|
<vn-contextmenu vn-id="contextmenu" targets="['vn-monitor-sales-tickets vn-table']" model="model"
|
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
|
|
<slot-menu>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-item translate ng-if="contextmenu.isFilterAllowed()" ng-click="contextmenu.filterBySelection()">
|
2021-05-11 07:43:15 +00:00
|
|
|
Filter by selection
|
|
|
|
</vn-item>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-item translate ng-if="contextmenu.isFilterAllowed()" ng-click="contextmenu.excludeSelection()">
|
2021-05-11 07:43:15 +00:00
|
|
|
Exclude selection
|
|
|
|
</vn-item>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-item translate ng-if="contextmenu.isFilterAllowed()" ng-click="contextmenu.removeFilter()">
|
2021-05-11 07:43:15 +00:00
|
|
|
Remove filter
|
|
|
|
</vn-item>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-item translate ng-click="contextmenu.removeAllFilters()">
|
2021-05-11 07:43:15 +00:00
|
|
|
Remove all filters
|
|
|
|
</vn-item>
|
2021-10-13 12:17:45 +00:00
|
|
|
<vn-item translate ng-if="contextmenu.isActionAllowed()" ng-click="contextmenu.copyValue()">
|
2021-05-11 07:43:15 +00:00
|
|
|
Copy value
|
|
|
|
</vn-item>
|
|
|
|
</slot-menu>
|
2021-10-13 12:17:45 +00:00
|
|
|
</vn-contextmenu>
|