2021-09-24 10:51:20 +00:00
|
|
|
<vn-crud-model
|
2021-05-11 07:43:15 +00:00
|
|
|
vn-id="model"
|
|
|
|
url="SalesMonitors/salesFilter"
|
2022-01-20 12:17:08 +00:00
|
|
|
auto-load="false"
|
2022-01-20 11:57:36 +00:00
|
|
|
limit="20">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-crud-model>
|
|
|
|
<vn-portal slot="topbar">
|
|
|
|
<vn-searchbar
|
|
|
|
vn-focus
|
|
|
|
panel="vn-monitor-sales-search-panel"
|
|
|
|
placeholder="Search tickets"
|
|
|
|
info="Search ticket by id or alias"
|
|
|
|
model="model"
|
|
|
|
fetch-params="$ctrl.fetchParams($params)"
|
|
|
|
suggested-filter="$ctrl.filterParams"
|
|
|
|
auto-state="false">
|
|
|
|
</vn-searchbar>
|
|
|
|
</vn-portal>
|
|
|
|
<vn-horizontal class="header">
|
|
|
|
<vn-one translate>
|
|
|
|
Tickets monitor
|
2023-03-16 09:33:24 +00:00
|
|
|
</vn-one>
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-card>
|
2023-03-16 09:33:24 +00:00
|
|
|
<smart-table
|
|
|
|
model="model"
|
|
|
|
view-config-id="ticketsMonitor"
|
|
|
|
options="$ctrl.smartTableOptions"
|
2021-11-11 16:18:44 +00:00
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
2021-12-21 08:19:28 +00:00
|
|
|
<slot-actions>
|
|
|
|
<vn-check
|
|
|
|
label="Auto-refresh"
|
|
|
|
vn-tooltip="Toggle auto-refresh every 2 minutes"
|
|
|
|
on-change="$ctrl.autoRefresh(value)">
|
|
|
|
</vn-check>
|
|
|
|
</slot-actions>
|
2021-11-11 16:18:44 +00:00
|
|
|
<slot-table>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th field="totalProblems" menu-enabled="false">
|
|
|
|
<span translate>Problems</span>
|
|
|
|
</th>
|
|
|
|
<th field="id">
|
|
|
|
<span translate>Identifier</span>
|
|
|
|
</th>
|
2022-01-20 11:57:36 +00:00
|
|
|
<th field="nickname">
|
2021-11-11 16:18:44 +00:00
|
|
|
<span translate>Client</span>
|
|
|
|
</th>
|
|
|
|
<th field="salesPersonFk">
|
|
|
|
<span translate>Salesperson</span>
|
|
|
|
</th>
|
2022-04-27 07:48:31 +00:00
|
|
|
<th field="shippedDate" shrink-date>
|
2021-11-11 16:18:44 +00:00
|
|
|
<span translate>Date</span>
|
|
|
|
</th>
|
|
|
|
<th field="theoreticalHour">
|
|
|
|
<span translate>Theoretical</span>
|
|
|
|
</th>
|
|
|
|
<th field="practicalHour">
|
|
|
|
<span translate>Practical</span>
|
|
|
|
</th>
|
2021-11-15 07:45:21 +00:00
|
|
|
<th field="preparationHour" filter-enabled="false">
|
|
|
|
<span translate>Preparation</span>
|
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="provinceFk">
|
|
|
|
<span translate>Province</span>
|
|
|
|
</th>
|
|
|
|
<th field="stateFk">
|
|
|
|
<span translate>State</span>
|
|
|
|
</th>
|
2023-04-21 10:49:03 +00:00
|
|
|
<th field="isFragile" number>
|
|
|
|
<span translate>Fragile</span>
|
|
|
|
</th>
|
2021-11-11 16:18:44 +00:00
|
|
|
<th field="zoneFk">
|
|
|
|
<span translate>Zone</span>
|
|
|
|
</th>
|
|
|
|
<th field="totalWithVat" shrink>
|
|
|
|
<span translate>Total</span>
|
|
|
|
</th>
|
|
|
|
<th shrink></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2022-12-20 08:48:41 +00:00
|
|
|
<tr ng-repeat="ticket in model.data track by ticket.id"
|
2023-01-12 12:53:38 +00:00
|
|
|
vn-anchor="{
|
2023-03-16 09:33:24 +00:00
|
|
|
state: 'ticket.card.summary',
|
2021-11-11 16:18:44 +00:00
|
|
|
params: {id: ticket.id},
|
2021-05-11 07:43:15 +00:00
|
|
|
target: '_blank'
|
2021-12-21 11:42:18 +00:00
|
|
|
}">
|
2021-11-11 16:18:44 +00:00
|
|
|
<td>
|
|
|
|
<vn-icon
|
2023-01-12 12:53:38 +00:00
|
|
|
ng-show="ticket.isTaxDataChecked === 0"
|
2021-11-11 16:18:44 +00:00
|
|
|
translate-attr="{title: 'No verified data'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-no036">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
2023-01-12 12:53:38 +00:00
|
|
|
ng-show="ticket.hasTicketRequest"
|
2021-11-11 16:18:44 +00:00
|
|
|
translate-attr="{title: 'Purchase request'}"
|
|
|
|
class="bright"
|
2021-11-26 12:04:07 +00:00
|
|
|
icon="icon-buyrequest">
|
2021-11-11 16:18:44 +00:00
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
2023-01-12 12:53:38 +00:00
|
|
|
ng-show="ticket.itemShortage"
|
2022-04-19 10:04:06 +00:00
|
|
|
translate-attr="{title: 'Not visible'}"
|
2021-11-11 16:18:44 +00:00
|
|
|
class="bright"
|
|
|
|
icon="icon-unavailable">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
2023-01-12 12:53:38 +00:00
|
|
|
ng-show="ticket.isFreezed"
|
2021-11-11 16:18:44 +00:00
|
|
|
translate-attr="{title: 'Client frozen'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-frozen">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
2023-01-12 12:53:38 +00:00
|
|
|
ng-show="ticket.risk"
|
|
|
|
ng-class="{'highRisk': ticket.hasHighRisk}"
|
|
|
|
title="{{$ctrl.$t('Risk')}}: {{ticket.risk}}"
|
2021-11-11 16:18:44 +00:00
|
|
|
class="bright"
|
|
|
|
icon="icon-risk">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
2023-01-12 12:53:38 +00:00
|
|
|
ng-show="ticket.hasComponentLack"
|
2021-11-11 16:18:44 +00:00
|
|
|
translate-attr="{title: 'Component lack'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-components">
|
|
|
|
</vn-icon>
|
2022-01-07 10:26:16 +00:00
|
|
|
<vn-icon
|
2023-01-12 12:53:38 +00:00
|
|
|
ng-show="ticket.isTooLittle"
|
2022-01-07 10:26:16 +00:00
|
|
|
translate-attr="{title: 'Ticket too little'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-isTooLittle">
|
|
|
|
</vn-icon>
|
2021-11-11 16:18:44 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span
|
|
|
|
vn-click-stop="ticketDescriptor.show($event, ticket.id)"
|
|
|
|
class="link">
|
2023-01-12 12:53:38 +00:00
|
|
|
{{ticket.id}}
|
2021-11-11 16:18:44 +00:00
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td name="nickname">
|
|
|
|
<span
|
2023-01-12 12:53:38 +00:00
|
|
|
title="{{ticket.nickname}}"
|
2021-11-11 16:18:44 +00:00
|
|
|
vn-click-stop="clientDescriptor.show($event, ticket.clientFk)"
|
|
|
|
class="link">
|
2023-01-12 12:53:38 +00:00
|
|
|
{{ticket.nickname}}
|
2021-11-11 16:18:44 +00:00
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span
|
2023-01-12 12:53:38 +00:00
|
|
|
title="{{ticket.userName}}"
|
2021-11-11 16:18:44 +00:00
|
|
|
vn-click-stop="workerDescriptor.show($event, ticket.salesPersonFk)"
|
|
|
|
class="link">
|
2023-01-12 12:53:38 +00:00
|
|
|
{{ticket.userName | dashIfEmpty}}
|
2021-11-11 16:18:44 +00:00
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
2023-01-12 12:53:38 +00:00
|
|
|
<span class="chip {{$ctrl.compareDate(ticket.shippedDate)}}">
|
|
|
|
{{ticket.shippedDate | date: 'dd/MM/yyyy'}}
|
2021-11-11 16:18:44 +00:00
|
|
|
</span>
|
|
|
|
</td>
|
2023-01-12 12:53:38 +00:00
|
|
|
<td>{{ticket.zoneLanding | date: 'HH:mm'}}</td>
|
|
|
|
<td>{{ticket.practicalHour | date: 'HH:mm'}}</td>
|
|
|
|
<td>{{ticket.shipped | date: 'HH:mm'}}</td>
|
|
|
|
<td>{{ticket.province}}</td>
|
2021-11-11 16:18:44 +00:00
|
|
|
<td>
|
|
|
|
<span
|
2023-01-12 12:53:38 +00:00
|
|
|
ng-show="ticket.refFk"
|
|
|
|
title="{{ticket.refFk}}"
|
2021-11-11 16:18:44 +00:00
|
|
|
vn-click-stop="invoiceOutDescriptor.show($event, ticket.invoiceOutId)"
|
|
|
|
class="link">
|
2023-01-12 12:53:38 +00:00
|
|
|
{{ticket.refFk}}
|
2021-11-11 16:18:44 +00:00
|
|
|
</span>
|
2023-03-16 09:33:24 +00:00
|
|
|
<span
|
2023-01-12 12:53:38 +00:00
|
|
|
ng-show="!ticket.refFk"
|
|
|
|
class="chip {{ticket.classColor}}">
|
|
|
|
{{ticket.state}}
|
2021-11-11 16:18:44 +00:00
|
|
|
</span>
|
|
|
|
</td>
|
2023-03-16 09:33:24 +00:00
|
|
|
<td number>
|
|
|
|
<vn-icon
|
|
|
|
ng-show="ticket.isFragile"
|
|
|
|
translate-attr="{title: 'Is fragile'}"
|
|
|
|
class="bright"
|
|
|
|
icon="local_bar">
|
|
|
|
</vn-icon>
|
|
|
|
</td>
|
2021-12-17 12:09:00 +00:00
|
|
|
<td name="zone">
|
2021-11-11 16:18:44 +00:00
|
|
|
<span
|
2023-01-12 12:53:38 +00:00
|
|
|
title="{{ticket.zoneName}}"
|
2021-11-11 16:18:44 +00:00
|
|
|
vn-click-stop="zoneDescriptor.show($event, ticket.zoneFk)"
|
|
|
|
class="link">
|
2023-01-12 12:53:38 +00:00
|
|
|
{{ticket.zoneName | dashIfEmpty}}
|
2021-11-11 16:18:44 +00:00
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td number>
|
2023-01-12 12:53:38 +00:00
|
|
|
<span class="chip {{$ctrl.totalPriceColor(ticket)}}">
|
|
|
|
{{(ticket.totalWithVat ? ticket.totalWithVat : 0) | currency: 'EUR': 2}}
|
2021-11-11 16:18:44 +00:00
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td actions>
|
|
|
|
<vn-icon-button
|
2023-01-12 12:53:38 +00:00
|
|
|
vn-anchor="{
|
2023-03-16 09:33:24 +00:00
|
|
|
state: 'ticket.card.sale',
|
|
|
|
params: {id: ticket.id},
|
2021-11-11 16:18:44 +00:00
|
|
|
target: '_blank'
|
|
|
|
}"
|
|
|
|
vn-tooltip="Go to lines"
|
|
|
|
icon="icon-lines">
|
|
|
|
</vn-icon-button>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-click-stop="$ctrl.preview(ticket)"
|
|
|
|
vn-tooltip="Preview"
|
|
|
|
icon="preview">
|
|
|
|
</vn-icon-button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</slot-table>
|
|
|
|
</smart-table>
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-card>
|
2022-09-29 07:35:57 +00:00
|
|
|
<vn-ticket-descriptor-popover
|
|
|
|
vn-id="ticketDescriptor">
|
|
|
|
</vn-ticket-descriptor-popover>
|
2023-03-16 09:33:24 +00:00
|
|
|
<vn-worker-descriptor-popover
|
2021-05-11 07:43:15 +00:00
|
|
|
vn-id="workerDescriptor">
|
|
|
|
</vn-worker-descriptor-popover>
|
|
|
|
<vn-client-descriptor-popover
|
|
|
|
vn-id="clientDescriptor">
|
|
|
|
</vn-client-descriptor-popover>
|
|
|
|
<vn-zone-descriptor-popover
|
|
|
|
vn-id="zoneDescriptor">
|
|
|
|
</vn-zone-descriptor-popover>
|
|
|
|
<vn-popup vn-id="summary">
|
|
|
|
<vn-ticket-summary
|
|
|
|
ticket="$ctrl.selectedTicket"
|
|
|
|
model="model">
|
|
|
|
</vn-ticket-summary>
|
|
|
|
</vn-popup>
|
2021-11-15 07:45:21 +00:00
|
|
|
<vn-contextmenu vn-id="contextmenu" targets="['vn-monitor-sales-tickets smart-table']" model="model"
|
2021-05-11 07:43:15 +00:00
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
|
|
<slot-menu>
|
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
|
|
ng-click="contextmenu.filterBySelection()">
|
|
|
|
Filter by selection
|
|
|
|
</vn-item>
|
2023-03-16 09:33:24 +00:00
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
2021-05-11 07:43:15 +00:00
|
|
|
ng-click="contextmenu.excludeSelection()">
|
|
|
|
Exclude selection
|
|
|
|
</vn-item>
|
2023-03-16 09:33:24 +00:00
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
2021-05-11 07:43:15 +00:00
|
|
|
ng-click="contextmenu.removeFilter()">
|
|
|
|
Remove filter
|
|
|
|
</vn-item>
|
2023-03-16 09:33:24 +00:00
|
|
|
<vn-item translate
|
2021-05-11 07:43:15 +00:00
|
|
|
ng-click="contextmenu.removeAllFilters()">
|
|
|
|
Remove all filters
|
|
|
|
</vn-item>
|
2023-03-16 09:33:24 +00:00
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isActionAllowed()"
|
2021-05-11 07:43:15 +00:00
|
|
|
ng-click="contextmenu.copyValue()">
|
|
|
|
Copy value
|
|
|
|
</vn-item>
|
|
|
|
</slot-menu>
|
|
|
|
</vn-contextmenu>
|