From 4568a4f4c22bbd65bf772540c506b0c4c0082c20 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 29 Nov 2021 09:50:26 +0100 Subject: [PATCH] Refresh loggeduser information before the final step of onboarding Otherwise we endup in a loop Closes #964 Signed-off-by: Thomas Citharel --- js/src/components/NavBar.vue | 5 +++++ js/src/views/Home.vue | 3 ++- js/src/views/User/SettingsOnboard.vue | 9 ++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/js/src/components/NavBar.vue b/js/src/components/NavBar.vue index 3a0ca7a32..6413dd149 100755 --- a/js/src/components/NavBar.vue +++ b/js/src/components/NavBar.vue @@ -285,6 +285,11 @@ export default class NavBar extends Vue { // If we don't have any identities, the user has validated their account, // is logging for the first time but didn't create an identity somehow if (this.identities.length === 0) { + console.debug( + "We have no identities listed for current user", + this.identities + ); + console.debug("Pushing route to REGISTER_PROFILE"); try { await this.$router.push({ name: RouteName.REGISTER_PROFILE, diff --git a/js/src/views/Home.vue b/js/src/views/Home.vue index 09259343c..fb4765135 100644 --- a/js/src/views/Home.vue +++ b/js/src/views/Home.vue @@ -414,7 +414,6 @@ import Subtitle from "../components/Utils/Subtitle.vue"; DateComponent, EventParticipationCard, MultiCard, - "settings-onboard": () => import("./User/SettingsOnboard.vue"), }, metaInfo() { return { @@ -577,7 +576,9 @@ export default class Home extends Vue { @Watch("loggedUser") detectEmptyUserSettings(loggedUser: IUser): void { + console.debug("Try to detect empty user settings", loggedUser); if (loggedUser?.id && loggedUser?.settings === null) { + console.debug("No user settings, pushing to onboarding assistant"); this.$router.push({ name: RouteName.WELCOME_SCREEN, params: { step: "1" }, diff --git a/js/src/views/User/SettingsOnboard.vue b/js/src/views/User/SettingsOnboard.vue index 5a94c03a7..35f4687f9 100644 --- a/js/src/views/User/SettingsOnboard.vue +++ b/js/src/views/User/SettingsOnboard.vue @@ -49,7 +49,8 @@