project-booster-vue 9.19.3 → 9.19.4

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.4",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -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;