recette2
parent
77b67d6bdc
commit
6f250b9999
2
.env
2
.env
|
@ -7,6 +7,8 @@ REACT_APP_API_URL_recette=https://devapimysy.mysy-training.com/
|
||||||
REACT_APP_API_URL=http://localhost:5001/
|
REACT_APP_API_URL=http://localhost:5001/
|
||||||
REACT_APP_BASE_URL=http://localhost:3009/recherche-formation
|
REACT_APP_BASE_URL=http://localhost:3009/recherche-formation
|
||||||
REACT_APP_FRONT_URL=http://localhost:3009/
|
REACT_APP_FRONT_URL=http://localhost:3009/
|
||||||
|
REACT_APP_FRONT_URL_CANONICAL=localhost:3009/
|
||||||
|
REACT_APP_FRONT_URL_CANONICAL_BASE=http://
|
||||||
REACT_APP_ENV=DEV
|
REACT_APP_ENV=DEV
|
||||||
GENERATE_SOURCEMAP=false
|
GENERATE_SOURCEMAP=false
|
||||||
REACT_APP_MAINTENANCE=1
|
REACT_APP_MAINTENANCE=1
|
44
src/App.js
44
src/App.js
|
@ -7,11 +7,19 @@ import Connexion from './pages/Connexion'
|
||||||
import Login from './pages/Login';
|
import Login from './pages/Login';
|
||||||
|
|
||||||
import Recherche_new_v2 from "./pages/recherche_new_v2";
|
import Recherche_new_v2 from "./pages/recherche_new_v2";
|
||||||
|
|
||||||
|
import Mon_Catalogue_Public from "./pages/mon_catalogue_public";
|
||||||
|
|
||||||
|
|
||||||
import TestUrl from "./pages/testurl";
|
import TestUrl from "./pages/testurl";
|
||||||
import Account from "./pages/account";
|
import Account from "./pages/account";
|
||||||
|
|
||||||
import DisplayDetailClass_new_v2 from "./pages/displaydetailclass_new_v2";
|
import DisplayDetailClass_new_v2 from "./pages/displaydetailclass_new_v2";
|
||||||
|
|
||||||
|
import Display_Partner_Catalog_DetailClass_new_v2 from "./pages/display_partner_catalog_detailclass_new_v2"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import DisplayDetailArticle from "./pages/displaydetailarticle";
|
import DisplayDetailArticle from "./pages/displaydetailarticle";
|
||||||
import Acceuil from "./pages/acceuil";
|
import Acceuil from "./pages/acceuil";
|
||||||
import Partner from "./pages/partner";
|
import Partner from "./pages/partner";
|
||||||
|
@ -62,6 +70,35 @@ function App() {
|
||||||
dynamicWidth: window.innerHeight
|
dynamicWidth: window.innerHeight
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
useEffect(() => {
|
||||||
|
|
||||||
|
// Verifier s'il y a un sous domaine
|
||||||
|
var tab_split_sous_domain = window.location.host.split(".");
|
||||||
|
|
||||||
|
console.log(" yaaaaaaaaaa tab_split_sous_domain = ", tab_split_sous_domain);
|
||||||
|
|
||||||
|
console.log("process.env.REACT_APP_FRONT_URL_CANONICAL = ", process.env.REACT_APP_FRONT_URL_CANONICAL);
|
||||||
|
|
||||||
|
if(String(tab_split_sous_domain[0]) !== String(process.env.REACT_APP_FRONT_URL_CANONICAL) ){
|
||||||
|
console.log(" La racine n'est pas normal, on redirige");
|
||||||
|
var new_url = process.env.REACT_APP_FRONT_URL_CANONICAL_BASE + tab_split_sous_domain[0] + "." + process.env.REACT_APP_FRONT_URL_CANONICAL + "moncatalog";
|
||||||
|
|
||||||
|
console.log(" La racine n'est pas normal, on redirige vers : ");
|
||||||
|
|
||||||
|
console.log(" new_url = ", new_url);
|
||||||
|
|
||||||
|
|
||||||
|
window.open( String(new_url),
|
||||||
|
'_self'
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}, []);*/
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
@ -80,6 +117,10 @@ function App() {
|
||||||
<Route path="/" exact component={Recherche_new_v2} />
|
<Route path="/" exact component={Recherche_new_v2} />
|
||||||
|
|
||||||
<Route path="/subdomain" exact component={Subdomain_Recherche_new_v2} />
|
<Route path="/subdomain" exact component={Subdomain_Recherche_new_v2} />
|
||||||
|
|
||||||
|
<Route path="/moncatalog" exact component={Mon_Catalogue_Public} />
|
||||||
|
|
||||||
|
|
||||||
<Route path="/acceuil" exact component={Acceuil} />
|
<Route path="/acceuil" exact component={Acceuil} />
|
||||||
|
|
||||||
<Route path="/maintenance" exact component={Maintenance} />
|
<Route path="/maintenance" exact component={Maintenance} />
|
||||||
|
@ -102,6 +143,9 @@ function App() {
|
||||||
<Route path="/Display-Detail-formation-Coeur/:classId" exact component={CoupDeCoeur} />
|
<Route path="/Display-Detail-formation-Coeur/:classId" exact component={CoupDeCoeur} />
|
||||||
<Route path="/Partner/:action/:orderid/:packs" exact component={Partner} />
|
<Route path="/Partner/:action/:orderid/:packs" exact component={Partner} />
|
||||||
|
|
||||||
|
<Route path="/Display-Partner-Catalog-Detail-formation/:classId" exact component={Display_Partner_Catalog_DetailClass_new_v2} />
|
||||||
|
|
||||||
|
|
||||||
<Route path="/Partner/:action/:orderid" exact component={Partner} />
|
<Route path="/Partner/:action/:orderid" exact component={Partner} />
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -388,54 +388,17 @@ const Employes = (props) => {
|
||||||
field: "print", headerName: 'Impr.',
|
field: "print", headerName: 'Impr.',
|
||||||
renderCell: (cellValues) => {
|
renderCell: (cellValues) => {
|
||||||
return (
|
return (
|
||||||
|
<Button
|
||||||
<Popup
|
onClick={(e) => {
|
||||||
trigger={<Button
|
setselected_contrat_id(cellValues.row._id);
|
||||||
|
setDialog_print_contrat_open(true);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<FcPrint />
|
<FcPrint />
|
||||||
|
|
||||||
</Button>}
|
</Button>
|
||||||
modal
|
|
||||||
nested
|
|
||||||
position="center center"
|
|
||||||
>
|
|
||||||
{close => (
|
|
||||||
<div>
|
|
||||||
<button className="gest_close" onClick={close}>
|
|
||||||
×
|
|
||||||
</button>
|
|
||||||
<div className="gest_header"> MySy Information </div>
|
|
||||||
<div className="gest_content">
|
|
||||||
{' '}
|
|
||||||
|
|
||||||
Confirmer l'impression du contrat <br />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div className="gest_actions">
|
|
||||||
<div style={{ "width": "45%", "float": "left" }}>
|
|
||||||
<button className="gest_bton_popup" onClick={(event) => {
|
|
||||||
handleClick_print_employee_contrat(event, cellValues);
|
|
||||||
//console.log('modal closed ');
|
|
||||||
close();
|
|
||||||
}}> Valider </button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div style={{ "width": "45%", "float": "right" }}>
|
|
||||||
<button
|
|
||||||
className="gest_bton_popup"
|
|
||||||
onClick={() => {
|
|
||||||
//console.log('modal closed ');
|
|
||||||
close();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Annuler
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Popup>
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -588,18 +551,17 @@ const Employes = (props) => {
|
||||||
const [handleClick_print_employee_contrat_api, sethandleClick_print_employee_contrat_api] = useState();
|
const [handleClick_print_employee_contrat_api, sethandleClick_print_employee_contrat_api] = useState();
|
||||||
const [handleClick_print_employee_contrat_message, sethandleClick_print_employee_contrat_message] = useState();
|
const [handleClick_print_employee_contrat_message, sethandleClick_print_employee_contrat_message] = useState();
|
||||||
const [handleClick_print_employee_contrat_result, sethandleClick_print_employee_contrat_result] = useState();
|
const [handleClick_print_employee_contrat_result, sethandleClick_print_employee_contrat_result] = useState();
|
||||||
function handleClick_print_employee_contrat(event, cellValues) {
|
function handleClick_print_employee_contrat(local_contract_id) {
|
||||||
|
|
||||||
|
|
||||||
var local_contract_id = cellValues.row._id;
|
|
||||||
|
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
|
|
||||||
const stored_cookie = getCookie('tokenmysypart');
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
|
||||||
var nom_fiche_detaillee = "Contrat_"+String(p_detail_nom)+".pdf";
|
var nom_fiche_detaillee = "Contrat_" + String(p_detail_nom) + ".pdf";
|
||||||
|
|
||||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Print_Employee_Given_Contrat/" + stored_cookie + "/" + selected_id + "/" + local_contract_id + "/" ;
|
var url = process.env.REACT_APP_API_URL + "myclass/api/Print_Employee_Given_Contrat/" + stored_cookie + "/" + selected_id + "/" + local_contract_id + "/";
|
||||||
|
|
||||||
|
Dialog_print_contrat_handleClose_buton();
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
axios.get(url, { responseType: 'blob', },)
|
axios.get(url, { responseType: 'blob', },)
|
||||||
|
@ -3290,6 +3252,9 @@ const Employes = (props) => {
|
||||||
async function submenu_contrat() {
|
async function submenu_contrat() {
|
||||||
setsubmenu("contrat");
|
setsubmenu("contrat");
|
||||||
|
|
||||||
|
|
||||||
|
Get_Partner_List_EMPLOYEE_CONTRACT_Document();
|
||||||
|
|
||||||
await sleep(5);
|
await sleep(5);
|
||||||
if (document.getElementById("contrat")) {
|
if (document.getElementById("contrat")) {
|
||||||
document.getElementById("contrat").style.backgroundColor = "#104277";
|
document.getElementById("contrat").style.backgroundColor = "#104277";
|
||||||
|
@ -5883,7 +5848,7 @@ const Employes = (props) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log(" #### question_id = ", selected_statistic_question_id, " ### related_collection_id = ", selected_id)
|
//console.log(" #### question_id = ", selected_statistic_question_id, " ### related_collection_id = ", selected_id)
|
||||||
var nom_fichier_cmd_excel = "export_excel.xlsx";
|
var nom_fichier_cmd_excel = "export_excel.xlsx";
|
||||||
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id);
|
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id);
|
||||||
|
|
||||||
|
@ -5893,7 +5858,7 @@ const Employes = (props) => {
|
||||||
|
|
||||||
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
|
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
|
||||||
|
|
||||||
console.log(" #### url = ", url)
|
//console.log(" #### url = ", url)
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
axios.get(url, { responseType: 'blob', },)
|
axios.get(url, { responseType: 'blob', },)
|
||||||
|
@ -6499,6 +6464,102 @@ const Employes = (props) => {
|
||||||
|
|
||||||
/***** end suivi pedago */
|
/***** end suivi pedago */
|
||||||
|
|
||||||
|
const [New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result, setNew_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result] = useState([]);
|
||||||
|
|
||||||
|
const [Get_Partner_List_EMPLOYEE_CONTRACT_Document_api, setGet_Partner_List_EMPLOYEE_CONTRACT_Document_api] = useState();
|
||||||
|
const [Get_Partner_List_EMPLOYEE_CONTRACT_Document_message, setGet_Partner_List_EMPLOYEE_CONTRACT_Document_message] = useState();
|
||||||
|
const [Get_Partner_List_EMPLOYEE_CONTRACT_Document_result, setGet_Partner_List_EMPLOYEE_CONTRACT_Document_result] = useState();
|
||||||
|
function Get_Partner_List_EMPLOYEE_CONTRACT_Document() {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
form.append("ref_interne", "EMPLOYEE_CONTRACT");
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Partner_Document_with_filter/";
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
//console.log(" In Get_Partner_List_EMPLOYEE_CONTRACT_Document res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Get_Partner_List_EMPLOYEE_CONTRACT_Document res.data.message r_class = " + res.data.message);
|
||||||
|
setLoading(false);
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
|
||||||
|
|
||||||
|
setGet_Partner_List_EMPLOYEE_CONTRACT_Document_api("true");
|
||||||
|
setGet_Partner_List_EMPLOYEE_CONTRACT_Document_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 local_contenu_doc = JSON.parse(x).contenu_doc;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
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,
|
||||||
|
"contenu_doc": local_contenu_doc,
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
|
// console.log(" ## node = ", node)
|
||||||
|
});
|
||||||
|
|
||||||
|
if (new_data2.length > 0)
|
||||||
|
setNew_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result(new_data2);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGet_Partner_List_EMPLOYEE_CONTRACT_Document_api("false");
|
||||||
|
setGet_Partner_List_EMPLOYEE_CONTRACT_Document_message(res.data.message);
|
||||||
|
alert(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Not good man :( Get_Partner_List_EMPLOYEE_CONTRACT_Document = ', error);
|
||||||
|
setGet_Partner_List_EMPLOYEE_CONTRACT_Document_api("false");
|
||||||
|
alert("Impossible de récupérer les modèles de document ");
|
||||||
|
//setmyApimyApiMessage("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const [Dialog_print_contrat_message, setDialog_print_contrat_message] = React.useState(false);
|
||||||
|
const [Dialog_print_contrat_open, setDialog_print_contrat_open] = React.useState(false);
|
||||||
|
|
||||||
|
const Dialog_print_contrat_handleClose = () => {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const Dialog_print_contrat_handleClose_buton = () => {
|
||||||
|
setDialog_print_contrat_open(false);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const [EMPLOYEE_CONTRACT_modele_id, setEMPLOYEE_CONTRACT_modele_id] = React.useState("");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="employes">
|
<div className="employes">
|
||||||
|
|
||||||
|
@ -6692,6 +6753,75 @@ const Employes = (props) => {
|
||||||
{/*** FIN GESTION STATISTIQUE */}
|
{/*** FIN GESTION STATISTIQUE */}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{/*** GESTION CONTRAT IMPRESSION */}
|
||||||
|
<Dialog
|
||||||
|
open={Dialog_print_contrat_open}
|
||||||
|
onClose={Dialog_print_contrat_handleClose_buton}
|
||||||
|
className="displaypartnersession"
|
||||||
|
>
|
||||||
|
|
||||||
|
<DialogTitle>MySy Information</DialogTitle>
|
||||||
|
|
||||||
|
<DialogContent className="DialogContent_width" style={{ "minHeight": "10rem" }}>
|
||||||
|
<DialogContentText>
|
||||||
|
Impression contrat employé
|
||||||
|
</DialogContentText>
|
||||||
|
|
||||||
|
|
||||||
|
<div className="session_caract_Dialog" > Type contrat<br />
|
||||||
|
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 } }}
|
||||||
|
|
||||||
|
name="event_dialog_contrat_modele"
|
||||||
|
id="event_dialog_contrat_modele"
|
||||||
|
fullWidth
|
||||||
|
options={New_Get_Partner_List_EMPLOYEE_CONTRACT_Document_result}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value._id) {
|
||||||
|
setEMPLOYEE_CONTRACT_modele_id(value._id);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setEMPLOYEE_CONTRACT_modele_id("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</DialogContent>
|
||||||
|
|
||||||
|
<DialogActions>
|
||||||
|
<div className="div_row">
|
||||||
|
<div className="div_row_gauche">
|
||||||
|
{EMPLOYEE_CONTRACT_modele_id && String(EMPLOYEE_CONTRACT_modele_id).length > 5 &&
|
||||||
|
<Button className="bton_enreg_dialog" onClick={(e) => {
|
||||||
|
handleClick_print_employee_contrat(selected_contrat_id);
|
||||||
|
}}
|
||||||
|
>Imprimer </Button>}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||||
|
<Button onClick={Dialog_print_contrat_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</DialogActions>
|
||||||
|
|
||||||
|
|
||||||
|
</Dialog>
|
||||||
|
{/*** FIN GESTION CONTRAT IMPRESSION */}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{/*** GESTION COMPETENCES */}
|
{/*** GESTION COMPETENCES */}
|
||||||
<Dialog
|
<Dialog
|
||||||
open={Dialog_1_open_competence}
|
open={Dialog_1_open_competence}
|
||||||
|
|
|
@ -0,0 +1,806 @@
|
||||||
|
import React, { useState, useEffect } from "react";
|
||||||
|
import ReactPlayer from 'react-player'
|
||||||
|
import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from "react-share";
|
||||||
|
import { SocialIcon } from 'react-social-icons';
|
||||||
|
import { Button, } from "reactstrap";
|
||||||
|
import { useHistory } from "react-router-dom";
|
||||||
|
import { Helmet } from "react-helmet";
|
||||||
|
import { useCookies } from "react-cookie";
|
||||||
|
import { confirmAlert } from 'react-confirm-alert';
|
||||||
|
import topimg from "../mysy_img/top.png";
|
||||||
|
import coeurimg from "../mysy_img/coeur.png";
|
||||||
|
import img_met_program from "../mysy_img/met_programmation.jpg";
|
||||||
|
import img_met_hotel from "../mysy_img/met_hotel.jpg";
|
||||||
|
import img_met_graphisme from "../mysy_img/metier_graphisme.jpg";
|
||||||
|
|
||||||
|
import img_met_autre from "../mysy_img/met_autre.jpg";
|
||||||
|
import img_met_digital from "../mysy_img/met_digital.jpg";
|
||||||
|
import img_met_management from "../mysy_img/met_management.jpg";
|
||||||
|
import img_met_projet from "../mysy_img/met_projet.jpg";
|
||||||
|
|
||||||
|
import img_met_market from "../mysy_img/met_market.jpg";
|
||||||
|
import img_met_autre2 from "../mysy_img/met_autre2.jpg";
|
||||||
|
import img_met_dev_perso from "../mysy_img/metier_dev_perso.jpg";
|
||||||
|
import img_met_rh from "../mysy_img/met_rh.jpg";
|
||||||
|
|
||||||
|
import img_met_bureautic from "../mysy_img/met_burautic.jpg";
|
||||||
|
import img_met_vente from "../mysy_img/met_vente.jpg";
|
||||||
|
import axios from "axios";
|
||||||
|
//import { Rating } from 'react-simple-star-rating'
|
||||||
|
import Rating from '@mui/material/Rating';
|
||||||
|
import parse from 'html-react-parser'
|
||||||
|
import { CiLocationOn } from "react-icons/ci";
|
||||||
|
|
||||||
|
const Formation_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 style={{ "width": "90%" }}>
|
||||||
|
<div className="criteres ftion_tab_gauche">
|
||||||
|
Type
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="criteres ftion_tab_droite">
|
||||||
|
{props.formation.type}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ "width": "90%" }}>
|
||||||
|
<div className="criteres ftion_tab_gauche">
|
||||||
|
Support
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="criteres ftion_tab_droite">
|
||||||
|
{props.formation.support}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
*/}
|
||||||
|
{/*props.formation.zone_diffusion && props.formation.zone_diffusion.country && <div style={{ "width": "100%" }}>
|
||||||
|
<div className="criteres ftion_tab_gauche">
|
||||||
|
Test : pays
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="criteres ftion_tab_droite">
|
||||||
|
{props.formation.zone_diffusion.country}
|
||||||
|
</div>
|
||||||
|
</div>*/}
|
||||||
|
|
||||||
|
{/*props.formation.zone_diffusion && props.formation.zone_diffusion.city && <div style={{ "width": "100%" }}>
|
||||||
|
<div className="criteres ftion_tab_gauche">
|
||||||
|
Test : Ville
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="criteres ftion_tab_droite">
|
||||||
|
{props.formation.zone_diffusion.city}
|
||||||
|
</div>
|
||||||
|
</div>*/}
|
||||||
|
|
||||||
|
|
||||||
|
{/*
|
||||||
|
{props.formation.presentiel && props.formation.presentiel.presentiel &&
|
||||||
|
<div style={{ "width": "100%" }}>
|
||||||
|
<div className="criteres ftion_tab_gauche">
|
||||||
|
Presentiel
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="criteres ftion_tab_droite">
|
||||||
|
|
||||||
|
{props.formation.presentiel.presentiel}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>}
|
||||||
|
{props.formation.presentiel && props.formation.presentiel.distantiel &&
|
||||||
|
<div style={{ "width": "100%" }}>
|
||||||
|
<div className="criteres ftion_tab_gauche">
|
||||||
|
Distantiel
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="criteres ftion_tab_droite">
|
||||||
|
|
||||||
|
{props.formation.presentiel.distantiel}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</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 style={{ "width": "100%", "float": "right" }}>
|
||||||
|
<div className="criteres ftion_tab_gauche">
|
||||||
|
Type
|
||||||
|
</div>
|
||||||
|
{props.formation.type &&
|
||||||
|
<div className="criteres ftion_tab_droite">
|
||||||
|
{props.formation.type}
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
{!props.formation.type &&
|
||||||
|
<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;
|
|
@ -751,8 +751,6 @@ function HebergementLms(props) {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Button variant="outlined" onClick={changeHandler2_logo} className="detail_class_submenu" style={{
|
<Button variant="outlined" onClick={changeHandler2_logo} className="detail_class_submenu" style={{
|
||||||
"background": "#c8cfd5",
|
"background": "#c8cfd5",
|
||||||
"minWidth": "15rem", "color": "black", "width": "auto"
|
"minWidth": "15rem", "color": "black", "width": "auto"
|
||||||
|
|
|
@ -1500,11 +1500,11 @@ const Materiels = (props) => {
|
||||||
|
|
||||||
const [selected_affectation_id, set_selected_affectation_id] = useState();
|
const [selected_affectation_id, set_selected_affectation_id] = useState();
|
||||||
|
|
||||||
const [New_Get_Materiel_Related_Target_Collection_Data_result, setNew_Get_Materiel_Related_Target_Collection_Data_result] = useState();
|
const [New_Get_Materiel_Related_Target_Collection_Data_result, setNew_Get_Materiel_Related_Target_Collection_Data_result] = useState([]);
|
||||||
|
|
||||||
const [Get_Materiel_Related_Target_Collection_Data_api, setGet_Materiel_Related_Target_Collection_Data_api] = useState();
|
const [Get_Materiel_Related_Target_Collection_Data_api, setGet_Materiel_Related_Target_Collection_Data_api] = useState();
|
||||||
const [Get_Materiel_Related_Target_Collection_Data_message, setGet_Materiel_Related_Target_Collection_Data_message] = useState();
|
const [Get_Materiel_Related_Target_Collection_Data_message, setGet_Materiel_Related_Target_Collection_Data_message] = useState();
|
||||||
const [Get_Materiel_Related_Target_Collection_Data_result, setGet_Materiel_Related_Target_Collection_Data_result] = useState();
|
const [Get_Materiel_Related_Target_Collection_Data_result, setGet_Materiel_Related_Target_Collection_Data_result] = useState([]);
|
||||||
function Get_Materiel_Related_Target_Collection_Data() {
|
function Get_Materiel_Related_Target_Collection_Data() {
|
||||||
|
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -946,6 +946,21 @@ const Recherche_new_v2 = () => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
|
|
||||||
|
// Verifier s'il y a un sous domaine
|
||||||
|
var tab_split_sous_domain = window.location.host.split(".");
|
||||||
|
|
||||||
|
if (tab_split_sous_domain.length > 2) {
|
||||||
|
var new_url = process.env.REACT_APP_FRONT_URL_CANONICAL_BASE + tab_split_sous_domain[0] + "." + process.env.REACT_APP_FRONT_URL_CANONICAL + "moncatalog";
|
||||||
|
window.open( String(new_url),
|
||||||
|
'_self'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var ip = "";
|
var ip = "";
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
// const result = await axios('https://geolocation-db.com/json/',);
|
// const result = await axios('https://geolocation-db.com/json/',);
|
||||||
|
|
|
@ -685,9 +685,6 @@ const TestUrl_New = (props) => {
|
||||||
|
|
||||||
</Helmet>
|
</Helmet>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Header />
|
<Header />
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
|
@ -819,9 +816,6 @@ const TestUrl_New = (props) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2> Module attestation </h2>
|
<h2> Module attestation </h2>
|
||||||
<Module_Attestation_Formation conntected_employee_id={"1234"} related_collection={"session_formation"} related_collection_recid={"65b378562f89e592bf0e4b78"} />
|
<Module_Attestation_Formation conntected_employee_id={"1234"} related_collection={"session_formation"} related_collection_recid={"65b378562f89e592bf0e4b78"} />
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,9 @@ import MenuItem from '@mui/material/MenuItem';
|
||||||
|
|
||||||
import Partner_Securite_Data from "./Partner_Securite_Data";
|
import Partner_Securite_Data from "./Partner_Securite_Data";
|
||||||
import Partner_Invoicing_Data from "./Partner_Invoicing_Data";
|
import Partner_Invoicing_Data from "./Partner_Invoicing_Data";
|
||||||
|
import Autocomplete from '@mui/material/Autocomplete';
|
||||||
|
import 'react-tooltip/dist/react-tooltip.css'
|
||||||
|
import { Tooltip } from 'react-tooltip'
|
||||||
|
|
||||||
function UpdateParnterInfo(props) {
|
function UpdateParnterInfo(props) {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
@ -56,6 +58,8 @@ function UpdateParnterInfo(props) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const [isLoading, setLoading] = useState();
|
||||||
|
|
||||||
const [currentpawdvisible, setcurrentpawdvisible] = useState(false);
|
const [currentpawdvisible, setcurrentpawdvisible] = useState(false);
|
||||||
const [newpawdvisible, setnewpawdvisible] = useState(false);
|
const [newpawdvisible, setnewpawdvisible] = useState(false);
|
||||||
const [confpwdvisible, setconfpwdvisible] = useState(false);
|
const [confpwdvisible, setconfpwdvisible] = useState(false);
|
||||||
|
@ -85,7 +89,7 @@ function UpdateParnterInfo(props) {
|
||||||
//desablesecurtypwdfields();
|
//desablesecurtypwdfields();
|
||||||
//desablesecurtyInsertKeyfields();
|
//desablesecurtyInsertKeyfields();
|
||||||
getPartnerImages();
|
getPartnerImages();
|
||||||
|
Get_List_Catalog_Public_Themes();
|
||||||
|
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
@ -1704,6 +1708,12 @@ function UpdateParnterInfo(props) {
|
||||||
setsubmenu("submenu_contact");
|
setsubmenu("submenu_contact");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function submenu_donnee_catalog_pub() {
|
||||||
|
Get_Partner_Catalog_Pub_Config();
|
||||||
|
setsubmenu("submenu_donnee_catalog_pub");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const [p_nom, setp_nom] = useState("");
|
const [p_nom, setp_nom] = useState("");
|
||||||
const [p_siret, setp_siret] = useState("");
|
const [p_siret, setp_siret] = useState("");
|
||||||
|
@ -1731,6 +1741,564 @@ function UpdateParnterInfo(props) {
|
||||||
const [p_mysy_lms_user_id, setp_mysy_lms_user_id] = useState("");
|
const [p_mysy_lms_user_id, setp_mysy_lms_user_id] = useState("");
|
||||||
|
|
||||||
|
|
||||||
|
const [submenu_catalog_pub, setsubmenu_catalog_pub] = useState("design");
|
||||||
|
function submenu_catalog_pub_design() {
|
||||||
|
setsubmenu_catalog_pub("design");
|
||||||
|
}
|
||||||
|
|
||||||
|
function submenu_catalog_pub_logo() {
|
||||||
|
clear_message_catalog_pub();
|
||||||
|
setsubmenu_catalog_pub("logo");
|
||||||
|
}
|
||||||
|
|
||||||
|
function submenu_catalog_pub_img_bg() {
|
||||||
|
setsubmenu_catalog_pub("banniere");
|
||||||
|
}
|
||||||
|
|
||||||
|
const [handleSubmission_logo_api, sethandleSubmission_logo_api] = useState();
|
||||||
|
const [handleSubmission_logo_result, sethandleSubmission_logo_result] = useState();
|
||||||
|
const [handleSubmission_logo_message, sethandleSubmission_logo_message] = useState();
|
||||||
|
|
||||||
|
function clear_message_catalog_pub() {
|
||||||
|
/*sethandleSubmission_logo_message();
|
||||||
|
sethandleSubmission_logo_api();
|
||||||
|
setSendBackground_Img_api();
|
||||||
|
setSendBackground_Img_message();*/
|
||||||
|
}
|
||||||
|
|
||||||
|
const [NEW_Get_List_Catalog_Public_Themes_result, setNEW_Get_List_Catalog_Public_Themes_result] = useState([]);
|
||||||
|
|
||||||
|
const [Get_List_Catalog_Public_Themes_api, setGet_List_Catalog_Public_Themes_api] = useState();
|
||||||
|
const [Get_List_Catalog_Public_Themes_message, setGet_List_Catalog_Public_Themes_message] = useState();
|
||||||
|
const [Get_List_Catalog_Public_Themes_result, setGet_List_Catalog_Public_Themes_result] = useState([]);
|
||||||
|
function Get_List_Catalog_Public_Themes() {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Theme_Catalog_Pub/";
|
||||||
|
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
|
||||||
|
if (String(res.data.status) === "true") {
|
||||||
|
//console.log(" In Get_List_Catalog_Public_Themes res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Get_List_Catalog_Public_Themes res.data.message r_class = " + res.data.message);
|
||||||
|
setGet_List_Catalog_Public_Themes_api("true");
|
||||||
|
setGet_List_Catalog_Public_Themes_result(res.data.message);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
const new_data = res.data.message.map((x) => {
|
||||||
|
|
||||||
|
//---
|
||||||
|
var id = JSON.parse(x).id;
|
||||||
|
var _id = JSON.parse(x)._id;
|
||||||
|
var code = JSON.parse(x).code;
|
||||||
|
var description = JSON.parse(x).description;
|
||||||
|
var theme_preview = JSON.parse(x).theme_preview;
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"_id": _id,
|
||||||
|
"id": id,
|
||||||
|
"label": code + " - " + description,
|
||||||
|
"code": code,
|
||||||
|
"description": description,
|
||||||
|
"theme_preview": theme_preview,
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (new_data2.length > 0)
|
||||||
|
setNEW_Get_List_Catalog_Public_Themes_result(new_data2);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGet_List_Catalog_Public_Themes_api("false");
|
||||||
|
setGet_List_Catalog_Public_Themes_message(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
console.warn('Not good man :( Get_List_Catalog_Public_Themes = ', error);
|
||||||
|
setGet_List_Catalog_Public_Themes_api("false");
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const [selected_catalog_pub_theme_id, setselected_catalog_pub_theme_id] = useState();
|
||||||
|
const [selected_catalog_pub_theme_preview, setselected_catalog_pub_theme_preview] = useState();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const [Add_Update_Partner_Catalog_Pub_Config_api, setAdd_Update_Partner_Catalog_Pub_Config_api] = useState();
|
||||||
|
const [Add_Update_Partner_Catalog_Pub_Config_result, setAdd_Update_Partner_Catalog_Pub_Config_result] = useState();
|
||||||
|
const [Add_Update_Partner_Catalog_Pub_Config_message, setAdd_Update_Partner_Catalog_Pub_Config_message] = useState();
|
||||||
|
|
||||||
|
function Add_Update_Partner_Catalog_Pub_Config() {
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_Partner_Catalog_Pub_Config/";
|
||||||
|
setLoading(true);
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
|
||||||
|
if (String(res.data.status) === "true") {
|
||||||
|
//console.log(" In GetLms_Themes res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In GetLms_Themes res.data.message r_class = " + res.data.message);
|
||||||
|
setAdd_Update_Partner_Catalog_Pub_Config_api("true");
|
||||||
|
setAdd_Update_Partner_Catalog_Pub_Config_result(res.data.message);
|
||||||
|
setLoading(false);
|
||||||
|
alert(" La mise à jour du theme a été correctement effectuée. ");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setAdd_Update_Partner_Catalog_Pub_Config_api("false");
|
||||||
|
setAdd_Update_Partner_Catalog_Pub_Config_message(res.data.message);
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
console.warn('Not good man :( GetLms_Themes = ', error);
|
||||||
|
setAdd_Update_Partner_Catalog_Pub_Config_api("false");
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [Partner_Catalog_Pub_logo, setPartner_Catalog_Pub_logo] = useState("");
|
||||||
|
const [Partner_Catalog_Pub_banniere, setPartner_Catalog_Pub_banniere] = useState("");
|
||||||
|
const [Partner_Catalog_Pub_message_1_txt, setPartner_Catalog_Pub_message_1_txt] = useState("");
|
||||||
|
const [Partner_Catalog_Pub_theme_id, setPartner_Catalog_Pub_theme_id] = useState("");
|
||||||
|
|
||||||
|
|
||||||
|
const [Get_Partner_Catalog_Pub_Config_api, setGet_Partner_Catalog_Pub_Config_api] = useState();
|
||||||
|
const [Get_Partner_Catalog_Pub_Config_message, setGet_Partner_Catalog_Pub_Config_message] = useState();
|
||||||
|
const [Get_Partner_Catalog_Pub_Config_result, setGet_Partner_Catalog_Pub_Config_result] = useState();
|
||||||
|
function Get_Partner_Catalog_Pub_Config(event) {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Partner_Catalog_Pub_Config/";
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
setLoading(false);
|
||||||
|
if (String(res.data.status) === "true") {
|
||||||
|
//console.log(" In Get_Partner_Catalog_Pub_Config res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Get_Partner_Catalog_Pub_Config res.data.message r_class = " + res.data.message);
|
||||||
|
setGet_Partner_Catalog_Pub_Config_api("true");
|
||||||
|
setGet_Partner_Catalog_Pub_Config_result(res.data.message);
|
||||||
|
|
||||||
|
var logo_img = "data:image/png;base64," + JSON.parse(res.data.message).logo;
|
||||||
|
setPartner_Catalog_Pub_logo(logo_img);
|
||||||
|
|
||||||
|
|
||||||
|
var banniere_img = "data:image/png;base64," + JSON.parse(res.data.message).banniere_img;
|
||||||
|
setPartner_Catalog_Pub_banniere(banniere_img);
|
||||||
|
|
||||||
|
setPartner_Catalog_Pub_message_1_txt(JSON.parse(res.data.message).message_1_txt);
|
||||||
|
|
||||||
|
setPartner_Catalog_Pub_theme_id(JSON.parse(res.data.message).theme_id);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGet_Partner_Catalog_Pub_Config_api("false");
|
||||||
|
setGet_Partner_Catalog_Pub_Config_message(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Not good man :( Get_Partner_Catalog_Pub_Config = ', error);
|
||||||
|
alert(" Impossible de récuperer la configuration du catalogue public ")
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function SendBackground_Img() {
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('File', img_bg_file2);
|
||||||
|
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Lms_Add_BG_File/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
//console.log('Success:', result['message']);
|
||||||
|
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
setSendBackground_Img_api("true");
|
||||||
|
alert(" L'image bannière a été correctement mise à jour")
|
||||||
|
|
||||||
|
} else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
setSendBackground_Img_api("false");
|
||||||
|
setSendBackground_Img_message(result['message']);
|
||||||
|
}
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', result);
|
||||||
|
setSendBackground_Img_api("false");
|
||||||
|
setSendBackground_Img_message(result['message']);
|
||||||
|
setLoading(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const changeHandler2_bg = (event) => {
|
||||||
|
hiddenFileInput_bg.current.click();
|
||||||
|
};
|
||||||
|
|
||||||
|
const [logo_file_name, setlogo_file_name] = useState();
|
||||||
|
const hiddenFileInput_logo = React.useRef(null);
|
||||||
|
|
||||||
|
const [bg_file_name, setbg_file_name] = useState();
|
||||||
|
const hiddenFileInput_bg = React.useRef(null);
|
||||||
|
const [handleSubmission_bg_api, sethandleSubmission_bg_api] = useState();
|
||||||
|
const [handleSubmission_bg_result, sethandleSubmission_bg_result] = useState();
|
||||||
|
const [handleSubmission_bg_message, sethandleSubmission_bg_message] = useState();
|
||||||
|
|
||||||
|
const handleSubmission_bg = event => {
|
||||||
|
const fileUploaded = event.target.files[0];
|
||||||
|
let file_size = event.target.files[0].size;
|
||||||
|
let file_type = event.target.files[0].type;
|
||||||
|
|
||||||
|
console.log("file_size = ", file_size, " file_type = ", file_type, " naturalWidth = ", fileUploaded.naturalWidth);
|
||||||
|
if (file_size > 1000000) {
|
||||||
|
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//image/png
|
||||||
|
if (String(file_type) !== "image/png") {
|
||||||
|
alert("Le fichier n'est pas au format PNG");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
var _URL = window.URL || window.webkitURL;
|
||||||
|
var file, img;
|
||||||
|
var img_height, img_width;
|
||||||
|
|
||||||
|
if ((file = event.target.files[0])) {
|
||||||
|
img = new Image();
|
||||||
|
var objectUrl = _URL.createObjectURL(file);
|
||||||
|
img.onload = function () {
|
||||||
|
img_height = this.height;
|
||||||
|
img_width = this.width;
|
||||||
|
//console.log(" img_width = ", img_width);
|
||||||
|
_URL.revokeObjectURL(objectUrl);
|
||||||
|
if (parseFloat(img_width) > 1500 && parseFloat(img_width) < 1930 &&
|
||||||
|
parseFloat(img_height) > 150 && parseFloat(img_height) < 195) {
|
||||||
|
//console.log(" img_height est = ", img_height, " < à 1500 ");
|
||||||
|
|
||||||
|
// Verification que le nom du fichier est alpha numerique
|
||||||
|
/*var regExp = /^[A-Za-z0-9]+$/;
|
||||||
|
if (!regExp.test(event.target.files[0].name)) {
|
||||||
|
sethandleSubmission_bg_message(" Le nom de l'image comporte des caractères non alphanumériques");
|
||||||
|
sethandleSubmission_bg_api("false");
|
||||||
|
setLoading(false);
|
||||||
|
return
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
if (String(event.target.files[0].name).length > 50) {
|
||||||
|
sethandleSubmission_bg_message(" Le nom du fichier est trop long. il doit faire moins de 50 caractère");
|
||||||
|
sethandleSubmission_bg_api("false");
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
setbg_file_name(event.target.files[0].name);
|
||||||
|
|
||||||
|
setimg_bg_file(URL.createObjectURL(event.target.files[0]));
|
||||||
|
setimg_bg_file2(event.target.files[0]);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
sethandleSubmission_bg_message(" La taille de l'image est incorrecte. Larg = " + String(img_width) + " px Long = " + String(img_height) + " px");
|
||||||
|
sethandleSubmission_bg_api("false");
|
||||||
|
setLoading(false);
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
img.src = objectUrl;
|
||||||
|
|
||||||
|
}
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const [SendBackground_Img_api, setSendBackground_Img_api] = useState();
|
||||||
|
const [SendBackground_Img_result, setSendBackground_Img_result] = useState();
|
||||||
|
const [SendBackground_Img_message, setSendBackground_Img_message] = useState();
|
||||||
|
|
||||||
|
function SendBackground_Img() {
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('File', img_bg_file2);
|
||||||
|
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Lms_Add_BG_File/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
//console.log('Success:', result['message']);
|
||||||
|
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
setSendBackground_Img_api("true");
|
||||||
|
alert(" L'image bannière a été correctement mise à jour")
|
||||||
|
|
||||||
|
} else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
setSendBackground_Img_api("false");
|
||||||
|
setSendBackground_Img_message(result['message']);
|
||||||
|
}
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', result);
|
||||||
|
setSendBackground_Img_api("false");
|
||||||
|
setSendBackground_Img_message(result['message']);
|
||||||
|
setLoading(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const [img_bg_file, setimg_bg_file] = useState();
|
||||||
|
const [img_logo_file2, setimg_logo_file2] = useState();
|
||||||
|
const [img_bg_file2, setimg_bg_file2] = useState();
|
||||||
|
|
||||||
|
|
||||||
|
const changeHandler2_logo = (event) => {
|
||||||
|
hiddenFileInput_logo.current.click();
|
||||||
|
};
|
||||||
|
|
||||||
|
const [Delete_logo_Img_api, setDelete_logo_Img_api] = useState();
|
||||||
|
const [Delete_logo_Img_result, setDelete_logo_Img_result] = useState();
|
||||||
|
const [Delete_logo_Img_message, setDelete_logo_Img_message] = useState();
|
||||||
|
function Delete_logo_Img() {
|
||||||
|
setLoading(true);
|
||||||
|
const formData = new FormData();
|
||||||
|
|
||||||
|
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Lms_Delete_Logo_File/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
//console.log('Success:', result['message']);
|
||||||
|
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
setDelete_logo_Img_api("true");
|
||||||
|
setPartner_Catalog_Pub_logo('');
|
||||||
|
alert(" Le logo a été correctement supprimé ");
|
||||||
|
|
||||||
|
} else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
setDelete_logo_Img_api("false");
|
||||||
|
setDelete_logo_Img_message(result['message']);
|
||||||
|
}
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', result);
|
||||||
|
setDelete_logo_Img_api("false");
|
||||||
|
setDelete_logo_Img_message(" Impossible de supprimer le fichier logo");
|
||||||
|
setLoading(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const [img_logo_file, setimg_logo_file] = useState();
|
||||||
|
const [Send_logo_Img_api, setSend_logo_Img_api] = useState();
|
||||||
|
const [Send_logo_Img_result, setSend_logo_Img_result] = useState();
|
||||||
|
const [Send_logo_Img_message, setSend_logo_Img_message] = useState();
|
||||||
|
function Send_logo_Img() {
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('File', img_logo_file2);
|
||||||
|
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Lms_Add_Logo_File/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
//console.log('Success:', result['message']);
|
||||||
|
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
setSend_logo_Img_api("true");
|
||||||
|
alert(" La mise à jour du logo a été correctement effectuée. ");
|
||||||
|
|
||||||
|
} else if (String(result['status']) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + result['message']);
|
||||||
|
history.push("/Connexion");
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
setSend_logo_Img_api("false");
|
||||||
|
setSend_logo_Img_message(result['message']);
|
||||||
|
}
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', result);
|
||||||
|
setSend_logo_Img_api("false");
|
||||||
|
setSend_logo_Img_message(result['message']);
|
||||||
|
setLoading(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const handleSubmission_logo = event => {
|
||||||
|
const fileUploaded = event.target.files[0];
|
||||||
|
let file_size = event.target.files[0].size;
|
||||||
|
let file_type = event.target.files[0].type;
|
||||||
|
|
||||||
|
//console.log("file_size = ", file_size, " file_type = ", file_type);
|
||||||
|
//console.log(" fileUploaded = ", fileUploaded);
|
||||||
|
if (file_size > 1000000) {
|
||||||
|
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//image/png
|
||||||
|
if (String(file_type) !== "image/png") {
|
||||||
|
alert("Le fichier n'est pas au format PNG");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
var _URL = window.URL || window.webkitURL;
|
||||||
|
var file, img;
|
||||||
|
var img_height, img_width;
|
||||||
|
|
||||||
|
if ((file = event.target.files[0])) {
|
||||||
|
img = new Image();
|
||||||
|
var objectUrl = _URL.createObjectURL(file);
|
||||||
|
img.onload = function () {
|
||||||
|
img_height = this.height;
|
||||||
|
img_width = this.width;
|
||||||
|
_URL.revokeObjectURL(objectUrl);
|
||||||
|
// console.log(" img_width = ", img_width, " img_height = ", img_height)
|
||||||
|
|
||||||
|
if (parseFloat(img_width) > 130 && parseFloat(img_width) < 260 &&
|
||||||
|
parseFloat(img_height) > 60 && parseFloat(img_height) < 150) {
|
||||||
|
//console.log(" img_height est = ", img_height, " < à 1500 ");
|
||||||
|
|
||||||
|
// Verification que le nom du fichier est alpha numerique
|
||||||
|
/*var regExp = /^[A-Za-z0-9]+$/;
|
||||||
|
if (!regExp.test(event.target.files[0].name)) {
|
||||||
|
sethandleSubmission_logo_message(" Le nom de l'image comporte des caractères non alphanumériques");
|
||||||
|
sethandleSubmission_logo_api("false");
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
return
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
if (String(event.target.files[0].name).length > 50) {
|
||||||
|
sethandleSubmission_logo_message(" Le nom du fichier est trop long. il doit faire moins de 50 caractère");
|
||||||
|
sethandleSubmission_logo_api("false");
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
setlogo_file_name(event.target.files[0].name);
|
||||||
|
setimg_logo_file(URL.createObjectURL(event.target.files[0]));
|
||||||
|
setimg_logo_file2(event.target.files[0]);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
sethandleSubmission_logo_message(" La taille de l'image est incorrecte. Larg = " + String(img_width) + " px Long = " + String(img_height) + " px");
|
||||||
|
sethandleSubmission_logo_api("false");
|
||||||
|
setLoading(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//console.log(" after img_width = ", img_width, " after img_height = ", img_height)
|
||||||
|
};
|
||||||
|
img.src = objectUrl;
|
||||||
|
|
||||||
|
}
|
||||||
|
setLoading(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1743,6 +2311,8 @@ function UpdateParnterInfo(props) {
|
||||||
{String(is_partner_admin_account) === "1" && <Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_donnee_facturation' name='submenu_donnee_facturation'>DONNEES FACTURATION</Button>}
|
{String(is_partner_admin_account) === "1" && <Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_donnee_facturation' name='submenu_donnee_facturation'>DONNEES FACTURATION</Button>}
|
||||||
<Button variant="outlined" onClick={submenu_donnee_securite} className="detail_submenu" id='submenu_donnee_securite' name='submenu_donnee_securite'>SECURITE</Button>
|
<Button variant="outlined" onClick={submenu_donnee_securite} className="detail_submenu" id='submenu_donnee_securite' name='submenu_donnee_securite'>SECURITE</Button>
|
||||||
{/*<Button variant="outlined" onClick={submenu_contact} className="detail_submenu" id='submenu_contact' name='submenu_contact'>Contact & Adresses</Button>*/}
|
{/*<Button variant="outlined" onClick={submenu_contact} className="detail_submenu" id='submenu_contact' name='submenu_contact'>Contact & Adresses</Button>*/}
|
||||||
|
{String(is_partner_admin_account) === "1" && <Button variant="outlined" onClick={submenu_donnee_catalog_pub} className="detail_submenu" id='submenu_donnee_catalog_pub' name='submenu_donnee_catalog_pub'>CATALOG. PUB</Button>}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{String(submenu).trim() === "submenu_donnee_securite" && <div className="training_data">
|
{String(submenu).trim() === "submenu_donnee_securite" && <div className="training_data">
|
||||||
|
@ -1758,6 +2328,255 @@ function UpdateParnterInfo(props) {
|
||||||
|
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
{String(submenu).trim() === "submenu_donnee_catalog_pub" && <div className="training_data">
|
||||||
|
<h3> Config. Catalog public </h3>
|
||||||
|
|
||||||
|
<div className="hebergementlms">
|
||||||
|
<div style={{ "textAlign": "left", "float": "left", "width": "100%", "marginBottom": "1rem" }} id="participant_menu_tab">
|
||||||
|
<Button variant="outlined" onClick={submenu_catalog_pub_design} className="detail_class_submenu" id='menu_preinscrit' name='menu_preinscrit'>Thème & Design</Button>
|
||||||
|
<Button variant="outlined" onClick={submenu_catalog_pub_img_bg} className="detail_class_submenu" id='menu_inscrit' name='menu_inscrit'>Bannière</Button>
|
||||||
|
<Button variant="outlined" onClick={submenu_catalog_pub_logo} className="detail_class_submenu" id='menu_preinscrit' name='menu_preinscrit'>Logo</Button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{String(submenu_catalog_pub) === String("design") && <div className="detail_class_submenu_data" style={{ "border": "None" }}>
|
||||||
|
<div className="div_row">
|
||||||
|
|
||||||
|
<div className="session_caract">Choisir un exemple de thème : <br />
|
||||||
|
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="client_type_id"
|
||||||
|
id="client_type_id"
|
||||||
|
className="disabled_style"
|
||||||
|
options={NEW_Get_List_Catalog_Public_Themes_result}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value._id) {
|
||||||
|
setselected_catalog_pub_theme_id(value._id);
|
||||||
|
|
||||||
|
var partner_logo_img = "data:image/png;base64," + value.theme_preview;
|
||||||
|
setselected_catalog_pub_theme_preview(partner_logo_img);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setselected_catalog_pub_theme_id('');
|
||||||
|
setselected_catalog_pub_theme_preview('')
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
//value={p_one_detail_client_rattachement_nom}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div className="div_row">
|
||||||
|
{selected_catalog_pub_theme_preview && <div className="session_caract">
|
||||||
|
<img className="preview_certif" src={selected_catalog_pub_theme_preview} />
|
||||||
|
</div>}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row">
|
||||||
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||||
|
|
||||||
|
<div className="div_row_gauche " style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||||
|
<Button variant="contained" className="btn_modif" onClick={"One_annuleSessionUpdate"}>Annuler
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||||
|
<Button variant="contained" className="btn_enreg" onClick={RecordData}>Enregistrer
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
{String(submenu_catalog_pub) === String("banniere") && <div className="detail_class_submenu_data" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
{Partner_Catalog_Pub_banniere && String(Partner_Catalog_Pub_banniere).length > 20 && <div className="div_row" style={{ "border": "None" }}>
|
||||||
|
Bannière actuelle : <br />
|
||||||
|
<img src={Partner_Catalog_Pub_banniere} alt={""} className="img_bg_file_css" />
|
||||||
|
<br />
|
||||||
|
<Button variant="contained" className="btn_enreg" onClick={"Delete_Banniere_Img"}>Supprimer Bannière
|
||||||
|
</Button>
|
||||||
|
</div>}
|
||||||
|
<div className="div_row"> Import Bannière <br />
|
||||||
|
|
||||||
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Button variant="outlined" onClick={changeHandler2_bg} className="detail_class_submenu" style={{
|
||||||
|
"background": "#c8cfd5",
|
||||||
|
"minWidth": "15rem", "color": "black", "width": "auto"
|
||||||
|
}}
|
||||||
|
id='menu_import_formation' name='menu_import_formation'>Choisir une image bannière <br />
|
||||||
|
|
||||||
|
</Button><br />
|
||||||
|
<nav className="koUpdateData" style={{ "color": "orange" }}>
|
||||||
|
<Tooltip className="tooltip_css" id="tooltip_1" />
|
||||||
|
|
||||||
|
<a data-tooltip-id="tooltip_1" data-tooltip-html="Respecter ces critères vous aide à avoir un meilleur affichage">
|
||||||
|
<i> Important : Taille de la bannière : longueur entre 1500px et 1930px et largeur entre 150px et 195px, au format PNG <br />
|
||||||
|
Le nom du fichier ne contient que des caractères alphanumériques </i>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{bg_file_name && <nav className="okUpdateData"><i>{bg_file_name}</i></nav>}
|
||||||
|
<input type="file"
|
||||||
|
accept=".png"
|
||||||
|
ref={hiddenFileInput_bg}
|
||||||
|
style={{ display: 'none' }}
|
||||||
|
name="liste_formation_file"
|
||||||
|
onChange={handleSubmission_bg}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{img_bg_file && <nav> Fichier à importer : {img_bg_file.name} <br />
|
||||||
|
<img src={img_bg_file} alt={""} className="img_bg_file_css" />
|
||||||
|
|
||||||
|
<br />
|
||||||
|
</nav>}
|
||||||
|
|
||||||
|
|
||||||
|
{String(SendBackground_Img_api) === "true" && <div className="okUpdateData"> La mise à jour a été correctement faite</div>}
|
||||||
|
{String(SendBackground_Img_api) === "false" && <div className="koUpdateData"> {SendBackground_Img_message}</div>}
|
||||||
|
|
||||||
|
{String(handleSubmission_bg_api) === "false" && <div className="koUpdateData"> {handleSubmission_bg_message}</div>}
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div className="div_row">
|
||||||
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||||
|
|
||||||
|
<div className="div_row_gauche " style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||||
|
<Button variant="contained" className="btn_modif" onClick={"Annule_bg_img"}>Annuler
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||||
|
<Button variant="contained" className="btn_enreg" onClick={SendBackground_Img}>Enregistrer
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
{String(submenu_catalog_pub) === String("logo") && <div className="detail_class_submenu_data" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
{Partner_Catalog_Pub_logo && String(Partner_Catalog_Pub_logo) !== "" && <div className="div_row" style={{ "border": "None" }}>
|
||||||
|
Logo actuel :<br />
|
||||||
|
<img src={Partner_Catalog_Pub_logo} alt={""} />
|
||||||
|
<br />
|
||||||
|
<Button variant="contained" className="btn_enreg" onClick={Delete_logo_Img}>Supprimer Logo
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
<div className="div_row"> Import du logo <br />
|
||||||
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Button variant="outlined" onClick={changeHandler2_logo} className="detail_class_submenu" style={{
|
||||||
|
"background": "#c8cfd5",
|
||||||
|
"minWidth": "15rem", "color": "black", "width": "auto"
|
||||||
|
}}
|
||||||
|
id='menu_import_formation' name='menu_import_formation'>Choisir une image <br />
|
||||||
|
|
||||||
|
</Button><br />
|
||||||
|
<nav className="koUpdateData" style={{ "color": "orange" }}>
|
||||||
|
<Tooltip className="tooltip_css" id="tooltip_2" />
|
||||||
|
|
||||||
|
<a data-tooltip-id="tooltip_2" data-tooltip-html="Respecter ces critères vous aide à avoir un meilleur affichage">
|
||||||
|
<i> Important : Taille du logo : longueur entre 140px et 250px et largeur entre 60px et 150px, au format PNG <br />
|
||||||
|
Le nom du fichier ne contient que des caractères alphanumériques </i>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
{logo_file_name && <nav className="okUpdateData"><i>{logo_file_name}</i></nav>}
|
||||||
|
<input type="file"
|
||||||
|
accept=".png"
|
||||||
|
ref={hiddenFileInput_logo}
|
||||||
|
style={{ display: 'none' }}
|
||||||
|
name="liste_formation_file"
|
||||||
|
onChange={handleSubmission_logo}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{img_logo_file && <nav> Fichier à importer : {img_logo_file.name} <br />
|
||||||
|
<img src={img_logo_file} alt={""} />
|
||||||
|
|
||||||
|
|
||||||
|
<br />
|
||||||
|
</nav>}
|
||||||
|
|
||||||
|
{String(Send_logo_Img_api) === "true" && <div className="okUpdateData"> La mise à jour a été correctement faite</div>}
|
||||||
|
{String(Send_logo_Img_api) === "false" && <div className="koUpdateData"> {Send_logo_Img_message}</div>}
|
||||||
|
|
||||||
|
{String(handleSubmission_logo_api) === "false" && <div className="koUpdateData"> {handleSubmission_logo_message}</div>}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div className="div_row">
|
||||||
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||||
|
|
||||||
|
<div className="div_row_gauche " style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||||
|
<Button variant="contained" className="btn_modif" onClick={"Annule_logo_img"}>Annuler
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||||
|
<Button variant="contained" className="btn_enreg" onClick={Send_logo_Img}>Enregistrer
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
{String(submenu).trim() === "submenu_donnee_entreprise" && <div className="training_data">
|
{String(submenu).trim() === "submenu_donnee_entreprise" && <div className="training_data">
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
import Display_Partner_Catalog_DetailClass_new_v2 from "../components/Display_Partner_Catalog_DetailClass_new_v2";
|
||||||
|
import Navigation from "../components/Navigation";
|
||||||
|
|
||||||
|
export default function display_partner_catalog_detailclass() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div >
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<Display_Partner_Catalog_DetailClass_new_v2 />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
import Mon_Catalogue_Public from "../components/Mon_Catalogue_Public";
|
||||||
|
import Navigation from "../components/Navigation";
|
||||||
|
import Footer from "./footer";
|
||||||
|
|
||||||
|
const mon_catalogue_public = () => {
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Navigation />
|
||||||
|
<div>
|
||||||
|
<Mon_Catalogue_Public />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export default mon_catalogue_public;
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -245,6 +245,7 @@
|
||||||
letter-spacing: 0.1rem;
|
letter-spacing: 0.1rem;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 2rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -480,6 +481,7 @@
|
||||||
font-size: small;
|
font-size: small;
|
||||||
letter-spacing: 0.1rem;
|
letter-spacing: 0.1rem;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
height: 2rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -714,6 +716,7 @@
|
||||||
font-size: small;
|
font-size: small;
|
||||||
letter-spacing: 0.1rem;
|
letter-spacing: 0.1rem;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
height: 2rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -965,6 +968,7 @@
|
||||||
font-size: small;
|
font-size: small;
|
||||||
letter-spacing: 0.1rem;
|
letter-spacing: 0.1rem;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
height: 2rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -120,3 +120,5 @@
|
||||||
@import "./components/partner_product_service";
|
@import "./components/partner_product_service";
|
||||||
@import "./components/module_email_management";
|
@import "./components/module_email_management";
|
||||||
@import "./components/groupe_apprenant_dialog";
|
@import "./components/groupe_apprenant_dialog";
|
||||||
|
@import "./components/mon_catalogue_public";
|
||||||
|
@import "./components/formation_partner_catalog";
|
Loading…
Reference in New Issue