From 2dd88ca4fa11d6d5c390951954fed13e680a0b37 Mon Sep 17 00:00:00 2001 From: sgravina Date: Mon, 18 Nov 2024 19:14:17 +0100 Subject: [PATCH] fix(T254): fix q1 20241118 --- .../Entities/Surveys/printSurvey/printSurvey.tsx | 2 +- fe-piattaforma/src/utils/jsonFormHelper.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fe-piattaforma/src/pages/administrator/AdministrativeArea/Entities/Surveys/printSurvey/printSurvey.tsx b/fe-piattaforma/src/pages/administrator/AdministrativeArea/Entities/Surveys/printSurvey/printSurvey.tsx index fa09b63e8..bc360ade6 100644 --- a/fe-piattaforma/src/pages/administrator/AdministrativeArea/Entities/Surveys/printSurvey/printSurvey.tsx +++ b/fe-piattaforma/src/pages/administrator/AdministrativeArea/Entities/Surveys/printSurvey/printSurvey.tsx @@ -65,7 +65,7 @@ const PrintSurvey: React.FC = () => { section: PrintSuveySectionI ) => { //18/09/2024 NASCOSTE SEZIONI FASCIA DI ETA' E GENERE DA STAMPA PER ADEGUAMENTO - if (!(['5', '6'].includes(question.id as string))){ + if (!(['2','3','4','5', '6'].includes(question.id as string))){ if (question.id === '9') { const didascalia = (scrivere la Provincia per esteso); diff --git a/fe-piattaforma/src/utils/jsonFormHelper.ts b/fe-piattaforma/src/utils/jsonFormHelper.ts index 6c17b7364..e912fc30a 100644 --- a/fe-piattaforma/src/utils/jsonFormHelper.ts +++ b/fe-piattaforma/src/utils/jsonFormHelper.ts @@ -285,13 +285,15 @@ const getSchemaRequired = ( } }; +const KEY_BE_TO_EXCLUDE = ["codiceFiscaleNonDisponibile","tipoDocumento","numeroDocumento"] + export const generateForm: (schema: SchemaI, compile?: boolean) => FormI = ( schema, compile = false ) => { if (Object.keys(schema)?.length) return newForm( - Object.keys(schema.properties).map((field) => + Object.keys(schema.properties).filter((field) => !KEY_BE_TO_EXCLUDE.includes(schema.properties[field].keyBE || "")).map((field) => newFormField({ ...getTypeReverse(schema.properties[field]), field,