fix(ui): close add charging stations action at UI server switch
[e-mobility-charging-stations-simulator.git] / ui / web / src / views / ChargingStationsView.vue
index 5123ece678da09a4515308779556be489c77ebb2..03d0ee2b0ff1f50f64001597543d486f008a3220 100644 (file)
@@ -21,6 +21,8 @@
                 () => {
                   setToLocalStorage<number>('uiServerConfigurationIndex', state.uiServerIndex)
                   delete app?.appContext.config.globalProperties.$templates
+                  $router.currentRoute.value.name === 'add-charging-stations' &&
+                    $router.push({ name: 'charging-stations' })
                 },
                 { once: true }
               )