project-booster-vue 9.56.0 → 9.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -14,21 +14,19 @@
|
|
|
14
14
|
<div class="pb-pedagogy__content-description-line-text" v-html="line.label" />
|
|
15
15
|
</div>
|
|
16
16
|
</m-flex>
|
|
17
|
-
<form
|
|
18
|
-
action="#"
|
|
19
|
-
class="pb-pedagogy__form-lead"
|
|
20
|
-
v-if="payload.viewModel.showFormLead"
|
|
21
|
-
@submit.prevent="saveFormLead(payload.viewModel.showFormLead.nextStep)"
|
|
22
|
-
>
|
|
17
|
+
<form action="#" class="pb-pedagogy__form-lead" v-if="payload.viewModel.showFormLead">
|
|
23
18
|
<input
|
|
24
19
|
type="email"
|
|
25
20
|
class="pb-pedagogy__form-lead__input"
|
|
26
21
|
v-model="emailToSaved"
|
|
22
|
+
required
|
|
27
23
|
:placeholder="payload.viewModel.showFormLead.inputPlaceholder"
|
|
28
24
|
/>
|
|
25
|
+
<div v-if="error && error.message" class="pb-pedagogy__error">{{ error.message }}</div>
|
|
29
26
|
<m-button
|
|
30
27
|
:label="payload.viewModel.showFormLead.buttonLabel"
|
|
31
28
|
class="pb-pedagogy__form-lead__button mc-button--full"
|
|
29
|
+
@click="saveFormLead(payload.viewModel.showFormLead)"
|
|
32
30
|
/>
|
|
33
31
|
</form>
|
|
34
32
|
<m-flex
|
|
@@ -107,6 +105,7 @@ export default defineComponent({
|
|
|
107
105
|
data: () => ({
|
|
108
106
|
value: [],
|
|
109
107
|
emailToSaved: '',
|
|
108
|
+
error: {},
|
|
110
109
|
}),
|
|
111
110
|
computed: {
|
|
112
111
|
...mapGetters('appointmentQualification', {
|
|
@@ -168,10 +167,23 @@ export default defineComponent({
|
|
|
168
167
|
});
|
|
169
168
|
},
|
|
170
169
|
saveFormLead(action: any) {
|
|
171
|
-
this
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
const validation = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(this.emailToSaved.trim());
|
|
171
|
+
|
|
172
|
+
if (this.emailToSaved.trim() != '' && validation) {
|
|
173
|
+
this.error = false;
|
|
174
|
+
this.$emit('step-completed', {
|
|
175
|
+
answers: [
|
|
176
|
+
{
|
|
177
|
+
email: this.emailToSaved,
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
nextStep: action.nextStep,
|
|
181
|
+
});
|
|
182
|
+
} else {
|
|
183
|
+
this.error = {
|
|
184
|
+
message: 'Veuillez rentrer un email valide.',
|
|
185
|
+
};
|
|
186
|
+
}
|
|
175
187
|
},
|
|
176
188
|
},
|
|
177
189
|
});
|
|
@@ -202,6 +214,13 @@ $responsive-breakpoint: 'm';
|
|
|
202
214
|
}
|
|
203
215
|
}
|
|
204
216
|
|
|
217
|
+
&__error {
|
|
218
|
+
@include set-font-scale('04', 'm');
|
|
219
|
+
|
|
220
|
+
color: $color-danger-500;
|
|
221
|
+
margin-bottom: $mu050;
|
|
222
|
+
}
|
|
223
|
+
|
|
205
224
|
&__content {
|
|
206
225
|
box-sizing: border-box;
|
|
207
226
|
padding: $mu100;
|
|
@@ -279,9 +279,13 @@ export default defineComponent({
|
|
|
279
279
|
if (action?.type === 'MODAL') {
|
|
280
280
|
this.dialogViewModel = action.dialogViewModel;
|
|
281
281
|
this.displayDialog = true;
|
|
282
|
+
} else if (action?.type === 'STEP') {
|
|
283
|
+
this.$emit('step-completed', {
|
|
284
|
+
answers: [],
|
|
285
|
+
nextStep: action,
|
|
286
|
+
});
|
|
282
287
|
}
|
|
283
288
|
},
|
|
284
|
-
|
|
285
289
|
handleDialogClose() {
|
|
286
290
|
this.showSaveProjectItem = false;
|
|
287
291
|
},
|