recette2
cherif 2025-02-09 19:06:32 +01:00
parent a6bf533cc6
commit 2b530c1a22
10 changed files with 347 additions and 96 deletions

View File

@ -182,10 +182,7 @@ function App() {
<Route path="/Display-Partner-Catalog-Detail-formation/:classId" exact component={Display_Partner_Catalog_DetailClass_new_v2} />
<Route path="/Display-Partner-Catalog-Detail-formation/:classId/:action" exact component={Display_Partner_Catalog_DetailClass_new_v2} />
<Route path="/PartnerLogin" exact component={PartnerLogin} />
<Route path="/PartnerLogin0" exact component={PartnerLogin0} />
<Route path="/PartnerLogin1" exact component={PartnerLogin1} />
<Route path="/Recherche-Article-formation" exact component={RechecheArticles} />
<Route path="/Ajout-Article-formation" exact component={AddArticle} />
@ -259,6 +256,11 @@ function App() {
<Route path="/Display-Detail-formation/:classId" exact component={New_Formation_Detail_2025} />
<Route path="/Display-Detail-formation/:classId/:action" exact component={New_Formation_Detail_2025} />
<Route path="/Display-Detail-formation_old/:classId/:action" exact component={New_Formation_Detail_2025} />
<Route path="/PartnerLogin" exact component={PartnerLogin} />
<Route path="/PartnerLogin0" exact component={PartnerLogin0} />
<Route path="/PartnerLogin1" exact component={PartnerLogin1} />

View File

@ -148,8 +148,9 @@ function New_C_Sign_Up_2025() {
});
}
const onSubmit = async (data) => {
const onSubmit_mobile = async (data) => {
window.scrollTo({
top: 0,
behavior: "smooth",
@ -184,9 +185,6 @@ function New_C_Sign_Up_2025() {
}
var mymail = document.getElementsByName("email")[0].value;
var re = /\S+@\S+\.\S+/;
document.getElementsByName("email")[0].style.border = "1px solid white";
@ -337,8 +335,303 @@ function New_C_Sign_Up_2025() {
document.getElementsByName("pasrobot")[0].style.border = "1px solid white";
var total = " ?? ";
if (document.getElementsByName("sommerandom")[0].value) {
total = document.getElementsByName("sommerandom")[0].value;
if (document.getElementsByName("sommerandom_mobile")[0].value) {
total = document.getElementsByName("sommerandom_mobile")[0].value;
}
var calcaul_total = parseInt(random1) + parseInt(random2);
if (parseInt(total) != parseInt(calcaul_total)) {
document.getElementsByName("pasrobot")[0].style.border = "1px solid white";
setdisplay_alert_mysy("1");
setalert_message(" Le total dans la zone 'je ne suis pas un robot' est incohérent. Recommencez svp :) !!!");
setalert_type("error");
//alert(" Le total dans la zone 'je ne suis pas un robot' est incohérent. Recommencez svp :) !!!");
return;
}
contact_nom = document.getElementsByName("contact_nom")[0].value;
contact_prenom = document.getElementsByName("contact_prenom")[0].value;
contact_mail = document.getElementsByName("contact_email")[0].value;
contact_tel = document.getElementsByName("contact_telephone")[0].value;
raison_sociale = document.getElementsByName("raison_sociale")[0].value;
telephone = document.getElementsByName("telephone")[0].value;
formData.append("nom", raison_sociale);
var new_nom = (raison_sociale).replace(/[^0-9a-z]/gi, '').toLocaleLowerCase();
formData.append('subdomaine_catalog_pub', new_nom);
formData.append("telephone", telephone);
formData.append("contact_nom", contact_nom);
formData.append("contact_prenom", contact_prenom);
formData.append("contact_tel", contact_tel);
formData.append("contact_mail", contact_mail);
url_sign_up = process.env.REACT_APP_API_URL + "myclass/api/add_partner_account/";
}
if (!document.getElementsByName("cgu_mobile")[0].checked) {
// alert(" Vous devez accepter les conditions générales d'utilisation du site. Merci.");
setdisplay_alert_mysy("1");
setalert_message("Vous devez accepter les conditions générales d'utilisation du site. Merci. ");
setalert_type("error");
document.getElementsByName("cgu_mobile")[0].style.backgroundColor = "red";
return;
}
formData.append("email", mymail);
formData.append("pwd", new_pwd);
fetch(
url_sign_up,
{
method: 'POST',
body: formData,
}
).then((response) => response.json())
.then((result) => {
//console.log('Success:', result['message'], "result['status'] = ", result['status']);
if (String(result['status']) == String("true")) {
alert(String(result['message']));
setisconnected("true");
setmyApimyApiMessage(result['message']);
window.scrollTo({
top: 0,
behavior: "smooth",
});
if (String(menucompte) === String("user")) {
history.push("/Connexion-utilisateur-0");
}
else if (String(menucompte) === String("partner")) {
history.push("/PartnerLogin0");
}
}
else {
//alert(" GRR "+String(result['message']+ " result['status'] = "+ result['status']));
setisconnected("false");
//setmyApimyApiMessage(result['message']);
setdisplay_alert_mysy("1");
setalert_message(result['message']);
setalert_type("error");
}
})
.catch((error) => {
console.error('Error:', error);
setisconnected("false");
setdisplay_alert_mysy("1");
setalert_message("Le service est momentanémentindisponible, merci de ressayer plus tard. ");
setalert_type("error");
// setmyApimyApiMessage("Le service est momentanémentindisponible, merci de ressayer plus tard. ");
});
};
const onSubmit = async (data) => {
window.scrollTo({
top: 0,
behavior: "smooth",
});
const formData = new FormData();
document.getElementsByName("raison_sociale")[0].style.border = "1px solid white";
if (!document.getElementsByName("raison_sociale")[0] || document.getElementsByName("raison_sociale")[0].value.length < 3) {
document.getElementsByName("raison_sociale")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message("La raison sociale de la société doit faire au moins 3 caractère ");
setalert_type("error");
// alert("La raison sociale du contact principal est incorrecte");
return
}
document.getElementsByName("telephone")[0].style.border = "1px solid white";
if (!document.getElementsByName("telephone")[0] || document.getElementsByName("telephone")[0].value.length <= 8) {
document.getElementsByName("telephone")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message("Le téléphone de l'entreprise doit faire au moins 10 chiffres");
setalert_type("error");
// alert("Le téléphone du contact principal est incorrect ");
return
}
var mymail = document.getElementsByName("email")[0].value;
var re = /\S+@\S+\.\S+/;
document.getElementsByName("email")[0].style.border = "1px solid white";
if (re.test(mymail) === false) {
document.getElementsByName("email")[0].style.border = "1px solid red";
//alert("Votre adresse email est incorrecte");
setdisplay_alert_mysy("1");
setalert_message("L'adresse email de l'entreprise est incorrecte");
setalert_type("error");
return;
}
var new_pwd = document.getElementsByName("new_pwd")[0].value;
var conf_new_pwd = document.getElementsByName("new_pwd_conf")[0].value;
document.getElementsByName("new_pwd")[0].style.border = "1px solid white";
document.getElementsByName("new_pwd_conf")[0].style.border = "1px solid white";
if (new_pwd.length < 8) {
//alert("Le mot de passe doit faire au moins 8 caractères ");
document.getElementsByName("new_pwd")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message("Le mot de passe doit faire au moins 8 caractères ");
setalert_type("error");
return;
}
if (new_pwd !== conf_new_pwd) {
document.getElementsByName("new_pwd")[0].style.border = "1px solid red";
document.getElementsByName("new_pwd_conf")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message(" Les mots de passe ne sont pas identiques");
setalert_type("error");
return
}
if (String(new_pwd).length < 8) {
document.getElementsByName("new_pwd")[0].style.border = "1px solid red";
document.getElementsByName("caractere")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message(" Le mot de passe doit faire au moins 8 caractères");
setalert_type("error");
return
}
var regex = /\d/g;
if (!regex.test(new_pwd)) {
document.getElementsByName("new_pwd")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message(" Le mot de passe doit contenir au un chiffre au moins");
setalert_type("error");
return
}
const specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/;
if (!specialChars.test(new_pwd)) {
document.getElementsByName("new_pwd")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message(" Le mot de passe doit contenir au un caractère spécial au moins");
setalert_type("error");
return
}
var mymail = document.getElementsByName("email")[0].value;
var contact_nom = "";
var contact_prenom = "";
var contact_mail = "";
var contact_tel = "";
var raison_sociale = "";
var telephone = "";
var url_sign_up = process.env.REACT_APP_API_URL + "myclass/api/add_user_account/";
if (String(menucompte) === String("partner")) {
// Verification des champs obligatoires
document.getElementsByName("contact_nom")[0].style.border = "1px solid white";
if (!document.getElementsByName("contact_nom")[0] || document.getElementsByName("contact_nom")[0].value.length <= 1) {
document.getElementsByName("contact_nom")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message(" Le nom du contact principal est incorrect ");
setalert_type("error");
// alert("Le nom du contact principal est incorrect ");
return
}
document.getElementsByName("contact_prenom")[0].style.border = "1px solid white";
if (!document.getElementsByName("contact_prenom")[0] || document.getElementsByName("contact_prenom")[0].value.length <= 1) {
document.getElementsByName("contact_prenom")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message(" Le prenom du contact principal est incorrect ");
setalert_type("error");
// alert("Le prenom du contact principal est incorrect ");
return
}
document.getElementsByName("contact_email")[0].style.border = "1px solid white";
if (!document.getElementsByName("contact_email")[0] || document.getElementsByName("contact_email")[0].value.length <= 1) {
document.getElementsByName("contact_email")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message("L'email du contact principal est incorrect ");
setalert_type("error");
// alert("L'email du contact principal est incorrect ");
return
}
var re2 = /\S+@\S+\.\S+/;
if (re2.test(document.getElementsByName("contact_email")[0].value) === false) {
setdisplay_alert_mysy("1");
setalert_message(" L'email du contact principal est incorrect ");
setalert_type("error");
// alert("L'email du contact principal est incorrect ");
document.getElementsByName("contact_email")[0].style.border = "1px solid red";
return;
}
document.getElementsByName("contact_telephone")[0].style.border = "1px solid white";
if (!document.getElementsByName("contact_telephone")[0] || document.getElementsByName("contact_telephone")[0].value.length <= 8) {
document.getElementsByName("contact_telephone")[0].style.border = "1px solid red";
setdisplay_alert_mysy("1");
setalert_message("Le téléphone du contact principal doit faire au moins 10 chiffres");
setalert_type("error");
// alert("Le téléphone du contact principal est incorrect ");
return
}
document.getElementsByName("pasrobot")[0].style.border = "1px solid white";
var total = " ?? ";
if (document.getElementsByName("sommerandom_creation")[0].value) {
total = document.getElementsByName("sommerandom_creation")[0].value;
}
var calcaul_total = parseInt(random1) + parseInt(random2);
@ -389,7 +682,7 @@ function New_C_Sign_Up_2025() {
}
formData.append("email", mymail);
formData.append("pwd", new_pwd);
fetch(
url_sign_up,
@ -509,6 +802,7 @@ function New_C_Sign_Up_2025() {
function resetpasswd_ok(e) {
// Controle du mail
var mymail = reset_login_email;
//alert(" le mail de reset = "+mymail);
@ -527,12 +821,13 @@ function New_C_Sign_Up_2025() {
var total = " ?? ";
if (document.getElementsByName("sommerandom")[0].value) {
total = document.getElementsByName("sommerandom")[0].value;
if (document.getElementsByName("sommerandom_reset_pwd")[0].value) {
total = document.getElementsByName("sommerandom_reset_pwd")[0].value;
}
var calcul_total = parseInt(random1) + parseInt(random2);
if (parseInt(total) != parseInt(calcul_total)) {
document.getElementsByName("pasrobot")[0].style.border = "1px solid red";
@ -757,16 +1052,13 @@ function New_C_Sign_Up_2025() {
<TextField
// autoFocus
margin="dense"
id="sommerandom"
name="sommerandom"
id="sommerandom_reset_pwd"
name="sommerandom_reset_pwd"
fullWidth
//variant="standard"
/* onChange={(e) => {
setreset_somme_random(e.target.value);
}
}*/
placeholder="Calculez la sommes des valeurs"
placeholder="Calculez la somme des valeurs"
/>
@ -1164,19 +1456,19 @@ function New_C_Sign_Up_2025() {
<div style={{ "textAlign": "left", "width": "100%", marginTop: "2rem" }}>
<input type={"checkbox"} unchecked
id="cgu"
name="cgu"
id="cgu_mobile"
name="cgu_mobile"
style={{ "textAlign": "left", "width": "auto", "height": "1rem" }} />
<label for="cgu" style={{ "textAlign": "left", maxWidth: "90%", "fontSize": "small" }}>Accepter <a href='/sample/MYSY_CGU.pdf' download>les conditions générales d'usage </a></label>
<label for="cgu_mobile" style={{ "textAlign": "left", maxWidth: "90%", "fontSize": "small" }}>Accepter <a href='/sample/MYSY_CGU.pdf' download>les conditions générales d'usage </a></label>
<div name="pasrobot" > <b>Je ne suis un robot</b> : {random1} + {random2} =
<TextField
// autoFocus
margin="dense"
id="sommerandom"
name="sommerandom"
id="sommerandom_mobile"
name="sommerandom_mobile"
fullWidth
placeholder="Calculez la sommes des valeurs"
placeholder="Calculez la somme des valeurs"
/>
@ -1197,7 +1489,7 @@ function New_C_Sign_Up_2025() {
</div>
</div>
<div className="log-in">
<div className="button-text" onClick={onSubmit}>
<div className="button-text" onClick={onSubmit_mobile}>
<div className="div-wrapper"><div className="text-2">Créer un compte</div></div>
</div>
<div className="create-account">
@ -1607,14 +1899,14 @@ function New_C_Sign_Up_2025() {
style={{ "textAlign": "left", "width": "auto", "height": "1rem" }} />
<label for="cgu" style={{ "textAlign": "left", maxWidth: "90%", "fontSize": "small" }}>Accepter <a href='/sample/MYSY_CGU.pdf' download>les conditions générales d'usage </a></label>
<div name="pasrobot" > <b>Je ne suis un robot</b> : {random1} + {random2} =
<div name="pasrobot" > <b>Je ne suis un robot </b> : {random1} + {random2} =
<TextField
// autoFocus
margin="dense"
id="sommerandom"
name="sommerandom"
id="sommerandom_creation"
name="sommerandom_creation"
fullWidth
placeholder="Calculez la sommes des valeurs"
placeholder="Calculez la somme des valeurs"
/>

View File

@ -247,7 +247,7 @@ function PartnerSignIn() {
<meta name="description" content="Liste des articles sur les formations" />
<meta name="robots" content="index,follow" />
</Helmet>
<Header />
<div className="div_mobile">
<h1 className="text_welcome">Se connecter à MySy Training PRO</h1>
<div className="display_screen_600_901">
@ -281,9 +281,7 @@ function PartnerSignIn() {
</div>
<div className="pieddepage">
<Footer />
</div>
</div>
</div>

View File

@ -213,7 +213,7 @@ function PartnerSignIn() {
<meta name="description" content="Liste des articles sur les formations" />
<meta name="robots" content="index,follow" />
</Helmet>
<Header />
<div className="div_mobile">
<h1 className="text_welcome"> Première connexion à Mysy Training Pro </h1>
@ -236,28 +236,7 @@ function PartnerSignIn() {
</div>
{/* <div className="div_droite">
<nav className="connect"> Connexion Partenaire </nav>
<hr />
<FormGroup>
<Label>Email</Label>
<Input type="email" placeholder="Email" name="email_partner" />
</FormGroup>
<FormGroup>
<Label>Password</Label>
<Input type="password" placeholder="Password" name="pwd_partner" />
</FormGroup>
<div className="div_row22">
<Button variant="contained" color="success" className="div_row22 btn_login button" onClick={onSubmit}>Connectez-Vous</Button>
</div>
</div>*/}
{isconnected === "false" && <div className="erreurconnexion">
<br />
Erreur Connexion</div>
@ -265,9 +244,7 @@ function PartnerSignIn() {
</div>
</div>
<div className="pieddepage">
<Footer />
</div>
</div>
</div>

View File

@ -229,7 +229,7 @@ function PartnerSignIn() {
<meta name="description" content="Liste des articles sur les formations" />
<meta name="robots" content="index,follow" />
</Helmet>
<Header />
<div className="div_mobile">
<h1 className="text_welcome"> Première connexion à Mysy Training Pro </h1>
@ -291,9 +291,7 @@ function PartnerSignIn() {
</div>
</div>
<div className="pieddepage">
<Footer />
</div>
</div>
</div>

View File

@ -1,23 +1,12 @@
import React, { useState, useEffect } from "react";
import New_C_Sign_In_2025 from "../components/New_C_Sign_In_2025";
import New_C_Header_2025 from "../components/New_C_Header_2025";
import New_C_Footer_2025 from "../components/New_C_Footer_2025";
import New_C_Footer_2025_V2 from "../components/footer_automatic_files/Layout";
import New_C_Header_2025_V2 from "../components/header_automatic_files/Header";
import New_C_Tatif_Section from "../components/tarif_section_automatic_files/PricingSection";
import New_C_Detail_Formation_Automatic_Files from "../components/detail_formation_automatic_files/new_detail_formation_2025"
import New_C_Article_Detail_2025 from "../components/New_C_Article_Detail_2025";
import New_Navigation_2025 from "../components/New_Navigation_2025";
import New_C_Tarif_Section_Head from "../components/tarif_head_automatic_files/PricingLayout"
import New_C_Contact_2025 from "../components/contact_automatic_files/Contact_Layout";
import New_C_Marketplace_2025 from "../components/marketplace_automatic_files/new_marketplace_2025";
const new_p_detail_formation_2025 = () => {

View File

@ -1,5 +1,5 @@
import Partner from "../components/Partner";
import New_Navigation_2025 from "../components/New_Navigation_2025";
import New_C_Footer_2025_V2 from "../components/footer_automatic_files/Layout";
import New_C_Header_2025_V2 from "../components/header_automatic_files/Header";
import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony";
@ -8,9 +8,7 @@ const recherche_draft = () => {
return (
<div>
<New_C_Header_2025_V2 />
<Partner />
<New_C_Footer_Without_Testimony_2025_V2 />

View File

@ -1,16 +1,15 @@
import PartnerSignIn from "../components/PartnerSignIn";
import Navigation from "../components/Navigation";
import New_C_Header_2025_V2 from "../components/header_automatic_files/Header";
import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony";
export default function Login() {
return (
<div>
<Navigation />
<div>
<New_C_Header_2025_V2 />
<PartnerSignIn />
</div>
<New_C_Footer_Without_Testimony_2025_V2 />
</div>
);
}

View File

@ -1,16 +1,15 @@
import PartnerSignInFirst from "../components/PartnerSignInFirst";
import Navigation from "../components/Navigation";
import New_C_Header_2025_V2 from "../components/header_automatic_files/Header";
import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony";
export default function Login() {
return (
<div>
<Navigation />
<div>
<PartnerSignInFirst />
</div>
<New_C_Header_2025_V2 />
<PartnerSignInFirst />
<New_C_Footer_Without_Testimony_2025_V2 />
</div>
);
}

View File

@ -1,16 +1,15 @@
import PartnerSignnSecond from "../components/PartnerSignInSecond";
import Navigation from "../components/Navigation";
import New_C_Header_2025_V2 from "../components/header_automatic_files/Header";
import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony";
export default function Login() {
return (
<div>
<Navigation />
<div>
<PartnerSignnSecond />
</div>
<New_C_Header_2025_V2 />
<PartnerSignnSecond />
<New_C_Footer_Without_Testimony_2025_V2 />
</div>
);
}