diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js
index 35eab0e..09af28b 100644
--- a/src/components/DisplayPartnerSession.js
+++ b/src/components/DisplayPartnerSession.js
@@ -26080,7 +26080,8 @@ const DisplayPartnerSession = (props) => {
related_collection_recid={selected_session_id} SessionstartDate={new Date(moment(SessionstartDate, "DD/MM/YYYY"))}
SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} session_formateur_id={p_formateur_id}
session_class_id={session_selected_class_id}
- selected_session_invoiced_statut={selected_session_invoiced_statut} />
+ selected_session_invoiced_statut={selected_session_invoiced_statut}
+ jury_cell_editable={false} />
}
diff --git a/src/components/Employes.js b/src/components/Employes.js
index 36c2846..ebdee3c 100644
--- a/src/components/Employes.js
+++ b/src/components/Employes.js
@@ -10718,9 +10718,7 @@ const Employes = (props) => {
}
{String(submenu) === "droit_acces" &&
-
-
-
+
diff --git a/src/components/Jurys.js b/src/components/Jurys.js
index 15d5e22..513d516 100644
--- a/src/components/Jurys.js
+++ b/src/components/Jurys.js
@@ -4464,6 +4464,7 @@ const Jury = (props) => {
related_collection={"session_formation"}
related_collection_recid={p_detail_linked_collection_recid}
session_class_id={JSON.parse(GetCurrentSession_result).class_id}
+ jury_cell_editable={true}
/>
}
diff --git a/src/components/Module_Session_Notes_Classement.js b/src/components/Module_Session_Notes_Classement.js
index 5b80468..d373a0c 100644
--- a/src/components/Module_Session_Notes_Classement.js
+++ b/src/components/Module_Session_Notes_Classement.js
@@ -28,6 +28,8 @@ import InputAdornment from '@mui/material/InputAdornment';
import { AiFillCloseCircle } from "react-icons/ai";
import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md";
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
+import Checkbox from '@mui/material/Checkbox';
+
function PaperComponent(props) {
return (
@@ -65,7 +67,10 @@ const useStyles = makeStyles((theme) => ({
const Module_Session_Notes_Classement = (props) => {
const classes = useStyles();
const history = useHistory();
- const [submenu, setsubmenu] = useState("");
+
+
+ const [jury_cell_editable, setjury_cell_editable] = useState(props.jury_cell_editable);
+
const [rowss, setRows] = useState([]);
const [isLoading, setLoading] = useState();
@@ -99,6 +104,70 @@ const Module_Session_Notes_Classement = (props) => {
);
}
+ function ExpandableCell_50_bg_hiligt({ value }) {
+ const [expanded, setExpanded] = React.useState(false);
+
+ return (
+
+ );
+ }
+
+ function ExpandableCell_50_bg_hiligt_red_color({ value }) {
+ const [expanded, setExpanded] = React.useState(false);
+
+ return (
+
+ {value &&
+
+ {expanded ? value : value.slice(0, 50)}
+ {value.length > 50 && (
+ // eslint-disable-next-line jsx-a11y/anchor-is-valid
+
setExpanded(!expanded)}
+ >
+ {expanded ?
Réduire :
Voir}
+
+ )}
+
}
+
+ {value &&
+
+
+ }
+
+ );
+ }
+
function Display_Colunm_text({ value }) {
@@ -110,6 +179,8 @@ const Module_Session_Notes_Classement = (props) => {
);
}
+
+
const columns_list_session_note_classement_final = [
{ field: 'id', headerName: 'id', hide: true },
{ field: '_id', headerName: '_id', hide: true },
@@ -117,14 +188,68 @@ const Module_Session_Notes_Classement = (props) => {
{ field: 'session_id', headerName: 'session_id', hide: true },
{ field: 'class_id', headerName: 'class_id', hide: true },
+
+
{ field: 'nom', headerName: 'Nom', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) =>
, },
{ field: 'prenom', headerName: 'Prenom', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) =>
, },
{ field: 'rang', headerName: 'Rang', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) =>
, },
- { field: 'note_finale', headerName: 'Noete finale', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) =>
, },
+ {
+ field: 'note_finale', headerName: 'Noete finale', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) =>
,
+
+ },
+
{ field: 'credit_acquis', headerName: 'Credit acquis', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) =>
, },
- { field: 'rang_calculation_date', headerName: 'Date Calcul', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) =>
, },
+ { field: 'rang_calculation_date', headerName: 'Date Calcul', minwidth: 100, flex: 1, hide: true, editable: false, renderCell: (params) =>
, },
+ { field: 'jury_note', headerName: 'Note Jury', width: 200, editable: jury_cell_editable, renderCell: (params) =>
, align: "center", },
+ { field: 'jury_comment', headerName: 'Comment Jury', width: 200, editable: jury_cell_editable, renderCell: (params) =>
, align: "center", },
+
+
+
+ {
+ field: 'jury_validation', headerName: 'Validation Jury', width: 150, hide: false, editable: jury_cell_editable,
+ renderCell: (cellValues) => {
+ return (
+
+ {New_Option_Valisation_Jury && New_Option_Valisation_Jury.length > 0 && jury_cell_editable === true && (data).value === String(cellValues.row.jury_validation))[0].label}
+ options={New_Option_Valisation_Jury}
+ onChange={(event, value) => {
+ if (value && value.value) {
+ mysy_onchange_list(cellValues.row.id, "jury_validation_champ_technique", value.value);
+ }
+
+ }}
+
+ renderInput={(params) =>
+ }
+ />}
+
+ {jury_cell_editable !== true &&
+
+
+ {cellValues.row.jury_validation_champ_technique && String(cellValues.row.jury_validation_champ_technique) === "1" && "Oui"}
+ {cellValues.row.jury_validation_champ_technique && String(cellValues.row.jury_validation_champ_technique) === "0" && "Non"}
+
+
+ }
+
+
+
+ );
+ }
+ },
+ {
+ field: 'jury_validation_champ_technique', headerName: 'Validation Jury_tech', width: 200, renderCell: (params) =>
, align: "center",
+ },
]
@@ -629,6 +754,11 @@ const Module_Session_Notes_Classement = (props) => {
var rang_calculation_date = JSON.parse(x).rang_calculation_date;
var credit_acquis = JSON.parse(x).credit_acquis;
+ var jury_note = JSON.parse(x).jury_note;
+ var jury_comment = JSON.parse(x).jury_comment;
+ var jury_validation = JSON.parse(x).jury_validation;
+
+
//---
var node = {
"_id": local_id,
@@ -645,6 +775,10 @@ const Module_Session_Notes_Classement = (props) => {
"rang_calculation_date": rang_calculation_date,
"credit_acquis": credit_acquis,
+ "jury_note": jury_note,
+ "jury_comment": jury_comment,
+ "jury_validation": jury_validation,
+
};
new_data2.push(node);
});
@@ -664,6 +798,10 @@ const Module_Session_Notes_Classement = (props) => {
"rang_calculation_date": "",
"credit_acquis": "",
+ "jury_note": "",
+ "jury_comment": "",
+ "jury_validation": "",
+
};
new_data2.push(node);
@@ -693,6 +831,14 @@ const Module_Session_Notes_Classement = (props) => {
useEffect(() => {
+ /*
+ if (props.jury_cell_editable) {
+ setjury_cell_editable(props.jury_cell_editable)
+ } else {
+ setjury_cell_editable(false);
+ }
+ */
+
Getall_Session_Detail_Final_Note_Classement();
Getall_Session_UE_Final_Note_Classement();
Getall_Session_Final_Note_Classement();
@@ -989,6 +1135,14 @@ const Module_Session_Notes_Classement = (props) => {
}
+ const New_Option_Valisation_Jury = [
+ { "id": "1", "label": "Oui", "value": "1" },
+ { "id": "0", "label": "Non ", "value": "0" },
+ { "id": "", "label": "", "value": "" },
+
+ ]
+
+
const New_Option_Filter = [
{ "id": "ue_id", "label": "Code UE", "value": "ue_id" },
{ "id": "inscrit_id", "label": "Apprenant ", "value": "inscrit_id" },
@@ -1018,6 +1172,230 @@ const Module_Session_Notes_Classement = (props) => {
}
+ function Jury_Update_Final_Session() {
+ const new_note_session_with_jury_JSON = JSON.stringify(New_Getall_Session_Final_Note_Classement_result);
+
+ console.log(" new_note_session_with_jury_JSON = ", new_note_session_with_jury_JSON);
+ console.log(" New_Getall_Session_Final_Note_Classement_result = ", New_Getall_Session_Final_Note_Classement_result);
+ }
+
+
+ function OnchangeCellDataGrid(params) {
+
+
+ // params = la nouvelle lignes
+
+
+ var num_line = params.id; // ==> Id de la ligne changé
+ var colomn = params.field; // ==> colonne de la ligne changé
+ var new_value = params.value; // ==> la nouvelle valeur
+
+
+
+ const updatedData = New_Getall_Session_Final_Note_Classement_result.map((x) => {
+
+ var localid = (x).id;
+
+
+ if (String(num_line) === String(localid) && colomn === "jury_note") {
+ var tmp = {};
+ tmp['id'] = (x).id;
+ tmp['_id'] = (x)._id;
+ tmp['inscription_id'] = (x).inscription_id;
+ tmp['session_id'] = (x).session_id;
+ tmp['class_id'] = (x).class_id;
+ tmp['nom'] = (x).nom;
+ tmp['prenom'] = (x).prenom;
+
+
+ tmp['rang'] = (x).rang;
+ tmp['note_finale'] = (x).note_finale;
+ tmp['credit_acquis'] = (x).credit_acquis;
+ tmp['rang_calculation_date'] = (x).rang_calculation_date;
+
+
+ tmp['jury_note'] = new_value;
+ tmp['jury_comment'] = (x).jury_comment;
+ tmp['jury_validation'] = (x).jury_validation;
+ tmp['jury_validation_champ_technique'] = (x).jury_validation_champ_technique;
+
+ return tmp;
+
+
+ }
+
+ if (String(num_line) === String(localid) && colomn === "jury_comment") {
+ var tmp = {};
+ tmp['id'] = (x).id;
+ tmp['_id'] = (x)._id;
+ tmp['inscription_id'] = (x).inscription_id;
+ tmp['session_id'] = (x).session_id;
+ tmp['class_id'] = (x).class_id;
+ tmp['nom'] = (x).nom;
+ tmp['prenom'] = (x).prenom;
+
+
+ tmp['rang'] = (x).rang;
+ tmp['note_finale'] = (x).note_finale;
+ tmp['credit_acquis'] = (x).credit_acquis;
+ tmp['rang_calculation_date'] = (x).rang_calculation_date;
+
+
+ tmp['jury_note'] = (x).jury_note;
+ tmp['jury_comment'] = new_value;
+ tmp['jury_validation'] = (x).jury_validation;
+ tmp['jury_validation_champ_technique'] = (x).jury_validation_champ_technique;
+
+ return tmp;
+ }
+
+ if (String(num_line) === String(localid) && colomn === "jury_validation") {
+ var tmp = {};
+ tmp['id'] = (x).id;
+ tmp['_id'] = (x)._id;
+ tmp['inscription_id'] = (x).inscription_id;
+ tmp['session_id'] = (x).session_id;
+ tmp['class_id'] = (x).class_id;
+ tmp['nom'] = (x).nom;
+ tmp['prenom'] = (x).prenom;
+
+
+ tmp['rang'] = (x).rang;
+ tmp['note_finale'] = (x).note_finale;
+ tmp['credit_acquis'] = (x).credit_acquis;
+ tmp['rang_calculation_date'] = (x).rang_calculation_date;
+
+
+ tmp['jury_note'] = (x).jury_note;
+ tmp['jury_comment'] = (x).jury_comment;
+ tmp['jury_validation'] = new_value;
+ tmp['jury_validation_champ_technique'] = (x).jury_validation_champ_technique;
+
+
+ return tmp;
+ }
+
+
+ var tmp = {};
+ tmp['id'] = (x).id;
+ tmp['_id'] = (x)._id;
+ tmp['inscription_id'] = (x).inscription_id;
+ tmp['session_id'] = (x).session_id;
+ tmp['class_id'] = (x).class_id;
+ tmp['nom'] = (x).nom;
+ tmp['prenom'] = (x).prenom;
+
+
+ tmp['rang'] = (x).rang;
+ tmp['note_finale'] = (x).note_finale;
+ tmp['credit_acquis'] = (x).credit_acquis;
+ tmp['rang_calculation_date'] = (x).rang_calculation_date;
+
+
+ tmp['jury_note'] = (x).jury_note;
+ tmp['jury_comment'] = (x).jury_comment;
+ tmp['jury_validation'] = (x).jury_validation;
+ tmp['jury_validation_champ_technique'] = (x).jury_validation_champ_technique;
+
+ return tmp;
+
+
+ });
+
+ // console.log(" ### updatedData = ", updatedData);
+
+ setNew_Getall_Session_Final_Note_Classement_result([]);
+
+ setNew_Getall_Session_Final_Note_Classement_result(updatedData);
+
+ }
+
+
+ function mysy_onchange_list(num_line, colomn, new_value) {
+
+
+ // params = la nouvelle lignes
+ /*
+
+ var num_line = params.id; // ==> Id de la ligne changé
+ var colomn = params.field; // ==> colonne de la ligne changé
+ var new_value = params.value; // ==> la nouvelle valeur
+
+
+
+ console.log("## colomn = ", colomn, " ### new_value = ", new_value);
+ */
+
+
+ const updatedData = New_Getall_Session_Final_Note_Classement_result.map((x) => {
+
+ var localid = (x).id;
+
+
+ if (String(num_line) === String(localid) && colomn === "jury_validation_champ_technique") {
+
+
+ var tmp = {};
+ tmp['id'] = (x).id;
+ tmp['_id'] = (x)._id;
+ tmp['inscription_id'] = (x).inscription_id;
+ tmp['session_id'] = (x).session_id;
+ tmp['class_id'] = (x).class_id;
+ tmp['nom'] = (x).nom;
+ tmp['prenom'] = (x).prenom;
+
+
+ tmp['rang'] = (x).rang;
+ tmp['note_finale'] = (x).note_finale;
+ tmp['credit_acquis'] = (x).credit_acquis;
+ tmp['rang_calculation_date'] = (x).rang_calculation_date;
+
+
+ tmp['jury_note'] = (x).jury_note;
+ tmp['jury_comment'] = (x).jury_comment;
+ tmp['jury_validation'] = String(new_value);
+ tmp['jury_validation_champ_technique'] = String(new_value);
+
+ return tmp;
+ }
+
+
+
+ var tmp = {};
+ tmp['id'] = (x).id;
+ tmp['_id'] = (x)._id;
+ tmp['inscription_id'] = (x).inscription_id;
+ tmp['session_id'] = (x).session_id;
+ tmp['class_id'] = (x).class_id;
+ tmp['nom'] = (x).nom;
+ tmp['prenom'] = (x).prenom;
+
+
+ tmp['rang'] = (x).rang;
+ tmp['note_finale'] = (x).note_finale;
+ tmp['credit_acquis'] = (x).credit_acquis;
+ tmp['rang_calculation_date'] = (x).rang_calculation_date;
+
+
+ tmp['jury_note'] = (x).jury_note;
+ tmp['jury_comment'] = (x).jury_comment;
+ tmp['jury_validation'] = (x).jury_validation;
+ tmp['jury_validation_champ_technique'] = (x).jury_validation_champ_technique;
+
+ return tmp;
+
+
+ });
+
+ //console.log(" ### updatedData = ", updatedData);
+
+ setNew_Getall_Session_Final_Note_Classement_result([]);
+
+ setNew_Getall_Session_Final_Note_Classement_result(updatedData);
+
+ }
+
+
return (
@@ -1050,11 +1428,14 @@ const Module_Session_Notes_Classement = (props) => {
- Notes & Rang Final (session)
-
-
+ Notes & Rang Final (session)
+
+
+
+
+
@@ -1065,32 +1446,13 @@ const Module_Session_Notes_Classement = (props) => {
width: '100%',
paddingRight: '1px',
- // Gestion des cellule a distance ou presentiel
- '& .cell--distantiel': {
+ // Gestion des cellules reservée au jury
+ '& .cell--jury': {
backgroundColor: '#AFE1AF',
- color: 'black',
- },
-
- '& .cell--presentiel': {
- backgroundColor: '#AFE1AF',
- color: 'black',
+ border: "1px solid rgb(224, 224, 224)",
},
- // gestion couleur des lignes avec le statut d'inscription
- '& .line--statut--annule': {
- backgroundColor: '#D8D8D8',
- color: 'white',
- },
-
- '& .line--statut--inscrit': {
- backgroundColor: '#CEF6D8',
- color: 'black',
- },
- '& .line--statut--preinscrit': {
- backgroundColor: '#F7F2E0',
- color: 'black',
- },
/*"& .MuiDataGrid-virtualScrollerRenderZone": {
@@ -1130,6 +1492,9 @@ const Module_Session_Notes_Classement = (props) => {
}}
>
{
setselectionModel_note_Session_classement(newSelectionModel);
@@ -1144,22 +1509,25 @@ const Module_Session_Notes_Classement = (props) => {
selectionModel={selectionModel_note_Session_classement}
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
- rows={Getall_Session_Final_Note_Classement_result.map((item, index) => (
+ rows={New_Getall_Session_Final_Note_Classement_result.map((item, index) => (
{
id: index,
- _id: JSON.parse(item)._id,
- inscription_id: JSON.parse(item).inscription_id,
- session_id: JSON.parse(item).session_id,
-
- class_id: JSON.parse(item).class_id,
- nom: JSON.parse(item).nom,
- prenom: JSON.parse(item).prenom,
- rang: JSON.parse(item).rang,
- note_finale: JSON.parse(item).note_finale,
- rang_calculation_date: JSON.parse(item).rang_calculation_date.substring(0, 10),
- credit_acquis: JSON.parse(item).credit_acquis,
+ _id: (item)._id,
+ inscription_id: (item).inscription_id,
+ session_id: (item).session_id,
+ class_id: (item).class_id,
+ nom: (item).nom,
+ prenom: (item).prenom,
+ rang: (item).rang,
+ note_finale: (item).note_finale,
+ rang_calculation_date: (item).rang_calculation_date.substring(0, 10),
+ credit_acquis: (item).credit_acquis,
+ jury_note: (item).jury_note,
+ jury_comment: (item).jury_comment,
+ jury_validation: (item).jury_validation,
+ jury_validation_champ_technique: (item).jury_validation_champ_technique,
}
))}
@@ -1178,9 +1546,14 @@ const Module_Session_Notes_Classement = (props) => {
Toolbar: GridToolbar,
}}
//sx={datagridSx}
+
+
getCellClassName={(params) => {
-
+ // Traitement des cellules du jury (note, commentaire, validation)
+ if (String(params.field).startsWith("jury")) {
+ return 'cell--jury';
+ }
}}
getRowClassName={(params) => {
diff --git a/src/components/Notes_Evaluation.js b/src/components/Notes_Evaluation.js
index 6b196a5..fede309 100644
--- a/src/components/Notes_Evaluation.js
+++ b/src/components/Notes_Evaluation.js
@@ -509,8 +509,8 @@ const Notes_Evaluation = (props) => {
{ field: 'groupe', headerName: 'groupe', flex: 1, hide: false, minWidth: 180, renderCell: (params) => , },
{ field: 'note', headerName: 'Note', width: 200, editable: true, renderCell: (params) => , align: "center", },
- { field: 'convocation_send_date', headerName: 'Conv. Envoyé', width: 200, editable: true, renderCell: (params) => , align: "center", },
- { field: 'convocation_send_type', headerName: 'Conv. Par', width: 200, editable: true, renderCell: (params) => , align: "center", },
+ { field: 'convocation_send_date', headerName: 'Conv. Envoyé', width: 200, editable: false, renderCell: (params) => , align: "center", },
+ { field: 'convocation_send_type', headerName: 'Conv. Par', width: 200, editable: false, renderCell: (params) => , align: "center", },
{
diff --git a/src/components/UpdateAttendeeList.js b/src/components/UpdateAttendeeList.js
index 9e428c9..8f288b4 100644
--- a/src/components/UpdateAttendeeList.js
+++ b/src/components/UpdateAttendeeList.js
@@ -115,7 +115,7 @@ function UpdateAttendeeList() {
const [rowss_preinsc, setRows_preinsc] = useState([]);
-
+
const [selectionModel_preinsc, setselectionModel_preinsc] = React.useState([]);
const columns_preinscrit = [
{ field: 'id', headerName: 'id', hide: true },