22/10*2025 - 22h

branche_01062025
Cherif 2025-10-22 21:34:46 +02:00
parent abf8628eb1
commit 7cffaaf5d0
2 changed files with 401 additions and 400 deletions

View File

@ -4288,6 +4288,9 @@ const AddClassManual = (props) => {
Get_List_Convention_Individuelle_Mail();
Get_List_Convention_Individuelle_PDF();
Get_List_Convention_Entreprise_Mail();
Get_List_Convention_Entreprise_PDF();
Getall_Partner_Formulaires_Eval_Froid();
Getall_Partner_Formulaires_Eval_Chaud();
Getall_Partner_Formulaires_Eval_Formateur();
@ -5321,6 +5324,106 @@ const AddClassManual = (props) => {
})
}
const [selected_default_Convention_entreprise_PDF, setselected_default_Convention_entreprise_PDF] = useState("");
const [New_Get_List_Convention_Entreprise_PDF_result, setNew_Get_List_Convention_Entreprise_PDF_result] = useState([]);
const [Get_List_Convention_Entreprise_PDF_api, setGet_List_Convention_Entreprise_PDF_api] = useState();
const [Get_List_Convention_Entreprise_PDF_message, setGet_List_Convention_Entreprise_PDF_message] = useState();
const [Get_List_Convention_Entreprise_PDF_result, setGet_List_Convention_Entreprise_PDF_result] = useState();
function Get_List_Convention_Entreprise_PDF() {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("type_doc", "pdf");
form.append("courrier_template_type_document_ref_interne", "CONVENTION_STAGIAIRE_ENTREPRISE");
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Conventions_Stagiaire_With_Filter/";
setLoading(true);
axios.post(myurl, form).then(res => {
//console.log(" In Get_List_Convention_Entreprise_PDF res.data.status = " + res.data.status);
//console.log(" In Get_List_Convention_Entreprise_PDF res.data.message r_class = " + res.data.message);
setLoading(false);
if (String(res.data.status) === String("true")) {
setGet_List_Convention_Entreprise_PDF_api("true");
setGet_List_Convention_Entreprise_PDF_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_ref_interne = JSON.parse(x).ref_interne;
var local_nom = JSON.parse(x).nom;
var local_sujet = JSON.parse(x).sujet;
var local_type_doc = JSON.parse(x).type_doc;
var local_cible = JSON.parse(x).cible;
var local_joint_pdf = JSON.parse(x).joint_pdf;
//---
var node = {
"_id": local_id,
"id": localid,
"label": local_nom,
"ref_interne": local_ref_interne,
"nom": local_nom,
"sujet": local_sujet,
"type_doc": local_type_doc,
"cible": local_cible,
"joint_pdf": local_joint_pdf,
};
new_data2.push(node);
});
var node = {
"_id": "",
"id": "",
"label": "",
"ref_interne": "",
"nom": "",
"sujet": "",
"type_doc": "",
"cible": "",
"joint_pdf": "",
};
new_data2.push(node);
if (new_data2.length > 0)
setNew_Get_List_Convention_Entreprise_PDF_result(new_data2);
else
setNew_Get_List_Convention_Entreprise_PDF_result([]);
}
else {
setGet_List_Convention_Entreprise_PDF_api("false");
setGet_List_Convention_Entreprise_PDF_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('Not good man :( Get_List_Convention_Entreprise_PDF = ', error);
setGet_List_Convention_Entreprise_PDF_api("false");
alert("Impossible de récupérer les modèles de Convention Entreprise PDF");
//setmyApimyApiMessage("")
})
}
const [selected_default_Convention_individuelle_Mail, setselected_default_Convention_individuelle_Mail] = useState("");
@ -5424,7 +5527,106 @@ const AddClassManual = (props) => {
}
const [selected_default_Convention_entreprise_Mail, setselected_default_Convention_entreprise_Mail] = useState("");
const [New_Get_List_Convention_Entreprise_Mail_result, setNew_Get_List_Convention_Entreprise_Mail_result] = useState([]);
const [Get_List_Convention_Entreprise_Mail_api, setGet_List_Convention_Entreprise_Mail_api] = useState();
const [Get_List_Convention_Entreprise_Mail_message, setGet_List_Convention_Entreprise_Mail_message] = useState();
const [Get_List_Convention_Entreprise_Mail_result, setGet_List_Convention_Entreprise_Mail_result] = useState();
function Get_List_Convention_Entreprise_Mail() {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("type_doc", "email");
form.append("courrier_template_type_document_ref_interne", "CONVENTION_STAGIAIRE_ENTREPRISE");
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Conventions_Stagiaire_With_Filter/";
setLoading(true);
axios.post(myurl, form).then(res => {
//console.log(" In Get_List_Convention_Entreprise_Mail res.data.status = " + res.data.status);
//console.log(" In Get_List_Convention_Entreprise_Mail res.data.message r_class = " + res.data.message);
setLoading(false);
if (String(res.data.status) === String("true")) {
setGet_List_Convention_Entreprise_Mail_api("true");
setGet_List_Convention_Entreprise_Mail_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_ref_interne = JSON.parse(x).ref_interne;
var local_nom = JSON.parse(x).nom;
var local_sujet = JSON.parse(x).sujet;
var local_type_doc = JSON.parse(x).type_doc;
var local_cible = JSON.parse(x).cible;
var local_joint_pdf = JSON.parse(x).joint_pdf;
//---
var node = {
"_id": local_id,
"id": localid,
"label": local_nom,
"ref_interne": local_ref_interne,
"nom": local_nom,
"sujet": local_sujet,
"type_doc": local_type_doc,
"cible": local_cible,
"joint_pdf": local_joint_pdf,
};
new_data2.push(node);
});
var node = {
"_id": "",
"id": "",
"label": "",
"ref_interne": "",
"nom": "",
"sujet": "",
"type_doc": "",
"cible": "",
"joint_pdf": "",
};
new_data2.push(node);
if (new_data2.length > 0)
setNew_Get_List_Convention_Entreprise_Mail_result(new_data2);
else
setNew_Get_List_Convention_Entreprise_Mail_result([]);
}
else {
setGet_List_Convention_Entreprise_Mail_api("false");
setGet_List_Convention_Entreprise_Mail_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('Not good man :( Get_List_Convention_Entreprise_Mail = ', error);
setGet_List_Convention_Entreprise_Mail_api("false");
alert("Impossible de récupérer les modèles de Convention entreprise mail");
//setmyApimyApiMessage("")
})
}
const [selected_default_Stagiaire_Convocations_Mail, setselected_default_Stagiaire_Convocations_Mail] = useState("");
@ -5952,6 +6154,9 @@ const AddClassManual = (props) => {
form.append("CONVENTION_STAGIAIRE_INDIVIDUELLE_MAIL", selected_default_Convention_individuelle_Mail);
form.append("CONVENTION_STAGIAIRE_INDIVIDUELLE_PDF", selected_default_Convention_individuelle_PDF);
form.append("CONVENTION_STAGIAIRE_ENTREPRISE_MAIL", selected_default_Convention_entreprise_Mail);
form.append("CONVENTION_STAGIAIRE_ENTREPRISE_PDF", selected_default_Convention_entreprise_PDF);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Class_Default_Document/";
@ -6045,6 +6250,14 @@ const AddClassManual = (props) => {
setselected_default_Convention_individuelle_PDF(mylocaltraining.CONVENTION_STAGIAIRE_INDIVIDUELLE_PDF);
}
if (mylocaltraining.CONVENTION_STAGIAIRE_ENTREPRISE_MAIL) {
setselected_default_Convention_entreprise_Mail(mylocaltraining.CONVENTION_STAGIAIRE_ENTREPRISE_MAIL);
}
if (mylocaltraining.CONVENTION_STAGIAIRE_ENTREPRISE_PDF) {
setselected_default_Convention_entreprise_PDF(mylocaltraining.CONVENTION_STAGIAIRE_ENTREPRISE_PDF);
}
if (mylocaltraining.EVAL_FORMATION_HOT) {
setselected_default_Formulaires_Eval_Chaud(mylocaltraining.EVAL_FORMATION_HOT);
}
@ -8688,6 +8901,71 @@ const AddClassManual = (props) => {
</div>
{/*** Convention Entreprise */}
<div style={{ display: 'flex', flexDirection: 'row', gap: '20px', width: '100%', flexWrap: 'wrap', justifyContent: 'left' }}>
<div style={{ paddingTop: '2rem', width: '12rem', fontFamily: 'DM Sans', fontSize: '16px' }}> Conventions Entreprise</div>
<div className="session_caract">
{New_Get_List_Convention_Entreprise_PDF_result.length > 0 && <div className="session_caract_Dialog" > Choisir un modèle par défault (PDF)
<Autocomplete
disablePortal
name="default_convention_entreprise_pdf"
id="default_convention_entreprise_pdf"
fullWidth
//className="disabled_style enable_style"
options={New_Get_List_Convention_Entreprise_PDF_result}
value={New_Get_List_Convention_Entreprise_PDF_result.filter((data) => (data)._id === String(selected_default_Convention_entreprise_PDF))[0].label}
onChange={(event, value) => {
setdefault_doc_modification("1");
if (value && value._id)
setselected_default_Convention_entreprise_PDF(value._id);
else
setselected_default_Convention_entreprise_PDF("")
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
</div>}
</div>
<div className="session_caract">
{New_Get_List_Convention_Entreprise_Mail_result.length > 0 && <div className="session_caract_Dialog" > Choisir un modèle par défault (Email)
<Autocomplete
disablePortal
name="default_convention_entreprise_email"
id="default_convention_entreprise_email"
fullWidth
//className="disabled_style enable_style"
options={New_Get_List_Convention_Entreprise_Mail_result}
value={New_Get_List_Convention_Entreprise_Mail_result.filter((data) => (data)._id === String(selected_default_Convention_entreprise_Mail))[0].label}
onChange={(event, value) => {
setdefault_doc_modification("1");
if (value && value._id)
setselected_default_Convention_entreprise_Mail(value._id);
else
setselected_default_Convention_entreprise_Mail("")
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
</div>}
</div>
</div>
{/*** Convocation */}
<div style={{ display: 'flex', flexDirection: 'row', gap: '20px', width: '100%', flexWrap: 'wrap', justifyContent: 'left' }}>

View File

@ -12357,7 +12357,8 @@ const DisplayPartnerSession = (props) => {
const Dialog_convention_handleClose_buton = () => {
setDialog_convention_open(false);
setselected_convention_id();
setselected_convention_id("");
setselected_convocation_id("");
setselected_convention_type();
setselected_convention_email_destinataire_prod();
setselected_convention_email_test();
@ -12372,7 +12373,10 @@ const DisplayPartnerSession = (props) => {
const [selected_emargement_type, setselected_emargement_type] = useState("");
const [selected_convention_id, setselected_convention_id] = useState();
const [selected_convocation_id, setselected_convocation_id] = useState("");
const [selected_convention_id, setselected_convention_id] = useState("");
const [selected_convention_type, setselected_convention_type] = useState("");
const [selected_convention_email_destinataire_prod, setselected_convention_email_destinataire_prod] = useState("");
const [selected_convention_email_test, setselected_convention_email_test] = useState("");
@ -12438,11 +12442,27 @@ const DisplayPartnerSession = (props) => {
new_data2.push(node);
});
var node = {
"_id": "",
"id": "",
"label": "",
"ref_interne": "",
"nom": "",
"sujet": "",
"type_doc": "",
"cible": "",
"joint_pdf": "",
};
new_data2.push(node);
if (new_data2.length > 0)
setNew_Get_List_Stagiaire_Conventions_result(new_data2);
else
setNew_Get_List_Stagiaire_Conventions_result([])
console.log(" ## new_data2 = ", new_data2);
}
else {
setGet_List_Stagiaire_Conventions_api("false");
@ -12481,10 +12501,13 @@ const DisplayPartnerSession = (props) => {
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Class_List_Default_Documents_For_Given_Type_Doc/";
setLoading(true);
setNew_Get_Class_Default_Document_id_result("");
setselected_convention_id("");
setselected_convocation_id("");
axios.post(myurl, form).then(res => {
//console.log(" In Get_Class_Default_Document_id res.data.status = " + res.data.status);
console.log(" In Get_Class_Default_Document_id res.data.message r_class = " + res.data.message);
// console.log(" In Get_Class_Default_Document_id res.data.message r_class = " + res.data.message);
setLoading(false);
if (String(res.data.status) === String("true")) {
@ -12494,8 +12517,17 @@ const DisplayPartnerSession = (props) => {
var mylocaltraining = JSON.parse(res.data.message);
if (mylocaltraining[local_type_document]) {
console.log(" OKKK = ", mylocaltraining[local_type_document]);
New_Get_Class_Default_Document_id_result(mylocaltraining[local_type_document])
// console.log(" OKKK = ", mylocaltraining[local_type_document]);
setNew_Get_Class_Default_Document_id_result(mylocaltraining[local_type_document]);
if (local_type_document === "CONVENTION_STAGIAIRE_INDIVIDUELLE_MAIL"
|| local_type_document === "CONVENTION_STAGIAIRE_INDIVIDUELLE_PDF"
|| local_type_document === "CONVENTION_STAGIAIRE_ENTREPRISE_MAIL"
|| local_type_document === "CONVENTION_STAGIAIRE_ENTREPRISE_PDF")
setselected_convention_id(mylocaltraining[local_type_document]);
else if (local_type_document === "CONVOCATION_STAGIAIRE_MAIL"
|| local_type_document === "CONVOCATION_STAGIAIRE_PDF")
setselected_convocation_id(mylocaltraining[local_type_document]);
}
@ -14670,6 +14702,20 @@ const DisplayPartnerSession = (props) => {
new_data2.push(node);
});
var node = {
"_id": "",
"id": "",
"label": "",
"ref_interne": "",
"nom": "",
"sujet": "",
"type_doc": "",
"cible": "",
"joint_pdf": "",
};
new_data2.push(node);
if (new_data2.length > 0)
setNew_Get_List_Stagiaire_Convocations_result(new_data2);
else
@ -14712,7 +14758,7 @@ const DisplayPartnerSession = (props) => {
tab_my_inscription_ids.push(myid['_id']);
}
if (!selected_convention_id || String(selected_convention_id).trim() === "") {
if (!selected_convocation_id || String(selected_convocation_id).trim() === "") {
// alert(" Vous devez choisir un document");
setdisplay_alert_mysy("1");
setalert_message("Vous devez choisir un document");
@ -14726,7 +14772,7 @@ const DisplayPartnerSession = (props) => {
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("session_id", selected_session_id);
form.append("courrier_template_id", selected_convention_id);
form.append("courrier_template_id", selected_convocation_id);
form.append("email_test", selected_convention_email_test);
form.append("email_production", selected_convention_email_destinataire_prod);
form.append("tab_ids", tab_my_inscription_ids);
@ -14746,7 +14792,7 @@ const DisplayPartnerSession = (props) => {
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convocation_From_Session_For_Selected_Inscrit_By_Email/";
if (String(selected_convention_id) === "default_mail") {
if (String(selected_convocation_id) === "default_mail") {
// Il s'agit d'envoyer les convention par defaut de type mail
myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Default_Convocation_From_Session_By_Email/";
}
@ -14797,7 +14843,7 @@ const DisplayPartnerSession = (props) => {
var nom_fichier_cmd = "Convocation.zip";
if (String(selected_convention_id).trim() === "") {
if (String(selected_convocation_id).trim() === "") {
setdisplay_alert_mysy("1");
setalert_message("Vous devez choisir un modèle de document ");
setalert_type("error");
@ -14820,12 +14866,12 @@ const DisplayPartnerSession = (props) => {
tab_my_inscription_ids.push(myid['_id']);
}
var url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convocation_From_Session_For_Selected_Inscrit_By_PDF/" + stored_cookie + "/" + selected_session_id + "/" + selected_convention_id + "/" + tab_my_inscription_ids;
var url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convocation_From_Session_For_Selected_Inscrit_By_PDF/" + stored_cookie + "/" + selected_session_id + "/" + selected_convocation_id + "/" + tab_my_inscription_ids;
//console.log(" ### url = ", url);
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_session_id = ", selected_session_id, " --- selected_convention_id =", selected_convention_id);
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_session_id = ", selected_session_id, " --- selected_convocation_id =", selected_convocation_id);
setLoading(true);
axios.get(url, { responseType: 'blob', },)
.then((res) => {
@ -16653,7 +16699,20 @@ const DisplayPartnerSession = (props) => {
options={New_Option_Type_Document}
onChange={(event, value) => {
if (value && value.value) {
Get_Class_Default_Document_id("CONVENTION_STAGIAIRE_INDIVIDUELLE_MAIL")
if (value.value === "email" && String(Dialog_1_message) === "CONVENTION_STAGIAIRE_INDIVIDUELLE")
Get_Class_Default_Document_id("CONVENTION_STAGIAIRE_INDIVIDUELLE_MAIL");
else if (value.value === "pdf" && String(Dialog_1_message) === "CONVENTION_STAGIAIRE_INDIVIDUELLE")
Get_Class_Default_Document_id("CONVENTION_STAGIAIRE_INDIVIDUELLE_PDF");
else if (value.value === "email" && String(Dialog_1_message) === "CONVENTION_STAGIAIRE_ENTREPRISE")
Get_Class_Default_Document_id("CONVENTION_STAGIAIRE_ENTREPRISE_MAIL");
else if (value.value === "pdf" && String(Dialog_1_message) === "CONVENTION_STAGIAIRE_ENTREPRISE")
Get_Class_Default_Document_id("CONVENTION_STAGIAIRE_ENTREPRISE_PDF");
setselected_convention_type(value.value);
Get_List_Stagiaire_Conventions(action_server_ref_interne_doc, action_server_nom_doc,
@ -16715,41 +16774,46 @@ const DisplayPartnerSession = (props) => {
</div>}
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") && <div className="session_caract_Dialog" > <b> Choisir une convention </b>
<Autocomplete
disablePortal
name="event_dialog_version_convention"
id="event_dialog_version_convention"
fullWidth
//className="disabled_style enable_style"
options={New_Get_List_Stagiaire_Conventions_result}
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
<div className="session_caract_Dialog" > <b> Choisir une convention </b>
{New_Get_List_Stagiaire_Conventions_result.length > 0 && <Autocomplete
disablePortal
name="event_dialog_version_convention"
id="event_dialog_version_convention"
fullWidth
//className="disabled_style enable_style"
options={New_Get_List_Stagiaire_Conventions_result}
// value={New_Get_List_Stagiaire_Conventions_result.filter((data) => (data)._id === String(selected_convention_id))[0].label}
onChange={(event, value) => {
if (value && value._id) {
onChange={(event, value) => {
if (value && value._id) {
setselected_convention_id(value._id);
setselected_convention_id(value._id);
if (String(value._id) === "default_mail") {
setselected_convention_type("email");
if (String(value._id) === "default_mail") {
setselected_convention_type("email");
}
else if (String(value._id) === "default_pdf") {
setselected_convention_type("pdf");
} else {
var result2 = Get_List_Stagiaire_Conventions_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id))
setselected_convention_type(JSON.parse(result2).type_doc);
}
settab_convention_pieces_jointes_result([]);
}
else if (String(value._id) === "default_pdf") {
setselected_convention_type("pdf");
} else {
var result2 = Get_List_Stagiaire_Conventions_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id))
setselected_convention_type(JSON.parse(result2).type_doc);
else {
setselected_convention_id("");
settab_convention_pieces_jointes_result([]);
}
settab_convention_pieces_jointes_result([]);
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
}}
/>}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
</div>}
</div>}
@ -16973,362 +17037,7 @@ const DisplayPartnerSession = (props) => {
{/* FIN Dialog pour gerer les CONVENTIONS ENTREPRISE & INDIVIDUELLE*/}
{/* Dialog pour gerer les CONVENTIONS INDIVIDUELLE*/}
{/*<Dialog
open={Dialog_convention_open}
// onClose={Dialog_convention_handleClose}
//className="displaypartnersession"
className="displaypartnersession"
static
onClose={() => null}
PaperProps={{
className: classes.paper, // Apply the paper style
style: {
overflowY: 'unset',
position: 'absolute',
top: '7rem',
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"> &nbsp; </DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContentText>
{Dialog_1_message}
</DialogContentText>
<div className="session_caract_Dialog" > <b>Type Document </b> <br />
<Autocomplete
disablePortal
name="event_dialog_type_convention"
id="event_dialog_type_convention"
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 } }}
fullWidth
options={New_Option_Type_Document}
onChange={(event, value) => {
if (value && value.value) {
setselected_convention_type(value.value);
Get_List_Stagiaire_Conventions(action_server_ref_interne_doc, action_server_nom_doc,
String(value.value), Dialog_1_message);
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
</div>
{String(partner_digital_signature_status) === "1" && String(selected_convention_type) === "email" &&
String(Dialog_1_message) === "CONVENTION_STAGIAIRE_INDIVIDUELLE" && <div className="session_caract_Dialog" >
<div className="session_caract_Dialog" >
<Tooltip className="tooltip_css" id="tooltip_signat_dig" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_signat_dig" data-tooltip-html="Utiliser la fonctionnalité de signature électronique pour ce document ">
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
onChange={(e) => {
if (local_partner_digital_signature_status === true)
setlocal_partner_digital_signature_status(false)
else {
setlocal_partner_digital_signature_status(true);
}
}}
id="toggleSwitchNav_1" name="toggleSwitchNav_1">
<ToggleSwitch
label="Signature Digiale" id="toggleSwitch_1" name="toggleSwitch_1" checked={local_partner_digital_signature_status} style={{ height: "2rem" }} />
</nav>
</a>
</div>
</div>}
{String(partner_digital_signature_status) !== "1" && String(selected_convention_type) === "email" && String(Dialog_1_message) === "CONVENTION_STAGIAIRE_INDIVIDUELLE" &&
<div className="session_caract_Dialog" > Signature Digiale <br />
<div className="session_caract_Dialog" >
<Tooltip className="tooltip_css" id="tooltip_signat_dig" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_signat_dig" data-tooltip-html="Nous ne disposez pas de l'option de signature électronique ">
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
id="toggleSwitchNav_1" name="toggleSwitchNav_1">
<ToggleSwitch
label="Activer la signature digiatale" id="toggleSwitch_1" name="toggleSwitch_1" checked={false} style={{ height: "2rem" }} />
</nav>
</a>
</div>
</div>}
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") && <div className="session_caract_Dialog" > <b> Choisir une convention </b>
<Autocomplete
disablePortal
name="event_dialog_version_convention"
id="event_dialog_version_convention"
fullWidth
//className="disabled_style enable_style"
options={New_Get_List_Stagiaire_Conventions_result}
onChange={(event, value) => {
if (value && value._id) {
setselected_convention_id(value._id);
if (String(value._id) === "default_mail") {
setselected_convention_type("email");
}
else if (String(value._id) === "default_pdf") {
setselected_convention_type("pdf");
} else {
var result2 = Get_List_Stagiaire_Conventions_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id))
setselected_convention_type(JSON.parse(result2).type_doc);
}
settab_convention_pieces_jointes_result([]);
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
</div>}
{String(selected_convention_type) === "email" && <div className="session_caract_Dialog" >
<Tooltip className="tooltip_css" id="test01" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="test01" data-tooltip-html="Pour recevoir une email de test avant de l'envoyer">
<nav style={{ width: '100%', 'float': 'left' }}> Adresse email de test <FcInfo /> </nav>
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, width: '75%' }}
name="event_dialog_email_test_convention"
id="event_dialog_email_test_convention"
fullWidth
value={selected_convention_email_test}
onChange={(e) => {
setselected_convention_email_test(e.target.value);
}
}
/>
</a>
{String(selected_convention_type) === "email" && <label className="bton_image_class" style={{ "width": "20%", "float": "right", "height": "3rem", "paddingTop": "15px" }} onClick={(e) => {
if (selected_convention_email_test) {
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
if (!selected_convention_email_test.match(validRegex)) {
// alert("L'adresse email de test est invalide.");
setdisplay_alert_mysy("1");
setalert_message("L'adresse email de test est invalide.");
setalert_type("error");
return;
}
Send_Stagiaire_Conventions_By_Email_Test();
} else {
// alert("L'adresse email de test est invalide.");
setdisplay_alert_mysy("1");
setalert_message("L'adresse email de test est invalide.");
setalert_type("error")
}
}} > <FcSearch /> &nbsp; Test</label>}
</div>
}
{String(selected_convention_type) === "email" &&
String(actionmass_ftion_val) !== String("convention") && <div className="session_caract_Dialog" > Email destinaitaire
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
name="event_dialog_email_production_convention"
id="event_dialog_email_production_convention"
fullWidth
value={selected_convention_email_destinataire_prod}
onChange={(e) => {
setselected_convention_email_destinataire_prod(e.target.value);
}
}
/>
</div>
}
{String(selected_convention_type) === "email" && <div>
<div>
<div className="div_row" style={{ "border": "None" }}>
<hr className="hr_break" />
</div>
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
Pièces jointes
</div>
<div className="div_row" style={{ "padding": "5px" }}>
<div style={{ "fontSize": "12px" }}>
<label htmlFor="upload_convention_file">
<input
style={{ display: "none" }}
id="upload_convention_file"
name="upload_convention_file"
type="file"
onChange={sessions_file_change_1_convention}
/>
<Fab
color="secondary"
size="small"
component="span"
aria-label="add"
variant="extended"
>
<IoMdAddCircle /> <nav style={{ "fontSize": "12px" }}> Ajouter un fichier </nav>
</Fab>
</label>
</div>
</div>
{tab_convention_pieces_jointes_result && <div className="div_row" style={{ "padding": "5px" }}>
<div className="div_row">
Liste des pièces jointes <br />
{<div className="div_row">
{tab_convention_pieces_jointes_result && tab_convention_pieces_jointes_result.map((val) => (
<div className="div_row_list_pj_convention" >
<nav style={{ "color": "orange", "cursor": "pointer" }}
onClick={(e) => {
Delete_Convention_Attached_Doc(e);
}}
name={val.name} id={val.name}> Supprimer {val.name} </nav> <br />
</div>
))}
</div>}
</div>
</div>}
</div>
</div>}
</DialogContent>
<DialogActions>
<IconButton
// autoFocus
onClick={Dialog_convention_handleClose_buton}
color="primary"
className={classes.customizedButton}
>
<CancelPresentationIcon />
</IconButton>
<div className="div_row">
<div className="div_row_gauche">
{String(selected_convention_type) === "email" && <Button onClick={(e) => {
if (String(selected_convention_email_test).length > 2) {
if (!selected_convention_type || selected_convention_type === "") {
setdisplay_alert_mysy("1");
setalert_message("Vous devez choisir un type de document");
setalert_type("error");
return;
}
if (!selected_convention_id || selected_convention_id === "") {
setdisplay_alert_mysy("1");
setalert_message("Vous devez choisir un modèle de document");
setalert_type("error");
return;
}
// On alerte juste l'utilisateur que l'email de test n'est pas vide, juste au cas ou il aurait cliqué par erreur sur l'envoie.
const response = window.confirm(" Vous allez envoyer la convention au destinaitaire final. Continuer ?");
if (!response) {
return;
}
}
Dialog_convention_handleClose_buton();
Send_Stagiaire_Conventions_By_Email();
}}
className="bton_enreg_dialog">Envoyer mail </Button>}
{String(selected_convention_type) === "pdf" &&
<Button className="bton_enreg_dialog" onClick={(e) => {
Dialog_convention_handleClose_buton();
Download_Session_Conventions_PDF();
}}
>Télécharger </Button>}
</div>
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Dialog_convention_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
</div>
</div>
</DialogActions>
</Dialog> */}
{/* FIN Dialog pour gerer les CONVENTIONS INDIVIDUELLE*/}
{/* Dialog pour gerer les CONVOCATION_STAGIAIRE */}
@ -17381,6 +17090,13 @@ const DisplayPartnerSession = (props) => {
options={New_Option_Type_Document}
onChange={(event, value) => {
if (value && value.value) {
if (value.value === "email")
Get_Class_Default_Document_id("CONVOCATION_STAGIAIRE_MAIL");
else if (value.value === "pdf")
Get_Class_Default_Document_id("CONVOCATION_STAGIAIRE_PDF");
setselected_convention_type(value.value);
Get_List_Stagiaire_Convocations(action_server_ref_interne_doc, action_server_nom_doc,
String(value.value), Dialog_1_message);
@ -17398,7 +17114,8 @@ const DisplayPartnerSession = (props) => {
</div>
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") && <div className="session_caract_Dialog" > <b> Choisir une convocation </b>
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
New_Get_List_Stagiaire_Convocations_result.length > 0 && <div className="session_caract_Dialog" > <b> Choisir une convocation </b>
<Autocomplete
disablePortal
name="event_dialog_version_convention"
@ -17406,11 +17123,13 @@ const DisplayPartnerSession = (props) => {
fullWidth
//className="disabled_style enable_style"
options={New_Get_List_Stagiaire_Convocations_result}
value={New_Get_List_Stagiaire_Convocations_result.filter((data) => (data)._id === String(selected_convocation_id))[0].label}
onChange={(event, value) => {
if (value && value._id) {
setselected_convention_id(value._id);
setselected_convocation_id(value._id);
// setselected_convention_id(value._id);
if (String(value._id) === "default_mail") {
setselected_convention_type("email");
@ -17423,6 +17142,10 @@ const DisplayPartnerSession = (props) => {
}
settab_convention_pieces_jointes_result([]);
}
else {
setselected_convocation_id("");
settab_convention_pieces_jointes_result([]);
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option" />
@ -17646,7 +17369,7 @@ const DisplayPartnerSession = (props) => {
setalert_type("error");
return;
}
if (!selected_convention_id || selected_convention_id === "") {
if (!selected_convocation_id || selected_convocation_id === "") {
setdisplay_alert_mysy("1");
setalert_message("Vous devez choisir un modèle de document");
setalert_type("error");