From 3dc82820b96cdf495c5683e12268ca2c8778c9d9 Mon Sep 17 00:00:00 2001 From: cherif Date: Thu, 19 Sep 2024 20:26:55 +0200 Subject: [PATCH] 19/09/2024 - 20h --- src/components/Formation.js | 84 +- src/components/Formation_Grid_2Col.js | 717 ++++++++ src/components/Formation_Partner_Catalog.js | 2 +- ...=> Formation_Partner_Catalog_Grid_2Col.js} | 344 +++- src/components/Mon_Catalogue_Public.js | 1607 ++++++++--------- src/components/Recherche_new_v4.js | 13 +- src/components/UpdatePartnerInfo.js | 2 +- .../components/_mon_catalogue_public.scss | 141 +- src/styles/components/_reherche_new_v4.scss | 285 ++- 9 files changed, 2073 insertions(+), 1122 deletions(-) create mode 100644 src/components/Formation_Grid_2Col.js rename src/components/{Formation - Copie.js => Formation_Partner_Catalog_Grid_2Col.js} (62%) diff --git a/src/components/Formation.js b/src/components/Formation.js index b76f17a..41782ba 100644 --- a/src/components/Formation.js +++ b/src/components/Formation.js @@ -570,74 +570,7 @@ const Formation = (props) => { - {/*
-
- Type -
- -
- {props.formation.type}   -
-
- -
-
- Support -
- -
- {props.formation.support}   -
-
- - */} - {/*props.formation.zone_diffusion && props.formation.zone_diffusion.country &&
-
- Test : pays -
- -
- {props.formation.zone_diffusion.country}   -
-
*/} - - {/*props.formation.zone_diffusion && props.formation.zone_diffusion.city &&
-
- Test : Ville -
- -
- {props.formation.zone_diffusion.city}   -
-
*/} - - - {/* - {props.formation.presentiel && props.formation.presentiel.presentiel && -
-
- Presentiel -
- -
- - {props.formation.presentiel.presentiel}   - -
-
} - {props.formation.presentiel && props.formation.presentiel.distantiel && -
-
- Distantiel -
- -
- - {props.formation.presentiel.distantiel}   - -
-
} - */} + } @@ -707,20 +640,7 @@ const Formation = (props) => { } - {/*
-
- Type -
- {props.formation.type && -
- {props.formation.type} -
} - - {!props.formation.type && -
- NC -
} -
*/} + diff --git a/src/components/Formation_Grid_2Col.js b/src/components/Formation_Grid_2Col.js new file mode 100644 index 0000000..ba75175 --- /dev/null +++ b/src/components/Formation_Grid_2Col.js @@ -0,0 +1,717 @@ +import React, { useState, useEffect } from "react"; +import ReactPlayer from 'react-player' +import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from "react-share"; +import { SocialIcon } from 'react-social-icons'; +import { Button, } from "reactstrap"; +import { useHistory } from "react-router-dom"; +import { Helmet } from "react-helmet"; +import { useCookies } from "react-cookie"; +import { confirmAlert } from 'react-confirm-alert'; +import topimg from "../mysy_img/top.png"; +import coeurimg from "../mysy_img/coeur.png"; +import img_met_program from "../mysy_img/met_programmation.jpg"; +import img_met_hotel from "../mysy_img/met_hotel.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_projet from "../mysy_img/met_projet.jpg"; + +import img_met_market from "../mysy_img/met_market.jpg"; +import img_met_autre2 from "../mysy_img/met_autre2.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 axios from "axios"; +//import { Rating } from 'react-simple-star-rating' +import Rating from '@mui/material/Rating'; +import parse from 'html-react-parser' +import { CiLocationOn } from "react-icons/ci"; + +const Formation_Grid_2Col = (props) => { + 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 history = useHistory(); + const [myfilter, setmyfilter] = useState(props.formation.price); + + const [profileimg, setprofileimg] = useState(props.formation.price); + + + // Gestion des Cookies + const stored_partner = cookie_part.tokenmysypart; + const stored_user = cookie.tokenmysych; + + function test(val) { + + if (userconnected === "0" && partnerconnected === "0") { + confirmAlert({ + title: 'Activer votre session ?', + message: 'Merci de vous connecter pour acceder au detail de cette formation', + buttons: [ + { + label: 'Oui', + onClick: () => { history.push("/mysy-training-login/training/" + props.formation.internal_url) } + }, + { + label: 'Non', + onClick: () => { return } + + } + ], + closeOnEscape: false, + closeOnClickOutside: false, + keyCodeForClose: [8, 32], + willUnmount: () => { }, + afterClose: () => { }, + onClickOutside: () => { }, + onKeypress: () => { }, + onKeypressEscape: () => { }, + }); + } else { + window.open( + "/Display-Detail-formation/" + props.formation.internal_url, + '_blank' + ); + } + + + } + + 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 => { + + 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(""); + }) + + } + + + /* 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"]; + + useEffect(() => { + setmyfilter(props.myfil); + + if (typeof (stored_user) === "undefined" || String(stored_user) === '') { + setuserconnected("0"); + } else { + setuserconnected("1"); + } + + if (typeof (stored_partner) === "undefined" || String(stored_partner) === '') { + setpartnerconnected("0"); + } else { + setpartnerconnected("1"); + } + + getClassImage_no_token(); + GetCurrentClass_trainingsession(); + + GetCurrentClass_trainingsession_cities(); + + // Verifier si le metier est geré + if (props.formation.metier) { + if (!liste_metier.includes(props.formation.metier)) { + setismetiermanaged("0"); // j'ai une valeur dans metier, mais qui n'est pas geré + } + } + else { + setismetiermanaged("0"); + } + + if (props.formation.img_url && String(props.formation.img_url).length > 0) { + setismetiermanaged("1"); + } + + }, []); + + + 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", props.formation.internal_url); + + form.append("token", stored_partner); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSessionFormation_List/"; + + axios.post(myurl, form).then(res => { + + if (res.data.status != "false") { + //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 [GetCurrentClass_trainingsession_cities_api, setGetCurrentClass_trainingsession_cities_api] = useState(); + const [GetCurrentClass_trainingsession_cities_message, setGetCurrentClass_trainingsession_cities_message] = useState(); + const [GetCurrentClass_trainingsession_cities_result, setGetCurrentClass_trainingsession_cities_result] = useState([]); + function GetCurrentClass_trainingsession_cities(event) { + + var form = new FormData(); + + form.append("class_internal_url", props.formation.internal_url); + + form.append("token", stored_partner); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSession_Cities_And_Distance_Formation_List/"; + + axios.post(myurl, form).then(res => { + + if (res.data.status != "false") { + //console.log(" In GetCurrentClass_trainingsession_cities res.data.status = " + res.data.status); + //console.log(" In GetCurrentClass_trainingsession_cities res.data.message r_class = " + res.data.message); + setGetCurrentClass_trainingsession_cities_api("true"); + setGetCurrentClass_trainingsession_cities_result(res.data.message); + } + else { + setGetCurrentClass_trainingsession_cities_api("false"); + setGetCurrentClass_trainingsession_cities_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( GetCurrentClass_trainingsession_cities = ', error); + setGetCurrentClass_trainingsession_cities_api("false"); + //setmyApimyApiMessage("") + }) + } + + + const [Grid_limit_Title, setGrid_limit_Title] = useState(50); + const [Grid_limit_Desc, setGrid_limit_Desc] = useState(100); + return ( + +
+ +
+ + {class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 &&
+ informatique +
+ } + + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" &&
+ + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") && + String(isclassimage) === "False" && informatique} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") && + String(isclassimage) === "False" && graphisme} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") && + String(isclassimage) === "False" && management} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") && + String(isclassimage) === "False" && digital} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") && + String(isclassimage) === "False" && office} + + {!props.formation.img_url || String(props.formation.img_url).length <= 0 && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") && + String(isclassimage) === "False" && ressources humaines} + + {!props.formation.img_url || String(props.formation.img_url).length <= 0 && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") && + String(isclassimage) === "False" && vente} + + {!props.formation.img_url || String(props.formation.img_url).length <= 0 && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("dev_perso") && + String(isclassimage) === "False" && developpement personnel} + + {String(isclassimage) === "True" && developpement personnel} + + +
+ } + + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 &&
+ autre + {props.formation.institut_formation &&
Dispensé par :
{String(props.formation.institut_formation)}
} +
} + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 &&
+ autre + {props.formation.institut_formation &&
Dispensé par :
{String(props.formation.institut_formation)}
} +
} + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" &&
+ autre + {props.formation.institut_formation &&
Dispensé par :
{String(props.formation.institut_formation)}
} +
} + + +
{ + e.preventDefault(); + if (props.formation.url && props.formation.url.length > 5) { + + window.open( + props.formation.url, + '_blank' + ); + } else { + window.open( + "/Display-Detail-formation/" + props.formation.internal_url, + '_blank' + ); + } + }}> +
+
+ +
+ {props.formation.note && String(props.formation.note).length === 1 && + parseInt(String(props.formation.note)) <= 5 && + + + + } + +
+
+
+
+ + + {props.formation.cpf && String(props.formation.cpf) === String("1") && +
+ OUI Éligible au CPF   +
} + + {props.formation.cpf && String(props.formation.cpf) !== String("1") && +
+ NON Éligible au CPF   +
} + + {!props.formation.cpf && +
+ NON Éligible au CPF   +
} + +
+
+
+
+ +
+

