diff --git a/src/components/ButtonHilight.js b/src/components/ButtonHilight.js
index b13cb2f..8e4221b 100644
--- a/src/components/ButtonHilight.js
+++ b/src/components/ButtonHilight.js
@@ -23,6 +23,8 @@ import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from '@mui/material/DialogTitle';
import { format } from 'date-fns'
import moment from "moment";
+import SendIcon from '@mui/icons-material/Send';
+import axios from "axios";
const ButtonHilight = () => {
const history = useHistory();
@@ -31,6 +33,17 @@ const ButtonHilight = () => {
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']);
const [partcookie, setpartCookie, removepartCookie] = useCookies(['tokenmysypart']);
+ const [country_code, setcountry_code] = useState("FR");
+ const [country_name, setcountry_name] = useState("France");
+ const [city, setcity] = useState("Paris");
+ const [postal, setpostal] = useState("75001");
+ const [latitude, setlatitude] = useState("48.861000061035156");
+ const [longitude, setlongitude] = useState("2.3380000591278076");
+ const [IPv4, setIPv4] = useState("172.71.122.128");
+ const [state, setstate] = useState("France");
+ const [userIp, setuserIp] = useState("172.71.122.128");
+
+
const controlNavbar = () => {
if (typeof window !== 'undefined') {
@@ -310,9 +323,255 @@ const ButtonHilight = () => {
};
+ const [Dialog_contact_message, setDialog_contact_message] = React.useState(false);
+ const [Dialog_contact_open, setDialog_contact_open] = React.useState(false);
+ function Dialog_contact_handle_change_participant_session(message) {
+ setDialog_contact_message(message);
+ setDialog_contact_open(true);
+ }
+
+ const Dialog_contact_handleClose = () => {
+
+ };
+
+ const Dialog_contact_handleClose_buton = () => {
+
+ setDialog_contact_open(false);
+ clear_contact_message_fields();
+
+ };
+
+ function clear_contact_message_fields() {
+ setcontact_message_nom_prenom("");
+ setcontact_message_email("");
+ setcontact_message_phone("");
+ setcontact_message_sujet("");
+ setcontact_message_sujet("");
+ setcontact_message_message("");
+ }
+
+ const [contact_message_nom_prenom, setcontact_message_nom_prenom] = React.useState("");
+ const [contact_message_email, setcontact_message_email] = React.useState("");
+ const [contact_message_phone, setcontact_message_phone] = React.useState("");
+ const [contact_message_sujet, setcontact_message_sujet] = React.useState("");
+ const [contact_message_message, setcontact_message_message] = React.useState("");
+
+ function Send_Contact_Message(e) {
+
+ var sender_mail = "";
+ var sender_tel = "";
+ var token = "";
+
+ ////console.log("contacter " + sender_mail + " - " + sender_tel + " - ")
+
+ var mysubject = contact_message_sujet;
+ var mymessage = contact_message_message;
+ var mysender_name = contact_message_nom_prenom;
+ var mysender_email = contact_message_email;
+
+
+ //alert("contacter "+mysender_email+" - "+mymessage+" - url = "
+ //+process.env.REACT_APP_API_URL+" - user_ip ="+IPv4+" - "+latitude);
+
+ var re = /\S+@\S+\.\S+/;
+ if (re.test(mysender_email) == false) {
+ alert("l'email est incorrecte");
+ return;
+ }
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/add_user_message/";
+ var form = new FormData();
+ form.append("type", "email");
+ form.append("recever_mail", "contact@mysy-training.com");
+ form.append("recever_tel", "+33769203945");
+ form.append("sender_mail", mysender_email);
+ form.append("sender_tel", sender_tel);
+ form.append("object", mysubject);
+ form.append("message", mymessage);
+ form.append("sender_name", mysender_name);
+ form.append("token", "");
+ form.append("user_ip", IPv4);
+ form.append("user_country_code", country_code);
+ form.append("user_country_name", country_name);
+ form.append("user_city", city);
+ form.append("user_postal", postal);
+ form.append("user_latitude", latitude);
+ form.append("user_longitude", longitude);
+ form.append("user_state", state);
+
+
+ // console.log("## form = ", form);
+
+
+
+ axios.post(myurl, form).then(res => {
+
+ if (String(res.data.status) === String("false")) {
+
+ alert(res.data.message);
+ }
+
+ else if (String(res.data.status) === String("true")) {
+ Dialog_contact_handleClose_buton();
+ alert(res.data.message);
+
+ }
+ else {
+
+ }
+ }).catch((error) => {
+ console.warn('contact-nous Not good man :( mysearchtext = ');
+
+
+ })
+
+
+ }
+
+
return (
+ {/*** GESTION Contact */}
+
+ {/*** FIN GESTION Contact */}
+
}
+ { {
+ // console.log(" oooooo ")
+ e.preventDefault();
+ var date2 = new Date();
+ const format2 = "YYYY-MM";
+ var dateTime2 = moment(date2).format(format2);
+ window.open(
+ "https://calendly.com/mysytraining/demo-mysy-training-solution?month=" + String(dateTime2),
+ '_blank'
+ );
+ }}
+ style={{ "background": "#53B7EB", "borderRadius": "5px", "paddingLeft": "3px", "paddingRight": "3px" }}>
+ Une Demo ?
+
}
+
+ {
+ setDialog_contact_open(true);
+ }}>
+ Contact
+
+
Nos Services
@@ -480,20 +760,7 @@ const ButtonHilight = () => {
Qui Sommes nous ?
- { {
- // console.log(" oooooo ")
- e.preventDefault();
- var date2 = new Date();
- const format2 = "YYYY-MM";
- var dateTime2 = moment(date2).format(format2);
- window.open(
- "https://calendly.com/mysytraining/demo-mysy-training-solution?month=" + String(dateTime2),
- '_blank'
- );
- }}
- style={{ "background": "#53B7EB", "borderRadius": "5px", "paddingLeft": "3px", "paddingRight": "3px" }}>
- Resa. Demo ?
-
}
+
diff --git a/src/components/ComponentProduitsServices.js b/src/components/ComponentProduitsServices.js
index b45201c..84c01eb 100644
--- a/src/components/ComponentProduitsServices.js
+++ b/src/components/ComponentProduitsServices.js
@@ -36,7 +36,7 @@ function ProduitsServices() {
setperiode("Mensuel");
}
}
-
+
function Clik_bton_mensuel(e) {
document.getElementsByName("bton_mensuel")[0].style.backgroundColor = "#81BC3A";
diff --git a/src/components/Contactez_nous.js b/src/components/Contactez_nous.js
index ce43078..9c0bd2a 100644
--- a/src/components/Contactez_nous.js
+++ b/src/components/Contactez_nous.js
@@ -42,7 +42,6 @@ const ContactForm = () => {
const onSubmit = async (data) => {
const { name, email, subject, message } = data;
-
SendMail();
};
@@ -310,6 +309,7 @@ const ContactForm = () => {
+
diff --git a/src/components/Recherche_new_v2.js b/src/components/Recherche_new_v2.js
index 286e2cd..4f387df 100644
--- a/src/components/Recherche_new_v2.js
+++ b/src/components/Recherche_new_v2.js
@@ -5,8 +5,9 @@ import Formation from "./Formation";
import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa';
import { BsFillXCircleFill } from "react-icons/bs";
-
-
+import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from "react-share";
+import { SocialIcon } from 'react-social-icons';
+import SendIcon from '@mui/icons-material/Send';
import Pagination from "./TestPagination";
import data from "./data/mock-data.json";
@@ -2617,10 +2618,10 @@ const Recherche_new_v2 = () => {
form.append("email", email);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_Email_To_Newsletter/";
- // setLoading(true);
+ // setLoading(true);
axios.post(myurl, form).then(res => {
- // setLoading(false);
+ // setLoading(false);
//console.log(" In Update_Email_Newsletter res.data.status = " + res.data.status);
//console.log(" In Update_Email_Newsletter res.data.message r_class = " + res.data.message);
@@ -2637,7 +2638,7 @@ const Recherche_new_v2 = () => {
}
}).catch((error) => {
- // setLoading(false);
+ // setLoading(false);
console.warn('UpdateStagiaireData : Not good man :( Update_Email_Newsletter = ' + error);
setUpdate_Email_Newsletter_api("false");
alert(" Impossible d'inscrire l'adresse email à la newsletter ");
@@ -2646,6 +2647,111 @@ const Recherche_new_v2 = () => {
}
+ const [Dialog_contact_message, setDialog_contact_message] = React.useState(false);
+ const [Dialog_contact_open, setDialog_contact_open] = React.useState(false);
+ function Dialog_contact_handle_change_participant_session(message) {
+ setDialog_contact_message(message);
+ setDialog_contact_open(true);
+ }
+
+ const Dialog_contact_handleClose = () => {
+
+ };
+
+ const Dialog_contact_handleClose_buton = () => {
+
+ setDialog_contact_open(false);
+ clear_contact_message_fields();
+
+ };
+
+ const [contact_message_nom_prenom, setcontact_message_nom_prenom] = React.useState("");
+ const [contact_message_email, setcontact_message_email] = React.useState("");
+ const [contact_message_phone, setcontact_message_phone] = React.useState("");
+ const [contact_message_sujet, setcontact_message_sujet] = React.useState("");
+ const [contact_message_message, setcontact_message_message] = React.useState("");
+
+ function clear_contact_message_fields() {
+ setcontact_message_nom_prenom("");
+ setcontact_message_email("");
+ setcontact_message_phone("");
+ setcontact_message_sujet("");
+ setcontact_message_sujet("");
+ setcontact_message_message("");
+ }
+
+ function Send_Contact_Message(e) {
+
+ var sender_mail = "";
+ var sender_tel = "";
+ var token = "";
+
+ ////console.log("contacter " + sender_mail + " - " + sender_tel + " - ")
+
+ var mysubject = contact_message_sujet;
+ var mymessage = contact_message_message;
+ var mysender_name = contact_message_nom_prenom;
+ var mysender_email = contact_message_email;
+
+
+ //alert("contacter "+mysender_email+" - "+mymessage+" - url = "
+ //+process.env.REACT_APP_API_URL+" - user_ip ="+IPv4+" - "+latitude);
+
+ var re = /\S+@\S+\.\S+/;
+ if (re.test(mysender_email) == false) {
+ alert("l'email est incorrecte");
+ return;
+ }
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/add_user_message/";
+ var form = new FormData();
+ form.append("type", "email");
+ form.append("recever_mail", "contact@mysy-training.com");
+ form.append("recever_tel", "+33769203945");
+ form.append("sender_mail", mysender_email);
+ form.append("sender_tel", sender_tel);
+ form.append("object", mysubject);
+ form.append("message", mymessage);
+ form.append("sender_name", mysender_name);
+ form.append("token", "");
+ form.append("user_ip", IPv4);
+ form.append("user_country_code", country_code);
+ form.append("user_country_name", country_name);
+ form.append("user_city", city);
+ form.append("user_postal", postal);
+ form.append("user_latitude", latitude);
+ form.append("user_longitude", longitude);
+ form.append("user_state", state);
+
+
+ // console.log("## form = ", form);
+
+
+
+ axios.post(myurl, form).then(res => {
+
+ if (String(res.data.status) === String("false")) {
+
+ alert(res.data.message);
+ }
+
+ else if (String(res.data.status) === String("true")) {
+ Dialog_contact_handleClose_buton();
+ alert(res.data.message);
+
+ }
+ else {
+
+ }
+ }).catch((error) => {
+ console.warn('contact-nous Not good man :( mysearchtext = ');
+
+
+ })
+
+
+ }
+
return (
@@ -2653,6 +2759,146 @@ const Recherche_new_v2 = () => {
+ {/*** GESTION Contact */}
+
+ {/*** FIN GESTION Contact */}
+