project-booster-vue 9.63.8 → 9.63.10

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "9.63.8",
3
+ "version": "9.63.10",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1330,10 +1330,14 @@ export default defineComponent({
1330
1330
  code: 'appointmentLinkClicked',
1331
1331
  payload: this.project.id,
1332
1332
  });
1333
+
1334
+ const pageName = ['KITCHEN_IN_STORE', 'KITCHEN_REMOTE'].includes(this.appointment.appointmentType)
1335
+ ? 'cuisine'
1336
+ : 'salle-de-bains';
1333
1337
  nextTick(() => {
1334
1338
  (<any>(
1335
1339
  window
1336
- )).location = `/projets/preparation-rendez-vous/cuisine.html?inhabitantProjectId=${this.project.id}&appointmentId=${this.appointment.appointmentId}&groupId=${this.appointment.groupId}&calendarId=${this.appointment.calendarId}&leadSourceDetail=Project_Space`;
1340
+ )).location = `/projets/preparation-rendez-vous/${pageName}.html?inhabitantProjectId=${this.project.id}&appointmentId=${this.appointment.appointmentId}&groupId=${this.appointment.groupId}&calendarId=${this.appointment.calendarId}&leadSourceDetail=Project_Space`;
1337
1341
  });
1338
1342
  },
1339
1343
  },
@@ -83,14 +83,14 @@
83
83
  <div class="pb-upload-document__redirect-link" v-if="payload.viewModel.redirectLink">
84
84
  <m-link
85
85
  :label="payload.viewModel.redirectLink.label"
86
- @click="callAction(payload.viewModel.redirectLink.nextStep)"
86
+ @click="validMultiSelect(payload.viewModel.redirectLink)"
87
87
  theme="primary"
88
88
  ></m-link>
89
89
  </div>
90
90
 
91
- <div class="pb-upload-document__buttons row-flex" v-if="payload.callToActions">
92
- <div class="pb-upload-document__buttons__button" v-for="button in payload.callToActions">
93
- <m-button :label="button.label" @click="callAction(button.nextStep)" :theme="button.theme" />
91
+ <div class="pb-upload-document__buttons row-flex" v-if="payload.multiSelect">
92
+ <div class="pb-upload-document__buttons__button" v-for="button in payload.multiSelect.actions">
93
+ <m-button :label="button.label" @click="validMultiSelect(button)" :theme="button.theme" />
94
94
  </div>
95
95
  </div>
96
96
 
@@ -209,8 +209,6 @@ export default defineComponent({
209
209
 
210
210
  const pbMediaUpload = ref<ComponentCustomProperties>();
211
211
 
212
- const previousAnswers: Ref<Map<string, ScenarioStepAnswer[]> | undefined> = ref();
213
-
214
212
  // Documents pagination
215
213
  const lastItemIndex = ref(1);
216
214
  const pageSize = ref(8);
@@ -246,15 +244,19 @@ export default defineComponent({
246
244
  };
247
245
 
248
246
  const validMultiSelect = (multiSelectOptions: UploadDocumentMultiSelectAction) => {
249
- emit(props.completedEventName, {
250
- answers: selectedDocuments.value,
251
- nextStep: multiSelectOptions.nextStep,
252
- });
247
+ if (multiSelectOptions.nextStep.code == '__BACK__') {
248
+ emit('go-back');
249
+ } else {
250
+ emit(props.completedEventName, {
251
+ answers: selectedDocuments.value.length ? selectedDocuments.value : null,
252
+ nextStep: multiSelectOptions.nextStep,
253
+ });
254
+ }
253
255
  };
254
256
 
255
257
  const skipQuestion = (button: UploadDocumentMultiSelectAction) => {
256
258
  emit(props.completedEventName, {
257
- answers: selectedDocuments.value,
259
+ answers: selectedDocuments.value.length ? selectedDocuments.value : null,
258
260
  nextStep: button.nextStep,
259
261
  });
260
262
  };
@@ -273,21 +275,6 @@ export default defineComponent({
273
275
  showMoreAnimation.value = 'pb-upload-document__answers-animation';
274
276
  };
275
277
 
276
- /**
277
- * Send action to completed step
278
- * @param action
279
- */
280
- const callAction = (action: PayloadAction) => {
281
- if (action.code != '__BACK__') {
282
- emit('step-completed', {
283
- answers: [],
284
- nextStep: action,
285
- });
286
- } else {
287
- emit('go-back');
288
- }
289
- };
290
-
291
278
  return {
292
279
  ADD_ICON,
293
280
  BACK_ICON,
@@ -308,7 +295,6 @@ export default defineComponent({
308
295
  displayDocumentDialog,
309
296
  handleMediaUploaded,
310
297
  handleShowMoreClick,
311
- callAction,
312
298
  };
313
299
  },
314
300
  });