07/01/24 - 12h30
parent
957225269c
commit
48186898e9
|
@ -45,6 +45,23 @@ const Dashbord_Inscriptions = (props) => {
|
|||
const columns = [
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{
|
||||
field: 'inscription_status', headerName: 'Inscrit', hide: false, minWidth: 50, flex: 1, maxWidth: 60,
|
||||
valueFormatter: (params) => {
|
||||
if (String(params.value) === "0")
|
||||
return "Pré.";
|
||||
else if (String(params.value) === "1")
|
||||
return "Ins.";
|
||||
else if (String(params.value) === "2")
|
||||
return "Enc.";
|
||||
else if (String(params.value) === "-1")
|
||||
return "Ann.";
|
||||
|
||||
else
|
||||
return "?";
|
||||
},
|
||||
},
|
||||
{ field: 'apprenant_id', headerName: 'apprenant_id', hide: true, Width: 0, },
|
||||
{ field: 'civilite', headerName: 'Civ.', hide: false, minWidth: 50, flex: 1, maxWidth: 60 },
|
||||
{ field: 'nom', headerName: 'Nom', hide: false, flex: 1, minWidth: 20 },
|
||||
{ field: 'prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200 },
|
||||
|
@ -101,7 +118,7 @@ const Dashbord_Inscriptions = (props) => {
|
|||
form.append("session_start_date", date_from);
|
||||
form.append("session_end_date", date_to);
|
||||
form.append("filter_value", filter_value);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -220,7 +237,7 @@ const Dashbord_Inscriptions = (props) => {
|
|||
|
||||
useEffect(() => {
|
||||
Getall_Qry_Inscription_Data();
|
||||
|
||||
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth",
|
||||
|
@ -353,7 +370,7 @@ const Dashbord_Inscriptions = (props) => {
|
|||
</div>
|
||||
|
||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||
Getall_Qry_Inscription_Data();
|
||||
Getall_Qry_Inscription_Data();
|
||||
|
||||
}}> Afficher
|
||||
</Button><br />
|
||||
|
@ -364,8 +381,8 @@ const Dashbord_Inscriptions = (props) => {
|
|||
|
||||
<div style={{ "float": "left", "width": "100%", "paddingRight": "5px" }}>
|
||||
|
||||
|
||||
<div style={{ "float": "left", "width": String(display_column_size), "height": "42rem", "float": "left", "paddingRight": "5px" }} >
|
||||
|
||||
<div style={{ "float": "left", "width": String(display_column_size), "height": "42rem", "float": "left", "paddingRight": "5px" }} >
|
||||
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
||||
<nav style={{ "width": "90%", "float": "left", "textAlign": "center" }}> TBD Employés - Détail Tâche </nav>
|
||||
<Tooltip className="tooltip_css" id="my-tooltip01" style={{ "fontSize": "12px" }} />
|
||||
|
@ -413,6 +430,27 @@ const Dashbord_Inscriptions = (props) => {
|
|||
height: 500,
|
||||
width: '100%',
|
||||
paddingRight: '1px',
|
||||
'& .cell--inscrit': {
|
||||
backgroundColor: '#2ECC71',
|
||||
color: '#1a3e72',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
'& .cell--preinscrit': {
|
||||
backgroundColor: '#F7DC6F',
|
||||
color: '#1a3e72',
|
||||
fontWeight: 'light',
|
||||
},
|
||||
'& .cell--encours': {
|
||||
backgroundColor: '#D2B4DE',
|
||||
color: '#1a3e72',
|
||||
fontWeight: 'light',
|
||||
},
|
||||
'& .cell--annule': {
|
||||
backgroundColor: '#ABB2B9',
|
||||
color: '#1a3e72',
|
||||
fontWeight: 'light',
|
||||
},
|
||||
|
||||
|
||||
"& .MuiDataGrid-columnHeaders": {
|
||||
backgroundColor: "#c8cfd5",
|
||||
|
@ -467,7 +505,9 @@ const Dashbord_Inscriptions = (props) => {
|
|||
session_date_fin: JSON.parse(item).session_date_fin,
|
||||
session_distantiel: JSON.parse(item).session_distantiel,
|
||||
session_presentiel: JSON.parse(item).session_presentiel,
|
||||
|
||||
inscription_status: JSON.parse(item).inscription_status,
|
||||
apprenant_id: JSON.parse(item).apprenant_id,
|
||||
|
||||
}
|
||||
))}
|
||||
|
||||
|
@ -476,7 +516,7 @@ const Dashbord_Inscriptions = (props) => {
|
|||
className="datagridclass"
|
||||
|
||||
onRowDoubleClick={(newSelectionModel) => {
|
||||
|
||||
|
||||
}}
|
||||
|
||||
|
||||
|
@ -489,15 +529,19 @@ const Dashbord_Inscriptions = (props) => {
|
|||
//sx={datagridSx}
|
||||
getCellClassName={(params) => {
|
||||
|
||||
// Pour la gestion de la couleur de zone double cliquée
|
||||
if (String(params.row.id) === String(gridline_id)) {
|
||||
return 'line--statut--selected';
|
||||
if (params.field === 'inscription_status' && String(params.value) === "-1") {
|
||||
return 'cell--annule';
|
||||
}
|
||||
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||
return 'line--statut--pair';
|
||||
if (params.field === "inscription_status" && String(params.value) == "0") {
|
||||
return 'cell--preinscrit';
|
||||
}
|
||||
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
||||
return 'line--statut--impair';
|
||||
|
||||
if (params.field === "inscription_status" && String(params.value) == "1") {
|
||||
return 'cell--inscrit';
|
||||
}
|
||||
|
||||
if (params.field === "inscription_status" && String(params.value) == "2") {
|
||||
return '.cell--encours';
|
||||
}
|
||||
|
||||
}}
|
||||
|
|
|
@ -41,6 +41,23 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
|||
const columns = [
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{
|
||||
field: 'inscription_status', headerName: 'Inscrit', hide: false, minWidth: 50, flex: 1, maxWidth: 60,
|
||||
valueFormatter: (params) => {
|
||||
if (String(params.value) === "0")
|
||||
return "Pré.";
|
||||
else if (String(params.value) === "1")
|
||||
return "Ins.";
|
||||
else if (String(params.value) === "2")
|
||||
return "Enc.";
|
||||
else if (String(params.value) === "-1")
|
||||
return "Ann.";
|
||||
|
||||
else
|
||||
return "?";
|
||||
},
|
||||
},
|
||||
{ field: 'apprenant_id', headerName: 'apprenant_id', hide: true, Width: 0, },
|
||||
{ field: 'civilite', headerName: 'Civ.', hide: false, minWidth: 50, flex: 1, maxWidth: 60 },
|
||||
{ field: 'nom', headerName: 'Nom', hide: false, flex: 1, minWidth: 20 },
|
||||
{ field: 'prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200 },
|
||||
|
@ -99,7 +116,7 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
|||
form.append("filter_value", filter_value);
|
||||
|
||||
|
||||
|
||||
console.log(' #### Get_Qery_Inscription_By_Session_By_Periode form = ', form);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Inscription_By_Session_By_Periode/";
|
||||
|
||||
|
@ -266,6 +283,8 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
|||
|
||||
useEffect(() => {
|
||||
|
||||
console.log(" &&&& props.user_dashbord_filter_end = ", props.user_dashbord_filter_end);
|
||||
|
||||
setp_filter_date_from(props.user_dashbord_filter_start);
|
||||
setp_filter_date_to(props.user_dashbord_filter_end);
|
||||
setevent_type_filter(props.user_dashbord_filter_type_envent);
|
||||
|
@ -277,7 +296,7 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
|||
behavior: "smooth",
|
||||
});
|
||||
|
||||
}, [])
|
||||
}, [p_filter_date_from, p_filter_date_to])
|
||||
|
||||
|
||||
|
||||
|
@ -395,6 +414,27 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
|||
height: 500,
|
||||
width: '100%',
|
||||
paddingRight: '1px',
|
||||
'& .cell--inscrit': {
|
||||
backgroundColor: '#2ECC71',
|
||||
color: '#1a3e72',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
'& .cell--preinscrit': {
|
||||
backgroundColor: '#F7DC6F',
|
||||
color: '#1a3e72',
|
||||
fontWeight: 'light',
|
||||
},
|
||||
'& .cell--encours': {
|
||||
backgroundColor: '#D2B4DE',
|
||||
color: '#1a3e72',
|
||||
fontWeight: 'light',
|
||||
},
|
||||
'& .cell--annule': {
|
||||
backgroundColor: '#ABB2B9',
|
||||
color: '#1a3e72',
|
||||
fontWeight: 'light',
|
||||
},
|
||||
|
||||
|
||||
"& .MuiDataGrid-columnHeaders": {
|
||||
backgroundColor: "#c8cfd5",
|
||||
|
@ -449,6 +489,8 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
|||
session_date_fin: JSON.parse(item).session_date_fin,
|
||||
session_distantiel: JSON.parse(item).session_distantiel,
|
||||
session_presentiel: JSON.parse(item).session_presentiel,
|
||||
inscription_status: JSON.parse(item).inscription_status,
|
||||
apprenant_id: JSON.parse(item).apprenant_id,
|
||||
|
||||
}
|
||||
))}
|
||||
|
@ -471,15 +513,19 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
|
|||
//sx={datagridSx}
|
||||
getCellClassName={(params) => {
|
||||
|
||||
// Pour la gestion de la couleur de zone double cliquée
|
||||
if (String(params.row.id) === String(gridline_id)) {
|
||||
return 'line--statut--selected';
|
||||
if (params.field === 'inscription_status' && String(params.value) === "-1") {
|
||||
return 'cell--annule';
|
||||
}
|
||||
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||
return 'line--statut--pair';
|
||||
if (params.field === "inscription_status" && String(params.value) == "0") {
|
||||
return 'cell--preinscrit';
|
||||
}
|
||||
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
||||
return 'line--statut--impair';
|
||||
|
||||
if (params.field === "inscription_status" && String(params.value) == "1") {
|
||||
return 'cell--inscrit';
|
||||
}
|
||||
|
||||
if (params.field === "inscription_status" && String(params.value) == "2") {
|
||||
return '.cell--encours';
|
||||
}
|
||||
|
||||
}}
|
||||
|
|
|
@ -212,7 +212,7 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
|||
behavior: "smooth",
|
||||
});
|
||||
|
||||
}, [])
|
||||
}, [p_filter_date_from, p_filter_date_to])
|
||||
|
||||
|
||||
function Export_Dashbord_to_CSV(local_dashbord_internal_id) {
|
||||
|
|
|
@ -198,7 +198,7 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
|||
behavior: "smooth",
|
||||
});
|
||||
|
||||
}, [])
|
||||
}, [p_filter_date_from, p_filter_date_to])
|
||||
|
||||
|
||||
function Export_Dashbord_to_CSV(local_dashbord_internal_id) {
|
||||
|
|
|
@ -361,7 +361,7 @@ const Dashbord_Session_Par_Fteur = (props) => {
|
|||
behavior: "smooth",
|
||||
});
|
||||
|
||||
}, [])
|
||||
}, [p_filter_date_from, p_filter_date_to])
|
||||
|
||||
|
||||
const [filter_value, setfilter_value] = useState("");
|
||||
|
|
|
@ -361,7 +361,7 @@ const Dashbord_Session_Repartition_Fteur = (props) => {
|
|||
behavior: "smooth",
|
||||
});
|
||||
|
||||
}, [])
|
||||
}, [p_filter_date_from, p_filter_date_to])
|
||||
|
||||
|
||||
const [filter_value, setfilter_value] = useState("");
|
||||
|
|
|
@ -363,7 +363,7 @@ const Dashbord_Session_Taux_Remplissage = (props) => {
|
|||
behavior: "smooth",
|
||||
});
|
||||
|
||||
}, [])
|
||||
}, [p_filter_date_from, p_filter_date_to])
|
||||
|
||||
|
||||
const [filter_value, setfilter_value] = useState("m0");
|
||||
|
|
|
@ -194,6 +194,8 @@ const Mon_Tableau_De_Bord = (props) => {
|
|||
}
|
||||
|
||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_inscription_01" &&
|
||||
|
||||
|
||||
<Dashbord_Inscriptions_all_inscriptions user_dashbord_id={String(JSON.parse(step)._id)}
|
||||
user_dashbord_title={String(JSON.parse(step).title)}
|
||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||
|
|
Loading…
Reference in New Issue