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

@@ -49,7 +49,8 @@
</div>
</template>
<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";
import { USER_SETTINGS } from "@/graphql/user";
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
import { TIMEZONES } from "../../graphql/config";
import RouteName from "../../router/name";
import { IConfig } from "../../types/config.model";
@@ -65,6 +66,7 @@ import { IConfig } from "../../types/config.model";
},
apollo: {
config: TIMEZONES,
loggedUser: USER_SETTINGS,
},
metaInfo() {
return {
@@ -82,6 +84,11 @@ export default class SettingsOnboard extends Vue {
get stepIndex(): number {
return this.step - 1;
}
@Watch("stepIndex")
refetchUserSettings() {
this.$apollo.queries.loggedUser.refetch();
}
}
</script>
<style scoped lang="scss">