cleanup admin 'dashboard'

This commit is contained in:
j3d1 2024-11-06 00:26:56 +01:00
parent f44da341b4
commit d13687a910
3 changed files with 35 additions and 64 deletions

View file

@ -7,7 +7,7 @@ import Files from './views/Files';
import HowTo from './views/HowTo'; import HowTo from './views/HowTo';
import Login from '@/views/Login.vue'; import Login from '@/views/Login.vue';
import Register from '@/views/Register.vue'; import Register from '@/views/Register.vue';
import Debug from "@/views/admin/Debug.vue"; import Dashboard from "@/views/admin/Dashboard.vue";
import Tickets from "@/views/Tickets.vue"; import Tickets from "@/views/Tickets.vue";
import Ticket from "@/views/Ticket.vue"; import Ticket from "@/views/Ticket.vue";
import Admin from "@/views/admin/Admin.vue"; import Admin from "@/views/admin/Admin.vue";
@ -59,7 +59,7 @@ const routes = [
{requiresAuth: true, requiresPermission: 'delete_event'} {requiresAuth: true, requiresPermission: 'delete_event'}
}, },
{ {
path: '', name: 'admin', component: Debug, meta: path: '', name: 'admin', component: Dashboard, meta:
{requiresAuth: true, requiresPermission: 'delete_event'} {requiresAuth: true, requiresPermission: 'delete_event'}
}, },
{ {

View file

@ -0,0 +1,33 @@
<template>
<div>
<h3 class="text-center">Events</h3>
<ul>
<li v-for="event in events" :key="event.id">
{{ event.slug }}
</li>
</ul>
</div>
</template>
<script>
import {mapActions, mapState} from 'vuex';
import Table from '@/components/Table';
export default {
name: 'Dashboard',
components: {},
computed: {
...mapState(['events']),
},
methods: {
...mapActions(['loadEvents']),
},
mounted() {
this.loadEvents();
}
};
</script>
<style>
</style>

View file

@ -1,62 +0,0 @@
<template>
<div>
<!--qr-code :text="qr_url" color="#000" bg-color="#fff" error-level="H" class="qr-code"></qr-code-->
<h3 class="text-center">Events</h3>
<!--p>{{ events }}</p-->
<ul>
<li v-for="event in events" :key="event.id">
{{ event.slug }}
</li>
</ul>
<h3 class="text-center">Items</h3>
<!--p>{{ loadedItems }}</p-->
<ul>
<li v-for="item in loadedItems" :key="item.id">
{{ item.description }}
</li>
</ul>
<h3 class="text-center">Boxes</h3>
<!--p>{{ loadedBoxes }}</p-->
<ul>
<li v-for="box in loadedBoxes" :key="box.id">
{{ box.name }}
</li>
</ul>
<h3 class="text-center">Issues</h3>
<!--p>{{ issues }}</p-->
<ul>
<li v-for="issue in tickets" :key="issue.id">
{{ issue.id }}
</li>
</ul>
</div>
</template>
<script>
import {mapActions, mapState} from 'vuex';
import Table from '@/components/Table';
export default {
name: 'Debug',
components: {Table},
computed: {
...mapState(['events', 'loadedItems', 'loadedBoxes', 'tickets']),
qr_url() {
return window.location.href;
}
},
methods: {
...mapActions(['changeEvent', 'loadTickets']),
},
mounted() {
this.loadTickets();
}
};
</script>
<style>
.qr-code img {
border: #fff solid 7px
}
</style>