diff --git a/js/src/components/Participation/ConfirmParticipation.vue b/js/src/components/Participation/ConfirmParticipation.vue index e6f7e4a36..3290f7305 100644 --- a/js/src/components/Participation/ConfirmParticipation.vue +++ b/js/src/components/Participation/ConfirmParticipation.vue @@ -1,5 +1,5 @@ - + {{ $t("Your participation is being validated") }} @@ -11,7 +11,24 @@ }} - {{ $t("Your participation has been validated") }} + + {{ $t("Your participation has been validated") }} + + + + {{ $t("Remember my participation in this browser") }} + + {{ + $t( + "Will allow to display and manage your participation status on the event page when using this device. Uncheck if you're using a public device." + ) + }} + + + + {{ $t("Visit event page") }} + + @@ -32,6 +49,10 @@ export default class ConfirmParticipation extends Vue { failed = false; + participation!: IParticipant; + + saveParticipation = true; + async created(): Promise { await this.validateAction(); } @@ -49,11 +70,7 @@ export default class ConfirmParticipation extends Vue { if (data) { const { confirmParticipation: participation } = data; - await confirmLocalAnonymousParticipation(participation.event.uuid); - await this.$router.replace({ - name: RouteName.EVENT, - params: { uuid: data.confirmParticipation.event.uuid }, - }); + this.participation = participation; } } catch (err) { console.error(err); @@ -64,5 +81,23 @@ export default class ConfirmParticipation extends Vue { this.loading = false; } } + + askToSaveParticipation(): void { + if (this.saveParticipation) { + this.saveParticipationInBrowser(); + } + this.forwardToEventPage(); + } + + async saveParticipationInBrowser(): Promise { + await confirmLocalAnonymousParticipation(this.participation.event.uuid); + } + + async forwardToEventPage(): Promise { + await this.$router.replace({ + name: RouteName.EVENT, + params: { uuid: this.participation.event.uuid }, + }); + } }
+ {{ + $t( + "Will allow to display and manage your participation status on the event page when using this device. Uncheck if you're using a public device." + ) + }} +