salix/modules/monitor/front/index/tickets/index.html

156 lines
7.2 KiB
HTML
Raw Normal View History

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"
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
</vn-one>
2021-05-11 07:43:15 +00:00
<vn-none>
<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>
<vn-th field="totalProblems" menu-enabled="false">Problems</vn-th>
<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>
<vn-th field="preparationHour">Prep.</vn-th>
<vn-th field="theoreticalHour">Theoretical</vn-th>
<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>
<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>
<a ng-repeat="ticket in model.data" class="clickable vn-tr search-result"
ui-sref="ticket.card.summary({id: {{::ticket.id}}})" target="_blank">
2021-06-28 10:06:21 +00:00
<vn-td class="icon-field">
<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>
<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>
<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>
<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>
<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>
<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">
<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>
<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>
<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>
<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">
<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>
<span ng-show="::!ticket.refFk" class="chip {{::$ctrl.stateColor(ticket)}}">
{{::ticket.state}}
2021-05-11 07:43:15 +00:00
</span>
</vn-td>
<vn-td>
<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>
<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>
<vn-icon-button vn-anchor="::{
2021-05-11 07:43:15 +00:00
state: 'ticket.card.sale',
params: {id: ticket.id},
target: '_blank'
}" vn-tooltip="Go to lines" icon="icon-lines">
2021-05-11 07:43:15 +00:00
</vn-icon-button>
<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>
<vn-pagination model="model" class="vn-pt-xs">
2021-05-11 07:43:15 +00:00
</vn-pagination>
</vn-card>
<vn-worker-descriptor-popover vn-id="workerDescriptor">
2021-05-11 07:43:15 +00:00
</vn-worker-descriptor-popover>
<vn-client-descriptor-popover vn-id="clientDescriptor">
2021-05-11 07:43:15 +00:00
</vn-client-descriptor-popover>
<vn-zone-descriptor-popover vn-id="zoneDescriptor">
2021-05-11 07:43:15 +00:00
</vn-zone-descriptor-popover>
<vn-popup vn-id="summary">
<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>
<vn-item translate ng-if="contextmenu.isFilterAllowed()" ng-click="contextmenu.filterBySelection()">
2021-05-11 07:43:15 +00:00
Filter by selection
</vn-item>
<vn-item translate ng-if="contextmenu.isFilterAllowed()" ng-click="contextmenu.excludeSelection()">
2021-05-11 07:43:15 +00:00
Exclude selection
</vn-item>
<vn-item translate ng-if="contextmenu.isFilterAllowed()" ng-click="contextmenu.removeFilter()">
2021-05-11 07:43:15 +00:00
Remove filter
</vn-item>
<vn-item translate ng-click="contextmenu.removeAllFilters()">
2021-05-11 07:43:15 +00:00
Remove all filters
</vn-item>
<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>
</vn-contextmenu>