Refresh loggeduser information before the final step of onboarding

Otherwise we endup in a loop

Closes #964

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-11-29 09:50:26 +01:00
parent 21325a014d
commit 3fb0265d2d
3 changed files with 15 additions and 2 deletions

View File

@@ -406,7 +406,6 @@ import Subtitle from "../components/Utils/Subtitle.vue";
DateComponent,
EventParticipationCard,
MultiCard,
"settings-onboard": () => import("./User/SettingsOnboard.vue"),
},
metaInfo() {
return {
@@ -569,7 +568,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" },