diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js
index 4ce5f7b..40f9c98 100644
--- a/src/components/AddClassManual.js
+++ b/src/components/AddClassManual.js
@@ -257,6 +257,8 @@ const AddClassManual = (props) => {
setfield_datelieu("");
setfield_zone_diffusion("");
setmyApiResponse();
+ Get_List_Domaines();
+ Get_List_Metiers();
fillfield();
if (props.mytrainingclass['class_external_code']) {
@@ -388,10 +390,21 @@ const AddClassManual = (props) => {
if (mylocaltraining.domaine) {
- document.getElementsByName("domaine")[0].value = mylocaltraining.domaine;
+ setmytrainingdomaine(mylocaltraining.domaine);
+ console.log(" ### mylocaltraining.domaine = ", mylocaltraining.domaine);
}
else
- document.getElementsByName("domaine")[0].value = "";
+ setmytrainingdomaine("");
+
+
+ if (mylocaltraining.metier) {
+ setmytrainingmetier(mylocaltraining.metier);
+ console.log(" ### mylocaltraining.metier = ", mylocaltraining.metier);
+ }
+ else
+ setmytrainingmetier("");
+
+
if (mylocaltraining.duration)
document.getElementsByName("duree")[0].value = mylocaltraining.duration;
@@ -406,9 +419,6 @@ const AddClassManual = (props) => {
- document.getElementsByName("metier")[0].value = "";
- if (mylocaltraining.metier)
- document.getElementsByName("metier")[0].value = mylocaltraining.metier;
document.getElementsByName("note")[0].value = "";
if (mylocaltraining.note)
@@ -514,6 +524,7 @@ const AddClassManual = (props) => {
var trainingSupport = document.getElementsByName("training_support")[0].value;
var banniereImg = document.getElementsByName("class_banner_img_url")[0].value;
+
var pourqui = "";
if (editorRef_pourqui.current) {
pourqui = editorRef_pourqui.current.getContent();
@@ -592,9 +603,9 @@ const AddClassManual = (props) => {
local_mot_cle = mots_cle;
}
- console.log(" ## local_mot_cle = ", local_mot_cle);
+ //console.log(" ## local_mot_cle = ", local_mot_cle);
var words = local_mot_cle.split(';');
- console.log(" ## words = ", words);
+ //console.log(" ## words = ", words);
if (words.length > 3) {
alert(" Il a plus de 3 mots clés. le max autorisé est 3");
@@ -686,7 +697,7 @@ const AddClassManual = (props) => {
//alert(result['status'] + " -- " + myApiResponse + ' mess = ' + result['message']);
- if(String(result['status']) === "true" ){
+ if (String(result['status']) === "true") {
alert(" La formation a été correctement ajoutée. Vous allez être redirigé vers la liste des formations.");
history.push({
pathname: "/Partner/",
@@ -711,6 +722,93 @@ const AddClassManual = (props) => {
}
+ const [mytrainingmetier, setmytrainingmetier] = useState("");
+ const [Get_List_Metiers_api, setGet_List_Metiers_api] = useState();
+ const [Get_List_Metiers_message, setGet_List_Metiers_message] = useState();
+ const [Get_List_Metiers_result, setGet_List_Metiers_result] = useState();
+ function Get_List_Metiers() {
+ var form = new FormData();
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_List_metier_formation/";
+
+ fetch(myurl,
+ {
+ method: 'POST',
+ body: form,
+ })
+ .then((data) => data.json())
+ .then((data) => {
+ //console.log(' IN Get_List_Metiers Success:', data['message'], "data['status'] = ", data['status']);
+
+ if (String(data['status']) === String("true")) {
+ setGet_List_Metiers_api("true");
+ setGet_List_Metiers_result(data['message']);
+
+ }
+ else {
+ setGet_List_Metiers_api("false");
+ setGet_List_Metiers_message(data['message']);
+ }
+
+ }).catch((error) => {
+ console.error('Error Get_List_Metiers :', error);
+ setGet_List_Metiers_api("false");
+ });
+
+ }
+
+
+ const handleChangeMetierTraining = (event) => {
+ const name = event.target.name;
+ const value = event.target.value;
+
+ setmytrainingmetier(value);
+ setdatamodification("1");
+
+ }
+
+
+ const [mytrainingdomaine, setmytrainingdomaine] = useState("");
+ const [Get_List_Domaines_api, setGet_List_Domaines_api] = useState();
+ const [Get_List_Domaines_message, setGet_List_Domaines_message] = useState();
+ const [Get_List_Domaines_result, setGet_List_Domaines_result] = useState();
+ function Get_List_Domaines() {
+ var form = new FormData();
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_List_domaine_formation/";
+
+ fetch(myurl,
+ {
+ method: 'POST',
+ body: form,
+ })
+ .then((data) => data.json())
+ .then((data) => {
+ //console.log(' IN Get_List_Domaines Success:', data['message'], "data['status'] = ", data['status']);
+
+ if (String(data['status']) === String("true")) {
+ setGet_List_Domaines_api("true");
+ setGet_List_Domaines_result(data['message']);
+
+ }
+ else {
+ setGet_List_Domaines_api("false");
+ setGet_List_Domaines_message(data['message']);
+ }
+
+ }).catch((error) => {
+ console.error('Error Get_List_Domaines :', error);
+ setGet_List_Domaines_api("false");
+ });
+ }
+
+ const handleChangeDomaineTraining = (event) => {
+ const name = event.target.name;
+ const value = event.target.value;
+
+ setmytrainingdomaine(value);
+ setdatamodification("1");
+
+ }
+
function alertactivecompte() {
//alert(" ispending = ===== " + props.ispending);
@@ -1213,6 +1311,7 @@ const AddClassManual = (props) => {
{
}}
disabled={false}
className="disabled_style"
- />
+ onChange={handleChangeDomaineTraining}
+ value={mytrainingdomaine}
+ >
+ {Get_List_Domaines_result && Get_List_Domaines_result.map((option) => (
+
+ ))}
+
+
+
+
+
+
+ {Get_List_Metiers_result && Get_List_Metiers_result.map((option) => (
+
+ ))}
+
@@ -1291,20 +1420,6 @@ const AddClassManual = (props) => {
/>
-
-
-
-
-
{
{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) === "1" && }
- {( !(JSON.parse(formation).session_ondemande) || (JSON.parse(formation).session_ondemande) === "0") && }
))}
@@ -1888,55 +1888,55 @@ const DisplayDetailClass_new_v2 = (props) => {
{(JSON.parse(formation).session_ondemande) && (JSON.parse(formation).session_ondemande) === "1" && Sessions de formation à la demande}
- {( !(JSON.parse(formation).session_ondemande) || (JSON.parse(formation).session_ondemande) === "0") &&
+ {(!(JSON.parse(formation).session_ondemande) || (JSON.parse(formation).session_ondemande) === "0") &&
{(JSON.parse(formation).distantiel) === "1" && (JSON.parse(formation).presentiel) === "1" &&
- (JSON.parse(formation).date_debut).substring(0, 10) !== (JSON.parse(formation).date_fin).substring(0, 10) &&
-
- {(JSON.parse(formation).date_debut).substring(0, 10)} au
- {(JSON.parse(formation).date_fin).substring(0, 10)} A Distance et En Présentiel - {(JSON.parse(formation).adresse)} {(JSON.parse(formation).code_postal)}
-
- }
+ (JSON.parse(formation).date_debut).substring(0, 10) !== (JSON.parse(formation).date_fin).substring(0, 10) &&
+
+ {(JSON.parse(formation).date_debut).substring(0, 10)} au
+ {(JSON.parse(formation).date_fin).substring(0, 10)} A Distance et En Présentiel - {(JSON.parse(formation).adresse)} {(JSON.parse(formation).code_postal)}
+
+ }
- {(JSON.parse(formation).distantiel) === "1" && (JSON.parse(formation).presentiel) === "1" &&
- (JSON.parse(formation).date_debut).substring(0, 10) === (JSON.parse(formation).date_fin).substring(0, 10) &&
-
- Le
- {(JSON.parse(formation).date_fin).substring(0, 10)} A Distance et En Présentiel - {(JSON.parse(formation).adresse)} {(JSON.parse(formation).code_postal)}
-
- }
+ {(JSON.parse(formation).distantiel) === "1" && (JSON.parse(formation).presentiel) === "1" &&
+ (JSON.parse(formation).date_debut).substring(0, 10) === (JSON.parse(formation).date_fin).substring(0, 10) &&
+
+ Le
+ {(JSON.parse(formation).date_fin).substring(0, 10)} A Distance et En Présentiel - {(JSON.parse(formation).adresse)} {(JSON.parse(formation).code_postal)}
+
+ }
- {(JSON.parse(formation).distantiel) === "1" && ((JSON.parse(formation).presentiel) === "0" || !(JSON.parse(formation).presentiel)) &&
- (JSON.parse(formation).date_debut).substring(0, 10) !== (JSON.parse(formation).date_fin).substring(0, 10) &&
-
- {(JSON.parse(formation).date_debut).substring(0, 10)} au
- {(JSON.parse(formation).date_fin).substring(0, 10)} A Distance
- }
+ {(JSON.parse(formation).distantiel) === "1" && ((JSON.parse(formation).presentiel) === "0" || !(JSON.parse(formation).presentiel)) &&
+ (JSON.parse(formation).date_debut).substring(0, 10) !== (JSON.parse(formation).date_fin).substring(0, 10) &&
+
+ {(JSON.parse(formation).date_debut).substring(0, 10)} au
+ {(JSON.parse(formation).date_fin).substring(0, 10)} A Distance
+ }
- {(JSON.parse(formation).distantiel) === "1" && ((JSON.parse(formation).presentiel) === "0" || !(JSON.parse(formation).presentiel)) &&
- (JSON.parse(formation).date_debut).substring(0, 10) === (JSON.parse(formation).date_fin).substring(0, 10) &&
-
- Le
- {(JSON.parse(formation).date_fin).substring(0, 10)} A Distance
- }
+ {(JSON.parse(formation).distantiel) === "1" && ((JSON.parse(formation).presentiel) === "0" || !(JSON.parse(formation).presentiel)) &&
+ (JSON.parse(formation).date_debut).substring(0, 10) === (JSON.parse(formation).date_fin).substring(0, 10) &&
+
+ Le
+ {(JSON.parse(formation).date_fin).substring(0, 10)} A Distance
+ }
- {(JSON.parse(formation).presentiel) === "1" && ((JSON.parse(formation).distantiel) === "0" || !(JSON.parse(formation).distantiel)) &&
- (JSON.parse(formation).date_debut).substring(0, 10) !== (JSON.parse(formation).date_fin).substring(0, 10) &&
-
- {(JSON.parse(formation).date_debut).substring(0, 10)} au {(JSON.parse(formation).date_fin).substring(0, 10)} En Présentiel -
- {(JSON.parse(formation).adresse)} {(JSON.parse(formation).code_postal)}
- }
+ {(JSON.parse(formation).presentiel) === "1" && ((JSON.parse(formation).distantiel) === "0" || !(JSON.parse(formation).distantiel)) &&
+ (JSON.parse(formation).date_debut).substring(0, 10) !== (JSON.parse(formation).date_fin).substring(0, 10) &&
+
+ {(JSON.parse(formation).date_debut).substring(0, 10)} au {(JSON.parse(formation).date_fin).substring(0, 10)} En Présentiel -
+ {(JSON.parse(formation).adresse)} {(JSON.parse(formation).code_postal)}
+ }
- {(JSON.parse(formation).presentiel) === "1" && ((JSON.parse(formation).distantiel) === "0" || !(JSON.parse(formation).distantiel)) &&
- (JSON.parse(formation).date_debut).substring(0, 10) === (JSON.parse(formation).date_fin).substring(0, 10) &&
-
- Le {(JSON.parse(formation).date_fin).substring(0, 10)} En Présentiel -
- {(JSON.parse(formation).adresse)} {(JSON.parse(formation).code_postal)}
- }
+ {(JSON.parse(formation).presentiel) === "1" && ((JSON.parse(formation).distantiel) === "0" || !(JSON.parse(formation).distantiel)) &&
+ (JSON.parse(formation).date_debut).substring(0, 10) === (JSON.parse(formation).date_fin).substring(0, 10) &&
+
+ Le {(JSON.parse(formation).date_fin).substring(0, 10)} En Présentiel -
+ {(JSON.parse(formation).adresse)} {(JSON.parse(formation).code_postal)}
+ }
- }
+ }
))}
diff --git a/src/components/Formation - Copie.js b/src/components/Formation - Copie.js
index 4a0932a..2dce705 100644
--- a/src/components/Formation - Copie.js
+++ b/src/components/Formation - Copie.js
@@ -290,7 +290,7 @@ const Formation_copie = (props) => {
{String(props.formation.price).length == 9 &&
-
En attente
+
Prix : Non communiqué
}
diff --git a/src/components/Formation.js b/src/components/Formation.js
index 063a08d..a4bbb0c 100644
--- a/src/components/Formation.js
+++ b/src/components/Formation.js
@@ -331,7 +331,7 @@ const Formation = (props) => {
{String(props.formation.price).length == 9 &&
-
En attente
+
Prix : Non communiqué
}
diff --git a/src/components/Formation_Cartouche_Com.js b/src/components/Formation_Cartouche_Com.js
index d85dfb9..8913d96 100644
--- a/src/components/Formation_Cartouche_Com.js
+++ b/src/components/Formation_Cartouche_Com.js
@@ -292,7 +292,7 @@ const Formation_Cartouche_Com = (props) => {
{String(props.formation.price).length == 9 &&
-
En attente
+
Prix : Non communiqué
}
diff --git a/src/components/GestionAdministrative.js b/src/components/GestionAdministrative.js
index 08b7051..5838654 100644
--- a/src/components/GestionAdministrative.js
+++ b/src/components/GestionAdministrative.js
@@ -3498,8 +3498,8 @@ function GestionAdministrative(props) {
axios.post(myurl, form).then(res => {
- console.log(" In One_Create_Participant res.data.status = " + res.data.status);
- console.log(" In One_Create_Participant res.data.message r_class = " + res.data.message);
+ //console.log(" In One_Create_Participant res.data.status = " + res.data.status);
+ //console.log(" In One_Create_Participant res.data.message r_class = " + res.data.message);
if (String(res.data.status) === "true") {
setOne_Create_Participant_api("true");
diff --git a/src/components/Recherche_new_v2.js b/src/components/Recherche_new_v2.js
index ac1cf1d..dd994e6 100644
--- a/src/components/Recherche_new_v2.js
+++ b/src/components/Recherche_new_v2.js
@@ -1053,7 +1053,7 @@ const Recherche_new_v2 = () => {
var form = new FormData();
fetch(
- process.env.REACT_APP_API_URL + "myclass/api/get_List_domaine_metier/",
+ process.env.REACT_APP_API_URL + "myclass/api/get_List_domaine_metier/",
{
method: 'POST',