Introduce group basic federation, event new page and notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -1,33 +1,34 @@
|
||||
<template>
|
||||
<section class="container">
|
||||
<h1 class="title" v-if="loading">
|
||||
{{ $t('Your participation is being validated') }}
|
||||
</h1>
|
||||
<div v-else>
|
||||
<div v-if="failed">
|
||||
<b-message :title="$t('Error while validating participation')" type="is-danger">
|
||||
{{ $t('Either the participation has already been validated, either the validation token is incorrect.') }}
|
||||
</b-message>
|
||||
</div>
|
||||
<h1 class="title" v-else>
|
||||
{{ $t('Your participation has been validated') }}
|
||||
</h1>
|
||||
</div>
|
||||
</section>
|
||||
<section class="container">
|
||||
<h1 class="title" v-if="loading">{{ $t("Your participation is being validated") }}</h1>
|
||||
<div v-else>
|
||||
<div v-if="failed">
|
||||
<b-message :title="$t('Error while validating participation')" type="is-danger">
|
||||
{{
|
||||
$t(
|
||||
"Either the participation has already been validated, either the validation token is incorrect."
|
||||
)
|
||||
}}
|
||||
</b-message>
|
||||
</div>
|
||||
<h1 class="title" v-else>{{ $t("Your participation has been validated") }}</h1>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { RouteName } from '@/router';
|
||||
import { IParticipant } from '@/types/event.model';
|
||||
import { CONFIRM_PARTICIPATION } from '@/graphql/event';
|
||||
import { confirmLocalAnonymousParticipation } from '@/services/AnonymousParticipationStorage';
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
import RouteName from "../../router/name";
|
||||
import { IParticipant } from "../../types/event.model";
|
||||
import { CONFIRM_PARTICIPATION } from "../../graphql/event";
|
||||
import { confirmLocalAnonymousParticipation } from "../../services/AnonymousParticipationStorage";
|
||||
|
||||
@Component
|
||||
export default class ConfirmParticipation extends Vue {
|
||||
@Prop({ type: String, required: true }) token!: string;
|
||||
|
||||
loading = true;
|
||||
|
||||
failed = false;
|
||||
|
||||
async created() {
|
||||
@@ -36,7 +37,9 @@ export default class ConfirmParticipation extends Vue {
|
||||
|
||||
async validateAction() {
|
||||
try {
|
||||
const { data } = await this.$apollo.mutate<{ confirmParticipation: IParticipant }>({
|
||||
const { data } = await this.$apollo.mutate<{
|
||||
confirmParticipation: IParticipant;
|
||||
}>({
|
||||
mutation: CONFIRM_PARTICIPATION,
|
||||
variables: {
|
||||
token: this.token,
|
||||
@@ -46,7 +49,10 @@ 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 } } );
|
||||
await this.$router.replace({
|
||||
name: RouteName.EVENT,
|
||||
params: { uuid: data.confirmParticipation.event.uuid },
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
Reference in New Issue
Block a user