From a567fab4fbc31d5c6a60a295b890851d14b457a0 Mon Sep 17 00:00:00 2001 From: cherif Date: Wed, 15 Nov 2023 12:39:11 +0100 Subject: [PATCH] 15/11/2023 - 12h --- src/components/DisplayPartnerSession.js | 222 +++++++++++++++++++++++- 1 file changed, 216 insertions(+), 6 deletions(-) diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 52251d2..b89bb72 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -2722,6 +2722,11 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair form.append("code_session", code_session); + form.append("titre", p_detail_titre); + form.append("location_type", p_detail_location_type); + form.append("is_bpf", p_detail_is_bpf); + + form.append("formateur_id", p_formateur_id); form.append("date_debut_inscription", format(SessionstartDateInscription, 'dd/MM/yyyy kk:mm:ss')); @@ -2940,6 +2945,14 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair //form.append("formateur", p_one_formateur); form.append("formateur_id", p_one_formateur_id); + + form.append("titre", p_one_titre); + form.append("location_type", p_one_location_type); + form.append("is_bpf", p_one_is_bpf); + + + + form.append("session_status", p_one_session_status); form.append("date_debut_inscription", format(one_SessionstartDateInscription, 'dd/MM/yyyy kk:mm:ss')); form.append("date_fin_inscription", format(one_SessionendDateInscription, 'dd/MM/yyyy kk:mm:ss')); @@ -3253,10 +3266,25 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair if (mylocaltraining.lms_class_code) { - setis_lms_class_code(mylocaltraining.lms_class_code); } + if (mylocaltraining.lms_class_code) { + setis_lms_class_code(mylocaltraining.lms_class_code); + } + + if (mylocaltraining.titre) { + setp_detail_titre(mylocaltraining.titre); + } + + if (mylocaltraining.location_type) { + setp_detail_location_type(mylocaltraining.location_type); + } + + if (mylocaltraining.is_bpf) { + setp_detail_is_bpf(mylocaltraining.is_bpf); + } + document.getElementsByName("code_postal")[0].value = ""; if (mylocaltraining.code_postal) setp_code_postal(mylocaltraining.code_postal); @@ -3380,8 +3408,9 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair const [p_one_session_status_label, setp_one_session_status_label] = useState(); const [p_one_session_etape, setp_one_session_etape] = useState(); const [p_one_session_etape_label, setp_one_session_etape_label] = useState(); - - + const [p_one_titre, setp_one_titre] = useState(""); + const [p_one_location_type, setp_one_location_type] = useState(""); + const [p_one_is_bpf, setp_one_is_bpf] = useState(""); function annuleSessionUpdate() { clearSessionFields(); @@ -4941,6 +4970,9 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair const [p_detail_opco, setp_detail_opco] = useState(); const [p_detail_client_rattachement_nom, setp_detail_client_rattachement_nom] = useState(); const [p_detail_client_rattachement_id, setp_detail_client_rattachement_id] = useState(); + const [p_detail_titre, setp_detail_titre] = useState(); + const [p_detail_location_type, setp_detail_location_type] = useState(); + const [p_detail_is_bpf, setp_detail_is_bpf] = useState(); const [Dialog_1_message, setDialog_1_message] = React.useState(false); @@ -5320,17 +5352,17 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair setLoading(false); if (String(res.data.status) === String("true")) { - + setGet_Class_Data_api("true"); setGet_Class_Data_message(res.data.message); if (JSON.parse(res.data.message).price) { setp_one_prix_session(String(JSON.parse(res.data.message).price)); - + } if (JSON.parse(res.data.message).formateur_id) { - + setp_one_formateur_id(JSON.parse(res.data.message).formateur_id); } @@ -6282,6 +6314,118 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair /> +
Titre Session
+ setp_detail_titre(e.target.value)} + + /> +
+ + {edit_session_form &&
Emplacement
+ setp_detail_location_type(e.target.value)} + + > + Intra    + Extra   + Autre   + +
} + + + {!edit_session_form &&
Emplacement
+ { + if (String(p_detail_location_type) === "intra") + return "Intra" + else if (String(p_detail_location_type) === "extra") + return "Extra" + else + return "Autre" + }} + + /> +
} + + + {edit_session_form &&
Inclue au BPF
+ setp_detail_is_bpf(e.target.value)} + + > + Oui    + Non   + +
} + + {!edit_session_form &&
Inclue au BPF
+ { + if (String(p_detail_is_bpf) === "1") + return "Oui" + else + return "Non" + }} + + /> + +
} + + {edit_session_form &&
Session à la demande*
+
Titre Session
+ setp_one_titre(e.target.value)} + + /> +
+ +
Emplacement
+ setp_one_location_type(e.target.value)} + + > + Intra   + Extra   + Autre   + +
+ + + + +
Inclue au BPF
+ setp_one_is_bpf(e.target.value)} + + > + Oui    + Non   + +
+ + +
Session à la demande*