From 8d526bfa4fc090af853db78237ad3f89930f529a Mon Sep 17 00:00:00 2001 From: cherif Date: Wed, 25 Dec 2024 22:25:02 +0100 Subject: [PATCH] 25/12/2024 - 22h30 --- src/components/Account.js | 16 ++- src/components/DisplayPartnerSession.js | 91 +++++++++++- src/components/ESign.js | 127 +++++++++++++++-- src/components/Emarge_QR_Code.js | 87 +++++++++++- src/components/Intranet_Factures_Client.js | 89 +++++++++++- src/components/Module_Editique.js | 130 ++++++++++++++++-- src/components/Modules_Mes_Documents.js | 55 ++++++-- src/styles/components/_esign.scss | 116 ++++++++++++---- .../components/_intranet_tous_documents.scss | 6 +- .../components/_modules_mes_documents.scss | 6 +- 10 files changed, 651 insertions(+), 72 deletions(-) diff --git a/src/components/Account.js b/src/components/Account.js index 0a0e546..92b31eb 100644 --- a/src/components/Account.js +++ b/src/components/Account.js @@ -407,8 +407,7 @@ function Account() {
FACTURES

-
MES DOCUMENTS
-
+
MODULE TOUS DOCUMENTS

SUPPRIMER MON COMPTE
@@ -458,16 +457,25 @@ function Account() { partner_owner_recid={connected_user_data.partner_owner_recid} />} - {String(menu) === String("tout_documents") && connected_user_data && connected_user_data.partner_owner_recid && + {/*String(menu) === String("tout_documents") && connected_user_data && connected_user_data.partner_owner_recid && connected_user_data.partner_client_id && } + />*/} {String(menu) === String("modules_mes_documents") && connected_user_data && connected_user_data.partner_owner_recid && connected_user_data.partner_client_id && } + + {String(menu) === String("mes_devis") && connected_user_data && connected_user_data.partner_owner_recid && + connected_user_data.partner_client_id && + } diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index f935bcd..de1692c 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -93,9 +93,51 @@ import { } from '@mui/x-data-grid'; import * as XLSX from 'xlsx'; + +import { makeStyles } from "@material-ui/core/styles"; +import Paper from '@material-ui/core/Paper'; +import Draggable from 'react-draggable'; +import { IconButton } from '@material-ui/core'; +import AutoFixHighOutlinedIcon from '@mui/icons-material/AutoFixHighOutlined'; +import CancelPresentationIcon from '@mui/icons-material/CancelPresentation'; + +function PaperComponent(props) { + return ( + + + + ); +} + + +const useStyles = makeStyles((theme) => ({ + + dialog: { + position: 'absolute', + // left: 10, + top: 400 + }, + + paper: { + overflowY: 'unset', + }, + customizedButton: { + position: 'absolute', + left: '98%', + top: '-3%', + backgroundColor: 'lightgray', + color: 'gray', + }, +})); + const DisplayPartnerSession = (props) => { + const classes = useStyles(); + const history = useHistory(); const [submenu, setsubmenu] = useState(""); const [rowss, setRows] = useState([]); @@ -2048,7 +2090,7 @@ const DisplayPartnerSession = (props) => { let text = String(props.object_key); - if (props.object_key === "class") { + if (props.object_key === "class") { Getall_TrainingSession_For_Given_Class(props.class_internal_url); } else { Getall_TrainingSession(); @@ -7387,7 +7429,7 @@ const DisplayPartnerSession = (props) => { } if (file_1_name && file_1_name.name) { - // console.log(" ### Traitement de : ", file_1_name.name); + // console.log(" ### Traitement de : ", file_1_name.name); const formData = new FormData(); formData.append('File', file_1_name); @@ -7462,7 +7504,7 @@ const DisplayPartnerSession = (props) => { } if (file_1_name && file_1_name.name) { - // console.log(" ### Traitement de : ", file_1_name.name); + // console.log(" ### Traitement de : ", file_1_name.name); const formData = new FormData(); formData.append('File', file_1_name); @@ -12987,15 +13029,40 @@ const DisplayPartnerSession = (props) => { + {/**** Dialogue pour DETTAIL SESSION */} + 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" + > +   - + {Dialog_2_message} @@ -13130,6 +13197,16 @@ const DisplayPartnerSession = (props) => { + + + + +
@@ -13144,6 +13221,8 @@ const DisplayPartnerSession = (props) => {
+ {/**** FIN Dialogue pour DETTAIL SESSION */} + + + + ); +} + + +const useStyles = makeStyles((theme) => ({ + + dialog: { + position: 'absolute', + // left: 10, + top: 400 + }, + + paper: { + overflowY: 'unset', + }, + customizedButton: { + position: 'absolute', + left: '98%', + top: '-3%', + backgroundColor: 'lightgray', + color: 'gray', + }, +})); + + function ESign() { + const classes = useStyles(); + const history = useHistory(); const { document_id, local_secret_key_signature, local_partner_owner_recid } = useParams(); const [isLoading, setLoading] = useState(); @@ -77,7 +119,7 @@ function ESign() { form.append("secret_key_open", selected_e_doc_secret); form.append("user_email", user_email); - + setLoading(true); axios.post(myurl, form).then(res => { @@ -150,7 +192,7 @@ function ESign() { else form.append('signature_img', ""); - console.log(" isimgclassSelected #### = ", isimgclassSelected); + // console.log(" isimgclassSelected #### = ", isimgclassSelected); @@ -406,9 +448,33 @@ function ESign() { {/* POUR SIGNATURE E-DOCUMENT */} null} + + PaperProps={{ + + + className: classes.paper, // Apply the paper style + style: { + overflowY: 'unset', + position: 'absolute', + top: '10rem', + margin: "2px", + }, + }} + hideBackdrop={true} + disableScrollLock + classes={{ + paper: classes.dialog + }} + + PaperComponent={PaperComponent} + aria-labelledby="draggable-dialog-title" + > {!erreur_recup_e_doc && Signature } @@ -461,6 +527,16 @@ function ESign() { + + + + +
@@ -480,9 +556,31 @@ function ESign() { {/* POUR OUVERTURE E-DOCUMENT */} null} + + PaperProps={{ + + + className: classes.paper, // Apply the paper style + style: { + overflowY: 'unset', + position: 'absolute', + top: '10rem', + margin: "2px", + }, + }} + hideBackdrop={true} + disableScrollLock + classes={{ + paper: classes.dialog + }} + + PaperComponent={PaperComponent} + aria-labelledby="draggable-dialog-title" > {!erreur_recup_e_doc && Authentification } @@ -535,6 +633,15 @@ function ESign() { + + + +
@@ -594,8 +701,8 @@ function ESign() {

Signature Electronique

-
-
+
+
@@ -606,21 +713,19 @@ function ESign() {
-
+
{is_valide_e_document &&
-
+
- -
 
-
+
diff --git a/src/components/Emarge_QR_Code.js b/src/components/Emarge_QR_Code.js index 5dd5149..384a12d 100644 --- a/src/components/Emarge_QR_Code.js +++ b/src/components/Emarge_QR_Code.js @@ -52,8 +52,52 @@ import Link from '@mui/material/Link'; import { PiDotsThree } from "react-icons/pi"; import SignatureCanvas from 'react-signature-canvas'; + + +import { makeStyles } from "@material-ui/core/styles"; +import Paper from '@material-ui/core/Paper'; +import Draggable from 'react-draggable'; +import { IconButton } from '@material-ui/core'; +import AutoFixHighOutlinedIcon from '@mui/icons-material/AutoFixHighOutlined'; +import CancelPresentationIcon from '@mui/icons-material/CancelPresentation'; + +function PaperComponent(props) { + return ( + + + + ); +} + + +const useStyles = makeStyles((theme) => ({ + + dialog: { + position: 'absolute', + // left: 10, + top: 400 + }, + + paper: { + overflowY: 'unset', + }, + customizedButton: { + position: 'absolute', + left: '98%', + top: '-3%', + backgroundColor: 'lightgray', + color: 'gray', + }, +})); + + function Emarge_QR_Code() { + const classes = useStyles(); + const history = useHistory(); const { session_id, partner_owner_recid, my_safe_token } = useParams(); const [isLoading, setLoading] = useState(); @@ -475,13 +519,38 @@ function Emarge_QR_Code() { {/* POUR SIGNATURE MANUSCRITE */} 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" + > - Signature Manuscrite + Signature Manuscrite - +
+ + + + +
@@ -527,7 +606,7 @@ function Emarge_QR_Code() { onClose={Dialog_SIGN_VALIDATION_handleClose} className="esign" - > + > {!erreur_recup_e_doc && Signature } {erreur_recup_e_doc && Signature - Identifiants invalides } diff --git a/src/components/Intranet_Factures_Client.js b/src/components/Intranet_Factures_Client.js index f756563..e4e6469 100644 --- a/src/components/Intranet_Factures_Client.js +++ b/src/components/Intranet_Factures_Client.js @@ -67,7 +67,9 @@ import zIndex from "@material-ui/core/styles/zIndex"; import { FcOpenedFolder } from "react-icons/fc"; import Module_Historique_Action from "./Module_Historique_Action"; import { GridExportCsvOptions } from '@mui/x-data-grid'; - +import { IconButton } from '@material-ui/core'; +import MoreVertIcon from '@mui/icons-material/MoreVert'; +import Menu from '@mui/material/Menu'; const Intranet_Factures_Client = (props) => { @@ -127,7 +129,21 @@ const Intranet_Factures_Client = (props) => { ); } + +const options_menu_vertical = [ + '', + 'Télécharger', + ]; + const ITEM_HEIGHT = 48; + const [anchorEl, setAnchorEl] = React.useState(null); + const open = Boolean(anchorEl); + const handleClick_option_button_vertical = (event) => { + setAnchorEl(event.currentTarget); + }; + const handleClose_option_button_vertical = (event, value) => { + setAnchorEl(null); + }; const columns = [ { field: '_id', headerName: '_id', hide: true, disableExport: true, }, @@ -148,7 +164,78 @@ const Intranet_Factures_Client = (props) => { { field: 'reste_to_paye', headerName: 'A payer', width: 150, hide: false, editable: false }, { field: 'credit_note_ref', headerName: 'Ref. Avoir', width: 150, hide: true, editable: false, }, + { + field: 'bton_vertif', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", + renderCell: (cellValues,) => { + return ( + + + ); + }, + }, /* { diff --git a/src/components/Module_Editique.js b/src/components/Module_Editique.js index 8c52a34..8c82ea7 100644 --- a/src/components/Module_Editique.js +++ b/src/components/Module_Editique.js @@ -75,8 +75,50 @@ import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io"; import { FcViewDetails, FcDisapprove, FcInfo } from "react-icons/fc"; import { convertNwSeToNeSw } from "google-map-react"; + +import { makeStyles } from "@material-ui/core/styles"; +import Paper from '@material-ui/core/Paper'; +import Draggable from 'react-draggable'; +import { IconButton } from '@material-ui/core'; +import AutoFixHighOutlinedIcon from '@mui/icons-material/AutoFixHighOutlined'; +import CancelPresentationIcon from '@mui/icons-material/CancelPresentation'; + +function PaperComponent(props) { + return ( + + + + ); +} + + +const useStyles = makeStyles((theme) => ({ + + dialog: { + position: 'absolute', + // left: 10, + top: 400 + }, + + paper: { + overflowY: 'unset', + }, + customizedButton: { + position: 'absolute', + left: '98%', + top: '-3%', + backgroundColor: 'lightgray', + color: 'gray', + }, +})); + const Module_Editique = (props) => { + const classes = useStyles(); + const myconntected_employee_id = props.conntected_employee_id; const [selected_employee_id, setselected_employee_id] = useState(props.conntected_employee_id); @@ -1512,8 +1554,34 @@ const Module_Editique = (props) => { {/* Dialog pour gerer les CONVOCATION_STAGIAIRE */} 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" + > MySy Information @@ -1761,6 +1829,16 @@ const Module_Editique = (props) => { + + + + +
{String(selected_convention_type) === "email" &&
- -
@@ -1805,11 +1881,37 @@ const Module_Editique = (props) => { {/* Dialog pour gerer les CONVENTIONS */} 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" + > - MySy Information +   {Dialog_1_message} @@ -1929,7 +2031,9 @@ const Module_Editique = (props) => { {String(selected_convention_type) === "email" &&
- Adresse email de test Adresse email de test + + { + + + + + +
{String(selected_convention_type) === "email" &&
-
diff --git a/src/components/Modules_Mes_Documents.js b/src/components/Modules_Mes_Documents.js index d2315fb..f5c1ba1 100644 --- a/src/components/Modules_Mes_Documents.js +++ b/src/components/Modules_Mes_Documents.js @@ -77,6 +77,8 @@ const Modules_Mes_Documents = (props) => { const [rowss_total_data, setRows_total_data] = useState([]); const [selectionModel, setSelectionModel] = React.useState([]); + const [myprops_type_document, setmyprops_type_document] = React.useState(""); + const [rows_invoice_lines, setrows_invoice_lines] = useState([]); const [selectionModel_invoice_lines, setselectionModel_invoice_lines] = React.useState([]); const [gridline_id, setgridline_id] = useState(""); @@ -208,7 +210,7 @@ const Modules_Mes_Documents = (props) => { onClose={handleClose_option_button_vertical} onClick={(e) => { - console.log(" OKKK "); + }} slotProps={{ @@ -282,9 +284,29 @@ const Modules_Mes_Documents = (props) => { const [history_securite_read, sethistory_securite_read] = useState(""); + const autorized_type_document = ['devis', 'convention', 'convocation', 'attestation']; + useEffect(() => { - Get_List_Of_All_PJ(); + + console.log(" ### props.type_document = ", props.type_document) + if (props.type_document && autorized_type_document.includes(String(props.type_document))) { + console.log(" ### iciiii ") + setmyprops_type_document(props.type_document); + + setp_filtre1("filter_type_document"); + setp_filtre1_value(props.type_document); + + + + Get_All_Documents_With_Filter(); + + + } else { + Get_List_Of_All_PJ(); + } + + }, []) @@ -431,6 +453,7 @@ const Modules_Mes_Documents = (props) => { const New_Option_Filter = [ + { "id": "filter_file_business_object", "label": "Nom Document", "value": "filter_file_business_object" }, { "id": "filter_type_document", "label": "Type Document", "value": "filter_type_document" }, { "id": "filter_nom_client", "label": "Nom Client", "value": "filter_nom_client" }, { "id": "date_create_start_date", "label": "Crée après (jj/mm/aaaa) ", "value": "date_create_start_date" }, @@ -442,6 +465,8 @@ const Modules_Mes_Documents = (props) => { ] + + const Option_Type_Document = [ { "id": "devis", "label": "Devis", "value": "devis" }, { "id": "convention", "label": "Convention", "value": "convention" }, @@ -612,7 +637,6 @@ const Modules_Mes_Documents = (props) => { const [Get_List_Of_All_PJ_api, setGet_List_Of_All_PJ_api] = useState(); const [Get_List_Of_All_PJ_result, setGet_List_Of_All_PJ_result] = useState(); const [Get_List_Of_All_PJ_message, setGet_List_Of_All_PJ_message] = useState(); - function Get_List_Of_All_PJ() { const formData = new FormData(); @@ -697,7 +721,7 @@ const Modules_Mes_Documents = (props) => { const [Get_All_Documents_With_Filter_api, setGet_All_Documents_With_Filter_api] = useState(); const [Get_All_Documents_With_Filter_message, setGet_All_Documents_With_Filter_message] = useState(); const [Get_All_Documents_With_Filter_result, setGet_All_Documents_With_Filter_result] = useState(); - function Get_All_Documents_With_Filter(local_client_id) { + function Get_All_Documents_With_Filter() { setgridline_id(""); @@ -734,6 +758,15 @@ const Modules_Mes_Documents = (props) => { } + /*** Si le formulaire est appelé avec un type de document; + * on va forcer dans les argument un champ avec filter_type_document + */ + if (props.type_document && autorized_type_document.includes(String(props.type_document))) { + form.delete("filter_type_document"); + form.append("filter_type_document", props.type_document); + } + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files_With_Filter/"; axios.post(myurl, form).then(res => { @@ -779,8 +812,8 @@ const Modules_Mes_Documents = (props) => {
} - -

Tous vos documents

+ {props.my_title &&

{props.my_title}

} + {!props.my_title &&

Tous vos documents

}
Utilisez les filtres !
@@ -850,7 +883,7 @@ const Modules_Mes_Documents = (props) => { disablePortal name="filtre1_value" id="filtre1_value" - className="disabled_style" + className="disabled_style autocomplete_float_right" options={Option_Type_Document} onChange={(event, value) => { if (value && value.value) { @@ -918,7 +951,7 @@ const Modules_Mes_Documents = (props) => { } />}
-
+
{String(p_filtre2).length > 2 && String(p_filtre2) !== "filter_type_document" && { disablePortal name="filtre2_value" id="filtre2_value" - className="disabled_style" + className="disabled_style autocomplete_float_right" options={Option_Type_Document} onChange={(event, value) => { if (value && value.value) { @@ -1060,7 +1093,7 @@ const Modules_Mes_Documents = (props) => { disablePortal name="filtre3_value" id="filtre3_value" - className="disabled_style" + className="disabled_style autocomplete_float_right" options={Option_Type_Document} onChange={(event, value) => { if (value && value.value) { @@ -1192,7 +1225,7 @@ const Modules_Mes_Documents = (props) => { }} componentsProps={{ toolbar: { data_colums: columns } }} - checkboxSelection + // checkboxSelection disableSelectionOnClick onSelectionModelChange={(newSelectionModel) => { setSelectionModel(newSelectionModel); diff --git a/src/styles/components/_esign.scss b/src/styles/components/_esign.scss index 0ae0e95..36c3d24 100644 --- a/src/styles/components/_esign.scss +++ b/src/styles/components/_esign.scss @@ -2,23 +2,23 @@ .test01 { font-size: 3rem; - // color: red; + // color: red; font-weight: bold !important; } .test02 { font-size: 5px !important; - // color: burlywood; + // color: burlywood; font-weight: normal; } .test03 { - text-align: left !important; - font-size: x-small; - //background-color: #464b5e !important; + text-align: left !important; + font-size: x-small; + //background-color: #464b5e !important; } - .css-hytcpw{ + .css-hytcpw { max-width: 100% !important; } @@ -27,9 +27,9 @@ z-index: 9999; } - .css-1bcfi89-MuiTreeItem-content .MuiTreeItem-iconContainer{ - font-size: 5px !important; -} + .css-1bcfi89-MuiTreeItem-content .MuiTreeItem-iconContainer { + font-size: 5px !important; + } .bton_action_server { box-shadow: 0 0 5px -1px rgba(0, 0, 0, 0.2); @@ -464,7 +464,7 @@ padding-right: 10px; border: 1px solid rgb(194, 186, 186); border-radius: 10px; - width: 10rem; + // width: 10rem; cursor: pointer; } @@ -669,10 +669,10 @@ background: #81BC3A !important; text-align: center; height: 2.5rem; - width: 100%; + width: 90%; color: white; - margin-left: 10px; - margin-right: 10px; + margin-left: 5%; + margin-right: 5%; } @@ -682,10 +682,10 @@ background: lightgray !important; text-align: right; height: 2.5rem; - width: 100%; + width: 90%; color: black; - margin-left: 10px; - margin-right: 10px; + margin-left: 5%; + margin-right: 5%; } @@ -704,8 +704,27 @@ } .DialogContent_width { - width: 200px !important; + width: 300px !important; + max-width: none !important; + padding: 5px; } + + .signature_block_explication { + width: 100%; + float: left; + min-height: 40vh; + text-align: left; + padding: 15px; + } + + + .signature_block_document { + width: 100%; + float: right; + margin-right: 1%; + } + + } @media only screen and (min-width: 601px) and (max-width: 991px) { @@ -1322,6 +1341,20 @@ width: 500px !important; } + .signature_block_explication { + width: 100%; + float: left; + // min-height: 40vh; + text-align: left; + padding: 15px; + } + + + .signature_block_document { + width: 100%; + float: right; + margin-right: 1%; + } } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -1843,6 +1876,22 @@ width: 500px !important; } + .signature_block_explication { + width: 30%; + float: left; + min-height: 40vh; + text-align: justify; + padding: 15px; + } + + + .signature_block_document { + width: 69%; + float: right; + margin-right: 1%; + } + + } @media only screen and (min-width: 1200px) { @@ -2489,17 +2538,34 @@ .DialogContent_width { width: 500px !important; - + + } + + + .signature_block_explication { + width: 30%; + float: left; + min-height: 40vh; + text-align: justify; + padding: 15px; + } + + + .signature_block_document { + width: 69%; + float: right; + margin-right: 1%; } - - - } - .css-1t1j96h-MuiPaper-root-MuiDialog-paper{ - border-radius: 15px !important; - } + + .css-1t1j96h-MuiPaper-root-MuiDialog-paper { + border-radius: 15px !important; + + + } + // end media .loader-container { @@ -2515,7 +2581,7 @@ top: 0px; opacity: 80%; left: 0px; - } + } .spinner { diff --git a/src/styles/components/_intranet_tous_documents.scss b/src/styles/components/_intranet_tous_documents.scss index f195a3d..1afe388 100644 --- a/src/styles/components/_intranet_tous_documents.scss +++ b/src/styles/components/_intranet_tous_documents.scss @@ -1,4 +1,4 @@ -.modules_mes_documents { +.intranet_tous_documents{ .tooltip_css { background: #81BC3A; @@ -2317,6 +2317,10 @@ // end media + .autocomplete_float_right{ + float: right !important; + } + .disabled_style_with_visualiser_icone { float: left; text-align: center; diff --git a/src/styles/components/_modules_mes_documents.scss b/src/styles/components/_modules_mes_documents.scss index d2c8fe2..66e04f1 100644 --- a/src/styles/components/_modules_mes_documents.scss +++ b/src/styles/components/_modules_mes_documents.scss @@ -1,4 +1,4 @@ -.intranet_tous_documents { +.modules_mes_documents { .tooltip_css { background: #81BC3A; @@ -2317,6 +2317,10 @@ // end media + .autocomplete_float_right{ + float: right !important; + } + .disabled_style_with_visualiser_icone { float: left; text-align: center;