2019-02-22 14:55:47 +01:00
|
|
|
import EventList from '@/views/Event/EventList.vue';
|
|
|
|
import Location from '@/views/Location.vue';
|
2019-04-01 11:49:54 +02:00
|
|
|
import { RouteConfig } from 'vue-router';
|
2019-02-22 14:55:47 +01:00
|
|
|
|
2019-05-31 15:13:07 +02:00
|
|
|
// tslint:disable:space-in-parens
|
2019-09-20 18:22:03 +02:00
|
|
|
const participations = () => import(/* webpackChunkName: "participations" */ '@/views/Event/Participants.vue');
|
|
|
|
const editEvent = () => import(/* webpackChunkName: "edit-event" */ '@/views/Event/Edit.vue');
|
2019-05-31 15:13:07 +02:00
|
|
|
const event = () => import(/* webpackChunkName: "event" */ '@/views/Event/Event.vue');
|
2019-09-20 18:22:03 +02:00
|
|
|
const myEvents = () => import(/* webpackChunkName: "my-events" */ '@/views/Event/MyEvents.vue');
|
2019-05-31 15:13:07 +02:00
|
|
|
// tslint:enable
|
|
|
|
|
2019-02-22 14:55:47 +01:00
|
|
|
export enum EventRouteName {
|
|
|
|
EVENT_LIST = 'EventList',
|
|
|
|
CREATE_EVENT = 'CreateEvent',
|
2019-09-18 17:32:37 +02:00
|
|
|
MY_EVENTS = 'MyEvents',
|
2019-02-22 14:55:47 +01:00
|
|
|
EDIT_EVENT = 'EditEvent',
|
2019-09-20 18:22:03 +02:00
|
|
|
PARTICIPATIONS = 'Participations',
|
2019-02-22 14:55:47 +01:00
|
|
|
EVENT = 'Event',
|
|
|
|
LOCATION = 'Location',
|
|
|
|
}
|
|
|
|
|
2019-04-01 11:49:54 +02:00
|
|
|
export const eventRoutes: RouteConfig[] = [
|
2019-02-22 14:55:47 +01:00
|
|
|
{
|
|
|
|
path: '/events/list/:location?',
|
|
|
|
name: EventRouteName.EVENT_LIST,
|
|
|
|
component: EventList,
|
|
|
|
meta: { requiredAuth: false },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/events/create',
|
|
|
|
name: EventRouteName.CREATE_EVENT,
|
2019-09-02 14:35:50 +02:00
|
|
|
component: editEvent,
|
2019-02-22 14:55:47 +01:00
|
|
|
meta: { requiredAuth: true },
|
|
|
|
},
|
2019-09-18 17:32:37 +02:00
|
|
|
{
|
|
|
|
path: '/events/me',
|
|
|
|
name: EventRouteName.MY_EVENTS,
|
|
|
|
component: myEvents,
|
|
|
|
meta: { requiredAuth: true },
|
|
|
|
},
|
2019-02-22 14:55:47 +01:00
|
|
|
{
|
2019-09-02 14:35:50 +02:00
|
|
|
path: '/events/edit/:eventId',
|
2019-02-22 14:55:47 +01:00
|
|
|
name: EventRouteName.EDIT_EVENT,
|
2019-09-02 14:35:50 +02:00
|
|
|
component: editEvent,
|
2019-02-22 14:55:47 +01:00
|
|
|
meta: { requiredAuth: true },
|
2019-09-02 14:35:50 +02:00
|
|
|
props: { isUpdate: true },
|
2019-02-22 14:55:47 +01:00
|
|
|
},
|
2019-09-20 18:22:03 +02:00
|
|
|
{
|
|
|
|
path: '/events/participations/:eventId',
|
|
|
|
name: EventRouteName.PARTICIPATIONS,
|
|
|
|
component: participations,
|
|
|
|
meta: { requiredAuth: true },
|
|
|
|
props: true,
|
|
|
|
},
|
2019-02-22 14:55:47 +01:00
|
|
|
{
|
|
|
|
path: '/location/new',
|
|
|
|
name: EventRouteName.LOCATION,
|
|
|
|
component: Location,
|
|
|
|
meta: { requiredAuth: true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/events/:uuid',
|
|
|
|
name: EventRouteName.EVENT,
|
2019-05-31 15:13:07 +02:00
|
|
|
component: event,
|
2019-02-22 14:55:47 +01:00
|
|
|
props: true,
|
|
|
|
meta: { requiredAuth: false },
|
|
|
|
},
|
|
|
|
];
|