From 93df6220bb824581c9abfefe61b7f687be724cc1 Mon Sep 17 00:00:00 2001 From: cherif Date: Mon, 11 Mar 2024 14:56:58 +0100 Subject: [PATCH] 11/03/2024 - 15h --- src/components/ButtonHilight.js | 78 +++++++++++++++++++++++++++--- src/components/Employes.js | 44 +++++++++-------- src/components/Header.js | 60 +++++++++++++++++++++-- src/components/Recherche_new_v2.js | 62 ++++++++++++++++++++++-- src/styles/components/_header.scss | 37 ++++++++++++-- 5 files changed, 240 insertions(+), 41 deletions(-) diff --git a/src/components/ButtonHilight.js b/src/components/ButtonHilight.js index 7cfbde7..6bd6348 100644 --- a/src/components/ButtonHilight.js +++ b/src/components/ButtonHilight.js @@ -16,7 +16,11 @@ import connect_white from "../mysy_img/connect_white_v2.png"; import MenuItem from "@material-ui/core/MenuItem"; import Menu from "@material-ui/core/Menu"; import connect_green from "../mysy_img/connect_green.png"; - +import Dialog from '@mui/material/Dialog'; +import DialogActions from '@mui/material/DialogActions'; +import DialogContent from '@mui/material/DialogContent'; +import DialogContentText from '@mui/material/DialogContentText'; +import DialogTitle from '@mui/material/DialogTitle'; const ButtonHilight = () => { const history = useHistory(); @@ -43,10 +47,16 @@ const ButtonHilight = () => { const [userconnected, setuserconnected] = useState("0"); const [someoneconnected, setsomeoneconnected] = useState("0"); const [partnerconnected, setpartnerconnected] = useState("0"); - const stored_user = getCookie('tokenmysych'); - const stored_part = getCookie('tokenmysypart'); + var stored_user = getCookie('tokenmysych'); + var stored_part = getCookie('tokenmysypart'); function whosisconnected() { + + stored_user = getCookie('tokenmysych'); + stored_part = getCookie('tokenmysypart'); + + + var local_user_connect = 0; var local_part_connect = 0; @@ -61,7 +71,9 @@ const ButtonHilight = () => { } if (typeof (stored_part) === "undefined" || String(stored_part) === '') { + setpartnerconnected("0"); + setsomeoneconnected("0"); local_part_connect = 0; } else { setpartnerconnected("1"); @@ -72,6 +84,7 @@ const ButtonHilight = () => { } useEffect(() => { + whosisconnected(); @@ -126,7 +139,7 @@ const ButtonHilight = () => { }; - + const handleClose_Account = () => { alert(" my account"); @@ -205,13 +218,16 @@ const ButtonHilight = () => { setpartCookie(acces_right_token_name, "", { path: '/' }); removeCookie(acces_right_token_name, { path: '/' }); } + + setsomeoneconnected('0'); + setDialog_1_open(false); history.push("/recherche-formation"); } function part_logout() { confirmAlert({ title: '', - message: 'Confirmez la deconnexion (pro bb)', + message: 'Confirmez la deconnexion (pro)', buttons: [ { label: 'Oui', @@ -226,7 +242,6 @@ const ButtonHilight = () => { } function handleAccountLogout() { - if (String(userconnected) === String("1")) { user_logout(); } @@ -270,8 +285,55 @@ const ButtonHilight = () => { }; + + const [Dialog_1_message, setDialog_1_message] = React.useState(false); + const [Dialog_1_open, setDialog_1_open] = React.useState(false); + function Dialog_1_handle_change_participant_session(message) { + setDialog_1_message(message); + setDialog_1_open(true); + } + + const Dialog_1_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_1_handleClose_buton = () => { + setDialog_1_open(false); + }; + + return (
+ + + + + MySy Information + + + Confirmez la deconnexion + + + + + +
+
+ +
+
+ +
+
+ +
+
+ Compte utilisateur @@ -380,12 +442,12 @@ const ButtonHilight = () => {

Recherche Formations Tutoriels

-
+
{String(someoneconnected) !== String("1") && } - {String(someoneconnected) === String("1") && }
diff --git a/src/components/Employes.js b/src/components/Employes.js index 1612d10..afb0ed5 100644 --- a/src/components/Employes.js +++ b/src/components/Employes.js @@ -962,29 +962,29 @@ const Employes = (props) => { - const [p_detail_nom, setp_detail_nom] = useState(); - const [p_detail_prenom, setp_detail_prenom] = useState(); - const [p_detail_mail, setp_detail_mail] = useState(); + const [p_detail_nom, setp_detail_nom] = useState(""); + const [p_detail_prenom, setp_detail_prenom] = useState(""); + const [p_detail_mail, setp_detail_mail] = useState(""); const [p_detail_naissance, setp_detail_naissance] = useState(new Date().toLocaleDateString('fr-FR')); - const [p_detail_tel, setp_detail_tel] = useState(); - const [p_detail_adresse, setp_detail_adresse] = useState(); - const [p_detail_code_postal, setp_detail_code_postal] = useState(); - const [p_detail_ville, setp_detail_ville] = useState(); + const [p_detail_tel, setp_detail_tel] = useState(""); + const [p_detail_adresse, setp_detail_adresse] = useState(""); + const [p_detail_code_postal, setp_detail_code_postal] = useState(""); + const [p_detail_ville, setp_detail_ville] = useState(""); const [p_detail_resp_hierarchie_id, setp_detail_resp_hierarchie_id] = useState(""); - const [p_detail_civilite, setp_detail_civilite] = useState(); + const [p_detail_civilite, setp_detail_civilite] = useState(""); const [p_detail_civilite_label, setp_detail_civilite_label] = useState(); - const [p_detail_fonction, setp_detail_fonction] = useState(); + const [p_detail_fonction, setp_detail_fonction] = useState(""); const [p_detail_profil, setp_detail_profil] = useState(""); - const [p_detail_pays, setp_detail_pays] = useState(); - const [p_detail_tel_mobile, setp_detail_tel_mobile] = useState(); - const [p_detail_linkedIn, setp_detail_linkedIn] = useState(); - const [p_detail_facebook, setp_detail_facebook] = useState(); - const [p_detail_twitter, setp_detail_twitter] = useState(); + const [p_detail_pays, setp_detail_pays] = useState(""); + const [p_detail_tel_mobile, setp_detail_tel_mobile] = useState(""); + const [p_detail_linkedIn, setp_detail_linkedIn] = useState(""); + const [p_detail_facebook, setp_detail_facebook] = useState(""); + const [p_detail_twitter, setp_detail_twitter] = useState(""); const [p_detail_ismanager, setp_detail_ismanager] = useState("0"); - const [p_detail_ismanager_label, setp_detail_ismanager_label] = useState(); + const [p_detail_ismanager_label, setp_detail_ismanager_label] = useState(""); const [p_detail_resp_hierarchie_nom, setp_detail_resp_hierarchie_nom] = useState(""); const [p_detail_resp_hierarchie_prenom, setp_detail_resp_hierarchie_prenom] = useState(""); @@ -2329,7 +2329,7 @@ const Employes = (props) => { if (new_data2.length > 0) { setNew_Get_List_Managers_result(new_data2); - console.log(" ### new_data2 = ", new_data2) + } } @@ -6059,7 +6059,7 @@ const Employes = (props) => {
{String(employee_data_edit_mode) !== "1" &&
Civilité
- 0 && { }} disabled={false} className="disabled_style" - value={p_detail_civilite} + value={String(p_detail_civilite)[0].toUpperCase() + String(p_detail_civilite).slice(1)} - /> + />} + +
} {String(employee_data_edit_mode) === "1" &&
Civilité
{ const history = useHistory(); @@ -148,6 +154,8 @@ const Header = () => { } + setsomeoneconnected("0"); + setDialog_1_open(false); history.push("/recherche-formation"); } @@ -236,9 +244,53 @@ const Header = () => { history.push("/QuiSommesNous") }; + const [Dialog_1_message, setDialog_1_message] = React.useState(false); + const [Dialog_1_open, setDialog_1_open] = React.useState(false); + function Dialog_1_handle_change_participant_session(message) { + setDialog_1_message(message); + setDialog_1_open(true); + } + + const Dialog_1_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_1_handleClose_buton = () => { + setDialog_1_open(false); + }; + return (
+ + + + MySy Information + + + Confirmez la deconnexion + + + + + +
+
+ +
+
+ +
+
+ +
+
+ {

Connexion MySy Training Technogy

-
+
{String(someoneconnected) !== String("1") && } - {String(someoneconnected) === String("1") && }
@@ -370,9 +422,9 @@ const Header = () => { Nos Services
-
+
Qui Sommes nous? -
+
{/*
diff --git a/src/components/Recherche_new_v2.js b/src/components/Recherche_new_v2.js index 5d86c92..8e1d6b9 100644 --- a/src/components/Recherche_new_v2.js +++ b/src/components/Recherche_new_v2.js @@ -47,6 +47,11 @@ import mysy_search from "../mysy_img2/mysy_search.jpg"; import mysy_lms from "../mysy_img2/mysy_e_learning.jpg"; import mysy_consulting from "../mysy_img2/mysy_consulting.jpg"; import mysy_datacenter from "../mysy_img2/mysy_datacenter.png"; +import Dialog from '@mui/material/Dialog'; +import DialogActions from '@mui/material/DialogActions'; +import DialogContent from '@mui/material/DialogContent'; +import DialogContentText from '@mui/material/DialogContentText'; +import DialogTitle from '@mui/material/DialogTitle'; @@ -2083,6 +2088,8 @@ const Recherche_new_v2 = () => { removeCookie(acces_right_token_name, { path: '/' }); } + setsomeoneconnected("0"); + setDialog_1_open(false); history.push("/recherche-formation"); } @@ -2546,11 +2553,56 @@ const Recherche_new_v2 = () => { } + const [Dialog_1_message, setDialog_1_message] = React.useState(false); + const [Dialog_1_open, setDialog_1_open] = React.useState(false); + function Dialog_1_handle_change_participant_session(message) { + setDialog_1_message(message); + setDialog_1_open(true); + } + + const Dialog_1_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_1_handleClose_buton = () => { + setDialog_1_open(false); + }; + return (
+ + + + + MySy Information + + + Confirmez la deconnexion + + + + + +
+
+ +
+
+ +
+
+ +
+
+ Formation & Tutoriel Gratuit ou payant Excellente qualité @@ -2569,8 +2621,8 @@ const Recherche_new_v2 = () => { > Mon Compte - Deconnexion + setDialog_1_open(true)} className="mymenu_item" + >Deconnexion
@@ -2590,7 +2642,7 @@ const Recherche_new_v2 = () => { S'inscrire Deconnexion + >Deconnexion { - {/* + {/* */} @@ -2832,7 +2884,7 @@ const Recherche_new_v2 = () => { {String(someoneconnected) !== String("1") && } - {String(someoneconnected) === String("1") &&