From 31af9a977741aeb69ff65b576fad2610e5ef76e1 Mon Sep 17 00:00:00 2001 From: Cherif Date: Thu, 9 Jul 2026 21:16:39 +0200 Subject: [PATCH] 09/07/26 - 20h --- src/App.js | 14 +- src/components/Apprenant.js | 71 +- src/components/DisplayPartnerSession.js | 50 +- .../DisplayPartnerTrainingsPagination.js | 6 +- .../DisplayPartnerTrainingsPagination_FI.js | 6 +- .../ENT_Student_Header.jsx | 7 +- src/components/Inscription_Information.js | 306 +- ...on_Partner_Catalog_Special_JMJFormation.js | 2 +- src/components/Module_Atelier_Catalogue.js | 366 ++- .../Module_Connexion_Ent_Student_V2.js | 2 +- src/components/Mon_Catalogue_Public.js | 6 +- src/components/UpdateUserInfo.js | 366 ++- .../new_detail_formation_2025.js | 4 +- .../new_inscription_detail_formation_2025.js | 2829 +++++++++++++++++ ...new_p_inscription_detail_formation_2025.js | 29 + 15 files changed, 3596 insertions(+), 468 deletions(-) create mode 100644 src/components/detail_formation_automatic_files/new_inscription_detail_formation_2025.js create mode 100644 src/pages/new_p_inscription_detail_formation_2025.js diff --git a/src/App.js b/src/App.js index ed9d281..75f057c 100644 --- a/src/App.js +++ b/src/App.js @@ -94,6 +94,10 @@ function App() { const New_A_Propos_2025 = lazy(() => import("./pages/new_p_a_propos_2025")); const New_Fonctionnalite_2025 = lazy(() => import("./pages/new_p_fonctionnalite_2025")); const New_Formation_Detail_2025 = lazy(() => import("./pages/new_p_detail_formation_2025")); + + const New_Inscription_Formation_Detail_2025 = lazy(() => import("./pages/new_p_inscription_detail_formation_2025")); + + const New_Article_Detail_2025 = lazy(() => import("./pages/new_p_article_detail_2025")); const New_Article_Support_2025 = lazy(() => import("./pages/new_p_article_help_detail_2025")); @@ -104,6 +108,7 @@ function App() { const New_Sign_In_2025 = lazy(() => import("./pages/new_p_sign_in_2025")); const Student_Account_Ent = lazy(() => import("./pages/student_account_ent")); + const Intranet_Client_Account = lazy(() => import("./pages/intranet_client_account")); @@ -122,7 +127,7 @@ function App() { const MySyIA = lazy(() => import("./pages/iamysy")); const AutomaticQuotation = lazy(() => import("./pages/automaticquotation")); - const Automatic_Absence_Action = lazy(() => import("./pages/Absence_Action_From_Mail")); + const Automatic_Absence_Action = lazy(() => import("./pages/Absence_Action_From_Mail")); const Emarge_QR_Code = lazy(() => import("./pages/emarge_qr_code")); @@ -385,6 +390,9 @@ function App() { + {/** Inscription directe zzz */} + + @@ -397,6 +405,10 @@ function App() { + + + + {/* Fin Migration */} diff --git a/src/components/Apprenant.js b/src/components/Apprenant.js index c8d287d..a4aa89c 100644 --- a/src/components/Apprenant.js +++ b/src/components/Apprenant.js @@ -950,7 +950,7 @@ const Apprenant = (props) => { if (mylocaltraining.date_naissance) { setp_detail_naissance(mylocaltraining.date_naissance); } else { - setp_detail_naissance(""); + setp_detail_naissance("01/01/1900"); } if (mylocaltraining.nom) { @@ -8099,40 +8099,7 @@ const Apprenant = (props) => { }
Type apprenant - {/* { - if (value && value.id) { - setp_dialog_type_apprenant(value.id); - - } - - }} - - renderInput={(params) => - } - />*/} + {New_Get_List_Type_Apprenant_result && New_Get_List_Type_Apprenant_result.length > 0 && {
Mode Financement - {/* { - if (value && value.value) { - setp_dialog_financement(value.value); - } - - }} - - renderInput={(params) => - } - />*/} + {New_Get_List_Mode_Financement_result && New_Get_List_Mode_Financement_result.length > 0 && { const options_menu_vertical_promotion = [ 'Décaler', 'Archiver/Désarch.', + 'Copie Url', 'Supprimer', ]; @@ -647,6 +648,10 @@ const DisplayPartnerSession = (props) => { Get_Session_Nb_Sequence_Ftion(); setDialog_Session_Decalage(true); } + + else if (option && String(option) === "Copie Url") { + handleCopy_url_session(working_cellValues_promo.row._id, working_cellValues_promo.row.class_internal_url); + } }} > {option} @@ -810,6 +815,31 @@ const DisplayPartnerSession = (props) => { }, ] + const [copied_session_url, setcopied_session_url] = useState(false); + + const handleCopy_url_session = async (local_session_id, local_url_id) => { + try { + const url = process.env.REACT_APP_FRONT_URL + "inscription-detail-formation/" + local_url_id + "/" + local_session_id; + + await navigator.clipboard.writeText(url); + setcopied_session_url(true); + + setTimeout(() => { + setcopied_session_url(false); + }, 2000); + } catch (error) { + // console.error("Erreur lors de la copie :", error); + setdisplay_alert_mysy("1"); + setalert_message("Impossible de copier l’URL dans le presse-papiers"); + setalert_type("error"); + return; + } + + setdisplay_alert_mysy("1"); + setalert_message("Lien copié dans le presse-papiers"); + setalert_type("success"); + }; + const [session_debut_for_decalage, setsession_debut_for_decalage] = React.useState(''); const [session_fin_for_decalage, setsession_fin_for_decalage] = React.useState(''); @@ -3749,7 +3779,7 @@ const DisplayPartnerSession = (props) => { setLoading(true); axios.post(myurl, form).then(res => { //console.log(" In Get_Conflit_On_Inscription res.data.status = " + res.data.status); - // console.log(" In Get_Conflit_On_Inscription res.data.message r_class = " + res.data.message); + // console.log(" In Get_Conflit_On_Inscription res.data.message r_class = " + res.data.message); setLoading(false); if (String(res.data.status) === String("true")) { @@ -3769,7 +3799,7 @@ const DisplayPartnerSession = (props) => { setDialog_List_Conflit_Inscription(true); - + @@ -16670,8 +16700,8 @@ const DisplayPartnerSession = (props) => { fontWeight: 700, color: "#104277", borderBottom: "1px solid #eef2f6", - maxWidth:'unset', - width:'60rem' + maxWidth: 'unset', + width: '60rem' }} > Conflits d’inscription @@ -16697,7 +16727,7 @@ const DisplayPartnerSession = (props) => { }} >
- +
{ > {New_Get_Conflit_On_Inscription_result.map((conflit) => (
{ }} > {String(JSON.parse(conflit).apprenant_nom)}{" "} {String(JSON.parse(conflit).apprenant_prenom)} - +
- - + +
- +
{ history.push("/Connexion"); } if (String(result['status']) === String("true")) { - // On ne visualise que les formations publiées - if (cellValues.row.published !== "1") { - alert(" Vous devez publier la formation pour la visualiser "); - return; - } + window.open( "/Display-Detail-formation/" + cellValues.row.internal_url, '_blank' diff --git a/src/components/DisplayPartnerTrainingsPagination_FI.js b/src/components/DisplayPartnerTrainingsPagination_FI.js index 28b0455..c7c1520 100644 --- a/src/components/DisplayPartnerTrainingsPagination_FI.js +++ b/src/components/DisplayPartnerTrainingsPagination_FI.js @@ -1427,11 +1427,7 @@ const DistplayPartnerTraningsPage_FI = (props) => { history.push("/Connexion"); } if (String(result['status']) === String("true")) { - // On ne visualise que les formations publiées - if (cellValues.row.published !== "1") { - alert(" Vous devez publier la formation pour la visualiser "); - return; - } + window.open( "/Display-Detail-formation/" + cellValues.row.internal_url, '_blank' diff --git a/src/components/ENT_Student_header_automatic_files/ENT_Student_Header.jsx b/src/components/ENT_Student_header_automatic_files/ENT_Student_Header.jsx index adae833..98fd7f7 100644 --- a/src/components/ENT_Student_header_automatic_files/ENT_Student_Header.jsx +++ b/src/components/ENT_Student_header_automatic_files/ENT_Student_Header.jsx @@ -426,11 +426,16 @@ const ENT_Student_Header = () => {
+
- {String(someoneconnected) === String("1") && + {(!stored_tuteur_id || stored_tuteur_id.length < 5) && String(someoneconnected) === String("1") && Mon compte } + {stored_tuteur_id && stored_tuteur_id.length > 5 && + Tuteur Compte {stored_tuteur_id} + } +
diff --git a/src/components/Inscription_Information.js b/src/components/Inscription_Information.js index 93da1c7..4bec486 100644 --- a/src/components/Inscription_Information.js +++ b/src/components/Inscription_Information.js @@ -219,9 +219,9 @@ function Inscription_Information(props) { formData.append('prenom', prenom); formData.append('telephone', telephone); formData.append('email', email); - + formData.append('modefinancement', modefinancement); - + formData.append('opco', opco); formData.append('session_id', session); formData.append('class_internal_url', props.internal_url); @@ -462,6 +462,9 @@ function Inscription_Information(props) { useEffect(() => { + if (props.selected_session_id) { + setmysession(props.selected_session_id); + } //Get_Partner_Object_Specific_Fields("inscription"); @@ -1171,37 +1174,47 @@ function Inscription_Information(props) {
Je m'inscris
-
- Choisir une session   -
+ {!props.selected_session_id && + <> +
+ Choisir une session   +
-
+
- {New_GetCurrentClass_result && New_GetCurrentClass_result.length > 0 && - (data).label === String(p_client_invoice_paiement_condition_code))[0].label} - options={New_GetCurrentClass_result} - className="disabled_style" - onChange={(event, value) => { - if (value && value._id) { - setmysession(value._id) - } + {New_GetCurrentClass_result && New_GetCurrentClass_result.length > 0 && + (data).label === String(p_client_invoice_paiement_condition_code))[0].label} + options={New_GetCurrentClass_result} + className="disabled_style" + onChange={(event, value) => { + if (value && value._id) { + setmysession(value._id) + } - }} + }} - renderInput={(params) => - } - />} + /> + } + />} -
+
+ } + + {props.selected_session_id && String(props.selected_session_id).length > 3 && + New_GetCurrentClass_result && New_GetCurrentClass_result.length > 0 && +
+ {New_GetCurrentClass_result.filter((data) => (data)._id === String(props.selected_session_id))[0].label} + +
}
@@ -1365,198 +1378,9 @@ function Inscription_Information(props) { {mysession && :not(style)': { m: 1 }, width: '100%', }}>   - {/*<> - { - - if (value && value.value) { - setcivilite_stagiaire(value.value); - } - - }} - renderInput={(params) => - - - } - - /> - - - - - - - ), - }} - variant="standard" - value={leads_nom} - onChange={(e) => { - setleads_nom(e.target.value); - }} - /> - - - - - ), - }} - variant="standard" - value={leads_prenom} - onChange={(e) => { - setleads_prenom(e.target.value); - }} - /> - - - - - ), - }} - variant="standard" - value={leads_email} - onChange={(e) => { - setleads_email(e.target.value); - }} - /> - - - - - ), - }} - variant="standard" - value={leads_phone} - onChange={(e) => { - setleads_phone(e.target.value); - }} - /> - - - - - ), - }} - variant="standard" - value={leads_employeur} - onChange={(e) => { - setleads_employeur(e.target.value); - }} - /> - - {/* -- début champs specifiques ** /} - -
- - {rows_champs_specifics && - rows_champs_specifics.filter((spec_field) => JSON.parse(spec_field).is_public === "1").map((champ_spec) => ( - -
- {String(JSON.parse(champ_spec).field_type) === "float" && - - - ), - }} - variant="standard" - />} - - {String(JSON.parse(champ_spec).field_type) === "string" && - - - ), - }} - variant="standard" - />} - - -
- - - ))} - -
- -
- {/* -- end champs specifiques ** /} - - */} - + + {props.mytrainingdirectinscription !== "1" && <>
 
Nous vous aidons à financer la formation
@@ -1641,19 +1465,19 @@ function Inscription_Information(props) { }} renderInput={(params) => @@ -1866,19 +1690,19 @@ function Inscription_Information(props) { }} renderInput={(params) => diff --git a/src/components/Jmj_Theme/Formation_Partner_Catalog_Special_JMJFormation.js b/src/components/Jmj_Theme/Formation_Partner_Catalog_Special_JMJFormation.js index d45e480..2f26389 100644 --- a/src/components/Jmj_Theme/Formation_Partner_Catalog_Special_JMJFormation.js +++ b/src/components/Jmj_Theme/Formation_Partner_Catalog_Special_JMJFormation.js @@ -73,7 +73,7 @@ const Formation_Partner_Catalog_Special_JMJFormation = (props) => { } - } + } const [myclassimage, setmyclassimage] = useState(); const [isclassimage, setisclassimage] = useState("False"); diff --git a/src/components/Module_Atelier_Catalogue.js b/src/components/Module_Atelier_Catalogue.js index 911cf1c..683cc71 100644 --- a/src/components/Module_Atelier_Catalogue.js +++ b/src/components/Module_Atelier_Catalogue.js @@ -368,7 +368,8 @@ export default function Module_Atelier_Catalogue(props) {
- + + {formation.class_img && String(formation.class_img).length > 50 && } @@ -476,7 +477,12 @@ export default function Module_Atelier_Catalogue(props) { setDialog_add_inscription_open(true); init_inscrit_info(); setselected_session_id(atelier._id); - setselected_session_code(atelier.code_session) + setselected_session_code(atelier.code_session); + + setselected_class_id(formation._id); + setselected_class_internal_url(formation.internal_url); + setselected_class_price(formation.price); + }}>Inscription
))} @@ -488,7 +494,6 @@ export default function Module_Atelier_Catalogue(props) { useEffect(() => { - // console.log(" ### props.formations = ", props.formations) }, []) @@ -506,8 +511,23 @@ export default function Module_Atelier_Catalogue(props) { }; + + const New_civilite = [ + { "id": "mme", "label": "Mme", "value": "mme" }, + { "id": "m", "label": "M", "value": "m" }, + { "id": "neutre", "label": "Neutre", "value": "neutre" }, + ] + + + + const [selected_class_id, setselected_class_id] = useState(""); + const [selected_class_internal_url, setselected_class_internal_url] = useState(""); + const [selected_class_price, setselected_class_price] = useState(""); + + const [selected_session_id, setselected_session_id] = useState(""); const [selected_session_code, setselected_session_code] = useState(""); + const [inscrit_civilite, setinscrit_civilite] = useState(""); const [inscrit_nom, setinscrit_nom] = useState(""); const [inscrit_prenom, setinscrit_prenom] = useState(""); const [inscrit_telephone, setinscrit_telephone] = useState(""); @@ -523,8 +543,221 @@ export default function Module_Atelier_Catalogue(props) { } + const [myclassimage, setmyclassimage] = useState(); + const [isclassimage, setisclassimage] = useState("False"); + const [userimgclassprofil, setuserimgclassprofil] = useState(""); + + const [class_img_stored_in_bdd, setclass_img_stored_in_bdd] = useState(""); + + function getClassImage_no_token() { + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedClassImage_no_token/"; + + var form = new FormData(); + + form.append("type", "partner"); + form.append("related_collection", "myclass"); + form.append("related_collection_recid", props.formation._id); + form.append("class_external_code", props.formation.external_code); + + axios.post(myurl, form).then(res => { + + // console.log(" getClassImage_no_token : In test res.data.status = ", res.data.status); + if (String(res.data.status) === "true") { + + + //console.log(" getClassImage_no_token: res.data.message.img = ", res.data.message); + + if (res.data.message.img.length > 0) { + setisclassimage("True"); + } + else { + setisclassimage("False"); + } + setisclassimage(res.data.message.img); + var ch_img = "data:image/png;base64," + res.data.message.img; + setclass_img_stored_in_bdd(ch_img); + // console.log(" getClassImage_no_token: setclass_img_stored_in_bdd = ", setclass_img_stored_in_bdd); + + } + else { + // console.log(" In Erreur res.data.status = " + res.data.status); + //console.log(" In Erreur res.data.message = " + res.data.message); + setisclassimage("False"); + setuserimgclassprofil(); + setclass_img_stored_in_bdd(); + } + }).catch((error) => { + + console.warn('getClassImage ee: Not good man :( getClassImage = '); + setisclassimage("False"); + setuserimgclassprofil(""); + setclass_img_stored_in_bdd(""); + }) + + } + + + const [RecordData_api, setRecordData_api] = useState(""); + const [RecordData_status, setRecordData_status] = useState(""); + const [RecordData_message, setRecordData_message] = useState(""); + + function RecordData() { + const formData = new FormData(); + const url = process.env.REACT_APP_API_URL + "myclass/api/AddStagiairetoClass_from_marketplace/"; + + var nom = inscrit_nom; + + if (nom.trim().length <= 0) { + setdisplay_alert_mysy("1"); + setalert_message("Le nom est obligatoire"); + setalert_type("error") + + return; + } + + + var civilite = inscrit_civilite + if (String(civilite).trim().length <= 0) { + civilite = "Neutre" + } + + + var prenom = inscrit_prenom; + if (String(prenom).trim().length <= 0) { + setdisplay_alert_mysy("1"); + setalert_message("Le prenom est obligatoire"); + setalert_type("error") + + return; + } + + + + var telephone = inscrit_telephone; + if (String(telephone).trim().length < 10) { + setdisplay_alert_mysy("1"); + setalert_message("Le numero de telephone doit comporter 10 chiffres"); + setalert_type("error") + return; + } + + var email = inscrit_email; + var re2 = /\S+@\S+\.\S+/; + if (re2.test(email) === false) { + setdisplay_alert_mysy("1"); + setalert_message("L'adresse email est incorrect"); + setalert_type("error") + return; + } + + + + var session = selected_session_id; + if (String(nom).trim().length <= 0) { + setdisplay_alert_mysy("1"); + setalert_message("Le nom est obligatoire"); + setalert_type("error") + return; + } + + + // var class_internal_url = document.getElementsByName("adr_country")[0].value; + + formData.append('civilite', civilite); + formData.append('nom', nom); + formData.append('prenom', prenom); + formData.append('telephone', telephone); + formData.append('email', email); + + + formData.append('session_id', session); + formData.append('class_internal_url', selected_class_internal_url); + formData.append('price', props.trainig_price); + + if (props.mytrainingdirectinscription !== "1") { + /* Ceci est une preinscription faite par un end user, depuis le font, donc on force le 'status' à 0 (0 = préinscription)*/ + formData.append('status', '0'); + } + else if (props.mytrainingdirectinscription === "1") { + /* Ceci est une inscription direct faite par un end user, depuis le font, donc on force le 'status' à 1 (1 = Inscription OK)*/ + formData.append('status', '1'); + } + + + + fetch( + url, + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + //console.log('Success:', result['message'], "result['status'] = ", result['status']); + setRecordData_api(result['status']); + setRecordData_status(result['status']); + setRecordData_message(result['message']); + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + if (String(result['status']) === "true") { + init_inscrit_info(); + setdisplay_alert_mysy("1"); + setalert_message("Votre demande d'inscription a bien été prise en compte. Vous allez recevoir une email de confirmation dans votre boite email. Merci."); + setalert_type("success"); + Dialog_add_inscription_handleClose_buton(); + } else { + setdisplay_alert_mysy("1"); + setalert_message(result['message']); + setalert_type("error") + } + + }) + .catch((error) => { + console.error('Error:', error); + setRecordData_api("false"); + setRecordData_status("false"); + setRecordData_message(); + }); + + + }; + + + const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); + const [alert_message, setalert_message] = useState(""); + const [alert_type, setalert_type] = useState(""); + + function clear_alert_message() { + setalert_message(""); + } + function clear_alert_type() { + setalert_type(""); + } + function clear_display_alert_mysy() { + setdisplay_alert_mysy(""); + } + + return (
+ {/*** Affichage des messages d'alerte*/} + {display_alert_mysy && String(display_alert_mysy) === "1" && + + } + {/*** FIN Affichage des messages d'alerte*/} + + + {/*** Dialog pour reinscrire un apprenant à une session */} Inscription Atelier : {selected_session_code} - {selected_session_id} +
Civilité
+ { + if (value && value.value) { + setinscrit_civilite(value.value); + } else { + setinscrit_civilite(""); + } + }} + renderInput={(params) => + } + /> - - - - -
  -
+ + +
+ +
Nom
+ { + setinscrit_nom(e.target.value); + } + } + + /> +
+ + +
Prénom
+ { + setinscrit_prenom(e.target.value); + } + } + + /> +
+ + +
+ + +
+ +
Téléphone
+ { + setinscrit_telephone(e.target.value); + } + } + + /> +
+ + +
Email
+ { + setinscrit_email(e.target.value); + } + } + + /> +
+ + +
+ + + + @@ -581,7 +925,7 @@ export default function Module_Atelier_Catalogue(props) {
- +
diff --git a/src/components/Module_Connexion_Ent_Student_V2.js b/src/components/Module_Connexion_Ent_Student_V2.js index 2cb7c2b..62976a8 100644 --- a/src/components/Module_Connexion_Ent_Student_V2.js +++ b/src/components/Module_Connexion_Ent_Student_V2.js @@ -183,7 +183,7 @@ function Module_Connexion_Ent_Student_V2() { // si c'est une connexion user qui est active if (typeof (stored_user) != "undefined" && String(stored_user) !== String('')) { //alert(" c'est une connexion USERR qui est active"); - Logout_User(); + logout_user_confirmation(); } diff --git a/src/components/Mon_Catalogue_Public.js b/src/components/Mon_Catalogue_Public.js index 138f92b..e5ae972 100644 --- a/src/components/Mon_Catalogue_Public.js +++ b/src/components/Mon_Catalogue_Public.js @@ -2,7 +2,7 @@ import React, { useRef, useState, useMemo, useEffect } from "react"; import { useForm } from "react-hook-form"; import axios from "axios"; import Formation_Partner_Catalog from "./Formation_Partner_Catalog"; -import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa'; +import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa'; import { IoAppsSharp, IoListSharp } from "react-icons/io5"; import Formation_Grid_2Col from "./Formation_Grid_2Col"; @@ -1473,11 +1473,11 @@ const Mon_Catalogue_Public = (props) => { } - // alert("myurl = " + myurl); + // alert("myurl = " + myurl); axios.post(myurl, form).then(res => { if (String(res.data.status) != String("false")) { //console.log(" In test res.data.status = " + res.data.status); - // console.log(" In DisplayXfirstClas res.data.message = " + res.data.message); + //console.log(" In DisplayXfirstClas res.data.message = " + res.data.message); setmyApiResponse("True"); setResult(res.data.message) diff --git a/src/components/UpdateUserInfo.js b/src/components/UpdateUserInfo.js index c6222f5..b26bbef 100644 --- a/src/components/UpdateUserInfo.js +++ b/src/components/UpdateUserInfo.js @@ -140,130 +140,258 @@ function UpdateUserInfo(props) { setp_detail_age(mylocaltraining.age); } - //console.log(" ### current_apprenant_data = ", current_apprenant_data) + console.log(" ### current_apprenant_data = ", current_apprenant_data) + + if (current_apprenant_data.length > 0) { + + setp_detail_civilite("neutre"); + if (current_apprenant_data.civilite) { + setp_detail_civilite(current_apprenant_data.civilite); + } + + setp_detail_nom(""); + if (current_apprenant_data.nom) { + setp_detail_nom(current_apprenant_data.nom); + } + + setp_detail_nom_fille(""); + if (current_apprenant_data.nom_fille) { + setp_detail_nom_fille(current_apprenant_data.nom_fille); + } + + setp_detail_cvec(""); + if (current_apprenant_data.num_cvec) { + setp_detail_cvec(current_apprenant_data.num_cvec); + } + + setp_detail_handicap_detail(false); + if (current_apprenant_data.is_handicap && current_apprenant_data.is_handicap === "1") { + setp_detail_handicap_detail(true); + } + + setp_detail_prenom(""); + if (current_apprenant_data.prenom) { + setp_detail_prenom(current_apprenant_data.prenom); + } + + setp_detail_mail(""); + if (current_apprenant_data.email) { + setp_detail_mail(current_apprenant_data.email); + } + + setp_detail_naissance("01/01/1900"); + if (current_apprenant_data.date_naissance) { + setp_detail_naissance(current_apprenant_data.date_naissance); + } + + setp_detail_tel(""); + if (current_apprenant_data.telephone) { + setp_detail_tel(current_apprenant_data.telephone); + } + + setp_detail_adresse(""); + if (current_apprenant_data.adresse) { + setp_detail_adresse(current_apprenant_data.adresse); + } + + + + + setp_detail_is_rgpd(false); + if (current_apprenant_data.is_rgpd && current_apprenant_data.is_rgpd === "1") { + setp_detail_is_rgpd(true); + } + + setp_detail_is_droit_image(false); + if (current_apprenant_data.is_droit_image && current_apprenant_data.is_droit_image === "1") { + setp_detail_is_droit_image(true); + } + + setp_detail_is_handicap(false); + if (current_apprenant_data.is_handicap && current_apprenant_data.is_handicap === "1") { + setp_detail_is_handicap(true); + } + + + setp_detail_situation_famille(""); + if (current_apprenant_data.situation_famille) { + setp_detail_situation_famille(current_apprenant_data.situation_famille); + } + + + + setp_detail_code_postal(""); + if (current_apprenant_data.code_postal) { + setp_detail_code_postal(current_apprenant_data.code_postal); + } + + setp_detail_ville(""); + if (current_apprenant_data.ville) { + setp_detail_ville(current_apprenant_data.ville); + } + + setp_detail_pays(""); + if (current_apprenant_data.pays) { + setp_detail_pays(current_apprenant_data.pays); + } + + setp_detail_matricule(""); + if (current_apprenant_data.matricule) { + setp_detail_matricule(current_apprenant_data.matricule); + } + + setp_detail_ine(""); + if (current_apprenant_data.ine) { + setp_detail_ine(current_apprenant_data.ine); + } + + setp_detail_num_secu(""); + if (current_apprenant_data.num_secu) { + setp_detail_num_secu(current_apprenant_data.num_secu); + } + + setp_detail_twitter(""); + if (current_apprenant_data.link_twitter) { + setp_detail_twitter(current_apprenant_data.link_twitter); + } + + setp_detail_facebook(""); + if (current_apprenant_data.link_facebook) { + setp_detail_facebook(current_apprenant_data.link_facebook); + } + + setp_detail_linkedin(""); + if (current_apprenant_data.link_linkedin) { + setp_detail_linkedin(current_apprenant_data.link_linkedin); + } - setp_detail_civilite("neutre"); - if (current_apprenant_data.civilite) { - setp_detail_civilite(current_apprenant_data.civilite); } - setp_detail_nom(""); - if (current_apprenant_data.nom) { - setp_detail_nom(current_apprenant_data.nom); + else { + + setp_detail_civilite("neutre"); + if (mylocaltraining.civilite) { + setp_detail_civilite(mylocaltraining.civilite); + } + + setp_detail_nom(""); + if (mylocaltraining.nom) { + setp_detail_nom(mylocaltraining.nom); + } + + setp_detail_nom_fille(""); + if (mylocaltraining.nom_fille) { + setp_detail_nom_fille(mylocaltraining.nom_fille); + } + + setp_detail_cvec(""); + if (mylocaltraining.num_cvec) { + setp_detail_cvec(mylocaltraining.num_cvec); + } + + setp_detail_handicap_detail(false); + if (mylocaltraining.is_handicap && mylocaltraining.is_handicap === "1") { + setp_detail_handicap_detail(true); + } + + setp_detail_prenom(""); + if (mylocaltraining.prenom) { + setp_detail_prenom(mylocaltraining.prenom); + } + + setp_detail_mail(""); + if (mylocaltraining.email) { + setp_detail_mail(mylocaltraining.email); + } + + setp_detail_naissance("01/01/1900"); + if (mylocaltraining.date_naissance) { + setp_detail_naissance(mylocaltraining.date_naissance); + } + + setp_detail_tel(""); + if (mylocaltraining.telephone) { + setp_detail_tel(mylocaltraining.telephone); + } + + setp_detail_adresse(""); + if (mylocaltraining.adresse) { + setp_detail_adresse(mylocaltraining.adresse); + } + + + + + setp_detail_is_rgpd(false); + if (mylocaltraining.is_rgpd && mylocaltraining.is_rgpd === "1") { + setp_detail_is_rgpd(true); + } + + setp_detail_is_droit_image(false); + if (mylocaltraining.is_droit_image && mylocaltraining.is_droit_image === "1") { + setp_detail_is_droit_image(true); + } + + setp_detail_is_handicap(false); + if (mylocaltraining.is_handicap && mylocaltraining.is_handicap === "1") { + setp_detail_is_handicap(true); + } + + + setp_detail_situation_famille(""); + if (mylocaltraining.situation_famille) { + setp_detail_situation_famille(mylocaltraining.situation_famille); + } + + + + setp_detail_code_postal(""); + if (mylocaltraining.code_postal) { + setp_detail_code_postal(mylocaltraining.code_postal); + } + + setp_detail_ville(""); + if (mylocaltraining.ville) { + setp_detail_ville(mylocaltraining.ville); + } + + setp_detail_pays(""); + if (mylocaltraining.pays) { + setp_detail_pays(mylocaltraining.pays); + } + + setp_detail_matricule(""); + if (mylocaltraining.matricule) { + setp_detail_matricule(mylocaltraining.matricule); + } + + setp_detail_ine(""); + if (mylocaltraining.ine) { + setp_detail_ine(mylocaltraining.ine); + } + + setp_detail_num_secu(""); + if (mylocaltraining.num_secu) { + setp_detail_num_secu(mylocaltraining.num_secu); + } + + setp_detail_twitter(""); + if (mylocaltraining.link_twitter) { + setp_detail_twitter(mylocaltraining.link_twitter); + } + + setp_detail_facebook(""); + if (mylocaltraining.link_facebook) { + setp_detail_facebook(mylocaltraining.link_facebook); + } + + setp_detail_linkedin(""); + if (mylocaltraining.link_linkedin) { + setp_detail_linkedin(mylocaltraining.link_linkedin); + } + } - setp_detail_nom_fille(""); - if (current_apprenant_data.nom_fille) { - setp_detail_nom_fille(current_apprenant_data.nom_fille); - } - - setp_detail_cvec(""); - if (current_apprenant_data.num_cvec) { - setp_detail_cvec(current_apprenant_data.num_cvec); - } - - setp_detail_handicap_detail(false); - if (current_apprenant_data.is_handicap && current_apprenant_data.is_handicap === "1") { - setp_detail_handicap_detail(true); - } - - setp_detail_prenom(""); - if (current_apprenant_data.prenom) { - setp_detail_prenom(current_apprenant_data.prenom); - } - - setp_detail_mail(""); - if (current_apprenant_data.email) { - setp_detail_mail(current_apprenant_data.email); - } - - setp_detail_naissance(""); - if (current_apprenant_data.date_naissance) { - setp_detail_naissance(current_apprenant_data.date_naissance); - } - - setp_detail_tel(""); - if (current_apprenant_data.telephone) { - setp_detail_tel(current_apprenant_data.telephone); - } - - setp_detail_adresse(""); - if (current_apprenant_data.adresse) { - setp_detail_adresse(current_apprenant_data.adresse); - } - - - - - setp_detail_is_rgpd(false); - if (current_apprenant_data.is_rgpd && current_apprenant_data.is_rgpd === "1") { - setp_detail_is_rgpd(true); - } - - setp_detail_is_droit_image(false); - if (current_apprenant_data.is_droit_image && current_apprenant_data.is_droit_image === "1") { - setp_detail_is_droit_image(true); - } - - setp_detail_is_handicap(false); - if (current_apprenant_data.is_handicap && current_apprenant_data.is_handicap === "1") { - setp_detail_is_handicap(true); - } - - - setp_detail_situation_famille(""); - if (current_apprenant_data.situation_famille) { - setp_detail_situation_famille(current_apprenant_data.situation_famille); - } - - - - setp_detail_code_postal(""); - if (current_apprenant_data.code_postal) { - setp_detail_code_postal(current_apprenant_data.code_postal); - } - - setp_detail_ville(""); - if (current_apprenant_data.ville) { - setp_detail_ville(current_apprenant_data.ville); - } - - setp_detail_pays(""); - if (current_apprenant_data.pays) { - setp_detail_pays(current_apprenant_data.pays); - } - - setp_detail_matricule(""); - if (current_apprenant_data.matricule) { - setp_detail_matricule(current_apprenant_data.matricule); - } - - setp_detail_ine(""); - if (current_apprenant_data.ine) { - setp_detail_ine(current_apprenant_data.ine); - } - - setp_detail_num_secu(""); - if (current_apprenant_data.num_secu) { - setp_detail_num_secu(current_apprenant_data.num_secu); - } - - setp_detail_twitter(""); - if (current_apprenant_data.link_twitter) { - setp_detail_twitter(current_apprenant_data.link_twitter); - } - - setp_detail_facebook(""); - if (current_apprenant_data.link_facebook) { - setp_detail_facebook(current_apprenant_data.link_facebook); - } - - setp_detail_linkedin(""); - if (current_apprenant_data.link_linkedin) { - setp_detail_linkedin(current_apprenant_data.link_linkedin); - } - - desablefield1(); } diff --git a/src/components/detail_formation_automatic_files/new_detail_formation_2025.js b/src/components/detail_formation_automatic_files/new_detail_formation_2025.js index ab52f67..76586a8 100644 --- a/src/components/detail_formation_automatic_files/new_detail_formation_2025.js +++ b/src/components/detail_formation_automatic_files/new_detail_formation_2025.js @@ -10,7 +10,7 @@ import 'react-slideshow-image/dist/styles.css' import 'react-tooltip/dist/react-tooltip.css' import { Tooltip } from 'react-tooltip' import slideimg1 from "../../mysy_img/education.jpg"; -import slideimg4 from "../../mysy_img/mysy_img.png"; +import slideimg4 from "../../mysy_img/mysy_img.png"; import img_met_program from "../../mysy_img/met_programmation.jpg"; @@ -414,7 +414,7 @@ const New_C_Detail_Formation_2025 = (props) => { function Display(e) { - var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class/"; + var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class_without_marketplace_check/"; var form = new FormData(); form.append("internal_url", classId); diff --git a/src/components/detail_formation_automatic_files/new_inscription_detail_formation_2025.js b/src/components/detail_formation_automatic_files/new_inscription_detail_formation_2025.js new file mode 100644 index 0000000..56eb6c9 --- /dev/null +++ b/src/components/detail_formation_automatic_files/new_inscription_detail_formation_2025.js @@ -0,0 +1,2829 @@ +import React, { useRef, useState, useEffect } from "react"; +import "./new_s_detail_formation_2025.css"; +import { useParams } from 'react-router-dom' +import axios from "axios"; +import { FcInfo } from "react-icons/fc"; +import 'reactjs-popup/dist/index.css'; +import fileDownload from 'js-file-download'; +import { Helmet } from "react-helmet"; +import 'react-slideshow-image/dist/styles.css' +import 'react-tooltip/dist/react-tooltip.css' +import { Tooltip } from 'react-tooltip' +import slideimg1 from "../../mysy_img/education.jpg"; +import slideimg4 from "../../mysy_img/mysy_img.png"; + +import img_met_program from "../../mysy_img/met_programmation.jpg"; + +import img_met_graphisme from "../../mysy_img/metier_graphisme.jpg"; + +import img_met_autre from "../../mysy_img/met_autre.jpg"; +import img_met_digital from "../../mysy_img/met_digital.jpg"; +import img_met_management from "../../mysy_img/met_management.jpg"; + + +import img_met_dev_perso from "../../mysy_img/metier_dev_perso.jpg"; +import img_met_rh from "../../mysy_img/met_rh.jpg"; + +import img_met_bureautic from "../../mysy_img/met_burautic.jpg"; +import img_met_vente from "../../mysy_img/met_vente.jpg"; +import img_met_sport from "../../mysy_img/met_sport.png"; +import img_met_sante_nat from "../../mysy_img/met_sante_nat.jpeg"; + +import Social_X_icon from '../../img_new_design_2025/social_i_X.png'; +import Social_Link_icon from '../../img_new_design_2025/social_i_Link.png'; +import Social_Fa_icon from '../../img_new_design_2025/social_i_Fa.png'; + +/* +/!\ important: les images du slides doivent avoir une dimension de : 250 X 450 +*/ +import { Button, } from "reactstrap"; +import { useHistory } from "react-router-dom"; +import { useCookies } from "react-cookie"; + +import { confirmAlert } from 'react-confirm-alert'; +//import { Rating } from 'react-simple-star-rating'; +import Rating from '@mui/material/Rating'; +import parse from 'html-react-parser'; +import Inscription from "../Inscription_Information"; +import SendIcon from '@mui/icons-material/Send'; + + +import Accordion from '@mui/material/Accordion'; +import AccordionDetails from '@mui/material/AccordionDetails'; +import AccordionSummary from '@mui/material/AccordionSummary'; +import Typography from '@mui/material/Typography'; +import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; + +import Dialog from '@mui/material/Dialog'; +import DialogActions from '@mui/material/DialogActions'; +import DialogContent from '@mui/material/DialogContent'; +import DialogContentText from '@mui/material/DialogContentText'; +import DialogTitle from '@mui/material/DialogTitle'; + + +const New_C_Inscription_Detail_Formation_2025 = (props) => { + const { classId, action, sessionId } = useParams(); + const [result, setResult] = useState(""); + const [myApiResponse, setmyApiResponse] = useState(); + const [DetailTraining, setDetailTraining] = useState([]); + const [closepopup, setclosepopup] = useState(0); + const [country_code, setcountry_code] = useState(""); + const [country_name, setcountry_name] = useState(""); + const [city, setcity] = useState(""); + const [postal, setpostal] = useState(""); + const [latitude, setlatitude] = useState(""); + const [longitude, setlongitude] = useState(""); + const [IPv4, setIPv4] = useState(""); + const [state, setstate] = useState(""); + const [userIp, setuserIp] = useState(""); + const [mynote, setmynote] = useState(0); + const [userconnected, setuserconnected] = useState("0"); + const [partnerconnected, setpartnerconnected] = useState("0"); + const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']); + const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart']); + + const [inscritpion, setinscritpion] = useState("1"); + const [ratingvalue, setratingvalue] = useState(0); + + const [partnaire_tva, setpartnaire_tva] = useState(""); + + const [text_size, settext_size] = useState("0"); + + const socialIconStyles = { + width: '24px', + height: '24px', + cursor: 'pointer', + }; + + const socialIconStyles_mobile = { + width: '24px', + height: '24px', + cursor: 'pointer', + }; + + // Gestion des Cookies + const stored_partner = cookie_part.tokenmysypart; + const stored_user = cookie.tokenmysych; + + + const [childdata, setchilddata] = useState(); + + + // Cette fonction verifier si le token de l'evaluation est valide + //si $action != 'information' et 'inscription', alors la valeur est forcement celle d'un token. + const [tokenEval_api, settokenEval_api] = useState(); + const [tokenEval_message, settokenEval_message] = useState(); + const [tokenEval_result, settokenEval_result] = useState(); + function CheckEvaluationToken() { + + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + form.append("eval_token", action); + form.append("class_internal_url", classId); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/MySyckeckEvaluationToken/"; + + axios.post(myurl, form).then(res => { + //console.log(" In CheckEvaluationToken res.data.status = " + res.data.status); + //console.log(" In CheckEvaluationToken res.data.message r_class = " + res.data.message); + + + if (String(res.data.status) !== "false") { + settokenEval_api("true"); + settokenEval_result(res.data.message); + } + else { + //console.log(" In tokenEval_trainingsession res.data.status = " + res.data.status); + settokenEval_api("false"); + settokenEval_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( CheckEvaluationToken = ', error); + settokenEval_api("false"); + //setmyApimyApiMessage("") + }) + } + + const [mytrainingdirectinscription, setmytrainingpreinscription] = useState(""); + useEffect(() => { + + + async function funclocaltoken() { + if (action && String(action).toLocaleLowerCase() !== "inscription" && + String(action).toLocaleLowerCase() !== "information") { + + CheckEvaluationToken(); + } + } + + + var local_user_connect = 0; + var local_part_connect = 0; + + if (typeof (stored_user) === "undefined" || String(stored_user) === '') { + setuserconnected("0"); + local_user_connect = 0; + } else { + setuserconnected("1"); + local_user_connect = 1; + } + + if (typeof (stored_partner) === "undefined" || String(stored_partner) === '') { + setpartnerconnected("0"); + local_part_connect = 0; + } else { + setpartnerconnected("1"); + local_part_connect = 1; + } + + async function fetchData() { + const result = await axios('https://geolocation-db.com/json/',); + setuserIp(result.data.IPv4); + setcountry_code(result.data.country_code); + setcountry_name(result.data.country_name); + setcity(result.data.city); + setpostal(result.data.postal); + setlatitude(result.data.latitude); + setlongitude(result.data.longitude); + setIPv4(result.data.IPv4); + setstate(result.data.state); + setuserIp(result.data.IPv4); + submenu_datelieu(); + } + fetchData(); + + + GetCurrentClass_trainingsession(); + Display(); + GetAssociatedTraning(); + + + funclocaltoken(); + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + + }, []); + + + function contactUs(e) { + + var sender_mail = ""; + var sender_tel = ""; + var token = ""; + if (String(userconnected) === "0") { + sender_mail = document.getElementsByName("usermail")[0].value; + sender_tel = document.getElementsByName("usernumtel")[0].value; + if (sender_mail.length == 0 && sender_tel.length == 0) { + alert(" Les information fournies sont incorrectes "); + return; + } + } else { + token = String(stored_user) + + } + + + var useravis = document.getElementsByName("useravis")[0].value; + var usersupqual = document.getElementsByName("userqualsup")[0].value; + var usernote = document.getElementsByName("usernote")[0].value; + + if (useravis.length < 20 || usersupqual.length < 20 || usernote.length < 0) { + alert("Merci de saisir le nombre minimum de caractère requis pour les champs "); + return; + } + + + var re = /\S+@\S+\.\S+/; + if (re.test(sender_mail) == false) { + alert("l'email est incorrecte"); + return; + } + + + ////console.log("contacter " + sender_mail + " - " + sender_tel + " - ") + + + //alert("contacter "+sender_mail+" - "+sender_tel+" - "+usermessage+" - url = " + //+process.env.REACT_APP_API_URL+" - user_ip ="+IPv4+" - "+latitude); + var myurl = process.env.REACT_APP_API_URL + "myclass/api/add_user_message/"; + var form = new FormData(); + form.append("type", "email"); + form.append("recever_mail", ""); + form.append("recever_tel", ""); + form.append("sender_mail", sender_mail); + form.append("sender_tel", sender_tel); + form.append("object", DetailTraining["external_code"]); + form.append("token", ""); + form.append("user_ip", IPv4); + form.append("user_country_code", country_code); + form.append("user_country_name", country_name); + form.append("user_city", city); + form.append("user_postal", postal); + form.append("user_latitude", latitude); + form.append("user_longitude", longitude); + form.append("user_state", state); + + axios.post(myurl, form).then(res => { + if (res.data.status != "False") { + //console.log(" In test res.data.status = " + res.data.status); + //console.log(" In test res.data.message = " + res.data.message); + setclosepopup(1); + document.getElementsByName("usermail")[0].value = ""; + document.getElementsByName("usernumtel")[0].value = ""; + document.getElementsByName("usercomment")[0].value = ""; + } + else { + //console.log(" contact-nous statut = " + res.data.status); + //console.log(" contact-nous res.data.message = " + res.data.message); + } + }).catch((error) => { + console.warn('contact-nous Not good man :( mysearchtext = '); + + }) + + + } + + + /* Cette variable accompagne la gestion des images par defaut. + idée : si la valeur de "DetailTraining.metier" != "management, digital, office, rh, vente, dev_perso" + alors l'utilisateur à créer une formation avec un metier qui n'est pas geré, donc on met une image par defaut + */ + const [ismetiermanaged, setismetiermanaged] = useState(); + const liste_metier = ["management", "digital", "office", "rh", "vente", "dev_perso"]; + + + const [nb_pave_a_afficher, setnb_pave_a_afficher] = useState(); + + const [isdatadock, setisdatadock] = useState(); + const [isqualiopi, setisqualiopi] = useState(); + const [iscertitrace, setiscertitrace] = useState(); + const [isbureaucertitrace, setisbureaucertitrace] = useState(); + const [iscertifvoltaire, setiscertifvoltaire] = useState(); + const [partnair_name, setpartnair_name] = useState(); + const [website_partenaire, setwebsite_partenaire] = useState(); + + const [class_sales_price, setclass_sales_price] = useState("0"); + + const [myclassimage, setmyclassimage] = useState(); + const [isclassimage, setisclassimage] = useState("False"); + const [userimgclassprofil, setuserimgclassprofil] = useState(""); + + const [class_img_stored_in_bdd, setclass_img_stored_in_bdd] = useState(""); + + function getClassImage_no_token(class_id, class_external_code) { + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedClassImage_no_token/"; + + var form = new FormData(); + + form.append("type", "partner"); + form.append("related_collection", "myclass"); + form.append("related_collection_recid", class_id); + form.append("class_external_code", class_external_code); + + + axios.post(myurl, form).then(res => { + + if (res.data.status != "False") { + + //console.log(" getClassImage : In test res.data.status = " + res.data.status); + console.log(" getClassImage: res.data.message.img = " + res.data.message); + + if (res.data.message.img.length > 0) { + setisclassimage("True"); + } + else { + setisclassimage("False"); + } + setisclassimage(res.data.message.img); + var ch_img = "data:image/png;base64," + res.data.message.img; + setclass_img_stored_in_bdd(ch_img); + } + else { + //console.log(" In Erreur res.data.status = " + res.data.status); + //console.log(" In Erreur res.data.message = " + res.data.message); + setisclassimage("False"); + setuserimgclassprofil(); + setclass_img_stored_in_bdd(); + } + }).catch((error) => { + + console.warn('getClassImage ee: Not good man :( getClassImage = '); + setisclassimage("False"); + setuserimgclassprofil(""); + setclass_img_stored_in_bdd(""); + }) + + } + + + const [Get_Class_Catalogue_File_api, setGet_Class_Catalogue_File_api] = useState(); + const [Get_Class_Catalogue_File_result, setGet_Class_Catalogue_File_result] = useState([]); + const [Get_Class_Catalogue_File_message, setGet_Class_Catalogue_File_message] = useState(); + + function Get_Class_Catalogue_File(class_id) { + + const formData = new FormData(); + + formData.append("filter_object_owner_collection", "myclass"); + formData.append("filter_object_owner_id", class_id); + formData.append("filter_type_document", "catalogue_file"); + + + //formData.append("class_internal_url", internal_url); + //console.log("token = " + stored_cookie); + + fetch( + process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files_With_Filter_No_Token/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("true")) { + //console.log('Message :', result['message']); + setGet_Class_Catalogue_File_result(result['message']); + setGet_Class_Catalogue_File_api("true"); + + } + else { + setGet_Class_Catalogue_File_message(result['message']); + setGet_Class_Catalogue_File_api("false"); + } + + }) + .catch((error) => { + + console.error(' Get_Class_Catalogue_File Error:', error); + setGet_Class_Catalogue_File_api("false"); + }); + + } + + + + + + function Display(e) { + var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class_without_marketplace_check/"; + var form = new FormData(); + form.append("internal_url", classId); + + var my_local_user_connect; + var my_local_part_connect; + if (typeof (stored_user) === "undefined" || String(stored_user) === '') { + my_local_user_connect = 0; + } else { + my_local_user_connect = 1; + } + + if (typeof (stored_partner) === "undefined" || String(stored_partner) === '') { + my_local_part_connect = 0; + } else { + my_local_part_connect = 1; + } + + + + if (String(my_local_user_connect) === "1") { + form.append("token", stored_user); + form.append("connection_type", "user"); + } + else if (String(my_local_part_connect) === "1") { + form.append("token", stored_partner); + form.append("connection_type", "partner"); + } + else { + form.append("token", ""); + form.append("connection_type", ""); + } + + // Ajout des info IP user + form.append("user_ip", IPv4); + form.append("user_country_code", country_code); + form.append("user_country_name", country_name); + form.append("user_city", city); + form.append("user_postal", postal); + form.append("user_latitude", latitude); + form.append("user_longitude", longitude); + form.append("user_state", state); + + var cpt_pave = 0; + //alert("myurl = "+myurl); + + axios.post(myurl, form).then(res => { + // console.log(" In Display res.data.status = " + res.data.status); + // console.log(" In Display res.data.message = " + res.data.message); + if (String(res.data.status) === String("true")) { + + if (res.data.message.length > 0) { + setmyApiResponse("True"); + + if (String(JSON.parse(res.data.message).coeur) !== String("1") && + String(JSON.parse(res.data.message).freeacces) !== String("1")) { + + //alert(" ce n'est pas un coeur = " + JSON.parse(res.data.message).coeur) + // Verification si on est en e connecté ou non. + var local_user_connect = 0; + var local_part_connect = 0; + + if (typeof (stored_user) === "undefined" || String(stored_user) === '') { + setuserconnected("0"); + local_user_connect = 0; + } else { + setuserconnected("1"); + local_user_connect = 1; + } + + if (typeof (stored_partner) === "undefined" || String(stored_partner) === '') { + setpartnerconnected("0"); + local_part_connect = 0; + } else { + setpartnerconnected("1"); + local_part_connect = 1; + } + + if (local_user_connect === 0 && local_part_connect === 0) { + confirmAlert({ + title: 'Connexion ?', + message: 'Connectez-vous pour acceder  au detail de cette formation', + buttons: [ + { + label: 'Vous avez un compte', + onClick: () => { history.push("/mysy-training-login/training/" + classId) } + }, + { + label: "Vous n'avez pas de compte", + onClick: () => { history.push("/create_account") } + }, + + ], + closeOnEscape: false, + closeOnClickOutside: false, + keyCodeForClose: [8, 32], + willUnmount: () => { }, + afterClose: () => { }, + onClickOutside: () => { }, + onKeypress: () => { }, + onKeypressEscape: () => { }, + }); + + + } + } else { + //alert(" c'est pas un coeur = " + JSON.parse(res.data.message).coeur) + } + } + else { + setmyApiResponse("False"); + } + //console.log(" In displaydetailclass res.data.status = " + res.data.status); + //console.log(" In displaydetailclass res.data.message = " + res.data.message); + //console.log(" In displaydetailclass taille res.data.message = " + res.data.message.length); + setResult(res.data.message); + setDetailTraining(JSON.parse(res.data.message)); + + + getClassImage_no_token(JSON.parse(res.data.message)._id, JSON.parse(res.data.message).external_code); + + + Get_Class_Catalogue_File(JSON.parse(res.data.message)._id); + + + if (JSON.parse(res.data.message).note) { + setratingvalue(JSON.parse(res.data.message).note); + } + + if (JSON.parse(res.data.message).partnaire_tva) { + setpartnaire_tva(JSON.parse(res.data.message).partnaire_tva); + } else { + setpartnaire_tva(""); + } + + + if (JSON.parse(res.data.message).inscription_direct) { + setmytrainingpreinscription(JSON.parse(res.data.message).inscription_direct); + } else { + setmytrainingpreinscription(""); + } + + + + if (JSON.parse(res.data.message).isdatadock) { + setisdatadock(JSON.parse(res.data.message).isdatadock); + } + + if (JSON.parse(res.data.message).business_prices && JSON.parse(res.data.message).business_prices.length == 1) { + setclass_sales_price(JSON.parse(res.data.message).business_prices[0].discounted_price); + + } else { + setclass_sales_price(JSON.parse(res.data.message).price); + setclass_sales_price(JSON.parse(res.data.message).price); + } + + + if (JSON.parse(res.data.message).isqualiopi) { + setisqualiopi(JSON.parse(res.data.message).isqualiopi); + } + + + if (JSON.parse(res.data.message).iscertitrace) { + setiscertitrace(JSON.parse(res.data.message).iscertitrace); + } + + if (JSON.parse(res.data.message).isbureaucertitrace) { + setisbureaucertitrace(JSON.parse(res.data.message).isbureaucertitrace); + } + + if (JSON.parse(res.data.message).iscertifvoltaire) { + setiscertifvoltaire(JSON.parse(res.data.message).iscertifvoltaire); + } + + if (JSON.parse(res.data.message).nom_partenaire) { + setpartnair_name(JSON.parse(res.data.message).nom_partenaire); + } + + if (JSON.parse(res.data.message).nb_pave_a_afficher) { + setnb_pave_a_afficher(JSON.parse(res.data.message).nb_pave_a_afficher); + //console.log(" ### NB setnb_pave_a_afficher = ", JSON.parse(res.data.message).nb_pave_a_afficher); + } + + + if (JSON.parse(res.data.message).website_partenaire) { + setwebsite_partenaire(JSON.parse(res.data.message).website_partenaire); + } + + // Verifier si le metier est geré + if (JSON.parse(res.data.message).metier) { + if (!liste_metier.includes(JSON.parse(res.data.message).metier)) { + setismetiermanaged("0"); // j'ai une valeur dans metier, mais qui n'est pas geré + } + } + else { + setismetiermanaged("0"); + } + + if (JSON.parse(res.data.message).img_url && String(JSON.parse(res.data.message).img_url).length > 0) { + setismetiermanaged("1"); + } + + if (JSON.parse(res.data.message).text_size) { + settext_size(JSON.parse(res.data.message).text_size); + + //"block_crossell_meme_orga" + var local_tmp; + var val; + var footer_top; + var main_h; + var main_h_px; + + + + } + } + else { + //console.log(" In Erreur res.data.status = " + res.data.status); + //console.log(" In Erreur res.data.message = " + res.data.message); + setmyApiResponse("false"); + history.push("/formation-inconnue/"); + + } + + + }).catch((error) => { + console.warn('Not good man :( Display = ', error); + //console.log(error); + setmyApiResponse("false"); + + }) + + + } + + const [associatedtraining_api, setassociatedtraining_api] = useState(""); + const [associatedtraining_message, setassociatedtraining_message] = useState(""); + function GetAssociatedTraning(e) { + var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_associated_class_of_partnair/"; + var form = new FormData(); + form.append("internal_url", classId); + // Ajout des info IP user + form.append("user_ip", IPv4); + form.append("user_country_code", country_code); + form.append("user_country_name", country_name); + form.append("user_city", city); + form.append("user_postal", postal); + form.append("user_latitude", latitude); + form.append("user_longitude", longitude); + form.append("user_state", state); + + + //alert("myurl = "+myurl); + + axios.post(myurl, form).then(res => { + if (String(res.data.status) !== String("false")) { + //console.log(" In GetAssociatedTraning res.data.status = " + res.data.status); + //console.log(" In GetAssociatedTraning res.data.message = " + res.data.message); + setassociatedtraining_api("True"); + setassociatedtraining_message(res.data.message); + + } + else { + //console.log(" In Erreur res.data.status = " + res.data.status); + //console.log(" In Erreur res.data.message = " + res.data.message); + setassociatedtraining_api("False"); + } + + + }).catch((error) => { + console.warn('Not good man :( GetAssociatedTraning = '); + setassociatedtraining_api("False"); + + }) + + + } + + const history = useHistory(); + + const fadeImages = [ + { + url: slideimg1, + }, + + { + url: slideimg4, + }, + ]; + + + function CheckAvis(e) { + + const val = document.getElementById("useravis").value + //alert(" evalu " + val); + if (val.length < 20) { + alert(" Le champ 'Avis' doit etre plus renseigné"); + } + //alert(val); + } + + function CheckNote(e) { + const val = e.target.value; + + if (isNaN(val)) { + //alert(val + " is not a number
mynote = "+mynote); + document.getElementById("usernote").value = mynote; + } else { + if (val > 5) { + alert(" Valeur Maxi doit etre 5"); + document.getElementById("usernote").value = mynote; + } else { + setmynote(val); + } + } + + } + + const [submenu, setsubmenu] = useState("datelieu"); + + function submenu_info() { + setsubmenu("formateur"); + //if (document.getElementsByName("menu_formateur")[0]) + // document.getElementsByName('menu_formateur')[0].focus(); + + if (document.getElementsByName("menu_datelieu")[0]) + document.getElementsByName('menu_datelieu')[0].blur(); + + if (document.getElementsByName("submenu_divers")[0]) + document.getElementsByName('submenu_divers')[0].blur(); + } + + function submenu_datelieu() { + setsubmenu("datelieu"); + //if (document.getElementsByName("menu_datelieu")[0]) + // document.getElementsByName('menu_datelieu')[0].focus(); + + if (document.getElementsByName("menu_formateur")[0]) + document.getElementsByName('menu_formateur')[0].blur(); + + if (document.getElementsByName("submenu_divers")[0]) + document.getElementsByName('submenu_divers')[0].blur(); + } + + + function submenu_divers() { + setsubmenu("divers"); + //if (document.getElementsByName("submenu_divers")[0]) + //document.getElementsByName('submenu_divers')[0].focus(); + + if (document.getElementsByName("menu_datelieu")[0]) + document.getElementsByName('menu_datelieu')[0].blur(); + + if (document.getElementsByName("submenu_divers")[0]) + document.getElementsByName('submenu_divers')[0].blur(); + } + + + function Inscription_bton(event) { + if (DetailTraining["internal_url"] && String(DetailTraining["class_inscription_url"]).length > 10) { + window.open( + String(DetailTraining["class_inscription_url"]), + '_blank' + ); + + } else { + setinscritpion("1"); + + } + + + if (document.getElementById('myRef_informe')) { + var divh = document.getElementById('myRef_informe').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + + } + + function Contact_bton(event) { + setinscritpion("2"); + + + if (document.getElementById('myRef_informe')) { + var divh = document.getElementById('myRef_informe').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + + } + + + const [GetCurrentClass_api, setGetCurrentClass_api] = useState(); + const [GetCurrentClass_message, setGetCurrentClass_message] = useState(); + const [GetCurrentClass_result, setGetCurrentClass_result] = useState(); + function GetCurrentClass_trainingsession(event) { + + var form = new FormData(); + + form.append("class_internal_url", classId); + + form.append("token", stored_partner); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSessionFormation_List/"; + + axios.post(myurl, form).then(res => { + //console.log(" In GetCurrentClass_trainingsession res.data.status = " + res.data.status); + // console.log(" In GetCurrentClass_trainingsession res.data.message r_class = " + res.data.message); + + if (String(res.data.status) === String("true")) { + //console.log(" In GetCurrentClass_trainingsession res.data.status = " + res.data.status); + //console.log(" In GetCurrentClass_trainingsession res.data.message r_class = " + res.data.message); + setGetCurrentClass_api("true"); + setGetCurrentClass_result(res.data.message); + + } + else { + setGetCurrentClass_api("false"); + setGetCurrentClass_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( GetCurrentClass_trainingsession = ', error); + setGetCurrentClass_api("false"); + //setmyApimyApiMessage("") + }) + } + + + const handleAccountCreation = () => { + history.push("/create_account") + }; + + const handleAccountConnexion = () => { + history.push("/Connexion") + }; + + function handleAccountLogout() { + + if (String(userconnected) === String("1")) { + user_logout(); + } + else if (String(partnerconnected) === String("1")) { + part_logout(); + } + } + + + function part_logout_confirmation() { + /* si c'est une connexion partner qui est active */ + if (typeof (stored_part) != "undefined") { + setCookie_part("tokenmysypart", "", { path: '/' }); + } + history.push("/recherche-formation"); + } + + function part_logout() { + confirmAlert({ + title: '', + message: 'Confirmez la déconnexion (pro)', + buttons: [ + { + label: 'Oui', + onClick: () => part_logout_confirmation() + }, + { + label: 'Non', + onClick: () => { return } + } + ] + }); + } + + + function user_logout_confirmation() { + /* si c'est une connexion partner qui est active */ + if (typeof (stored_user) != "undefined") { + setCookie("tokenmysych", ""); + } + history.push("/recherche-formation"); + } + + function user_logout() { + confirmAlert({ + title: '', + message: 'Confirmez la déconnexion (user)', + buttons: [ + { + label: 'Oui', + onClick: () => user_logout_confirmation() + }, + { + label: 'Non', + onClick: () => { return } + } + ] + }); + } + + + function Close_info_form() { + setinscritpion(""); + + {/* + document.getElementById('mob_block_cross_sell_cat').style.display = "flex"; + if (window.screen.width < 601) { + var meme_orga_top = document.getElementById('mob_block_cross_sell_cat').style.top; + var displaydetailclass_new_v2_hei = document.getElementById('mobile').style.height; + var sticky_div_hilight_top = document.getElementById('sticky_div_hilight_pave').style.top; + + var new_meme_orga_top = parseInt(meme_orga_top) - 900; + var new_displaydetailclass_new_v2_hei = parseInt(displaydetailclass_new_v2_hei) - 900; + var new_sticky_div_hilight_top = parseInt(sticky_div_hilight_top) - 900; + + + document.getElementById('mob_block_cross_sell_cat').style.top = new_meme_orga_top + "px"; + document.getElementById('mobile').style.height = new_displaydetailclass_new_v2_hei + "px"; + document.getElementById('sticky_div_hilight_pave').style.top = new_sticky_div_hilight_top + "px"; + + + } + + + else if (window.screen.width >= 601 && window.screen.width <= 991) { + var meme_orga_top = document.getElementById('block_crossell_meme_orga').style.top; + var displaydetailclass_new_v2_hei = document.getElementById('desktop').style.height; + var new_meme_orga_top = parseInt(meme_orga_top) - 900; + var new_displaydetailclass_new_v2_hei = parseInt(displaydetailclass_new_v2_hei) - 900; + + document.getElementById('block_crossell_meme_orga').style.top = new_meme_orga_top + "px"; + document.getElementById('desktop').style.height = new_displaydetailclass_new_v2_hei + "px"; + + } + else if (window.screen.width >= 992 && window.screen.width <= 1199) { + var meme_orga_top = document.getElementById('block_crossell_meme_orga').style.top; + var displaydetailclass_new_v2_hei = document.getElementById('desktop').style.height; + var new_meme_orga_top = parseInt(meme_orga_top) - 500; + var new_displaydetailclass_new_v2_hei = parseInt(displaydetailclass_new_v2_hei) - 500; + + document.getElementById('block_crossell_meme_orga').style.top = new_meme_orga_top + "px"; + document.getElementById('desktop').style.height = new_displaydetailclass_new_v2_hei + "px"; + } + else if (window.screen.width >= 1200) { + var meme_orga_top = document.getElementById('block_crossell_meme_orga').style.top; + var displaydetailclass_new_v2_hei = document.getElementById('desktop').style.height; + var new_meme_orga_top = parseInt(meme_orga_top) - 500; + var new_displaydetailclass_new_v2_hei = parseInt(displaydetailclass_new_v2_hei) - 500; + + document.getElementById('block_crossell_meme_orga').style.top = new_meme_orga_top + "px"; + document.getElementById('desktop').style.height = new_displaydetailclass_new_v2_hei + "px"; + + + } + */} + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + } + + function Close_inscrip_form() { + setinscritpion(); + {/* document.getElementById('mob_block_cross_sell_cat').style.display = "flex"; + + if (window.screen.width < 601) { + var meme_orga_top = document.getElementById('mob_block_cross_sell_cat').style.top; + var displaydetailclass_new_v2_hei = document.getElementById('mobile').style.height; + var sticky_div_hilight_top = document.getElementById('sticky_div_hilight_pave').style.top; + + var new_meme_orga_top = parseInt(meme_orga_top) - 900; + var new_displaydetailclass_new_v2_hei = parseInt(displaydetailclass_new_v2_hei) - 900; + var new_sticky_div_hilight_top = parseInt(sticky_div_hilight_top) - 900; + + document.getElementById('mob_block_cross_sell_cat').style.top = new_meme_orga_top + "px"; + document.getElementById('mobile').style.height = new_displaydetailclass_new_v2_hei + "px"; + document.getElementById('sticky_div_hilight_pave').style.top = new_sticky_div_hilight_top + "px"; + } + else if (window.screen.width >= 601 && window.screen.width <= 991) { + var meme_orga_top = document.getElementById('block_crossell_meme_orga').style.top; + var displaydetailclass_new_v2_hei = document.getElementById('desktop').style.height; + var new_meme_orga_top = parseInt(meme_orga_top) - 900; + var new_displaydetailclass_new_v2_hei = parseInt(displaydetailclass_new_v2_hei) - 900; + + document.getElementById('block_crossell_meme_orga').style.top = new_meme_orga_top + "px"; + document.getElementById('desktop').style.height = new_displaydetailclass_new_v2_hei + "px"; + + } + else if (window.screen.width >= 992 && window.screen.width <= 1199) { + var meme_orga_top = document.getElementById('block_crossell_meme_orga').style.top; + var displaydetailclass_new_v2_hei = document.getElementById('desktop').style.height; + var new_meme_orga_top = parseInt(meme_orga_top) - 500; + var new_displaydetailclass_new_v2_hei = parseInt(displaydetailclass_new_v2_hei) - 500; + + document.getElementById('block_crossell_meme_orga').style.top = new_meme_orga_top + "px"; + document.getElementById('desktop').style.height = new_displaydetailclass_new_v2_hei + "px"; + } + else if (window.screen.width >= 1200) { + var meme_orga_top = document.getElementById('block_crossell_meme_orga').style.top; + var displaydetailclass_new_v2_hei = document.getElementById('desktop').style.height; + var new_meme_orga_top = parseInt(meme_orga_top) - 500; + var new_displaydetailclass_new_v2_hei = parseInt(displaydetailclass_new_v2_hei) - 500; + + document.getElementById('block_crossell_meme_orga').style.top = new_meme_orga_top + "px"; + document.getElementById('desktop').style.height = new_displaydetailclass_new_v2_hei + "px"; + + + } + +*/} + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + } + + + const [expanded, setExpanded] = React.useState(false); + + const handleChange = (panel) => (event, isExpanded) => { + setExpanded(isExpanded ? panel : false); + }; + + const myRef_informe = useRef(null) + + const [Dialog_contact_message, setDialog_contact_message] = React.useState(false); + const [Dialog_contact_open, setDialog_contact_open] = React.useState(false); + function Dialog_contact_handle_change_participant_session(message) { + setDialog_contact_message(message); + setDialog_contact_open(true); + } + + const Dialog_contact_handleClose = () => { + + }; + + const Dialog_contact_handleClose_buton = () => { + + setDialog_contact_open(false); + clear_contact_message_fields(); + + }; + + const [contact_message_nom_prenom, setcontact_message_nom_prenom] = React.useState(""); + const [contact_message_email, setcontact_message_email] = React.useState(""); + const [contact_message_phone, setcontact_message_phone] = React.useState(""); + const [contact_message_sujet, setcontact_message_sujet] = React.useState(""); + const [contact_message_message, setcontact_message_message] = React.useState(""); + + function clear_contact_message_fields() { + setcontact_message_nom_prenom(""); + setcontact_message_email(""); + setcontact_message_phone(""); + setcontact_message_sujet(""); + setcontact_message_sujet(""); + setcontact_message_message(""); + } + + function Send_Contact_Message(e) { + + var sender_mail = ""; + var sender_tel = ""; + var token = ""; + + ////console.log("contacter " + sender_mail + " - " + sender_tel + " - ") + + var mysubject = contact_message_sujet; + var mymessage = contact_message_message; + var mysender_name = contact_message_nom_prenom; + var mysender_email = contact_message_email; + + + //alert("contacter "+mysender_email+" - "+mymessage+" - url = " + //+process.env.REACT_APP_API_URL+" - user_ip ="+IPv4+" - "+latitude); + + var re = /\S+@\S+\.\S+/; + if (re.test(mysender_email) == false) { + alert("l'email est incorrecte"); + return; + } + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/add_user_message/"; + var form = new FormData(); + form.append("type", "email"); + form.append("recever_mail", "contact@mysy-training.com"); + form.append("recever_tel", "+33769203945"); + form.append("sender_mail", mysender_email); + form.append("sender_tel", sender_tel); + form.append("object", mysubject); + form.append("message", mymessage); + form.append("sender_name", mysender_name); + form.append("token", ""); + form.append("user_ip", IPv4); + form.append("user_country_code", country_code); + form.append("user_country_name", country_name); + form.append("user_city", city); + form.append("user_postal", postal); + form.append("user_latitude", latitude); + form.append("user_longitude", longitude); + form.append("user_state", state); + + + // console.log("## form = ", form); + + + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("false")) { + + alert(res.data.message); + } + + else if (String(res.data.status) === String("true")) { + Dialog_contact_handleClose_buton(); + alert(res.data.message); + + } + else { + + } + }).catch((error) => { + console.warn('contact-nous Not good man :( mysearchtext = '); + + }) + } + + + const [Download_one_attached_document_no_token_api, setDownload_one_attached_document_no_token_api] = useState(); + const [Download_one_attached_document_no_token_result, setDownload_one_attached_document_no_token_result] = useState(); + const [Download_one_attached_document_no_token_message, setDownload_one_attached_document_no_token_message] = useState(); + + const Download_one_attached_document_no_token = (event) => { + + var nom_fiche_detaillee = "Fiche_catalogue.pdf"; + var file_name = event.target.id; + + + var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Stored_Downloaded_File_From_Id_WITHOUT_TOKEN/" + file_name; + + //console.log(" ### url = ", url); + + + axios.get(url, { responseType: 'blob', },) + .then((res) => { + fileDownload(res.data, nom_fiche_detaillee); + setDownload_one_attached_document_no_token_api("true"); + }).catch((error) => { + console.error('Error:', error); + setDownload_one_attached_document_no_token_api("false"); + + }); + } + + + + /// ---- + return ( + +
+ + + + + + {`${DetailTraining["title"]}`} + + + {/*** GESTION Contact */} + + + Contactez Nous + + + +
+
+ Nom & Prénom +
+
+ + { + setcontact_message_nom_prenom(e.target.value); + }} + className='form-control formInput' + placeholder='Nom' + > +
+
+ +
+
+ E-mail +
+
+ { + setcontact_message_email(e.target.value); + }} + className='form-control formInput' + placeholder='Adresse email' + > +
+
+ + +
+
+ Téléphone +
+
+ { + setcontact_message_phone(e.target.value); + }} + className='form-control formInput' + placeholder='Numéro Tél' + > +
+
+ +
+
+ Sujet +
+
+ { + setcontact_message_sujet(e.target.value); + }} + className='form-control formInput' + placeholder='Sujet' + > +
+
+ +
+
+ Votre message +
+
+ +
+
+ +
+ +
MySy Training Technology
+
+
+ + Adresse : 1 Cr du Havre, 75008 Paris
+ Adresse email : + contact@mysy-training.com
+ + Téléphone fixe : +331 77 00 38 57
+
+ +
+ + +
+ + +
+
+ +
+
+ + +
+
+ +
+ + +
+ {/*** FIN GESTION Contact */} + +
+ +
+ +
+
+
+ +
+
+ {DetailTraining["title"]} +
+ +
+
+ +
+
+ +
+ +
+ + {String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" &&
+ + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("it") && + informatique} + + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("graphisme") && + graphisme} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("management") && + management} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("digital") && + digital} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("office") && + office} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("rh") && + ressources humaines} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("vente") && + vente} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("dev_perso") && + developpement personnel} + + + +
} + + {String(ismetiermanaged) === "0" &&
+ autre + +
} + + {String(ismetiermanaged) === "1" &&
+ autre +
} +
+ + +
+ + {String(DetailTraining["price"]) && String(DetailTraining["price"]) === String("0") && +
+
Gratuit +
+
Eligible CPF +
+
+ } + + {String(DetailTraining["price"]) && String(DetailTraining["price"]) !== String("0") && String(DetailTraining["price"]) === String("0") && (!DetailTraining.business_prices || Object.keys(DetailTraining.business_prices).length <= 0) + && DetailTraining["price"] && +
+ + {parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> {String(DetailTraining["price"])} € HT } + {parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> {String(DetailTraining["price"])} € TTC } + + +
} + + {String(DetailTraining["price"]) && String(DetailTraining["price"]) !== String("0") && DetailTraining.business_prices && Object.keys(DetailTraining.business_prices).length > 0 + && DetailTraining["price"] &&
+ + + {DetailTraining.business_prices && DetailTraining.business_prices.length > 0 &&
+ + +
} +
} + +
+ +
+ {String(action).toLowerCase() !== "information" && String(action).toLowerCase() !== "inscription" && +
+ +
+ +
+ M'inscrire +
+ +
+ +
+ +
+ M'informer + +
+ + +
+ +
} + +
+
+ +
+ +
+ Caractéristiques +
+ +
+ + + +
+ +
+ + + +
+ +
+ {DetailTraining.presentiel && DetailTraining.presentiel.distantiel === "1" && " Oui "} + {DetailTraining.presentiel && DetailTraining.presentiel.distantiel === "0" && " Non "} +
+ + +
+ + +
+ +
+ + + +
+ +
+ {DetailTraining.presentiel && DetailTraining.presentiel.presentiel === "1" && " Oui "} + {DetailTraining.presentiel && DetailTraining.presentiel.presentiel === "0" && " Non "} +
+ + +
+ + + +
+ +
+ + +
+ + {String(DetailTraining["duration_unit"]) !== "user_rythme" && +
+ {DetailTraining["duration"]} {DetailTraining["duration_unit"]}(s) +
+ } + + {String(DetailTraining["duration_unit"]) === "user_rythme" && +
+ A votre rythme +
+ } + +
+ + +
+ +
+ + + + +
+ +
+ {DetailTraining["certif"] && String(DetailTraining["certif"]) !== String("1") && " Non " + } + {DetailTraining["certif"] && String(DetailTraining["certif"]) === String("1") && " Oui " + } +
+ + +
+ + +
+ +
+ + + + +
+ +
+ {DetailTraining["support"] && } + {!DetailTraining["support"] && "Non précisé"} + +
+
+ +
+ + + + + +
+ +
+ +
+
+ Organisme de formation +
+ +
+ {partnair_name && } +
+ +
+
+ +
+ social Mysy Training Facebook + +
+ +
+ social Mysy Training LinkedIn + +
+ +
+ social Mysy Training X (twitter) + + +
+ +
+ +
+
+ + < nav ref={myRef_informe} id="myRef_informe"> + + {(String(inscritpion) === "2" || String(inscritpion) === "1") && +
+
+ +
+ +
+ + {String(inscritpion) === "2" &&
+ + + +
+ } + {String(inscritpion) === "1" &&
+ + +
+ + } + +
+ + +
+
+
} + + + +
+
+ +
+ +
+ + +
+ Description +
+ + +
+ {parse(String(DetailTraining["description"]))} +
+
+ + +
+
+
+ + +
+
+ +
+ + {GetCurrentClass_result && GetCurrentClass_result.length > 0 && +
+ +
+ Les sessions +
+ +
+
    + + + {GetCurrentClass_result && GetCurrentClass_result.slice(0, 5).map((formation) => ( +
  • + {(JSON.parse(formation).session_ondemande) && (JSON.parse(formation).session_ondemande) === "1" && } + + {(!(JSON.parse(formation).session_ondemande) || (JSON.parse(formation).session_ondemande) === "0") && } +
  • + + ))} + +
+
+ +
} + +
+
+
+ + +
+
+ +
+
+ +
+ Objectif +
+ + {DetailTraining["objectif"] &&
+ {parse(String(DetailTraining["objectif"]))} +
+ } + +
+ + +
+
+
+ +
+
+ + +
+ +
+ Programme +
+ + {DetailTraining["programme"] &&
+ {parse(String(DetailTraining["programme"]))}sticky_div_hilight +
+ } +
+ +
+
+ +
+
+ + {DetailTraining["tab_ue_detail_data"] && DetailTraining["tab_ue_detail_data"].length > 0 && < div className="mob_info_page_title_desc_long_txt" > +
+ Modules +
+ + + {DetailTraining["tab_ue_detail_data"] &&
+ +
+ {DetailTraining["tab_ue_detail_data"] && DetailTraining["tab_ue_detail_data"].map((val) => ( +
+ + + } + aria-controls={val._id} + id={val._id} + > + + + {val.titre} + + + + +
{parse(String(val.description).replace(/(<([^>]+)>)/ig, ''))}
+ +
+
+
+ + +
+ ))} +
+ +
} + +
} +
+
+ +
+
+ {DetailTraining["pourqui"] &&
+ +
+ Pour Qui +
+ + {DetailTraining["pourqui"] &&
+ {parse(String(DetailTraining["pourqui"]))} +
+ } + +
} + + +
+
+ + +
+
+ {DetailTraining["prerequis"] &&
+ +
+ Pré-requis +
+ + {DetailTraining["prerequis"] &&
+ {parse(String(DetailTraining["prerequis"]))} +
+ } + +
} + + +
+
+ +
+ +
+
+   +
+
+ +
+
+
+ +
+ +
+ + {associatedtraining_message && associatedtraining_message.length > 0 && +
+ Cela pourrait aussi vous intéresser +
} + +
+ + {associatedtraining_message && String(associatedtraining_api) === "True" && + associatedtraining_message.slice(0, 3).map((formation) => ( + +
+ +
+ + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("it") && + informatique} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("graphisme") && + graphisme} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("management") && + management} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("digital") && + digital} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("office") && + office} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("rh") && + ressources humaines} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("vente") && + vente} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("sport") && + sport} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("sante_nat") && + sante naturelle} + + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("dev_perso") && + developpement personnel} + + {!JSON.parse(formation).metier && autre personnel} + +
+ +
+
+ {JSON.parse(formation).cpf && (String(JSON.parse(formation).cpf)) === "1" && + "Éligible au CPF"} + + {!JSON.parse(formation).cpf || String(JSON.parse(formation).cpf) !== "1" && + "NON Éligible au CPF"} + +
+ +
+ + +
+ +
+ {JSON.parse(formation).note && String(JSON.parse(formation).note).length === 1 && + parseInt(String(JSON.parse(formation).note)) <= 5 && parseInt(String(JSON.parse(formation).note)) >= 1 && + } +
+ +
+ {parse(String(JSON.parse(formation).title))} +
+ + {JSON.parse(formation).price &&
+ + {parseFloat(String(JSON.parse(formation).partnaire_tva)) > 0 && <>{(String(JSON.parse(formation).price))} € HT } + {parseFloat(String(JSON.parse(formation).partnaire_tva)) <= 0 && <>{(String(JSON.parse(formation).price))} € TTC } + + +
} + + +
+ +
+ +
{ + e.preventDefault(); + //test(props.formation.external_code); + window.open( + "/Display-Detail-formation/" + JSON.parse(formation).internal_url, + '_self' + ); + + + }}> +
+ Voir les détails +
+ +
+ + +
+ +
+ ))} + +
+ +
+
+
+ +
+
+ +
+ + + + +
+ + +
+
+ + +
+ +
+
+
+ +
+ {ratingvalue != '0' && String(ratingvalue).length > 0 && + String(ratingvalue) != "" && parseFloat(String(ratingvalue)) <= 5 && parseFloat(String(ratingvalue)) >= 1 && + } +
+ +
+ {DetailTraining["title"]} +
+ +
+ +
+ {DetailTraining["cpf"] && String(DetailTraining["cpf"]) === "1" && + "Éligible au CPF"} + + {!DetailTraining["cpf"] || String(DetailTraining["cpf"]) !== "1" && + "NON Éligible au CPF"} +
+ +
+ +
+ + + +
+
+ +
+ + + + +
+
+
+ +
+ + +
+ + +
+ {Get_Class_Catalogue_File_result && Get_Class_Catalogue_File_result.length > 0 &&
+ + + +
} + + +
+
Description + +
+ {DetailTraining["description"] &&
+ {parse(String(DetailTraining["description"]))} + +
+ } +
+
+ + {GetCurrentClass_result && GetCurrentClass_result.length > 0 && +
+
+ Les sessions + +
+
+
    + + {GetCurrentClass_result && GetCurrentClass_result.slice(0, 5).map((formation) => ( + + +
  • + + {(JSON.parse(formation).session_ondemande) && (JSON.parse(formation).session_ondemande) === "1" && } + + {(!(JSON.parse(formation).session_ondemande) || (JSON.parse(formation).session_ondemande) === "0") && } +
  • + + ))} + +
+
+ +
+ } + +
+
+
+ Objectif +
+ {DetailTraining["objectif"] &&
+ {parse(String(DetailTraining["objectif"]))} + +
+ } + +
+ + +
+ + +
+
+ Programme +
+ {DetailTraining["programme"] &&
+ {parse(String(DetailTraining["programme"]))} + +
+ } +
+ + +
+ {DetailTraining["tab_ue_detail_data"] && DetailTraining["tab_ue_detail_data"].length > 0 && < div className="block_info_page_pave_title_desc_long_text" > +
+ Modules +
+ + + {DetailTraining["tab_ue_detail_data"] &&
+ +
+ {DetailTraining["tab_ue_detail_data"] && DetailTraining["tab_ue_detail_data"].map((val) => ( +
+ + + } + aria-controls={val._id} + id={val._id} + > + + + {val.titre} + + + + +
{parse(String(val.description).replace(/(<([^>]+)>)/ig, ''))}
+ +
+
+
+ + +
+ ))} +
+ +
} + +
} + +
+ + {DetailTraining["pourqui"] && String(DetailTraining["pourqui"]).length > 2 &&
+
+ Pour Qui +
+ {DetailTraining["pourqui"] &&
+ {parse(String(DetailTraining["pourqui"]))} + + +
+ } +
} + +
+ + {DetailTraining["prerequis"] && String(DetailTraining["prerequis"]).length > 2 &&
+
+ Pré-requis +
+ {DetailTraining["prerequis"] &&
+ {parse(String(DetailTraining["prerequis"]))} + + +
+ + } +
} + + +
+ + {DetailTraining["plus_produit"] && String(DetailTraining["plus_produit"]).length > 2 &&
+
+ Points forts +
+ {DetailTraining["plus_produit"] &&
+ {parse(String(DetailTraining["plus_produit"]))} + + +
+ + } +
} + + + + +
+ +
+ + {/****** Stick droire */} +
+
+ + +
+ + + {class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 &&
+ + +
+ } + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" &&
+ + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("it") && + informatique} + + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("graphisme") && + graphisme} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("management") && + management} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("digital") && + digital} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("office") && + office} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("rh") && + ressources humaines} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("vente") && + vente} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("sport") && + sport} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("sante_nat") && + sante naturelle} + + {(!DetailTraining.img_url || String(DetailTraining.img_url).length <= 0) && + DetailTraining.metier && String(DetailTraining.metier).toLocaleLowerCase() === String("dev_perso") && + developpement personnel} + + +
} + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" &&
+ autre + +
} + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" &&
+ autre + +
} + + + + + {String(DetailTraining["price"]) && String(DetailTraining["price"]) === String("0") && +
+
Gratuit +
+ + {DetailTraining["cpf"] && String(DetailTraining["cpf"]) === "1" &&
Éligible CPF
} + {(!DetailTraining["cpf"] || String(DetailTraining["cpf"]) !== "1") &&
Non Élig. CPF
} +
+ } + + {String(DetailTraining["price"]) && String(DetailTraining["price"]) !== String("0") && (!DetailTraining.business_prices || Object.keys(DetailTraining.business_prices).length <= 0) + && DetailTraining["price"] &&
+ +
+ + {parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> {String(DetailTraining["price"])} € HT } + {parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> {String(DetailTraining["price"])} € TTC } +
+ + {DetailTraining["cpf"] && String(DetailTraining["cpf"]) === "1" &&
Éligible CPF
} + {(!DetailTraining["cpf"] || String(DetailTraining["cpf"]) !== "1") &&
Non Élig. CPF
} + + + +
} + + {String(DetailTraining["price"]) && String(DetailTraining["price"]) !== String("0") && DetailTraining.business_prices && Object.keys(DetailTraining.business_prices).length > 0 + && DetailTraining["price"] && +
+
+ + +
+
Eligle CFP +
+ + {DetailTraining.business_prices && DetailTraining.business_prices.length > 0 &&
+ + +
} + +
} + +
+ +
Caractéristiques
+ + +
+
    + + + +
    + +
    + + + + + +
    + {String(DetailTraining["duration_unit"]) !== "user_rythme" && +
    + {DetailTraining["duration"]}  {DetailTraining["duration_unit"]}(s) + +
    + } + + {String(DetailTraining["duration_unit"]) === "user_rythme" && +
    + VR + +
    + } + +
    + + +
    + +
    + + + + + +
    + +
    + {DetailTraining["certif"] && String(DetailTraining["certif"]) !== String("1") &&
    + + Non  
    + } + {DetailTraining["certif"] && String(DetailTraining["certif"]) === String("1") &&
    + + Oui  
    + } + +
    + + +
    + + +
    + +
    + + + +
    + +
    + {DetailTraining.presentiel && DetailTraining.presentiel.distantiel === "1" &&
    Oui
    } + {DetailTraining.presentiel && DetailTraining.presentiel.distantiel !== "1" &&
    Non
    } + +
    + + +
    + + +
    + +
    + + + +
    + +
    + {DetailTraining.presentiel && DetailTraining.presentiel.presentiel === "1" &&
    Oui
    } + {DetailTraining.presentiel && DetailTraining.presentiel.presentiel !== "1" &&
    Non
    } + +
    + + +
    + + +
    + +
    + +
    + +
    + {DetailTraining["support"] &&
    + + {String(DetailTraining["support"]).charAt(0).toUpperCase() + String(DetailTraining["support"]).slice(1)}
    + } + {!DetailTraining["support"] &&
    + + Non précisé
    + } + +
    +
    +
