From 567bfaaf1a5a17ff7fa0827956391d3f741c6d69 Mon Sep 17 00:00:00 2001 From: cherif Date: Sat, 20 Apr 2024 20:44:34 +0200 Subject: [PATCH] 20/04/2024 - 20h44 --- package-lock.json | 11 + package.json | 1 + src/App.js | 3 +- src/components/DisplayPartnerSession.js | 744 +---- src/components/DisplayPartnerStagiaires.js | 2 - src/components/SurveyDocument.js | 32 +- src/components/UpdateAttendeeList.js | 733 +++++ src/pages/updateattendeelist.js | 17 + .../components/_updateattendeelist.scss | 2818 +++++++++++++++++ src/styles/index.scss | 1 + 10 files changed, 3600 insertions(+), 762 deletions(-) create mode 100644 src/components/UpdateAttendeeList.js create mode 100644 src/pages/updateattendeelist.js create mode 100644 src/styles/components/_updateattendeelist.scss diff --git a/package-lock.json b/package-lock.json index d5b1b3a..bf84c21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,6 +53,7 @@ "compression": "^1.7.4", "date-fns": "^2.29.2", "dayjs": "^1.11.5", + "deep-object-diff": "^1.1.9", "downloadjs": "^1.4.7", "draft-js": "^0.11.7", "file-saver": "^2.0.5", @@ -12032,6 +12033,11 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, + "node_modules/deep-object-diff": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/deep-object-diff/-/deep-object-diff-1.1.9.tgz", + "integrity": "sha512-Rn+RuwkmkDwCi2/oXOFS9Gsr5lJZu/yTGpK7wAaAIE75CC+LCGEZHpY6VQJa/RoJcrmaA/docWJZvYohlNkWPA==" + }, "node_modules/deepmerge": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", @@ -42452,6 +42458,11 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, + "deep-object-diff": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/deep-object-diff/-/deep-object-diff-1.1.9.tgz", + "integrity": "sha512-Rn+RuwkmkDwCi2/oXOFS9Gsr5lJZu/yTGpK7wAaAIE75CC+LCGEZHpY6VQJa/RoJcrmaA/docWJZvYohlNkWPA==" + }, "deepmerge": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", diff --git a/package.json b/package.json index 3d795c5..4171210 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "compression": "^1.7.4", "date-fns": "^2.29.2", "dayjs": "^1.11.5", + "deep-object-diff": "^1.1.9", "downloadjs": "^1.4.7", "draft-js": "^0.11.7", "file-saver": "^2.0.5", diff --git a/src/App.js b/src/App.js index d796ba4..0812ff2 100644 --- a/src/App.js +++ b/src/App.js @@ -48,7 +48,7 @@ import Test_Drag_Drop2 from "./pages/test_dnd"; import ESign from "./pages/eSigne"; import ESignDiplayDignedDocument from "./pages/edigndiplaydigneddocument"; import SurveyDocument from "./pages/surveydocument"; - +import UpdateAttendeeList from "./pages/updateattendeelist"; function App() { @@ -125,6 +125,7 @@ function App() { + diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 67f4c79..3b18c1f 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -1955,56 +1955,7 @@ const DisplayPartnerSession = (props) => { submenu_color_management("preinscrit"); - /* - - if (document.getElementById("preinscrit")) { - document.getElementById("preinscrit").style.backgroundColor = "#104277"; - document.getElementById("preinscrit").style.color = "white"; - document.getElementById("preinscrit").style.fontWeight = "bold"; - } - - 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("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("attestation")) { - document.getElementById("attestation").style.backgroundColor = "#d8edfc"; - document.getElementById("attestation").style.color = "black"; - document.getElementById("attestation").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("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("evaluation")) { - document.getElementById("evaluation").style.backgroundColor = "#d8edfc"; - document.getElementById("evaluation").style.color = "black"; - document.getElementById("evaluation").style.fontWeight = "normal"; - } - - if (document.getElementById("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc"; - document.getElementById("piece_jointe").style.color = "black"; - document.getElementById("piece_jointe").style.fontWeight = "normal"; - } - */ + } function submenu_inscrit() { @@ -2014,67 +1965,7 @@ const DisplayPartnerSession = (props) => { submenu_color_management("inscrit"); - /* - if (document.getElementById("inscrit")) { - document.getElementById("inscrit").style.backgroundColor = "#104277"; - document.getElementById("inscrit").style.color = "white"; - document.getElementById("inscrit").style.fontWeight = "bold"; - } - - 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("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("preinscrit")) { - document.getElementById("preinscrit").style.backgroundColor = "#d8edfc"; - document.getElementById("preinscrit").style.color = "black"; - document.getElementById("preinscrit").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("historique")) { - document.getElementById("historique").style.backgroundColor = "#d8edfc"; - document.getElementById("historique").style.color = "black"; - document.getElementById("historique").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("evaluation")) { - document.getElementById("evaluation").style.backgroundColor = "#d8edfc"; - document.getElementById("evaluation").style.color = "black"; - 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 = "normal"; - } - - if (document.getElementById("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc"; - document.getElementById("piece_jointe").style.color = "black"; - document.getElementById("piece_jointe").style.fontWeight = "normal"; - } - */ + } @@ -2090,73 +1981,7 @@ const DisplayPartnerSession = (props) => { desableSessionFields(); } - /* - //await sleep(5); - if (!edit_session_form) { - desableSessionFields(); - } - - if (document.getElementById("detail_session")) { - document.getElementById("detail_session").style.backgroundColor = "#104277"; - document.getElementById("detail_session").style.color = "white"; - 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 = "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("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("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("historique")) { - document.getElementById("historique").style.backgroundColor = "#d8edfc"; - document.getElementById("historique").style.color = "black"; - document.getElementById("historique").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("evaluation")) { - document.getElementById("evaluation").style.backgroundColor = "#d8edfc"; - document.getElementById("evaluation").style.color = "black"; - document.getElementById("evaluation").style.fontWeight = "normal"; - } - - if (document.getElementById("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc"; - document.getElementById("piece_jointe").style.color = "black"; - document.getElementById("piece_jointe").style.fontWeight = "normal"; - } - - */ + } @@ -2164,73 +1989,7 @@ const DisplayPartnerSession = (props) => { setsubmenu("sequence_session"); submenu_color_management("sequence_session"); - /* - //await sleep(5); - if (!edit_session_form) { - desableSessionFields(); - } - - if (document.getElementById("sequence_session")) { - document.getElementById("sequence_session").style.backgroundColor = "#104277"; - document.getElementById("sequence_session").style.color = "white"; - document.getElementById("sequence_session").style.fontWeight = "bold"; - } - - 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("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"; - 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"; - } - - 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("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc"; - document.getElementById("piece_jointe").style.color = "black"; - document.getElementById("piece_jointe").style.fontWeight = "normal"; - } - */ + } @@ -2239,73 +1998,7 @@ const DisplayPartnerSession = (props) => { setsubmenu("emargement"); submenu_color_management("emargement"); - /* //await sleep(5); - if (!edit_session_form) { - desableSessionFields(); - } - - if (document.getElementById("emargement")) { - document.getElementById("emargement").style.backgroundColor = "#104277"; - document.getElementById("emargement").style.color = "white"; - document.getElementById("emargement").style.fontWeight = "bold"; - } - - 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("evaluation")) { - document.getElementById("evaluation").style.backgroundColor = "#d8edfc"; - document.getElementById("evaluation").style.color = "black"; - document.getElementById("evaluation").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"; - } - - if (document.getElementById("attestation")) { - document.getElementById("attestation").style.backgroundColor = "#d8edfc"; - document.getElementById("attestation").style.color = "black"; - document.getElementById("attestation").style.fontWeight = "normal"; - } - - if (document.getElementById("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc"; - document.getElementById("piece_jointe").style.color = "black"; - document.getElementById("piece_jointe").style.fontWeight = "normal"; - } - */ + } @@ -2314,80 +2007,7 @@ const DisplayPartnerSession = (props) => { setsubmenu("piece_jointe"); submenu_color_management("piece_jointe"); - /* // await sleep(5); - if (!edit_session_form) { - desableSessionFields(); - } - - if (document.getElementById("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#104277"; - document.getElementById("piece_jointe").style.color = "white"; - document.getElementById("piece_jointe").style.fontWeight = "bold"; - } - - - if (document.getElementById("historique")) { - document.getElementById("historique").style.backgroundColor = "#d8edfc"; - document.getElementById("historique").style.color = "black"; - 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 = "normal"; - } - - 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("editique")) { - document.getElementById("editique").style.backgroundColor = "#d8edfc"; - document.getElementById("editique").style.color = "black"; - document.getElementById("editique").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("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("emargement")) { - document.getElementById("emargement").style.backgroundColor = "#d8edfc"; - document.getElementById("emargement").style.color = "black"; - document.getElementById("emargement").style.fontWeight = "normal"; - } - */ + } async function submenu_historique() { @@ -2397,76 +2017,7 @@ const DisplayPartnerSession = (props) => { if (!edit_session_form) { desableSessionFields(); } - /* - - if (document.getElementById("historique")) { - document.getElementById("historique").style.backgroundColor = "#104277"; - document.getElementById("historique").style.color = "white"; - 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 = "normal"; - } - - 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("editique")) { - document.getElementById("editique").style.backgroundColor = "#d8edfc"; - document.getElementById("editique").style.color = "black"; - document.getElementById("editique").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("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("emargement")) { - document.getElementById("emargement").style.backgroundColor = "#d8edfc"; - document.getElementById("emargement").style.color = "black"; - document.getElementById("emargement").style.fontWeight = "normal"; - } - - if (document.getElementById("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc"; - document.getElementById("piece_jointe").style.color = "black"; - document.getElementById("piece_jointe").style.fontWeight = "normal"; - } - */ + } @@ -2501,68 +2052,7 @@ const DisplayPartnerSession = (props) => { setsubmenu("editique"); submenu_color_management("editique"); - /* - if (document.getElementById("editique")) { - document.getElementById("editique").style.backgroundColor = "#104277"; - document.getElementById("editique").style.color = "white"; - document.getElementById("editique").style.fontWeight = "bold"; - - } - - 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("attestation")) { - document.getElementById("attestation").style.backgroundColor = "#d8edfc"; - document.getElementById("attestation").style.color = "black"; - document.getElementById("attestation").style.fontWeight = "normal"; - } - - 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("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("preinscrit")) { - document.getElementById("preinscrit").style.backgroundColor = "#d8edfc"; - document.getElementById("preinscrit").style.color = "black"; - document.getElementById("preinscrit").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("historique")) { - document.getElementById("historique").style.backgroundColor = "#d8edfc"; - document.getElementById("historique").style.color = "black"; - document.getElementById("historique").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("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc"; - document.getElementById("piece_jointe").style.color = "black"; - document.getElementById("piece_jointe").style.fontWeight = "normal"; - } - */ + } @@ -2571,75 +2061,7 @@ const DisplayPartnerSession = (props) => { submenu_color_management("evaluation"); Getall_Survey_hot_evaluation_By_Session(); - /* - //await sleep(5); - if (!edit_session_form) { - desableSessionFields(); - } - - if (document.getElementById("evaluation")) { - document.getElementById("evaluation").style.backgroundColor = "#104277"; - document.getElementById("evaluation").style.color = "white"; - document.getElementById("evaluation").style.fontWeight = "bold"; - } - - - 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("attestation")) { - document.getElementById("attestation").style.backgroundColor = "#d8edfc"; - document.getElementById("attestation").style.color = "black"; - document.getElementById("attestation").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"; - } - - if (document.getElementById("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc"; - document.getElementById("piece_jointe").style.color = "black"; - document.getElementById("piece_jointe").style.fontWeight = "normal"; - } -*/ + GetListeEvaluation(selected_session_id); } @@ -2648,73 +2070,9 @@ 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"; - } - - if (document.getElementById("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc"; - document.getElementById("piece_jointe").style.color = "black"; - document.getElementById("piece_jointe").style.fontWeight = "normal"; - } + submenu_color_management("attestation"); + + GetListeEvaluation(selected_session_id); @@ -2725,83 +2083,7 @@ const DisplayPartnerSession = (props) => { async function submenu_q_positionnement() { setsubmenu("positionnement"); submenu_color_management("q_positionnement"); - /* - //await sleep(5); - if (!edit_session_form) { - desableSessionFields(); - } - - if (document.getElementById("q_positionnement")) { - document.getElementById("q_positionnement").style.backgroundColor = "#104277"; - document.getElementById("q_positionnement").style.color = "white"; - document.getElementById("q_positionnement").style.fontWeight = "bold"; - } - - - if (document.getElementById("attestation")) { - document.getElementById("attestation").style.backgroundColor = "#d8edfc"; - document.getElementById("attestation").style.color = "black"; - document.getElementById("attestation").style.fontWeight = "normal"; - } - - 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"; - } - - if (document.getElementById("piece_jointe")) { - document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc"; - document.getElementById("piece_jointe").style.color = "black"; - document.getElementById("piece_jointe").style.fontWeight = "normal"; - } - -*/ + } diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index 1771a66..d99e92d 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -2338,8 +2338,6 @@ const DisplayPartnerStagiaires = (props) => { if (new_data2.length > 0) { setNew_Getall_TrainingSession_result(new_data2); - - // console.log(" ### new_data2 = ", new_data2); } diff --git a/src/components/SurveyDocument.js b/src/components/SurveyDocument.js index f1b536c..9705026 100644 --- a/src/components/SurveyDocument.js +++ b/src/components/SurveyDocument.js @@ -7,41 +7,17 @@ import axios from "axios"; import { getCookie, setCookie } from 'react-use-cookie'; import { useHistory } from "react-router-dom"; import Rating from '@mui/material/Rating'; -import CheckOut from "./CheckOut"; -import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid'; + import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"; -import { Editor } from '@tinymce/tinymce-react'; -import parse from 'html-react-parser'; -import { FcViewDetails, FcDisapprove } from "react-icons/fc"; + import 'react-tooltip/dist/react-tooltip.css' -import { Tooltip } from 'react-tooltip' -import add_plus from "../mysy_img/plus.png"; -import excel_icone from "../mysy_img/excel_icone.png"; -import participants from "../mysy_img/participants.png"; -import fileDownload from 'js-file-download' -import Autocomplete from '@mui/material/Autocomplete'; -import Popup from 'reactjs-popup'; + import 'reactjs-popup/dist/index.css'; import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc"; import DatePicker from "react-datepicker"; import "react-datepicker/dist/react-datepicker.css"; -import { format } from 'date-fns' -import moment from "moment"; -import InputAdornment from '@mui/material/InputAdornment'; -import { AiFillCloseCircle } from "react-icons/ai"; -import Box from '@mui/material/Box'; -import { Typography, LinearProgress } from '@mui/material'; -import styled from 'styled-components'; -import { CiTrash } from "react-icons/ci"; -import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md"; -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'; -import { TransitionProps } from '@mui/material/transitions'; -import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5"; + import { useParams } from 'react-router-dom' import Header from "./Header"; import Footer from "./Fotter"; diff --git a/src/components/UpdateAttendeeList.js b/src/components/UpdateAttendeeList.js new file mode 100644 index 0000000..8cea195 --- /dev/null +++ b/src/components/UpdateAttendeeList.js @@ -0,0 +1,733 @@ +import React, { useRef, useState, useEffect } from "react"; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; +import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css +import Button from '@mui/material/Button'; +import axios from "axios"; +import { getCookie, setCookie } from 'react-use-cookie'; +import { useHistory } from "react-router-dom"; +import Rating from '@mui/material/Rating'; +import { gridClasses } from '@mui/x-data-grid'; +import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"; +import Box from '@mui/material/Box'; +import { FcViewDetails, FcDisapprove } from "react-icons/fc"; +import 'react-tooltip/dist/react-tooltip.css' +import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint, FcAlarmClock, FcMultipleSmartphones, FcWorkflow } from "react-icons/fc"; +import 'reactjs-popup/dist/index.css'; +import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; +import { CiTrash } from "react-icons/ci"; +import "react-datepicker/dist/react-datepicker.css"; +import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid'; +import { useParams } from 'react-router-dom' +import Header from "./Header"; +import Footer from "./Fotter"; +import { FcInfo } from "react-icons/fc"; +import { Document, Page } from 'react-pdf'; +import RadioGroup from '@mui/material/RadioGroup'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import FormControl from '@mui/material/FormControl'; +import FormLabel from '@mui/material/FormLabel'; +import Radio from '@mui/material/Radio'; +import { daDK } from "@mui/material/locale"; +import Checkbox from '@mui/material/Checkbox'; +import Link from '@mui/material/Link'; +import { PiDotsThree } from "react-icons/pi"; +import Popup from 'reactjs-popup'; +import 'reactjs-popup/dist/index.css'; + +import Display_Action_And_Class from "./Display_Action_And_Class"; + + +function UpdateAttendeeList() { + + const history = useHistory(); + const { client_id, session_id, partner_owner_recid } = useParams(); + const [isLoading, setLoading] = useState(); + + const [tab_variable, settab_variable] = useState([]); + + function ExpandableCell_50({ value }) { + const [expanded, setExpanded] = React.useState(false); + + return ( + + ); + } + + const [rowss_preinsc, setRows_preinsc] = useState([]); + + + const [selectionModel_preinsc, setselectionModel_preinsc] = React.useState([]); + const columns_preinscrit = [ + { field: 'id', headerName: 'id', hide: true }, + { field: '_id', headerName: '_id', hide: true }, + { field: 'civilite', headerName: 'Civ.', minWidth: 100, flex: 1, maxWidth: 100, hide: false, editable: true, editable: false, renderCell: (params) => , }, + { field: 'nom', headerName: 'nom', minWidth: 150, flex: 1, hide: false, editable: true, renderCell: (params) => , }, + { field: 'prenom', headerName: 'prenom', minWidth: 150, flex: 1, hide: false, editable: true, renderCell: (params) => , }, + { field: 'email', headerName: 'email', minWidth: 150, flex: 1, flex: 1, renderCell: (params) => , }, + { + field: "update", headerName: 'Mise à jour', + renderCell: (cellValues) => { + return ( + + { + // handleClick_accept(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + Confirmer la mise à jour des informations du stagiaire +
+
+
+ + +
+
+ +
+
+
+ )} +
+ + ); + } + }, + + { + field: "valide", headerName: 'Valider', + renderCell: (cellValues) => { + return ( + + { + // handleClick_accept(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, l'inscription du stagiaire sera définitivement validée.
+ Il (le stagiaire) sera automatiquement notifié par email de la validation de son inscription.
+ Le stagiaire passera de l'onglet "préinscrit" vers l'onglet "inscription".
+
+
+
+ + +
+
+ +
+
+
+ )} +
+ + ); + } + }, + + { + field: "refuse", headerName: 'Refuser', + renderCell: (cellValues) => { + return ( + + { + // handleClick_refuse(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, l'inscription du stagiaire sera refusée.
+ Il (le stagiaire) sera automatiquement notifié par email du refus de son inscription.
+
Motif du refus :
+