From 3b35cc1c57c1855d5ae3663696a13a971a7aa839 Mon Sep 17 00:00:00 2001 From: cherif Date: Tue, 27 Feb 2024 23:31:20 +0100 Subject: [PATCH] tr --- src/components/Config_Document.js | 28 ++++++++++++++++++++-------- src/components/Module_Editique.js | 4 ++-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/components/Config_Document.js b/src/components/Config_Document.js index 6c56c73..5798f35 100644 --- a/src/components/Config_Document.js +++ b/src/components/Config_Document.js @@ -77,9 +77,9 @@ const Config_Documents = (props) => { const columns = [ { field: '_id', headerName: '_id', hide: true }, { field: 'id', headerName: 'id', hide: true }, - { field: 'nom', headerName: 'nom', minWidth: 150, flex: 1, }, - { field: 'ref_interne', headerName: 'ref_interne', minWidth: 50, maxWidth: 200, flex: 1, }, - { field: 'type_doc', headerName: 'type_doc', minWidth: 50, maxWidth: 100, flex: 1, }, + { field: 'nom', headerName: 'nom', minWidth: 150, flex: 1, }, + { field: 'ref_interne', headerName: 'ref_interne', minWidth: 50, maxWidth: 200, flex: 1, }, + { field: 'type_doc', headerName: 'type_doc', minWidth: 50, maxWidth: 100, flex: 1, }, { field: 'cible', headerName: 'cible', minWidth: 100, maxWidth: 150, flex: 1, hide: false, editable: false }, { field: 'default', headerName: 'par default', minWidth: 100, maxWidth: 100, flex: 1, hide: false, editable: false }, { field: 'sujet', headerName: 'sujet', hide: false, editable: false, minWidth: 150, flex: 1, }, @@ -383,6 +383,8 @@ const Config_Documents = (props) => { const [p_one_detail_type_doc, setp_one_detail_type_doc] = useState(""); const [p_one_detail_duplicate, setp_one_detail_duplicate] = useState(""); + const [p_one_detail_edit_by_client, setp_one_detail_edit_by_client] = useState(""); + const [p_one_detail_courrier_template_type_document_ref_interne, setp_one_detail_courrier_template_type_document_ref_interne] = useState(""); @@ -411,6 +413,7 @@ const Config_Documents = (props) => { setp_one_detail_duplicate(""); setp_one_detail_type_doc(""); + setp_one_detail_edit_by_client("") setone_field_programme(); setone_field_corp_mail(); setp_detail_joint_pdf(false); @@ -758,6 +761,14 @@ const Config_Documents = (props) => { setp_one_detail_duplicate("0"); } + if (mylocal_document.edit_by_client) { + setp_one_detail_edit_by_client(mylocal_document.edit_by_client); + } + else { + setp_one_detail_edit_by_client("0"); + } + + setfield_programme(""); if (mylocal_document.contenu_doc) { setone_field_programme(String(mylocal_document.contenu_doc)); @@ -1090,6 +1101,7 @@ const Config_Documents = (props) => { } + //----- if (p_detail_default_version) @@ -1107,10 +1119,10 @@ const Config_Documents = (props) => { } - if (p_detail_edition_par_client) - form.append("edit_by_client", "1"); + if (p_one_detail_edit_by_client) + form.append("edit_by_client", p_one_detail_edit_by_client); else { - form.append("joint_pdf", "0"); + form.append("edit_by_client", "0"); } @@ -1426,7 +1438,7 @@ const Config_Documents = (props) => { if (p_detail_edition_par_client) form.append("edit_by_client", "1"); else { - form.append("joint_pdf", "0"); + form.append("edit_by_client", "0"); } @@ -3186,7 +3198,7 @@ const Config_Documents = (props) => {
Choisir le document à ajouter
- + {
- {(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
Choisir une convention + {(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
Choisir une convention 1 {
- {(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
Choisir une convention + {(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
Choisir une convention 2