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 }">
<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)">
<font-awesome-icon icon="eye"/>
View
@ -27,20 +27,25 @@ import Table from '@/components/Table';
import Cards from '@/components/Cards';
import Modal from '@/components/Modal';
import EditItem from '@/components/EditItem';
import {mapActions, mapState} from 'vuex';
import {mapActions, mapGetters, mapState} from 'vuex';
import Lightbox from '../components/Lightbox';
export default {
name: 'Tickets',
components: {Lightbox, Table, Cards, Modal, EditItem},
computed: mapState(['tickets']),
computed: {
...mapState(['tickets']),
...mapGetters(['getEventSlug'])
},
methods: {
...mapActions(['loadTickets', 'fetchTicketStates']),
gotoDetail(ticket) {
this.$router.push({name: 'ticket', params: {id: ticket.id}});
}
},
created() {
this.$store.dispatch('loadTickets');
this.fetchTicketStates();
this.loadTickets();
}
};
</script>