05/01/24 - 20h30

recette2
cherif 2024-01-05 20:28:02 +01:00
parent cf053cfbf1
commit 9807500adb
3 changed files with 103 additions and 16 deletions

View File

@ -1321,6 +1321,8 @@ const DisplayPartnerSession = (props) => {
}) })
} }
const [New_Getall_Training_Materiel_No_Filter_result, setNew_Getall_Training_Materiel_No_Filter_result] = useState([]);
const [Getall_Training_Materiel_No_Filter_api, setGetall_Training_Materiel_No_Filter_api] = useState(); const [Getall_Training_Materiel_No_Filter_api, setGetall_Training_Materiel_No_Filter_api] = useState();
const [Getall_Training_Materiel_No_Filter_message, setGetall_Training_Materiel_No_Filter_message] = useState(); const [Getall_Training_Materiel_No_Filter_message, setGetall_Training_Materiel_No_Filter_message] = useState();
@ -1346,6 +1348,31 @@ const DisplayPartnerSession = (props) => {
//console.log(" In Getall_Training_Materiel_No_Filter res.data.message r_class = " + res.data.message); //console.log(" In Getall_Training_Materiel_No_Filter res.data.message r_class = " + res.data.message);
setGetall_Training_Materiel_No_Filter_api("true"); setGetall_Training_Materiel_No_Filter_api("true");
setGetall_Training_Materiel_No_Filter_result(res.data.message); setGetall_Training_Materiel_No_Filter_result(res.data.message);
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_nom = JSON.parse(x).nom;
var local_ref_interne = JSON.parse(x).ref_interne;
//---
var node = {
"_id": local_id,
"id": localid,
"label": local_nom,
"nom": local_nom,
"ref_interne": local_ref_interne,
};
new_data2.push(node);
});
if (new_data2.length > 0)
setNew_Getall_Training_Materiel_No_Filter_result(new_data2);
} }
else { else {
setGetall_Training_Materiel_No_Filter_api("false"); setGetall_Training_Materiel_No_Filter_api("false");
@ -4620,7 +4647,7 @@ const DisplayPartnerSession = (props) => {
//--- //---
var node = { var node = {
"_id": local_id, "id": localid, "_id": local_id, "id": localid,
"label": local_title, "label": local_title,
"internal_url": local_internal_url, "internal_url": local_internal_url,
"title": local_title, "title": local_title,
"ispublished": local_is_published, "ispublished": local_is_published,
@ -8491,7 +8518,7 @@ const DisplayPartnerSession = (props) => {
<div className="div_row_dialog"> <div className="div_row_dialog">
<div className="div_row_gauche_dialog_session" style={{ "textAlign": 'left' }}> <div className="div_row_gauche_dialog_session" style={{ "textAlign": 'left' }}>
Publié Ftion Publiée
</div> </div>
{rowss && String(session_selected_row_id).length > 0 && <div className="div_row_droite_dialog_session" style={{ "textAlign": 'right' }}> {rowss && String(session_selected_row_id).length > 0 && <div className="div_row_droite_dialog_session" style={{ "textAlign": 'right' }}>
<ToggleSwitch id="toggleSwitch" name="toggleSwitch" checked={JSON.parse(rowss[session_selected_row_id]).class_published} /> <ToggleSwitch id="toggleSwitch" name="toggleSwitch" checked={JSON.parse(rowss[session_selected_row_id]).class_published} />
@ -8710,7 +8737,26 @@ const DisplayPartnerSession = (props) => {
{String(Dialog_seq_ressource_1_selected_type_ressource) === "ressource_humaine" && <div className="session_caract_Dialog" > Ressource Humaine {String(Dialog_seq_ressource_1_selected_type_ressource) === "ressource_humaine" && <div className="session_caract_Dialog" > Ressource Humaine
<TextField
<Autocomplete
disablePortal
name="event_dialog_ressource_id"
id="event_dialog_ressource_id"
fullWidth
options={New_Getall_Training_Employee_No_Filter_result}
onChange={(event, value) => {
if (value && value._id) {
setDialog_seq_ressource_1_selected_ressource_id(value._id);
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
/>
{/* <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
name="event_dialog_ressource_id" name="event_dialog_ressource_id"
@ -8735,14 +8781,33 @@ const DisplayPartnerSession = (props) => {
</MenuItem> </MenuItem>
))} ))}
</TextField> </TextField>*/}
</div> </div>
} }
{String(Dialog_seq_ressource_1_selected_type_ressource) === "ressource_materielle" && <div className="session_caract_Dialog" > Ressource Materiel {String(Dialog_seq_ressource_1_selected_type_ressource) === "ressource_materielle" && <div className="session_caract_Dialog" > Ressource Materiel
<TextField
<Autocomplete
disablePortal
name="event_dialog_ressource_id"
id="event_dialog_ressource_id"
fullWidth
options={New_Getall_Training_Employee_No_Filter_result}
onChange={(event, value) => {
if (value && value._id) {
setDialog_seq_ressource_1_selected_ressource_id(value._id);
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
/>
{/*<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
name="event_dialog_ressource_id" name="event_dialog_ressource_id"
@ -8767,7 +8832,7 @@ const DisplayPartnerSession = (props) => {
</MenuItem> </MenuItem>
))} ))}
</TextField> </TextField>*/}
</div> </div>
} }
@ -11719,11 +11784,19 @@ const DisplayPartnerSession = (props) => {
&times; &times;
</button> </button>
<div className="gest_header"> MySy Information </div> <div className="gest_header"> MySy Information </div>
<div className="gest_content"> {String(actionmass_sequence_val) === "ajout_ressource" && <div className="gest_content">
{' '} {' '}
Confirmer l'action <b> {actionmass_sequence_val} </b> en masse. Confirmer l'action <b> d'ajout de ressource </b> en masse.
</div> </div>}
{String(actionmass_sequence_val) === "supprimer" && <div className="gest_content">
{' '}
Confirmer l'action <b style={{"color":"red"}}> de suppression </b> en masse.
</div>}
<div className="gest_actions"> <div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}> <div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => { <button className="gest_bton_popup" onClick={(event) => {

View File

@ -935,7 +935,7 @@
} }
.icon_excel { .icon_excel {
width: 10%; width: 5%;
} }
@ -1604,7 +1604,7 @@
} }
.icon_excel { .icon_excel {
width: 10%; width: 5%;
} }
@ -2164,7 +2164,7 @@
} }
.icon_excel { .icon_excel {
width: 10%; width: 5%;
} }
.bton_envoyer { .bton_envoyer {
@ -2181,13 +2181,27 @@
font-size: small; font-size: small;
padding: 0.3rem; padding: 0.3rem;
width: 40%; width: 40%;
background: #81BC3A; background: #81BC3A !important;
margin-left: 5%; margin-left: 5%;
height: 2.5rem; height: 2.5rem;
color: white; color: white !important;
} }
.bton_traiter_en_mass:hover{
border-radius: 5px;
font-size: small;
padding: 0.3rem;
width: 40%;
background: #81BC3A !important;
margin-left: 5%;
height: 2.5rem;
color: white !important;
}
.bton_fermer { .bton_fermer {
border-radius: 5px; border-radius: 5px;
font-size: small; font-size: small;

View File

@ -1775,7 +1775,7 @@
border-radius: 5px; border-radius: 5px;
background: white; background: white;
border: solid gainsboro 1px; border: solid gainsboro 1px;
padding-left: 5px !important; //padding-left: 5px !important;
} }
.disabled_style_Dialog { .disabled_style_Dialog {
@ -1789,7 +1789,7 @@
border-radius: 5px; border-radius: 5px;
background: white; background: white;
border: solid gainsboro 1px; border: solid gainsboro 1px;
padding-left: 5px !important; //padding-left: 5px !important;
} }
.session_caract_Dialog { .session_caract_Dialog {