From 947904b4c9dfba311fb63da1c528dbac561d4e8e Mon Sep 17 00:00:00 2001 From: Cherif Date: Tue, 3 Jun 2025 22:33:13 +0200 Subject: [PATCH] 03/06/2025 - 22h --- src/components/AddClassManual.js | 9 +- src/components/Apprenant.js | 3 +- src/components/DisplayPartnerSession.js | 381 +++++++++++++++++- src/components/DisplayPartnerStagiaires.js | 2 +- .../DisplayPartnerTrainingsPagination.js | 178 +++++++- src/components/Employes.js | 1 - src/components/Intranet_Mes_Stagiaires.js | 2 +- src/components/Jurys.js | 2 +- .../Module_Evaluation_Positionnement.js | 14 +- .../Module_Session_Notes_Classement.js | 2 +- src/components/Partner_Commande.js | 256 ++++++------ src/components/Partner_Config_Formulaires.js | 206 +++++++++- src/styles/components/_addclassmanual.scss | 1 - .../components/_displaypartnersession.scss | 36 +- .../_partner_configuration_technique.scss | 138 ++++--- 15 files changed, 987 insertions(+), 244 deletions(-) diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index 24fbbdb..9926a02 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -5500,7 +5500,7 @@ const AddClassManual = (props) => { {props.formation_initiale && String(props.formation_initiale) === "1" && -
+
@@ -6094,21 +6094,20 @@ const AddClassManual = (props) => {
}
- + } {submenu && String(submenu) === "detail_formation" &&
-   +   {p_detail_archive && String(p_detail_archive) === "1" &&
Document Archivé
}
-
- +
{ const [Getall_TrainingSession_result, setGetall_TrainingSession_result] = useState(); function Getall_TrainingSession(event) { var form = new FormData(); - + const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); + form.append("archive", "0"); var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/"; diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index b076ce2..50264ad 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -249,7 +249,9 @@ const DisplayPartnerSession = (props) => { const [datagrid_columns_size_model2, setdatagrid_columns_size_model2] = useState(100); - + const ITEM_HEIGHT_PROMO = 48; + const [anchorEl_promo, setanchorEl_promo] = React.useState(null); + const open_promo = Boolean(anchorEl_promo); const columns = [ { field: 'id', headerName: 'id', hide: true, disableExport: true, }, @@ -304,6 +306,20 @@ const DisplayPartnerSession = (props) => { field: 'etape', headerName: 'Etape', hide: false, width: datagrid_columns_size_model2, renderCell: (params) => , }, + + { + field: 'archive', headerName: 'Archivé', hide: true, Width: 50, editable: false, renderCell: (cellValues) => { + return ( +
+ {String(cellValues.row.archive) === "1" && "Oui"}  + {String(cellValues.row.archive) !== "1" && "Non"}  + +
+ + ); + }, + }, + { field: 'class_external_code', headerName: 'Code Formation', align: "center", hideable: true, flex: 1, hide: true, minWidth: 150, renderCell: (params) => , }, { field: 'date_debut', headerName: 'Debut', hide: false, minWidth: 150, renderCell: (params) => , }, { field: 'date_fin', headerName: 'Fin', minWidth: 150, renderCell: (params) => , }, @@ -465,8 +481,267 @@ const DisplayPartnerSession = (props) => { ); } }, + { + field: 'bton_vertif', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", + renderCell: (cellValues) => { + return ( +
+ +
+ ); + }, + }, + ] + const [promo_archive_status, setpromo_archive_status] = React.useState(''); + const options_menu_vertical_promotion = [ + 'Editer', + 'Archiver/Désarchiver', + 'Supprimer', + ]; + + + + const handleClick_option_button_vertical_promo = (event) => { + setanchorEl_promo(event.currentTarget); + }; + const handleClose_option_button_vertical_promo = (event, value) => { + setanchorEl_promo(null); + + }; + const [working_cellValues_promo, setworking_cellValues_promo] = useState(false); + const [dialogOpen_supp_promo, setdialogOpen_supp_promo] = useState(false); + const Dialog_menuitem_close_supp_prmo = () => { + setdialogOpen_supp_promo(false) + }; + + + const [dialogOpen_archive, setdialogOpen_archive] = useState(false); + const Dialog_menuitem_close_archive = () => { + setdialogOpen_archive(false) + }; const options_menu_vertical_preinsc = [ '', @@ -1011,6 +1286,7 @@ const DisplayPartnerSession = (props) => { 'Annuler Insc.', ]; + const ITEM_HEIGHT = 48; const [anchorEl, setAnchorEl] = React.useState(null); const open = Boolean(anchorEl); @@ -2053,6 +2329,7 @@ const DisplayPartnerSession = (props) => { const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); + var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/"; @@ -2096,6 +2373,8 @@ const DisplayPartnerSession = (props) => { var local_session_class_id = JSON.parse(x).class_id; var local_class_lms_class_code = JSON.parse(x).class_lms_class_code; + var local_archive = JSON.parse(x).archive; + var local_session_nb_participant = JSON.parse(x).nb_participant; var local_session_nb_inscrit = JSON.parse(x).nb_inscrit; var local_session_taux_remplissage = String(parseFloat(String(JSON.parse(x).taux_remplissage)).toFixed(2)); @@ -2120,6 +2399,7 @@ const DisplayPartnerSession = (props) => { "nb_participant": local_session_nb_participant, "nb_inscrit": local_session_nb_inscrit, "taux_remplissage": local_session_taux_remplissage, + "archive": local_archive, }; new_data2.push(node); setTaskStatus(new_data2); @@ -2154,6 +2434,7 @@ const DisplayPartnerSession = (props) => { "date_debut": local_date_debut, "date_fin": local_date_fin, "session_etape": local_session_etape, + "archive": local_archive, "is_session_alert": local_is_session_alert, "invoiced_statut": local_invoiced_statut, "session_alert_message": local_session_alert_message, @@ -2187,6 +2468,7 @@ const DisplayPartnerSession = (props) => { "invoiced_statut": "", "session_alert_message": "", "class_id": "", + "archive": "", }; new_data2.push(node); @@ -2219,13 +2501,14 @@ const DisplayPartnerSession = (props) => { } + function Getall_TrainingSession_no_filter(event) { var form = new FormData(); const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); - + form.append("archive", "0"); var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/"; @@ -2388,6 +2671,8 @@ const DisplayPartnerSession = (props) => { var filtre1_value = props_class_internal_url; form.append(filtre1, filtre1_value); + form.append("archive", "0"); + var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List_filter_like/"; @@ -2423,6 +2708,8 @@ const DisplayPartnerSession = (props) => { var local_session_class_id = JSON.parse(x).class_id; var local_class_lms_class_code = JSON.parse(x).class_lms_class_code; + var local_archive = JSON.parse(x).archive; + var local_session_nb_participant = JSON.parse(x).nb_participant; var local_session_nb_inscrit = JSON.parse(x).nb_inscrit; var local_session_taux_remplissage = String(parseFloat(String(JSON.parse(x).taux_remplissage)).toFixed(2)); @@ -2445,6 +2732,7 @@ const DisplayPartnerSession = (props) => { "nb_participant": local_session_nb_participant, "nb_inscrit": local_session_nb_inscrit, "taux_remplissage": local_session_taux_remplissage, + "archive": local_archive, }; new_data2.push(node); @@ -2481,6 +2769,7 @@ const DisplayPartnerSession = (props) => { "date_fin": local_date_fin, "session_etape": local_session_etape, "is_session_alert": local_is_session_alert, + "archive": local_archive, "invoiced_statut": local_invoiced_statut, "session_alert_message": local_session_alert_message, "class_id": local_session_class_id, @@ -2513,6 +2802,7 @@ const DisplayPartnerSession = (props) => { "session_alert_message": "", "class_id": "", "class_lms_class_code": "", + "archive": "", }; new_data2.push(node); @@ -3270,7 +3560,8 @@ const DisplayPartnerSession = (props) => { } setLoading(false); } else { - Getall_TrainingSession(); + // Getall_TrainingSession(); + Getall_TrainingSession_no_filter(); window.scrollTo({ top: 0, behavior: "smooth", @@ -4687,6 +4978,7 @@ const DisplayPartnerSession = (props) => { } + const [p_detail_archive, setp_detail_archive] = useState(""); const [SendInscriptionConfirmation_api, setSendInscriptionConfirmation_api] = useState(); const [SendInscriptionConfirmation_message, setSendInscriptionConfirmation_message] = useState(); @@ -6820,6 +7112,12 @@ const DisplayPartnerSession = (props) => { setnb_valide_inscription_individuelle(""); } + if (mylocaltraining.archive) { + setp_detail_archive(mylocaltraining.archive); + } else { + setp_detail_archive(""); + } + if (mylocaltraining.automatic_traitement) { setGetCurrentSession_automatic_traitement_data(mylocaltraining.automatic_traitement); @@ -12389,6 +12687,13 @@ const DisplayPartnerSession = (props) => { } + const New_Option_Is_archive = [ + { "id": "1", "label": "Oui", "value": "1" }, + { "id": "0", "label": "Non", "value": "0" }, + { "id": "2", "label": "Tout", "value": "2" }, + { "id": "", "label": "", "value": "" }, + ] + const New_Price_by = [ { "id": "persession", "label": "Par Session", "value": "persession" }, { "id": "perstagiaire", "label": "Par Stagiaire", "value": "perstagiaire" }, @@ -12401,6 +12706,7 @@ const DisplayPartnerSession = (props) => { { "id": "class_title", "label": "Titre Formation", "value": "class_title" }, { "id": "session_start_date", "label": "Date début session", "value": "session_start_date" }, { "id": "session_end_date", "label": "Date fin session", "value": "session_end_date" }, + { "id": "archive", "label": "Archive", "value": "archive" }, { "id": "", "label": "", "value": "" }, { "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres. ] @@ -17813,8 +18119,8 @@ const DisplayPartnerSession = (props) => { setinfo_affiche_date_fin(JSON.parse(rowss[session_selected_row_id]).date_fin); setinfo_affiche_etape(JSON.parse(rowss[session_selected_row_id]).session_etape); - var nb_place_dispo = String(parseInt(String(JSON.parse(rowss[session_selected_row_id]).nb_participant)) - parseInt(String(JSON.parse(rowss[session_selected_row_id]).nb_inscrit))) - console.log(" ### nb_place_dispo = ", nb_place_dispo); + var nb_place_dispo = String(parseInt(String(JSON.parse(rowss[session_selected_row_id]).nb_participant)) - parseInt(String(JSON.parse(rowss[session_selected_row_id]).nb_inscrit))) + //console.log(" ### nb_place_dispo = ", nb_place_dispo); setinfo_affiche_place_disponible(nb_place_dispo); @@ -18726,7 +19032,7 @@ const DisplayPartnerSession = (props) => { -
+ {String(p_filtre1) !== "archive" &&
{p_filtre1 && { /> } -
+
} + + {String(p_filtre1) === "archive" &&
+ {p_filtre1 && + (data).id === String(p_filtre1_value))[0].label} + sx={{ float: "right" }} + className="disabled_style" + + options={New_Option_Is_archive} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre1_value(value.value); + } else { + setp_filtre1_value(""); + } + }} + renderInput={(params) => } + /> + + } + +
} + + {p_filtre1 &&
- {String(p_filtre2).length > 3 && + {String(p_filtre2).length > 3 && String(p_filtre2) !== "archive" && { }} />} + + {String(p_filtre2).length > 3 && String(p_filtre2) === "archive" && + (data).id === String(p_filtre2_value))[0].label} + sx={{ float: "right" }} + className="disabled_style" + + options={New_Option_Is_archive} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2_value(value.value); + } else { + setp_filtre2_value(""); + } + }} + renderInput={(params) => } + />} +
@@ -19123,7 +19483,8 @@ const DisplayPartnerSession = (props) => { session_alert_message: JSON.parse(item).session_alert_message, is_bpf: JSON.parse(item).is_bpf, class_id: JSON.parse(item).class_id, - class_lms_class_code: JSON.parse(item).class_lms_class_code + class_lms_class_code: JSON.parse(item).class_lms_class_code, + archive: JSON.parse(item).archive, } @@ -20853,6 +21214,8 @@ const DisplayPartnerSession = (props) => { {String(addOneSession) !== "1" &&
  + {p_detail_archive && String(p_detail_archive) === "1" && +
Document Archivé
}
diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index 0fdbe9a..9ad1b9b 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -2613,7 +2613,7 @@ const DisplayPartnerStagiaires = (props) => { const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); - + form.append("archive", "0"); var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/"; setLoading(true); diff --git a/src/components/DisplayPartnerTrainingsPagination.js b/src/components/DisplayPartnerTrainingsPagination.js index ab61902..3869c7c 100644 --- a/src/components/DisplayPartnerTrainingsPagination.js +++ b/src/components/DisplayPartnerTrainingsPagination.js @@ -285,6 +285,71 @@ const DistplayPartnerTraningsPage = (props) => { } + + const [Archive_Given_Class_api, setArchive_Given_Class_api] = useState(); + const [Archive_Given_Class_message, setArchive_Given_Class_message] = useState(); + const [Archive_Given_Class_result, setArchive_Given_Class_result] = useState(); + + function Archive_Given_Class(local_class_id, local_archive_statue) { + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("tab_class_id", local_class_id); + + //console.log(" form == ", form); + var myurl = ""; + if (local_archive_statue !== "1") + myurl = process.env.REACT_APP_API_URL + "myclass/api/archive_class/"; + else + myurl = process.env.REACT_APP_API_URL + "myclass/api/unarchive_class/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Archive_Given_Class res.data.status = " + res.data.status); + //console.log(" In Archive_Given_Class res.data.message r_class = " + res.data.message); + + setLoading(false); + if (String(res.data.status) === String("true")) { + setArchive_Given_Class_api("true"); + setArchive_Given_Class_result(res.data.message); + + GetAllClass_new(); + + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + + } + else { + setArchive_Given_Class_api("false"); + setArchive_Given_Class_message(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + + } + + }).catch((error) => { + + + setLoading(false); + console.warn('UpdateStagiaireData : Not good man :( Archive_Given_Class = ' + error); + setArchive_Given_Class_api("false"); + if (local_archive_statue !== "1") + alert(" Impossible d'archiver la formation "); + else + alert(" Impossible de séarchiver la formation "); + + + }) + } + + + const [selectionModel, setSelectionModel] = React.useState([]); const [rowss, setRows] = useState([]); const [tableData, setTableData] = useState([]) @@ -474,6 +539,7 @@ const DistplayPartnerTraningsPage = (props) => { 'Visualiser', 'Editer', 'Pubier E-Learning', + 'Archiver/Désarchiver', 'Supprimer', ]; @@ -482,6 +548,7 @@ const DistplayPartnerTraningsPage = (props) => { 'Visualiser', 'Editer', 'Ouvrir E-Learning', + 'Archiver/Désarchiver', 'Supprimer', ]; @@ -523,6 +590,7 @@ const DistplayPartnerTraningsPage = (props) => { }; + const [class_archive_status, setclass_archive_status] = React.useState(''); const [anchorEl_A, setanchorEl_A] = React.useState(null); const open_a = Boolean(anchorEl_A); @@ -619,8 +687,6 @@ const DistplayPartnerTraningsPage = (props) => { }} variant="outlined" - - > {cellValues.row.nb_session_formation} @@ -697,6 +763,7 @@ const DistplayPartnerTraningsPage = (props) => { onClick={(e) => { handleClick_option_button_vertical(e); setworking_cellValues(cellValues); + setclass_archive_status(cellValues.row.archive) }} @@ -738,6 +805,10 @@ const DistplayPartnerTraningsPage = (props) => { handleClick(e, working_cellValues); } + else if (option && String(option) === "Archiver/Désarchiver") { + setdialogOpen_archive(true); + } + else if (option && String(option) === "Pubier E-Learning") { setdialogOpen_push_lms(true); } @@ -753,6 +824,85 @@ const DistplayPartnerTraningsPage = (props) => { ))} + {/*** GESTION Dialog menu item pour archivage / desarchivage */} + {dialogOpen_archive && null} + + PaperProps={{ + className: classes.paper, // Apply the paper style + style: { + overflowY: 'unset', + // position: 'absolute', + top: '7rem', + border: '1px solid #F1F1F1', + + margin: "2px", + boxShadow: "-3px 4px 0px -30px #000000", + }, + }} + hideBackdrop={true} + disableScrollLock + classes={{ + paper: classes.dialog + }} + + PaperComponent={PaperComponent} + aria-labelledby="draggable-dialog-title" + > + + + +
+ +
MySy Information
+
+ {' '} + + {String(class_archive_status) !== "1" && } + + {String(class_archive_status) === "1" && } + +
+
+
+ + +
+
+ +
+
+
+
+ + + + + +
} + {/*** FIN GESTION Dialog menu item pour archivage / desarchivage */} + + {/*** GESTION Dialog menu item pour suppression */} {dialogOpen_supp && { overflowY: 'unset', // position: 'absolute', top: '7rem', + border: '1px solid #F1F1F1', margin: "2px", boxShadow: "-3px 4px 0px -30px #000000", }, @@ -838,6 +989,7 @@ const DistplayPartnerTraningsPage = (props) => { overflowY: 'unset', // position: 'absolute', top: '7rem', + border: '1px solid #F1F1F1', margin: "2px", boxShadow: "-3px 4px 0px -30px #000000", }, @@ -993,6 +1145,7 @@ const DistplayPartnerTraningsPage = (props) => { overflowY: 'unset', // position: 'absolute', top: '7rem', + border: '1px solid #F1F1F1', margin: "2px", boxShadow: "-3px 4px 0px -30px #000000", }, @@ -1065,6 +1218,7 @@ const DistplayPartnerTraningsPage = (props) => { overflowY: 'unset', // position: 'absolute', top: '7rem', + border: '1px solid #F1F1F1', margin: "2px", boxShadow: "-3px 4px 0px -30px #000000", }, @@ -1141,6 +1295,11 @@ const DistplayPartnerTraningsPage = (props) => { }; + const [dialogOpen_archive, setdialogOpen_archive] = useState(false); + const Dialog_menuitem_close_archive = () => { + setdialogOpen_archive(false) + }; + const [dialogOpen_push_lms, setdialogOpen_push_lms] = useState(false); const Dialog_menuitem_close_push_lms = () => { @@ -1964,10 +2123,10 @@ const DistplayPartnerTraningsPage = (props) => { setLoading(true); axios.post(myurl, form).then(res => { setLoading(false); - + // console.log(" In Getall_Parter_referentiel_padagogique res.data.status = " + res.data.status); + // console.log(" In Getall_Parter_referentiel_padagogique res.data.message r_class = " + res.data.message); if (String(res.data.status) === String("true")) { - //console.log(" In Getall_Parter_referentiel_padagogique res.data.status = " + res.data.status); - //console.log(" In Getall_Parter_referentiel_padagogique res.data.message r_class = " + res.data.message); + setGetall_Parter_referentiel_padagogique_api("true"); setGetall_Parter_referentiel_padagogique_result(res.data.message); //setRows(res.data.message); @@ -2885,7 +3044,7 @@ const DistplayPartnerTraningsPage = (props) => { name="filtre1_value" id="filtre1_value" value={New_Option_Is_archive.filter((data) => (data).id === String(p_filtre1_value))[0].label} - + sx={{ float: "right" }} className="disabled_style" options={New_Option_Is_archive} @@ -2901,6 +3060,7 @@ const DistplayPartnerTraningsPage = (props) => { />} /> + }
} @@ -2936,6 +3096,7 @@ const DistplayPartnerTraningsPage = (props) => { disablePortal name="filtre2" id="filtre2" + sx={{ float: "right" }} className="disabled_style" value={New_Option_Filter.filter((data) => (data).value === String(p_filtre2))[0].label} options={New_Option_Filter} @@ -2990,7 +3151,7 @@ const DistplayPartnerTraningsPage = (props) => { name="filtre2_value" id="filtre2_value" value={New_Option_Is_archive.filter((data) => (data).id === String(p_filtre2_value))[0].label} - + sx={{ float: "right" }} className="disabled_style" options={New_Option_Is_archive} @@ -3043,6 +3204,7 @@ const DistplayPartnerTraningsPage = (props) => { disablePortal name="filtre3" id="filtre3" + sx={{ float: "right" }} className="disabled_style" value={New_Option_Filter.filter((data) => (data).value === String(p_filtre3))[0].label} options={New_Option_Filter} @@ -3098,7 +3260,7 @@ const DistplayPartnerTraningsPage = (props) => { name="filtre2_value" id="filtre2_value" value={New_Option_Is_archive.filter((data) => (data).id === String(p_filtre3_value))[0].label} - + sx={{ float: "right" }} className="disabled_style" options={New_Option_Is_archive} diff --git a/src/components/Employes.js b/src/components/Employes.js index d4cca6e..123cb52 100644 --- a/src/components/Employes.js +++ b/src/components/Employes.js @@ -3663,7 +3663,6 @@ const Employes = (props) => { value: '0', label: 'Non', }, - ]; diff --git a/src/components/Intranet_Mes_Stagiaires.js b/src/components/Intranet_Mes_Stagiaires.js index eb38cd7..f3fc4b2 100644 --- a/src/components/Intranet_Mes_Stagiaires.js +++ b/src/components/Intranet_Mes_Stagiaires.js @@ -2299,7 +2299,7 @@ const Intranet_Mes_Stagiaires = (props) => { const stored_cookie = getCookie('tokenmysych'); form.append("token", stored_cookie); - + form.append("archive", "0"); var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/"; setLoading(true); diff --git a/src/components/Jurys.js b/src/components/Jurys.js index 2fb79fe..0a41e7a 100644 --- a/src/components/Jurys.js +++ b/src/components/Jurys.js @@ -3426,7 +3426,7 @@ const Jury = (props) => { const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); - + form.append("archive", "0"); var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/"; diff --git a/src/components/Module_Evaluation_Positionnement.js b/src/components/Module_Evaluation_Positionnement.js index 9c1c556..16c4849 100644 --- a/src/components/Module_Evaluation_Positionnement.js +++ b/src/components/Module_Evaluation_Positionnement.js @@ -1,21 +1,21 @@ 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 CheckOut from "./CheckOut"; + import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid'; import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"; import 'react-tooltip/dist/react-tooltip.css' import fileDownload from 'js-file-download'; import Popup from 'reactjs-popup' import 'reactjs-popup/dist/index.css'; -import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc"; -import DatePicker from "react-datepicker"; +import { FcAcceptDatabase, FcPrint } from "react-icons/fc"; + import "react-datepicker/dist/react-datepicker.css"; import Box from '@mui/material/Box'; import Dialog from '@mui/material/Dialog'; @@ -23,7 +23,7 @@ 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 img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; import Autocomplete from '@mui/material/Autocomplete'; import { gridClasses } from '@mui/x-data-grid'; @@ -113,8 +113,8 @@ const Module_Evaluation_Positionnement = (props) => { { field: 'id', headerName: 'id', hide: true }, { field: '_id', headerName: '_id', hide: true }, { field: 'form_code', headerName: 'Form. Code', hide: true, minwidth: 200, flex: 1, hideable: true, resizable: true, renderCell: (params) => , }, - { field: 'email', headerName: 'email', minwidth: 300, flex: 1, hideable: true, resizable: true, renderCell: (params) => , }, - { field: 'nom', headerName: 'nom', minwidth: 300, flex: 1, hide: false, editable: true, renderCell: (params) => , }, + { field: 'email', headerName: 'email', minwidth: 300, flex: 1, hideable: false, resizable: true,editable: false, renderCell: (params) => , }, + { field: 'nom', headerName: 'nom', minwidth: 300, flex: 1, hide: false, editable: false, renderCell: (params) => , }, { field: 'prenom', headerName: 'prenom', minwidth: 300, flex: 1, hide: false, editable: false, renderCell: (params) => , }, { field: 'status', headerName: 'Statut', width: 100, editable: false, flex: true, diff --git a/src/components/Module_Session_Notes_Classement.js b/src/components/Module_Session_Notes_Classement.js index 70fd9fe..415ebd9 100644 --- a/src/components/Module_Session_Notes_Classement.js +++ b/src/components/Module_Session_Notes_Classement.js @@ -1076,7 +1076,7 @@ const Module_Session_Notes_Classement = (props) => { const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); - + form.append("archive", "0"); var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/"; diff --git a/src/components/Partner_Commande.js b/src/components/Partner_Commande.js index 4541e40..2301b92 100644 --- a/src/components/Partner_Commande.js +++ b/src/components/Partner_Commande.js @@ -1219,11 +1219,11 @@ const Partner_Commande = (props) => { //console.log("file_size = ",file_size," file_type = ",file_type); if (file_size > 1000000) { - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Le fichier ne doit pas dépasser un 1 Méga octets"); - setalert_type("error"); - // alert("Le fichier ne doit pas dépasser un 1 Méga octets"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Le fichier ne doit pas dépasser un 1 Méga octets"); + setalert_type("error"); + // alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } @@ -1259,12 +1259,12 @@ const Partner_Commande = (props) => { setliste_sessions_file_change_api("true"); //Getall_Training_Employee(); - // alert(" Les employés ont été correctement importés"); + // alert(" Les employés ont été correctement importés"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Les employés ont été correctement importés"); - setalert_type("success"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Les employés ont été correctement importés"); + setalert_type("success"); } @@ -1663,11 +1663,11 @@ const Partner_Commande = (props) => { order_header_submenu_main(); } else { - // alert(" Aucune commande/devis recuperé"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Aucune commande/devis recuperé"); - setalert_type("error"); + // alert(" Aucune commande/devis recuperé"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Aucune commande/devis recuperé"); + setalert_type("error"); } @@ -1819,7 +1819,7 @@ const Partner_Commande = (props) => { const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); - + form.append("archive", "0"); var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/"; setLoading(true); @@ -1928,11 +1928,11 @@ const Partner_Commande = (props) => { } } else { - // alert(" Aucun taux de TVA récuperé") - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Aucun taux de TVA récuperé"); - setalert_type("error"); + // alert(" Aucun taux de TVA récuperé") + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Aucun taux de TVA récuperé"); + setalert_type("error"); } } else if (String(res.data.status) === String("Err_Connexion")) { @@ -2192,11 +2192,11 @@ const Partner_Commande = (props) => { ; } else { - // alert(" Aucune ligne commande/devis recuperée"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Aucune ligne commande/devis recuperée"); - setalert_type("error"); + // alert(" Aucune ligne commande/devis recuperée"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Aucune ligne commande/devis recuperée"); + setalert_type("error"); } @@ -2852,11 +2852,11 @@ const Partner_Commande = (props) => { } else { - // alert(" Type de commande inconnu."); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Type de commande inconnu."); - setalert_type("error"); + // alert(" Type de commande inconnu."); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Type de commande inconnu."); + setalert_type("error"); return; } setLoading(true); @@ -2876,13 +2876,13 @@ const Partner_Commande = (props) => { setOrder_data_changed(""); setorder_data_edit_mode(""); Display_Detail_Order_data(selected_id); - // alert(" La mise à jour du " + String(p_detail_header_type) + " été correctement faite."); - // alert(res.data.message); + // alert(" La mise à jour du " + String(p_detail_header_type) + " été correctement faite."); + // alert(res.data.message); - var txt = "La mise à jour du " + String(p_detail_header_type) + " été correctement faite." - setdisplay_alert_mysy("1"); - setalert_message(txt); - setalert_type("success"); + var txt = "La mise à jour du " + String(p_detail_header_type) + " été correctement faite." + setdisplay_alert_mysy("1"); + setalert_message(txt); + setalert_type("success"); if (document.getElementById('myRef_head')) { var divh = document.getElementById('myRef_head').offsetTop; @@ -3112,16 +3112,16 @@ const Partner_Commande = (props) => { // Controle des champs obligatoires if (!p_add_line_item || String(p_add_line_item).length < 2) { //alert(" Vous devez choisir une formation "); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Vous devez choisir une formation "); - setalert_type("error"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Vous devez choisir une formation "); + setalert_type("error"); return; } if (!p_add_line_item_qty || parseFloat(String(p_add_line_item_qty)) <= 0) { - // alert(" La quantité choisie est incorrecte "); + // alert(" La quantité choisie est incorrecte "); setdisplay_alert_mysy("1"); setalert_message(" La quantité choisie est incorrecte "); setalert_type("error"); @@ -3129,34 +3129,34 @@ const Partner_Commande = (props) => { } if (!p_add_line_item_price || parseFloat(String(p_add_line_item_price)) < 0) { - // alert(" Le prix unitaire est incorrecte "); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(" Le prix unitaire est incorrecte "); - setalert_type("error"); + // alert(" Le prix unitaire est incorrecte "); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Le prix unitaire est incorrecte "); + setalert_type("error"); return; } if (String(p_add_line_item_type_reduction) === "percent" && (parseFloat(String(p_add_line_item_reduction_value)) < 0 || parseFloat(String(p_add_line_item_reduction_value)) > 100)) { - // alert(" Pour une reduction de type 'pourcentage', la valeur doit être comprise entre 0 et 100 "); + // alert(" Pour une reduction de type 'pourcentage', la valeur doit être comprise entre 0 et 100 "); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Pour une reduction de type 'pourcentage', la valeur doit être comprise entre 0 et 100"); - setalert_type("error"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Pour une reduction de type 'pourcentage', la valeur doit être comprise entre 0 et 100"); + setalert_type("error"); return; } if (String(p_add_line_item_type_reduction) === "fixe" && (parseFloat(String(p_add_line_item_reduction_value)) < 0 || parseFloat(String(p_add_line_item_reduction_value)) > parseFloat(String(p_add_line_item_price)))) { - // alert(" Pour une reduction de type 'fixe', la valeur ne doit pas excéder le prix unitaire de l'article "); + // alert(" Pour une reduction de type 'fixe', la valeur ne doit pas excéder le prix unitaire de l'article "); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(" Pour une reduction de type 'fixe', la valeur ne doit pas excéder le prix unitaire de l'article "); - setalert_type("error"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Pour une reduction de type 'fixe', la valeur ne doit pas excéder le prix unitaire de l'article "); + setalert_type("error"); return; } @@ -3177,12 +3177,12 @@ const Partner_Commande = (props) => { clean_article_detail_fields(); Display_Detail_Order_data(selected_id); - // alert(" L'article a été correctement ajouté / mis à jour."); + // alert(" L'article a été correctement ajouté / mis à jour."); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("L'article a été correctement ajouté / mis à jour."); - setalert_type("success"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("L'article a été correctement ajouté / mis à jour."); + setalert_type("success"); setDialog_Detail_Article_open(false); @@ -3329,11 +3329,11 @@ const Partner_Commande = (props) => { if (!p_add_cmd_header_client_id || String(p_add_cmd_header_client_id).length < 2) { - // alert(" Vous devez choisir un client"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Vous devez choisir un client"); - setalert_type("error"); + // alert(" Vous devez choisir un client"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Vous devez choisir un client"); + setalert_type("error"); return; } //console.log("### form = ", form); @@ -3354,11 +3354,11 @@ const Partner_Commande = (props) => { } else if (String(p_add_cmd_header_order_type) === "commande") { myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Partner_Order/"; } else { - // alert(" Type de commande inconnu"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Type de commande inconnu"); - setalert_type("error"); + // alert(" Type de commande inconnu"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Type de commande inconnu"); + setalert_type("error"); return; } @@ -3412,20 +3412,20 @@ const Partner_Commande = (props) => { setAdd_Dialog_Detail_Order_api("false"); if (String(p_add_cmd_header_order_type) === "devis") { - // alert(" Impossible d'ajouter le devis"); + // alert(" Impossible d'ajouter le devis"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Impossible d'ajouter le devis"); - setalert_type("error"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Impossible d'ajouter le devis"); + setalert_type("error"); } else if (String(p_add_cmd_header_order_type) === "commande") { - // alert(" La commande d'ajouter la commande."); + // alert(" La commande d'ajouter la commande."); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("La commande d'ajouter la commande."); - setalert_type("error"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("La commande d'ajouter la commande."); + setalert_type("error"); } }) @@ -3715,11 +3715,11 @@ const Partner_Commande = (props) => { function Compute_Order_Header_Price() { if (String(Order_data_changed) === "1") { - // alert(" Merci d'enregistrer les modification avant de lancer le calcul"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(" Merci d'enregistrer les modification avant de lancer le calcul"); - setalert_type("error"); + // alert(" Merci d'enregistrer les modification avant de lancer le calcul"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Merci d'enregistrer les modification avant de lancer le calcul"); + setalert_type("error"); } Compute_Partner_Order(); @@ -3868,9 +3868,9 @@ const Partner_Commande = (props) => { setdisplay_alert_mysy("1"); setalert_message("Impossible d'envoyer le devis par email"); setalert_type("error"); - // alert(" Impossible d'envoyer le devis par email"); + // alert(" Impossible d'envoyer le devis par email"); } else if (String(p_add_cmd_header_order_type) === "commande") { - // alert(" Impossible d'envoyer la commande par email"); + // alert(" Impossible d'envoyer la commande par email"); setdisplay_alert_mysy("1"); setalert_message("Impossible d'envoyer la commande par email"); setalert_type("error"); @@ -3929,19 +3929,19 @@ const Partner_Commande = (props) => { setConfirm_Order_Data_api("false"); if (String(p_add_cmd_header_order_type) === "devis") { - // alert(" Impossible de confirmer le devis"); + // alert(" Impossible de confirmer le devis"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Impossible de confirmer le devis"); - setalert_type("error"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Impossible de confirmer le devis"); + setalert_type("error"); } else if (String(p_add_cmd_header_order_type) === "commande") { - // alert(" Impossible de confirmer la commande"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Impossible de confirmer la commande"); - setalert_type("error"); + // alert(" Impossible de confirmer la commande"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Impossible de confirmer la commande"); + setalert_type("error"); } }) @@ -4777,23 +4777,23 @@ const Partner_Commande = (props) => { if (file_type !== "application/pdf") { - // alert("Le fichier n'est pas de type PDF"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Le fichier n'est pas de type PDF"); - setalert_type("error"); + // alert("Le fichier n'est pas de type PDF"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Le fichier n'est pas de type PDF"); + setalert_type("error"); return; } if (file_size > 10000000) { - // alert("Le fichier ne doit pas depasser un 1 Méga octets"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("Le fichier ne doit pas depasser un 1 Méga octets"); - setalert_type("error"); - // console.log("Le fichier ne doit pas depasser un 1 Méga octets"); + // alert("Le fichier ne doit pas depasser un 1 Méga octets"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Le fichier ne doit pas depasser un 1 Méga octets"); + setalert_type("error"); + // console.log("Le fichier ne doit pas depasser un 1 Méga octets"); return; } @@ -5024,7 +5024,7 @@ const Partner_Commande = (props) => { static onClose={() => null} > - MySy Information + MySy Information
@@ -5095,7 +5095,7 @@ const Partner_Commande = (props) => { > - Création Session + Création Session @@ -5117,12 +5117,12 @@ const Partner_Commande = (props) => { console.log(" date_start_session = ", date_start_session);*/ if (local_date > date_end_session) { - // alert(" La date est après la fin de la session"); + // alert(" La date est après la fin de la session"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(" La date est après la fin de la session"); - setalert_type("error"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" La date est après la fin de la session"); + setalert_type("error"); return; } @@ -5159,11 +5159,11 @@ const Partner_Commande = (props) => { if (local_date < date_start_session) { - // alert(" La date est avant le début de la session"); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message("La date est avant le début de la session"); - setalert_type("error"); + // alert(" La date est avant le début de la session"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("La date est avant le début de la session"); + setalert_type("error"); return; } @@ -5278,7 +5278,7 @@ const Partner_Commande = (props) => { onClose={() => null} > - Cloture devis {String(p_detail_header_ref_interne)} + Cloture devis {String(p_detail_header_ref_interne)} @@ -5374,7 +5374,7 @@ const Partner_Commande = (props) => { static onClose={() => null} > - MySy Information + MySy Information Envoi devis par email @@ -5510,7 +5510,7 @@ const Partner_Commande = (props) => { > - MySy Information + MySy Information {Dialog_1_message} @@ -5533,7 +5533,7 @@ const Partner_Commande = (props) => { static onClose={() => null} > - Edition Détail ligne {String(p_detail_header_type).toLocaleUpperCase()} + Edition Détail ligne {String(p_detail_header_type).toLocaleUpperCase()} {/*p_add_line_item = {p_add_line_item}
*/} @@ -6194,7 +6194,7 @@ const Partner_Commande = (props) => { onClose={() => null} > - {Dialog_1_message} + {Dialog_1_message}
Client @@ -6503,7 +6503,7 @@ const Partner_Commande = (props) => { -

Mes Commandes et Devis

+

Mes Commandes et Devis

Utilisez les filtres !
diff --git a/src/components/Partner_Config_Formulaires.js b/src/components/Partner_Config_Formulaires.js index 9c87f50..95e47f7 100644 --- a/src/components/Partner_Config_Formulaires.js +++ b/src/components/Partner_Config_Formulaires.js @@ -241,6 +241,23 @@ const Partner_Config_Formulaires = (props) => { }, + { + field: 'is_alert', headerName: 'Alert', flex: 1, hide: false, editable: false, + renderCell: (cellValues) => { + return ( + +
+ {String(cellValues.row.is_alert) === "1" && "Oui"}  + {String(cellValues.row.is_alert) !== "1" && "Non"}  + +
+ + ); + }, + + }, + { field: 'alert_seuil', headerName: 'Seuil Alert', flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { field: "delete", headerName: 'Supprimer', @@ -1154,6 +1171,16 @@ const Partner_Config_Formulaires = (props) => { } + + if (alert_checked === true) { + form.append("is_alert", "1"); + form.append("alert_seuil", alert_seuil_value); + } else { + form.append("is_alert", "0"); + form.append("alert_seuil", ""); + } + + if (statistic_checked === true) { form.append("is_statistic", "1"); } else { @@ -1210,6 +1237,9 @@ const Partner_Config_Formulaires = (props) => { setnew_qcm_choix_value(""); setstatistic_checked(false); + setalert_checked(false); + setalert_seuil_value(""); + Get_Given_Formulaire_Data(selected_id); if (document.getElementById('myRef')) { @@ -1413,6 +1443,16 @@ const Partner_Config_Formulaires = (props) => { setstatistic_checked(event.target.checked); }; + + const [alert_checked, setalert_checked] = React.useState(false); + const [alert_seuil_value, setalert_seuil_value] = React.useState(""); + + const handleChange_alert_checked = (event) => { + setalert_seuil_value(""); + setalert_checked(event.target.checked); + }; + + const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); const [alert_message, setalert_message] = useState(""); const [alert_type, setalert_type] = useState(""); @@ -1428,6 +1468,24 @@ const Partner_Config_Formulaires = (props) => { setdisplay_alert_mysy(""); } + const New_Option_Oui_Non = [ + { + value: '1', + label: 'Oui', + }, + { + value: '0', + label: 'Non', + }, + + { + value: '', + label: '', + }, + ]; + + + return (
@@ -1435,6 +1493,17 @@ const Partner_Config_Formulaires = (props) => {
} + {/*** Affichage des messages d'alerte*/} + {display_alert_mysy && String(display_alert_mysy) === "1" && + + } + {/*** FIN Affichage des messages d'alerte*/} + {/**** Dialog pour gestion d'une question */} @@ -1467,7 +1536,7 @@ const Partner_Config_Formulaires = (props) => { > - MySy Information + MySy Information @@ -1509,6 +1578,10 @@ const Partner_Config_Formulaires = (props) => { value={New_Option_type_Question.filter((data) => (data).value === String(question_type))[0].label} onChange={(event, value) => { + + setalert_checked(false); + setalert_seuil_value(""); + if (value && value.value) { setquestion_type(value.value); } else { @@ -1621,9 +1694,7 @@ const Partner_Config_Formulaires = (props) => { {tab_checkbox_choix && tab_checkbox_choix.map((choix) => (
- { value={new_checkbox_choix_value} onChange={(e) => { setnew_checkbox_choix_value(e.target.value); - } } /> @@ -1680,25 +1750,102 @@ const Partner_Config_Formulaires = (props) => { {(String(question_type) === "note" || String(question_type) === "bool" || String(question_type) === "entier") &&
- - +
+ +
+
+ +
- + {alert_checked && +
+ + {(String(question_type) === "note" || String(question_type) === "entier") && + } + + {(String(question_type) === "bool" || String(question_type) === "entier") && + } +
+ } + +
} @@ -1728,7 +1875,7 @@ const Partner_Config_Formulaires = (props) => { -

Votre configuration des formulaires

+

Votre configuration des formulaires

Utilisez les filtres !
@@ -2276,7 +2423,7 @@ const Partner_Config_Formulaires = (props) => { className="disabled_style" checked={true} - // style={{ background: '#ECEFF1' }} + // style={{ background: '#ECEFF1' }} />} {String(p_detail_from_default) !== "1" && @@ -2286,7 +2433,7 @@ const Partner_Config_Formulaires = (props) => { className="disabled_style" checked={false} - // style={{ background: '#ECEFF1' }} + // style={{ background: '#ECEFF1' }} />} @@ -2348,9 +2495,8 @@ const Partner_Config_Formulaires = (props) => { list_choix: (item).list_choix, list_case_cocher: (item).list_case_cocher, is_statistic: (item).is_statistic, - - - + is_alert: (item).is_alert, + alert_seuil: (item).alert_seuil, } ))} @@ -2360,6 +2506,16 @@ const Partner_Config_Formulaires = (props) => { disableSelectionOnClick onRowDoubleClick={(newSelectionModel) => { + setalert_checked(false); + setalert_seuil_value(""); + + if (newSelectionModel.row.is_alert && newSelectionModel.row.is_alert === "1") + setalert_checked(true); + + if (newSelectionModel.row.alert_seuil) + setalert_seuil_value(newSelectionModel.row.alert_seuil); + + setselected_question_id(newSelectionModel.row._id); setquestion_question(newSelectionModel.row.question); setquestion_type(newSelectionModel.row.type); @@ -2489,6 +2645,8 @@ const Partner_Config_Formulaires = (props) => { onChange={(event, value) => { setconfig_data_changed("1"); + setalert_checked(false); + setalert_seuil_value(""); if (value && value.value) { setp_detail_from_type(value.value); } else { @@ -2593,7 +2751,7 @@ const Partner_Config_Formulaires = (props) => { id="detail_config_par_defaut" className="disabled_style" checked={true} - // style={{ background: '#ECEFF1' }} + // style={{ background: '#ECEFF1' }} onChange={(e) => { if (e.target.checked) { setp_detail_from_default("1"); @@ -2610,7 +2768,7 @@ const Partner_Config_Formulaires = (props) => { id="detail_config_par_defaut" className="disabled_style" checked={false} - // style={{ background: '#ECEFF1' }} + // style={{ background: '#ECEFF1' }} onChange={(e) => { if (e.target.checked) { setp_detail_from_default("1"); @@ -2638,7 +2796,7 @@ const Partner_Config_Formulaires = (props) => { {p_detail_from_list_question && p_detail_from_list_question.length > 0 &&
  - { question: (item).question, type: (item).type, max_note: (item).max_note, + list_choix: (item).list_choix, + list_case_cocher: (item).list_case_cocher, + is_statistic: (item).is_statistic, + is_alert: (item).is_alert, + alert_seuil: (item).alert_seuil, + } ))} @@ -2909,7 +3073,7 @@ const Partner_Config_Formulaires = (props) => { setp_detail_one_from_default("0"); } }} - // style={{ background: '#FFFFFF' }} + // style={{ background: '#FFFFFF' }} />
diff --git a/src/styles/components/_addclassmanual.scss b/src/styles/components/_addclassmanual.scss index 0b45932..6612a98 100644 --- a/src/styles/components/_addclassmanual.scss +++ b/src/styles/components/_addclassmanual.scss @@ -1964,7 +1964,6 @@ background: #d5d8dc; text-align: center; border: none; - } .MuiOutlinedInput-root { diff --git a/src/styles/components/_displaypartnersession.scss b/src/styles/components/_displaypartnersession.scss index 3f070f1..74c0cb7 100644 --- a/src/styles/components/_displaypartnersession.scss +++ b/src/styles/components/_displaypartnersession.scss @@ -1,11 +1,27 @@ .displaypartnersession { + .block_archive { + background-color: #774a10; + width: calc(100% - 20px); + margin-left: 10px; + margin-right: 10px; + border-radius: 5px; + text-align: center; + font-family: DM sans; + color: white; + margin-bottom: 0.5rem; + font-style: italic; + opacity: 80%; + font-weight: 600; + font-size: 14px; + } + .tooltip_css { background: #81BC3A; z-index: 9999; } - + .css-1bp1ao6 { height: 3.5rem !important; } @@ -23,7 +39,7 @@ top: 0px; opacity: 80%; left: 0px; - } + } .spinner { width: 20rem; @@ -325,7 +341,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -533,7 +549,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -1001,7 +1017,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -1214,7 +1230,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -1713,7 +1729,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -1882,7 +1898,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: normal; font-style: italic; background-color: gray; font-weight: normal; @@ -2429,7 +2445,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -2599,7 +2615,7 @@ text-align: center; margin-bottom: 0.8rem; color: white; - cursor: normal; + cursor: normal; font-style: italic; background-color: gray; font-weight: normal; diff --git a/src/styles/components/_partner_configuration_technique.scss b/src/styles/components/_partner_configuration_technique.scss index af6f376..9891490 100644 --- a/src/styles/components/_partner_configuration_technique.scss +++ b/src/styles/components/_partner_configuration_technique.scss @@ -2,13 +2,13 @@ .tooltip_css { background: #81BC3A; z-index: 9999; - font-family: "DM Sans", "sans-serif"; - font-size:"13px"; - } - + font-family: "DM Sans", "sans-serif"; + font-size: "13px"; + } + .Mui-disabled { - font-family:'DM Sans','Sans-serif'; + font-family: 'DM Sans', 'Sans-serif'; font-size: small !important; padding: 0px !important; padding-left: 5px !important; @@ -152,7 +152,7 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { - font-family:'DM Sans','Sans-serif'; + font-family: 'DM Sans', 'Sans-serif'; font: inherit; letter-spacing: inherit; color: currentColor; @@ -198,7 +198,7 @@ } .session_caract { - font-family: DM Sans; + font-family: DM Sans; width: 100%; padding: 5px; float: left; @@ -254,7 +254,7 @@ width: 6%; } - + .icon_plus_line { width: 3%; } @@ -301,7 +301,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -500,7 +500,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -561,7 +561,7 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { - font-family:'DM Sans','Sans-serif'; + font-family: 'DM Sans', 'Sans-serif'; font: inherit; letter-spacing: inherit; color: currentColor; @@ -715,7 +715,7 @@ border-radius: 5px; background: white; border: solid gainsboro 1px; - + } .training_caract { @@ -725,7 +725,7 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { - font-family:'DM Sans','Sans-serif'; + font-family: 'DM Sans', 'Sans-serif'; font: inherit; letter-spacing: inherit; color: currentColor; @@ -771,7 +771,7 @@ } .session_caract { - font-family: DM Sans; + font-family: DM Sans; width: 50%; padding: 5px; float: left; @@ -833,7 +833,7 @@ width: 6%; } - + .icon_plus_line { width: 4%; } @@ -880,7 +880,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -1083,7 +1083,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -1136,7 +1136,7 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { - font-family:'DM Sans','Sans-serif'; + font-family: 'DM Sans', 'Sans-serif'; font: inherit; letter-spacing: inherit; color: currentColor; @@ -1317,7 +1317,7 @@ border-radius: 5px; background: white; border: solid gainsboro 1px; - + } .training_caract { @@ -1327,7 +1327,7 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { - font-family:'DM Sans','Sans-serif'; + font-family: 'DM Sans', 'Sans-serif'; font: inherit; letter-spacing: inherit; color: currentColor; @@ -1350,7 +1350,7 @@ } - + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { padding: 1px !important; @@ -1376,7 +1376,7 @@ } .session_caract { - font-family: DM Sans; + font-family: DM Sans; width: 33%; padding: 5px; float: left; @@ -1439,7 +1439,7 @@ width: 8%; } - + .icon_plus_line { width: 3%; } @@ -1486,7 +1486,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -1815,7 +1815,7 @@ } .session_caract_Dialog { - font-family: 'DM Sans'; + font-family: 'DM Sans'; width: 100%; padding: 5px; float: left; @@ -1842,7 +1842,7 @@ } .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { - font-family:'DM Sans','Sans-serif'; + font-family: 'DM Sans', 'Sans-serif'; font: inherit; letter-spacing: inherit; color: currentColor; @@ -1890,7 +1890,7 @@ .session_caract { - font-family: DM Sans; + font-family: DM Sans; width: 33%; padding: 5px; float: left; @@ -2082,7 +2082,7 @@ } .bton_enreg { - font-family: DM sans; + font-family: DM sans; border-radius: 5rem; font-size: small; background: #81BC3A !important; @@ -2265,7 +2265,7 @@ text-align: center; } - .css-l4u8b9-MuiInputBase-root-MuiInput-root{ + .css-l4u8b9-MuiInputBase-root-MuiInput-root { text-align: left !important; } @@ -2293,23 +2293,63 @@ margin-left: 10px; margin-right: 10px; } - + } // end media - .css-md26zr-MuiInputBase-root-MuiOutlinedInput-root{ + .separator { + display: flex; + align-items: center; + text-align: center; + margin-bottom: 0.5rem !important; + } + + .separator::before { + content: ''; + flex: 1; + border-top: 4px double #999; + } + + + .separator::after { + content: ''; + flex: 1; + border-top: 4px double #999; + } + + .separator:not(:empty)::before { + margin-right: .35em; + } + + .separator:not(:empty)::after { + margin-left: .35em; + } + + .separator_label { + width: 10rem; + float: left; + font-family: 'DM Sans'; + color: blue; + font-weight: 600; + font-size: 14px; + background: #d5d8dc; + text-align: center; + border: none; + } + + .css-md26zr-MuiInputBase-root-MuiOutlinedInput-root { height: 3.5rem !important; } - .css-1bp1ao6{ + .css-1bp1ao6 { height: 3.5rem !important; } .session_caract_Dialog { - font-family: 'DM Sans'; + font-family: 'DM Sans'; width: 100%; padding: 5px; float: left; @@ -2368,27 +2408,27 @@ align-items: center; text-align: center; margin-bottom: 0.5rem !important; - } - - .separator::before, - .separator::after { + } + + .separator::before, + .separator::after { content: ''; flex: 1; border-bottom: 1px solid #e0e0e0; - } - - .separator:not(:empty)::before { - margin-right: .35em; - } - - .separator:not(:empty)::after { - margin-left: .35em; - } + } - .MuiSelect-select{ + .separator:not(:empty)::before { + margin-right: .35em; + } + + .separator:not(:empty)::after { + margin-left: .35em; + } + + .MuiSelect-select { //height: 3rem !important; - } + } } @@ -2414,7 +2454,7 @@ } .css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { -font-family: DM Sans !important; + font-family: DM Sans !important; height: 3.5rem !important; font-size: small !important; }