From 705bacd0fdc65f523520bc4874cb039f4d64b51f Mon Sep 17 00:00:00 2001 From: Cherif Date: Wed, 29 Apr 2026 21:01:13 +0200 Subject: [PATCH] 29/04/26 - 21h --- src/components/AddClassManual.js | 493 ++++++++- src/components/DisplayPartnerPromotion.js | 2 +- src/components/DisplayPartnerSession.js | 92 +- src/components/DisplayPartnerStagiaires.js | 15 +- ...splayPartnerStagiaires_ARG_Before_Light.js | 2 +- .../DisplayPartner_Module_Formation.js | 934 +----------------- src/components/Employes.js | 15 +- .../Partner_Config_Ftion_Initiale.js | 2 +- src/components/Session_Admission_FI.js | 122 ++- 9 files changed, 682 insertions(+), 995 deletions(-) diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index b63e85d..74695de 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -294,6 +294,106 @@ const AddClassManual = (props) => { ] + + const columns_list_module = [ + { field: 'id', headerName: 'id', hide: true }, + { field: '_id', headerName: '_id', hide: true }, + { field: 'code', headerName: 'Code', maxWidth: 250, flex: 1, renderCell: (params) => , }, + { field: 'titre', headerName: 'Titre', minWidth: 150, flex: 1, renderCell: (params) => , }, + + { + field: 'pres_dist_hyp', headerName: 'Animation', maxWidth: 180, + renderCell: (cellValues) => { + return ( +
+ {cellValues.row.pres_dist_hyp && String(cellValues.row.pres_dist_hyp) === "1" && "Dist."} + {cellValues.row.pres_dist_hyp && String(cellValues.row.pres_dist_hyp) === "0" && "Prés."} + {cellValues.row.pres_dist_hyp && String(cellValues.row.pres_dist_hyp) === "2" && "Hybr."} +
+ + ); + } + }, + { + field: 'is_noted', headerName: 'Evalué', maxWidth: 100, renderCell: (params) => , + renderCell: (cellValues) => { + return ( +
+ {cellValues.row.is_noted && String(cellValues.row.is_noted) === "1" && "Oui"} + {cellValues.row.is_noted && String(cellValues.row.is_noted) === "0" && "Non"} + +
+ + ); + } + }, + + + { field: 'duration_concat', headerName: 'Durée', maxidth: 100, renderCell: (params) => , }, + { field: 'duration', headerName: 'Durée', maxWidth: 150, hide: true, renderCell: (params) => , }, + { field: 'duration_unite', headerName: 'Unit.', maxWidth: 150, hide: true, editable: false, renderCell: (params) => , }, + + { + field: "delete", headerName: 'Supprimer', + renderCell: (cellValues) => { + return ( + <> + {String(props.check_user_acces_right("formation", "write")) === "1" && + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, l'UE définitivement supprimée de cette formation .
+ +
+
+
+ + +
+
+ +
+
+
+ )} +
} + + ); + } + }, + + ] + + const columns_list_finance_data = [ { field: 'id', headerName: 'id', hide: true }, { field: '_id', headerName: '_id', hide: true }, @@ -1024,7 +1124,13 @@ const AddClassManual = (props) => { const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Unite_Enseignement_no_filter/"; + if (String(props.class_is_ftion_initiale) === "0") { + form.append("is_module", "1"); + } else { + form.append("is_module", "-1"); + } + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Unite_Enseignement_with_filter/"; setLoading(true); @@ -1093,7 +1199,11 @@ const AddClassManual = (props) => { setLoading(false); console.warn('Not good man :( Getall_Partner_List_UE = ', error); setGetall_Partner_List_UE_api("false"); - alert(" Impossible de recuperer la liste des UE de la formation"); + // alert(" Impossible de recuperer la liste des UE de la formation"); + + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la liste des UE de la formation"); + setalert_type("error"); //setmyApimyApiMessage("") }) } @@ -4320,7 +4430,7 @@ const AddClassManual = (props) => { function submenu_color_management(current_menu) { const list_sous_menu = ["detail_formation", "unite_enseignement", "admission", "piece_jointe", "note_evaluation", "statistiques", - "historique", "aide_ia", "finance", "documents"] + "historique", "aide_ia", "finance", "documents", "module"] for (let i = 0; i < list_sous_menu.length; i++) { @@ -4354,6 +4464,14 @@ const AddClassManual = (props) => { submenu_color_management("unite_enseignement"); } + + + function submenu_module() { + setsubmenu("module"); + submenu_color_management("module"); + } + + function submenu_admission() { setsubmenu("admission"); submenu_color_management("admission"); @@ -6618,7 +6736,17 @@ const AddClassManual = (props) => { }) } - + const [Dialog_Module_Ftion_open, setDialog_Module_Ftion_open] = React.useState(false); + const Dialog_Module_Ftion_handleClose_buton = () => { + setDialog_Module_Ftion_open(false); + setselected_ue_id(""); + setselected_ue_credit_ects(""); + setselected_ue_seuil_validation(""); + setselected_ue_is_noted("1"); + setselected_ue_pres_dist_hyp("0"); + setadd_one_eu_to_class(""); + setselected_ue_coefficient("1"); + }; return (
@@ -6638,6 +6766,190 @@ const AddClassManual = (props) => { {/*** FIN Affichage des messages d'alerte*/} + {/* Dialog pour gerer les Module_Ftion */} + null} + + PaperProps={{ + + + className: classes.paper, // Apply the paper style + style: { + overflowY: 'unset', + position: 'absolute', + top: '5rem', + margin: "2px", + }, + }} + hideBackdrop={true} + disableScrollLock + classes={{ + paper: classes.dialog + }} + + PaperComponent={PaperComponent} + aria-labelledby="draggable-dialog-title" + > + + MySy Information + + + {Dialog_1_message} + + + + + {add_one_eu_to_class && String(add_one_eu_to_class) === "1" &&
Choisir un module + {New_Getall_Partner_List_UE_result && New_Getall_Partner_List_UE_result.length > 0 && + (data)._id === String(selected_ue_id))[0].label} + onChange={(event, value) => { + if (value && value._id) { + + setselected_ue_id(value._id); + setselected_ue_credit_ects(value.ects); + setselected_ue_seuil_validation(value.seuil_validation); + } else { + setselected_ue_id(""); + } + }} + + renderInput={(params) => + } + />} + +
} + + + + {add_one_eu_to_class && String(add_one_eu_to_class) !== "1" && + New_Getall_Partner_List_UE_result && New_Getall_Partner_List_UE_result.length > 0 && + selected_ue_id &&
Module + (data)._id === String(selected_ue_id))[0].label} + + /> + +
+ + + } + + +
Est Evalué
+ + (data).id === String(selected_ue_is_noted))[0].label} + + fullWidth + + options={New_Option_Is_Noted} + onChange={(event, value) => { + if (value && value.value) { + setselected_ue_is_noted(value.value); + } else { + setselected_ue_is_noted(""); + } + }} + renderInput={(params) => } + /> + + +
+ + + +
Mode d'animation
+ (data).id === String(selected_ue_pres_dist_hyp))[0].label} + + fullWidth + + options={New_Option_pres_dist_hyp} + onChange={(event, value) => { + if (value && value.value) { + setselected_ue_pres_dist_hyp(value.value); + } else { + setselected_ue_pres_dist_hyp(""); + } + }} + renderInput={(params) => + } + /> + + +
+ +
+ + + + + + + +
+
+ + + +
+ + + +
+ +
+
+ +
+ +
+ {/* FIN Dialog pour gerer les Module_Ftion */} + + + + {/* Dialog pour gerer les Financial_Data */} { {String(props.formation_initiale) !== "1" &&
- + {String(props.mytrainingclass.ref).trim() !== "" && } - {String(props.mytrainingclass.ref).trim() !== "" && } + {String(props.mytrainingclass.ref).trim() !== "" && } {String(props.mytrainingclass.ref).trim() !== "" && } {String(props.mytrainingclass.ref).trim() !== "" && @@ -7446,6 +7758,173 @@ const AddClassManual = (props) => {
} + + {submenu && String(submenu) === "module" && +
+
+   + + { + setselectionModel_list_unite_enseignement(newSelectionModel); + /*if (newSelectionModel.length === 1) + handleClick_edit_session_From_Line(newSelectionModel);*/ + if (newSelectionModel.length !== 1) { + + } + }} + selectionModel={selectionModel_list_unite_enseignement} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={Getall_Class_List_UE_result.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + code: JSON.parse(item).code, + titre: JSON.parse(item).titre, + + pres_dist_hyp: JSON.parse(item).pres_dist_hyp, + is_noted: JSON.parse(item).is_noted, + + duration: JSON.parse(item).duration, + duration_unite: JSON.parse(item).duration_unite, + duration_concat: JSON.parse(item).duration_concat, + + } + ))} + + columns={columns_list_module} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + if (String(props.check_user_acces_right("formation", "write")) === "1") { + clean_ue_data(); + setgridline_ue_id(newSelectionModel.row.id); + setselected_ue_id(newSelectionModel.row._id) + + var current_class_ue_data = New_Getall_Class_List_UE_result.filter((ue_data) => ue_data._id === String((newSelectionModel.row._id))) + + // console.log(" ### current_class_ue_data[0] = ", current_class_ue_data[0]); + setselected_ue_credit_ects(current_class_ue_data[0]['credit']); + setselected_ue_is_noted(current_class_ue_data[0]['is_noted']); + setselected_ue_pres_dist_hyp(current_class_ue_data[0]['pres_dist_hyp']); + setselected_ue_coefficient(current_class_ue_data[0]['coefficient']); + setselected_ue_seuil_validation(current_class_ue_data[0]['seuil_validation']); + setadd_one_eu_to_class("0"); + setDialog_Unite_Enseignement_open(true); + } + + + }} + + + + rowsPerPageOptions={[10]} + disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + //sx={datagridSx} + getCellClassName={(params) => { + + + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(ue_gridline_id)) { + return 'line--statut--selected'; + } + else if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + + }} + + getRowClassName={(params) => { + + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(ue_gridline_id)) { + + return 'line--statut--selected'; + } + else if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + + }} + getEstimatedRowHeight={() => 200} + getRowHeight={() => "auto"} + sx={{ + "& .MuiDataGrid-cellContent": { + minHeight: 50, + + }, + [`& .${gridClasses.cell}`]: { + py: 1, + }, + }} + + + /> + +
+
+ + {String(props.check_user_acces_right("formation", "write")) === "1" &&
+ +
} +
+
+
} + + + {submenu && String(submenu) === "unite_enseignement" &&
@@ -8463,7 +8942,7 @@ const AddClassManual = (props) => {
} - + {New_Option_is_Ftion_Initiale && New_Option_is_Ftion_Initiale.length > 0 &&
{ - + {/*String(props.check_user_acces_right("session", "write")) === "1" && */} diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 42a3306..3112b68 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -18544,31 +18544,10 @@ const DisplayPartnerSession = (props) => {
- -
-
- - - - - - - -
-
- Fermer + Supprimer le partage de facture - - - + } modal nested @@ -18619,6 +18598,71 @@ const DisplayPartnerSession = (props) => {
+ + + + + + {/*
+
+ Supprimer le partage de facture + } + modal + nested + position="center center" + + > + + {close => ( +
+ +
MySy Information
+
+ {' '} + + + Confirmer la mise à jour du partage de facture + + + +
+
+
+ + +
+
+ +
+
+
+ )} +
+ +
+
*/} + +
} {String(p_detail_invoice_split_facture_done) === "1" && diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index 06e28d3..44dd7f7 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -11961,7 +11961,8 @@ const DisplayPartnerStagiaires = (props) => { var diff = Date.now() - date_eval.getTime(); var age = new Date(diff); var reel_age = Math.abs(age.getUTCFullYear() - 1970); - setselected_row_data_json_age(reel_age) + setselected_row_data_json_age(reel_age); + setp_detail_age(reel_age); } @@ -13158,25 +13159,25 @@ const DisplayPartnerStagiaires = (props) => {
-
+

- {String(selected_id_status) !== "1" && {/*isimgclassSelected && */} {isimgclassdeleted && String(isimgclassdeleted) === "1" && } @@ -13257,7 +13258,7 @@ const DisplayPartnerStagiaires = (props) => { }}> Age
diff --git a/src/components/DisplayPartnerStagiaires_ARG_Before_Light.js b/src/components/DisplayPartnerStagiaires_ARG_Before_Light.js index 42d2cf4..a75b6e6 100644 --- a/src/components/DisplayPartnerStagiaires_ARG_Before_Light.js +++ b/src/components/DisplayPartnerStagiaires_ARG_Before_Light.js @@ -10772,7 +10772,7 @@ const DisplayPartnerStagiaires_ARG = (props) => { var diff = Date.now() - date_eval.getTime(); var age = new Date(diff); var reel_age = Math.abs(age.getUTCFullYear() - 1970); - setselected_row_data_json_age(reel_age) + setselected_row_data_json_age(reel_age); } diff --git a/src/components/DisplayPartner_Module_Formation.js b/src/components/DisplayPartner_Module_Formation.js index 835334d..c37aba4 100644 --- a/src/components/DisplayPartner_Module_Formation.js +++ b/src/components/DisplayPartner_Module_Formation.js @@ -174,9 +174,7 @@ const DisplayPartner_Module_Formation = (props) => { { field: 'duration', headerName: 'Durée', flex: 1, hide: true, editable: false }, { field: 'duration_unite', headerName: 'Unit.', flex: 1, hide: true, editable: false }, - { field: 'planification_line', headerName: 'Ligne Plan.', flex: 1, hide: false, editable: false, renderCell: (params) => , }, - { field: 'planification_used_line', headerName: 'Ligne Plan. Uti.', flex: 1, hide: false, editable: false, renderCell: (params) => , }, - + { field: "delete", headerName: 'Supprimer', @@ -503,8 +501,9 @@ const DisplayPartner_Module_Formation = (props) => { const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); + form.append("is_module", "1"); - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Unite_Enseignement_no_filter/"; + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Unite_Enseignement_with_filter/"; axios.post(myurl, form).then(res => { @@ -1112,6 +1111,9 @@ const DisplayPartner_Module_Formation = (props) => { } form.append("methode_pedagogique", methode_pedago); + + form.append("is_module", "1"); + var myurl = "" var is_update = 0; @@ -2628,8 +2630,7 @@ const DisplayPartner_Module_Formation = (props) => { domain_id: JSON.parse(item).domain_id, bloc: JSON.parse(item).bloc, - planification_line: JSON.parse(item).planification_line, - planification_used_line: JSON.parse(item).planification_used_line, + } ))} @@ -2707,7 +2708,7 @@ const DisplayPartner_Module_Formation = (props) => {
@@ -2719,9 +2720,8 @@ const DisplayPartner_Module_Formation = (props) => { {display_ue && String(display_ue) === "1" && String(add_one_ue) !== "1" &&
- - - + +
} {/*** Affichage d'une UE */} @@ -2736,7 +2736,7 @@ const DisplayPartner_Module_Formation = (props) => {
-
+
@@ -2828,159 +2828,9 @@ const DisplayPartner_Module_Formation = (props) => { />
} -
 
+ - - {ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && -
ECTS
- -
} - - {ue_data_edit_mode && String(ue_data_edit_mode) === "1" && -
ECTS
- { - setp_detail_ects(e.target.value); - seteu_changed("1"); - } - } - - /> -
} - - {ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && -
Seuil Validation
- -
} - - - - {ue_data_edit_mode && String(ue_data_edit_mode) === "1" && -
Seuil Validation
- { - setp_detail_seuil_validation(e.target.value); - seteu_changed("1"); - } - } - /> - - -
} - -
 
- - {ue_data_edit_mode && String(ue_data_edit_mode) === "1" && New_Get_List_Regle_Calcul_Note_UE_result && New_Get_List_Regle_Calcul_Note_UE_result.length > 0 && -
Règle de calcul note   - - (data)._id === String(p_detail_note_ue_calculation_rule_id))[0].calcul_rule}> - - - - -
- (data)._id === String(p_detail_note_ue_calculation_rule_id))[0].label} - onChange={(event, value) => { - seteu_changed("1"); - if (value && value._id) { - setp_detail_note_ue_calculation_rule_id(value._id); - - } else { - setp_detail_note_ue_calculation_rule_id(""); - } - }} - - renderInput={(params) => - } - /> -
} - - - {ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && New_Get_List_Regle_Calcul_Note_UE_result && New_Get_List_Regle_Calcul_Note_UE_result.length > 0 && - -
Règle de calcul note   - - (data)._id === String(p_detail_note_ue_calculation_rule_id))[0].calcul_rule}> - - -
- (data)._id === String(p_detail_note_ue_calculation_rule_id))[0].label} - - - /> - - -
} + {ue_data_edit_mode && String(ue_data_edit_mode) !== "1" &&
Durée Totale
@@ -3076,317 +2926,7 @@ const DisplayPartner_Module_Formation = (props) => {
-
-
- -
- Volume Horaire -
- -
- - {ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && -
Durée Totale
- -
} - - {ue_data_edit_mode && String(ue_data_edit_mode) !== "1" &&
Unité Durée
- - -
} - - {ue_data_edit_mode && String(ue_data_edit_mode) === "1" && - -
Durée Totale
- - { - setp_detail_duration(e.target.value); - seteu_changed("1"); - } - } - /> -
} - - {ue_data_edit_mode && String(ue_data_edit_mode) === "1" && - } - -
-
-
- - {ue_data_edit_mode && String(ue_data_edit_mode) !== "1" &&
- - - -
- - TD -
-
- - -
- - - - - -
} - - {ue_data_edit_mode && String(ue_data_edit_mode) === "1" &&
- -
- - CM -
-
- { - setp_detail_cours_cm(e.target.value); - seteu_changed("1"); - } - } - - /> -
- -
- - TD -
-
- { - setp_detail_cours_td(e.target.value); - seteu_changed("1"); - } - } - - /> -
- -
- - TP -
-
- { - setp_detail_cours_tp(e.target.value); - seteu_changed("1"); - } - } - - /> -
- -
- - TPG -
-
- { - setp_detail_cours_tpg(e.target.value); - seteu_changed("1"); - } - } - - /> -
- -
} - -
-
-
- +
@@ -3834,198 +3374,16 @@ const DisplayPartner_Module_Formation = (props) => {
} - {display_ue && String(display_ue) === "1" && String(add_one_ue) !== "1" && String(submenu) === "planification_ue" && -
- -
-
- -
-   - - { - setSelectionModel_planif(newSelectionModel); - - }} - selectionModel={selectionModel_planif} - disableSelectionOnClick - localeText={frFR.components.MuiDataGrid.defaultProps.localeText} - rows={Getall_UE_Planif_data_result.map((item, index) => ( - { - id: index, - _id: JSON.parse(item)._id, - code: JSON.parse(item).code, - titre: JSON.parse(item).titre, - description: JSON.parse(item).description, - volume_horaire: JSON.parse(item).volume_horaire, - ue_id: JSON.parse(item).ue_id, - - prerequis: JSON.parse(item).prerequis, - comment: JSON.parse(item).comment, - - in_use: JSON.parse(item).in_use, - used_sequence_title: JSON.parse(item).used_sequence_title, - - - } - ))} - - columns={columns_planif_ue} - pageSize={10} - className="datagridclass" - - onRowDoubleClick={(newSelectionModel) => { - setupdate_planif_line("1"); - setselected_planif_line_id(newSelectionModel.row._id); - setp_detail_planif_line_code(newSelectionModel.row.code); - setp_detail_planif_line_titre(newSelectionModel.row.titre); - setp_detail_planif_line_description(newSelectionModel.row.description); - setp_detail_planif_line_prerequis(newSelectionModel.row.prerequis); - setp_detail_planif_line_volume_horaire(newSelectionModel.row.volume_horaire); - setp_detail_planif_line_comment(newSelectionModel.row.comment); - - setDialog_PLANIF_LINE_open(true); - }} - - rowsPerPageOptions={[10]} - //disableSelectionOnClick - components={{ - Toolbar: GridToolbar, - }} - //sx={datagridSx} - getCellClassName={(params) => { - - - //field === "order_header_status" - if (params.field === "order_header_status" && String(params.value) == "0") { - return 'cell--status--brouillon'; - } - - if (params.field === "order_header_status" && String(params.value) == "1") { - - return 'cell--status--encours'; - } - - if (params.field === "order_header_status" && String(params.value) == "2") { - return 'cell--status--traite'; - } - - if (params.field === "order_header_status" && String(params.value) == "3") { - return 'cell--status--facture'; - } - - }} - getRowClassName={(params) => { - - // Pour la gestion de la couleur de zone double cliquée - if (String(params.row.id) === String(planif_gridline_id)) { - - return 'line--statut--selected'; - } - else if (parseInt(String(params.row.id)) % 2 === 0) { - return 'line--statut--pair'; - } - else if (parseInt(String(params.row.id)) % 2 !== 0) { - return 'line--statut--impair'; - } - }} - - - /> - -
- -
- -
- -
- -
- -
- - - - - - - -
- {session_file_name && } - {String(liste_sessions_file_change_api) === String("true") && } - {String(liste_sessions_file_change_api) === String("false") && } - - - - Télécharger un fichier modèle -
-
-
- } - - - - {/**** Ajout d'une UE */} + {/**** Ajout d'un module */} {display_ue && String(display_ue) !== "1" && String(add_one_ue) === "1" &&
-
+
@@ -4074,87 +3432,10 @@ const DisplayPartner_Module_Formation = (props) => { />
-
 
-
ECTS
- { - setp_detail_ects(e.target.value); - seteu_changed("1"); - } - } - - /> -
- -
Seuil Validation
- { - setp_detail_seuil_validation(e.target.value); - seteu_changed("1"); - } - } - /> -
+
 
