Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<template>
<div>
<div class="header">
<img alt="logo" src="@/assets/logo_pigma.png"/>
</div>
<div class="center">
<b-container class="msg" v-if="btnVariant=='success'">
<p>
Merci pour votre inscription.
</p>
<p>
Vous recevrez une notification lors de l'activation de votre compte par l'administrateur de la plateforme.
</p>
<!-- <b-button type="button" variant="outline-primary" @click.prevent="$router.push({ name: 'SignIn' })">
Ouvrir la page de connexion
</b-button> -->
</b-container>
<b-container class="msg" v-else-if="btnVariant=='danger'">
<p>
Une erreur est survenue. Veuillez contacter l'administrateur du site.
</p>
</b-container>
<b-container class="msg" v-else>
<p>
Pour confirmer votre inscription <b-button :pressed="btnPressed" :variant="btnVariant" @click.prevent="submit">Cliquez ici</b-button>
</p>
</b-container>
</div>
<small class="footer">
<p>Propulsé par <a href="https://www.neogeo.fr/" target="_blank" rel="noopener">Neogeo-Technologies</a></p>
</small>
</div>
</template>
<script>
import {
mapGetters,
mapState,
mapActions,
mapMutations
} from 'vuex';
const validationRegistrationStoreName = 'validation-registration';
const validationRegistrationGetters = {
status: 'getStatus',
};
const validationRegistrationState = ['accountStatus'];
const validationRegistrationMutations = ['SET_TOKEN'];
const validationRegistrationActions = ['POST_TOKEN'];
export default {
name: 'ValidationRegistration',
data: () => {
return {
btnPressed: false,
};
},
computed: {
...mapState(validationRegistrationStoreName, validationRegistrationState),
...mapGetters(validationRegistrationStoreName, validationRegistrationGetters),
btnVariant() {
if (this.status === true) {
return 'success';
} else if (this.status === false) {
return 'danger';
} else {
return '';
}
},
},
created() {
this.$store.commit('validation-registration/SET_TOKEN', this.$route.query.token);
},
methods: {
...mapActions(validationRegistrationStoreName, validationRegistrationActions),
...mapMutations(validationRegistrationStoreName, validationRegistrationMutations),
async submit() {
this.btnPressed = true;
await this.$store.dispatch('validation-registration/POST_TOKEN');
},
},
};
</script>
<style lang="less" scoped>
.header {
position: absolute;
top: 0;
left: 0;
}
.header > img {
width: 440px;
}
.center {
position: initial;
}
.center .msg.container {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.center .msg.container,
.center .msg.container button {
font-size: large;
}
.footer {
position: absolute;
bottom: 0;
font-size: small;
}
.footer a {
text-decoration: none;
}
</style>