feat(ui): add right action bar and use it to start transaction
[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
6 export const router = createRouter({
7 history: createWebHistory(),
8 routes: [
9 {
10 path: '/',
11 name: 'charging-stations',
12 components: {
13 default: ChargingStationsView
14 }
15 },
16 {
17 path: '/add-charging-stations',
18 name: 'add-charging-stations',
19 components: {
20 default: ChargingStationsView,
21 action: AddChargingStations
22 }
23 },
24 {
25 path: '/start-transaction/:hashId/:chargingStationId/:connectorId',
26 name: 'start-transaction',
27 components: {
28 default: ChargingStationsView,
29 action: StartTransaction
30 },
31 props: { default: false, action: true }
32 }
33 ]
34 })