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