07/04/23 - 11h11

recette2
cherif 2023-04-07 11:12:02 +02:00
parent 88b55d55c5
commit 548e9521c1
1 changed files with 122 additions and 97 deletions

View File

@ -1150,7 +1150,7 @@ function GestionAdministrative(props) {
const [selectedsession_date_du, setselectedsession_date_du] = useState(new Date());
const [selectedsession_date_au, setselectedsession_date_au] = useState(new Date());
function handleChangeSession(event) {
setreduction_session("0");
setsessionChanged(false);
clearSessionFields();
setselectedCertif();
@ -1158,6 +1158,13 @@ function GestionAdministrative(props) {
setdisplay_detail_insc();
setCreateSessionFormation_api();
setSendInscriptionConfirmation_api();
setreduction_session("0");
console.log(" reduction_session = ", reduction_session);
/*
if (String(reduction_session) === "1")
setreduction_session("0");
*/
var tab_date = [];
@ -1435,10 +1442,13 @@ function GestionAdministrative(props) {
axios.post(myurl, form).then(res => {
if (res.data.status != "false") {
if (String(res.data.status) === "true") {
//console.log(" In GetCurrentSession res.data.status = " + res.data.status);
//console.log(" In GetCurrentSession res.data.message r_class = " + res.data.message);
//console.log(" In GetCurrentSession res.data.message len = " + String(res.data.message).length);
setGetCurrentSession_api("true");
if (String(res.data.message).length > 0) {
setGetCurrentSession_result(res.data.message);
var mylocaltraining = JSON.parse(res.data.message);
@ -1529,7 +1539,7 @@ function GestionAdministrative(props) {
else if (String(mylocaltraining.session_status) === "false")
setsessionStatus(false);
}
}
else {
setGetCurrentSession_api("false");
@ -1734,16 +1744,31 @@ function GestionAdministrative(props) {
document.getElementsByName("code_session")[0].value = "";
document.getElementsByName("sessiondatedebut")[0].value = "";
document.getElementsByName("sessiondatefin")[0].value = "";
if (document.getElementsByName("adresse")[0])
document.getElementsByName("adresse")[0].value = "";
if (document.getElementsByName("code_postal")[0])
document.getElementsByName("code_postal")[0].value = "";
if (document.getElementsByName("ville")[0])
document.getElementsByName("ville")[0].value = "";
if (document.getElementsByName("nb_participant")[0])
document.getElementsByName("nb_participant")[0].value = "";
if (document.getElementsByName("prix_session")[0])
document.getElementsByName("prix_session")[0].value = "";
if (document.getElementsByName("presentiel")[0])
document.getElementsByName("presentiel")[0].value = "";
if (document.getElementsByName("distantiel")[0])
document.getElementsByName("distantiel")[0].value = "";
if (document.getElementsByName("sessiondatedebutinscription")[0])
document.getElementsByName("sessiondatedebutinscription")[0].value = "";
if (document.getElementsByName("sessiondatefininscription")[0])
document.getElementsByName("sessiondatefininscription")[0].value = "";
setSessionstartDateInscription();