From 3b779c4563fa4074676631809b4165ce24172472 Mon Sep 17 00:00:00 2001 From: cherif Date: Wed, 10 Apr 2024 11:49:20 +0200 Subject: [PATCH] 10/04/2024 - 11h50 --- src/components/SurveyDocument.js | 35 +++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/components/SurveyDocument.js b/src/components/SurveyDocument.js index a12ec10..600e806 100644 --- a/src/components/SurveyDocument.js +++ b/src/components/SurveyDocument.js @@ -227,11 +227,11 @@ function SurveyDocument() { const [selected_qcm_value, setselected_qcm_value] = React.useState(''); const handleChange_qcm = (event) => { - console.log(" event.target.name ", event.target.name); + document.getElementsByName(event.target.name)[0].value = event.target.value; - // setselected_qcm_value(event.target.value); + // setselected_qcm_value(event.target.value); change_survey_data(event.target); }; @@ -263,7 +263,7 @@ function SurveyDocument() { console.log(" ### sortir settab_variable = ", tab_variable); - } + } else { console.log('not checked'); @@ -272,11 +272,7 @@ function SurveyDocument() { } else { - - console.log(" PASSS première action "); - - console.log(" Suppression de ", String(tab[1])); var new_variable = [] for (let i = 0; i < tmp_variable[al].length; i++) { @@ -288,16 +284,15 @@ function SurveyDocument() { tmp_variable[al] = new_variable; - console.log(" tmp_variable ", tmp_variable); + settab_variable(tmp_variable); - console.log(" ### sortir settab_variable = ", tab_variable); + } } - console.log(" ### FINNNNNN settab_variable = ", tab_variable); }; @@ -323,12 +318,28 @@ function SurveyDocument() {

- {JSON.parse(get_Given_Survey_Data_result).message_introduction} + Bonjour {JSON.parse(get_Given_Survey_Data_result).prenom}   {JSON.parse(get_Given_Survey_Data_result).nom} + +
-
+ {String(JSON.parse(get_Given_Survey_Data_result).survey_type) === "pos" &&
+ Questionnaire de positionnement +
} + + + {String(JSON.parse(get_Given_Survey_Data_result).survey_type) === "hot_eval" &&
+ Questionnaire d'évaluation +
} + + {String(JSON.parse(get_Given_Survey_Data_result).survey_type) === "cool_eval" &&
+ Questionnaire d'évaluation +
} +
Formation : {JSON.parse(get_Given_Survey_Data_result).class_title}
Code Session : {JSON.parse(get_Given_Survey_Data_result).session_code}