recette2
cherif 2024-01-25 22:57:46 +01:00
parent fe74e09d6f
commit b4af27438e
2 changed files with 25 additions and 31 deletions

View File

@ -9307,7 +9307,7 @@ const DisplayPartnerSession = (props) => {
{<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": "green", "cursor": "pointer" }}
<nav style={{ "color": "orange", "cursor": "pointer" }}
onClick={(e) => {
Delete_Convention_Attached_Doc(e);
}}

View File

@ -174,6 +174,7 @@ const Module_Editique = (props) => {
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Action_Server_" + String(api_name) + "/";
console.log(" myurl...", myurl)
return;
setLoading(true);
axios.post(myurl, form).then(res => {
@ -203,6 +204,7 @@ const Module_Editique = (props) => {
useEffect(() => {
setselected_session_id(props.related_collection_recid);
Getall_Editable_Document_By_Partner_By_Collection();
window.scrollTo({
top: 0,
@ -252,7 +254,7 @@ const Module_Editique = (props) => {
};
const [selected_session_id, setselected_session_id] = useState();
const [selected_session_id, setselected_session_id] = useState("");
const [selected_internal_url, setselected_internal_url] = useState();
@ -310,7 +312,7 @@ const Module_Editique = (props) => {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("type_doc", type_doc);
@ -332,7 +334,7 @@ const Module_Editique = (props) => {
setGet_List_Stagiaire_Conventions_result(res.data.message);
var new_data2 = [];
const new_data = res.data.message.map((x) => {
//---
@ -537,6 +539,7 @@ const Module_Editique = (props) => {
form.append("email_test", selected_convention_email_test);
form.append("email_production", selected_convention_email_destinataire_prod);
// pièce jointe
form.append("file_business_object", "");
var list_files = new FormData();
@ -554,13 +557,15 @@ const Module_Editique = (props) => {
myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Default_Convention_From_Session_By_Email/";
}
//console.log(" ### myurl = ", myurl);
setLoading(true);
axios.post(myurl, form).then(res => {
setLoading(false);
console.log(" In Send_Stagiaire_Conventions_By_Email res.data.status = " + res.data.status);
console.log(" In Send_Stagiaire_Conventions_By_Email res.data.message r_class = " + res.data.message);
if (String(res.data.status) === String("true")) {
//console.log(" In Send_Stagiaire_Conventions_By_Email res.data.status = " + res.data.status);
//console.log(" In Send_Stagiaire_Conventions_By_Email res.data.message r_class = " + res.data.message);
setSend_Stagiaire_Conventions_By_Email_api("true");
setSend_Stagiaire_Conventions_By_Email_result(res.data.message);
@ -704,20 +709,11 @@ const Module_Editique = (props) => {
name="event_dialog_type_convention"
id="event_dialog_type_convention"
select
value="email"
/>
value={selected_convention_type}
onChange={(e) => {
setselected_convention_type(e.target.value);
}
}
>
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem>
<MenuItem value="pdf" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >PDF &nbsp;</MenuItem>
</TextField>
{String(selected_convention_type) === "email" && <label className="bton_image_class" style={{ "width": "20%", "float": "right", "height": "3.5rem", "paddingTop": "15px" }} onClick={(e) => {
if (selected_convention_email_test) {
@ -744,19 +740,13 @@ const Module_Editique = (props) => {
name="event_dialog_type_convention"
id="event_dialog_type_convention"
select
value="pdf"
fullWidth
value={selected_convention_type}
onChange={(e) => {
setselected_convention_type(e.target.value);
}
}
>
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email &nbsp;</MenuItem>
<MenuItem value="pdf" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >PDF &nbsp;</MenuItem>
</TextField>
/>
</div>}
@ -882,7 +872,7 @@ const Module_Editique = (props) => {
{<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": "green", "cursor": "pointer" }}
<nav style={{ "color": "orange", "cursor": "pointer" }}
onClick={(e) => {
Delete_Convention_Attached_Doc(e);
}}
@ -908,14 +898,18 @@ const Module_Editique = (props) => {
<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) {
// 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;
}
Send_Stagiaire_Conventions_By_Email();
Dialog_convention_handleClose_buton();
}
Send_Stagiaire_Conventions_By_Email();
Dialog_convention_handleClose_buton();
}}
className="bton_enreg_dialog">Envoyer mail </Button>}
{String(selected_convention_type) === "pdf" &&