06/12/2023 - 21h
parent
596185e0af
commit
be9f5dc1d5
|
@ -354,6 +354,7 @@ const Config_Documents = (props) => {
|
|||
const [p_one_detail_ref_interne, setp_one_detail_ref_interne] = useState("");
|
||||
const [p_one_detail_sujet, setp_one_detail_sujet] = useState("");
|
||||
const [p_one_detail_type_doc, setp_one_detail_type_doc] = useState("");
|
||||
const [p_one_detail_duplicate, setp_one_detail_duplicate] = useState("");
|
||||
|
||||
|
||||
function clear_detail_fields() {
|
||||
|
@ -373,6 +374,7 @@ const Config_Documents = (props) => {
|
|||
setp_one_detail_nom("");
|
||||
setp_one_detail_ref_interne("");
|
||||
setp_one_detail_sujet("");
|
||||
setp_one_detail_duplicate("");
|
||||
setp_one_detail_type_doc("");
|
||||
setone_field_programme();
|
||||
}
|
||||
|
@ -626,6 +628,13 @@ const Config_Documents = (props) => {
|
|||
setp_one_detail_sujet(mylocal_document.sujet);
|
||||
}
|
||||
|
||||
|
||||
if (mylocal_document.duplicate) {
|
||||
setp_one_detail_duplicate(mylocal_document.sujet);
|
||||
}
|
||||
else{
|
||||
setp_one_detail_duplicate("0");
|
||||
}
|
||||
setfield_programme("");
|
||||
if (mylocal_document.contenu_doc) {
|
||||
setp_one_detail_contenu_doc(String(mylocal_document.contenu_doc));
|
||||
|
@ -908,6 +917,14 @@ const Config_Documents = (props) => {
|
|||
}
|
||||
|
||||
|
||||
if (p_one_detail_duplicate)
|
||||
form.append("duplicate", p_one_detail_duplicate);
|
||||
else {
|
||||
form.append("duplicate", "0");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (p_one_detail_nom)
|
||||
form.append("nom", p_one_detail_nom);
|
||||
else {
|
||||
|
@ -1401,11 +1418,6 @@ const Config_Documents = (props) => {
|
|||
|
||||
function Record_All_PJ() {
|
||||
|
||||
if (!p_detail_one_file_to_download_type_name) {
|
||||
alert(" Vous devez donner un nom à la pièce jointe");
|
||||
return;
|
||||
}
|
||||
|
||||
if (file_1_name && file_1_name.name) {
|
||||
//console.log(" ### Traitement de : ", file_1_name.name);
|
||||
|
||||
|
@ -1415,7 +1427,7 @@ const Config_Documents = (props) => {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("file_business_object", p_detail_one_file_to_download_type_name);
|
||||
formData.append("file_business_object", file_1_name.name);
|
||||
formData.append("file_name", file_1_name.name);
|
||||
formData.append("status", "0");
|
||||
formData.append("object_owner_collection", "courrier_template");
|
||||
|
@ -2262,8 +2274,50 @@ const Config_Documents = (props) => {
|
|||
/>
|
||||
|
||||
</div>
|
||||
{p_detail_type_doc && String(p_detail_type_doc).toLocaleLowerCase() === "email" && <div className="div_row_gauche texte_area_filter" >
|
||||
Pièces Jointe <br />
|
||||
|
||||
</div>
|
||||
<div className="div_row_droite_1_tier" style={{ "textAlign": "left" }}>
|
||||
{String(partner_document_data_edit_mode) === "1" &&
|
||||
<div className="div_row" > Choisir un champ <br />
|
||||
<TextField
|
||||
name="champ_table"
|
||||
id="champ_table"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_champ_table}
|
||||
onChange={(e) => {
|
||||
setp_champ_table(e.target.value);
|
||||
}}
|
||||
>
|
||||
|
||||
{Get_Given_Personnalisable_Collection_and_Fields_result &&
|
||||
Get_Given_Personnalisable_Collection_and_Fields_result.filter((local_mymanager) => JSON.parse(local_mymanager).courrier_template_ref_interne === p_detail_ref_interne).map((mycollection) => (
|
||||
<MenuItem key={JSON.parse(mycollection).nom_champ_technique}
|
||||
value={JSON.parse(mycollection).nom_champ_technique}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
{JSON.parse(mycollection).nom_champ_fonctionel}
|
||||
|
||||
</MenuItem>
|
||||
))}
|
||||
</TextField>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(partner_document_data_edit_mode) === "1" && <div className="div_row">
|
||||
<Button className="bton_enreg" onClick={add_selected_fields} style={{ "margin": "1rem" }}
|
||||
>Ajouter Champ Choisi
|
||||
|
||||
</Button>
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
|
||||
{p_detail_type_doc && String(p_detail_type_doc).toLocaleLowerCase() === "email" && <div className="div_row" style={{ "marginRight": "15px" }} >
|
||||
|
||||
<div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<hr className="hr_break" />
|
||||
|
@ -2300,28 +2354,7 @@ const Config_Documents = (props) => {
|
|||
</div>
|
||||
{file_1_name && file_1_name.name &&
|
||||
<nav style={{ "fontSize": "12px" }}>
|
||||
<div className="session_caract">Nom du fichier <br />
|
||||
<TextField
|
||||
name="file_to_download_type_name"
|
||||
id="file_to_download_type_name"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_detail_one_file_to_download_type_name}
|
||||
onChange={(e) => {
|
||||
setp_detail_one_file_to_download_type_name(e.target.value);
|
||||
|
||||
}}
|
||||
/>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
Fichier : {file_1_name.name} <br /> <font style={{ "cursor": "pointer" }}
|
||||
Fichier : {file_1_name.name} <font style={{ "cursor": "pointer" }}
|
||||
onClick={Delete_file_1_name}> Supprimer <IoIosRemoveCircleOutline /> </font>
|
||||
</nav>}
|
||||
|
||||
|
@ -2349,11 +2382,10 @@ const Config_Documents = (props) => {
|
|||
<div className="div_row">
|
||||
{Get_List_Of_All_PJ_result && Get_List_Of_All_PJ_result.map((val) => (
|
||||
<div className="div_row_list_pj" >
|
||||
<nav style={{ "color": "green", "cursor": "pointer" }} onClick={Download_one_attached_document} name={(JSON.parse(val).file_name)} id={(JSON.parse(val).file_name)}> Télécharger <i> {(JSON.parse(val).file_business_object)}</i> </nav> <br />
|
||||
<nav style={{ "color": "green", "cursor": "pointer" }} onClick={Download_one_attached_document} name={(JSON.parse(val).file_name)} id={(JSON.parse(val).file_name)}> Télécharger <i> {(JSON.parse(val).file_business_object)}</i> </nav>
|
||||
<Popup
|
||||
trigger={
|
||||
<nav style={{ "color": "red", "cursor": "pointer" }} > Supprimer</nav>
|
||||
|
||||
<nav style={{ "color": "red", "cursor": "pointer", "marginBottom":"1rem" }} > Supprimer</nav>
|
||||
|
||||
}
|
||||
modal
|
||||
|
@ -2407,52 +2439,14 @@ const Config_Documents = (props) => {
|
|||
</div>}
|
||||
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<hr className="hr_break" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
<div className="div_row_droite_1_tier" style={{ "textAlign": "left" }}>
|
||||
{String(partner_document_data_edit_mode) === "1" &&
|
||||
<div className="div_row" > Choisir un champ <br />
|
||||
<TextField
|
||||
name="champ_table"
|
||||
id="champ_table"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_champ_table}
|
||||
onChange={(e) => {
|
||||
setp_champ_table(e.target.value);
|
||||
}}
|
||||
>
|
||||
|
||||
{Get_Given_Personnalisable_Collection_and_Fields_result &&
|
||||
Get_Given_Personnalisable_Collection_and_Fields_result.filter((local_mymanager) => JSON.parse(local_mymanager).courrier_template_ref_interne === p_detail_ref_interne).map((mycollection) => (
|
||||
<MenuItem key={JSON.parse(mycollection).nom_champ_technique}
|
||||
value={JSON.parse(mycollection).nom_champ_technique}
|
||||
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontSize": "12px" }}>
|
||||
{JSON.parse(mycollection).nom_champ_fonctionel}
|
||||
|
||||
</MenuItem>
|
||||
))}
|
||||
</TextField>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(partner_document_data_edit_mode) === "1" && <div className="div_row">
|
||||
<Button className="bton_enreg" onClick={add_selected_fields} style={{ "margin": "1rem" }}
|
||||
>Ajouter Champ Choisi
|
||||
|
||||
</Button>
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{String(partner_document_data_edit_mode) === "1" && <div className="div_row">
|
||||
<div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
|
||||
|
|
|
@ -3500,7 +3500,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
settab_convention_pieces_jointes_result(new_tmp);
|
||||
|
||||
console.log( " tab_convention_pieces_jointes_result = ", tab_convention_pieces_jointes_result)
|
||||
console.log(" tab_convention_pieces_jointes_result = ", tab_convention_pieces_jointes_result)
|
||||
|
||||
|
||||
return;
|
||||
|
@ -4269,7 +4269,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
form.append("file_business_object", "");
|
||||
var list_files = new FormData();
|
||||
|
||||
for (let i=0; i< tab_convention_pieces_jointes_result.length; i++){
|
||||
for (let i = 0; i < tab_convention_pieces_jointes_result.length; i++) {
|
||||
form.append('File', tab_convention_pieces_jointes_result[i]);
|
||||
|
||||
}
|
||||
|
@ -4385,7 +4385,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
form.append("file_business_object", "");
|
||||
var list_files = new FormData();
|
||||
|
||||
for (let i=0; i< tab_convention_pieces_jointes_result.length; i++){
|
||||
for (let i = 0; i < tab_convention_pieces_jointes_result.length; i++) {
|
||||
form.append('File', tab_convention_pieces_jointes_result[i]);
|
||||
|
||||
}
|
||||
|
@ -4494,11 +4494,23 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
form.append("tab_inscription_id", liste_selected_inscription_id);
|
||||
form.append("courrier_template_id", selected_convention_id);
|
||||
|
||||
// pièce jointe
|
||||
form.append("file_business_object", "");
|
||||
var list_files = new FormData();
|
||||
|
||||
for (let i = 0; i < tab_convention_pieces_jointes_result.length; i++) {
|
||||
form.append('File', tab_convention_pieces_jointes_result[i]);
|
||||
|
||||
}
|
||||
//form.append("File", list_files);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Sent_Convention_Stagiaire_By_Email_mass/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
setLoading(false);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Send_Stagiaire_Conventions_By_Email_Masse res.data.status = " + res.data.status);
|
||||
//console.log(" In Send_Stagiaire_Conventions_By_Email_Masse res.data.message r_class = " + res.data.message);
|
||||
|
@ -4515,6 +4527,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Send_Stagiaire_Conventions_By_Email_Masse = ', error);
|
||||
setSend_Stagiaire_Conventions_By_Email_Masse_api("false");
|
||||
alert("Impossible d'envoyer les conventions en masse par email");
|
||||
|
@ -4532,13 +4545,13 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
|
||||
|
||||
let new_myArray = myArray.filter(file => file.name !== String(doc_to_del_name) );
|
||||
let new_myArray = myArray.filter(file => file.name !== String(doc_to_del_name));
|
||||
|
||||
console.log( " new_myArray = ", new_myArray);
|
||||
console.log(" new_myArray = ", new_myArray);
|
||||
|
||||
|
||||
var new_tab = []
|
||||
for (let i = 0; i < new_myArray.length; i++){
|
||||
for (let i = 0; i < new_myArray.length; i++) {
|
||||
new_tab.push(new_myArray[i]);
|
||||
}
|
||||
|
||||
|
@ -5047,7 +5060,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||
Pièces jointes Convention a
|
||||
Pièces jointes Convention
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1904,7 +1904,7 @@
|
|||
.bton_add_session {
|
||||
background: #c8cfd5;
|
||||
color: black;
|
||||
width: 30% !important;
|
||||
width: 40% !important;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue