23cca6a4913c23e3d65ecaceae24c539ad4c5010
[e-mobility-charging-stations-simulator.git] / ui / web / src / router / index.ts
1 import { createRouter, createWebHistory } from 'vue-router'
2 import ChargingStationsView from '@/views/ChargingStationsView.vue'
3 import StartTransaction from '@/components/actions/StartTransaction.vue'
4 import AddChargingStations from '@/components/actions/AddChargingStations.vue'
5 import SetSupervisionUrl from '@/components/actions/SetSupervisionUrl.vue'
6 import NotFoundView from '@/views/NotFoundView.vue'
7
8 export const router = createRouter({
9 history: createWebHistory(),
10 routes: [
11 {
12 path: '/',
13 name: 'charging-stations',
14 components: {
15 default: ChargingStationsView
16 }
17 },
18 {
19 path: '/add-charging-stations',
20 name: 'add-charging-stations',
21 components: {
22 default: ChargingStationsView,
23 action: AddChargingStations
24 }
25 },
26 {
27 path: '/set-supervision-url/:hashId/:chargingStationId',
28 name: 'set-supervision-url',
29 components: {
30 default: ChargingStationsView,
31 action: SetSupervisionUrl
32 },
33 props: { default: false, action: true }
34 },
35 {
36 path: '/start-transaction/:hashId/:chargingStationId/:connectorId',
37 name: 'start-transaction',
38 components: {
39 default: ChargingStationsView,
40 action: StartTransaction
41 },
42 props: { default: false, action: true }
43 },
44 {
45 name: 'not-found',
46 path: '/:pathMatch(.*)*',
47 components: {
48 default: NotFoundView
49 }
50 }
51 ]
52 })