project-booster-vue 9.19.3 → 9.19.6

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.19.3",
3
+ "version": "9.19.6",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -70,7 +70,7 @@ export const TemplateSandbox = (args, { argTypes }) => {
70
70
  sourceDetail: 'Appointment_email',
71
71
  });
72
72
  store.dispatch('appointmentQualification/checkAppointmentQualification', {});
73
- store.dispatch('configurations/loadConfigurations', '001');
73
+ store.dispatch('configurations/loadConfigurations', { projectId: '001' });
74
74
  store.dispatch('configurations/defineConfiguratorTypes', [DEFAULT_PAYLOAD.__START__.meta.configuratorType]);
75
75
  store.dispatch('configurations/searchConfigurations', '001');
76
76
  return { args };
@@ -30,7 +30,7 @@ import {
30
30
  component: PbConfigurationsSection,
31
31
  beforeEnter: async (to, from, next, store) => {
32
32
  await store.dispatch('projects/loaProject', '001');
33
- await store.dispatch('configurations/loadConfigurations', '123_project_id');
33
+ await store.dispatch('configurations/loadConfigurations', { projectId: '123_project_id' });
34
34
  next();
35
35
  },
36
36
  },
@@ -107,7 +107,7 @@ import DOCUMENT_UPLOAD_PAYLOAD from '../../media/upload/document-upload-payload.
107
107
  store.dispatch('tasks/loadPlanner', { projectId, buId: 'bu-dev-planner' });
108
108
  }
109
109
  if (store.getters['configurations/getCurrentProjectId'] !== projectId) {
110
- store.dispatch('configurations/loadConfigurations', projectId);
110
+ store.dispatch('configurations/loadConfigurations', { projectId: projectId, forceNoPriceUpdate: true });
111
111
  store.dispatch('configurations/searchConfigurations', projectId);
112
112
  }
113
113
  if (store.getters['estimates/getCurrentProjectId'] !== projectId) {
@@ -31,7 +31,7 @@ import {
31
31
  beforeEnter: async (to, from, next, store) => {
32
32
  store.dispatch('projects/loadProject', '001');
33
33
  store.dispatch('tools/loadTools', '20181');
34
- store.dispatch('configurations/loadConfigurations', '001');
34
+ store.dispatch('configurations/loadConfigurations', { projectId: '001' });
35
35
  store.dispatch('configurations/searchConfigurations', '001');
36
36
  next();
37
37
  },
@@ -90,7 +90,7 @@ import DOCUMENT_UPLOAD_PAYLOAD from '../../media/upload/document-upload-payload.
90
90
  store.dispatch('tasks/loadPlanner', { projectId, buId: 'bu-dev-planner' });
91
91
  }
92
92
  if (store.getters['configurations/getCurrentProjectId'] !== projectId) {
93
- store.dispatch('configurations/loadConfigurations', projectId);
93
+ store.dispatch('configurations/loadConfigurations', { projectId: projectId });
94
94
  store.dispatch('configurations/searchConfigurations', projectId);
95
95
  }
96
96
  if (store.getters['estimates/getCurrentProjectId'] !== projectId) {
@@ -100,19 +100,18 @@ export const answerGettersMappers: Map<string, (param: any) => void> = new Map<s
100
100
  }),
101
101
  );
102
102
 