- - {New_Get_List_Regle_Calcul_Note_UE_result && New_Get_List_Regle_Calcul_Note_UE_result.length > 0 && -
Règle de calcul note   - - (data)._id === String(p_detail_note_ue_calculation_rule_id))[0].calcul_rule}> - - -
- (data)._id === String(p_detail_note_ue_calculation_rule_id))[0].label} - onChange={(event, value) => { - if (value && value._id) { - setp_detail_note_ue_calculation_rule_id(value._id); - - - } else { - setp_detail_note_ue_calculation_rule_id(""); - - } - }} - - renderInput={(params) => - } - /> -
} -
Durée Totale
{
-
-
- -
- Volume Horaire -
- -
-
Durée Totale
- - { - setp_detail_duration(e.target.value); - seteu_changed("1"); - } - } - /> -
- - - -
-
-
- -
- CM -
-
- { - setp_detail_cours_cm(e.target.value); - seteu_changed("1"); - } - } - - /> -
- -
- - TD -
-
- { - setp_detail_cours_td(e.target.value); - seteu_changed("1"); - } - } - - /> -
- -
- - TP -
-
- { - setp_detail_cours_tp(e.target.value); - seteu_changed("1"); - } - } - - /> -
- -
- - TPG -
-
- { - setp_detail_cours_tpg(e.target.value); - seteu_changed("1"); - } - } - - /> -
- - - -
-
-
- -
diff --git a/src/components/Employes.js b/src/components/Employes.js index 9fa914a..e81c2eb 100644 --- a/src/components/Employes.js +++ b/src/components/Employes.js @@ -220,7 +220,7 @@ const Employes = (props) => { }, { - field: 'ismanager', headerName: 'Manager', width: 150, hide: false, + field: 'ismanager', headerName: 'Manager', width: 150, hide: true, valueFormatter: (params) => { if (String(params.value) === "0") return "Non"; @@ -231,6 +231,7 @@ const Employes = (props) => { return String(params.value); }, }, + { field: 'superieur_hierarchie_nom_prenom', headerName: 'Resp. H', minWidth: 180, hide: false, }, { field: 'telephone_mobile', headerName: 'Mobile', minWidth: 180, hide: false, }, { field: 'adr_adresse', headerName: 'Adresse', width: 100, hide: true, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, @@ -244,7 +245,7 @@ const Employes = (props) => { { field: 'fonction', headerName: 'Fonction', width: 150, hide: true, }, { - field: 'is_ent_compte', headerName: 'Compte ENT', width: 150, hide: false, + field: 'is_ent_compte', headerName: 'Compte ENT', width: 150, hide: true, renderCell: (cellValues) => { return (
@@ -258,7 +259,7 @@ const Employes = (props) => { }, { - field: 'is_ent_compte_locked', headerName: 'ENT. Vourouillé', width: 150, hide: false, + field: 'is_ent_compte_locked', headerName: 'ENT. Vourouillé', width: 150, hide: true, renderCell: (cellValues) => { return (
@@ -9999,7 +10000,7 @@ const Employes = (props) => { is_ent_compte: JSON.parse(item).is_ent_compte, is_ent_compte_locked: JSON.parse(item).is_ent_compte_locked, - + superieur_hierarchie_nom_prenom: JSON.parse(item).superieur_hierarchie_nom_prenom, } ))} @@ -10798,7 +10799,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={Boolean(employee_data_edit_mode)} + disabled={true} className="disabled_style" value={p_detail_profil} @@ -10863,7 +10864,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={Boolean(employee_data_edit_mode)} + disabled={true} className="disabled_style" value={p_detail_ismanager_label} @@ -10880,7 +10881,7 @@ const Employes = (props) => { InputLabelProps={{ shrink: true, }} - disabled={Boolean(employee_data_edit_mode)} + disabled={false} className="disabled_style" value={p_detail_ismanager} onChange={(e) => { diff --git a/src/components/Partner_Config_Ftion_Initiale.js b/src/components/Partner_Config_Ftion_Initiale.js index 130976a..a9aa6b9 100644 --- a/src/components/Partner_Config_Ftion_Initiale.js +++ b/src/components/Partner_Config_Ftion_Initiale.js @@ -1435,7 +1435,7 @@ const Partner_Config_Ftion_Initiale = (props) => {
- + {/**/} diff --git a/src/components/Session_Admission_FI.js b/src/components/Session_Admission_FI.js index 5ecaa35..9e4db60 100644 --- a/src/components/Session_Admission_FI.js +++ b/src/components/Session_Admission_FI.js @@ -1115,7 +1115,7 @@ const Session_Admission_FI = (props) => { setp_detail_inscrit_memo(""); setp_detail_inscrit_comment(""); setp_detail_inscrit_num_secu(""); - setp_detail_inscrit_is_rgpd(""); + setp_detail_inscrit_is_rgpd(false); setp_detail_inscrit_situation_famille(""); setp_detail_inscrit_piece_identite_type(""); @@ -1124,9 +1124,9 @@ const Session_Admission_FI = (props) => { setp_detail_inscrit_type_mobilite(""); setp_detail_inscrit_telephone_bis(""); setp_detail_inscrit_nationalite(""); - setp_detail_inscrit_is_handicap(""); + setp_detail_inscrit_is_handicap(false); - setp_detail_inscrit_is_droit_image(""); + setp_detail_inscrit_is_droit_image(false); setp_detail_inscrit_naissance_lieu(""); setp_detail_inscrit_naissance_departement(""); setp_detail_inscrit_naissance_pays(""); @@ -2884,7 +2884,7 @@ const Session_Admission_FI = (props) => { const [p_detail_inscrit_comment, setp_detail_inscrit_comment] = useState(""); const [p_detail_inscrit_num_secu, setp_detail_inscrit_num_secu] = useState(""); - const [p_detail_inscrit_is_rgpd, setp_detail_inscrit_is_rgpd] = useState(""); + const [p_detail_inscrit_is_rgpd, setp_detail_inscrit_is_rgpd] = useState(false); const [p_detail_inscrit_situation_famille, setp_detail_inscrit_situation_famille] = useState(""); const [p_detail_inscrit_piece_identite_type, setp_detail_inscrit_piece_identite_type] = useState(""); @@ -2896,14 +2896,14 @@ const Session_Admission_FI = (props) => { const [p_detail_inscrit_telephone_bis, setp_detail_inscrit_telephone_bis] = useState(""); const [p_detail_inscrit_nationalite, setp_detail_inscrit_nationalite] = useState(""); - const [p_detail_inscrit_is_handicap, setp_detail_inscrit_is_handicap] = useState(""); - const [p_detail_inscrit_is_droit_image, setp_detail_inscrit_is_droit_image] = useState(""); + const [p_detail_inscrit_is_handicap, setp_detail_inscrit_is_handicap] = useState(false); + const [p_detail_inscrit_is_droit_image, setp_detail_inscrit_is_droit_image] = useState(false); const [p_detail_inscrit_naissance_lieu, setp_detail_inscrit_naissance_lieu] = useState(""); const [p_detail_inscrit_naissance_departement, setp_detail_inscrit_naissance_departement] = useState(""); const [p_detail_inscrit_naissance_pays, setp_detail_inscrit_naissance_pays] = useState(""); - + const [p_detail_age, setp_detail_age] = useState(""); const [inscrit_display, setinscrit_display] = useState(""); @@ -3061,11 +3061,10 @@ const Session_Admission_FI = (props) => { setp_detail_inscrit_num_secu(""); } - if (tmp.is_rgpd) { - setp_detail_inscrit_is_rgpd(tmp.is_rgpd); - } else { - setp_detail_inscrit_is_rgpd(""); - } + setp_detail_inscrit_is_rgpd(false) + if (tmp.is_rgpd && tmp.is_rgpd === "1") { + setp_detail_inscrit_is_rgpd(true); + } if (tmp.situation_famille) { setp_detail_inscrit_situation_famille(tmp.situation_famille); @@ -3109,17 +3108,15 @@ const Session_Admission_FI = (props) => { setp_detail_inscrit_nationalite(""); } - if (tmp.is_droit_image) { - setp_detail_inscrit_is_droit_image(tmp.is_droit_image); - } else { - setp_detail_inscrit_is_droit_image(""); - } + setp_detail_inscrit_is_droit_image(false); + if (tmp.is_droit_image && tmp.is_droit_image === "1") { + setp_detail_inscrit_is_droit_image(true); + } - if (tmp.is_handicap) { - setp_detail_inscrit_is_handicap(tmp.is_handicap); - } else { - setp_detail_inscrit_is_handicap(""); - } + setp_detail_inscrit_is_handicap(false); + if (tmp.is_handicap && tmp.is_handicap === "1") { + setp_detail_inscrit_is_handicap(true); + } if (tmp.naissance_lieu) { setp_detail_inscrit_naissance_lieu(tmp.naissance_lieu); @@ -3248,7 +3245,12 @@ const Session_Admission_FI = (props) => { }).catch((error) => { console.warn('Not good man :( Getall_Partner_Session_Inscrit = ', error); setGetall_Partner_Session_Inscrit_api("false"); - alert(" Impossible de recuperer la liste des inscrits"); + // alert(" Impossible de recuperer la liste des inscrits"); + + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de recuperer la liste des candidats"); + setalert_type("error"); + //setmyApimyApiMessage("") }) } @@ -3277,7 +3279,11 @@ const Session_Admission_FI = (props) => { //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); if (file_size > 10000000) { - alert("L'image ne doit pas dépasser un 1 Méga octets"); + // alert("L'image ne doit pas dépasser un 1 Méga octets"); + + setdisplay_alert_mysy("1"); + setalert_message("L'image ne doit pas dépasser un 1 Méga octets"); + setalert_type("error"); return; } setisimgclassSelected(event.target.files[0]); @@ -3320,7 +3326,10 @@ const Session_Admission_FI = (props) => { if (String(result['status']) === String("true")) { setrecord_Inscrit_Image_api("true"); setuserimgclassprofilchanged(""); - alert(" L'image a été enregistrée "); + // alert(" L'image a été enregistrée "); + setdisplay_alert_mysy("1"); + setalert_message(" L'image a été enregistrée "); + setalert_type("success"); } else if (String(result['status']) === String("Err_Connexion")) { alert('Erreur: ' + result['message']); @@ -3335,7 +3344,11 @@ const Session_Admission_FI = (props) => { setLoading(false); console.error('Error:', error); setrecord_Inscrit_Image_api("false"); - alert(" Erreur : Impossible d'enregistrer l'image "); + // alert(" Erreur : Impossible d'enregistrer l'image "); + + setdisplay_alert_mysy("1"); + setalert_message(" Erreur : Impossible d'enregistrer l'image "); + setalert_type("error"); }); @@ -3394,7 +3407,11 @@ const Session_Admission_FI = (props) => { .catch((error) => { setLoading(false); console.error('Error:', error); - alert(" Impossible de supprimer l'image "); + // alert(" Impossible de supprimer l'image "); + + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de supprimer l'image "); + setalert_type("error"); }); } @@ -6831,6 +6848,14 @@ const Session_Admission_FI = (props) => { Getall_Given_Session_Inscrit_Data(newSelectionModel.row._id); + var al = JSON.parse(Getall_Partner_Session_Inscrit_result[newSelectionModel.row.id]) + if (al.date_naissance) { + var date_eval = new Date(moment(al.date_naissance, "DD/MM/YYYY")); + var diff = Date.now() - date_eval.getTime(); + var age = new Date(diff); + var reel_age = Math.abs(age.getUTCFullYear() - 1970); + setp_detail_age(reel_age); + } if (document.getElementById('myRef')) { var divh = document.getElementById('myRef').offsetTop; @@ -6840,8 +6865,6 @@ const Session_Admission_FI = (props) => { }); } - - }} rowsPerPageOptions={[10]} @@ -7117,7 +7140,7 @@ const Session_Admission_FI = (props) => { }}> Age
@@ -7158,6 +7181,22 @@ const Session_Admission_FI = (props) => {
+
+ + +
+
@@ -7676,6 +7715,27 @@ const Session_Admission_FI = (props) => {
+
+ + +
+ +