26/10/2025 - 15h
parent
7cffaaf5d0
commit
59788b2715
|
|
@ -0,0 +1,721 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
|
||||
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 coeurimg from "../mysy_img/coeur.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 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_Partner_Catalog = (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-Partner-Catalog-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("")
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
<div className="formation_partner_catalog">
|
||||
|
||||
<div style={{ "width": "100%" }}>
|
||||
|
||||
{class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 && <div className="forma_img_gauche">
|
||||
<img src={class_img_stored_in_bdd} alt="informatique" className="training_img" />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{ (!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" && <div className="forma_img_gauche">
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_program} alt="informatique" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_graphisme} alt="graphisme" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_management} alt="management" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_digital} alt="digital" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_bureautic} alt="office" className="training_img" />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_rh} alt="ressources humaines" className="training_img" />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_vente} alt="vente" className="training_img" />}
|
||||
|
||||
{!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" && <img src={img_met_dev_perso} alt="developpement personnel" className="training_img" />}
|
||||
|
||||
{String(isclassimage) === "True" && <img src={userimgclassprofil} alt="developpement personnel" className="training_img" />}
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 && <div className="forma_img_gauche">
|
||||
<img src={userimgclassprofil} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 && <div className="forma_img_gauche">
|
||||
<img src={img_met_autre} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "1" && <div className="forma_img_gauche">
|
||||
<img src={props.formation.img_url} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par : <br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="forma_rightbox"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
}}>
|
||||
<div className="p_forma">
|
||||
<div className="div_row">
|
||||
|
||||
<div className="div_row_gauche" style={{ "marginTop": "5px" }}>
|
||||
{props.formation.note && String(props.formation.note).length === 1 &&
|
||||
parseInt(String(props.formation.note)) <= 5 &&
|
||||
|
||||
<Rating name="half-rating-read" defaultValue={props.formation.note} precision={0.5} readOnly />
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
<div className="div_row_droite div_row_droite_cpf">
|
||||
<div className="block_cpf">
|
||||
<div className="block_cpf_txt">
|
||||
|
||||
|
||||
{props.formation.cpf && String(props.formation.cpf) === String("1") &&
|
||||
<div>
|
||||
OUI Éligible au CPF
|
||||
</div>}
|
||||
|
||||
{props.formation.cpf && String(props.formation.cpf) !== String("1") &&
|
||||
<div>
|
||||
NON Éligible au CPF
|
||||
</div>}
|
||||
|
||||
{!props.formation.cpf &&
|
||||
<div>
|
||||
NON Éligible au CPF
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="div_row row_formation_title">
|
||||
<p className="p_class training_title">
|
||||
<b>
|
||||
{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 100)}
|
||||
</b>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div className="div_row">
|
||||
|
||||
{String(props.formation.price).length == 9 &&
|
||||
<div className="training_price" > <i>Prix : Non communiqué</i>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) === String("0") &&
|
||||
<div className="training_price">Gratuit
|
||||
</div>
|
||||
}
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && (!props.formation.business_prices ||
|
||||
Object.keys(props.formation.business_prices).length <= 0) &&
|
||||
<div className="training_price">{props.formation.price} € HT
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") &&
|
||||
props.formation.business_prices && Object.keys(props.formation.business_prices).length > 0 &&
|
||||
<div className="training_price">
|
||||
<nav className="discounted_price">{String(props.formation.business_prices[0].discounted_price)} € HT</nav>
|
||||
<nav className="training_price_barre">
|
||||
{props.formation.price} € HT
|
||||
</nav>
|
||||
|
||||
<nav className="discount_block"> (- {String(props.formation.business_prices[0].discount)} % )
|
||||
</nav>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row row_formation_desc">
|
||||
{parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))}
|
||||
|
||||
</div>
|
||||
{GetCurrentClass_trainingsession_cities_result && GetCurrentClass_trainingsession_cities_result.length > 0 &&
|
||||
<nav style={{ "width": "100%", "float": "left", "textAlign": "left", "color": "#619E31" }}>
|
||||
<nav style={{ "width": "auto", "float": "left" }}> <CiLocationOn className="icone_location" /> </nav>
|
||||
|
||||
{GetCurrentClass_trainingsession_cities_result && GetCurrentClass_trainingsession_cities_result.sort().slice(0, 5).map((formation_ville) => (
|
||||
<nav style={{ "width": "auto", "float": "left" }}>
|
||||
|
||||
|
||||
|
||||
{formation_ville &&
|
||||
|
||||
<b> {formation_ville.replaceAll('"', '').substring(0, 20).toLocaleLowerCase().charAt(0).toUpperCase() +
|
||||
formation_ville.replaceAll('"', '').substring(0, 20).toLocaleLowerCase().slice(1)} </b>
|
||||
|
||||
}
|
||||
|
||||
</nav>
|
||||
))}
|
||||
|
||||
|
||||
|
||||
</nav>
|
||||
}
|
||||
{!GetCurrentClass_result || GetCurrentClass_result.length <= 0 &&
|
||||
<nav style={{ "width": "100%", "float": "left", "textAlign": "left", "fontWeight": "700" }}><CiLocationOn className="icone_location" /> A venir </nav>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className="div_row row_formation_crit">
|
||||
|
||||
<hr style={{ "width": "90%", "marginLeft": "auto", "marginRight": "auto", "marginBottom": "2px", "marginTop": "2px" }} />
|
||||
|
||||
<div className="div_row_gauche div_row_gauche_critere" >
|
||||
<div className="div_row_critere" style={{ "marginTop": "0.5rem", "marginBottom": "0.3rem" }}>
|
||||
{!props.formation.extented_search &&
|
||||
<div className="div_row_gauche">
|
||||
|
||||
|
||||
{props.formation.duration_unit &&
|
||||
<div style={{ "width": "100%" }}>
|
||||
<div className="criteres ftion_tab_gauche">Durée
|
||||
</div>
|
||||
|
||||
{String(props.formation.duration_unit) === "heure" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} hr(s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "heures" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} hr(s)
|
||||
</div>}
|
||||
|
||||
|
||||
{String(props.formation.duration_unit) === "jour" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} jr(s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "mois" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} mois(s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "semaine" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} Sem (s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "user_rythme" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
A votre rythme
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{!props.formation.duration_unit &&
|
||||
<div style={{ "width": "100%" }}>
|
||||
<div className="criteres ftion_tab_gauche">Durée
|
||||
</div>
|
||||
|
||||
{props.formation.duration && <div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} jr(s)
|
||||
</div>}
|
||||
|
||||
{!props.formation.duration && <div className="criteres ftion_tab_droite">
|
||||
<i> En traitement </i>
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
}
|
||||
<div style={{ "width": "100%" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
Certification
|
||||
</div>
|
||||
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.certif && String(props.formation.certif) === String("1") &&
|
||||
<div>
|
||||
Oui
|
||||
</div>}
|
||||
|
||||
{props.formation.certif && String(props.formation.certif) !== String("1") &&
|
||||
<div>
|
||||
Non
|
||||
</div>}
|
||||
|
||||
{!props.formation.certif &&
|
||||
<div>
|
||||
NC
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="media_sociaux" style={{ 'float': "left", marginTop: "0.2rem", }}>
|
||||
<FacebookShareButton
|
||||
url={"https://www.mysy-training.com/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url}
|
||||
|
||||
quote={props.formation.title + " -- " + props.formation.description}
|
||||
hashtag={"ySyTraining"}
|
||||
>
|
||||
<SocialIcon network="facebook" style={{ height: 20, width: 20 }} />
|
||||
</FacebookShareButton>
|
||||
|
||||
|
||||
<TwitterShareButton
|
||||
url={"https://www.mysy-training.com/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url}
|
||||
hashtag={"#MySy-Formation"}
|
||||
>
|
||||
<SocialIcon network="twitter" style={{ height: 20, width: 20 }} />
|
||||
</TwitterShareButton>
|
||||
|
||||
|
||||
<LinkedinShareButton
|
||||
url={"https://www.mysy-training.com/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url}
|
||||
title={" Une nouvelle formation : " + props.formation.title}
|
||||
summary={props.formation.title + " -- " + props.formation.description}
|
||||
|
||||
source={"https://www.mysy-training.com/"}
|
||||
|
||||
>
|
||||
<SocialIcon network="linkedin" style={{ height: 20, width: 20 }} />
|
||||
</LinkedinShareButton>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="div_row_droite" style={{ textAlign: "center" }}>
|
||||
{String(props.formation.coeur) === String("1") && <div>
|
||||
<img class="imgcoeur" src={coeurimg} alt="coup de coeur" />
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style={{ "width": "100%", "float": "right" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
Sur site
|
||||
</div>
|
||||
{props.formation.presentiel && props.formation.presentiel.presentiel &&
|
||||
String(props.formation.presentiel.presentiel) === String("1") && <div className="criteres ftion_tab_droite">
|
||||
Oui
|
||||
</div>}
|
||||
|
||||
{props.formation.presentiel && props.formation.presentiel.presentiel &&
|
||||
String(props.formation.presentiel.presentiel) !== String("1") && <div className="criteres ftion_tab_droite">
|
||||
Non
|
||||
</div>}
|
||||
|
||||
{!props.formation.presentiel || !props.formation.presentiel.presentiel &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
NC
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
<div style={{ "width": "100%", "float": "right" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
A distance
|
||||
</div>
|
||||
{props.formation.presentiel && props.formation.presentiel.distantiel &&
|
||||
String(props.formation.presentiel.distantiel) === String("1") && <div className="criteres ftion_tab_droite">
|
||||
Oui
|
||||
</div>}
|
||||
|
||||
{props.formation.presentiel && props.formation.presentiel.distantiel &&
|
||||
String(props.formation.presentiel.distantiel) !== String("1") && <div className="criteres ftion_tab_droite">
|
||||
Non
|
||||
</div>}
|
||||
|
||||
{!props.formation.presentiel || !props.formation.presentiel.distantiel &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
NC
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
<div style={{ "width": "100%", "float": "right" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
Support
|
||||
</div>
|
||||
{props.formation.support &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.support}
|
||||
</div>}
|
||||
|
||||
{!props.formation.support &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
NC
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className="div_row_droite div_row_droite_critere" >
|
||||
{!props.formation.extented_search && props.formation.coeur != "1" &&
|
||||
<div style={{ 'float': "right", "width": "100%", textAlign: "right", marginTop: "0rem", }}>
|
||||
|
||||
<Button className="bton_se_renseinger"
|
||||
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url + "/Information",
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
|
||||
>Se renseigner </Button>
|
||||
|
||||
|
||||
<Button className="bton_voir_detail"
|
||||
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
//test(props.formation.external_code);
|
||||
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
|
||||
}}
|
||||
>Voir details</Button>
|
||||
|
||||
{GetCurrentClass_result && GetCurrentClass_result.length > 0 &&
|
||||
<Button variant="contained" className="bton_sinscrire"
|
||||
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url + "/Inscription",
|
||||
'_blank'
|
||||
);
|
||||
|
||||
}}
|
||||
|
||||
>S'incrire</Button>
|
||||
}
|
||||
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export default Formation_Partner_Catalog;
|
||||
|
|
@ -4295,6 +4295,9 @@ const AddClassManual = (props) => {
|
|||
Getall_Partner_Formulaires_Eval_Chaud();
|
||||
Getall_Partner_Formulaires_Eval_Formateur();
|
||||
|
||||
Get_List_Attestation_PDF();
|
||||
Get_List_Attestation_Email();
|
||||
|
||||
Getall_Partner_Formulaires_Q_Position();
|
||||
Get_Given_Class_Default_Documents();
|
||||
setsubmenu("documents");
|
||||
|
|
@ -5729,6 +5732,213 @@ const AddClassManual = (props) => {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const [selected_default_attestation_PDF, setselected_default_attestation_PDF] = useState("");
|
||||
|
||||
const [New_Get_List_Attestation_PDF_result, setNew_Get_List_Attestation_PDF_result] = useState([]);
|
||||
|
||||
const [Get_List_Attestation_PDF_api, setGet_List_Attestation_PDF_api] = useState();
|
||||
const [Get_List_Attestation_PDF_message, setGet_List_Attestation_PDF_message] = useState();
|
||||
const [Get_List_Attestation_PDF_result, setGet_List_Attestation_PDF_result] = useState();
|
||||
function Get_List_Attestation_PDF() {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("type_doc", "pdf");
|
||||
form.append("courrier_template_type_document_ref_interne", "ATTESTATION_FORMATION");
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Modele_Attestion_Formation_With_Filter/";
|
||||
setLoading(true);
|
||||
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Attestation_PDF res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Attestation_PDF res.data.message r_class = " + res.data.message);
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
|
||||
setGet_List_Attestation_PDF_api("true");
|
||||
setGet_List_Attestation_PDF_result(res.data.message);
|
||||
|
||||
var new_data2 = [];
|
||||
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_ref_interne = JSON.parse(x).ref_interne;
|
||||
var local_nom = JSON.parse(x).nom;
|
||||
var local_sujet = JSON.parse(x).sujet;
|
||||
var local_type_doc = JSON.parse(x).type_doc;
|
||||
var local_cible = JSON.parse(x).cible;
|
||||
var local_joint_pdf = JSON.parse(x).joint_pdf;
|
||||
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": local_nom,
|
||||
"ref_interne": local_ref_interne,
|
||||
"nom": local_nom,
|
||||
"sujet": local_sujet,
|
||||
"type_doc": local_type_doc,
|
||||
"cible": local_cible,
|
||||
"joint_pdf": local_joint_pdf,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"ref_interne": "",
|
||||
"nom": "",
|
||||
"sujet": "",
|
||||
"type_doc": "",
|
||||
"cible": "",
|
||||
"joint_pdf": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Get_List_Attestation_PDF_result(new_data2);
|
||||
else
|
||||
setNew_Get_List_Attestation_PDF_result([])
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Attestation_PDF_api("false");
|
||||
setGet_List_Attestation_PDF_message(res.data.message);
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Get_List_Attestation_PDF = ', error);
|
||||
setGet_List_Attestation_PDF_api("false");
|
||||
alert("Impossible de récupérer les modèles d'attestation PDF");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const [selected_default_attestation_Email, setselected_default_attestation_Email] = useState("");
|
||||
|
||||
const [New_Get_List_Attestation_Email_result, setNew_Get_List_Attestation_Email_result] = useState([]);
|
||||
|
||||
const [Get_List_Attestation_Email_api, setGet_List_Attestation_Email_api] = useState();
|
||||
const [Get_List_Attestation_Email_message, setGet_List_Attestation_Email_message] = useState();
|
||||
const [Get_List_Attestation_Email_result, setGet_List_Attestation_Email_result] = useState();
|
||||
function Get_List_Attestation_Email() {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("type_doc", "email");
|
||||
form.append("courrier_template_type_document_ref_interne", "ATTESTATION_FORMATION");
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Modele_Attestion_Formation_With_Filter/";
|
||||
setLoading(true);
|
||||
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_List_Attestation_Email res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Attestation_Email res.data.message r_class = " + res.data.message);
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
|
||||
setGet_List_Attestation_Email_api("true");
|
||||
setGet_List_Attestation_Email_result(res.data.message);
|
||||
|
||||
var new_data2 = [];
|
||||
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_ref_interne = JSON.parse(x).ref_interne;
|
||||
var local_nom = JSON.parse(x).nom;
|
||||
var local_sujet = JSON.parse(x).sujet;
|
||||
var local_type_doc = JSON.parse(x).type_doc;
|
||||
var local_cible = JSON.parse(x).cible;
|
||||
var local_joint_pdf = JSON.parse(x).joint_pdf;
|
||||
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": local_nom,
|
||||
"ref_interne": local_ref_interne,
|
||||
"nom": local_nom,
|
||||
"sujet": local_sujet,
|
||||
"type_doc": local_type_doc,
|
||||
"cible": local_cible,
|
||||
"joint_pdf": local_joint_pdf,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"ref_interne": "",
|
||||
"nom": "",
|
||||
"sujet": "",
|
||||
"type_doc": "",
|
||||
"cible": "",
|
||||
"joint_pdf": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Get_List_Attestation_Email_result(new_data2);
|
||||
else
|
||||
setNew_Get_List_Attestation_Email_result([])
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Attestation_Email_api("false");
|
||||
setGet_List_Attestation_Email_message(res.data.message);
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Get_List_Attestation_Email = ', error);
|
||||
setGet_List_Attestation_Email_api("false");
|
||||
alert("Impossible de récupérer les modèles d'attestation Email");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const [selected_default_Stagiaire_Convocations_PDF, setselected_default_Stagiaire_Convocations_PDF] = useState("");
|
||||
|
||||
const [New_Get_List_Stagiaire_Convocations_PDF_result, setNew_Get_List_Stagiaire_Convocations_PDF_result] = useState([]);
|
||||
|
|
@ -6154,9 +6364,12 @@ const AddClassManual = (props) => {
|
|||
form.append("CONVENTION_STAGIAIRE_INDIVIDUELLE_MAIL", selected_default_Convention_individuelle_Mail);
|
||||
form.append("CONVENTION_STAGIAIRE_INDIVIDUELLE_PDF", selected_default_Convention_individuelle_PDF);
|
||||
|
||||
form.append("CONVENTION_STAGIAIRE_ENTREPRISE_MAIL", selected_default_Convention_entreprise_Mail);
|
||||
form.append("CONVENTION_STAGIAIRE_ENTREPRISE_MAIL", selected_default_Convention_entreprise_Mail);
|
||||
form.append("CONVENTION_STAGIAIRE_ENTREPRISE_PDF", selected_default_Convention_entreprise_PDF);
|
||||
|
||||
form.append("ATTESTATION_FORMATION_MAIL", selected_default_attestation_Email);
|
||||
form.append("ATTESTATION_FORMATION_PDF", selected_default_attestation_PDF);
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Class_Default_Document/";
|
||||
|
||||
|
|
@ -6217,7 +6430,7 @@ const AddClassManual = (props) => {
|
|||
|
||||
if (String(res.data.status) === "true") {
|
||||
//console.log(" In Get_Given_Class_Default_Documents res.data.status = " + res.data.status);
|
||||
// console.log(" In Get_Given_Class_Default_Documents res.data.message r_class = " + res.data.message);
|
||||
//console.log(" In Get_Given_Class_Default_Documents res.data.message r_class = " + res.data.message);
|
||||
//console.log(" In Get_Given_Class_Default_Documents res.data.message len = " + String(res.data.message).length);
|
||||
|
||||
setLoading(false);
|
||||
|
|
@ -6250,11 +6463,11 @@ const AddClassManual = (props) => {
|
|||
setselected_default_Convention_individuelle_PDF(mylocaltraining.CONVENTION_STAGIAIRE_INDIVIDUELLE_PDF);
|
||||
}
|
||||
|
||||
if (mylocaltraining.CONVENTION_STAGIAIRE_ENTREPRISE_MAIL) {
|
||||
if (mylocaltraining.CONVENTION_STAGIAIRE_ENTREPRISE_MAIL) {
|
||||
setselected_default_Convention_entreprise_Mail(mylocaltraining.CONVENTION_STAGIAIRE_ENTREPRISE_MAIL);
|
||||
}
|
||||
|
||||
if (mylocaltraining.CONVENTION_STAGIAIRE_ENTREPRISE_PDF) {
|
||||
if (mylocaltraining.CONVENTION_STAGIAIRE_ENTREPRISE_PDF) {
|
||||
setselected_default_Convention_entreprise_PDF(mylocaltraining.CONVENTION_STAGIAIRE_ENTREPRISE_PDF);
|
||||
}
|
||||
|
||||
|
|
@ -6270,6 +6483,16 @@ const AddClassManual = (props) => {
|
|||
setselected_default_Formulaires_Eval_Formateur(mylocaltraining.EVAL_FORMATION_FORMATEUR);
|
||||
}
|
||||
|
||||
if (mylocaltraining.ATTESTATION_FORMATION_PDF) {
|
||||
console.log(" ### eeee = ", mylocaltraining.ATTESTATION_FORMATION_PDF)
|
||||
setselected_default_attestation_PDF(mylocaltraining.ATTESTATION_FORMATION_PDF);
|
||||
}
|
||||
|
||||
if (mylocaltraining.ATTESTATION_FORMATION_MAIL) {
|
||||
console.log(" ### iii = ", mylocaltraining.ATTESTATION_FORMATION_MAIL)
|
||||
setselected_default_attestation_Email(mylocaltraining.ATTESTATION_FORMATION_MAIL);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -9032,6 +9255,70 @@ const AddClassManual = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
{/*** Attestation */}
|
||||
<div style={{ display: 'flex', flexDirection: 'row', gap: '20px', width: '100%', flexWrap: 'wrap', justifyContent: 'left' }}>
|
||||
|
||||
<div style={{ paddingTop: '2rem', width: '12rem', fontFamily: 'DM Sans', fontSize: '16px' }}> Attestation Ftion </div>
|
||||
<div className="session_caract">
|
||||
{New_Get_List_Attestation_PDF_result.length > 0 && <div className="session_caract_Dialog" > Choisir un modèle par défault (PDF)
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="default_attestation_pdf"
|
||||
id="default_attestation_pdf"
|
||||
fullWidth
|
||||
//className="disabled_style enable_style"
|
||||
options={New_Get_List_Attestation_PDF_result}
|
||||
value={New_Get_List_Attestation_PDF_result.filter((data) => (data)._id === String(selected_default_attestation_PDF))[0].label}
|
||||
|
||||
onChange={(event, value) => {
|
||||
setdefault_doc_modification("1");
|
||||
if (value && value._id)
|
||||
setselected_default_attestation_PDF(value._id);
|
||||
else
|
||||
setselected_default_attestation_PDF("")
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
</div>}
|
||||
</div>
|
||||
<div className="session_caract">
|
||||
{New_Get_List_Attestation_Email_result.length > 0 && <div className="session_caract_Dialog" > Choisir un modèle par défault (Email)
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="default_attestation_pdf"
|
||||
id="default_attestation_pdf"
|
||||
fullWidth
|
||||
//className="disabled_style enable_style"
|
||||
options={New_Get_List_Attestation_Email_result}
|
||||
value={New_Get_List_Attestation_Email_result.filter((data) => (data)._id === String(selected_default_attestation_Email))[0].label}
|
||||
|
||||
onChange={(event, value) => {
|
||||
setdefault_doc_modification("1");
|
||||
if (value && value._id)
|
||||
setselected_default_attestation_Email(value._id);
|
||||
else
|
||||
setselected_default_attestation_Email("")
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
|
|
|
|||
|
|
@ -1918,7 +1918,7 @@ const DisplayDetailClass_new_v2 = (props) => {
|
|||
<div className="block_sous_header_rate_title">
|
||||
|
||||
<div className="rating">
|
||||
{ratingvalue && String(ratingvalue).length === 1 &&
|
||||
{ratingvalue && String(ratingvalue).length > 0 &&
|
||||
parseInt(String(ratingvalue)) <= 5 &&
|
||||
<Rating name="half-rating-reade"
|
||||
readOnly={true}
|
||||
|
|
|
|||
|
|
@ -2005,7 +2005,7 @@ const DisplayDetailClass_new_v3 = (props) => {
|
|||
<div className="block_sous_header_rate_title">
|
||||
|
||||
<div className="rating">
|
||||
{ratingvalue && String(ratingvalue).length === 1 &&
|
||||
{ratingvalue && String(ratingvalue).length > 0 &&
|
||||
parseInt(String(ratingvalue)) <= 5 &&
|
||||
<Rating name="half-rating-reade"
|
||||
readOnly={true}
|
||||
|
|
|
|||
|
|
@ -12516,14 +12516,17 @@ const DisplayPartnerSession = (props) => {
|
|||
setGet_Class_Default_Document_id_result(res.data.message);
|
||||
|
||||
var mylocaltraining = JSON.parse(res.data.message);
|
||||
|
||||
if (mylocaltraining[local_type_document]) {
|
||||
// console.log(" OKKK = ", mylocaltraining[local_type_document]);
|
||||
setNew_Get_Class_Default_Document_id_result(mylocaltraining[local_type_document]);
|
||||
if (local_type_document === "CONVENTION_STAGIAIRE_INDIVIDUELLE_MAIL"
|
||||
|| local_type_document === "CONVENTION_STAGIAIRE_INDIVIDUELLE_PDF"
|
||||
|| local_type_document === "CONVENTION_STAGIAIRE_ENTREPRISE_MAIL"
|
||||
|| local_type_document === "CONVENTION_STAGIAIRE_ENTREPRISE_PDF")
|
||||
|| local_type_document === "CONVENTION_STAGIAIRE_ENTREPRISE_PDF") {
|
||||
|
||||
setselected_convention_id(mylocaltraining[local_type_document]);
|
||||
}
|
||||
|
||||
else if (local_type_document === "CONVOCATION_STAGIAIRE_MAIL"
|
||||
|| local_type_document === "CONVOCATION_STAGIAIRE_PDF")
|
||||
|
|
@ -14702,19 +14705,19 @@ const DisplayPartnerSession = (props) => {
|
|||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"ref_interne": "",
|
||||
"nom": "",
|
||||
"sujet": "",
|
||||
"type_doc": "",
|
||||
"cible": "",
|
||||
"joint_pdf": "",
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"ref_interne": "",
|
||||
"nom": "",
|
||||
"sujet": "",
|
||||
"type_doc": "",
|
||||
"cible": "",
|
||||
"joint_pdf": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Get_List_Stagiaire_Convocations_result(new_data2);
|
||||
|
|
@ -16689,7 +16692,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > <b>Type Document</b> <br />
|
||||
<div className="session_caract_Dialog" > <b>Type Document </b> <br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_type_convention"
|
||||
|
|
@ -16699,7 +16702,6 @@ const DisplayPartnerSession = (props) => {
|
|||
options={New_Option_Type_Document}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
|
||||
if (value.value === "email" && String(Dialog_1_message) === "CONVENTION_STAGIAIRE_INDIVIDUELLE")
|
||||
Get_Class_Default_Document_id("CONVENTION_STAGIAIRE_INDIVIDUELLE_MAIL");
|
||||
else if (value.value === "pdf" && String(Dialog_1_message) === "CONVENTION_STAGIAIRE_INDIVIDUELLE")
|
||||
|
|
@ -16775,7 +16777,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>}
|
||||
|
||||
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
|
||||
<div className="session_caract_Dialog" > <b> Choisir une convention </b>
|
||||
<div className="session_caract_Dialog" > <b> Choisir une convention </b>
|
||||
{New_Get_List_Stagiaire_Conventions_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_version_convention"
|
||||
|
|
@ -16783,7 +16785,7 @@ const DisplayPartnerSession = (props) => {
|
|||
fullWidth
|
||||
//className="disabled_style enable_style"
|
||||
options={New_Get_List_Stagiaire_Conventions_result}
|
||||
// value={New_Get_List_Stagiaire_Conventions_result.filter((data) => (data)._id === String(selected_convention_id))[0].label}
|
||||
value={New_Get_List_Stagiaire_Conventions_result.filter((data) => (data)._id === String(selected_convention_id))[0].label}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
|
||||
|
|
@ -17114,45 +17116,45 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
|
||||
New_Get_List_Stagiaire_Convocations_result.length > 0 && <div className="session_caract_Dialog" > <b> Choisir une convocation </b>
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_version_convention"
|
||||
id="event_dialog_version_convention"
|
||||
fullWidth
|
||||
//className="disabled_style enable_style"
|
||||
options={New_Get_List_Stagiaire_Convocations_result}
|
||||
value={New_Get_List_Stagiaire_Convocations_result.filter((data) => (data)._id === String(selected_convocation_id))[0].label}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
|
||||
New_Get_List_Stagiaire_Convocations_result.length > 0 && <div className="session_caract_Dialog" > <b> Choisir une convocation </b>
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_version_convention"
|
||||
id="event_dialog_version_convention"
|
||||
fullWidth
|
||||
//className="disabled_style enable_style"
|
||||
options={New_Get_List_Stagiaire_Convocations_result}
|
||||
value={New_Get_List_Stagiaire_Convocations_result.filter((data) => (data)._id === String(selected_convocation_id))[0].label}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
|
||||
setselected_convocation_id(value._id);
|
||||
setselected_convocation_id(value._id);
|
||||
|
||||
// setselected_convention_id(value._id);
|
||||
// setselected_convention_id(value._id);
|
||||
|
||||
if (String(value._id) === "default_mail") {
|
||||
setselected_convention_type("email");
|
||||
if (String(value._id) === "default_mail") {
|
||||
setselected_convention_type("email");
|
||||
}
|
||||
else if (String(value._id) === "default_pdf") {
|
||||
setselected_convention_type("pdf");
|
||||
} else {
|
||||
var result2 = Get_List_Stagiaire_Convocations_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id))
|
||||
setselected_convention_type(JSON.parse(result2).type_doc);
|
||||
}
|
||||
settab_convention_pieces_jointes_result([]);
|
||||
}
|
||||
else if (String(value._id) === "default_pdf") {
|
||||
setselected_convention_type("pdf");
|
||||
} else {
|
||||
var result2 = Get_List_Stagiaire_Convocations_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id))
|
||||
setselected_convention_type(JSON.parse(result2).type_doc);
|
||||
else {
|
||||
setselected_convocation_id("");
|
||||
settab_convention_pieces_jointes_result([]);
|
||||
}
|
||||
settab_convention_pieces_jointes_result([]);
|
||||
}
|
||||
else {
|
||||
setselected_convocation_id("");
|
||||
settab_convention_pieces_jointes_result([]);
|
||||
}
|
||||
}}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option" />
|
||||
}
|
||||
/>
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option" />
|
||||
}
|
||||
/>
|
||||
|
||||
</div>}
|
||||
</div>}
|
||||
|
||||
{String(selected_convention_type) === "email" && <div className="session_caract_Dialog" > Type Document<br />
|
||||
<TextField
|
||||
|
|
@ -17338,7 +17340,7 @@ const DisplayPartnerSession = (props) => {
|
|||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
if (!selected_convention_id || selected_convention_id === "") {
|
||||
if (!selected_convocation_id || selected_convocation_id === "") {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous devez choisir un modèle de document");
|
||||
setalert_type("error");
|
||||
|
|
@ -28121,7 +28123,7 @@ const DisplayPartnerSession = (props) => {
|
|||
{String(submenu) === String("positionnement") && <div style={{ "border": "None" }}>
|
||||
|
||||
<Module_Evaluation_Positionnement conntected_employee_id={props.conntected_employee_id} related_collection={"session_formation"}
|
||||
related_collection_recid={selected_session_id} />
|
||||
related_collection_recid={selected_session_id} class_id={session_selected_class_id} />
|
||||
|
||||
</div>}
|
||||
|
||||
|
|
|
|||
|
|
@ -1470,7 +1470,7 @@ const Display_Action_And_Class = (props) => {
|
|||
<div className="block_sous_header_rate_title">
|
||||
|
||||
<div className="rating">
|
||||
{ratingvalue && String(ratingvalue).length === 1 &&
|
||||
{ratingvalue && String(ratingvalue).length > 0 &&
|
||||
parseInt(String(ratingvalue)) <= 5 &&
|
||||
<Rating name="half-rating-reade"
|
||||
readOnly={true}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ import Social_Fa_icon from '../img_new_design_2025/social_i_Fa.png';
|
|||
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
import { FcInfo } from "react-icons/fc";
|
||||
import { FcInfo } from "react-icons/fc";
|
||||
|
||||
const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
||||
const { classId, action } = useParams();
|
||||
|
|
@ -489,7 +489,7 @@ const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
|||
|
||||
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);
|
||||
console.log(" In Display res.data.message = " + res.data.message);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
if (res.data.message.length > 0) {
|
||||
|
|
@ -1406,31 +1406,31 @@ const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
|||
|
||||
/// ----
|
||||
|
||||
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_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) => {
|
||||
const Download_one_attached_document_no_token = (event) => {
|
||||
|
||||
var nom_fiche_detaillee = "Fiche_catalogue.pdf";
|
||||
var file_name = event.target.id;
|
||||
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;
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Stored_Downloaded_File_From_Id_WITHOUT_TOKEN/" + file_name;
|
||||
|
||||
// console.log(" ### url = ", url);
|
||||
// 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");
|
||||
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 (
|
||||
|
|
@ -1676,15 +1676,23 @@ const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
|||
{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"] &&
|
||||
<div className="mob_price_2025">
|
||||
{String(DetailTraining["price"])} € HT
|
||||
{String(DetailTraining["price"])} €
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> TTC </>}
|
||||
</div>}
|
||||
|
||||
{String(DetailTraining["price"]) && String(DetailTraining["price"]) !== String("0") && DetailTraining.business_prices && Object.keys(DetailTraining.business_prices).length > 0
|
||||
&& DetailTraining["price"] && <div className="mob_price_2025">
|
||||
<nav className="discounted_price" style={{ textAlign: 'center' }}>{String(DetailTraining.business_prices[0].discounted_price)} € HT </nav>
|
||||
<nav className="discounted_price" style={{ textAlign: 'center' }}>{String(DetailTraining.business_prices[0].discounted_price)} €
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> TTC </>}
|
||||
</nav>
|
||||
|
||||
{DetailTraining.business_prices && DetailTraining.business_prices.length > 0 && <div style={{ width: '100%', float: 'left', marginLeft: '3rem' }}>
|
||||
<nav className="training_price_barre" style={{ with: '50%', float: 'left', fontSize: '14px' }}> {String(DetailTraining["price"])} € HT </nav>
|
||||
<nav className="training_price_barre" style={{ with: '50%', float: 'left', fontSize: '14px' }}> {String(DetailTraining["price"])} €
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> TTC </>}
|
||||
</nav>
|
||||
<nav className="discount_block" style={{ with: '50%', float: 'left', fontSize: '14px' }}> (- {String(DetailTraining.business_prices[0].discount)} % ) </nav>
|
||||
</div>}
|
||||
</div>}
|
||||
|
|
@ -2247,7 +2255,9 @@ const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
|||
</div>
|
||||
|
||||
{JSON.parse(formation).price && <div className="mob_cross_sell_card_content_price">
|
||||
{(String(JSON.parse(formation).price))} € HT
|
||||
{(String(JSON.parse(formation).price))} €
|
||||
{parseFloat(String(JSON.parse(formation).partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(JSON.parse(formation).partnaire_tva)) <= 0 && <> TTC </>}
|
||||
|
||||
</div>}
|
||||
|
||||
|
|
@ -2306,7 +2316,7 @@ const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
|||
<div className="block_sous_header_rate_title">
|
||||
|
||||
<div className="rating">
|
||||
{ratingvalue && String(ratingvalue).length === 1 &&
|
||||
{ratingvalue && String(ratingvalue).length > 0 &&
|
||||
parseInt(String(ratingvalue)) <= 5 &&
|
||||
<Rating name="half-rating-reade"
|
||||
readOnly={true}
|
||||
|
|
@ -2384,7 +2394,7 @@ const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
|||
|
||||
<nav className="bton_download_fiche" name={(JSON.parse(Get_Class_Catalogue_File_result[0])._id)}
|
||||
id={(JSON.parse(Get_Class_Catalogue_File_result[0])._id)} onClick={Download_one_attached_document_no_token}>
|
||||
Télécharger fiche détaillée
|
||||
Télécharger fiche détaillée
|
||||
</nav>
|
||||
|
||||
</div>}
|
||||
|
|
@ -2687,7 +2697,10 @@ const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
|||
|
||||
{String(DetailTraining["price"]) && String(DetailTraining["price"]) !== String("0") && (!DetailTraining.business_prices || Object.keys(DetailTraining.business_prices).length <= 0)
|
||||
&& DetailTraining["price"] && <div className="block_prix_2025">
|
||||
<div className="block_sticky_info_price"> {String(DetailTraining["price"])} € HT
|
||||
<div className="block_sticky_info_price"> {String(DetailTraining["price"])} €
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> TTC </>}
|
||||
|
||||
</div>
|
||||
|
||||
{DetailTraining["cpf"] && String(DetailTraining["cpf"]) === "1" && <div className="tag_eligle_cpf">Éligible CPF</div>}
|
||||
|
|
@ -2701,13 +2714,18 @@ const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
|||
&& DetailTraining["price"] &&
|
||||
<div className="block_prix_2025">
|
||||
<div className="block_sticky_info_price">
|
||||
<nav className="discounted_price">{String(DetailTraining.business_prices[0].discounted_price)} € HT </nav>
|
||||
<nav className="discounted_price">{String(DetailTraining.business_prices[0].discounted_price)} €
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> TTC </>} </nav>
|
||||
</div>
|
||||
<div className="tag_eligle_cpf">Eligle CFP
|
||||
</div>
|
||||
|
||||
{DetailTraining.business_prices && DetailTraining.business_prices.length > 0 && <div style={{ width: '100%', float: 'left' }}>
|
||||
<nav className="training_price_barre" style={{ with: '50%', float: 'left', fontSize: '14px' }}> {String(DetailTraining["price"])} € HT </nav>
|
||||
<nav className="training_price_barre" style={{ with: '50%', float: 'left', fontSize: '14px' }}> {String(DetailTraining["price"])} €
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> TTC </>}
|
||||
</nav>
|
||||
<nav className="discount_block" style={{ with: '50%', float: 'left', fontSize: '14px' }}> (- {String(DetailTraining.business_prices[0].discount)} % ) </nav>
|
||||
</div>}
|
||||
|
||||
|
|
@ -3023,7 +3041,9 @@ const Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
|||
</div>
|
||||
|
||||
{JSON.parse(formation).price && <div className="sous_crossell_list_card_card_content_price">
|
||||
{(String(JSON.parse(formation).price))} € HT
|
||||
{(String(JSON.parse(formation).price))} €
|
||||
{parseFloat(String(JSON.parse(formation).partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(JSON.parse(formation).partnaire_tva)) <= 0 && <> TTC </>}
|
||||
</div>}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,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");
|
||||
|
|
@ -250,14 +250,14 @@ const Formation_Partner_Catalog = (props) => {
|
|||
<div className="formation_partner_catalog">
|
||||
|
||||
<div style={{ "width": "100%" }}>
|
||||
|
||||
|
||||
{class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 && <div className="forma_img_gauche">
|
||||
<img src={class_img_stored_in_bdd} alt="informatique" className="training_img" />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{ (!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" && <div className="forma_img_gauche">
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" && <div className="forma_img_gauche">
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") &&
|
||||
|
|
@ -298,22 +298,22 @@ const Formation_Partner_Catalog = (props) => {
|
|||
}
|
||||
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 && <div className="forma_img_gauche">
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 && <div className="forma_img_gauche">
|
||||
<img src={userimgclassprofil} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 && <div className="forma_img_gauche">
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 && <div className="forma_img_gauche">
|
||||
<img src={img_met_autre} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "1" && <div className="forma_img_gauche">
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" && <div className="forma_img_gauche">
|
||||
<img src={props.formation.img_url} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par : <br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
<div className="forma_rightbox"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
|
@ -390,7 +390,11 @@ const Formation_Partner_Catalog = (props) => {
|
|||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && (!props.formation.business_prices ||
|
||||
Object.keys(props.formation.business_prices).length <= 0) &&
|
||||
<div className="training_price">{props.formation.price} € HT
|
||||
<div className="training_price">{props.formation.price} €
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
|
|
@ -398,9 +402,15 @@ const Formation_Partner_Catalog = (props) => {
|
|||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") &&
|
||||
props.formation.business_prices && Object.keys(props.formation.business_prices).length > 0 &&
|
||||
<div className="training_price">
|
||||
<nav className="discounted_price">{String(props.formation.business_prices[0].discounted_price)} € HT</nav>
|
||||
<nav className="discounted_price">{String(props.formation.business_prices[0].discounted_price)} €
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
</nav>
|
||||
<nav className="training_price_barre">
|
||||
{props.formation.price} € HT
|
||||
{props.formation.price} €
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
|
||||
</nav>
|
||||
|
||||
<nav className="discount_block"> (- {String(props.formation.business_prices[0].discount)} % )
|
||||
|
|
@ -410,7 +420,7 @@ const Formation_Partner_Catalog = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row row_formation_desc">
|
||||
<div className="div_row row_formation_desc">
|
||||
{parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))}
|
||||
|
||||
</div>
|
||||
|
|
@ -567,7 +577,7 @@ const Formation_Partner_Catalog = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ const Formation_Partner_Catalog_Special_JMJFormation = (props) => {
|
|||
flexDirection: 'column',
|
||||
},
|
||||
image: {
|
||||
maxWidth: '100%',
|
||||
maxWidth: '100%',
|
||||
height: '200px',
|
||||
overflow: 'hidden',
|
||||
margin: "auto",
|
||||
|
|
@ -432,16 +432,30 @@ const Formation_Partner_Catalog_Special_JMJFormation = (props) => {
|
|||
</div>
|
||||
|
||||
<h3 className="formation_titre">{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 50)}</h3>
|
||||
{props.formation.discounted_price && props.formation.business_prices && <p className="formation_prix">{props.formation.discounted_price} € HT </p>}
|
||||
{props.formation.discounted_price && props.formation.business_prices && <p className="formation_prix">{props.formation.discounted_price} €
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
|
||||
</p>}
|
||||
|
||||
{props.formation.business_prices && props.formation.business_prices.length <= 0
|
||||
&& <p className="formation_prix">{props.formation.price} € HT </p>}
|
||||
&& <p className="formation_prix">{props.formation.price} €
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
</p>}
|
||||
|
||||
{props.formation.business_prices && props.formation.business_prices.length > 0 &&
|
||||
<p style={{ width: '100%', float: 'left' }}>
|
||||
|
||||
<p className="formation_prix" style={{ width: '100%', float: 'left' }}>{props.formation.business_prices[0].discounted_price}€ HT
|
||||
<font className='training_price_barre' style={{ fontSize: '14px' }}> {props.formation.price} € HT </font>
|
||||
<p className="formation_prix" style={{ width: '100%', float: 'left' }}>{props.formation.business_prices[0].discounted_price}€
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
|
||||
<font className='training_price_barre' style={{ fontSize: '14px' }}> {props.formation.price} €
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
|
||||
</font>
|
||||
<font className='discount_block' style={{ fontSize: '14px' }}> ({props.formation.business_prices[0].discount} %) </font></p>
|
||||
</p>}
|
||||
|
||||
|
|
|
|||
|
|
@ -2046,7 +2046,7 @@ const JmJ_Display_Partner_Catalog_DetailClass_new_v2 = (props) => {
|
|||
<div className="block_sous_header_rate_title">
|
||||
|
||||
<div className="rating">
|
||||
{ratingvalue && String(ratingvalue).length === 1 &&
|
||||
{ratingvalue && String(ratingvalue).length > 0 &&
|
||||
parseInt(String(ratingvalue)) <= 5 &&
|
||||
<Rating name="half-rating-reade"
|
||||
readOnly={true}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,480 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import { useHistory } from "react-router-dom";
|
||||
|
||||
import { useCookies } from "react-cookie";
|
||||
import { confirmAlert } from 'react-confirm-alert';
|
||||
import Fotter_Catalog_Pub from "../Fotter_Catalog_Pub";
|
||||
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 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_Partner_Catalog_Special_JMJFormation = (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 => {
|
||||
|
||||
// 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("");
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* 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);
|
||||
|
||||
// console.log(" #### useEffect props.formation = ", props.formation);
|
||||
|
||||
|
||||
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 styles = {
|
||||
list: {
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: '32px',
|
||||
width: '100%',
|
||||
},
|
||||
row: {
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
gap: '24px',
|
||||
width: '100%',
|
||||
},
|
||||
card: {
|
||||
flexGrow: 1,
|
||||
backgroundColor: '#fff',
|
||||
borderRadius: '8px',
|
||||
overflow: 'hidden',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
},
|
||||
image: {
|
||||
maxWidth: '100%',
|
||||
height: '200px',
|
||||
overflow: 'hidden',
|
||||
margin: "auto",
|
||||
|
||||
},
|
||||
content: {
|
||||
padding: '16px',
|
||||
},
|
||||
header: {
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
},
|
||||
eligibility: {
|
||||
backgroundColor: '#e2e9fb',
|
||||
padding: '4px 8px',
|
||||
borderRadius: '4px',
|
||||
fontSize: '12px',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
title: {
|
||||
fontSize: '14px',
|
||||
fontWeight: 'bold',
|
||||
margin: '8px 0',
|
||||
},
|
||||
price: {
|
||||
fontSize: '14px',
|
||||
fontWeight: 'bold',
|
||||
color: '#000',
|
||||
},
|
||||
description: {
|
||||
fontSize: '12px',
|
||||
color: '#666',
|
||||
margin: '8px 0',
|
||||
height: "40px",
|
||||
overflow: "hidden",
|
||||
},
|
||||
details: {
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
marginTop: '16px',
|
||||
},
|
||||
button: {
|
||||
backgroundColor: '#007bff',
|
||||
color: '#fff',
|
||||
padding: '8px 16px',
|
||||
border: 'none',
|
||||
borderRadius: '4px',
|
||||
cursor: 'pointer',
|
||||
},
|
||||
buttonOutline: {
|
||||
backgroundColor: '#fff',
|
||||
color: '#007bff',
|
||||
padding: '8px 16px',
|
||||
border: '1px solid #007bff',
|
||||
borderRadius: '4px',
|
||||
cursor: 'pointer',
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
<div className="new_formation_2025">
|
||||
|
||||
|
||||
<div style={styles.card}>
|
||||
<div style={{ width: '100%', textAlign: 'right', zIndex: '9999' }}>
|
||||
|
||||
<div style={{ width: '50%', float: 'left' }}> </div>
|
||||
|
||||
{props.formation.cpf && String(props.formation.cpf) === String("1") && <div className="case_cpf" >
|
||||
<span className="tag_cpf_txt_ok_cpf" >{"OUI CPF"}</span>
|
||||
</div>
|
||||
}
|
||||
{props.formation.cpf && String(props.formation.cpf) !== String("1") && <div className="case_cpf">
|
||||
<span className="tag_cpf_txt_no_ok_cpf">{"NON CPF"}</span>
|
||||
</div>
|
||||
}
|
||||
{!props.formation.cpf && String(props.formation.cpf) !== String("1") && <div className="case_cpf">
|
||||
<span className="tag_cpf_txt_no_ok_cpf">{"NON CPF"}</span>
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 &&
|
||||
<img src={class_img_stored_in_bdd} alt="Formation" style={styles.image} />
|
||||
}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) &&
|
||||
(!props.formation.img_url || String(props.formation.img_url).length <= 10) &&
|
||||
String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" &&
|
||||
|
||||
<div >
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_program} alt="informatique" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_graphisme} alt="graphisme" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_management} alt="management" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_digital} alt="digital" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_bureautic} alt="office" style={styles.image} />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_rh} alt="ressources humaines" style={styles.image} />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_vente} alt="vente" style={styles.image} />}
|
||||
|
||||
{!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" && <img src={img_met_dev_perso} alt="developpement personnel" style={styles.image} />}
|
||||
|
||||
{String(isclassimage) === "True" && <img src={userimgclassprofil} alt="developpement personnel" style={styles.image} />}
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 &&
|
||||
<div>
|
||||
<img src={userimgclassprofil} alt="autre" style={styles.image} />
|
||||
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br />
|
||||
{String(props.formation.institut_formation)} </div>*/}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 &&
|
||||
<div>
|
||||
<img src={img_met_autre} alt="autre" style={styles.image} />
|
||||
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br />
|
||||
{String(props.formation.institut_formation)} </div>*/}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" &&
|
||||
<div>
|
||||
<img src={props.formation.img_url} alt="autre" style={styles.image} />
|
||||
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par : <br />
|
||||
{String(props.formation.institut_formation)} </div>*/}
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="block_main_contente">
|
||||
<div className="block_top_content">
|
||||
<div className="div_row_gauche" >
|
||||
{props.formation.note && String(props.formation.note).length === 1 &&
|
||||
parseInt(String(props.formation.note)) <= 5 &&
|
||||
<Rating name="half-rating-read" defaultValue={props.formation.note} precision={0.5} readOnly style={{ fontSize: '15px' }} />
|
||||
}
|
||||
</div>
|
||||
|
||||
<h3 className="formation_titre">{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 50)}</h3>
|
||||
{props.formation.discounted_price && props.formation.business_prices && <p className="formation_prix">{props.formation.discounted_price} € HT </p>}
|
||||
|
||||
{props.formation.business_prices && props.formation.business_prices.length <= 0
|
||||
&& <p className="formation_prix">{props.formation.price} € HT </p>}
|
||||
|
||||
{props.formation.business_prices && props.formation.business_prices.length > 0 &&
|
||||
<p style={{ width: '100%', float: 'left' }}>
|
||||
|
||||
<p className="formation_prix" style={{ width: '100%', float: 'left' }}>{props.formation.business_prices[0].discounted_price}€ HT
|
||||
<font className='training_price_barre' style={{ fontSize: '14px' }}> {props.formation.price} € HT </font>
|
||||
<font className='discount_block' style={{ fontSize: '14px' }}> ({props.formation.business_prices[0].discount} %) </font></p>
|
||||
</p>}
|
||||
|
||||
<p className="formation_description"> {String(parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))).substring(0, 80)}...</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="block_cats">
|
||||
<button className="block_cats_bton_detail">
|
||||
<nav className="block_cats_bton_detail_text"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
}}> Voir les détails </nav></button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export default Formation_Partner_Catalog_Special_JMJFormation;
|
||||
|
|
@ -534,7 +534,7 @@ const Module_Attestation_Formation = (props) => {
|
|||
function Get_List_Stagiaire_Attestation_Ftion(ref_interne, nom, type_doc, courrier_template_type_document_ref_interne) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("type_doc", type_doc);
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ const Module_Evaluation_Positionnement = (props) => {
|
|||
},
|
||||
},
|
||||
|
||||
{ field: 'mode_envoi', headerName: 'Mode Envoi', minwidth: 300, flex: 1, hide: true, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'mode_envoi', headerName: 'Mode Envoi', minwidth: 300, flex: 1, hide: true, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
|
||||
{
|
||||
|
|
@ -852,6 +852,68 @@ const Module_Evaluation_Positionnement = (props) => {
|
|||
const fixedVal = [];
|
||||
const [val, setVal] = useState([...fixedVal]);
|
||||
|
||||
const [New_Get_Class_Default_Document_id_result, setNew_Get_Class_Default_Document_id_result] = useState("");
|
||||
|
||||
const [Get_Class_Default_Document_id_api, setGet_Class_Default_Document_id_api] = useState();
|
||||
const [Get_Class_Default_Document_id_message, setGet_Class_Default_Document_id_message] = useState();
|
||||
const [Get_Class_Default_Document_id_result, setGet_Class_Default_Document_id_result] = useState();
|
||||
function Get_Class_Default_Document_id(local_type_document) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("class_id", props.class_id);
|
||||
form.append("document_type", local_type_document);
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Class_List_Default_Documents_For_Given_Type_Doc/";
|
||||
setLoading(true);
|
||||
|
||||
setNew_Get_Class_Default_Document_id_result("");
|
||||
setselected_formulaire_id("");
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_Class_Default_Document_id res.data.status = " + res.data.status);
|
||||
// console.log(" In Get_Class_Default_Document_id res.data.message r_class = " + res.data.message);
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
setGet_Class_Default_Document_id_api("true");
|
||||
setGet_Class_Default_Document_id_result(res.data.message);
|
||||
|
||||
var mylocaltraining = JSON.parse(res.data.message);
|
||||
|
||||
if (mylocaltraining[local_type_document]) {
|
||||
// console.log(" OKKK = ", mylocaltraining[local_type_document]);
|
||||
setNew_Get_Class_Default_Document_id_result(mylocaltraining[local_type_document]);
|
||||
if (local_type_document === "QUESTION_POSITIONNEMENT") {
|
||||
setselected_formulaire_id(mylocaltraining[local_type_document]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_Class_Default_Document_id_api("false");
|
||||
setGet_Class_Default_Document_id_message(res.data.message);
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Get_Class_Default_Document_id = ', error);
|
||||
setGet_Class_Default_Document_id_api("false");
|
||||
alert("Impossible de récupérer le document par défaut");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
|
|
@ -1032,14 +1094,16 @@ const Module_Evaluation_Positionnement = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Choisir un questionnaire de positionnement </b>
|
||||
<Autocomplete
|
||||
<div className="session_caract_Dialog" > <b> Choisir un questionnaire de positionnement</b>
|
||||
{New_Getall_Partner_Formulaires_with_Filter.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_version_q_position"
|
||||
id="event_dialog_version_q_position"
|
||||
fullWidth
|
||||
//className="disabled_style enable_style"
|
||||
options={New_Getall_Partner_Formulaires_with_Filter}
|
||||
value={New_Getall_Partner_Formulaires_with_Filter.filter((data) => (data)._id === String(selected_formulaire_id))[0].label}
|
||||
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
|
|
@ -1055,7 +1119,7 @@ const Module_Evaluation_Positionnement = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>}
|
||||
|
||||
</div>
|
||||
</DialogContent>
|
||||
|
|
@ -1117,6 +1181,7 @@ const Module_Evaluation_Positionnement = (props) => {
|
|||
<Button className="bton_emarge" onClick={(event, value) => {
|
||||
setVal([]);
|
||||
|
||||
Get_Class_Default_Document_id("QUESTION_POSITIONNEMENT");
|
||||
Getall_Partner_Formulaires_with_Filter();
|
||||
setDialog_LIST_POSITION_QUESTION_open(true);
|
||||
}}>Initialiser Q. Position</Button>
|
||||
|
|
|
|||
|
|
@ -778,7 +778,7 @@ const Module_Session_Evaluation = (props) => {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("session_id", selected_session_id);
|
||||
form.append("formulaire_id", selected_formulaire_id);
|
||||
form.append("formulaire_id", selected_formulaire_hot_eval_id);
|
||||
form.append("survey_type", "hot_eval");
|
||||
form.append("sending_date", "");
|
||||
|
||||
|
|
@ -1235,7 +1235,7 @@ const Module_Session_Evaluation = (props) => {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("session_id", selected_session_id);
|
||||
form.append("formulaire_id", selected_formulaire_id);
|
||||
form.append("formulaire_id", selected_formulaire_cold_eval_id);
|
||||
form.append("survey_type", "cold_eval");
|
||||
form.append("sending_date", date_cold_eval_sending);
|
||||
|
||||
|
|
@ -1427,7 +1427,7 @@ const Module_Session_Evaluation = (props) => {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("session_id", selected_session_id);
|
||||
form.append("formulaire_id", selected_formulaire_id);
|
||||
form.append("formulaire_id", selected_formulaire_formateur_eval_id);
|
||||
form.append("related_collection", "ressource_humaine");
|
||||
form.append("related_collection_id", selected_formateur_id);
|
||||
//form.append("class_id", props.session_class_id);
|
||||
|
|
@ -2227,10 +2227,16 @@ const Module_Session_Evaluation = (props) => {
|
|||
|
||||
const Dialog_LIST_HOT_EVALUATION_QUESTION_handleClose_buton = () => {
|
||||
setDialog_LIST_HOT_EVALUATION_QUESTION_open(false);
|
||||
setselected_formulaire_id("");
|
||||
setselected_formulaire_hot_eval_id("");
|
||||
};
|
||||
|
||||
|
||||
const [selected_formulaire_id, setselected_formulaire_id] = useState();
|
||||
const [selected_formulaire_id, setselected_formulaire_id] = useState("");
|
||||
|
||||
const [selected_formulaire_hot_eval_id, setselected_formulaire_hot_eval_id] = useState("");
|
||||
const [selected_formulaire_cold_eval_id, setselected_formulaire_cold_eval_id] = useState("");
|
||||
const [selected_formulaire_formateur_eval_id, setselected_formulaire_formateur_eval_id] = useState("");
|
||||
|
||||
const [selected_formulaire_type, setselected_formulaire_type] = useState("");
|
||||
|
||||
|
|
@ -2245,6 +2251,8 @@ const Module_Session_Evaluation = (props) => {
|
|||
|
||||
const Dialog_LIST_COLD_EVALUATION_QUESTION_handleClose_buton = () => {
|
||||
setDialog_LIST_COLD_EVALUATION_QUESTION_open(false);
|
||||
setselected_formateur_id("");
|
||||
setselected_formulaire_cold_eval_id("")
|
||||
};
|
||||
|
||||
var date_today_90j = new Date();
|
||||
|
|
@ -2260,6 +2268,8 @@ const Module_Session_Evaluation = (props) => {
|
|||
|
||||
const Dialog_LIST_EVALUATION_FORMATEUR_handleClose_buton = () => {
|
||||
setDialog_LIST_EVALUATION_FORMATEUR_open(false);
|
||||
setselected_formateur_id("");
|
||||
setselected_formulaire_formateur_eval_id("");
|
||||
};
|
||||
|
||||
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
|
||||
|
|
@ -2292,6 +2302,85 @@ const Module_Session_Evaluation = (props) => {
|
|||
|
||||
const [selected_specific_survey, setselected_specific_survey] = useState("");
|
||||
|
||||
const [New_Get_Class_Default_Document_id_result, setNew_Get_Class_Default_Document_id_result] = useState("");
|
||||
|
||||
const [Get_Class_Default_Document_id_api, setGet_Class_Default_Document_id_api] = useState();
|
||||
const [Get_Class_Default_Document_id_message, setGet_Class_Default_Document_id_message] = useState();
|
||||
const [Get_Class_Default_Document_id_result, setGet_Class_Default_Document_id_result] = useState();
|
||||
function Get_Class_Default_Document_id(local_type_document) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("class_id", props.session_class_id);
|
||||
form.append("document_type", local_type_document);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Class_List_Default_Documents_For_Given_Type_Doc/";
|
||||
setLoading(true);
|
||||
|
||||
setNew_Get_Class_Default_Document_id_result("");
|
||||
setselected_formulaire_id("");
|
||||
setselected_formulaire_hot_eval_id("");
|
||||
setselected_formulaire_cold_eval_id("");
|
||||
setselected_formulaire_formateur_eval_id("");
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Get_Class_Default_Document_id res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_Class_Default_Document_id res.data.message r_class = " + res.data.message);
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
|
||||
setGet_Class_Default_Document_id_api("true");
|
||||
setGet_Class_Default_Document_id_result(res.data.message);
|
||||
|
||||
if (res.data.message) {
|
||||
|
||||
var mylocaltraining = JSON.parse(res.data.message);
|
||||
|
||||
if (mylocaltraining[local_type_document]) {
|
||||
// console.log(" OKKK = ", mylocaltraining[local_type_document]);
|
||||
setNew_Get_Class_Default_Document_id_result(mylocaltraining[local_type_document]);
|
||||
|
||||
if (local_type_document === "EVAL_FORMATION_HOT") {
|
||||
setselected_formulaire_hot_eval_id(mylocaltraining[local_type_document]);
|
||||
} else if (local_type_document === "EVAL_FORMATION_COLD") {
|
||||
setselected_formulaire_cold_eval_id(mylocaltraining[local_type_document]);
|
||||
} else if (local_type_document === "EVAL_FORMATION_FORMATEUR") {
|
||||
setselected_formulaire_formateur_eval_id(mylocaltraining[local_type_document]);
|
||||
}
|
||||
|
||||
else {
|
||||
setselected_formulaire_id(mylocaltraining[local_type_document]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_Class_Default_Document_id_api("false");
|
||||
setGet_Class_Default_Document_id_message(res.data.message);
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Get_Class_Default_Document_id = ', error);
|
||||
setGet_Class_Default_Document_id_api("false");
|
||||
alert("Impossible de récupérer le document par défaut");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<div className="modulesessionevaluation">
|
||||
|
||||
|
|
@ -2462,22 +2551,26 @@ const Module_Session_Evaluation = (props) => {
|
|||
</DialogContentText>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Choisir un questionnaire d'évaluation à chaud
|
||||
<Autocomplete
|
||||
<div className="session_caract_Dialog" > <b>Choisir un questionnaire d'évaluation à chaud </b>
|
||||
{New_Getall_Partner_Formulaires_hot_evaluation_with_Filter.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_version_q_hot_evaluation"
|
||||
id="event_dialog_version_q_hot_evaluation"
|
||||
fullWidth
|
||||
//className="disabled_style enable_style"
|
||||
options={New_Getall_Partner_Formulaires_hot_evaluation_with_Filter}
|
||||
value={New_Getall_Partner_Formulaires_hot_evaluation_with_Filter.filter((data) => (data)._id === String(selected_formulaire_hot_eval_id))[0].label}
|
||||
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
|
||||
setselected_formulaire_id(value._id);
|
||||
setselected_formulaire_hot_eval_id(value._id);
|
||||
|
||||
} else {
|
||||
setselected_formulaire_id("");
|
||||
setselected_formulaire_hot_eval_id(value._id);
|
||||
}
|
||||
}}
|
||||
|
||||
|
|
@ -2486,7 +2579,7 @@ const Module_Session_Evaluation = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>}
|
||||
|
||||
</div>
|
||||
</DialogContent>
|
||||
|
|
@ -2543,21 +2636,24 @@ const Module_Session_Evaluation = (props) => {
|
|||
|
||||
|
||||
<div className="session_caract_Dialog"> <b> Choisir un questionnaire d'évaluation à froid </b>
|
||||
<Autocomplete
|
||||
{New_Getall_Partner_Formulaires_cold_evaluation_with_Filter.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_version_q_COLD_evaluation"
|
||||
id="event_dialog_version_q_COLD_evaluation"
|
||||
fullWidth
|
||||
//className="disabled_style enable_style"
|
||||
options={New_Getall_Partner_Formulaires_cold_evaluation_with_Filter}
|
||||
value={New_Getall_Partner_Formulaires_cold_evaluation_with_Filter.filter((data) => (data)._id === String(selected_formulaire_cold_eval_id))[0].label}
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
|
||||
setselected_formulaire_id(value._id);
|
||||
setselected_formulaire_cold_eval_id(value._id);
|
||||
|
||||
} else {
|
||||
setselected_formulaire_id("");
|
||||
setselected_formulaire_cold_eval_id("");
|
||||
}
|
||||
}}
|
||||
|
||||
|
|
@ -2566,7 +2662,7 @@ const Module_Session_Evaluation = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -2644,21 +2740,23 @@ const Module_Session_Evaluation = (props) => {
|
|||
|
||||
|
||||
<div className="session_caract_Dialog"> <b> Choisir un questionnaire d'évaluation pour le formateur </b>
|
||||
<Autocomplete
|
||||
{New_Getall_Partner_Formulaires_formateur_evaluation_with_Filter.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_version_q_COLD_evaluation"
|
||||
id="event_dialog_version_q_COLD_evaluation"
|
||||
fullWidth
|
||||
//className="disabled_style enable_style"
|
||||
options={New_Getall_Partner_Formulaires_formateur_evaluation_with_Filter}
|
||||
|
||||
value={New_Getall_Partner_Formulaires_formateur_evaluation_with_Filter.filter((data) => (data)._id === String(selected_formulaire_formateur_eval_id))[0].label}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
|
||||
setselected_formulaire_id(value._id);
|
||||
setselected_formulaire_formateur_eval_id(value._id);
|
||||
|
||||
} else {
|
||||
setselected_formulaire_id("");
|
||||
setselected_formulaire_formateur_eval_id(value._id);
|
||||
}
|
||||
}}
|
||||
|
||||
|
|
@ -2667,7 +2765,7 @@ const Module_Session_Evaluation = (props) => {
|
|||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -2746,7 +2844,6 @@ const Module_Session_Evaluation = (props) => {
|
|||
|
||||
|
||||
|
||||
|
||||
<div style={{ "border": "None" }}>
|
||||
|
||||
|
||||
|
|
@ -2781,6 +2878,8 @@ const Module_Session_Evaluation = (props) => {
|
|||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
setselected_formulaire_id("");
|
||||
Get_Class_Default_Document_id("EVAL_FORMATION_HOT");
|
||||
Getall_Partner_Formulaires_hot_evaluation_with_Filter();
|
||||
setDialog_LIST_HOT_EVALUATION_QUESTION_open(true);
|
||||
close();
|
||||
|
|
@ -3079,6 +3178,8 @@ const Module_Session_Evaluation = (props) => {
|
|||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
setselected_formulaire_id("");
|
||||
Get_Class_Default_Document_id("EVAL_FORMATION_COLD");
|
||||
Getall_Partner_Formulaires_cold_evaluation_with_Filter();
|
||||
setDialog_LIST_COLD_EVALUATION_QUESTION_open(true);
|
||||
close();
|
||||
|
|
@ -3385,8 +3486,10 @@ const Module_Session_Evaluation = (props) => {
|
|||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
Getall_Partner_Formulaires_formateur_evaluation_with_Filter();
|
||||
setselected_formateur_id("");
|
||||
Get_Class_Default_Document_id("EVAL_FORMATION_FORMATEUR");
|
||||
Getall_Partner_Formulaires_formateur_evaluation_with_Filter();
|
||||
|
||||
setDialog_LIST_EVALUATION_FORMATEUR_open(true);
|
||||
close();
|
||||
}}> Valider </button>
|
||||
|
|
|
|||
|
|
@ -1319,7 +1319,7 @@ const Mon_Catalogue_Public = (props) => {
|
|||
form.append("user_state", state);
|
||||
form.append("subdomain", window.location.host.split(".")[0]);
|
||||
|
||||
|
||||
|
||||
var myurl = ""
|
||||
if (displayAllClasses == true) {
|
||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/get_all_class_Given_partner_owner_recid_No_Login/";
|
||||
|
|
@ -1333,7 +1333,7 @@ const Mon_Catalogue_Public = (props) => {
|
|||
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 test res.data.message = " + res.data.message);
|
||||
// console.log(" In test res.data.message = " + res.data.message);
|
||||
setmyApiResponse("True");
|
||||
setResult(res.data.message)
|
||||
|
||||
|
|
@ -2723,7 +2723,7 @@ const Mon_Catalogue_Public = (props) => {
|
|||
if (JSON.parse(x).affiche_contact)
|
||||
catalog_pub_affiche_contact = JSON.parse(x).affiche_contact;
|
||||
|
||||
console.log(" ### setmy_theme_code = ", theme_code);
|
||||
// console.log(" ### setmy_theme_code = ", theme_code);
|
||||
|
||||
|
||||
//---
|
||||
|
|
@ -2789,7 +2789,7 @@ const Mon_Catalogue_Public = (props) => {
|
|||
"affiche_contact": catalog_pub_affiche_contact,
|
||||
|
||||
};
|
||||
console.log(" --- node = ", node);
|
||||
// console.log(" --- node = ", node);
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -433,16 +433,34 @@ const New_C_Formation_2025 = (props) => {
|
|||
</div>
|
||||
|
||||
<h3 className="formation_titre">{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 50)}</h3>
|
||||
{props.formation.discounted_price && props.formation.business_prices && <p className="formation_prix">{props.formation.discounted_price} € HT </p>}
|
||||
{props.formation.discounted_price && props.formation.business_prices && <p className="formation_prix">{props.formation.discounted_price} €
|
||||
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
|
||||
</p>}
|
||||
|
||||
{props.formation.business_prices && props.formation.business_prices.length <= 0
|
||||
&& <p className="formation_prix">{props.formation.price} € HT </p>}
|
||||
&& <p className="formation_prix">
|
||||
{props.formation.price} €
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
|
||||
</p>}
|
||||
|
||||
{props.formation.business_prices && props.formation.business_prices.length > 0 &&
|
||||
<p style={{ width: '100%', float: 'left' }}>
|
||||
|
||||
<p className="formation_prix" style={{ width: '100%', float: 'left' }}>{props.formation.business_prices[0].discounted_price}€ HT
|
||||
<font className='training_price_barre' style={{ fontSize: '14px' }}> {props.formation.price} € HT </font>
|
||||
<p className="formation_prix" style={{ width: '100%', float: 'left' }}>{props.formation.business_prices[0].discounted_price}€
|
||||
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
|
||||
|
||||
<font className='training_price_barre' style={{ fontSize: '14px' }}> {props.formation.price} €
|
||||
{parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT </>}
|
||||
{parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC </>}
|
||||
</font>
|
||||
<font className='discount_block' style={{ fontSize: '14px' }}> ({props.formation.business_prices[0].discount} %) </font></p>
|
||||
</p>}
|
||||
|
||||
|
|
@ -474,7 +492,7 @@ const New_C_Formation_2025 = (props) => {
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
</div >
|
||||
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,721 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
|
||||
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 coeurimg from "../mysy_img/coeur.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 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_Partner_Catalog = (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-Partner-Catalog-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("")
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
<div className="formation_partner_catalog">
|
||||
|
||||
<div style={{ "width": "100%" }}>
|
||||
|
||||
{class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 && <div className="forma_img_gauche">
|
||||
<img src={class_img_stored_in_bdd} alt="informatique" className="training_img" />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{ (!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" && <div className="forma_img_gauche">
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_program} alt="informatique" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_graphisme} alt="graphisme" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_management} alt="management" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_digital} alt="digital" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_bureautic} alt="office" className="training_img" />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_rh} alt="ressources humaines" className="training_img" />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_vente} alt="vente" className="training_img" />}
|
||||
|
||||
{!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" && <img src={img_met_dev_perso} alt="developpement personnel" className="training_img" />}
|
||||
|
||||
{String(isclassimage) === "True" && <img src={userimgclassprofil} alt="developpement personnel" className="training_img" />}
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 && <div className="forma_img_gauche">
|
||||
<img src={userimgclassprofil} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 && <div className="forma_img_gauche">
|
||||
<img src={img_met_autre} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "1" && <div className="forma_img_gauche">
|
||||
<img src={props.formation.img_url} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par : <br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="forma_rightbox"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
}}>
|
||||
<div className="p_forma">
|
||||
<div className="div_row">
|
||||
|
||||
<div className="div_row_gauche" style={{ "marginTop": "5px" }}>
|
||||
{props.formation.note && String(props.formation.note).length === 1 &&
|
||||
parseInt(String(props.formation.note)) <= 5 &&
|
||||
|
||||
<Rating name="half-rating-read" defaultValue={props.formation.note} precision={0.5} readOnly />
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
<div className="div_row_droite div_row_droite_cpf">
|
||||
<div className="block_cpf">
|
||||
<div className="block_cpf_txt">
|
||||
|
||||
|
||||
{props.formation.cpf && String(props.formation.cpf) === String("1") &&
|
||||
<div>
|
||||
OUI Éligible au CPF
|
||||
</div>}
|
||||
|
||||
{props.formation.cpf && String(props.formation.cpf) !== String("1") &&
|
||||
<div>
|
||||
NON Éligible au CPF
|
||||
</div>}
|
||||
|
||||
{!props.formation.cpf &&
|
||||
<div>
|
||||
NON Éligible au CPF
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="div_row row_formation_title">
|
||||
<p className="p_class training_title">
|
||||
<b>
|
||||
{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 100)}
|
||||
</b>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div className="div_row">
|
||||
|
||||
{String(props.formation.price).length == 9 &&
|
||||
<div className="training_price" > <i>Prix : Non communiqué</i>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) === String("0") &&
|
||||
<div className="training_price">Gratuit
|
||||
</div>
|
||||
}
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && (!props.formation.business_prices ||
|
||||
Object.keys(props.formation.business_prices).length <= 0) &&
|
||||
<div className="training_price">{props.formation.price} € HT
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") &&
|
||||
props.formation.business_prices && Object.keys(props.formation.business_prices).length > 0 &&
|
||||
<div className="training_price">
|
||||
<nav className="discounted_price">{String(props.formation.business_prices[0].discounted_price)} € HT</nav>
|
||||
<nav className="training_price_barre">
|
||||
{props.formation.price} € HT
|
||||
</nav>
|
||||
|
||||
<nav className="discount_block"> (- {String(props.formation.business_prices[0].discount)} % )
|
||||
</nav>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row row_formation_desc">
|
||||
{parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))}
|
||||
|
||||
</div>
|
||||
{GetCurrentClass_trainingsession_cities_result && GetCurrentClass_trainingsession_cities_result.length > 0 &&
|
||||
<nav style={{ "width": "100%", "float": "left", "textAlign": "left", "color": "#619E31" }}>
|
||||
<nav style={{ "width": "auto", "float": "left" }}> <CiLocationOn className="icone_location" /> </nav>
|
||||
|
||||
{GetCurrentClass_trainingsession_cities_result && GetCurrentClass_trainingsession_cities_result.sort().slice(0, 5).map((formation_ville) => (
|
||||
<nav style={{ "width": "auto", "float": "left" }}>
|
||||
|
||||
|
||||
|
||||
{formation_ville &&
|
||||
|
||||
<b> {formation_ville.replaceAll('"', '').substring(0, 20).toLocaleLowerCase().charAt(0).toUpperCase() +
|
||||
formation_ville.replaceAll('"', '').substring(0, 20).toLocaleLowerCase().slice(1)} </b>
|
||||
|
||||
}
|
||||
|
||||
</nav>
|
||||
))}
|
||||
|
||||
|
||||
|
||||
</nav>
|
||||
}
|
||||
{!GetCurrentClass_result || GetCurrentClass_result.length <= 0 &&
|
||||
<nav style={{ "width": "100%", "float": "left", "textAlign": "left", "fontWeight": "700" }}><CiLocationOn className="icone_location" /> A venir </nav>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className="div_row row_formation_crit">
|
||||
|
||||
<hr style={{ "width": "90%", "marginLeft": "auto", "marginRight": "auto", "marginBottom": "2px", "marginTop": "2px" }} />
|
||||
|
||||
<div className="div_row_gauche div_row_gauche_critere" >
|
||||
<div className="div_row_critere" style={{ "marginTop": "0.5rem", "marginBottom": "0.3rem" }}>
|
||||
{!props.formation.extented_search &&
|
||||
<div className="div_row_gauche">
|
||||
|
||||
|
||||
{props.formation.duration_unit &&
|
||||
<div style={{ "width": "100%" }}>
|
||||
<div className="criteres ftion_tab_gauche">Durée
|
||||
</div>
|
||||
|
||||
{String(props.formation.duration_unit) === "heure" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} hr(s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "heures" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} hr(s)
|
||||
</div>}
|
||||
|
||||
|
||||
{String(props.formation.duration_unit) === "jour" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} jr(s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "mois" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} mois(s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "semaine" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} Sem (s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "user_rythme" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
A votre rythme
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{!props.formation.duration_unit &&
|
||||
<div style={{ "width": "100%" }}>
|
||||
<div className="criteres ftion_tab_gauche">Durée
|
||||
</div>
|
||||
|
||||
{props.formation.duration && <div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} jr(s)
|
||||
</div>}
|
||||
|
||||
{!props.formation.duration && <div className="criteres ftion_tab_droite">
|
||||
<i> En traitement </i>
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
}
|
||||
<div style={{ "width": "100%" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
Certification
|
||||
</div>
|
||||
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.certif && String(props.formation.certif) === String("1") &&
|
||||
<div>
|
||||
Oui
|
||||
</div>}
|
||||
|
||||
{props.formation.certif && String(props.formation.certif) !== String("1") &&
|
||||
<div>
|
||||
Non
|
||||
</div>}
|
||||
|
||||
{!props.formation.certif &&
|
||||
<div>
|
||||
NC
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="media_sociaux" style={{ 'float': "left", marginTop: "0.2rem", }}>
|
||||
<FacebookShareButton
|
||||
url={"https://www.mysy-training.com/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url}
|
||||
|
||||
quote={props.formation.title + " -- " + props.formation.description}
|
||||
hashtag={"ySyTraining"}
|
||||
>
|
||||
<SocialIcon network="facebook" style={{ height: 20, width: 20 }} />
|
||||
</FacebookShareButton>
|
||||
|
||||
|
||||
<TwitterShareButton
|
||||
url={"https://www.mysy-training.com/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url}
|
||||
hashtag={"#MySy-Formation"}
|
||||
>
|
||||
<SocialIcon network="twitter" style={{ height: 20, width: 20 }} />
|
||||
</TwitterShareButton>
|
||||
|
||||
|
||||
<LinkedinShareButton
|
||||
url={"https://www.mysy-training.com/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url}
|
||||
title={" Une nouvelle formation : " + props.formation.title}
|
||||
summary={props.formation.title + " -- " + props.formation.description}
|
||||
|
||||
source={"https://www.mysy-training.com/"}
|
||||
|
||||
>
|
||||
<SocialIcon network="linkedin" style={{ height: 20, width: 20 }} />
|
||||
</LinkedinShareButton>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="div_row_droite" style={{ textAlign: "center" }}>
|
||||
{String(props.formation.coeur) === String("1") && <div>
|
||||
<img class="imgcoeur" src={coeurimg} alt="coup de coeur" />
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style={{ "width": "100%", "float": "right" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
Sur site
|
||||
</div>
|
||||
{props.formation.presentiel && props.formation.presentiel.presentiel &&
|
||||
String(props.formation.presentiel.presentiel) === String("1") && <div className="criteres ftion_tab_droite">
|
||||
Oui
|
||||
</div>}
|
||||
|
||||
{props.formation.presentiel && props.formation.presentiel.presentiel &&
|
||||
String(props.formation.presentiel.presentiel) !== String("1") && <div className="criteres ftion_tab_droite">
|
||||
Non
|
||||
</div>}
|
||||
|
||||
{!props.formation.presentiel || !props.formation.presentiel.presentiel &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
NC
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
<div style={{ "width": "100%", "float": "right" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
A distance
|
||||
</div>
|
||||
{props.formation.presentiel && props.formation.presentiel.distantiel &&
|
||||
String(props.formation.presentiel.distantiel) === String("1") && <div className="criteres ftion_tab_droite">
|
||||
Oui
|
||||
</div>}
|
||||
|
||||
{props.formation.presentiel && props.formation.presentiel.distantiel &&
|
||||
String(props.formation.presentiel.distantiel) !== String("1") && <div className="criteres ftion_tab_droite">
|
||||
Non
|
||||
</div>}
|
||||
|
||||
{!props.formation.presentiel || !props.formation.presentiel.distantiel &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
NC
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
<div style={{ "width": "100%", "float": "right" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
Support
|
||||
</div>
|
||||
{props.formation.support &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.support}
|
||||
</div>}
|
||||
|
||||
{!props.formation.support &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
NC
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className="div_row_droite div_row_droite_critere" >
|
||||
{!props.formation.extented_search && props.formation.coeur != "1" &&
|
||||
<div style={{ 'float': "right", "width": "100%", textAlign: "right", marginTop: "0rem", }}>
|
||||
|
||||
<Button className="bton_se_renseinger"
|
||||
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url + "/Information",
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
|
||||
>Se renseigner </Button>
|
||||
|
||||
|
||||
<Button className="bton_voir_detail"
|
||||
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
//test(props.formation.external_code);
|
||||
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
|
||||
}}
|
||||
>Voir details</Button>
|
||||
|
||||
{GetCurrentClass_result && GetCurrentClass_result.length > 0 &&
|
||||
<Button variant="contained" className="bton_sinscrire"
|
||||
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url + "/Inscription",
|
||||
'_blank'
|
||||
);
|
||||
|
||||
}}
|
||||
|
||||
>S'incrire</Button>
|
||||
}
|
||||
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export default Formation_Partner_Catalog;
|
||||
|
|
@ -0,0 +1,483 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import { useHistory } from "react-router-dom";
|
||||
|
||||
import { useCookies } from "react-cookie";
|
||||
import { confirmAlert } from 'react-confirm-alert';
|
||||
|
||||
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 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 New_C_Formation_2025 = (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 => {
|
||||
|
||||
// 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("");
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* 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);
|
||||
|
||||
// console.log(" #### useEffect props.formation = ", props.formation);
|
||||
|
||||
|
||||
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 styles = {
|
||||
list: {
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: '32px',
|
||||
width: '100%',
|
||||
},
|
||||
row: {
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
gap: '24px',
|
||||
width: '100%',
|
||||
},
|
||||
card: {
|
||||
flexGrow: 1,
|
||||
backgroundColor: '#fff',
|
||||
borderRadius: '8px',
|
||||
overflow: 'hidden',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
},
|
||||
|
||||
image: {
|
||||
maxWidth: '100%',
|
||||
height: '200px',
|
||||
overflow: 'hidden',
|
||||
margin: "auto",
|
||||
|
||||
},
|
||||
content: {
|
||||
padding: '16px',
|
||||
},
|
||||
header: {
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
},
|
||||
eligibility: {
|
||||
backgroundColor: '#e2e9fb',
|
||||
padding: '4px 8px',
|
||||
borderRadius: '4px',
|
||||
fontSize: '12px',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
title: {
|
||||
fontSize: '14px',
|
||||
fontWeight: 'bold',
|
||||
margin: '8px 0',
|
||||
},
|
||||
price: {
|
||||
fontSize: '14px',
|
||||
fontWeight: 'bold',
|
||||
color: '#000',
|
||||
},
|
||||
description: {
|
||||
fontSize: '12px',
|
||||
color: '#666',
|
||||
margin: '8px 0',
|
||||
height: "40px",
|
||||
overflow: "hidden",
|
||||
},
|
||||
details: {
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
marginTop: '16px',
|
||||
},
|
||||
button: {
|
||||
backgroundColor: '#007bff',
|
||||
color: '#fff',
|
||||
padding: '8px 16px',
|
||||
border: 'none',
|
||||
borderRadius: '4px',
|
||||
cursor: 'pointer',
|
||||
},
|
||||
buttonOutline: {
|
||||
backgroundColor: '#fff',
|
||||
color: '#007bff',
|
||||
padding: '8px 16px',
|
||||
border: '1px solid #007bff',
|
||||
borderRadius: '4px',
|
||||
cursor: 'pointer',
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
<div className="new_formation_2025">
|
||||
|
||||
|
||||
<div style={styles.card}>
|
||||
<div style={{ width: '100%', textAlign: 'right', zIndex: '9999' }}>
|
||||
|
||||
<div style={{ width: '50%', float: 'left' }}> </div>
|
||||
|
||||
{props.formation.cpf && String(props.formation.cpf) === String("1") && <div className="case_cpf" >
|
||||
<span className="tag_cpf_txt_ok_cpf" >{"OUI CPF"}</span>
|
||||
</div>
|
||||
}
|
||||
{props.formation.cpf && String(props.formation.cpf) !== String("1") && <div className="case_cpf">
|
||||
<span className="tag_cpf_txt_no_ok_cpf">{"NON CPF"}</span>
|
||||
</div>
|
||||
}
|
||||
{!props.formation.cpf && String(props.formation.cpf) !== String("1") && <div className="case_cpf">
|
||||
<span className="tag_cpf_txt_no_ok_cpf">{"NON CPF"}</span>
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 &&
|
||||
<img src={class_img_stored_in_bdd} alt="Formation" style={styles.image} />
|
||||
}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) &&
|
||||
(!props.formation.img_url || String(props.formation.img_url).length <= 10) &&
|
||||
String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" &&
|
||||
|
||||
<div >
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_program} alt="informatique" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_graphisme} alt="graphisme" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_management} alt="management" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_digital} alt="digital" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_bureautic} alt="office" style={styles.image} />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_rh} alt="ressources humaines" style={styles.image} />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_vente} alt="vente" style={styles.image} />}
|
||||
|
||||
{!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" && <img src={img_met_dev_perso} alt="developpement personnel" style={styles.image} />}
|
||||
|
||||
{String(isclassimage) === "True" && <img src={userimgclassprofil} alt="developpement personnel" style={styles.image} />}
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 &&
|
||||
<div>
|
||||
<img src={userimgclassprofil} alt="autre" style={styles.image} />
|
||||
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br />
|
||||
{String(props.formation.institut_formation)} </div>*/}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 &&
|
||||
<div>
|
||||
<img src={img_met_autre} alt="autre" style={styles.image} />
|
||||
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br />
|
||||
{String(props.formation.institut_formation)} </div>*/}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" &&
|
||||
<div>
|
||||
<img src={props.formation.img_url} alt="autre" style={styles.image} />
|
||||
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par : <br />
|
||||
{String(props.formation.institut_formation)} </div>*/}
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="block_main_contente">
|
||||
<div className="block_top_content">
|
||||
<div className="div_row_gauche" >
|
||||
{props.formation.note && String(props.formation.note).length === 1 &&
|
||||
parseInt(String(props.formation.note)) <= 5 &&
|
||||
<Rating name="half-rating-read" defaultValue={props.formation.note} precision={0.5} readOnly style={{ fontSize: '15px' }} />
|
||||
}
|
||||
</div>
|
||||
|
||||
<h3 className="formation_titre">{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 50)}</h3>
|
||||
{props.formation.discounted_price && props.formation.business_prices && <p className="formation_prix">{props.formation.discounted_price} € HT </p>}
|
||||
|
||||
{props.formation.business_prices && props.formation.business_prices.length <= 0
|
||||
&& <p className="formation_prix">{props.formation.price} € HT </p>}
|
||||
|
||||
{props.formation.business_prices && props.formation.business_prices.length > 0 &&
|
||||
<p style={{ width: '100%', float: 'left' }}>
|
||||
|
||||
<p className="formation_prix" style={{ width: '100%', float: 'left' }}>{props.formation.business_prices[0].discounted_price}€ HT
|
||||
<font className='training_price_barre' style={{ fontSize: '14px' }}> {props.formation.price} € HT </font>
|
||||
<font className='discount_block' style={{ fontSize: '14px' }}> ({props.formation.business_prices[0].discount} %) </font></p>
|
||||
</p>}
|
||||
|
||||
<p className="formation_description"> {String(parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))).substring(0, 80)}...</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="block_cats">
|
||||
<button className="block_cats_bton_detail">
|
||||
<nav className="block_cats_bton_detail_text"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
window.open(
|
||||
"/detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
}}> Voir les détails </nav></button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export default New_C_Formation_2025;
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1648,7 +1648,7 @@ const Partner = (props) => {
|
|||
my_lms_url = (JSON.parse(res.data.message).lms_virtualhost_url) + "user_portal.php?recid=" + encodeURIComponent(JSON.parse(res.data.message).lms_part_recid) +
|
||||
"&mysytoken=" + encodeURIComponent(JSON.parse(res.data.message).lms_pwd_mask);
|
||||
|
||||
//console.log(" ### LMS url = ", my_lms_url);
|
||||
// console.log(" ### LMS url = ", my_lms_url);
|
||||
setpartner_lms_url(my_lms_url);
|
||||
|
||||
setpartner_lms_virtualhost_url((JSON.parse(res.data.message).lms_virtualhost_url));
|
||||
|
|
|
|||
|
|
@ -1941,12 +1941,14 @@ const Partner_Commande = (props) => {
|
|||
setGet_Given_Partner_Config_Point_Taux_TVA_api("true");
|
||||
setGet_Given_Partner_Config_Point_Taux_TVA_result(res.data.message);
|
||||
|
||||
setpartner_taux_tva("20");
|
||||
|
||||
if (res.data.message.length > 0) {
|
||||
var point_config_tva = JSON.parse(res.data.message);
|
||||
|
||||
if (point_config_tva.config_value) {
|
||||
setpartner_taux_tva(point_config_tva.config_value);
|
||||
//console.log(" GGG TVA PART = ", point_config_tva.config_value);
|
||||
// console.log(" GGG TVA PART = ", point_config_tva.config_value);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -3076,11 +3078,11 @@ const Partner_Commande = (props) => {
|
|||
|
||||
|
||||
|
||||
console.log(" GLOBAL #### partner_taux_tva = ", partner_taux_tva, " ### qty = ", qty, " ### unit_price = ", unit_price, " ### total_base1 = ", total_base1, " ### total_reduction = ", total_reduction, " ### reduct_value = ", reduct_value);
|
||||
// console.log(" GLOBAL #### partner_taux_tva = ", partner_taux_tva, " ### qty = ", qty, " ### unit_price = ", unit_price, " ### total_base1 = ", total_base1, " ### total_reduction = ", total_reduction, " ### reduct_value = ", reduct_value);
|
||||
|
||||
const total_taux_tax_bef = parseFloat(String(partner_taux_tva)) / 100;
|
||||
|
||||
console.log(" GLOBAL #### total_taux_tax_bef = ", total_taux_tax_bef);
|
||||
// console.log(" GLOBAL #### total_taux_tax_bef = ", total_taux_tax_bef);
|
||||
|
||||
const total_taux_tax = 1 + total_taux_tax_bef;
|
||||
|
||||
|
|
@ -3307,7 +3309,7 @@ const Partner_Commande = (props) => {
|
|||
setp_add_line_item_total_amount_ttc("");
|
||||
setp_add_line_item_type_apprenant("");
|
||||
|
||||
setpartner_taux_tva("20");
|
||||
// setpartner_taux_tva("20");
|
||||
|
||||
setselected_order_line_id("");
|
||||
|
||||
|
|
@ -3717,8 +3719,8 @@ const Partner_Commande = (props) => {
|
|||
|
||||
//var reduct_type = p_add_line_item_type_reduction;
|
||||
|
||||
console.log(" reduct_type = ", reduct_type);
|
||||
console.log(" p_add_line_item_type_reduction = ", p_add_line_item_type_reduction);
|
||||
//console.log(" reduct_type = ", reduct_type);
|
||||
// console.log(" p_add_line_item_type_reduction = ", p_add_line_item_type_reduction);
|
||||
|
||||
if (String(p_add_line_item_type_reduction) === "fixe") {
|
||||
console.log("fixe : p_add_line_item_reduction_value = ", reduct_value);
|
||||
|
|
@ -3732,7 +3734,7 @@ const Partner_Commande = (props) => {
|
|||
|
||||
|
||||
|
||||
console.log(" #### partner_taux_tva = ", partner_taux_tva, " ### qty = ", qty, " ### unit_price = ", unit_price, " ### total_base1 = ", total_base1, " ### total_reduction = ", total_reduction, " ### reduct_value = ", reduct_value);
|
||||
// console.log(" #### partner_taux_tva = ", partner_taux_tva, " ### qty = ", qty, " ### unit_price = ", unit_price, " ### total_base1 = ", total_base1, " ### total_reduction = ", total_reduction, " ### reduct_value = ", reduct_value);
|
||||
|
||||
var montant_taxe_tva = ((total_base1 - total_reduction) * [parseFloat(String(partner_taux_tva)) / 100]).toFixed(2);
|
||||
var montant_ttc = ((total_base1 - total_reduction) * (1 + [parseFloat(String(partner_taux_tva)) / 100])).toFixed(2); //(total_base2 + montant_taxe_tva).toFixed(2);
|
||||
|
|
@ -3740,7 +3742,7 @@ const Partner_Commande = (props) => {
|
|||
// 20/08/2024 - enlever la réduction du total ht
|
||||
total_base1 = total_base1 - total_reduction;
|
||||
|
||||
console.log(" #### montant_taxe_tva = ", montant_taxe_tva, " ### montant_ttc = ", montant_ttc);
|
||||
// console.log(" #### montant_taxe_tva = ", montant_taxe_tva, " ### montant_ttc = ", montant_ttc);
|
||||
|
||||
setp_add_line_item_reduction_total_amount(String(total_reduction));
|
||||
setp_add_line_item_total_amount_ht(String(total_base1));
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -85,6 +85,8 @@ const New_C_Detail_Formation_2025 = (props) => {
|
|||
const [inscritpion, setinscritpion] = useState("");
|
||||
const [ratingvalue, setratingvalue] = useState(0);
|
||||
|
||||
const [partnaire_tva, setpartnaire_tva] = useState("");
|
||||
|
||||
const [text_size, settext_size] = useState("0");
|
||||
|
||||
const socialIconStyles = {
|
||||
|
|
@ -541,6 +543,13 @@ const New_C_Detail_Formation_2025 = (props) => {
|
|||
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).isdatadock) {
|
||||
setisdatadock(JSON.parse(res.data.message).isdatadock);
|
||||
}
|
||||
|
|
@ -1539,15 +1548,32 @@ const New_C_Detail_Formation_2025 = (props) => {
|
|||
{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"] &&
|
||||
<div className="mob_price_2025">
|
||||
{String(DetailTraining["price"])} € HT
|
||||
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> {String(DetailTraining["price"])} € HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> {String(DetailTraining["price"])} € TTC </>}
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{String(DetailTraining["price"]) && String(DetailTraining["price"]) !== String("0") && DetailTraining.business_prices && Object.keys(DetailTraining.business_prices).length > 0
|
||||
&& DetailTraining["price"] && <div className="mob_price_2025">
|
||||
<nav className="discounted_price" style={{ textAlign: 'center' }}>{String(DetailTraining.business_prices[0].discounted_price)} € HT </nav>
|
||||
<nav className="discounted_price" style={{ textAlign: 'center' }}>
|
||||
|
||||
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> {String(DetailTraining.business_prices[0].discounted_price)} € HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> {String(DetailTraining.business_prices[0].discounted_price)} € TTC </>}
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
{DetailTraining.business_prices && DetailTraining.business_prices.length > 0 && <div style={{ width: '100%', float: 'left', marginLeft: '3rem' }}>
|
||||
<nav className="training_price_barre" style={{ with: '50%', float: 'left', fontSize: '14px' }}> {String(DetailTraining["price"])} € HT </nav>
|
||||
<nav className="training_price_barre" style={{ with: '50%', float: 'left', fontSize: '14px' }}>
|
||||
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> {String(DetailTraining["price"])} € HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> {String(DetailTraining["price"])} € TTC </>}
|
||||
|
||||
|
||||
</nav>
|
||||
<nav className="discount_block" style={{ with: '50%', float: 'left', fontSize: '14px' }}> (- {String(DetailTraining.business_prices[0].discount)} % ) </nav>
|
||||
</div>}
|
||||
</div>}
|
||||
|
|
@ -2110,7 +2136,10 @@ const New_C_Detail_Formation_2025 = (props) => {
|
|||
</div>
|
||||
|
||||
{JSON.parse(formation).price && <div className="mob_cross_sell_card_content_price">
|
||||
{(String(JSON.parse(formation).price))} € HT
|
||||
|
||||
{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 </>}
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
|
|
@ -2169,8 +2198,8 @@ const New_C_Detail_Formation_2025 = (props) => {
|
|||
<div className="block_sous_header_rate_title">
|
||||
|
||||
<div className="rating">
|
||||
{ratingvalue && String(ratingvalue).length === 1 &&
|
||||
parseInt(String(ratingvalue)) <= 5 &&
|
||||
{ratingvalue && String(ratingvalue).length > 0 &&
|
||||
parseFloat(String(ratingvalue)) <= 5 &&
|
||||
<Rating name="half-rating-reade"
|
||||
readOnly={true}
|
||||
precision={0.5}
|
||||
|
|
@ -2555,7 +2584,11 @@ const New_C_Detail_Formation_2025 = (props) => {
|
|||
|
||||
{String(DetailTraining["price"]) && String(DetailTraining["price"]) !== String("0") && (!DetailTraining.business_prices || Object.keys(DetailTraining.business_prices).length <= 0)
|
||||
&& DetailTraining["price"] && <div className="block_prix_2025">
|
||||
<div className="block_sticky_info_price"> {String(DetailTraining["price"])} € HT
|
||||
|
||||
<div className="block_sticky_info_price">
|
||||
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> {String(DetailTraining["price"])} € HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> {String(DetailTraining["price"])} € TTC </>}
|
||||
</div>
|
||||
|
||||
{DetailTraining["cpf"] && String(DetailTraining["cpf"]) === "1" && <div className="tag_eligle_cpf">Éligible CPF</div>}
|
||||
|
|
@ -2569,13 +2602,24 @@ const New_C_Detail_Formation_2025 = (props) => {
|
|||
&& DetailTraining["price"] &&
|
||||
<div className="block_prix_2025">
|
||||
<div className="block_sticky_info_price">
|
||||
<nav className="discounted_price">{String(DetailTraining.business_prices[0].discounted_price)} € HT </nav>
|
||||
<nav className="discounted_price">
|
||||
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> {String(DetailTraining.business_prices[0].discounted_price)} € HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> {String(DetailTraining.business_prices[0].discounted_price)} € TTC </>}
|
||||
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
<div className="tag_eligle_cpf">Eligle CFP
|
||||
</div>
|
||||
|
||||
{DetailTraining.business_prices && DetailTraining.business_prices.length > 0 && <div style={{ width: '100%', float: 'left' }}>
|
||||
<nav className="training_price_barre" style={{ with: '50%', float: 'left', fontSize: '14px' }}> {String(DetailTraining["price"])} € HT </nav>
|
||||
<nav className="training_price_barre" style={{ with: '50%', float: 'left', fontSize: '14px' }}>
|
||||
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) > 0 && <> {String(DetailTraining["price"])} € HT </>}
|
||||
{parseFloat(String(DetailTraining["partnaire_tva"])) <= 0 && <> {String(DetailTraining["price"])} € TTC </>}
|
||||
|
||||
</nav>
|
||||
<nav className="discount_block" style={{ with: '50%', float: 'left', fontSize: '14px' }}> (- {String(DetailTraining.business_prices[0].discount)} % ) </nav>
|
||||
</div>}
|
||||
|
||||
|
|
@ -2874,7 +2918,7 @@ const New_C_Detail_Formation_2025 = (props) => {
|
|||
|
||||
<div className="sous_crossell_list_card_card_content_rating">
|
||||
|
||||
{JSON.parse(formation).note && String(JSON.parse(formation).note).length === 1 &&
|
||||
{JSON.parse(formation).note && String(JSON.parse(formation).note).length >= 1 &&
|
||||
parseInt(String(JSON.parse(formation).note)) <= 5 &&
|
||||
|
||||
<Rating name="half-rating-reade"
|
||||
|
|
@ -2888,7 +2932,9 @@ const New_C_Detail_Formation_2025 = (props) => {
|
|||
</div>
|
||||
|
||||
{JSON.parse(formation).price && <div className="sous_crossell_list_card_card_content_price">
|
||||
{(String(JSON.parse(formation).price))} € HT
|
||||
|
||||
{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 </>}
|
||||
</div>}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3740,7 +3740,7 @@ const New_C_Marketplace_2025 = () => {
|
|||
|
||||
<br />
|
||||
|
||||
</div>}
|
||||
</div>}
|
||||
|
||||
<div className="block_display_flex_formation">
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue