| 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 | |
| 7 | export const router = createRouter({ |
| 8 | history: createWebHistory(), |
| 9 | routes: [ |
| 10 | { |
| 11 | path: '/', |
| 12 | name: 'charging-stations', |
| 13 | components: { |
| 14 | default: ChargingStationsView |
| 15 | } |
| 16 | }, |
| 17 | { |
| 18 | path: '/add-charging-stations', |
| 19 | name: 'add-charging-stations', |
| 20 | components: { |
| 21 | default: ChargingStationsView, |
| 22 | action: AddChargingStations |
| 23 | } |
| 24 | }, |
| 25 | { |
| 26 | path: '/set-supervision-url/:hashId/:chargingStationId', |
| 27 | name: 'set-supervision-url', |
| 28 | components: { |
| 29 | default: ChargingStationsView, |
| 30 | action: SetSupervisionUrl |
| 31 | }, |
| 32 | props: { default: false, action: true } |
| 33 | }, |
| 34 | { |
| 35 | path: '/start-transaction/:hashId/:chargingStationId/:connectorId', |
| 36 | name: 'start-transaction', |
| 37 | components: { |
| 38 | default: ChargingStationsView, |
| 39 | action: StartTransaction |
| 40 | }, |
| 41 | props: { default: false, action: true } |
| 42 | } |
| 43 | ] |
| 44 | }) |