salix/modules/ticket/front/index/index.html

168 lines
6.9 KiB
HTML
Raw Normal View History

2018-12-19 07:42:07 +00:00
<vn-crud-model
vn-id="model"
url="/ticket/api/Tickets/filter"
limit="20"
params="::$ctrl.params"
data="tickets"
order="shipped DESC, zoneHour ASC, zoneMinute ASC, clientFk">
</vn-crud-model>
2019-01-30 22:47:06 +00:00
<div class="content-block">
<vn-card class="vn-px-md vn-w-sm">
<vn-horizontal>
<vn-searchbar
vn-id="ticketSearchbar"
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>
<vn-data-viewer
model="model"
class="vn-my-md vn-mb-xl">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
2019-04-25 05:57:26 +00:00
<vn-th shrink>
<vn-multi-check
model="model">
2019-04-25 05:57:26 +00:00
</vn-multi-check>
</vn-th>
<vn-th></vn-th>
2018-08-30 09:02:50 +00:00
<vn-th field="id" number>Id</vn-th>
<vn-th field="salesPerson" class="expendable">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" class="expendable">Province</vn-th>
2018-10-30 15:03:46 +00:00
<vn-th field="state" >State</vn-th>
<vn-th field="agencyMode">Agency</vn-th>
<vn-th field="warehouse">Warehouse</vn-th>
<vn-th field="refFk" class="expendable">Invoice</vn-th>
2019-10-01 06:14:08 +00:00
<vn-th field="zoneHour" shrink>Closure</vn-th>
2018-10-30 15:03:46 +00:00
<vn-th number>Total</vn-th>
<vn-th></vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
2019-02-10 21:52:35 +00:00
<a ng-repeat="ticket in tickets"
class="clickable vn-tr searchResult"
ui-sref="ticket.card.summary({id: {{::ticket.id}}})">
2019-04-25 05:57:26 +00:00
<vn-td shrink>
<vn-check
2019-10-09 22:47:29 +00:00
ng-model="ticket.checked"
2019-04-25 05:57:26 +00:00
ng-click="$ctrl.preventDefault($event)">
</vn-check>
</vn-td>
2019-02-10 21:52:35 +00:00
<vn-td shrink>
<vn-icon
ng-show="ticket.hasTicketRequest"
2019-02-10 21:52:35 +00:00
class="bright"
2019-03-27 08:58:58 +00:00
vn-tooltip="Purchase request"
icon="icon-100">
</vn-icon>
<vn-icon
ng-show="ticket.isAvailable === 0"
class="bright"
2019-03-27 08:58:58 +00:00
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"
2019-03-27 08:58:58 +00:00
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 class="expendable">
<span
class="link"
ng-click="$ctrl.showWorkerDescriptor($event, ticket.salesPersonFk)">
{{::ticket.userNickname | dashIfEmpty}}
</span>
</vn-td>
2019-02-10 21:52:35 +00:00
<vn-td>
<span class="chip {{$ctrl.compareDate(ticket.shipped)}}">
{{::ticket.shipped | dateTime: 'dd/MM/yyyy'}}
</span>
2018-12-21 06:53:04 +00:00
</vn-td>
2018-08-23 08:08:06 +00:00
<vn-td>{{::ticket.shipped | dateTime: 'HH:mm'}}</vn-td>
2019-02-10 21:52:35 +00:00
<vn-td expand>
<span
class="link"
ng-click="$ctrl.showClientDescriptor($event, ticket.clientFk)">
{{::ticket.nickname}}
</span>
</vn-td>
<vn-td class="expendable">{{::ticket.province}}</vn-td>
2019-02-10 21:52:35 +00:00
<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 class="expendable">{{::ticket.refFk | dashIfEmpty}}</vn-td>
2019-07-12 07:06:19 +00:00
<vn-td shrink>{{::ticket.zoneLanding | dateTime: 'HH:mm'}}</vn-td>
2019-10-01 14:17:57 +00:00
<vn-td number>
<span class="chip {{$ctrl.totalPriceColor(ticket)}}">
{{::ticket.total | currency: 'EUR': 2}}
</span>
</vn-td>
2019-02-13 13:01:37 +00:00
<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-data-viewer>
2018-03-12 13:02:29 +00:00
</div>
2018-11-27 12:28:15 +00:00
<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">
2018-04-10 05:48:04 +00:00
<tpl-body>
<vn-ticket-summary ticket="$ctrl.selectedTicket"></vn-ticket-summary>
2018-04-10 05:48:04 +00:00
</tpl-body>
</vn-dialog>
2019-04-25 05:57:26 +00:00
<vn-client-descriptor-popover
vn-id="clientDescriptor">
</vn-client-descriptor-popover>
<vn-worker-descriptor-popover
vn-id="workerDescriptor"
worker-fk="$ctrl.selectedWorker">
2019-04-25 05:57:26 +00:00
</vn-worker-descriptor-popover>
<vn-client-balance-create
vn-id="balanceCreateDialog">
2019-09-05 11:06:40 +00:00
</vn-client-balance-create>
<vn-scroll-up></vn-scroll-up>