From 9a66a54a22d932b84e58ee7d04dcce534e7a4c32 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Tue, 10 Dec 2024 16:33:37 +0100 Subject: [PATCH] - fixed bug in evaluation page - related to null in fieldValue that was not accounted for; --- src/pages/DomandaEditPreInstructor/index.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index f9b5d75..4660a96 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -266,9 +266,11 @@ const DomandaEditPreInstructor = () => { switch (item.fieldName) { case 'fileupload' : content = ; break; case 'table' : @@ -280,9 +282,11 @@ const DomandaEditPreInstructor = () => { - {item.fieldValue.map((o, i) => - {Object.values(o).map(v => {v})} - )} + {item.fieldValue + ? item.fieldValue.map((o, i) => + {Object.values(o).map(v => {v})} + ) + : null} ; break; @@ -424,7 +428,7 @@ const DomandaEditPreInstructor = () => { const doCreateAppointmentRequest = () => { if ( !isEmpty(appointmentData.title) && !isEmpty(appointmentData.text) && !isEmpty(appointmentData.amount) - && !isEmpty(appointmentData.duration) && appointmentData.duration !== 0 && appointmentData.amount !== 0 + && !isEmpty(appointmentData.duration) && appointmentData.duration !== 0 && appointmentData.amount !== 0 ) { console.log(appointmentData); } @@ -528,7 +532,7 @@ const DomandaEditPreInstructor = () => {

{__('Scarica documenti della domanda', 'gepafin')}

- +