project-booster-vue 9.59.1 → 9.59.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-booster-vue",
3
- "version": "9.59.1",
3
+ "version": "9.59.3",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -65,10 +65,14 @@ const props = defineProps({
65
65
  * @param action
66
66
  */
67
67
  const callAction = (action: PayloadAction) => {
68
- emit('step-completed', {
69
- answers: [],
70
- nextStep: action,
71
- });
68
+ if (action.code != '__BACK__') {
69
+ emit('step-completed', {
70
+ answers: [],
71
+ nextStep: action,
72
+ });
73
+ } else {
74
+ emit('go-back');
75
+ }
72
76
  };
73
77
  </script>
74
78
 
@@ -37,12 +37,12 @@
37
37
  width-from-l="1of3"
38
38
  >
39
39
  <div class="pb-upload-document__answer">
40
- <pb-card
41
- class="pb-upload-document__answer-card"
42
- :title="payload.viewModel.addTitle || 'Ajouter un plan'"
43
- :text="payload.viewModel.addText || ''"
44
- @card-click="displayDocumentDialog"
45
- />
40
+ <div
41
+ class="pb-upload-document__answer-plan mc-button mc-button--bordered-neutral"
42
+ @click="displayDocumentDialog"
43
+ >
44
+ {{ payload.viewModel.addTitle || 'Importer un fichier' }}
45
+ </div>
46
46
  </div>
47
47
  </m-flexy-col>
48
48
  <m-flexy-col
@@ -79,6 +79,17 @@
79
79
  </m-flexy>
80
80
  </m-container>
81
81
  </div>
82
+
83
+ <div class="pb-upload-document__redirect-link" v-if="payload.viewModel.redirectLink">
84
+ <m-link :label="payload.viewModel.redirectLink.label" theme="primary"></m-link>
85
+ </div>
86
+
87
+ <div class="pb-upload-document__buttons row-flex" v-if="payload.callToActions">
88
+ <div class="pb-upload-document__buttons__button" v-for="button in payload.callToActions">
89
+ <m-button :label="button.label" @click="callAction(button.nextStep)" :theme="button.theme" />
90
+ </div>
91
+ </div>
92
+
82
93
  <pb-sticky-footer
83
94
  v-if="payload.skippable || payload.multiSelect"
84
95
  ref="pbStickyFooter"
@@ -153,6 +164,7 @@ import {
153
164
  } from '@/components/question/upload-document/UploadDocument';
154
165
  import { ScenarioStepAnswer } from '@/types/pb/Scenario';
155
166
  import { decorate, doEval } from '@/services/decorate';
167
+ import { PayloadAction } from '../../types/genericPayload';
156
168
 
157
169
  const BACK_ICON =
158
170
  'https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Navigation_Arrow_Arrow--Left_16px.svg';
@@ -302,6 +314,21 @@ export default defineComponent({
302
314
  showMoreAnimation.value = 'pb-upload-document__answers-animation';
303
315
  };
304
316
 
317
+ /**
318
+ * Send action to completed step
319
+ * @param action
320
+ */
321
+ const callAction = (action: PayloadAction) => {
322
+ if (action.code != '__BACK__') {
323
+ emit('step-completed', {
324
+ answers: [],
325
+ nextStep: action,
326
+ });
327
+ } else {
328
+ emit('go-back');
329
+ }
330
+ };
331
+
305
332
  return {
306
333
  ADD_ICON,
307
334
  BACK_ICON,
@@ -322,6 +349,7 @@ export default defineComponent({
322
349
  displayDocumentDialog,
323
350
  handleMediaUploaded,
324
351
  handleShowMoreClick,
352
+ callAction,
325
353
  };
326
354
  },
327
355
  });
@@ -329,6 +357,7 @@ export default defineComponent({
329
357
 
330
358
  <style lang="scss" scoped>
331
359
  @import 'pb-variables';
360
+ @import '../../styles/global.scss';
332
361
 
333
362
  $responsive-breakpoint: 'm';
334
363
  $answers-apparition-duration: '0.5s';
@@ -360,6 +389,23 @@ $answers-apparition-duration: '0.5s';
360
389
  height: auto;
361
390
  width: 100%;
362
391
 
392
+ &__buttons {
393
+ padding: 0 $mu100;
394
+ margin-top: $mu250;
395
+
396
+ &__button {
397
+ width: 50%;
398
+
399
+ &:last-child {
400
+ text-align: right;
401
+ }
402
+ }
403
+ }
404
+
405
+ &__redirect-link {
406
+ margin: $mu100 $mu100 0 $mu100;
407
+ }
408
+
363
409
  &__back-button {
364
410
  position: absolute;
365
411
  top: 0;
@@ -4,6 +4,12 @@
4
4
  "subtitle": "Le plan de votre salle de bains est indispensable en amont du RDV. Cela permettra à votre conseiller de préparer au mieux votre projet. Formats acceptés : .jpg .jpeg .pdf .png 56Go max.",
5
5
  "answersComponent": "PbCard",
6
6
  "startOpened": false,
7
+ "redirectLink": {
8
+ "label": "Je préfère utiliser un plan 3D réalisé sur mon espace client.",
9
+ "nextStep": {
10
+ "code": ""
11
+ }
12
+ },
7
13
  "mediaPayload": {
8
14
  "viewModel": {
9
15
  "type": "documentsPlan",
@@ -43,6 +49,15 @@
43
49
  }
44
50
  }
45
51
  },
52
+ "callToActions": [
53
+ {
54
+ "label": "Précédent",
55
+ "theme": "bordered-primary-02"
56
+ },
57
+ {
58
+ "label": "Suivant"
59
+ }
60
+ ],
46
61
  "skippable": [
47
62
  {
48
63
  "label": "Ajouter un plan plus tard",
@@ -906,13 +906,32 @@
906
906
  "title": "Voulez-vous télécharger vos plans plus tard ?",
907
907
  "type": "warning",
908
908
  "exitOptionsTitle": "Réaliser rapidement votre plan :",
909
- "exitOptions": []
909
+ "exitOptions": [
910
+ {
911
+ "code": "CARD-1",
912
+ "viewModel": {
913
+ "url": "https://www.leroymerlin.fr/produits/cuisine/cuisine-equipee-delinia-id/",
914
+ "image": "https://storage.googleapis.com/project-booster-media/kitchen/kitchen-range.jpeg",
915
+ "title": "Découvrir nos gammes de cuisines",
916
+ "subtitle": "Découvrir nos gammes de cuisines"
917
+ }
918
+ },
919
+ {
920
+ "code": "CARD-2",
921
+ "viewModel": {
922
+ "url": "https://www.leroymerlin.fr/produits/cuisine/cuisine-equipee-delinia-id/",
923
+ "image": "https://storage.googleapis.com/project-booster-media/kitchen/kitchen-range.jpeg",
924
+ "title": "Découvrir nos gammes de cuisines",
925
+ "subtitle": "Découvrir nos gammes de cuisines"
926
+ }
927
+ }
928
+ ]
910
929
  },
911
930
  "callToActions": [
912
931
  {
913
932
  "label": "Précédent",
914
933
  "nextStep": {
915
- "code": "LMFR_BATHROOM_DOWNLOAD_PLAN"
934
+ "code": "__BACK__"
916
935
  },
917
936
  "theme": "bordered-primary-02"
918
937
  },
@@ -944,7 +963,8 @@
944
963
  "component": "MPbUploadDocument",
945
964
  "payload": {
946
965
  "viewModel": {
947
- "label": "Les photos de votre cuisine",
966
+ "label": "Souhaitez-vous nous transmettre des photos de votre salle de bain ou de vos inspirations ?",
967
+ "subtitle": "En joignant des photos, votre expert sera en mesure de vous proposer une solution qui correspond au mieux à vos attentes.",
948
968
  "addTitle": "Ajouter une photo",
949
969
  "addText": " ",
950
970
  "answersComponent": "PbCard",
@@ -973,6 +993,21 @@
973
993
  }
974
994
  }
975
995
  },
996
+ "callToActions": [
997
+ {
998
+ "label": "Précédent",
999
+ "theme": "bordered-primary-02",
1000
+ "nextStep": {
1001
+ "code": "__BACK__"
1002
+ }
1003
+ },
1004
+ {
1005
+ "label": "Suivant",
1006
+ "nextStep": {
1007
+ "code": "LMFR_BATHROOM_TIME_TO_START"
1008
+ }
1009
+ }
1010
+ ],
976
1011
  "skippable": [
977
1012
  {
978
1013
  "isAnswer": true,
@@ -1046,6 +1081,12 @@
1046
1081
  "label": "Votre projet de salle de bains"
1047
1082
  }
1048
1083
  },
1084
+ "redirectLink": {
1085
+ "label": "Je préfère utiliser un plan 3D réalisé sur mon espace client.",
1086
+ "nextStep": {
1087
+ "code": "LMFR_BATHROOM_ADD_SIMULATION"
1088
+ }
1089
+ },
1049
1090
  "payload": {
1050
1091
  "viewModel": {
1051
1092
  "label": "Partagez votre plan de salle de bains :",
@@ -1078,6 +1119,21 @@
1078
1119
  }
1079
1120
  }
1080
1121
  },
1122
+ "callToActions": [
1123
+ {
1124
+ "label": "Précédent",
1125
+ "theme": "bordered-primary-02",
1126
+ "nextStep": {
1127
+ "code": "__BACK__"
1128
+ }
1129
+ },
1130
+ {
1131
+ "label": "Suivant",
1132
+ "nextStep": {
1133
+ "code": "LMFR_BATHROOM_DOWNLOAD"
1134
+ }
1135
+ }
1136
+ ],
1081
1137
  "skippable": [
1082
1138
  {
1083
1139
  "isAnswer": true,