Commit | Line | Data |
---|---|---|
13c19b7b | 1 | import { createRouter, createWebHistory } from 'vue-router' |
84ec8d34 | 2 | |
c317ae3e | 3 | import AddChargingStations from '@/components/actions/AddChargingStations.vue' |
f8696170 | 4 | import SetSupervisionUrl from '@/components/actions/SetSupervisionUrl.vue' |
84ec8d34 JB |
5 | import StartTransaction from '@/components/actions/StartTransaction.vue' |
6 | import ChargingStationsView from '@/views/ChargingStationsView.vue' | |
877b880c | 7 | import NotFoundView from '@/views/NotFoundView.vue' |
32de5a57 | 8 | |
13c19b7b | 9 | export const router = createRouter({ |
2cddfd51 | 10 | history: createWebHistory(), |
13c19b7b JB |
11 | routes: [ |
12 | { | |
13 | path: '/', | |
14 | name: 'charging-stations', | |
15 | components: { | |
16 | default: ChargingStationsView | |
17 | } | |
c317ae3e JB |
18 | }, |
19 | { | |
20 | path: '/add-charging-stations', | |
21 | name: 'add-charging-stations', | |
22 | components: { | |
23 | default: ChargingStationsView, | |
24 | action: AddChargingStations | |
25 | } | |
26 | }, | |
f8696170 JB |
27 | { |
28 | path: '/set-supervision-url/:hashId/:chargingStationId', | |
29 | name: 'set-supervision-url', | |
30 | components: { | |
31 | default: ChargingStationsView, | |
32 | action: SetSupervisionUrl | |
33 | }, | |
34 | props: { default: false, action: true } | |
35 | }, | |
c317ae3e JB |
36 | { |
37 | path: '/start-transaction/:hashId/:chargingStationId/:connectorId', | |
38 | name: 'start-transaction', | |
39 | components: { | |
40 | default: ChargingStationsView, | |
41 | action: StartTransaction | |
42 | }, | |
43 | props: { default: false, action: true } | |
877b880c JB |
44 | }, |
45 | { | |
46 | name: 'not-found', | |
47 | path: '/:pathMatch(.*)*', | |
48 | components: { | |
49 | default: NotFoundView | |
50 | } | |
13c19b7b JB |
51 | } |
52 | ] | |
66a7748d | 53 | }) |