web/satellite: rightly navigate to pricing plan page
A navigation is prevented to the onboarding if no project is selected. However, an exception was not made for the pricing plan page and caused the pricing plan page not to show even under passing conditions. This change makes that exception for the pricing plan page. Change-Id: I72ddb942a0059d748a13da0b6038b99b9b5064af
This commit is contained in:
parent
ace0ef89a2
commit
a2a603aee8
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { RouteConfig } from '@/router';
|
import { RouteConfig } from '@/router';
|
||||||
import { useConfigStore } from '@/store/modules/configStore';
|
import { useConfigStore } from '@/store/modules/configStore';
|
||||||
@ -18,9 +18,14 @@ import { useProjectsStore } from '@/store/modules/projectsStore';
|
|||||||
const configStore = useConfigStore();
|
const configStore = useConfigStore();
|
||||||
const projectsStore = useProjectsStore();
|
const projectsStore = useProjectsStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (configStore.state.config.allProjectsDashboard && !projectsStore.state.selectedProject.id) {
|
// go back to all projects dashboard if there's no project selected, except on the pricing plan selection step.
|
||||||
|
if (configStore.state.config.allProjectsDashboard
|
||||||
|
&& !projectsStore.state.selectedProject.id
|
||||||
|
&& route.name !== RouteConfig.PricingPlanStep.name
|
||||||
|
) {
|
||||||
router.push(RouteConfig.AllProjectsDashboard.path);
|
router.push(RouteConfig.AllProjectsDashboard.path);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user