show tickets filtered by active event
This commit is contained in:
parent
8dd56dd859
commit
450562f534
8 changed files with 175 additions and 198 deletions
|
@ -1,11 +1,12 @@
|
|||
<template>
|
||||
<AsyncLoader :loaded="tickets.length > 0">
|
||||
<AsyncLoader :loaded="isTicketsLoaded">
|
||||
<div class="container-fluid px-xl-5 mt-3">
|
||||
<div class="row">
|
||||
<div class="col-xl-8 offset-xl-2">
|
||||
<Table
|
||||
:columns="['id', 'name', 'state', 'last_activity', 'assigned_to', 'actions', 'actions2']"
|
||||
:items="tickets.map(formatTicket)"
|
||||
:columns="['id', 'name', 'state', 'last_activity', 'assigned_to',
|
||||
...(getEventSlug==='all'?['event']:[])]"
|
||||
:items="getEventTickets.map(formatTicket)"
|
||||
:keyName="'id'"
|
||||
v-if="layout === 'table'"
|
||||
>
|
||||
|
@ -21,8 +22,9 @@
|
|||
</Table>
|
||||
</div>
|
||||
</div>
|
||||
<CollapsableCards v-if="layout === 'tasks'" :items="tickets"
|
||||
:columns="['id', 'name', 'last_activity', 'assigned_to']"
|
||||
<CollapsableCards v-if="layout === 'tasks'" :items="getEventTickets"
|
||||
:columns="['id', 'name', 'last_activity', 'assigned_to',
|
||||
...(getEventSlug==='all'?['event']:[])]"
|
||||
:keyName="'state'" :sections="['pending_new', 'pending_open','pending_shipping',
|
||||
'pending_physical_confirmation','pending_return','pending_postponed'].map(stateInfo)">
|
||||
<template #section_header="{index, section, count}">
|
||||
|
@ -34,6 +36,7 @@
|
|||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.last_activity }}</td>
|
||||
<td>{{ item.assigned_to }}</td>
|
||||
<td v-if="getEventSlug==='all'">{{ item.event }}</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary" :href="'/'+ getEventSlug + '/ticket/' + item.id" title="view"
|
||||
|
@ -64,8 +67,7 @@ export default {
|
|||
name: 'Tickets',
|
||||
components: {AsyncLoader, Lightbox, Table, Cards, Modal, EditItem, CollapsableCards},
|
||||
computed: {
|
||||
...mapState(['tickets']),
|
||||
...mapGetters(['stateInfo', 'getEventSlug', 'layout']),
|
||||
...mapGetters(['getEventTickets', 'isTicketsLoaded', 'stateInfo', 'getEventSlug', 'layout']),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['loadTickets', 'fetchTicketStates', 'scheduleAfterInit']),
|
||||
|
@ -79,7 +81,8 @@ export default {
|
|||
state: this.stateInfo(ticket.state).text,
|
||||
stateColor: this.stateInfo(ticket.state).color,
|
||||
last_activity: ticket.last_activity,
|
||||
assigned_to: ticket.assigned_to
|
||||
assigned_to: ticket.assigned_to,
|
||||
event: ticket.event
|
||||
};
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue