project-booster-vue 9.63.1 → 9.63.3
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 +1 -1
- package/src/components/appointment/PbAppointmentForm.vue +7 -6
- package/src/components/scenario/scenarii/appointment-qualification-bathroom.json +25 -25
- package/src/services/api/appointmentQualificationsApi.ts +0 -16
- package/src/stores/modules/appointmentQualificationStore.ts +0 -18
package/package.json
CHANGED
|
@@ -39,18 +39,19 @@ export default defineComponent({
|
|
|
39
39
|
|
|
40
40
|
const appointmentFormUrl = computed(() => {
|
|
41
41
|
const sessions = store.getters['appointmentQualification/getSessions'];
|
|
42
|
-
store.dispatch('appointmentQualification/getDynamicCalendarId');
|
|
43
42
|
const currentAppointmentQualification =
|
|
44
43
|
store.getters['appointmentQualification/getCurrentAppointmentQualification'];
|
|
45
44
|
const currentUser = store.getters['inhabitants/getCurrentInhabitant'];
|
|
46
45
|
const baseUrl = store.getters['appointmentQualification/getClicRDVBaseUrl'];
|
|
47
|
-
const calendarId = store.getters['appointmentQualification/getCalendarId'];
|
|
48
46
|
|
|
49
47
|
let url = '';
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
if (props.payload?.viewModel?.calendarUrlPath) {
|
|
49
|
+
url = `${baseUrl}/${props.payload.viewModel.calendarUrlPath}?`;
|
|
50
|
+
} else {
|
|
51
|
+
url = `${baseUrl}/leroy-merlin-${sessions.storeId}`;
|
|
52
|
+
url += `?calendar_id=${sessions.calendarId}`;
|
|
53
|
+
url += `&vevent[str5]=${currentAppointmentQualification.inhabitantProjectId}`;
|
|
54
|
+
}
|
|
54
55
|
|
|
55
56
|
if (currentUser) {
|
|
56
57
|
url += `&fiche[email]=${currentUser.email}`;
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
},
|
|
318
318
|
"payload": {
|
|
319
319
|
"viewModel": {
|
|
320
|
-
"label": "Quel type de
|
|
320
|
+
"label": "Quel type de baignoire voulez-vous installer ?",
|
|
321
321
|
"answersComponent": "MPbCard",
|
|
322
322
|
"progressBar": true,
|
|
323
323
|
"forceOneCardPerLineOnMobile": true,
|
|
@@ -777,7 +777,7 @@
|
|
|
777
777
|
{
|
|
778
778
|
"conditions": ["true"],
|
|
779
779
|
"nextStep": {
|
|
780
|
-
"code": "
|
|
780
|
+
"code": "LMFR_QUESTION_PLAN_INFO"
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
783
|
]
|
|
@@ -839,8 +839,8 @@
|
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
},
|
|
842
|
-
"
|
|
843
|
-
"code": "
|
|
842
|
+
"LMFR_QUESTION_SCENARIO_ADD_SIMULATION": {
|
|
843
|
+
"code": "LMFR_QUESTION_SCENARIO_ADD_SIMULATION",
|
|
844
844
|
"type": "STEP",
|
|
845
845
|
"component": "MPbConfigurationsImport",
|
|
846
846
|
"slots": {
|
|
@@ -859,7 +859,7 @@
|
|
|
859
859
|
"redirectLink": {
|
|
860
860
|
"label": "Je préfère télécharger un plan",
|
|
861
861
|
"nextStep": {
|
|
862
|
-
"code": "
|
|
862
|
+
"code": "LMFR_QUESTION_ADD_PLAN"
|
|
863
863
|
}
|
|
864
864
|
},
|
|
865
865
|
"notificationPayload": {
|
|
@@ -881,7 +881,7 @@
|
|
|
881
881
|
{
|
|
882
882
|
"label": "Suivant",
|
|
883
883
|
"nextStep": {
|
|
884
|
-
"code": "
|
|
884
|
+
"code": "LMFR_QUESTION_ADD_PICTURE"
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
887
|
],
|
|
@@ -909,8 +909,8 @@
|
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
911
|
},
|
|
912
|
-
"
|
|
913
|
-
"code": "
|
|
912
|
+
"LMFR_QUESTION_PLAN_INFO": {
|
|
913
|
+
"code": "LMFR_QUESTION_PLAN_INFO",
|
|
914
914
|
"type": "STEP",
|
|
915
915
|
"component": "MPbQuestion",
|
|
916
916
|
"slots": {
|
|
@@ -946,7 +946,7 @@
|
|
|
946
946
|
"LATER": {
|
|
947
947
|
"code": "LATER",
|
|
948
948
|
"viewModel": {
|
|
949
|
-
"title": "Je
|
|
949
|
+
"title": "Je transmets mon plan au plus tard 48h avant le rendez-vous"
|
|
950
950
|
},
|
|
951
951
|
"meta": {
|
|
952
952
|
"ranking": 2
|
|
@@ -966,28 +966,28 @@
|
|
|
966
966
|
"nextStep": {
|
|
967
967
|
"conditionals": [
|
|
968
968
|
{
|
|
969
|
-
"conditions": ["isAnswerContaining('
|
|
969
|
+
"conditions": ["isAnswerContaining('LMFR_QUESTION_PLAN_INFO', 'DOWNLOAD_PLAN')"],
|
|
970
970
|
"nextStep": {
|
|
971
|
-
"code": "
|
|
971
|
+
"code": "LMFR_QUESTION_ADD_PLAN"
|
|
972
972
|
}
|
|
973
973
|
},
|
|
974
974
|
{
|
|
975
|
-
"conditions": ["isAnswerContaining('
|
|
975
|
+
"conditions": ["isAnswerContaining('LMFR_QUESTION_PLAN_INFO', 'LATER')"],
|
|
976
976
|
"nextStep": {
|
|
977
|
-
"code": "
|
|
977
|
+
"code": "LMFR_QUESTION_ADD_PLAN_LATER"
|
|
978
978
|
}
|
|
979
979
|
},
|
|
980
980
|
{
|
|
981
|
-
"conditions": ["isAnswerContaining('
|
|
981
|
+
"conditions": ["isAnswerContaining('LMFR_QUESTION_PLAN_INFO', 'IMPORT_SIMULATION')"],
|
|
982
982
|
"nextStep": {
|
|
983
|
-
"code": "
|
|
983
|
+
"code": "LMFR_QUESTION_SCENARIO_ADD_SIMULATION"
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
986
|
]
|
|
987
987
|
}
|
|
988
988
|
},
|
|
989
|
-
"
|
|
990
|
-
"code": "
|
|
989
|
+
"LMFR_QUESTION_ADD_PLAN_LATER": {
|
|
990
|
+
"code": "LMFR_QUESTION_ADD_PLAN_LATER",
|
|
991
991
|
"type": "STEP",
|
|
992
992
|
"component": "MPbAlert",
|
|
993
993
|
"slots": {
|
|
@@ -1051,17 +1051,17 @@
|
|
|
1051
1051
|
{
|
|
1052
1052
|
"label": "Etape suivante",
|
|
1053
1053
|
"nextStep": {
|
|
1054
|
-
"code": "
|
|
1054
|
+
"code": "LMFR_QUESTION_ADD_PICTURE"
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
1057
|
]
|
|
1058
1058
|
},
|
|
1059
1059
|
"nextStep": {
|
|
1060
|
-
"code": "
|
|
1060
|
+
"code": "LMFR_QUESTION_ADD_PICTURE"
|
|
1061
1061
|
}
|
|
1062
1062
|
},
|
|
1063
|
-
"
|
|
1064
|
-
"code": "
|
|
1063
|
+
"LMFR_QUESTION_ADD_PICTURE": {
|
|
1064
|
+
"code": "LMFR_QUESTION_ADD_PICTURE",
|
|
1065
1065
|
"type": "STEP",
|
|
1066
1066
|
"slots": {
|
|
1067
1067
|
"beforeContent": {
|
|
@@ -1155,8 +1155,8 @@
|
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
1157
|
},
|
|
1158
|
-
"
|
|
1159
|
-
"code": "
|
|
1158
|
+
"LMFR_QUESTION_ADD_PLAN": {
|
|
1159
|
+
"code": "LMFR_QUESTION_ADD_PLAN",
|
|
1160
1160
|
"type": "STEP",
|
|
1161
1161
|
"component": "MPbUploadDocument",
|
|
1162
1162
|
"slots": {
|
|
@@ -1178,7 +1178,7 @@
|
|
|
1178
1178
|
"redirectLink": {
|
|
1179
1179
|
"label": "Je préfère utiliser un plan 3D réalisé sur mon espace client.",
|
|
1180
1180
|
"nextStep": {
|
|
1181
|
-
"code": "
|
|
1181
|
+
"code": "LMFR_QUESTION_SCENARIO_ADD_SIMULATION"
|
|
1182
1182
|
}
|
|
1183
1183
|
},
|
|
1184
1184
|
"showMore": {
|
|
@@ -1217,7 +1217,7 @@
|
|
|
1217
1217
|
{
|
|
1218
1218
|
"label": "Suivant",
|
|
1219
1219
|
"nextStep": {
|
|
1220
|
-
"code": "
|
|
1220
|
+
"code": "LMFR_QUESTION_ADD_PICTURE"
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
1223
|
],
|
|
@@ -86,26 +86,10 @@ const linkInhabitantProjectToAppointmentQualification = async (data: any, inhabi
|
|
|
86
86
|
);
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
const getCalendarIdFromApi = async (storeId: string, appointmentType: string) => {
|
|
90
|
-
const response = await clientApi.get(
|
|
91
|
-
`/appointment-qualifications/contextualize?storeId=${storeId}&appointmentType=${appointmentType}?`,
|
|
92
|
-
{
|
|
93
|
-
headers: { 'Content-Type': 'application/json' },
|
|
94
|
-
},
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
return JSON.parse(
|
|
98
|
-
JSON.stringify(response.data).replace(/:"([^"]+)"/g, (match, $1) => {
|
|
99
|
-
return `: "${escape($1)}"`;
|
|
100
|
-
}),
|
|
101
|
-
);
|
|
102
|
-
};
|
|
103
|
-
|
|
104
89
|
export {
|
|
105
90
|
linkInhabitantProjectToAppointmentQualification,
|
|
106
91
|
declarationsWithAppointment,
|
|
107
92
|
saveAnswersByAppointmentQualificationId,
|
|
108
93
|
getAppointmentQualification,
|
|
109
94
|
declarationsWithoutAppointment,
|
|
110
|
-
getCalendarIdFromApi,
|
|
111
95
|
};
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
declarationsWithAppointment,
|
|
5
5
|
declarationsWithoutAppointment,
|
|
6
6
|
linkInhabitantProjectToAppointmentQualification,
|
|
7
|
-
getCalendarIdFromApi,
|
|
8
7
|
} from '../../services/api/appointmentQualificationsApi';
|
|
9
8
|
import { sendAppointmentQualificationEvent, sendAppointmentQualificationAnswers } from '../../services/api/eventsApi';
|
|
10
9
|
import { ActionContext } from 'vuex';
|
|
@@ -21,7 +20,6 @@ export interface AppointmentQualificationState {
|
|
|
21
20
|
currentAppointmentQualification: any;
|
|
22
21
|
sessions: any;
|
|
23
22
|
isQualificationAborted: boolean;
|
|
24
|
-
calendarId: string;
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
type AppointmentQualificationContext = ActionContext<AppointmentQualificationState, State>;
|
|
@@ -40,7 +38,6 @@ export default {
|
|
|
40
38
|
currentAppointmentQualification: {},
|
|
41
39
|
sessions: {},
|
|
42
40
|
isQualificationAborted: false,
|
|
43
|
-
calendarId: '',
|
|
44
41
|
},
|
|
45
42
|
|
|
46
43
|
getters: {
|
|
@@ -68,9 +65,6 @@ export default {
|
|
|
68
65
|
isQualificationAborted(state: AppointmentQualificationState) {
|
|
69
66
|
return state.isQualificationAborted;
|
|
70
67
|
},
|
|
71
|
-
getCalendarId(state: AppointmentQualificationState) {
|
|
72
|
-
return state.calendarId;
|
|
73
|
-
},
|
|
74
68
|
},
|
|
75
69
|
|
|
76
70
|
mutations: {
|
|
@@ -98,9 +92,6 @@ export default {
|
|
|
98
92
|
setIsQualificationAborted(state: AppointmentQualificationState, isQualificationAborted: boolean) {
|
|
99
93
|
state.isQualificationAborted = isQualificationAborted;
|
|
100
94
|
},
|
|
101
|
-
setCalendarId(state: AppointmentQualificationState, calendarId: string) {
|
|
102
|
-
state.calendarId = calendarId;
|
|
103
|
-
},
|
|
104
95
|
},
|
|
105
96
|
|
|
106
97
|
actions: {
|
|
@@ -224,14 +215,5 @@ export default {
|
|
|
224
215
|
commit('setCurrentAppointmentQualification', null);
|
|
225
216
|
}
|
|
226
217
|
},
|
|
227
|
-
async getDynamicCalendarId({ commit, state }: AppointmentQualificationContext) {
|
|
228
|
-
try {
|
|
229
|
-
const type = state.sessions.appointmentQualificationFormStructure['__START__']?.meta?.webAnalytics.scenario;
|
|
230
|
-
const result = await getCalendarIdFromApi(state.sessions.storeId, type);
|
|
231
|
-
if (result) {
|
|
232
|
-
commit('setCalendarId', result.id);
|
|
233
|
-
}
|
|
234
|
-
} catch (e) {}
|
|
235
|
-
},
|
|
236
218
|
},
|
|
237
219
|
};
|