26/09/23 - 23h

recette2
cherif 2023-09-26 22:59:37 +02:00
parent dec52dec34
commit 6c2612643d
2 changed files with 122 additions and 19 deletions

View File

@ -357,7 +357,8 @@ const Config_Documents = (props) => {
var mylocal_document = JSON.parse(res.data.message); var mylocal_document = JSON.parse(res.data.message);
if (mylocal_document.nom) if (mylocal_document.nom)
setp_detail_nom(mylocal_document.nom); setp_one_detail_nom(mylocal_document.nom);
if (mylocal_document.type_doc) if (mylocal_document.type_doc)
@ -603,6 +604,13 @@ const Config_Documents = (props) => {
document.getElementsByName("document_name")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("document_name")[0].style.backgroundColor = "#ECEFF1";
} }
if (document.getElementsByName("nom_document")[0]) {
document.getElementsByName("nom_document")[0].disabled = true;
document.getElementsByName("nom_document")[0].style.backgroundColor = "#ECEFF1";
}
if (document.getElementsByName("document_type")[0]) { if (document.getElementsByName("document_type")[0]) {
document.getElementsByName("document_type")[0].disabled = true; document.getElementsByName("document_type")[0].disabled = true;
document.getElementsByName("document_type")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("document_type")[0].style.backgroundColor = "#ECEFF1";
@ -640,6 +648,11 @@ const Config_Documents = (props) => {
document.getElementsByName("document_name")[0].style.backgroundColor = "#FFFFFF"; document.getElementsByName("document_name")[0].style.backgroundColor = "#FFFFFF";
} }
if (document.getElementsByName("nom_document")[0]) {
document.getElementsByName("nom_document")[0].disabled = false;
document.getElementsByName("nom_document")[0].style.backgroundColor = "#FFFFFF";
}
if (document.getElementsByName("document_type")[0]) { if (document.getElementsByName("document_type")[0]) {
document.getElementsByName("document_type")[0].disabled = false; document.getElementsByName("document_type")[0].disabled = false;
document.getElementsByName("document_type")[0].style.backgroundColor = "#FFFFFF"; document.getElementsByName("document_type")[0].style.backgroundColor = "#FFFFFF";
@ -1691,26 +1704,32 @@ const Config_Documents = (props) => {
<div className="div_row"> <div className="div_row">
<div className="div_row_gauche"> <div className="div_row_gauche_2_tier">
{String(partner_document_data_edit_mode) !== "1" && <div className="div_row_gauche texte_area_filter" > {String(partner_document_data_edit_mode) !== "1" &&
<div className="div_row_gauche texte_area_filter" >
Nom document <br />
<TextField <TextField
name="nom_document" name="nom_document"
label="Nom document" //label="Nom document"
sx={{ m: 1, width: '100%' }} sx={{ m: 1, width: '100%' }}
value={p_one_detail_nom} value={p_one_detail_nom}
className="disabled_style"
/> />
</div>} </div>}
{String(partner_document_data_edit_mode) !== "1" && <div className="div_row_gauche texte_area_filter" > {String(partner_document_data_edit_mode) !== "1" &&
<div className="div_row_gauche texte_area_filter" >
Type de document<br />
<TextField <TextField
name="document_type" name="document_type"
label="Type de document" //label="Type de document"
sx={{ m: 1, width: '100%' }} sx={{ m: 1, width: '100%' }}
value={p_detail_type_doc} value={p_detail_type_doc}
className="disabled_style"
/> />
@ -1718,33 +1737,37 @@ const Config_Documents = (props) => {
<div className="div_row_gauche texte_area_filter" ref={myRef}> <div className="div_row_gauche texte_area_filter" ref={myRef}>
Code Document <br />
<TextField <TextField
name="document_ref_interne" name="document_ref_interne"
label="Code Document" //label="Code Document"
sx={{ m: 1, width: '100%' }} sx={{ m: 1, width: '100%' }}
value={p_detail_ref_interne} value={p_detail_ref_interne}
className="disabled_style"
/> />
</div> </div>
<div className="div_row_gauche texte_area_filter" > <div className="div_row_gauche texte_area_filter" >
Sujet <br />
<TextField <TextField
name="document_sujet" name="document_sujet"
label="Sujet" //label="Sujet"
sx={{ m: 1, width: '100%' }} sx={{ m: 1, width: '100%' }}
value={p_detail_sujet} value={p_detail_sujet}
onChange={(e) => { onChange={(e) => {
setp_detail_sujet(e.target.value); setp_detail_sujet(e.target.value);
setpartner_document_data_changed("1"); setpartner_document_data_changed("1");
}} }}
className="disabled_style"
/> />
</div> </div>
</div> </div>
<div className="div_row_droite" style={{ "textAlign": "left" }}> <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 /> {String(partner_document_data_edit_mode) === "1" &&
<div className="div_row" style={{ "fontSize": "12px" }}> Choisir un champ <br />
<TextField <TextField
name="champ_table" name="champ_table"
id="champ_table" id="champ_table"
@ -1785,7 +1808,7 @@ const Config_Documents = (props) => {
</div> </div>
{String(partner_document_data_edit_mode) === "1" && <div className="div_row"> {String(partner_document_data_edit_mode) === "1" && <div className="div_row">
<div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}> <div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
<div className="titre_training_text"> Mofifier le contenu du document </div> <div className="titre_training_text"> Modifier le contenu du document </div>
<Editor <Editor
id="document_contente" id="document_contente"
name="document_contente" name="document_contente"
@ -1944,48 +1967,56 @@ const Config_Documents = (props) => {
<div className="div_row_gauche"> <div className="div_row_gauche">
<div className="div_row_gauche texte_area_filter" > <div className="div_row_gauche texte_area_filter" >
Type de document <br />
<TextField <TextField
name="one_document_type" name="one_document_type"
label="Type de document" //label="Type de document"
sx={{ m: 1, width: '100%' }} sx={{ m: 1, width: '100%' }}
value={p_one_detail_type_doc} value={p_one_detail_type_doc}
className="disabled_style"
/> />
</div> </div>
<div className="div_row_gauche texte_area_filter" > <div className="div_row_gauche texte_area_filter" >
Nom document <br />
<TextField <TextField
name="one_nom_document" name="one_nom_document"
label="Nom document" //label="Nom document"
sx={{ m: 1, width: '100%' }} sx={{ m: 1, width: '100%' }}
value={p_one_detail_nom} value={p_one_detail_nom}
className="disabled_style"
/> />
</div> </div>
<div className="div_row_gauche texte_area_filter" ref={myRef}> <div className="div_row_gauche texte_area_filter" ref={myRef}>
Code Document <br />
<TextField <TextField
name="one_document_ref_interne" name="one_document_ref_interne"
label="Code Document" //label="Code Document"
sx={{ m: 1, width: '100%' }} sx={{ m: 1, width: '100%' }}
value={p_one_detail_ref_interne} value={p_one_detail_ref_interne}
className="disabled_style"
/> />
</div> </div>
<div className="div_row_gauche texte_area_filter" > <div className="div_row_gauche texte_area_filter" >
Sujet <br />
<TextField <TextField
name="one_document_sujet" name="one_document_sujet"
label="Sujet" //label="Sujet"
sx={{ m: 1, width: '100%' }} sx={{ m: 1, width: '100%' }}
value={p_one_detail_sujet} value={p_one_detail_sujet}
onChange={(e) => { onChange={(e) => {
setp_detail_sujet(e.target.value); setp_detail_sujet(e.target.value);
setpartner_document_data_changed("1"); setpartner_document_data_changed("1");
}} }}
className="disabled_style"
/> />
</div> </div>
@ -2022,8 +2053,8 @@ const Config_Documents = (props) => {
</div> </div>
<div className="div_row"> <div className="div_row">
<Button className="bton_enreg" onClick={add_one_selected_fields} style={{ "margin": "1rem" }} <Button className="bton_enreg" onClick={add_one_selected_fields} style={{ "margin": "1rem" , minWidth:'50%'}}
>Ajouter Champ Choisi &nbsp; >Ajouter le Champ Choisi &nbsp;
</Button> </Button>
</div> </div>
@ -2031,7 +2062,7 @@ const Config_Documents = (props) => {
</div> </div>
<div className="div_row"> <div className="div_row">
<div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}> <div style={{ "width": "98%", "marginLeft": "1%", "marginRight": "1%", "float": "left" }}>
<div className="titre_training_text"> Mofifier le contenu du document </div> <div className="titre_training_text"> Modifier le contenu du document </div>
<Editor <Editor
id="document_contente" id="document_contente"
name="document_contente" name="document_contente"

View File

@ -452,6 +452,25 @@
} }
.div_row_gauche_2_tier {
float: left;
// border:1px solid black;
// border-width:0.01rem;
width: 100%;
border-radius: 1rem;
}
.div_row_droite_1_tier {
float: right;
//border:1px solid black;
//border-width:0.01rem;
width: 100%;
border-radius: 1rem;
text-align: right;
}
.bton_suppr { .bton_suppr {
background: transparent; background: transparent;
color: red; color: red;
@ -1004,6 +1023,24 @@
text-align: right; text-align: right;
} }
.div_row_gauche_2_tier {
float: left;
// border:1px solid black;
// border-width:0.01rem;
width: 70%;
border-radius: 1rem;
}
.div_row_droite_1_tier {
float: right;
//border:1px solid black;
//border-width:0.01rem;
width: 30%;
border-radius: 1rem;
text-align: right;
}
.bton_suppr { .bton_suppr {
background: transparent; background: transparent;
color: red; color: red;
@ -1155,6 +1192,24 @@
text-align: right; text-align: right;
} }
.div_row_gauche_2_tier {
float: left;
// border:1px solid black;
// border-width:0.01rem;
width: 70%;
border-radius: 1rem;
}
.div_row_droite_1_tier {
float: right;
//border:1px solid black;
//border-width:0.01rem;
width: 30%;
border-radius: 1rem;
text-align: right;
}
.selectsession { .selectsession {
width: 90%; width: 90%;
height: 3rem; height: 3rem;
@ -1602,6 +1657,23 @@
text-align: right; text-align: right;
} }
.div_row_gauche_2_tier {
float: left;
// border:1px solid black;
// border-width:0.01rem;
width: 70%;
border-radius: 1rem;
}
.div_row_droite_1_tier {
float: right;
//border:1px solid black;
//border-width:0.01rem;
width: 30%;
border-radius: 1rem;
text-align: right;
}
.selectsession { .selectsession {
width: 90%; width: 90%;
height: 3rem; height: 3rem;