fix(ui): close add charging stations action at UI server switch
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 28 Feb 2024 23:40:01 +0000 (00:40 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 28 Feb 2024 23:40:01 +0000 (00:40 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
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 }
               )