fix ticket link in overview

This commit is contained in:
j3d1 2024-01-06 18:59:44 +01:00
parent 3a5f35fa5d
commit 83565d4b2a

View file

@ -9,7 +9,7 @@
> >
<template #actions="{ item }"> <template #actions="{ item }">
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-primary" :href="'/ticket/' + item.id" title="view" <a class="btn btn-primary" :href="'/'+ getEventSlug + '/ticket/' + item.id" title="view"
@click.prevent="gotoDetail(item)"> @click.prevent="gotoDetail(item)">
<font-awesome-icon icon="eye"/> <font-awesome-icon icon="eye"/>
View View
@ -27,20 +27,25 @@ import Table from '@/components/Table';
import Cards from '@/components/Cards'; import Cards from '@/components/Cards';
import Modal from '@/components/Modal'; import Modal from '@/components/Modal';
import EditItem from '@/components/EditItem'; import EditItem from '@/components/EditItem';
import {mapActions, mapState} from 'vuex'; import {mapActions, mapGetters, mapState} from 'vuex';
import Lightbox from '../components/Lightbox'; import Lightbox from '../components/Lightbox';
export default { export default {
name: 'Tickets', name: 'Tickets',
components: {Lightbox, Table, Cards, Modal, EditItem}, components: {Lightbox, Table, Cards, Modal, EditItem},
computed: mapState(['tickets']), computed: {
...mapState(['tickets']),
...mapGetters(['getEventSlug'])
},
methods: { methods: {
...mapActions(['loadTickets', 'fetchTicketStates']),
gotoDetail(ticket) { gotoDetail(ticket) {
this.$router.push({name: 'ticket', params: {id: ticket.id}}); this.$router.push({name: 'ticket', params: {id: ticket.id}});
} }
}, },
created() { created() {
this.$store.dispatch('loadTickets'); this.fetchTicketStates();
this.loadTickets();
} }
}; };
</script> </script>