+ +
+ + +
+
+ + + + {String(action).toLowerCase() !== "information" && String(action).toLowerCase() !== "inscription" &&
+ +
+ +
+
M’inscrire
+
+ +
+
+
M’informer
+
+ +
} + +
+ {String(isqualiopi) === "1" &&
+ +
+ Qualiopi +
+ +
} + {String(isqualiopi) === "1" &&
} + + {String(isdatadock) === "1" &&
+
+ DataDock + +
+ +
} + {String(isdatadock) === "1" &&
} + +
+ {String(iscertifvoltaire) === "1" &&
+ Certitrace + +
} + + +
+ + + +
+ +
+ Organisme de formation +
+ +
+ + {partnair_name && } +
+ +
+ +
+ + +
+ social Mysy Training Facebook +
+ +
+ social Mysy Training LinkedIn +
+ +
+ social Mysy Training X (twitter) + +
+
+ + + + +
+ + +
+ +
+ +
+ + +
+
+ {associatedtraining_message && String(associatedtraining_api) === "True" && associatedtraining_message.length > 0 && +
Cela pourrait aussi vous intéresser
} + +
+ {associatedtraining_message && String(associatedtraining_api) === "True" && + associatedtraining_message.slice(0, 3).map((formation) => ( +
+
+
+ + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("it") && + informatique} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("graphisme") && + graphisme} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("management") && + management} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("digital") && + digital} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("office") && + office} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("rh") && + ressources humaines} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("vente") && + vente} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("sport") && + sport} + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("sante_nat") && + sante naturelle} + + + {JSON.parse(formation).metier && String(JSON.parse(formation).metier).toLocaleLowerCase() === String("dev_perso") && + developpement personnel} + + {!JSON.parse(formation).metier && autre personnel} + + +
+ +
+ + {JSON.parse(formation).cpf && (String(JSON.parse(formation).cpf)) === "1" && +
+ Éligible CPF
} + + {!JSON.parse(formation).cpf || String(JSON.parse(formation).cpf) !== "1" && +
+ NON Éligible CPF
} + +
+ + +
+ +
hh + + {JSON.parse(formation).note && String(JSON.parse(formation).note).length >= 1 && + parseInt(String(JSON.parse(formation).note)) <= 5 && + parseInt(String(JSON.parse(formation).note)) >= 1 && + + } +
+ +
{parse(String(JSON.parse(formation).title)).substring(0, 50)} +
+ + {JSON.parse(formation).price &&
+ + {parseFloat(String(JSON.parse(formation).partnaire_tva)) > 0 && <>{(String(JSON.parse(formation).price))} € HT } + {parseFloat(String(JSON.parse(formation).partnaire_tva)) <= 0 && <>{(String(JSON.parse(formation).price))} € TTC } +
} + + +
+ + + +
+
{ + e.preventDefault(); + //test(props.formation.external_code); + window.open( + "/Display-Detail-formation/" + JSON.parse(formation).internal_url, + '_self' + ); + + + }}> +
+ Voir les détails +
+ +
+
+ +
+ +
+ ))} +
+
+
+
+ +
+ ) +} + + +export default New_C_Inscription_Detail_Formation_2025; \ No newline at end of file diff --git a/src/pages/new_p_inscription_detail_formation_2025.js b/src/pages/new_p_inscription_detail_formation_2025.js new file mode 100644 index 0000000..d544032 --- /dev/null +++ b/src/pages/new_p_inscription_detail_formation_2025.js @@ -0,0 +1,29 @@ +import React, { useState, useEffect } from "react"; +import New_C_Footer_2025_V2 from "../components/footer_automatic_files/Layout"; +import New_C_Header_2025_V2 from "../components/header_automatic_files/Header"; + + +import New_C_Inscription_Detail_Formation_Automatic_Files from "../components/detail_formation_automatic_files/new_inscription_detail_formation_2025" +import New_Navigation_2025 from "../components/New_Navigation_2025"; + + + +const new_p_inscription_detail_formation_2025 = () => { + + + return ( +
+ + + + + + + +
+ + ) +} + + +export default new_p_inscription_detail_formation_2025;