+ + {String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 20)}... + + +

+
+
+ + {String(props.formation.price).length == 9 && +
Prix : Non communiqué   +
+ } + + + {String(props.formation.price).length != 9 && String(props.formation.price) === String("0") && +
Gratuit   +
+ } + + {String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && (!props.formation.business_prices || + Object.keys(props.formation.business_prices).length <= 0) && +
{props.formation.price} € HT  + +
+ } + + {String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && + props.formation.business_prices && Object.keys(props.formation.business_prices).length > 0 && +
+ + + + +
+ } + +
+ +
+ {parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, '')).substring(0, 150)} + +
+ {GetCurrentClass_trainingsession_cities_result && GetCurrentClass_trainingsession_cities_result.length > 0 && + + } + {!GetCurrentClass_result || GetCurrentClass_result.length <= 0 && + + } + +
+
+
+ +
+ +
+
+ {!props.formation.extented_search && +
+ + + {props.formation.duration_unit && +
+
Durée +
+ + {String(props.formation.duration_unit) === "heure" && +
+ {props.formation.duration} hr(s)   +
} + + {String(props.formation.duration_unit) === "heures" && +
+ {props.formation.duration} hr(s)   +
} + + + {String(props.formation.duration_unit) === "jour" && +
+ {props.formation.duration} jr(s)   +
} + + {String(props.formation.duration_unit) === "mois" && +
+ {props.formation.duration} mois(s) +
} + + {String(props.formation.duration_unit) === "semaine" && +
+ {props.formation.duration} Sem (s) +
} + + {String(props.formation.duration_unit) === "user_rythme" && +
+ A votre rythme +
} + +
+ } + + + {!props.formation.duration_unit && +
+
Durée +
+ + {props.formation.duration &&
+ {props.formation.duration} jr(s)   +
} + + {!props.formation.duration &&
+ En traitement   +
} + + +
+ + } +
+
+ Certification +
+ +
+ {props.formation.certif && String(props.formation.certif) === String("1") && +
+ Oui   +
} + + {props.formation.certif && String(props.formation.certif) !== String("1") && +
+ Non   +
} + + {!props.formation.certif && +
+ NC   +
} + + +
+
+ +
+ + + +   + + + + + +   + + + + +
+ + + + +
} + + +
+ {String(props.formation.coeur) === String("1") &&
+ coup de coeur +
} + + + + + +
+
+ Sur site +
+ {props.formation.presentiel && props.formation.presentiel.presentiel && + String(props.formation.presentiel.presentiel) === String("1") &&
+ Oui +
} + + {props.formation.presentiel && props.formation.presentiel.presentiel && + String(props.formation.presentiel.presentiel) !== String("1") &&
+ Non +
} + + {!props.formation.presentiel || !props.formation.presentiel.presentiel && +
+ NC +
} +
+ +
+
+ A distance +
+ {props.formation.presentiel && props.formation.presentiel.distantiel && + String(props.formation.presentiel.distantiel) === String("1") &&
+ Oui +
} + + {props.formation.presentiel && props.formation.presentiel.distantiel && + String(props.formation.presentiel.distantiel) !== String("1") &&
+ Non +
} + + {!props.formation.presentiel || !props.formation.presentiel.distantiel && +
+ NC +
} +
+ +
+
+ Support +
+ {props.formation.support && +
+ {props.formation.support} +
} + + {!props.formation.support && +
+ NC +
} +
+ + + +
+ +
+
+
+ {!props.formation.extented_search && props.formation.coeur != "1" && +
+ + + + + + + + +
} + +
+
+
+
+ + ) +} + + +export default Formation_Grid_2Col; \ No newline at end of file diff --git a/src/components/Formation_Partner_Catalog.js b/src/components/Formation_Partner_Catalog.js index 6bbe0b1..7a39078 100644 --- a/src/components/Formation_Partner_Catalog.js +++ b/src/components/Formation_Partner_Catalog.js @@ -30,7 +30,7 @@ import axios from "axios"; import Rating from '@mui/material/Rating'; import parse from 'html-react-parser' import { CiLocationOn } from "react-icons/ci"; - + const Formation_Partner_Catalog = (props) => { const [userconnected, setuserconnected] = useState("0"); const [partnerconnected, setpartnerconnected] = useState("0"); diff --git a/src/components/Formation - Copie.js b/src/components/Formation_Partner_Catalog_Grid_2Col.js similarity index 62% rename from src/components/Formation - Copie.js rename to src/components/Formation_Partner_Catalog_Grid_2Col.js index 645ae92..277cc00 100644 --- a/src/components/Formation - Copie.js +++ b/src/components/Formation_Partner_Catalog_Grid_2Col.js @@ -29,8 +29,9 @@ import axios from "axios"; //import { Rating } from 'react-simple-star-rating' import Rating from '@mui/material/Rating'; import parse from 'html-react-parser' +import { CiLocationOn } from "react-icons/ci"; -const Formation_copie = (props) => { +const Formation_Partner_Catalog_Grid_2Col = (props) => { const [userconnected, setuserconnected] = useState("0"); const [partnerconnected, setpartnerconnected] = useState("0"); const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']); @@ -73,7 +74,7 @@ const Formation_copie = (props) => { }); } else { window.open( - "/Display-Detail-formation/" + props.formation.internal_url, + "/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url, '_blank' ); } @@ -83,60 +84,66 @@ const Formation_copie = (props) => { const [myclassimage, setmyclassimage] = useState(); const [isclassimage, setisclassimage] = useState("False"); - const [userimgclassprofil, setuserimgclassprofil] = useState(); + const [userimgclassprofil, setuserimgclassprofil] = useState(""); - function getClassImage(e) { - var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedClassImage_from_front/"; + const [class_img_stored_in_bdd, setclass_img_stored_in_bdd] = useState(""); - var class_external_code = props.formation.external_code; + function getClassImage_no_token() { + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedClassImage_no_token/"; - if (class_external_code.length < 3) { - //console.log("Le code externe prend au moins 3 caractères"); - return; - } - //console.log(" class_external_code = " + class_external_code); var form = new FormData(); - form.append("class_external_code", class_external_code); + + 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 => { 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"); - //console.log(" getClassImage : In test res.data.status = " + res.data.status); - //console.log(" getClassImage: res.data.message.img = " + res.data.message); - - var ch_img = "data:image/png;base64," + res.data.message.img; - setuserimgclassprofil(ch_img); - //console.log("ch_img = "+ch_img); } 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(); - //alert("4"); + setclass_img_stored_in_bdd(); } }).catch((error) => { - console.warn('getClassImage ii : Not good man :( getClassImage = '); + + console.warn('getClassImage ee: Not good man :( getClassImage = '); setisclassimage("False"); - setuserimgclassprofil(profileimg); + setuserimgclassprofil(""); + setclass_img_stored_in_bdd(""); }) } + /* 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"]; + useEffect(() => { setmyfilter(props.myfil); @@ -152,9 +159,25 @@ const Formation_copie = (props) => { setpartnerconnected("1"); } - getClassImage(); + getClassImage_no_token(); GetCurrentClass_trainingsession(); + GetCurrentClass_trainingsession_cities(); + + // Verifier si le metier est geré + if (props.formation.metier) { + if (!liste_metier.includes(props.formation.metier)) { + setismetiermanaged("0"); // j'ai une valeur dans metier, mais qui n'est pas geré + } + } + else { + setismetiermanaged("0"); + } + + if (props.formation.img_url && String(props.formation.img_url).length > 0) { + setismetiermanaged("1"); + } + }, []); @@ -166,9 +189,9 @@ const Formation_copie = (props) => { var form = new FormData(); form.append("class_internal_url", props.formation.internal_url); - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - + + form.append("token", stored_partner); + var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSessionFormation_List/"; axios.post(myurl, form).then(res => { @@ -192,18 +215,52 @@ const Formation_copie = (props) => { } + const [GetCurrentClass_trainingsession_cities_api, setGetCurrentClass_trainingsession_cities_api] = useState(); + const [GetCurrentClass_trainingsession_cities_message, setGetCurrentClass_trainingsession_cities_message] = useState(); + const [GetCurrentClass_trainingsession_cities_result, setGetCurrentClass_trainingsession_cities_result] = useState([]); + function GetCurrentClass_trainingsession_cities(event) { + + var form = new FormData(); + + form.append("class_internal_url", props.formation.internal_url); + + form.append("token", stored_partner); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSession_Cities_And_Distance_Formation_List/"; + + axios.post(myurl, form).then(res => { + + if (res.data.status != "false") { + //console.log(" In GetCurrentClass_trainingsession_cities res.data.status = " + res.data.status); + //console.log(" In GetCurrentClass_trainingsession_cities res.data.message r_class = " + res.data.message); + setGetCurrentClass_trainingsession_cities_api("true"); + setGetCurrentClass_trainingsession_cities_result(res.data.message); + } + else { + setGetCurrentClass_trainingsession_cities_api("false"); + setGetCurrentClass_trainingsession_cities_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( GetCurrentClass_trainingsession_cities = ', error); + setGetCurrentClass_trainingsession_cities_api("false"); + //setmyApimyApiMessage("") + }) + } + return ( -
+
-
- {props.formation.img_url && String(props.formation.img_url).length > 0 && String(isclassimage) === "False" && - } - {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && - String(isclassimage) === "False" && - !props.formation.metier && autre} + {class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 &&
+ informatique +
+ } + + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" &&
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) && props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") && @@ -241,26 +298,58 @@ const Formation_copie = (props) => {
+ } + + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 &&
+ autre + {props.formation.institut_formation &&
Dispensé par :
{String(props.formation.institut_formation)}
} +
} + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 &&
+ autre + {props.formation.institut_formation &&
Dispensé par :
{String(props.formation.institut_formation)}
} +
} + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" &&
+ autre + {props.formation.institut_formation &&
Dispensé par :
{String(props.formation.institut_formation)}
} +
} + +
{ e.preventDefault(); + if (props.formation.url && props.formation.url.length > 5) { - window.open( - "/Display-Detail-formation/" + props.formation.internal_url, - '_blank' - ); - + window.open( + props.formation.url, + '_blank' + ); + } else { + window.open( + "/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url, + '_blank' + ); + } }}>
- + {props.formation.note && String(props.formation.note).length === 1 && + parseInt(String(props.formation.note)) <= 5 && + + + + } +
+ {props.formation.cpf && String(props.formation.cpf) === String("1") &&
OUI Éligible au CPF   @@ -281,10 +370,10 @@ const Formation_copie = (props) => {
-
+

- {parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))} + {String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 20)}...

@@ -292,7 +381,7 @@ const Formation_copie = (props) => {
{String(props.formation.price).length == 9 && -
Prix : Non communiqué   +
Prix : Non communiqué  
} @@ -302,22 +391,63 @@ const Formation_copie = (props) => {
} - {String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && -
{props.formation.price} €  HT + {String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && (!props.formation.business_prices || + Object.keys(props.formation.business_prices).length <= 0) && +
{props.formation.price} € HT  +
} + {String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && + props.formation.business_prices && Object.keys(props.formation.business_prices).length > 0 && +
+ + + + +
+ }
-
- {parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))} +
+ {parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, '')).substring(0, 150)}
+ {GetCurrentClass_trainingsession_cities_result && GetCurrentClass_trainingsession_cities_result.length > 0 && + + } + {!GetCurrentClass_result || GetCurrentClass_result.length <= 0 && + + }
-
+

