From 417dac1f03664891e4bf7887ce65f03a8529bf06 Mon Sep 17 00:00:00 2001 From: cherif Date: Fri, 20 Oct 2023 18:52:40 +0200 Subject: [PATCH] ss --- src/components/AddClassManual.js | 8 +-- src/components/DisplayPartnerSession.js | 52 +++++++++++++++---- .../DisplayPartnerTrainingsPagination.js | 14 ++--- src/components/Formation.js | 50 ++++++++++++++---- src/components/Inscription_Information.js | 2 +- 5 files changed, 95 insertions(+), 31 deletions(-) diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index 71a22a1..321325e 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -1392,8 +1392,8 @@ const AddClassManual = (props) => { className="disabled_style" > {support_training_list.map((option) => ( - - {option.label}  
+ + {option.label}   ))} @@ -1415,7 +1415,7 @@ const AddClassManual = (props) => { value={mytrainingdomaine} > {Get_List_Domaines_result && Get_List_Domaines_result.map((option) => ( - + {option}  
))} @@ -1437,7 +1437,7 @@ const AddClassManual = (props) => { value={mytrainingmetier} > {Get_List_Metiers_result && Get_List_Metiers_result.map((option) => ( - + {option}  
))} diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 7aeb205..243a9d3 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -1430,10 +1430,11 @@ const DisplayPartnerSession = (props) => { var myurl = process.env.REACT_APP_API_URL + "myclass/api/AddStagiairetoClass/"; - + setLoading(true); axios.post(myurl, form).then(res => { + setLoading(false); //console.log(" In One_Create_Participant res.data.status = " + res.data.status); //console.log(" In One_Create_Participant res.data.message r_class = " + res.data.message); @@ -1441,13 +1442,15 @@ const DisplayPartnerSession = (props) => { setOne_Create_Participant_api("true"); setOne_Create_Participant_result(res.data.message); - alert(" Le participant a été correctement ajouté"); + setaddOneParticipant("0"); //setreduction_session("1"); GetListePreinscrit(selected_session_id, selected_internal_url); GetListeInscrit(selected_session_id, selected_internal_url); submenu_inscrit(); + One_clearParticipantFields(); + alert(" Le participant a été correctement ajouté"); } else if (String(res.data.status) === String("Err_Connexion")) { alert('Erreur: ' + res.data.message); @@ -1459,7 +1462,7 @@ const DisplayPartnerSession = (props) => { } }).catch((error) => { - + setLoading(false); console.warn('One_Create_Participant : Not good man :( = ' + error); setOne_Create_Participant_api("false"); @@ -1498,6 +1501,7 @@ const DisplayPartnerSession = (props) => { } function One_annuleAdd_Participant() { + One_clearParticipantFields(); setaddOneParticipant("0"); var myelement; @@ -2285,6 +2289,36 @@ const DisplayPartnerSession = (props) => { setp_one_session_etape_label(); + } + + + function One_clearParticipantFields() { + + if (document.getElementsByName("one_nom_part")[0]) + document.getElementsByName("one_nom_part")[0].value = ""; + + if (document.getElementsByName("one_prenom_part")[0]) + document.getElementsByName("one_prenom_part")[0].value = ""; + + if (document.getElementsByName("one_email_part")[0]) + document.getElementsByName("one_email_part")[0].value = ""; + + if (document.getElementsByName("one_phone_part")[0]) + document.getElementsByName("one_phone_part")[0].value = ""; + + if (document.getElementsByName("one_status_part")[0]) + document.getElementsByName("one_status_part")[0].value = ""; + + + + setp_one_nom_part(); + setp_one_prenom_part(); + setp_one_email_part(); + setp_one_phone_part(); + setp_one_status_part(); + + + } const [is_lms_class_code, setis_lms_class_code] = useState(); @@ -4807,7 +4841,7 @@ const DisplayPartnerSession = (props) => { //console.log(" actionmass_ftion_val = ", actionmass_ftion_val); if (String(actionmass_ftion_val) === String("supprimer")) { - + console.log(" ### liste session : ", liste_session) Delete_LIST_Session_Formation(liste_session); @@ -5012,7 +5046,7 @@ const DisplayPartnerSession = (props) => { Code Session    Code Formation (code externe)   - Titre Formation   + Titre Formation   @@ -5065,7 +5099,7 @@ const DisplayPartnerSession = (props) => { {
-
@@ -5288,7 +5322,7 @@ const DisplayPartnerSession = (props) => {
- + {selectionModel && selectionModel.length > 1 &&
  @@ -5310,7 +5344,7 @@ const DisplayPartnerSession = (props) => { - + {actionmass_ftion_val &&