08/08/2024 - 13h

recette2
cherif 2024-08-08 13:46:05 +02:00
parent b403fda929
commit 2008934b1f
6 changed files with 1401 additions and 245 deletions

View File

@ -110,7 +110,7 @@ const AddClassManual = (props) => {
const [expanded, setExpanded] = React.useState(false);
return (
<nav>
<nav style={{ width:'100%', textAlign:'center'}}>
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
{expanded ? value : String(value).slice(0, 50)}&nbsp;

View File

@ -201,6 +201,7 @@ const DisplayPartnerSession = (props) => {
const columns = [
{ field: 'id', headerName: 'id', hide: true },
{ field: '_id', headerName: '_id', hide: true },
{ field: 'class_id', headerName: 'class_id', hide: true },
{ field: 'is_bpf', headerName: 'is_bpf', hide: true, },
{ field: 'session_alert_message', headerName: 'session_alert_message', hide: true },
{ field: 'class_internal_url', headerName: 'class_internal_url', hide: true },
@ -1497,6 +1498,7 @@ const DisplayPartnerSession = (props) => {
const [session_selected_row_id, setsession_selected_row_id] = useState("");
const [session_selected_class_id, setsession_selected_class_id] = useState("");
const [selected_class_external_code, setselected_class_external_code] = useState("");
@ -1522,6 +1524,8 @@ const DisplayPartnerSession = (props) => {
var internal_url = line.class_internal_url;
setselected_internal_url(line.class_internal_url);
setsession_selected_class_id(line.class_id);
setselected_session_invoiced_statut(line.invoiced_statut);
var session_id = line._id;
@ -5966,7 +5970,7 @@ const DisplayPartnerSession = (props) => {
setLoading(false);
if (String(res.data.status) === "true") {
//console.log(" In GetAttendee res.data.status = " + res.data.status);
//console.log(" In GetAttendee res.data.message r_class = " + res.data.message);
console.log(" In GetAttendee res.data.message r_class = " + res.data.message);
setGetAttendee_api("true");
setGetAttendee_result(res.data.message);
@ -5983,10 +5987,14 @@ const DisplayPartnerSession = (props) => {
if (mylocalattendee.code_session)
setp_detail_session_class(mylocalattendee.code_session);
if (mylocalattendee.session_id)
setp_detail_session_class_id(mylocalattendee.session_id);
/*if (mylocalattendee.class_id)
setp_detail_session_class_id(mylocalattendee.class_id);
else
setp_detail_session_class_id("");
*/
document.getElementsByName("detail_status_inscript")[0].value = "";
if (mylocalattendee.status) {
setp_detail_status_inscrit(mylocalattendee.status);
@ -14014,6 +14022,7 @@ const DisplayPartnerSession = (props) => {
setselected_session_id(newSelectionModel.row._id);
setsession_selected_row_id(newSelectionModel.row.id);
setsession_selected_class_id(newSelectionModel.row.class_id);
setselected_session_invoiced_statut(newSelectionModel.row.invoiced_statut);
@ -14271,6 +14280,7 @@ const DisplayPartnerSession = (props) => {
nb_preinscrit: JSON.parse(item).nb_preinscrit,
duration: JSON.parse(item).duration_concat,
class_external_code: JSON.parse(item).class_external_code,
class_id: JSON.parse(item).class_id,
prix_session: JSON.parse(item).prix_session,
published: JSON.parse(item).class_published,
session_title: JSON.parse(item).titre,
@ -20329,9 +20339,11 @@ const DisplayPartnerSession = (props) => {
{String(submenu) === String("planification_session") && <div style={{ "border": "None" }}>
<Module_Session_Planification conntected_employee_id={props.conntected_employee_id} related_collection={"session_formation"}
related_collection_recid={selected_session_id} SessionstartDate={new Date(moment(SessionstartDate, "DD/MM/YYYY"))}
SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} selected_session_invoiced_statut={selected_session_invoiced_statut} />
SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} selected_session_invoiced_statut={selected_session_invoiced_statut}
session_class_id={session_selected_class_id} />
</div>}
@ -20343,7 +20355,7 @@ const DisplayPartnerSession = (props) => {
<Module_Session_Evaluation conntected_employee_id={props.conntected_employee_id} related_collection={"session_formation"}
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={p_detail_session_class_id}
session_class_id={session_selected_class_id}
selected_session_invoiced_statut={selected_session_invoiced_statut} />
</div>}

View File

@ -107,11 +107,40 @@ const DisplayPartnerUnite_Enseignement = (props) => {
}
function ExpandableCell_50_left_align({ value }) {
const [expanded, setExpanded] = React.useState(false);
return (
<nav style={{ width: '100%', textAlign: 'center' }}>
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
{expanded ? value : String(value).slice(0, 50)}&nbsp;
{value.length > 50 && (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<Link
type="button"
component="button"
sx={{ fontSize: 'inherit' }}
onClick={() => setExpanded(!expanded)}
>
{expanded ? <nav> <PiDotsThree />Réduire</nav> : <nav> <PiDotsThree />Voir</nav>}
</Link>
)}
</div>}
{!value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
&nbsp;
</div>
}
</nav>
);
}
function Display_Colunm_text({ value }) {
return (
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all", }}>
{value}&nbsp;
</div>
@ -142,10 +171,13 @@ const DisplayPartnerUnite_Enseignement = (props) => {
},
{ field: 'duration_concat', headerName: 'Durée', flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'duration_concat', headerName: 'Durée', flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50_left_align {...params} />, },
{ 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) => <ExpandableCell_50_left_align {...params} />, },
{ field: 'planification_used_line', headerName: 'Ligne Plan. Uti.', flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50_left_align {...params} />, },
{
field: "delete", headerName: 'Supprimer',
@ -218,7 +250,11 @@ const DisplayPartnerUnite_Enseignement = (props) => {
{ field: 'code', headerName: 'Code', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
{ field: 'titre', headerName: 'Titre', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
{ field: 'description', headerName: 'Description', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
{ field: 'volume_horaire', headerName: 'Volume_horaire', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
{ field: 'volume_horaire', headerName: 'Volume_horaire', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50_left_align {...params} />, },
{ field: 'in_use', headerName: 'Utilisé', flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50_left_align {...params} />, },
{ field: 'used_sequence_title', headerName: 'Seq. Utilisé', flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50_left_align {...params} />, },
{ field: 'prerequis', headerName: 'Prérequis', minWidth: 200, flex: 1, hide: true, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
@ -823,6 +859,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
behavior: "smooth",
});
}
}, []);
@ -1079,7 +1117,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
clean_fields();
setue_data_edit_mode("");
setdisplay_ue("1");
setsubmenu('detail_ue');
var invoice_id = line._id;
@ -1099,6 +1137,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
Getall_UE_Planif_data(line._id);
submenu_detail();
}
function Annule_add_new_UE() {
@ -1262,7 +1302,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_UE_Planif_data res.data.status = " + res.data.status);
//console.log(" In Getall_UE_Planif_data res.data.message r_class = " + res.data.message);
console.log(" In Getall_UE_Planif_data res.data.message r_class = " + res.data.message);
setGetall_UE_Planif_data_api("true");
setGetall_UE_Planif_data_result(res.data.message);
@ -2025,6 +2065,9 @@ const DisplayPartnerUnite_Enseignement = (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,
}
))}
@ -2039,7 +2082,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
handleClick_edit_ue_From_Line(newSelectionModel.row.id);
setsession_file_name("");
setliste_sessions_file_change_api("");
setgridline_id(newSelectionModel.row.id);
}}
@ -2694,6 +2737,9 @@ const DisplayPartnerUnite_Enseignement = (props) => {
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,
}
))}

View File

@ -1382,6 +1382,7 @@ const Groupe_Apprenant = (props) => {
const [p_detail_session_id_auto, setp_detail_session_id_auto] = React.useState("");
const [p_detail_class_internal_url_auto, setp_detail_class_internal_url_auto] = React.useState("");
const [p_detail_type_groupe_code_auto, setp_detail_type_groupe_code_auto] = React.useState("");
const [p_detail_split_racine, setp_detail_split_racine] = React.useState("");
function clear_DetailFieds() {
setp_detail_code("");
@ -1811,6 +1812,7 @@ const Groupe_Apprenant = (props) => {
setp_detail_session_id_auto("");
setp_detail_class_internal_url_auto("");
setp_detail_type_groupe_code_auto("");
setp_detail_split_racine("");
};
@ -1839,6 +1841,8 @@ const Groupe_Apprenant = (props) => {
form.append("class_id", p_detail_class_id_auto);
form.append("session_id", p_detail_session_id_auto);
form.append("racine", p_detail_split_racine);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Automatic_Creation_Groupe_Member_Inscrit/";
setLoading(true);
@ -1996,6 +2000,16 @@ const Groupe_Apprenant = (props) => {
}
const [submenu_grp_dialog, setsubmenu_grp_dialog] = useState("create");
function submenu_create_grp() {
setsubmenu_grp_dialog("create");
}
function submenu_update_grp_members() {
setsubmenu_grp_dialog("update");
}
return (
<div className="groupe_apprenant">
{isLoading && <div className="loader-container">
@ -2020,46 +2034,14 @@ const Groupe_Apprenant = (props) => {
</DialogContentText>
<div className="session_caract_Dialog" > <b> Nombre de Groupe </b>
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
{<div className="session_caract_Dialog" style={{ textAlign: 'right' }} >
name="event_dialog_nb_grp"
id="event_dialog_nb_grp"
type="number"
fullWidth
inputProps={{ min: "1", max: "99", step: "1" }}
onChange={(e) => {
setp_detail_nb_grp_auto(e.target.value);
<Button variant="outlined" onClick={submenu_create_grp} className="detail_class_submenu" id='dialog_detail_seq_detail'
name='dialog_detail_seq_detail'>Création</Button>
}
}
/>
</div>
<div className="session_caract_Dialog" > <b> Créer groupe par </b>
<Autocomplete
disablePortal
name="event_dialog_type_ressource"
id="event_dialog_type_ressource"
fullWidth
options={New_Option_Groupe_By}
onChange={(event, value) => {
if (value.value)
setp_detail_split_type_auto(value.value);
else
setp_detail_split_type_auto("");
}}
renderInput={(params) => <TextField {...params} placeholder="Choisir une option " />
}
/>
</div>
<Button variant="outlined" onClick={submenu_update_grp_members} className="detail_class_submenu" id='dialog_detail_seq_ressource'
name='dialog_detail_seq_ressource'>M.A.J Membres</Button>
</div>}
<div className="session_caract_Dialog" > <b>Formation </b> <br />
{New_Getall_Partner_Class_Reduice_Fields_result && New_Getall_Partner_Class_Reduice_Fields_result.length > 0 &&
@ -2132,48 +2114,129 @@ const Groupe_Apprenant = (props) => {
</div>
<div className="session_caract_Dialog" ><b>Type de Groupe </b> <br />
{New_Getall_Groupe_Apprenant_Type_result && New_Getall_Groupe_Apprenant_Type_result.length > 0 &&
{String(submenu_grp_dialog) === "create" && <div>
<div className="session_caract_Dialog" > <b> Nombre de Groupe </b>
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
name="event_dialog_nb_grp"
id="event_dialog_nb_grp"
type="number"
fullWidth
inputProps={{ min: "1", max: "99", step: "1" }}
onChange={(e) => {
setp_detail_nb_grp_auto(e.target.value);
}
}
/>
</div>
<div className="session_caract_Dialog" > <b> Créer groupe par </b>
<Autocomplete
disablePortal
name="detail_type_grp"
id="detail_type_grp"
name="event_dialog_type_ressource"
id="event_dialog_type_ressource"
fullWidth
options={New_Getall_Groupe_Apprenant_Type_result}
value={New_Getall_Groupe_Apprenant_Type_result.filter((data) => (data).code === String(p_detail_type_groupe_code_auto))[0].label}
options={New_Option_Groupe_By}
onChange={(event, value) => {
if (value && value.code) {
setp_detail_type_groupe_code_auto(value.code);
setgrp_apprenant_data_changed("1");
} else {
setp_detail_type_groupe_code_auto("");
setgrp_apprenant_data_changed("1");
}
if (value.value)
setp_detail_split_type_auto(value.value);
else
setp_detail_split_type_auto("");
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
renderInput={(params) => <TextField {...params} placeholder="Choisir une option " />
}
/>
}
</div>
</div>
<div className="session_caract_Dialog" ><b>Type de Groupe </b> <br />
{New_Getall_Groupe_Apprenant_Type_result && New_Getall_Groupe_Apprenant_Type_result.length > 0 &&
<Autocomplete
disablePortal
name="detail_type_grp"
id="detail_type_grp"
fullWidth
options={New_Getall_Groupe_Apprenant_Type_result}
value={New_Getall_Groupe_Apprenant_Type_result.filter((data) => (data).code === String(p_detail_type_groupe_code_auto))[0].label}
onChange={(event, value) => {
if (value && value.code) {
setp_detail_type_groupe_code_auto(value.code);
setgrp_apprenant_data_changed("1");
} else {
setp_detail_type_groupe_code_auto("");
setgrp_apprenant_data_changed("1");
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
}
</div>
<div className="session_caract_Dialog" > Racine
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
name="event_dialog_racine"
id="event_dialog_racine"
fullWidth
value={p_detail_split_racine}
onChange={(e) => {
setp_detail_split_racine(e.target.value);
}
}
/>
</div>
</div>}
{String(submenu_grp_dialog) === "update" && <div>
<div className="div_row">
<div className="div_row_gauche">
&nbsp;
</div>
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Create_Automatic_Grp} className="bton_enreg_dialog">Mettre à jour Membres</Button>
</div>
</div>
</div>}
</DialogContent>
<DialogActions>
{String(submenu_grp_dialog) === "create" && <DialogActions>
<div className="div_row">
<div className="div_row_gauche">
@ -2185,7 +2248,7 @@ const Groupe_Apprenant = (props) => {
</div>
</div>
</DialogActions>
</DialogActions>}
</Dialog>
@ -2720,7 +2783,7 @@ const Groupe_Apprenant = (props) => {
id='menu_import_participant' name='menu_import_participant' onClick={(event) => {
setDialog_GRP_AUTOMATIC_open(true);
}} > Création automatique
}} > Gestion automatique
&nbsp; <FcMultipleSmartphones />
</Button>

File diff suppressed because it is too large Load Diff

View File

@ -1810,7 +1810,7 @@
}
.DialogContent_width{
width: 500px !important;
width: 600px !important;
}
@ -2465,7 +2465,7 @@
.DialogContent_width{
width: 500px !important;
width: 600px !important;
}