@@ -329,23 +459,38 @@ const Formation_copie = (props) => { {props.formation.duration_unit &&
-
Durée : +
Durée
{String(props.formation.duration_unit) === "heure" &&
- {props.formation.duration} hr   + {props.formation.duration} hr(s)  
} {String(props.formation.duration_unit) === "heures" &&
- {props.formation.duration} hr   + {props.formation.duration} hr(s)  
} {String(props.formation.duration_unit) === "jour" &&
- {props.formation.duration} jr   + {props.formation.duration} jr(s)   +
} + + {String(props.formation.duration_unit) === "mois" && +
+ {props.formation.duration} mois(s) +
} + + {String(props.formation.duration_unit) === "semaine" && +
+ {props.formation.duration} Sem (s) +
} + + {String(props.formation.duration_unit) === "user_rythme" && +
+ A votre rythme
}
@@ -354,11 +499,11 @@ const Formation_copie = (props) => { {!props.formation.duration_unit &&
-
Durée : +
Durée
{props.formation.duration &&
- {props.formation.duration} jrs   + {props.formation.duration} jr(s)  
} {!props.formation.duration &&
@@ -371,7 +516,7 @@ const Formation_copie = (props) => { }
- Certification : + Certification
@@ -396,7 +541,7 @@ const Formation_copie = (props) => {
{   @@ -414,7 +559,7 @@ const Formation_copie = (props) => {   {
- Sur site : + Sur site
{props.formation.presentiel && props.formation.presentiel.presentiel && String(props.formation.presentiel.presentiel) === String("1") &&
@@ -530,7 +675,7 @@ const Formation_copie = (props) => {
- A distance : + A distance
{props.formation.presentiel && props.formation.presentiel.distantiel && String(props.formation.presentiel.distantiel) === String("1") &&
@@ -550,17 +695,34 @@ const Formation_copie = (props) => {
- Support : + Support
- {props.formation.support &&
- {props.formation.support} -
} - - - + {props.formation.support && +
+ {props.formation.support} +
} + {!props.formation.support && +
+ NC +
}
+ {/*
+
+ Type +
+ {props.formation.type && +
+ {props.formation.type} +
} + + {!props.formation.type && +
+ NC +
} +
*/} +
@@ -573,47 +735,49 @@ const Formation_copie = (props) => { onClick={(e) => { e.preventDefault(); + if (props.formation.url && props.formation.url.length > 5) { - window.open( - "/Display-Detail-formation/" + props.formation.internal_url + "/Information", - '_blank' - ); + window.open( + props.formation.url, + '_blank' + ); + } else { + + window.open( + "/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url + "/Information", + '_blank' + ); + } }} - >Se renseigner + >Se renseigner - - - {GetCurrentClass_result && GetCurrentClass_result.length > 0 && - - >S'incrire - } +
} @@ -626,4 +790,4 @@ const Formation_copie = (props) => { } -export default Formation_copie; \ No newline at end of file +export default Formation_Partner_Catalog_Grid_2Col; \ No newline at end of file diff --git a/src/components/Mon_Catalogue_Public.js b/src/components/Mon_Catalogue_Public.js index e73d3d7..cd5d653 100644 --- a/src/components/Mon_Catalogue_Public.js +++ b/src/components/Mon_Catalogue_Public.js @@ -4,10 +4,8 @@ import axios from "axios"; import Formation_Partner_Catalog from "./Formation_Partner_Catalog"; import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa'; import { BsFillXCircleFill } from "react-icons/bs"; - - - - +import { IoAppsSharp, IoListSharp } from "react-icons/io5"; +import Formation_Grid_2Col from "./Formation_Grid_2Col"; import Pagination from "./TestPagination"; import data from "./data/mock-data.json"; import { useHistory } from "react-router-dom"; @@ -2591,6 +2589,7 @@ const Mon_Catalogue_Public = () => { //console.log(" c'est url_subdomain ", url_subdomain); const [subdomain_recid, setsubdomain_recid] = useState(""); + const [my_theme_code, setmy_theme_code] = useState(""); const [New_Get_Subdomain_Partner_Data_result, setNew_Get_Subdomain_Partner_Data_result] = useState([]); @@ -2651,7 +2650,7 @@ const Mon_Catalogue_Public = () => { var catalog_pub_theme_id = JSON.parse(x).catalog_pub_theme_id; - + setmy_theme_code(theme_code); //--- var node = { @@ -2704,6 +2703,17 @@ const Mon_Catalogue_Public = () => { }) } + const [display_mode_grid_or_list, setdisplay_mode_grid_or_list] = useState("list"); + + function func_display_grid_view() { + setdisplay_mode_grid_or_list("grid"); + } + + function func_display_list_view() { + setdisplay_mode_grid_or_list("list"); + } + + return ( @@ -2719,160 +2729,155 @@ const Mon_Catalogue_Public = () => { - {/******* Gestion du THEME "MySy_Theme3" */} + {/******* Gestion du THEME "MySy_Theme2" */} {New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 - && String(New_Get_Subdomain_Partner_Data_result[0].theme_code) === "MySy_Theme3" &&
+ && String(my_theme_code) === "MySy_Theme2" &&
- {New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 - && New_Get_Subdomain_Partner_Data_result[0].catalog_pub_banniere_img &&
- - -
} +
- {!New_Get_Subdomain_Partner_Data_result || New_Get_Subdomain_Partner_Data_result.length <= 0 - || !New_Get_Subdomain_Partner_Data_result[0].catalog_pub_banniere_img && -
- -
} - - - {New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 - && New_Get_Subdomain_Partner_Data_result[0].catalog_pub_logo && -
- {New_Get_Subdomain_Partner_Data_result[0].nom} + && New_Get_Subdomain_Partner_Data_result[0].catalog_pub_banniere_img &&
+
} - {/*!New_Get_Subdomain_Partner_Data_result || New_Get_Subdomain_Partner_Data_result.length <= 0 + + {!New_Get_Subdomain_Partner_Data_result || New_Get_Subdomain_Partner_Data_result.length <= 0 + || !New_Get_Subdomain_Partner_Data_result[0].catalog_pub_banniere_img && +
+ +
} + + +
+ {New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 + && New_Get_Subdomain_Partner_Data_result[0].catalog_pub_logo && +
+ {New_Get_Subdomain_Partner_Data_result[0].nom} + +
} + + {/*!New_Get_Subdomain_Partner_Data_result || New_Get_Subdomain_Partner_Data_result.length <= 0 || !New_Get_Subdomain_Partner_Data_result[0].catalog_pub_logo &&
MySy Training Technology
*/} -
+ -
- {New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 - && New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_3_txt && toooooo } - - - +
-
- -
-
- -
- -
- {New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 && - } +
- {New_Get_Subdomain_Partner_Data_result[0] && New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_2_txt && - } -
+
-
+
+ + - - - {domaine_metier && domaine_metier.map((domaine) => ( - - - ))} - - -
- -
- -
- -
-
-
- - - - - {/*SearchText.length > 2 && */} - {SearchText.length > 2 &&  } - - - - -
-
-
- +
+ +
+ +
+ +
+
+
+ + + + + {/*SearchText.length > 2 && */} + {SearchText.length > 2 &&  } + + + + +
+
+
+ +
+
+ +
+ +
+
+
 
- - -
- -
-
 
- -
+
- {suggestion2 && suggestion2.slice(0, 2).map((suggestion, id) => -
OnSuggestionHandler(JSON.parse(suggestion).name)}> {JSON.parse(suggestion).name}
- )} + {suggestion2 && suggestion2.slice(0, 2).map((suggestion, id) => +
OnSuggestionHandler(JSON.parse(suggestion).name)}> {JSON.parse(suggestion).name}
+ )} +
-
- {/*
+ {/*
*/} -
- - -
-
- - - -
-
- -
Nos Formations
- {showelement === "true" &&
- -
Masquer les Métiers & Filtres
-
- -
- } - - {showelement === "false" &&
-
Afficher les Métiers & Filtres
-
- -
- } - - {showelement === "true" &&
-
-
Les filtres
- - -
-
-
Eligible CPF -
-
-
- -
- - -
-
- -
-
- - -
-
- - {String(cpfchecked) === String("1") &&
-
- KO - -
-
} - -
-
- - -
-
Certification -
- -
-
-
- - -
-
- -
-
- - -
-
- {String(certifchecked) === String("1") &&
-
- KO - -
-
} -
-
- - -
-
Type -
- -
-
-
- - -
-
- -
-
- - -
-
- {String(typechecked) === String("1") &&
-
- KO - -
-
} -
-
- - - {/*
-
Support -
- -
-
-
- - -
-
- -
-
- - -
-
- {String(supportchecked) === String("1") &&
-
- KO - -
-
} -
-
*/} - - - -
-
Lieu -
- -
-
-
- - -
-
- -
-
- - -
-
- {String(lieuchecked) === String("1") &&
-
- KO - -
-
} -
-
- - - {trainingonsite && String(trainingonsite) === String("0") &&
-
Ville -
- -
- - {suggestioncities && suggestioncities.slice(0, 3).map((suggestion, id) => -
OnCitiesSuggestionHandler(JSON.parse(suggestion).ville)}> {JSON.parse(suggestion).ville}
- )} - -
- - -
 
-
} - - {trainingonsite && String(trainingonsite) === String("0") &&
-
Code postale -
- -
- -
- - -
 
-
} - -
-
Support -
- -
- - - - -
-
- -
-
Prix -
- -
- `${value} €`} - value={range_price} - step={500} - name="toto" - - onChange={value => setrange_price(value)} - //onChange={TrainingPriceHandle} - onChangeComplete={value => console.log(value)} - /> -
- - -
 
-
- - -
- -
- -
Les Métiers
- {NewSearchText &&
- -
-
- Recherhe pour : "{NewSearchText}" -
- -
-
- -
-
- Réinitaliser les filtres -
-
-
-
-
-
- -
-
- -
-
- Management
-
- -
- -
-
-
- -
-
- -
-
- Informatique
-
- -
- -
-
-
- -
-
- -
-
- Graphisme
-
- -
- -
-
-
- -
-
-
- + -
-
- Afficher plus de métiers -
- -
-
- - -
-
} - - - {!NewSearchText &&
-
- -
-
- - -
-
- Tous les métiers -
-
-
-
-
-
- - -
-
- {mymetier && String(mymetier) === "management" && - } - - {!mymetier || String(mymetier) !== "management" && - } - - {!mymetier && - } - - -
-
- Management -
-
- -
- -
-
-
- - -
-
- {mymetier && String(mymetier) === "IT" && - } - - {!mymetier || String(mymetier) !== "IT" && - } - - {!mymetier && - } - -
-
- Informatique -
-
- -
-
-
-
- -
-
- {mymetier && String(mymetier) === "graphisme" && - } - - {!mymetier || String(mymetier) !== "graphisme" && - } - - {!mymetier && - } - - -
- -
- Graphisme -
-
- -
-
-
-
-
-
- {mymetier && String(mymetier) === "sante_nat" && - } - - {!mymetier || String(mymetier) !== "sante_nat" && - } - - {!mymetier && - } - - -
- -
- Santé naturelle -
-
- -
-
-
-
- - - - - {!displayAllmetiers &&
-
-
- + -
-
- Afficher plus de métiers -
- -
-
} - - - - {displayAllmetiers &&
-
- - -
-
- Développement Personnel -
-
- -
-
- -
-
} - - {displayAllmetiers &&
-
- {mymetier && String(mymetier) === "projets" && - } - - {!mymetier || String(mymetier) !== "projets" && - } - - {!mymetier && - } - -
-
- Projets -
-
- -
-
- -
-
} - {displayAllmetiers &&
-
- - -
-
- Sport -
-
- -
-
- -
-
} - - - {displayAllmetiers &&
-
-
- - -
-
- Afficher Moins de métiers -
- -
-
} - - -
-
} - -
- } +
-
-
Nos Formations
- {String(userconnected) === String("1") &&
- + + +
+
+ +
Nos Formations & Tutoriels
+ {showelement === "true" &&
+ +
Masquer les Métiers & Filtres
+
+
} - {myApiResponse == "False" &&
+ {showelement === "false" &&
+
Afficher les Métiers & Filtres
+
- Impossible de contacter l'hote distant -
} +
+ } - {myApiResponse == "True" && String(besoinaiderecherche) === String("1") &&
+ {showelement === "true" &&
+
+
Les filtres
- Le resultat est vide, besoin d'aide ? - +
-
} +
+
+
+
Eligible CPF +
+
+
+ +
+ + +
+
+ +
+
+ + +
+
+ + {String(cpfchecked) === String("1") &&
+
+ KO + +
+
} + +
+
- {result && myApiResponse === "True" && !newresult && -
-
-
- setCurrentPage2(page)} - /> -
-
-
- Trier par +
+
Certification +
- + +
+
- - - +
+
+ + +
+
+ {String(certifchecked) === String("1") &&
+
+ KO + +
+
} +
+
+
+
+
+
Type +
+ +
+
+
+ + +
+
+ +
+
+ + +
+
+ {String(typechecked) === String("1") &&
+
+ KO + +
+
} +
+
+ + +
+
Lieu +
+ +
+
+
+ + +
+
+ +
+
+ + +
+
+ {String(lieuchecked) === String("1") &&
+
+ KO + +
+
} +
+
+ + + {trainingonsite && String(trainingonsite) === String("0") &&
+
Ville +
+ +
+ + {suggestioncities && suggestioncities.slice(0, 3).map((suggestion, id) => +
OnCitiesSuggestionHandler(JSON.parse(suggestion).ville)}> {JSON.parse(suggestion).ville}
+ )} + +
+ + +
 
+
} + + {trainingonsite && String(trainingonsite) === String("0") &&
+
Code postale +
+ +
+ +
+ + +
 
+
} + +
+
+ +
+ +
+ +
+
Support +
+ +
+ + + + +
+
+ +
+
Prix +
+ +
+ `${value} €`} + value={range_price} + step={500} + name="toto" + + onChange={value => setrange_price(value)} + //onChange={TrainingPriceHandle} + onChangeComplete={value => console.log(value)} + /> +
+ + +
 
+
+ +
+ +
+
+
+ } + +
+ +
Nos Formations & Tutoriels
+ {String(userconnected) === String("1") &&
+ +
+ } + + {myApiResponse == "False" &&
+ + Impossible de contacter l'hote distant +
} + + {myApiResponse == "True" && String(besoinaiderecherche) === String("1") &&
+ + Le resultat est vide, besoin d'aide ? +
} - {result && myApiResponse === "True" && newresult && -
+ + + + + {result && myApiResponse === "True" && !newresult && +
+
+
+ +
+ setCurrentPage2(page)} + /> +
+ + +
+
+ Trier par + + +
+
+ +
+ {result && result.length > 0 && +
+ + +
} +
+ + +
+ +
+
} + + + + {result && myApiResponse === "True" && newresult && +
+ +
+
+ + setCurrentPage2(page)} + /> + +
+ +
+ {result && result.length > 0 && +
+ + +
} +
+ +
+ + +
} + + + {newresult && (newresult.length <= PageSize) &&
88 +   +
+   +
} + +
 
+ + + + + {String(display_mode_grid_or_list) !== "grid" &&
+ {result && myApiResponse == "True" && fin == 0 && !newresult && + result.slice(0, PageSize).map((formation) => ( +
+ +
+ ))} + + + {result && myApiResponse == "True" && fin == 0 && newresult && + newresult.slice(0, PageSize).map((formation) => ( +
+ +
+ + ))} + + + + {result && myApiResponse === "True" && fin === 1 && !newresult + && currentTableData2 + && currentTableData2.map((formation) => ( +
+ +
+ + ))} + + {result && myApiResponse === "True" && fin === 1 && newresult + && currentTableData2 + && currentTableData2.map((formation) => ( +
+ +
+ + ))} +
} + + + {String(display_mode_grid_or_list) === "grid" &&
+ {result && myApiResponse == "True" && fin == 0 && !newresult && + result.slice(0, PageSize).map((formation) => ( +
+ +
+ ))} + + + {result && myApiResponse == "True" && fin == 0 && newresult && + newresult.slice(0, PageSize).map((formation) => ( +
+ +
+ + ))} + + + + {result && myApiResponse === "True" && fin === 1 && !newresult + && currentTableData2 + && currentTableData2.map((formation) => ( +
+ +
+ + ))} + + {result && myApiResponse === "True" && fin === 1 && newresult + && currentTableData2 + && currentTableData2.map((formation) => ( +
+ +
+ + ))} +
} + + + + + {result && !newresult &&
+ + {String(userconnected) === String("1") && } setCurrentPage2(page)} + /> +
+ } + + {result && newresult &&
+ + {String(userconnected) === String("1") && } + setCurrentPage2(page)} /> - - -
} - - - {newresult && (newresult.length <= PageSize) &&
-   -
-   -
} - - - {result && myApiResponse == "True" && fin == 0 && !newresult && - result.slice(0, PageSize).map((formation) => ( -
- - -
- - ))} - - {result && myApiResponse == "True" && fin == 0 && newresult && - newresult.slice(0, PageSize).map((formation) => ( -
- - -
- - ))} - - - - {result && myApiResponse === "True" && fin === 1 && !newresult - && currentTableData2 - && currentTableData2.map((formation) => ( -
- - -
- - ))} - - {result && myApiResponse === "True" && fin === 1 && newresult - && currentTableData2 - && currentTableData2.map((formation) => ( -
- - -
- - ))} - - - {result && !newresult &&
- - {String(userconnected) === String("1") && } - setCurrentPage2(page)} - /> +
+ }
- } - {result && newresult &&
- {String(userconnected) === String("1") && } - setCurrentPage2(page)} - /> -
- } +
+
-
+
+
Notre actualité + +
+ +
+ +
+ +
+ +
+ +
+ +
+ 19 DECEMBRE 2022 +
+ +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit +
+ +
-
+
-
-
Notre actualité +
+ +
+ +
+ +
+ +
+ 19 DECEMBRE 2022 +
+ +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit +
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ 19 DECEMBRE 2022 +
+ +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit +
+ +
+ + +
+ + + + +
-
- - } - {/******* FIN Gestion du THEME "MySy_Theme3" */} + {/******* FIN Gestion du THEME "MySy_Theme2" */} {/******* Gestion du THEME PAR DEFAULT " */} {New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 - && String(New_Get_Subdomain_Partner_Data_result[0].theme_code) !== "MySy_Theme3" &&
+ && String(my_theme_code) !== "MySy_Theme2" &&
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 && New_Get_Subdomain_Partner_Data_result[0].catalog_pub_banniere_img &&
diff --git a/src/components/Recherche_new_v4.js b/src/components/Recherche_new_v4.js index f8360e9..5d252a9 100644 --- a/src/components/Recherche_new_v4.js +++ b/src/components/Recherche_new_v4.js @@ -57,6 +57,8 @@ import { IoAppsSharp, IoListSharp } from "react-icons/io5"; import { CiCircleRemove, CiCircleMinus } from "react-icons/ci"; +import Formation_Grid_2Col from "./Formation_Grid_2Col"; + let PageSize = 10; const Recherche_new_v4 = () => { const { type, categorie } = useParams(); @@ -3323,6 +3325,7 @@ const Recherche_new_v4 = () => {
+
{
- -
Trier par @@ -3457,7 +3458,7 @@ const Recherche_new_v4 = () => { {result && myApiResponse == "True" && fin == 0 && !newresult && result.slice(0, PageSize).map((formation) => (
- +
))} @@ -3465,7 +3466,7 @@ const Recherche_new_v4 = () => { {result && myApiResponse == "True" && fin == 0 && newresult && newresult.slice(0, PageSize).map((formation) => (
- +
))} @@ -3476,7 +3477,7 @@ const Recherche_new_v4 = () => { && currentTableData2 && currentTableData2.map((formation) => (
- +
))} @@ -3485,7 +3486,7 @@ const Recherche_new_v4 = () => { && currentTableData2 && currentTableData2.map((formation) => (
- +
))} diff --git a/src/components/UpdatePartnerInfo.js b/src/components/UpdatePartnerInfo.js index 9475170..006bd1a 100644 --- a/src/components/UpdatePartnerInfo.js +++ b/src/components/UpdatePartnerInfo.js @@ -1823,7 +1823,7 @@ function UpdateParnterInfo(props) { setLoading(false); if (String(res.data.status) === "true") { //console.log(" In Get_Partner_Catalog_Pub_Config res.data.status = " + res.data.status); - console.log(" In Get_Partner_Catalog_Pub_Config res.data.message r_class = " + res.data.message); + //console.log(" In Get_Partner_Catalog_Pub_Config res.data.message r_class = " + res.data.message); setGet_Partner_Catalog_Pub_Config_api("true"); setGet_Partner_Catalog_Pub_Config_result(res.data.message); diff --git a/src/styles/components/_mon_catalogue_public.scss b/src/styles/components/_mon_catalogue_public.scss index 50883ba..87ac24f 100644 --- a/src/styles/components/_mon_catalogue_public.scss +++ b/src/styles/components/_mon_catalogue_public.scss @@ -2280,6 +2280,10 @@ order: 1; flex-grow: 0; } + + .display_grid_list_bton { + display: none; + } } @media only screen and (min-width: 601px) and (max-width: 991px) { @@ -3520,6 +3524,58 @@ flex-grow: 0; } + .title1_nom { + width: 100%; + text-align: left; + height: 192px; + + font-family: 'Albert Sans'; + font-style: normal; + font-weight: 700; + font-size: 40px; + line-height: 54px; + /* or 107% */ + + letter-spacing: 1px; + + /* Deep Blue */ + + color: #0A043C; + + + /* Inside auto layout */ + + flex: none; + order: 0; + flex-grow: 0; + } + + .title1_text1 { + width: 100%; + text-align: left; + height: 192px; + + font-family: 'Albert Sans'; + font-style: normal; + font-weight: 500; + font-size: 30px; + line-height: 54px; + /* or 107% */ + + letter-spacing: 1px; + + /* Deep Blue */ + + color: #0A043C; + + + /* Inside auto layout */ + + flex: none; + order: 0; + flex-grow: 0; + } + .title2 { width: 60%; height: 22px; @@ -5276,6 +5332,21 @@ cursor: pointer; } + .mode_affichage { + width: 15%; + float: right; + cursor: pointer; + + } + + .display_grid_list_bton { + display: none; + } + + .view_grid { + } + + } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -6493,8 +6564,8 @@ flex-grow: 0; } - .title1 { - width: 60%; + .title1_nom { + width: 100%; text-align: left; height: 192px; @@ -6502,7 +6573,7 @@ font-style: normal; font-weight: 700; font-size: 40px; - line-height: 44px; + line-height: 54px; /* or 107% */ letter-spacing: 1px; @@ -6519,18 +6590,16 @@ flex-grow: 0; } - - .title1_text1 { - width: 60%; + width: 100%; text-align: left; height: 192px; font-family: 'Albert Sans'; font-style: normal; - font-weight: 700; + font-weight: 500; font-size: 30px; - line-height: 44px; + line-height: 54px; /* or 107% */ letter-spacing: 1px; @@ -8304,6 +8373,25 @@ cursor: pointer; } + .mode_affichage { + width: 12%; + float: right; + cursor: pointer; + + } + + .display_grid_list_bton { + width: 10%; + float: left; + } + + .view_grid { + width: 48% !important; + float: left !important; + margin-right: 2%; + } + + } @media only screen and (min-width: 1200px) and (max-width: 1919px) { @@ -11337,6 +11425,24 @@ cursor: pointer; } + .mode_affichage { + width: 8%; + float: right; + cursor: pointer; + + } + + .display_grid_list_bton { + width: 10%; + float: left; + } + + .view_grid { + width: 48% !important; + float: left !important; + margin-right: 2%; + } + } @media only screen and (min-width: 1920px) { @@ -14397,6 +14503,25 @@ } + .mode_affichage { + width: 8%; + float: right; + cursor: pointer; + + } + + .display_grid_list_bton { + width: 10%; + float: left; + } + + .view_grid { + width: 48% !important; + float: left !important; + margin-right: 2%; + } + + } // end media diff --git a/src/styles/components/_reherche_new_v4.scss b/src/styles/components/_reherche_new_v4.scss index 63c82c5..7f2d40d 100644 --- a/src/styles/components/_reherche_new_v4.scss +++ b/src/styles/components/_reherche_new_v4.scss @@ -739,7 +739,7 @@ position: absolute; width: 100%; - height: 350px; + height: 250px; left: 0px; top: 0px; @@ -859,7 +859,7 @@ width: 97%; //height: 1486px; left: 1%; - top: 495px; + top: 530px; } .pieddepage_v2 { @@ -902,7 +902,7 @@ position: absolute; - height: 120px; + height: auto; font-family: "Albert Sans"; font-style: normal; font-weight: 600; @@ -914,18 +914,7 @@ } .title2 { - position: absolute; - height: 35px; - left: 5%; - top: 90px; - font-family: "Albert Sans"; - font-style: normal; - font-size: 14px; - line-height: 19px; - letter-spacing: 1px; - text-align: center; - color: #0A043C; - font-weight: 500; + display: none; } @@ -3178,7 +3167,7 @@ //height: 2574px; left: 10px; right: 5px; - top: 530px; + top: 460px; width: 98%; } @@ -3224,13 +3213,13 @@ width: 95%; height: 367px; left: 20px; - top: 156px; + top: 100px; } .Background_Header { position: absolute; width: 100%; - height: 452px; + height: 300px; left: 0px; top: 0px; @@ -3492,7 +3481,7 @@ gap: 24px; width: 100%; - height: 367px; + height: auto; /* Inside auto layout */ @@ -3511,7 +3500,7 @@ gap: 16px; width: 636px; - height: 230px; + height: auto; /* Inside auto layout */ @@ -3526,7 +3515,7 @@ text-align: center; width: 80%; - height: 180px; + height: auto; text-align: left; @@ -3551,6 +3540,59 @@ flex-grow: 0; } + .title1_nom { + width: 100%; + text-align: left; + height: 192px; + + font-family: 'Albert Sans'; + font-style: normal; + font-weight: 700; + font-size: 40px; + height: auto; + /* or 107% */ + + letter-spacing: 1px; + + /* Deep Blue */ + + color: #0A043C; + + + /* Inside auto layout */ + + flex: none; + order: 0; + flex-grow: 0; + } + + .title1_text1 { + width: 100%; + text-align: left; + height: 192px; + + font-family: 'Albert Sans'; + font-style: normal; + font-weight: 500; + font-size: 30px; + line-height: 54px; + /* or 107% */ + + letter-spacing: 1px; + + /* Deep Blue */ + + color: #0A043C; + + + /* Inside auto layout */ + + flex: none; + order: 0; + flex-grow: 0; + } + + .title2 { width: 60%; height: 22px; @@ -6203,7 +6245,7 @@ width: 96%; //height: 2574px; left: 2%; - top: 550px; + top: 460px; } .logo { @@ -6246,15 +6288,15 @@ position: absolute; width: 95%; - height: 367px; + // height: 367px; left: 5%; - top: 156px; + top: 100px; } .Background_Header { position: absolute; width: 100%; - height: 452px; + height: 320px; left: 0px; top: 0px; @@ -6512,7 +6554,7 @@ gap: 24px; width: 900px; - height: 367px; + height: auto; /* Inside auto layout */ @@ -6531,7 +6573,7 @@ gap: 16px; width: 636px; - height: 230px; + height: auto; /* Inside auto layout */ @@ -6545,7 +6587,7 @@ .title1 { width: 80%; text-align: left; - height: 192px; + height: auto; font-family: 'Albert Sans'; font-style: normal; @@ -6568,6 +6610,60 @@ flex-grow: 0; } + .title1_nom { + width: 100%; + text-align: left; + height: 192px; + + font-family: 'Albert Sans'; + font-style: normal; + font-weight: 700; + font-size: 40px; + + height: auto; + /* or 107% */ + + letter-spacing: 1px; + + /* Deep Blue */ + + color: #0A043C; + + + /* Inside auto layout */ + + flex: none; + order: 0; + flex-grow: 0; + } + + .title1_text1 { + width: 100%; + text-align: left; + height: 192px; + + font-family: 'Albert Sans'; + font-style: normal; + font-weight: 500; + font-size: 30px; + + /* or 107% */ + + letter-spacing: 1px; + + /* Deep Blue */ + + color: #0A043C; + + + /* Inside auto layout */ + + flex: none; + order: 0; + flex-grow: 0; + } + + .title2 { width: 60%; text-align: left; @@ -9222,7 +9318,7 @@ width: 96%; //height: 2574px; left: 2%; - top: 550px; + top: 460px; } .logo { @@ -9265,15 +9361,15 @@ position: absolute; width: 95%; - height: 367px; + // height: 367px; left: 5%; - top: 156px; + top: 100px; } .Background_Header { position: absolute; width: 100%; - height: 452px; + height: 320px; left: 0px; top: 0px; @@ -9531,7 +9627,7 @@ gap: 24px; width: 80%; - height: 367px; + height: auto; /* Inside auto layout */ @@ -9550,7 +9646,7 @@ gap: 16px; width: 636px; - height: 230px; + height: auto; /* Inside auto layout */ @@ -9564,7 +9660,7 @@ .title1 { width: 90%; text-align: left; - height: 192px; + height: auto; font-family: 'Albert Sans'; font-style: normal; @@ -9587,6 +9683,58 @@ flex-grow: 0; } + .title1_nom { + width: 100%; + text-align: left; + height: 192px; + + font-family: 'Albert Sans'; + font-style: normal; + font-weight: 700; + font-size: 40px; + height: auto; + /* or 107% */ + + letter-spacing: 1px; + + /* Deep Blue */ + + color: #0A043C; + + + /* Inside auto layout */ + + flex: none; + order: 0; + flex-grow: 0; + } + + .title1_text1 { + width: 100%; + text-align: left; + height: 192px; + + font-family: 'Albert Sans'; + font-style: normal; + font-weight: 500; + font-size: 30px; + + /* or 107% */ + + letter-spacing: 1px; + + /* Deep Blue */ + + color: #0A043C; + + + /* Inside auto layout */ + + flex: none; + order: 0; + flex-grow: 0; + } + .title2 { width: 90%; text-align: left; @@ -12258,7 +12406,7 @@ width: 96%; //height: 2574px; left: 2%; - top: 550px; + top: 460px; } .logo { @@ -12301,15 +12449,15 @@ position: absolute; width: 95%; - height: 367px; + // height: 367px; left: 5%; - top: 156px; + top: 100px; } .Background_Header { position: absolute; width: 100%; - height: 452px; + height: 320px; left: 0px; top: 0px; @@ -12567,7 +12715,7 @@ gap: 24px; width: 85%; - height: 367px; + height: auto; /* Inside auto layout */ @@ -12586,7 +12734,7 @@ gap: 16px; width: 636px; - height: 230px; + height: auto; /* Inside auto layout */ @@ -12600,7 +12748,7 @@ .title1 { width: 100%; text-align: left; - height: 192px; + height: auto; font-family: 'Albert Sans'; font-style: normal; @@ -12623,6 +12771,59 @@ flex-grow: 0; } + .title1_nom { + width: 100%; + text-align: left; + height: 192px; + + font-family: 'Albert Sans'; + font-style: normal; + font-weight: 700; + font-size: 40px; + height: auto; + + /* or 107% */ + + letter-spacing: 1px; + + /* Deep Blue */ + + color: #0A043C; + + + /* Inside auto layout */ + + flex: none; + order: 0; + flex-grow: 0; + } + + .title1_text1 { + width: 100%; + text-align: left; + height: 192px; + + font-family: 'Albert Sans'; + font-style: normal; + font-weight: 500; + font-size: 30px; + + /* or 107% */ + + letter-spacing: 1px; + + /* Deep Blue */ + + color: #0A043C; + + + /* Inside auto layout */ + + flex: none; + order: 0; + flex-grow: 0; + } + .title2 { width: 100%; text-align: left;