diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 216207a..0c420ad 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -53,7 +53,7 @@ import { gridClasses } from '@mui/x-data-grid'; import Link from '@mui/material/Link'; import { PiDotsThree } from "react-icons/pi"; import Module_Editique from "./Module_Editique"; - +import Module_Attestation_Formation from "./Module_Attestation_Formation"; const DisplayPartnerSession = (props) => { const history = useHistory(); @@ -1636,6 +1636,12 @@ const DisplayPartnerSession = (props) => { document.getElementById("detail_session").style.fontWeight = "normal"; } + if (document.getElementById("attestation")) { + document.getElementById("attestation").style.backgroundColor = "#d8edfc"; + document.getElementById("attestation").style.color = "black"; + document.getElementById("attestation").style.fontWeight = "black"; + } + if (document.getElementById("inscrit")) { document.getElementById("inscrit").style.backgroundColor = "#d8edfc"; document.getElementById("inscrit").style.color = "black"; @@ -1706,6 +1712,12 @@ const DisplayPartnerSession = (props) => { document.getElementById("evaluation").style.fontWeight = "normal"; } + if (document.getElementById("attestation")) { + document.getElementById("attestation").style.backgroundColor = "#d8edfc"; + document.getElementById("attestation").style.color = "black"; + document.getElementById("attestation").style.fontWeight = "black"; + } + } async function submenu_detail_session() { @@ -1722,6 +1734,12 @@ const DisplayPartnerSession = (props) => { document.getElementById("detail_session").style.fontWeight = "bold"; } + + if (document.getElementById("attestation")) { + document.getElementById("attestation").style.backgroundColor = "#d8edfc"; + document.getElementById("attestation").style.color = "black"; + document.getElementById("attestation").style.fontWeight = "black"; + } if (document.getElementById("editique")) { document.getElementById("editique").style.backgroundColor = "#d8edfc"; document.getElementById("editique").style.color = "black"; @@ -1785,6 +1803,12 @@ const DisplayPartnerSession = (props) => { document.getElementById("editique").style.fontWeight = "normal"; } + if (document.getElementById("attestation")) { + document.getElementById("attestation").style.backgroundColor = "#d8edfc"; + document.getElementById("attestation").style.color = "black"; + document.getElementById("attestation").style.fontWeight = "black"; + } + if (document.getElementById("detail_session")) { document.getElementById("detail_session").style.backgroundColor = "#d8edfc"; document.getElementById("detail_session").style.color = "black"; @@ -1882,6 +1906,12 @@ const DisplayPartnerSession = (props) => { document.getElementById("historique").style.fontWeight = "normal"; } + if (document.getElementById("attestation")) { + document.getElementById("attestation").style.backgroundColor = "#d8edfc"; + document.getElementById("attestation").style.color = "black"; + document.getElementById("attestation").style.fontWeight = "black"; + } + } async function submenu_historique() { @@ -1899,6 +1929,12 @@ const DisplayPartnerSession = (props) => { document.getElementById("historique").style.fontWeight = "bold"; } + if (document.getElementById("attestation")) { + document.getElementById("attestation").style.backgroundColor = "#d8edfc"; + document.getElementById("attestation").style.color = "black"; + document.getElementById("attestation").style.fontWeight = "black"; + } + if (document.getElementById("evaluation")) { document.getElementById("evaluation").style.backgroundColor = "#d8edfc"; document.getElementById("evaluation").style.color = "black"; @@ -1967,6 +2003,12 @@ const DisplayPartnerSession = (props) => { document.getElementById("inscrit").style.fontWeight = "normal"; } + if (document.getElementById("attestation")) { + document.getElementById("attestation").style.backgroundColor = "#d8edfc"; + document.getElementById("attestation").style.color = "black"; + document.getElementById("attestation").style.fontWeight = "black"; + } + if (document.getElementById("evaluation")) { document.getElementById("evaluation").style.backgroundColor = "#d8edfc"; document.getElementById("evaluation").style.color = "black"; @@ -2022,7 +2064,13 @@ const DisplayPartnerSession = (props) => { if (document.getElementById("emargement")) { document.getElementById("emargement").style.backgroundColor = "#d8edfc"; document.getElementById("emargement").style.color = "black"; - document.getElementById("emargement").style.fontWeight = "normal"; + document.getElementById("emargement").style.fontWeight = "black"; + } + + if (document.getElementById("attestation")) { + document.getElementById("attestation").style.backgroundColor = "#d8edfc"; + document.getElementById("attestation").style.color = "black"; + document.getElementById("attestation").style.fontWeight = "black"; } if (document.getElementById("editique")) { @@ -2068,6 +2116,75 @@ const DisplayPartnerSession = (props) => { } + async function submenu_attestation() { + setsubmenu("attestation"); + + //await sleep(5); + if (!edit_session_form) { + desableSessionFields(); + } + + if (document.getElementById("attestation")) { + document.getElementById("attestation").style.backgroundColor = "#104277"; + document.getElementById("attestation").style.color = "white"; + document.getElementById("attestation").style.fontWeight = "bold"; + } + + if (document.getElementById("evaluation")) { + document.getElementById("evaluation").style.backgroundColor = "#d8edfc"; + document.getElementById("evaluation").style.color = "black"; + document.getElementById("evaluation").style.fontWeight = "normal"; + } + + + if (document.getElementById("emargement")) { + document.getElementById("emargement").style.backgroundColor = "#d8edfc"; + document.getElementById("emargement").style.color = "black"; + document.getElementById("emargement").style.fontWeight = "normal"; + } + + if (document.getElementById("editique")) { + document.getElementById("editique").style.backgroundColor = "#d8edfc"; + document.getElementById("editique").style.color = "black"; + document.getElementById("editique").style.fontWeight = "normal"; + } + + if (document.getElementById("sequence_session")) { + document.getElementById("sequence_session").style.backgroundColor = "#d8edfc"; + document.getElementById("sequence_session").style.color = "black"; + document.getElementById("sequence_session").style.fontWeight = "normal"; + } + + + if (document.getElementById("detail_session")) { + document.getElementById("detail_session").style.backgroundColor = "#d8edfc"; + document.getElementById("detail_session").style.color = "black"; + document.getElementById("detail_session").style.fontWeight = "normal"; + } + + if (document.getElementById("inscrit")) { + document.getElementById("inscrit").style.backgroundColor = "#d8edfc"; + document.getElementById("inscrit").style.color = "black"; + document.getElementById("inscrit").style.fontWeight = "normal"; + } + + if (document.getElementById("preinscrit")) { + document.getElementById("preinscrit").style.backgroundColor = "#d8edfc"; + document.getElementById("preinscrit").style.color = "black"; + document.getElementById("preinscrit").style.fontWeight = "normal"; + } + + + if (document.getElementById("historique")) { + document.getElementById("historique").style.backgroundColor = "#d8edfc"; + document.getElementById("historique").style.color = "black"; + document.getElementById("historique").style.fontWeight = "normal"; + } + + GetListeEvaluation(selected_session_id); + + } + function handleClickSessionManagement(event, cellValues) { var code_session = cellValues.row.code_session; setselected_code_session(cellValues.row.code_session); @@ -10509,7 +10626,8 @@ const DisplayPartnerSession = (props) => { - + + } @@ -15357,6 +15475,13 @@ const DisplayPartnerSession = (props) => { } + {String(submenu) === String("attestation") &&