103
- function adaptAnswers(answers: Record<string, ScenarioStepAnswer[]>, scenario: Scenario) {
103
+ function adaptAnswers(answers: Map<string, ScenarioStepAnswer[]>, scenario: Record<string, any>) {
104
104
  let adaptedAnswers: ScenarioAnswer[] = [];
105
105
 
106
106
  if (answers) {
107
- adaptedAnswers = Object.entries(answers)
108
- .filter(([code]) => !['PbRestitution'].includes(scenario?.get(code)?.component ?? ''))
109
- .filter(([code]) => code !== 'SUBPROJECT_FORM_ID')
110
- .map(([questionId, answerData]) => ({
111
- questionId,
112
- answers: answerData.map(
113
- answerGettersMappers.get(scenario?.get(questionId)?.component ?? '') ?? (() => undefined),
114
- ),
115
- }));
107
+ answers.forEach((value: ScenarioStepAnswer[], key: string) => {
108
+ if (!['PbRestitution'].includes(scenario[key]?.component ?? '') && key !== 'SUBPROJECT_FORM_ID') {
109
+ adaptedAnswers.push({
110
+ questionId: key,
111
+ answers: value.map(answerGettersMappers.get(scenario[key]?.component ?? '') ?? (() => undefined)),
112
+ });
113
+ }
114
+ });
116
115
  }
117
116
 
118
117
  return adaptedAnswers;
@@ -75,7 +75,7 @@ export const TemplateSandbox = (args, { argTypes }) => ({
75
75
  setup() {
76
76
  const store = useStore();
77
77
  store.dispatch('projects/loadProject', '001');
78
- store.dispatch('configurations/loadConfigurations', '001');
78
+ store.dispatch('configurations/loadConfigurations', { projectId: '001' });
79
79
  store.dispatch('configurations/searchConfigurations', '001');
80
80
  return { args };
81
81
  },
@@ -287,7 +287,7 @@ export default defineComponent({
287
287
  };
288
288
 
289
289
  const emitRefreshConfigurationEvent = () => {
290
- store.dispatch('configurations/loadConfigurations', projectId.value);
290
+ store.dispatch('configurations/loadConfigurations', { projectId: projectId.value });
291
291
  };
292
292
 
293
293
  const skipQuestion = (button: ConfigurationsImportSkippable) => {
@@ -65,7 +65,7 @@ export const TemplateSandbox = (args, { argTypes }) => {
65
65
  store.dispatch('documentsPlans/updateContext', { type: 'DOCUMENT', subType: 'PLAN' });
66
66
  store.dispatch('documentsPictures/updateContext', { type: 'DOCUMENT', subType: 'PHOTO' });
67
67
  store.dispatch('projects/loadProject', '001');
68
- store.dispatch('configurations/loadConfigurations', '001');
68
+ store.dispatch('configurations/loadConfigurations', { projectId: '001' });
69
69
  store.dispatch('configurations/defineConfiguratorTypes', [DEFAULT_PAYLOAD.__START__.meta.configuratorType]);
70
70
  store.dispatch('configurations/searchConfigurations', '001');
71
71
  store.dispatch('inhabitants/loadInhabitant', '123456');
@@ -537,14 +537,17 @@
537
537
  "payload": {
538
538
  "viewModel": {
539
539
  "label": "${answers.LMFR_QUESTION_PLAN[0].code === 'HAVE_PLAN' ? 'Sur votre plan, vérifiez que vous avez les bonnes mesures :' : 'Réalisez rapidement un plan avec les mesures de votre pièce en 3 étapes'}",
540
- "subtitle": "${answers.LMFR_QUESTION_PLAN[0].code === 'HAVE_PLAN' ? 'Votre conseiller aura besoin de ces mesures pour créer votre plan de cuisine en 3D.' : 'Sur une feuille, dessinez la pièce et reportez les bonnes mesures, prenez une photo du plan et ajoutez la.'}",
541
540
  "widthFromL": "1of3",
542
541
  "forceOneCardPerLineOnMobile": true,
543
542
  "answersComponent": "PbCard",
543
+ "videoBlock": {
544
+ "buttonLabel": "Voir le guide en vidéo (1min)",
545
+ "icon": "https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Media_Play_24px.svg",
546
+ "image": "https://storage.googleapis.com/project-booster-media/vad/plans/Qualif-RDV-Plan-Video.png"
547
+ },
544
548
  "video": {
545
549
  "src": "https://players.brightcove.net/2812541250001/SkgXKciHDZ_default/index.html?videoId=6270735637001&autoplay=play",
546
550
  "theme": "bordered",
547
- "label": "Voir le guide en vidéo",
548
551
  "icon": "https://storage.googleapis.com/project-booster-media/mozaic-icons/svg/Media_Play_24px.svg"
549
552
  }
550
553
  },
@@ -663,26 +666,10 @@
663
666
  "errorUploadTitle": "Une erreur est survenue lors de l'envoi de votre plan ",
664
667
  "uploadPreviewTitle": "Nom de plan ",
665
668
  "mediaTypeTitle": "De quel type de plan s’agit il ?",
666
- "mediaTypes": [
667
- {
668
- "type": "PLAN",
669
- "subtype": "HAND_DRAWN_PLAN",
670
- "code": "HAND_DRAWN_PLAN",
671
- "label": "Un plan fait moi-même"
672
- },
673
- {
674
- "type": "PLAN",
675
- "subtype": "ARCHITECT_PLAN",
676
- "code": "ARCHITECT_PLAN",
677
- "label": "Un plan d’architecte"
678
- },
679
- {
680
- "type": "PLAN",
681
- "subtype": "KITCHEN_DESIGNER_PLAN",
682
- "code": "KITCHEN_DESIGNER_PLAN",
683
- "label": "Un plan d’un autre cuisiniste"
684
- }
685
- ]
669
+ "defaultMediaType": {
670
+ "type": "PLAN",
671
+ "subtype": "ANY"
672
+ }
686
673
  }
687
674
  }
688
675
  }
@@ -804,21 +791,24 @@
804
791
  "viewModel": {
805
792
  "title": "Ex : Une photo avec du recul",
806
793
  "text": "Pour une bonne vue d’ensemble",
807
- "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-overview.jpg"
794
+ "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-overview.jpg",
795
+ "flattened": true
808
796
  }
809
797
  },
810
798
  "2": {
811
799
  "viewModel": {
812
800
  "title": "Ex : Les contraintes particulières",
813
801
  "text": "A prendre en compte pour le plan",
814
- "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-constraints.jpg"
802
+ "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-constraints.jpg",
803
+ "flattened": true
815
804
  }
816
805
  },
817
806
  "3": {
818
807
  "viewModel": {
819
808
  "title": "Ex : Les ouvertures sur d’autres pièces",
820
809
  "text": "Un salon, séjour, salle à manger...",
821
- "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-opening.jpg"
810
+ "image": "https://storage.googleapis.com/project-booster-media/vad/plans/picture-opening.jpg",
811
+ "flattened": true
822
812
  }
823
813
  }
824
814
  }
@@ -830,7 +820,6 @@
830
820
  "component": "PbUploadDocument",
831
821
  "payload": {
832
822
  "viewModel": {
833
- "startOpened": true,
834
823
  "label": "Les photos de votre cuisine",
835
824
  "addTitle": "Ajouter une photo",
836
825
  "addText": " ",
@@ -1021,7 +1010,7 @@
1021
1010
  "payload": {
1022
1011
  "code": "__END__",
1023
1012
  "viewModel": {
1024
- "title": "À présent, trouvons un créneau ensemble !",
1013
+ "title": "Les informations de votre projet ont été mises à jour",
1025
1014
  "icon": "https://storage.googleapis.com/project-booster-media/vad/fin-de-parcours/check_80.svg",
1026
1015
  "description": [
1027
1016
  {
@@ -87,10 +87,16 @@ export const configurationsListStoreOptions = {
87
87
 
88
88
  actions: {
89
89
  async refreshConfigurations({ dispatch, state }: ConfigurationsContext) {
90
- dispatch('loadConfigurations', state.currentProjectId);
90
+ dispatch('loadConfigurations', {
91
+ projectId: state.currentProjectId,
92
+ forceNoPriceUpdate: state.forceNoPriceUpdate,
93
+ });
91
94
  },
92
95
 
93
- async loadConfigurations({ commit, state }: ConfigurationsContext, projectId: string) {
96
+ async loadConfigurations(
97
+ { commit, state }: ConfigurationsContext,
98
+ { projectId, forceNoPriceUpdate = false }: { projectId: string; forceNoPriceUpdate: boolean },
99
+ ) {
94
100
  commit('setIsDisplayed', true);
95
101
 
96
102
  if (!state.isLoadingConfigurations && projectId) {
@@ -98,6 +104,7 @@ export const configurationsListStoreOptions = {
98
104
  commit('setIsLoadingConfigurations', true);
99
105
  commit('setConfigurations', []);
100
106
  commit('setConfigurationsLoadError', null);
107
+ commit('setForceNoPriceUpdate', forceNoPriceUpdate);
101
108
 
102
109
  try {
103
110
  const configurations = await getAllProjectConfigurations(projectId, state.forceNoPriceUpdate);
@@ -177,7 +184,10 @@ export const configurationsImportStoreOptions = {
177
184
  try {
178
185
  await linkConfiguration(state.configurationToImport.simulationId, state.currentProjectId);
179
186
  commit('setConfigurationImportSuccess', true);
180
- dispatch('loadConfigurations', state.currentProjectId);
187
+ dispatch('loadConfigurations', {
188
+ projectId: state.currentProjectId,
189
+ forceNoPriceUpdate: state.forceNoPriceUpdate,
190
+ });
181
191
 
182
192
  setTimeout(() => {
183
193
  commit('setConfigurationImportSuccess', false);