refactor: cleanup default params in error handlers
[e-mobility-charging-stations-simulator.git] / ui / web / src / router / index.ts
index 0d250c5101a48e6402934fad6a038f7c64dac78e..cee4f416eb51cf9c5659bcd150bed263a7bfef7f 100644 (file)
@@ -1,7 +1,10 @@
 import { createRouter, createWebHistory } from 'vue-router'
-import ChargingStationsView from '@/views/ChargingStationsView.vue'
-import StartTransaction from '@/components/actions/StartTransaction.vue'
+
 import AddChargingStations from '@/components/actions/AddChargingStations.vue'
+import SetSupervisionUrl from '@/components/actions/SetSupervisionUrl.vue'
+import StartTransaction from '@/components/actions/StartTransaction.vue'
+import ChargingStationsView from '@/views/ChargingStationsView.vue'
+import NotFoundView from '@/views/NotFoundView.vue'
 
 export const router = createRouter({
   history: createWebHistory(),
@@ -21,6 +24,15 @@ export const router = createRouter({
         action: AddChargingStations
       }
     },
+    {
+      path: '/set-supervision-url/:hashId/:chargingStationId',
+      name: 'set-supervision-url',
+      components: {
+        default: ChargingStationsView,
+        action: SetSupervisionUrl
+      },
+      props: { default: false, action: true }
+    },
     {
       path: '/start-transaction/:hashId/:chargingStationId/:connectorId',
       name: 'start-transaction',
@@ -29,6 +41,13 @@ export const router = createRouter({
         action: StartTransaction
       },
       props: { default: false, action: true }
+    },
+    {
+      name: 'not-found',
+      path: '/:pathMatch(.*)*',
+      components: {
+        default: NotFoundView
+      }
     }
   ]
 })