2021-05-11 07:43:15 +00:00
|
|
|
<vn-crud-model auto-load="true"
|
|
|
|
vn-id="model"
|
|
|
|
params="::$ctrl.filterParams"
|
|
|
|
url="SalesMonitors/salesFilter"
|
2021-05-12 10:39:45 +00:00
|
|
|
limit="20"
|
2021-05-11 07:43:15 +00:00
|
|
|
order="shippedDate DESC, shippedHour ASC, zoneLanding ASC, id">
|
|
|
|
</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
|
|
|
|
</vn-one>
|
|
|
|
<vn-none>
|
|
|
|
<vn-icon
|
|
|
|
icon="refresh"
|
|
|
|
vn-tooltip="Refresh"
|
|
|
|
ng-click="model.refresh()">
|
|
|
|
</vn-icon>
|
|
|
|
</vn-none>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-card>
|
2021-05-18 06:41:36 +00:00
|
|
|
<vn-table model="model" class="scrollable">
|
2021-05-11 07:43:15 +00:00
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th class="icon-field"></vn-th>
|
|
|
|
<vn-th field="nickname" expand>Client</vn-th>
|
|
|
|
<vn-th field="salesPersonFk" class="expendable" shrink>Salesperson</vn-th>
|
|
|
|
<vn-th field="shipped" shrink-date>Date</vn-th>
|
|
|
|
<vn-th>Hour</vn-th>
|
|
|
|
<vn-th field="hour" shrink>Closure</vn-th>
|
|
|
|
<vn-th field="provinceFk" class="expendable">Province</vn-th>
|
|
|
|
<vn-th field="stateFk" shrink>State</vn-th>
|
|
|
|
<vn-th field="zoneFk">Zone</vn-th>
|
|
|
|
<vn-th shrink>Total</vn-th>
|
|
|
|
<vn-th></vn-th>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
|
|
|
<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-05-11 07:43:15 +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">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
ng-show="::ticket.hasTicketRequest"
|
|
|
|
translate-attr="{title: 'Purchase request'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-100">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
ng-show="::ticket.isAvailable === 0"
|
|
|
|
translate-attr="{title: 'Not available'}"
|
|
|
|
class="bright"
|
|
|
|
vn-tooltip="Not available"
|
|
|
|
icon="icon-unavailable">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
ng-show="::ticket.isFreezed"
|
|
|
|
translate-attr="{title: 'Client frozen'}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-frozen">
|
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
ng-show="::ticket.risk"
|
|
|
|
title="{{::$ctrl.$t('Risk')}}: {{ticket.risk}}"
|
|
|
|
class="bright"
|
|
|
|
icon="icon-risk">
|
|
|
|
</vn-icon>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td expand>
|
|
|
|
<span
|
|
|
|
title="{{::ticket.nickname}}"
|
|
|
|
vn-click-stop="clientDescriptor.show($event, ticket.clientFk)"
|
|
|
|
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">
|
|
|
|
{{::ticket.userName | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink-date>
|
|
|
|
<span class="chip {{$ctrl.compareDate(ticket.shipped)}}">
|
|
|
|
{{::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 class="expendable">{{::ticket.province}}</vn-td>
|
|
|
|
<vn-td class="expendable" shrink>
|
|
|
|
<span
|
|
|
|
ng-show="::ticket.refFk"
|
|
|
|
title="{{::ticket.refFk}}"
|
|
|
|
vn-click-stop="invoiceOutDescriptor.show($event, ticket.invoiceOutId)"
|
|
|
|
class="link">
|
|
|
|
{{::ticket.refFk}}
|
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
ng-show="::!ticket.refFk"
|
|
|
|
class="chip {{$ctrl.stateColor(ticket)}}">
|
|
|
|
{{ticket.state}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<span
|
|
|
|
title="{{::ticket.zoneName}}"
|
|
|
|
vn-click-stop="zoneDescriptor.show($event, ticket.zoneFk)"
|
|
|
|
class="link">
|
|
|
|
{{::ticket.zoneName | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<span class="chip {{$ctrl.totalPriceColor(ticket)}}">
|
|
|
|
{{::(ticket.totalWithVat ? ticket.totalWithVat : 0) | currency: 'EUR': 2}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td actions>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-anchor="::{
|
|
|
|
state: 'ticket.card.sale',
|
|
|
|
params: {id: ticket.id},
|
|
|
|
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>
|
|
|
|
</vn-td>
|
|
|
|
</a>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
<vn-pagination
|
|
|
|
model="model"
|
2021-05-18 06:41:36 +00:00
|
|
|
class="vn-pt-xs">
|
2021-05-11 07:43:15 +00:00
|
|
|
</vn-pagination>
|
|
|
|
</vn-card>
|
|
|
|
<vn-worker-descriptor-popover
|
|
|
|
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>
|
|
|
|
<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()">
|
|
|
|
Filter by selection
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
|
|
ng-click="contextmenu.excludeSelection()">
|
|
|
|
Exclude selection
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
|
|
ng-click="contextmenu.removeFilter()">
|
|
|
|
Remove filter
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
|
|
|
ng-click="contextmenu.removeAllFilters()">
|
|
|
|
Remove all filters
|
|
|
|
</vn-item>
|
|
|
|
<vn-item translate
|
|
|
|
ng-if="contextmenu.isActionAllowed()"
|
|
|
|
ng-click="contextmenu.copyValue()">
|
|
|
|
Copy value
|
|
|
|
</vn-item>
|
|
|
|
</slot-menu>
|
|
|
|
</vn-contextmenu>
|