16/05/2026 - 13h30
parent
100b808754
commit
1ba06aa8a1
|
|
@ -197,6 +197,15 @@ const AddClassManual = (props) => {
|
|||
const columns_list_unite_enseignement = [
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{ field: 'domaine_competence_id', headerName: 'domaine_competence_id', hide: true },
|
||||
{ field: 'competence_id', headerName: 'competence_id', hide: true },
|
||||
|
||||
|
||||
{ field: 'semestre', headerName: 'Semest.', Width: 80, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'domaine_competence_code', headerName: 'Dom. Compétence', maxWidth: 250, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'competence_code', headerName: 'Compétence', maxWidth: 250, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
|
||||
{ field: 'code', headerName: 'Code', maxWidth: 250, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'titre', headerName: 'Titre', minWidth: 150, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'credit', headerName: 'Credit', maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
|
@ -300,7 +309,7 @@ const AddClassManual = (props) => {
|
|||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{ field: 'code', headerName: 'Code', maxWidth: 250, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'titre', headerName: 'Titre', minWidth: 150, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
|
||||
{
|
||||
field: 'pres_dist_hyp', headerName: 'Animation', maxWidth: 180,
|
||||
renderCell: (cellValues) => {
|
||||
|
|
@ -768,6 +777,14 @@ const AddClassManual = (props) => {
|
|||
var local_coefficient = JSON.parse(x).coefficient;
|
||||
var local_seuil_validation = JSON.parse(x).seuil_validation;
|
||||
|
||||
var local_semestre = JSON.parse(x).semestre;
|
||||
var local_domaine_competence_id = JSON.parse(x).domaine_competence_id;
|
||||
var local_domaine_competence_code = JSON.parse(x).domaine_competence_code;
|
||||
|
||||
var local_competence_id = JSON.parse(x).competence_id;
|
||||
var local_competence_code = JSON.parse(x).competence_code;
|
||||
|
||||
|
||||
|
||||
|
||||
//---
|
||||
|
|
@ -783,6 +800,13 @@ const AddClassManual = (props) => {
|
|||
"coefficient": local_coefficient,
|
||||
"seuil_validation": local_seuil_validation,
|
||||
|
||||
"semestre": local_semestre,
|
||||
"domaine_competence_id": local_domaine_competence_id,
|
||||
"domaine_competence_code": local_domaine_competence_code,
|
||||
"competence_id": local_competence_id,
|
||||
"competence_code": local_competence_code,
|
||||
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
|
@ -799,6 +823,11 @@ const AddClassManual = (props) => {
|
|||
"is_noted": "",
|
||||
"coefficient": "",
|
||||
"seuil_validation": "",
|
||||
"semestre": "",
|
||||
"domaine_competence_id": "",
|
||||
"domaine_competence_code": "",
|
||||
"competence_id": "",
|
||||
"competence_code": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
|
@ -1045,6 +1074,75 @@ const AddClassManual = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
const [Update_Class_UE_From_Ref_pedago_api, setUpdate_Class_UE_From_Ref_pedago_api] = useState();
|
||||
const [Update_Class_UE_From_Ref_pedago_message, setUpdate_Class_UE_From_Ref_pedago_message] = useState();
|
||||
const [Update_Class_UE_From_Ref_pedago_result, setUpdate_Class_UE_From_Ref_pedago_result] = useState();
|
||||
function Update_Class_UE_From_Ref_pedago(local_new_ref_pedago_id) {
|
||||
setLoading(true);
|
||||
var form = new FormData();
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
|
||||
if (props.mytrainingclass['class_id'])
|
||||
form.append("class_id", props.mytrainingclass['class_id']);
|
||||
else
|
||||
form.append("class_id", selected_class_id);
|
||||
form.append("ref_pedo_id", local_new_ref_pedago_id);
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Class_UE_From_Ref_pedago/";
|
||||
|
||||
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
setLoading(false);
|
||||
// console.log(" In Update_Class_UE_From_Ref_pedago res.data.status = " + res.data.status);
|
||||
//console.log(" In Update_Class_UE_From_Ref_pedago res.data.message r_class = " + res.data.message);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setUpdate_Class_UE_From_Ref_pedago_api("true");
|
||||
setUpdate_Class_UE_From_Ref_pedago_result(res.data.message);
|
||||
clean_financial_data_fields();
|
||||
|
||||
Getall_Class_List_UE();
|
||||
Getall_Class_List_Evalution();
|
||||
|
||||
Getall_Class_Finance_Caracteristic();
|
||||
|
||||
Dialog_Financial_Data_handleClose_buton();
|
||||
// alert(res.data.message)
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("success");
|
||||
|
||||
}
|
||||
else {
|
||||
setUpdate_Class_UE_From_Ref_pedago_api("false");
|
||||
setUpdate_Class_UE_From_Ref_pedago_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('Update_Class_UE_From_Ref_pedago : Not good man :( mysearchtext = ' + error);
|
||||
setUpdate_Class_UE_From_Ref_pedago_api("false");
|
||||
// alert(" Impossible d'ajouter l'évaluation l'UE ");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Impossible de mettre à jour le référentiel");
|
||||
setalert_type("error");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
const [Delete_Given_Financial_Caracteristique_api, setDelete_Given_Financial_Caracteristique_api] = useState();
|
||||
const [Delete_Given_Financial_Caracteristique_message, setDelete_Given_Financial_Caracteristique_message] = useState();
|
||||
const [Delete_Given_Financial_Caracteristique_result, setDelete_Given_Financial_Caracteristique_result] = useState();
|
||||
|
|
@ -1753,6 +1851,7 @@ const AddClassManual = (props) => {
|
|||
|
||||
const [mytraining_ref_peda_id, setmytraining_ref_peda_id] = useState("");
|
||||
|
||||
const [temporary_ref_peda_id, settemporary_ref_peda_id] = useState("");
|
||||
|
||||
const [New_Getall_Parter_bloc_competence_result, setNew_Getall_Parter_bloc_competence_result] = useState([]);
|
||||
|
||||
|
|
@ -4460,6 +4559,9 @@ const AddClassManual = (props) => {
|
|||
}
|
||||
|
||||
function submenu_unite_enseignement() {
|
||||
Getall_Class_List_UE();
|
||||
|
||||
|
||||
setsubmenu("unite_enseignement");
|
||||
submenu_color_management("unite_enseignement");
|
||||
}
|
||||
|
|
@ -6748,6 +6850,28 @@ const AddClassManual = (props) => {
|
|||
setselected_ue_coefficient("1");
|
||||
};
|
||||
|
||||
|
||||
const [Dialog_Change_Ref_Pedago_open, setDialog_Change_Ref_Pedago_open] = React.useState(false);
|
||||
function Dialog_1_handle_change_ref_pedago(message) {
|
||||
setDialog_1_message(message);
|
||||
setDialog_Change_Ref_Pedago_open(true);
|
||||
}
|
||||
|
||||
const Dialog_1_handleClose = () => {
|
||||
|
||||
};
|
||||
|
||||
const Dialog_1_handleClose_buton = () => {
|
||||
setDialog_Change_Ref_Pedago_open(false);
|
||||
};
|
||||
|
||||
|
||||
function Dialog_1_handle_change_ref_pedago(message) {
|
||||
|
||||
setDialog_1_message(message);
|
||||
setDialog_Change_Ref_Pedago_open(true);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="addclassmanual">
|
||||
{isLoading && <div className="loader-container">
|
||||
|
|
@ -6766,6 +6890,94 @@ const AddClassManual = (props) => {
|
|||
{/*** FIN Affichage des messages d'alerte*/}
|
||||
|
||||
|
||||
{/* Dialog Warning referentiel pédago */}
|
||||
<Dialog
|
||||
open={Dialog_Change_Ref_Pedago_open}
|
||||
// onClose={Dialog_1_handleClose}
|
||||
static
|
||||
onClose={() => null}
|
||||
|
||||
PaperProps={{
|
||||
|
||||
|
||||
className: classes.paper, // Apply the paper style
|
||||
style: {
|
||||
overflowY: 'unset',
|
||||
position: 'absolute',
|
||||
top: '15rem',
|
||||
margin: "2px",
|
||||
},
|
||||
}}
|
||||
hideBackdrop={true}
|
||||
disableScrollLock
|
||||
classes={{
|
||||
paper: classes.dialog
|
||||
}}
|
||||
|
||||
PaperComponent={PaperComponent}
|
||||
aria-labelledby="draggable-dialog-title"
|
||||
|
||||
|
||||
>
|
||||
|
||||
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title" style={{ fontFamily: 'DM Sans', color: '#0a2a4d' }} > Modifier le référentiel ?</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText style={{ fontFamily: 'DM Sans' }}>
|
||||
|
||||
<font color="red"> /!\ Cette action peut entraîner la modification des notes et évaluations déjà enregistrées. <br /> <br />
|
||||
Vérifiez les impacts avant de confirmer. </font>
|
||||
|
||||
</DialogContentText>
|
||||
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
<IconButton
|
||||
autoFocus
|
||||
onClick={Dialog_1_handleClose_buton}
|
||||
color="primary"
|
||||
className={classes.customizedButton}
|
||||
>
|
||||
<CancelPresentationIcon />
|
||||
</IconButton>
|
||||
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left", textAlign: 'left' }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
console.log(" ## temporary_ref_peda_id == ", temporary_ref_peda_id)
|
||||
if (temporary_ref_peda_id !== mytraining_ref_peda_id) {
|
||||
if (temporary_ref_peda_id.length > 3) {
|
||||
Update_Class_UE_From_Ref_pedago(temporary_ref_peda_id);
|
||||
}
|
||||
setdatamodification("1");
|
||||
setmytraining_ref_peda_id(temporary_ref_peda_id);
|
||||
}
|
||||
Dialog_1_handleClose_buton();
|
||||
}}> Valider </button>
|
||||
|
||||
</div>
|
||||
<div style={{ "width": "45%", "float": "right", textAlign: 'right' }}>
|
||||
<button
|
||||
className="gest_bton_popup_annuler"
|
||||
onClick={() => {
|
||||
Dialog_1_handleClose_buton();
|
||||
settemporary_ref_peda_id("")
|
||||
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
{/* FIN Dialog Warning referentiel pédago */}
|
||||
|
||||
|
||||
{/* Dialog pour gerer les Module_Ftion */}
|
||||
<Dialog
|
||||
open={Dialog_Module_Ftion_open}
|
||||
|
|
@ -6852,7 +7064,7 @@ const AddClassManual = (props) => {
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div className="session_caract_Dialog"> <b> Est Evalué </b><br />
|
||||
|
||||
|
|
@ -7796,7 +8008,7 @@ const AddClassManual = (props) => {
|
|||
}}
|
||||
>
|
||||
<DataGrid
|
||||
checkboxSelection
|
||||
// checkboxSelection
|
||||
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setselectionModel_list_unite_enseignement(newSelectionModel);
|
||||
|
|
@ -7815,10 +8027,10 @@ const AddClassManual = (props) => {
|
|||
_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,
|
||||
|
|
@ -7962,7 +8174,7 @@ const AddClassManual = (props) => {
|
|||
}}
|
||||
>
|
||||
<DataGrid
|
||||
checkboxSelection
|
||||
// checkboxSelection
|
||||
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setselectionModel_list_unite_enseignement(newSelectionModel);
|
||||
|
|
@ -7988,6 +8200,13 @@ const AddClassManual = (props) => {
|
|||
coefficient: JSON.parse(item).coefficient,
|
||||
seuil_validation: JSON.parse(item).seuil_validation,
|
||||
|
||||
semestre: JSON.parse(item).semestre,
|
||||
domaine_competence_id: JSON.parse(item).domaine_competence_id,
|
||||
domaine_competence_code: JSON.parse(item).domaine_competence_code,
|
||||
competence_id: JSON.parse(item).competence_id,
|
||||
competence_code: JSON.parse(item).competence_code,
|
||||
|
||||
|
||||
duration: JSON.parse(item).duration,
|
||||
duration_unite: JSON.parse(item).duration_unite,
|
||||
duration_concat: JSON.parse(item).duration_concat,
|
||||
|
|
@ -8911,13 +9130,14 @@ const AddClassManual = (props) => {
|
|||
value={New_Getall_Parter_bloc_competence_result.filter((data) => (data)._id === String(mytraining_ref_peda_id))[0].label}
|
||||
|
||||
onChange={(event, value) => {
|
||||
setdatamodification("1");
|
||||
|
||||
if (value && value._id) {
|
||||
setmytraining_ref_peda_id(value._id);
|
||||
settemporary_ref_peda_id(value._id);
|
||||
} else {
|
||||
setmytraining_ref_peda_id("");
|
||||
settemporary_ref_peda_id("");
|
||||
}
|
||||
|
||||
setDialog_Change_Ref_Pedago_open(true);
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="Référentiel" />
|
||||
|
|
|
|||
|
|
@ -2774,7 +2774,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
<div style={{ width: '100%', float: 'left' }}>
|
||||
|
||||
<div className="Grid_2_col_sub_colone_header">
|
||||
Infos Générales 01
|
||||
Infos Générales
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
|
|
@ -2947,7 +2947,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
</div>}
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) !== "1" &&
|
||||
<div className="session_caract"> <b> Seuil Validation 01</b> <br />
|
||||
<div className="session_caract"> <b> Seuil Validation</b> <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
|
@ -2967,7 +2967,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) === "1" &&
|
||||
<div className="session_caract"> Seuil Validation 02<br />
|
||||
<div className="session_caract"> Seuil Validation<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
|
@ -4088,7 +4088,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
<div style={{ width: '100%', float: 'left' }}>
|
||||
|
||||
<div className="Grid_2_col_sub_colone_header">
|
||||
Infos Générales 02
|
||||
Infos Générales
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
|
|
|
|||
|
|
@ -363,16 +363,34 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
|
||||
{ field: 'semestre', headerName: 'Semestre', hide: false, Width: 50, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'diplome_code', headerName: 'Diplome', hide: false, maxWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'credit', headerName: 'credit', hide: false, Width: 50, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
|
||||
{ field: 'ue_code', headerName: 'UE Code', flex: 1, hide: false, maxWidth: 250, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'ue_titre', headerName: 'UE Titre', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
{ field: 'competence_code', headerName: 'Competence Code', flex: 1, hide: false, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'competence_description', headerName: 'Competence desc.', flex: 1, hide: false, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'competence_description', headerName: 'Competence desc.', flex: 1, hide: true, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
{ field: 'domaine_competence_code', headerName: 'Domaine. Compét. Code', flex: 1, hide: false, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'domaine_competence_description', headerName: 'Domaine. Compét. desc.', flex: 1, hide: false, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'domaine_competence_description', headerName: 'Domaine. Compét. desc.', flex: 1, hide: true, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
{ field: 'coefficient', headerName: 'Coef.', hide: false, Width: 50, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'seuil_validation', headerName: 'Seuil V.', hide: false, Width: 50, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{
|
||||
field: 'is_noted', headerName: 'Noté', hide: false, Width: 50, renderCell: (params) => <ExpandableCell_50 {...params} />,
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
|
||||
{cellValues.row.is_noted && String(cellValues.row.is_noted) === "1" && "Oui"}
|
||||
{cellValues.row.is_noted && String(cellValues.row.is_noted) === "0" && "Non"}
|
||||
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
},
|
||||
{ field: 'pres_dist_hyp', headerName: 'Animation', hide: true, Width: 50, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
|
||||
{
|
||||
|
|
@ -826,7 +844,7 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
const [p_detail_bloc_competence_pedago_contraintes, setp_detail_bloc_competence_pedago_contraintes] = useState("");
|
||||
const [p_detail_bloc_competence_pedago_divers, setp_detail_bloc_competence_pedago_divers] = useState("");
|
||||
|
||||
//---
|
||||
|
||||
const [p_detail_bloc_competence_pedago_context_pro, setp_detail_bloc_competence_pedago_context_pro] = useState("");
|
||||
const [p_detail_bloc_competence_pedago_crit_eval, setp_detail_bloc_competence_pedago_crit_eval] = useState("");
|
||||
const [p_detail_bloc_competence_pedago_connaissance, setp_detail_bloc_competence_pedago_connaissance] = useState("");
|
||||
|
|
@ -1016,7 +1034,7 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
var new_data2 = [];
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
//---
|
||||
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_internal_url = JSON.parse(x).class_internal_url;
|
||||
|
|
@ -1025,7 +1043,7 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
|
||||
|
||||
|
||||
//---
|
||||
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
|
|
@ -1154,7 +1172,6 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
|
||||
|
||||
|
||||
|
||||
if (competence_pedago.tab_ue_competence_with_code)
|
||||
setp_detail_pole_bloc_competence_pedago_tab_ue_competence_with_code(competence_pedago.tab_ue_competence_with_code);
|
||||
else
|
||||
|
|
@ -1304,6 +1321,13 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
|
||||
}
|
||||
|
||||
const New_Option_Is_Noted = [
|
||||
{ "id": "1", "label": "Oui", "value": "1" },
|
||||
{ "id": "0", "label": "Non", "value": "0" },
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
]
|
||||
|
||||
|
||||
function Annule_modif_champs() {
|
||||
|
||||
Get_Given_bloc_competence_pedago_data(selected_id);
|
||||
|
|
@ -1514,14 +1538,13 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
var new_data2 = [];
|
||||
|
||||
const new_data = res.data.message.map((x) => {
|
||||
//---
|
||||
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var code = JSON.parse(x).code;
|
||||
var description = JSON.parse(x).description;
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
|
|
@ -1614,14 +1637,14 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
var new_data2 = [];
|
||||
|
||||
const new_data = res.data.message.map((x) => {
|
||||
//---
|
||||
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var code = JSON.parse(x).code;
|
||||
var description = JSON.parse(x).description;
|
||||
|
||||
|
||||
//---
|
||||
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
|
|
@ -1747,8 +1770,11 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
setselected_ue_comptence_to_add_id("");
|
||||
setselected_semestre_to_add_id("");
|
||||
setselected_diplome_to_add_id("");
|
||||
|
||||
|
||||
setselected_coeff_to_add("1");
|
||||
setselected_credit_to_add("1");
|
||||
setselected_seuil_validation_to_add("1");
|
||||
setselected_mode_animation_to_add("2");
|
||||
setselected_is_noted_to_add("1");
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1786,13 +1812,12 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
var new_data2 = [];
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_code = JSON.parse(x).code;
|
||||
var local_description = JSON.parse(x).description;
|
||||
|
||||
//---
|
||||
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
|
|
@ -1882,15 +1907,13 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
var new_data2 = [];
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
//---
|
||||
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_code = JSON.parse(x).code;
|
||||
var local_titre = JSON.parse(x).titre;
|
||||
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
|
|
@ -1902,7 +1925,7 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
new_data2.push(node);
|
||||
});
|
||||
|
||||
//---
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
|
|
@ -1943,6 +1966,19 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
const [selected_semestre_to_add_id, setselected_semestre_to_add_id] = useState("");
|
||||
const [selected_diplome_to_add_id, setselected_diplome_to_add_id] = useState("");
|
||||
|
||||
const [selected_coeff_to_add, setselected_coeff_to_add] = useState("1");
|
||||
const [selected_credit_to_add, setselected_credit_to_add] = useState("1");
|
||||
const [selected_seuil_validation_to_add, setselected_seuil_validation_to_add] = useState("1");
|
||||
const [selected_mode_animation_to_add, setselected_mode_animation_to_add] = useState("2");
|
||||
const [selected_is_noted_to_add, setselected_is_noted_to_add] = useState("1");
|
||||
|
||||
const New_Option_pres_dist_hyp = [
|
||||
{ "id": "1", "label": "Distanciel", "value": "1" },
|
||||
{ "id": "2", "label": "Hybride", "value": "2" },
|
||||
{ "id": "0", "label": "Présentiel", "value": "0" },
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
]
|
||||
|
||||
const [selected_ue_domaine_comptence_to_add_id, setselected_ue_domaine_comptence_to_add_id] = useState("");
|
||||
|
||||
|
||||
|
|
@ -1963,6 +1999,14 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
form.append("semestre", local_semestre);
|
||||
form.append("diplome_id", local_diplome);
|
||||
|
||||
|
||||
form.append("coefficient", selected_coeff_to_add);
|
||||
form.append("seuil_validation", selected_seuil_validation_to_add);
|
||||
form.append("is_noted", selected_is_noted_to_add);
|
||||
form.append("pres_dist_hyp", selected_mode_animation_to_add);
|
||||
form.append("credit", selected_credit_to_add);
|
||||
|
||||
|
||||
console.log(" ## form = ", form)
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_tab_UE_And_Competence_To_Bloc_Competence/";
|
||||
|
|
@ -2114,14 +2158,14 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
var new_data2 = [];
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
//---
|
||||
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_code = JSON.parse(x).code;
|
||||
var local_description = JSON.parse(x).description;
|
||||
|
||||
|
||||
//---
|
||||
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
|
|
@ -2133,7 +2177,7 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
new_data2.push(node);
|
||||
});
|
||||
|
||||
//---
|
||||
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
|
|
@ -2360,6 +2404,33 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Diplome<br />
|
||||
{New_Getall_Parter_config_diplome_result && New_Getall_Parter_config_diplome_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="detail_config_code"
|
||||
id="detail_config_code"
|
||||
fullWidth
|
||||
value={New_Getall_Parter_config_diplome_result.filter((data) => (data)._id === String(selected_diplome_to_add_id))[0].label}
|
||||
options={New_Getall_Parter_config_diplome_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setselected_diplome_to_add_id(value._id);
|
||||
}
|
||||
else {
|
||||
setselected_diplome_to_add_id("");
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Unité d'enseignement </b>
|
||||
{New_Getall_Partner_List_UE_result && New_Getall_Partner_List_UE_result.length > 0 && <Autocomplete
|
||||
|
|
@ -2389,159 +2460,257 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
/>}
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog"> <b>Type Compétence </b> <br />
|
||||
{New_Option_Compet_Or_Domain && New_Option_Compet_Or_Domain.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="field_type_pi"
|
||||
id="field_type_pi"
|
||||
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div className="session_caract_Dialog" style={{ width: '50%', float: 'left' }}> <b>Type Compétence </b> <br />
|
||||
{New_Option_Compet_Or_Domain && New_Option_Compet_Or_Domain.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="field_type_pi"
|
||||
id="field_type_pi"
|
||||
|
||||
fullWidth
|
||||
options={New_Option_Compet_Or_Domain}
|
||||
value={New_Option_Compet_Or_Domain.filter((data) => (data).value === String(type_association))[0].label}
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
settype_association(value.value);
|
||||
|
||||
if (value.value === "0") {
|
||||
setselected_ue_domaine_comptence_to_add_id("");
|
||||
}
|
||||
else if (value.value === "1") {
|
||||
setselected_ue_comptence_to_add_id("");
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
settype_association("");
|
||||
setselected_ue_comptence_to_add_id("");
|
||||
setselected_ue_domaine_comptence_to_add_id("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{type_association && type_association === "0" && <div className="session_caract_Dialog" style={{ width: '50%', float: 'left' }}> <b> Compétence </b>
|
||||
{NewGetall_Partner_Competence_Pedago_result && NewGetall_Partner_Competence_Pedago_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="raison_cloture"
|
||||
id="raison_cloture"
|
||||
fullWidth
|
||||
options={New_Option_Compet_Or_Domain}
|
||||
value={New_Option_Compet_Or_Domain.filter((data) => (data).value === String(type_association))[0].label}
|
||||
options={NewGetall_Partner_Competence_Pedago_result}
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
settype_association(value.value);
|
||||
|
||||
if (value.value === "0") {
|
||||
setselected_ue_domaine_comptence_to_add_id("");
|
||||
}
|
||||
else if (value.value === "1") {
|
||||
setselected_ue_comptence_to_add_id("");
|
||||
}
|
||||
|
||||
if (value && value._id) {
|
||||
setselected_ue_comptence_to_add_id(value._id);
|
||||
|
||||
} else {
|
||||
settype_association("");
|
||||
setselected_ue_comptence_to_add_id("");
|
||||
setselected_ue_domaine_comptence_to_add_id("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
{type_association && type_association === "1" && <div className="session_caract_Dialog" style={{ width: '50%', float: 'left' }}> <b> Domaine de compétence </b>
|
||||
{New_Getall_Partner_Domaine_Competence_result && New_Getall_Partner_Domaine_Competence_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="raison_cloture"
|
||||
id="raison_cloture"
|
||||
fullWidth
|
||||
options={New_Getall_Partner_Domaine_Competence_result}
|
||||
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setselected_ue_domaine_comptence_to_add_id(value._id);
|
||||
|
||||
} else {
|
||||
setselected_ue_domaine_comptence_to_add_id("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div className="session_caract_Dialog" style={{ width: '50%', float: 'left' }}>Crédit ECTS <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_ue_credit"
|
||||
id="detail_ue_credit"
|
||||
|
||||
{type_association && type_association === "0" && <div className="session_caract_Dialog" > <b> Compétence </b>
|
||||
{NewGetall_Partner_Competence_Pedago_result && NewGetall_Partner_Competence_Pedago_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="raison_cloture"
|
||||
id="raison_cloture"
|
||||
fullWidth
|
||||
options={NewGetall_Partner_Competence_Pedago_result}
|
||||
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setselected_ue_comptence_to_add_id(value._id);
|
||||
|
||||
} else {
|
||||
setselected_ue_comptence_to_add_id("");
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
type="number"
|
||||
fullWidth
|
||||
value={selected_credit_to_add}
|
||||
onChange={(e) => {
|
||||
setselected_credit_to_add(e.target.value);
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: '50%', float: 'left' }}>Semestre<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_ue_semestre"
|
||||
id="detail_ue_semestre"
|
||||
|
||||
{type_association && type_association === "1" && <div className="session_caract_Dialog" > <b> Domaine de compétence </b>
|
||||
{New_Getall_Partner_Domaine_Competence_result && New_Getall_Partner_Domaine_Competence_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="raison_cloture"
|
||||
id="raison_cloture"
|
||||
fullWidth
|
||||
options={New_Getall_Partner_Domaine_Competence_result}
|
||||
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setselected_ue_domaine_comptence_to_add_id(value._id);
|
||||
|
||||
} else {
|
||||
setselected_ue_domaine_comptence_to_add_id("");
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
type="number"
|
||||
fullWidth
|
||||
value={selected_semestre_to_add_id}
|
||||
onChange={(e) => {
|
||||
setselected_semestre_to_add_id(e.target.value);
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
<div className="session_caract_Dialog"> Diplome<br />
|
||||
{New_Getall_Parter_config_diplome_result && New_Getall_Parter_config_diplome_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="detail_config_code"
|
||||
id="detail_config_code"
|
||||
fullWidth
|
||||
value={New_Getall_Parter_config_diplome_result.filter((data) => (data)._id === String(selected_diplome_to_add_id))[0].label}
|
||||
options={New_Getall_Parter_config_diplome_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value._id) {
|
||||
setselected_diplome_to_add_id(value._id);
|
||||
}
|
||||
else {
|
||||
setselected_diplome_to_add_id("");
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog">Semestre<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_ue_semestre"
|
||||
id="detail_ue_semestre"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
type="number"
|
||||
fullWidth
|
||||
value={selected_semestre_to_add_id}
|
||||
onChange={(e) => {
|
||||
setselected_semestre_to_add_id(e.target.value);
|
||||
|
||||
}
|
||||
}
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div className="session_caract_Dialog" style={{ width: '50%', float: 'left' }}> Coefficient<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_ue_coeff"
|
||||
id="detail_ue_coeff"
|
||||
|
||||
/>
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
type="number"
|
||||
fullWidth
|
||||
value={selected_coeff_to_add}
|
||||
onChange={(e) => {
|
||||
setselected_coeff_to_add(e.target.value);
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: '50%', float: 'left' }}>Seuil validation <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_ue_seuil_validation"
|
||||
id="detail_ue_seuil_validation"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
type="number"
|
||||
fullWidth
|
||||
value={selected_seuil_validation_to_add}
|
||||
onChange={(e) => {
|
||||
setselected_seuil_validation_to_add(e.target.value);
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style={{ width: '100%', float: 'left' }}>
|
||||
<div className="session_caract_Dialog" style={{ width: '50%', float: 'left' }}> Est Evalué <br />
|
||||
{New_Option_Is_Noted && New_Option_Is_Noted.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="detail_ue_is_noted"
|
||||
id="detail_ue_is_noted"
|
||||
value={New_Option_Is_Noted.filter((data) => (data).id === String(selected_is_noted_to_add))[0].label}
|
||||
|
||||
fullWidth
|
||||
|
||||
options={New_Option_Is_Noted}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setselected_is_noted_to_add(value.value);
|
||||
} else {
|
||||
setselected_is_noted_to_add("");
|
||||
}
|
||||
}}
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>}
|
||||
/>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: '50%', float: 'left' }}>Mode d'animation <br />
|
||||
{New_Option_pres_dist_hyp && New_Option_pres_dist_hyp.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="detail_ue_animation"
|
||||
id="detail_ue_animation"
|
||||
value={New_Option_pres_dist_hyp.filter((data) => (data).id === String(selected_mode_animation_to_add))[0].label}
|
||||
|
||||
fullWidth
|
||||
|
||||
options={New_Option_pres_dist_hyp}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setselected_mode_animation_to_add(value.value);
|
||||
} else {
|
||||
setselected_mode_animation_to_add("");
|
||||
}
|
||||
}}
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>}
|
||||
/>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
|
|
@ -3925,6 +4094,14 @@ const Module_Bloc_bloc_competence_pedagogique = (props) => {
|
|||
diplome_id: (item).diplome_id,
|
||||
diplome_code: (item).diplome_code,
|
||||
|
||||
|
||||
coefficient: (item).coefficient,
|
||||
seuil_validation: (item).seuil_validation,
|
||||
is_noted: (item).is_noted,
|
||||
pres_dist_hyp: (item).pres_dist_hyp,
|
||||
credit: (item).credit,
|
||||
|
||||
|
||||
}
|
||||
))}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useRef, useState, useEffect } from "react";
|
||||
import TextField from '@mui/material/TextField';
|
||||
|
||||
import Module_Historique_Action from "./Module_Historique_Action";
|
||||
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
||||
import Button from '@mui/material/Button';
|
||||
import axios from "axios";
|
||||
|
|
@ -240,7 +240,7 @@ const Notes_Evaluation = (props) => {
|
|||
return (
|
||||
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
|
||||
{New_Getall_Partner_Type_Evalution_List_result && New_Getall_Partner_Type_Evalution_List_result.length > 0 && <nav>
|
||||
{New_Getall_Partner_Type_Evalution_List_result.filter((data) => (data)._id === String(cellValues.row.type_eval_id))[0].label}
|
||||
{New_Getall_Partner_Type_Evalution_List_result.filter((data) => (data)._id === String(cellValues.row.type_eval_id))[0].label}
|
||||
</nav>}
|
||||
|
||||
|
||||
|
|
@ -550,10 +550,17 @@ const Notes_Evaluation = (props) => {
|
|||
{ field: 'groupe', headerName: 'groupe', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'note', headerName: 'Note', width: 200, editable: Boolean(props.check_user_acces_right("note_evaluation", "write")), renderCell: (params) => <ExpandableCell_50_bg_hiligt {...params} />, align: "center", },
|
||||
|
||||
{
|
||||
field: 'is_validated', headerName: 'Validé', width: 100, hide: false, editable: false, type: 'boolean',
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
field: 'publish', headerName: 'Publié (ENT)', width: 100, hide: false, editable: false, type: 'boolean',
|
||||
|
||||
},
|
||||
|
||||
|
||||
{ field: 'convocation_send_date', headerName: 'Conv. Envoyé', width: 200, editable: false, renderCell: (params) => <ExpandableCell_50_bg_hiligt {...params} />, align: "center", },
|
||||
{ field: 'convocation_send_type', headerName: 'Conv. Par', width: 200, editable: false, renderCell: (params) => <ExpandableCell_50_bg_hiligt {...params} />, align: "center", },
|
||||
|
||||
|
|
@ -1116,6 +1123,9 @@ const Notes_Evaluation = (props) => {
|
|||
var local_email = JSON.parse(x).email;
|
||||
var local_note = JSON.parse(x).note;
|
||||
var local_publish = JSON.parse(x).publish;
|
||||
var local_is_validated = JSON.parse(x).is_validated;
|
||||
|
||||
|
||||
var local_inscription_id = JSON.parse(x).inscription_id;
|
||||
var local_group_inscription_id = JSON.parse(x).group_inscription_id;
|
||||
|
||||
|
|
@ -1132,6 +1142,7 @@ const Notes_Evaluation = (props) => {
|
|||
"prenom": local_prenom,
|
||||
"email": local_email,
|
||||
"note": local_note,
|
||||
"is_validated": local_is_validated,
|
||||
"publish": local_publish,
|
||||
"note_changed": "0",
|
||||
"inscription_id": local_inscription_id,
|
||||
|
|
@ -1143,23 +1154,6 @@ const Notes_Evaluation = (props) => {
|
|||
new_data2.push(node);
|
||||
});
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"nom": "",
|
||||
"prenom": "",
|
||||
"email": "",
|
||||
"note": "",
|
||||
"publish": "",
|
||||
"note_changed": "0",
|
||||
"inscription_id": "",
|
||||
"group_inscription_id": "",
|
||||
"convocation_send_date": "",
|
||||
"convocation_send_type": "",
|
||||
};
|
||||
// new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Getall_Evaluation_Participant_List_result(new_data2);
|
||||
|
|
@ -1815,7 +1809,7 @@ const Notes_Evaluation = (props) => {
|
|||
if (new_data2.length > 0)
|
||||
setNew_Getall_Partner_Type_Evalution_List_result(new_data2);
|
||||
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
setGetall_Partner_Type_Evalution_List_api("false");
|
||||
|
|
@ -1839,8 +1833,12 @@ const Notes_Evaluation = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
const [history_securite_read, sethistory_securite_read] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
sethistory_securite_read(props.check_user_acces_right("historique", "read"))
|
||||
|
||||
Getall_Partner_Class_Reduice_Fields();
|
||||
Getall_Partner_Session_Reduice_Fields();
|
||||
Getall_Partner_List_UE();
|
||||
|
|
@ -2398,6 +2396,13 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
}
|
||||
|
||||
async function submenu_historique() {
|
||||
|
||||
await sleep(5);
|
||||
setsubmenu("historique");
|
||||
inactive_active_menu_header("historique");
|
||||
}
|
||||
|
||||
async function submenu_piece_jointe() {
|
||||
await sleep(5);
|
||||
setsubmenu("piece_jointe");
|
||||
|
|
@ -2426,7 +2431,7 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
// Cette fontion desactive tous les menu header et reactive just le menu_header concerné
|
||||
function inactive_active_menu_header(current_menu_header) {
|
||||
const list_menu_header_names = ['detail_evaluation', 'apprenant', 'ressources', 'selection', 'piece_jointe']
|
||||
const list_menu_header_names = ['detail_evaluation', 'apprenant', 'ressources', 'selection', 'piece_jointe', 'historique']
|
||||
for (let i = 0; i < list_menu_header_names.length; i++) {
|
||||
if (document.getElementsByName(String(list_menu_header_names[i])) && document.getElementsByName(String(list_menu_header_names[i]))[0]) {
|
||||
document.getElementsByName(String(list_menu_header_names[i]))[0].style.fontWeight = "400";
|
||||
|
|
@ -2459,6 +2464,8 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
var tab_mongo_preins_ids = [];
|
||||
|
||||
var note_non_valide = 0
|
||||
|
||||
for (var i = 0; i < liste_apprenant_id.length; i++) {
|
||||
|
||||
var line = Getall_Evaluation_Participant_List_result[liste_apprenant_id[i]]
|
||||
|
|
@ -2468,6 +2475,12 @@ const Notes_Evaluation = (props) => {
|
|||
//console.log(" line_json['_id'] = ", line_json['_id']);
|
||||
tab_mongo_preins_ids.push(line_json['_id'])
|
||||
|
||||
if (!line_json['is_validated']) {
|
||||
note_non_valide = note_non_valide + 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (String(actionmass_eval_inscr_val) === String("delete_inscr")) {
|
||||
|
|
@ -2481,6 +2494,12 @@ const Notes_Evaluation = (props) => {
|
|||
}
|
||||
|
||||
if (String(actionmass_eval_inscr_val) === String("publish_note")) {
|
||||
if (note_non_valide > 0) {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Publication impossible. Seules les notes validées peuvent être publiées.");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
Publish_ENT_Evaluation_Participants_Notes(tab_mongo_preins_ids, "1"); // zzzzzzzzzzzzzzzzzz
|
||||
setactionmass_eval_inscr_val("");
|
||||
}
|
||||
|
|
@ -2488,6 +2507,12 @@ const Notes_Evaluation = (props) => {
|
|||
Publish_ENT_Evaluation_Participants_Notes(tab_mongo_preins_ids, "0"); // zzzzzzzzzzzzzzzzzz
|
||||
setactionmass_eval_inscr_val("");
|
||||
}
|
||||
|
||||
if (String(actionmass_eval_inscr_val) === String("valide_note")) {
|
||||
Valide_Evaluation_Participants_Notes(tab_mongo_preins_ids, "1"); // zzzzzzzzzzzzzzzzzz
|
||||
setactionmass_eval_inscr_val("");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const [actionmass_eval_inscr_val, setactionmass_eval_inscr_val] = useState();
|
||||
|
|
@ -2495,6 +2520,7 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
const New_Option_PreInscription = [
|
||||
{ "id": "send_convocation", "label": "Envoyer Convocation", "value": "send_convocation" },
|
||||
{ "id": "valide_note", "label": "Valider Note", "value": "valide_note" },
|
||||
{ "id": "publish_note", "label": "Publier les notes sur l'ENT", "value": "publish_note" },
|
||||
{ "id": "un_publish_note", "label": "De-publier les notes sur l'ENT", "value": "un_publish_note" },
|
||||
{ "id": "delete_inscr", "label": "Supprimer", "value": "delete_inscr" },
|
||||
|
|
@ -2619,6 +2645,60 @@ const Notes_Evaluation = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const [Valide_Evaluation_Participants_Notes_api, setValide_Evaluation_Participants_Notes_api] = useState();
|
||||
const [Valide_Evaluation_Participants_Notes_message, setValide_Evaluation_Participants_Notes_message] = useState();
|
||||
const [Valide_Evaluation_Participants_Notes_result, setValide_Evaluation_Participants_Notes_result] = useState([]);
|
||||
function Valide_Evaluation_Participants_Notes(selected_note_lines_id, local_publish_status) {
|
||||
var form = new FormData();
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("evaluation_id", selected_id);
|
||||
form.append("tab_inscription_id", selected_note_lines_id);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Valide_Participant_Evaluation_Note/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
// console.log(" In Valide_Evaluation_Participants_Notes res.data.status = " + res.data.status);
|
||||
// console.log(" In Valide_Evaluation_Participants_Notes res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
setnoted_changed("");
|
||||
Getall_Evaluation_Participant_List(selected_id);
|
||||
setselectionModel_evalutions_participant([]);
|
||||
settab_convention_pieces_jointes_result([]);
|
||||
// alert(res.data.message)
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("success");
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
setValide_Evaluation_Participants_Notes_api("false");
|
||||
setValide_Evaluation_Participants_Notes_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('Valide_Evaluation_Participants_Notes : Not good man :( Valide_Evaluation_Participants_Notes = ' + error);
|
||||
setValide_Evaluation_Participants_Notes_api("false");
|
||||
// alert(" Impossible de mettre à jour les données des participants ");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de mettre à jour les données ");
|
||||
setalert_type("error");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function isNumeric(str) {
|
||||
|
||||
str = str.replaceAll(",", ".");
|
||||
|
|
@ -4802,6 +4882,8 @@ const Notes_Evaluation = (props) => {
|
|||
setp_detail_type_notation(newSelectionModel.row.type_notation);
|
||||
setp_detail_max_note(newSelectionModel.row.max_note);
|
||||
|
||||
setactionmass_eval_inscr_val("");
|
||||
|
||||
submenu_detail();
|
||||
|
||||
}}
|
||||
|
|
@ -4878,6 +4960,10 @@ const Notes_Evaluation = (props) => {
|
|||
</Button>}</a>
|
||||
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_class_submenu" id='piece_jointe' name='piece_jointe'>Pièces Jointes </Button>
|
||||
|
||||
|
||||
{String(history_securite_read) === "1" && <Button variant="outlined" onClick={submenu_historique} className="detail_class_submenu" id='historique' name='historique'>Historique </Button>}
|
||||
|
||||
|
||||
</div>}
|
||||
{selected_id && String(selected_id).length > 5 && p_detail_type_eval_id && New_Getall_Partner_Type_Evalution_List_result.length > 0 &&
|
||||
<div className="div_row">
|
||||
|
|
@ -6926,6 +7012,7 @@ const Notes_Evaluation = (props) => {
|
|||
groupe: (item).groupe,
|
||||
note: (item).note,
|
||||
publish: (item).publish,
|
||||
is_validated: (item).is_validated,
|
||||
note_changed: (item).note_changed,
|
||||
convocation_send_date: (item).convocation_send_date,
|
||||
convocation_send_type: (item).convocation_send_type,
|
||||
|
|
@ -7010,7 +7097,8 @@ const Notes_Evaluation = (props) => {
|
|||
if (value && value.value) {
|
||||
if (String(value.value) === "delete_inscr" || String(value.value) === "send_convocation"
|
||||
|| String(value.value) === "publish_note"
|
||||
|| String(value.value) === "un_publish_note") {
|
||||
|| String(value.value) === "un_publish_note"
|
||||
|| String(value.value) === "valide_note") {
|
||||
setactionmass_eval_inscr_val(value.value);
|
||||
}
|
||||
else {
|
||||
|
|
@ -7032,68 +7120,74 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
|
||||
|
||||
{String(props.check_user_acces_right("note_evaluation", "write")) === "1" && actionmass_eval_inscr_val && String(actionmass_eval_inscr_val).length > 1 && <nav className='block_en_mass_bton_action'>
|
||||
<Popup
|
||||
trigger={<Button className="bton_enreg" style={{ "width": "90%" }}>
|
||||
<FcAcceptDatabase /> Traiter
|
||||
{String(props.check_user_acces_right("note_evaluation", "write")) === "1" &&
|
||||
actionmass_eval_inscr_val && String(actionmass_eval_inscr_val).length > 1 &&
|
||||
<nav className='block_en_mass_bton_action'>
|
||||
<Popup
|
||||
trigger={<Button className="bton_enreg" style={{ "width": "90%" }}>
|
||||
<FcAcceptDatabase /> Traiter
|
||||
|
||||
</Button>}
|
||||
modal
|
||||
nested
|
||||
position="center center"
|
||||
>
|
||||
</Button>}
|
||||
modal
|
||||
nested
|
||||
position="center center"
|
||||
>
|
||||
|
||||
{close => (
|
||||
<div>
|
||||
<button className="gest_close" onClick={close}>
|
||||
×
|
||||
</button>
|
||||
<div className="gest_header"> MySy Information </div>
|
||||
<div className="gest_content">
|
||||
{' '}
|
||||
{String(actionmass_eval_inscr_val) === "delete_inscr" &&
|
||||
<font> Confirmer la <b> supprression des inscriptions </b> en masse pour {selectionModel_evalutions_participant.length} lignes.
|
||||
</font>}
|
||||
{close => (
|
||||
<div>
|
||||
<button className="gest_close" onClick={close}>
|
||||
×
|
||||
</button>
|
||||
<div className="gest_header"> MySy Information </div>
|
||||
<div className="gest_content">
|
||||
{' '}
|
||||
{String(actionmass_eval_inscr_val) === "delete_inscr" &&
|
||||
<font> Confirmer la <b> supprression des inscriptions </b> en masse pour {selectionModel_evalutions_participant.length} lignes.
|
||||
</font>}
|
||||
|
||||
|
||||
{String(actionmass_eval_inscr_val) === "send_convocation" &&
|
||||
<font> Confirmer la <b> l'envoi des convocations </b> en masse pour {selectionModel_evalutions_participant.length} lignes.
|
||||
</font>}
|
||||
{String(actionmass_eval_inscr_val) === "send_convocation" &&
|
||||
<font> Confirmer <b> l'envoi des convocations </b> en masse pour {selectionModel_evalutions_participant.length} lignes.
|
||||
</font>}
|
||||
|
||||
{String(actionmass_eval_inscr_val) === "publish_note" &&
|
||||
<font> Confirmer la <b> la publication des notes sur l'ENT</b> en masse pour {selectionModel_evalutions_participant.length} lignes.
|
||||
</font>}
|
||||
{String(actionmass_eval_inscr_val) === "publish_note" &&
|
||||
<font> Confirmer la <b> publication des notes sur l'ENT</b> en masse pour {selectionModel_evalutions_participant.length} lignes.
|
||||
</font>}
|
||||
|
||||
{String(actionmass_eval_inscr_val) === "un_publish_note" &&
|
||||
<font> Confirmer la <b> la DE-publication des notes sur l'ENT</b> en masse pour {selectionModel_evalutions_participant.length} lignes.
|
||||
</font>}
|
||||
{String(actionmass_eval_inscr_val) === "un_publish_note" &&
|
||||
<font> Confirmer la <b> DE-publication des notes sur l'ENT</b> en masse pour {selectionModel_evalutions_participant.length} lignes.
|
||||
</font>}
|
||||
|
||||
{String(actionmass_eval_inscr_val) === "valide_note" &&
|
||||
<font> Confirmer la <b> validation des notes</b> en masse pour {selectionModel_evalutions_participant.length} lignes.
|
||||
</font>}
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
actionmass_evaluation_apprenant_Traitemet();
|
||||
close();
|
||||
}}> Valider </button>
|
||||
|
||||
</div>
|
||||
<div style={{ "width": "45%", "float": "right" }}>
|
||||
<button
|
||||
className="gest_bton_popup"
|
||||
onClick={() => {
|
||||
//console.log('modal closed ');
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
actionmass_evaluation_apprenant_Traitemet();
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
}}> Valider </button>
|
||||
|
||||
</div>
|
||||
<div style={{ "width": "45%", "float": "right" }}>
|
||||
<button
|
||||
className="gest_bton_popup"
|
||||
onClick={() => {
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
</nav>
|
||||
)}
|
||||
</Popup>
|
||||
</nav>
|
||||
}
|
||||
<br />
|
||||
|
||||
|
|
@ -7182,7 +7276,7 @@ const Notes_Evaluation = (props) => {
|
|||
|
||||
|
||||
{String(submenu) === "ressources" && <div>
|
||||
<h3 style={{ fontFamily: 'DM Sans', fontFamily:'DM Sans', fontSize:'20px', fontWeight:'600' }}> Sélection des ressources humaines et matérielles</h3>
|
||||
<h3 style={{ fontFamily: 'DM Sans', fontFamily: 'DM Sans', fontSize: '20px', fontWeight: '600' }}> Sélection des ressources humaines et matérielles</h3>
|
||||
|
||||
<div className="session_data">
|
||||
<div style={{ "border": "None" }}>
|
||||
|
|
@ -7420,6 +7514,15 @@ const Notes_Evaluation = (props) => {
|
|||
</div>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{String(submenu) === "historique" && <div className="div_row ">
|
||||
<Module_Historique_Action related_collection="note_evaluation"
|
||||
related_collection_recid={selected_id}
|
||||
read_access={props.read_access}
|
||||
write_access={props.write_access} />
|
||||
|
||||
</div>}
|
||||
<style>{local_css}</style>
|
||||
|
||||
</div >
|
||||
|
|
|
|||
Loading…
Reference in New Issue