diff --git a/src/components/AddPartnerClient.js b/src/components/AddPartnerClient.js index 1c7706a..2888c4c 100644 --- a/src/components/AddPartnerClient.js +++ b/src/components/AddPartnerClient.js @@ -6,6 +6,7 @@ import fileDownload from 'js-file-download'; import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css import Button from '@mui/material/Button'; import axios from "axios"; +import { FcCancel } from "react-icons/fc"; import TextareaAutosize from '@mui/material/TextareaAutosize'; import { getCookie, setCookie } from 'react-use-cookie'; import { AiTwotoneSave } from "react-icons/ai"; @@ -35,7 +36,11 @@ import Radio from '@mui/material/Radio'; import { FcOpenedFolder } from "react-icons/fc"; import { MdManageAccounts } from "react-icons/md"; import { FcInfo } from "react-icons/fc"; +import { + DataGrid, frFR, GridToolbar, +} from '@mui/x-data-grid'; +import Box from '@mui/material/Box'; import Dialog from '@mui/material/Dialog'; import DialogActions from '@mui/material/DialogActions'; import DialogContent from '@mui/material/DialogContent'; @@ -43,18 +48,27 @@ import DialogContentText from '@mui/material/DialogContentText'; import DialogTitle from '@mui/material/DialogTitle'; import { IconButton } from '@material-ui/core'; import CancelPresentationIcon from '@mui/icons-material/CancelPresentation'; - +import MenuItem from '@mui/material/MenuItem'; import { makeStyles } from "@material-ui/core/styles"; import Paper from '@material-ui/core/Paper'; import Draggable from 'react-draggable'; import Visibility from '@mui/icons-material/Visibility'; import VisibilityOff from '@mui/icons-material/VisibilityOff'; +import * as XLSX from 'xlsx'; import { LiaDharmachakraSolid } from "react-icons/lia"; import WarningAmberIcon from '@mui/icons-material/WarningAmber'; import BlockIcon from '@mui/icons-material/Block'; import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline'; +import { + GridToolbarContainer, GridToolbarExport, GridToolbarColumnsButton, + GridToolbarFilterButton, GridToolbarDensitySelector, GridToolbarExportContainer, useGridApiContext, + gridFilteredSortedRowIdsSelector, + gridVisibleColumnFieldsSelector, + + +} from '@mui/x-data-grid'; import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; function PaperComponent(props) { @@ -97,6 +111,8 @@ const AddParnerClient = (props) => { const history = useHistory(); const [submenu, setsubmenu] = useState(""); + const [gridline_id_paiement, setgridline_id_paiement] = useState(""); + const [current_contact_recid, setcurrent_contact_recid] = useState(""); const [datamodification, setdatamodification] = useState("0"); @@ -216,9 +232,133 @@ const AddParnerClient = (props) => { ); } + function ExpandableCell_String_to_monetaire({ value }) { + const [expanded, setExpanded] = React.useState(false); + + const number = parseFloat(value); + var new_value = "" + if (isNaN(number)) { + new_value = "—" + } else { + new_value = new Intl.NumberFormat('fr-FR', { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + }).format(number); + } + return ( + + ); + } + + function local_format_monetaire(local_amount) { + return new Intl.NumberFormat('fr-FR', { + style: 'currency', + currency: 'EUR', + }).format(Number(local_amount)); + } + + + const [selectionModel_paiement, setselectionModel_paiement] = React.useState([]); + + const columns_paiement = [ + { field: '_id', headerName: '_id', hide: true, disableExport: true, }, + { field: 'id', headerName: 'id', hide: true, disableExport: true }, + { field: 'invoice_id', headerName: 'invoice_id', hide: true, disableExport: true }, + { field: 'paiement_date', headerName: 'Date Paiement', width: 150, hide: false, editable: false }, + { field: 'paiement_ref', headerName: 'paiement_ref', hide: false, minWidth: 200, flex: 1, editable: false, renderCell: (params) => , align: 'center', headerAlign: "center"}, + { + field: 'paiement_amount', headerName: 'Montant TTC', width: 150, hide: false, editable: false, align: 'right', headerAlign: "right", + renderCell: (params) => , + }, + + { field: 'invoice_ref', headerName: 'invoice_ref', hide: false, minWidth: 200, flex: 1, editable: false, renderCell: (params) => , align: 'left', headerAlign: 'left' }, + + + { field: 'paiement_mode', headerName: 'paiement_mode', width: 150, hide: false, editable: false, maxWidth: 200, flex: 1, }, + + { field: 'commentaire', headerName: 'commentaire', flex: 1, editable: false, hide: false, renderCell: (params) => , }, + + + + { + field: "delete", headerName: 'Supprimer', disableExport: true, + renderCell: (cellValues) => { + return ( +
+ {String(props.check_user_acces_right("facture", "write")) === "1" && + cellValues.row.invoice_header_type !== "brouillon" && } + {String(props.check_user_acces_right("facture", "write")) === "1" && + cellValues.row.invoice_header_type === "brouillon" && { + // handleClick_delete(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, le document sera définitivement supprimé.
+ +
+
+
+ + +
+
+ +
+
+
+ )} +
} +
+ + ); + } + } + + + ] + function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } @@ -227,7 +367,8 @@ const AddParnerClient = (props) => { function inactive_active_menu_header(current_menu_header) { const list_fields = ['submenu_devis', 'submenu_factures', 'submenu_piece_jointe', - 'submenu_activite', 'submenu_contact', 'submenu_donnee_facturation', 'submenu_donnee_client'] + 'submenu_activite', 'submenu_contact', 'submenu_donnee_facturation', 'submenu_donnee_client', 'submenu_relance', + 'submenu_paiement'] for (let i = 0; i < list_fields.length; i++) { if (document.getElementsByName(String(list_fields[i])) && document.getElementsByName(String(list_fields[i]))[0]) { @@ -263,6 +404,40 @@ const AddParnerClient = (props) => { } + async function submenu_relance() { + setsubmenu("submenu_relance"); + /* + Ceci est super crade, fair eun wait de pour attendre l'afficage avant de desacitcation si on a desactiver, mais bon ... on avance. + */ + await sleep(5); + if (String(formedit_mode) !== "1") { + Disable_fields(); + } else { + Enable_fields(); + } + + inactive_active_menu_header("submenu_relance"); + + } + + + async function submenu_paiement() { + Get_All_Paiement_of_Client(); + setsubmenu("submenu_paiement"); + /* + Ceci est super crade, fair eun wait de pour attendre l'afficage avant de desacitcation si on a desactiver, mais bon ... on avance. + */ + await sleep(5); + if (String(formedit_mode) !== "1") { + Disable_fields(); + } else { + Enable_fields(); + } + + inactive_active_menu_header("submenu_paiement"); + + } + async function submenu_donnee_facturation() { @@ -3644,6 +3819,210 @@ const AddParnerClient = (props) => { }) } + + const [New_Get_All_Paiement_of_Client_result, setNew_Get_All_Paiement_of_Client_result] = useState([]); + + const [New_Get_All_Paiement_Total_Payed, setNew_Get_All_Paiement_Total_Payed] = useState(""); + + const [Get_All_Paiement_of_Client_api, setGet_All_Paiement_of_Client_api] = useState(); + const [Get_All_Paiement_of_Client_message, setGet_All_Paiement_of_Client_message] = useState(); + const [Get_All_Paiement_of_Client_result, setGet_All_Paiement_of_Client_result] = useState([]); + function Get_All_Paiement_of_Client(event) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Invoice_Liste_Payement_And_Total_Amount/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Get_All_Paiement_of_Client res.data.status = " + res.data.status); + console.log(" In Get_All_Paiement_of_Client res.data.message r_class = " + res.data.message); + console.log(" In Get_All_Paiement_of_Client res.data.total_payed_amount r_class = " + res.data.total_payed_amount); + setGet_All_Paiement_of_Client_api("true"); + setGet_All_Paiement_of_Client_result(res.data.message); + setNew_Get_All_Paiement_Total_Payed(res.data.total_payed_amount); + + var new_data2 = []; + const new_data = res.data.message.map((x) => { + + var local_id = JSON.parse(x)._id; + var local_invoice_id = JSON.parse(x).invoice_id; + var local_paiement_amount = JSON.parse(x).paiement_amount; + var local_paiement_mode = JSON.parse(x).paiement_mode; + var local_paiement_ref = JSON.parse(x).paiement_ref; + var local_paiement_date = JSON.parse(x).paiement_date; + var local_commentaire = JSON.parse(x).commentaire; + + var local_client_id = JSON.parse(x).client_id; + var local_invoice_ref = JSON.parse(x).invoice_ref; + + + //--- + var node = { + "_id": local_id, + "invoice_id": local_invoice_id, + "paiement_amount": local_paiement_amount, + "paiement_mode": local_paiement_mode, + "paiement_ref": local_paiement_ref, + "paiement_date": local_paiement_date, + "commentaire": local_commentaire, + "client_id": local_client_id, + "invoice_ref": local_invoice_ref, + }; + new_data2.push(node); + }); + + if (new_data2.length > 0) { + setNew_Get_All_Paiement_of_Client_result(new_data2); + } else { + setNew_Get_All_Paiement_of_Client_result([]) + } + + } + else { + setGet_All_Paiement_of_Client_api("false"); + setGet_All_Paiement_of_Client_message(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Get_All_Paiement_of_Client = ', error); + setGet_All_Paiement_of_Client_api("false"); + + setdisplay_alert_mysy("1"); + setalert_message(" Impossible de récuperer la liste des paiements"); + setalert_type("error"); + //setmyApimyApiMessage("") + }) + } + + // DEBUT EXPORT EXCEL DATAGRID + + function CustomToolbar(props) { + + return ( + + + + + + + + + + + ); + } + + function getExcelData(apiRef) { + // Select rows and columns + const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef); + const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__"); + + // Format the data. Here we only keep the value + + const data = filteredSortedRowIds.map((id) => { + const row = {}; + visibleColumnsField.forEach((field) => { + var val = apiRef.current.getCellParams(id, field).value; + if (String(field) !== "__check__") + row[field] = apiRef.current.getCellParams(id, field).value; + }); + return row; + }); + + + return data; + } + + + function ExportButton(props) { + return ( + + + + ); + } + + + function handleExport(apiRef, data_colums) { + const data = getExcelData(apiRef); + const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__"); + + const local_config = { + keys: visibleColumnsField, + + columnNames: data_colums.filter((mydata) => (mydata).disableExport !== true).map(function (mydata) { + + if (mydata.headerName && visibleColumnsField.includes(mydata.field)) { + if (mydata.headerName) { + return mydata.headerName; + } + } + + }), + + fileName: 'data_' + String(new Date().toJSON().slice(0, 10)).replaceAll("-", "_") + '.xlsx', + sheetName: 'Export_' + String(new Date().toJSON().slice(0, 10)).replaceAll("-", "_"), + }; + + + local_config.columnNames = local_config.columnNames.filter(function (element) { + return element !== undefined; + }); + + + const rows = data.map((row) => { + const mRow = {}; + for (const key of local_config.keys) { + mRow[key] = row[key]; + } + return mRow; + }); + + const worksheet = XLSX.utils.json_to_sheet(rows); + XLSX.utils.sheet_add_aoa(worksheet, [[...local_config.columnNames]], { + origin: 'A1', + }); + + const workbook = XLSX.utils.book_new(); + XLSX.utils.book_append_sheet(workbook, worksheet, local_config.sheetName); + XLSX.writeFile(workbook, local_config.fileName, { compression: true }); + } + + function ExportMenuItem(props) { + const apiRef = useGridApiContext(); + const { hideMenu } = props; + + return ( + { + handleExport(apiRef, props.data_colums); + // Hide the export menu after the export + hideMenu?.(); + }} + > + Export Excel + + ); + } + + // FIN EXPORT EXCEL DATAGRID + + const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); const [alert_message, setalert_message] = useState(""); const [alert_type, setalert_type] = useState(""); @@ -4485,11 +4864,14 @@ const AddParnerClient = (props) => { '_blank' ); } - }} > Devis & Cmd   + }} > Devis   + + + @@ -4966,7 +5348,7 @@ const AddParnerClient = (props) => {
- typologie + Typologie
{
} + {String(submenu).trim() === "submenu_paiement" &&
+ Total Paiement - {local_format_monetaire(New_Get_All_Paiement_Total_Payed)} * Paiement en attente --- * paiement en retard
+
+ +
+ + {/*rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => ())*/} + +
+
+   + + { + setselectionModel_paiement(newSelectionModel); + /*if (newSelectionModel.length === 1) + handleClick_edit_invoice_From_Line(newSelectionModel);*/ + if (newSelectionModel.length !== 1) { + //clean_order_detail_fields(); + //setsubmenu(); + // setdisplay_detail_invoice(); + + } + }} + + + + onRowDoubleClick={(newSelectionModel) => { + + } + } + selectionModel={selectionModel_paiement} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={Get_All_Paiement_of_Client_result.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + invoice_id: JSON.parse(item).invoice_id, + + paiement_amount: JSON.parse(item).paiement_amount, + paiement_mode: JSON.parse(item).paiement_mode, + paiement_ref: JSON.parse(item).paiement_ref, + paiement_date: JSON.parse(item).paiement_date, + commentaire: JSON.parse(item).commentaire, + client_id: JSON.parse(item).client_id, + invoice_ref: JSON.parse(item).invoice_ref, + + } + ))} + + columns={columns_paiement} + pageSize={10} + className="datagridclass" + + rowsPerPageOptions={[10]} + //disableSelectionOnClick + /* components={{ + Toolbar: GridToolbar, + }}*/ + + + //sx={datagridSx} + getCellClassName={(params) => { + + }} + getRowClassName={(params) => { + + if (parseInt(parseFloat(params.row.reste_to_paye)) <= 0 && String(params.row.invoice_header_type) === "facture") { + + return 'line--statut--payed'; + } + + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(gridline_id_paiement)) { + return 'line--statut--selected'; + } + else if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + }} + + + /> + +
+ +
+ + +
+ +
+ +ICIII FAIRE UN HISTOGRAMME DES PAIEMENT SUR LES 6 DERNIMER MOIS + +
+ +
} + + + {String(submenu).trim() === "submenu_relance" &&
+ submenu_relance +
} +
{
} - {/*
-
-
- - {String(props.new_customer) !== "1" &&
- - {String(submenu).trim() === "submenu_donnee_client" &&
- {p_detail_archive && String(p_detail_archive) === "1" && -
Document Archivé
} - - -
-
- -
-
- -
- Infos générales -
- -
- -
Raison sociale
- setclient_raison_sociale(e.target.value)} - /> -
- - -
Nom
- setclient_nom(e.target.value)} - - /> -
- -
N° Siret
- setclient_siret(e.target.value)} - /> -
- -
N° TVA
- setclient_tva(e.target.value)} - /> -
- -
 
-
Email
- setclient_email(e.target.value)} - - /> -
- -
Telephone
- setclient_telephone(e.target.value)} - /> -
- -
Site web
- setclient_website(e.target.value)} - /> -
- - - -
-
-
- -
-
- -
- Coordonnées -
- -
- -
Adresse
- setclient_adresse(e.target.value)} - /> -
-
Ville
- setclient_ville(e.target.value)} - /> -
-
Code Postal
- setclient_code_postal(e.target.value)} - /> -
-
Pays
- setclient_pays(e.target.value)} - /> -
- -
 
-
Commentaire
- { - setp_client_comment(e.target.value); - - }} - /> -
- - - -
-
-
- - - -
-
-
-   -
- - {String(props.check_user_acces_right("client", "write")) === "1" && String(datamodification) === "1" &&
-
/!\ Pensez à enregistrer les modifications
} - - - {String(props.check_user_acces_right("client", "write")) === "1" && String(formedit_mode) === "1" &&
-
- -
-
- -
-
- } - - - {String(formedit_mode) !== "1" &&
- -
- -
- - {String(props.check_user_acces_right("client", "write")) === "1" &&
- -
} -
- } - -
} - - {String(submenu).trim() === "submenu_donnees_facturation" &&
- -
Email de Facturation
- setclient_invoice_email(e.target.value)} - /> -
- - -
Nom de Facturation
- setclient_invoice_nom(e.target.value)} - /> -
- - - -
N° Siret Facturation
- setclient_invoice_siret(e.target.value)} - /> -
- -
N° TVA Facturation
- setclient_invoice_tva(e.target.value)} - /> -
- -
Conditions Paiement
- {/*String(formedit_mode_invoice) !== "1" && setp_client_invoice_paiement_condition_code(e.target.value)} - />* /} - {New_Getall_Partner_Paiement_Condition_result && New_Getall_Partner_Paiement_Condition_result.length > 0 && - (data).label === String(p_client_invoice_paiement_condition_code))[0].label} - options={New_Getall_Partner_Paiement_Condition_result} - className="disabled_style" - - onChange={(event, value) => { - if (value && value._id) { - setp_client_invoice_paiement_condition_code(value.code); - setp_client_invoice_paiement_condition_id(value._id); - DataUpdated_Invoice_Data(); - } - - }} - - renderInput={(params) => - } - />} -
- -
Adresse
- setclient_invoice_adresse(e.target.value)} - /> -
- - -
Ville
- setclient_invoice_ville(e.target.value)} - /> -
-
Code Postal
- setclient_invoice_code_postal(e.target.value)} - /> -
-
Pays
- { - setclient_invoice_pays(e.target.value); - DataUpdated_Invoice_Data(); - }} - /> -
- -
-
-
- -
Facturation automatique
- - {New_Option_Facturation_Automatique && String(formedit_mode_invoice) !== "1" && (data).value === String(p_detail_facturation_automatique))[0].label} - - />} - - {String(formedit_mode_invoice) === "1" && New_Option_Facturation_Automatique && (data).value === String(p_detail_facturation_automatique))[0].label} - options={New_Option_Facturation_Automatique} - onChange={(event, value) => { - if (value && value.value) { - setp_detail_facturation_automatique(value.value); - DataUpdated_Invoice_Data(); - } else { - setp_detail_facturation_automatique(""); - DataUpdated_Invoice_Data(); - } - }} - renderInput={(params) => - } - />} -
- -
-   -
- - {String(datamodification_invoice) === "1" &&
-
/!\ Pensez à enregistrer les modifications
} - {String(formedit_mode_invoice) === "1" &&
-
- -
-
- -
-
- } - {String(props.check_user_acces_right("client", "write")) === "1" && String(formedit_mode_invoice) !== "1" &&
- -
- -
-
- } - -
} - - {String(submenu).trim() === "submenu_contact" &&
- - {String(addcontact) !== "1" &&
- {String(props.check_user_acces_right("client", "write")) === "1" &&
Ajouter un contact
} -
-
- - {Get_List_Contact_Of_client_Part_result && String(Get_List_Contact_Of_client_Part_api) === "true" && - Get_List_Contact_Of_client_Part_result.map((client) => ( - -
- {(JSON.parse(client).nom || JSON.parse(client).prenom) && - - - - } - modal - nested - position="center center" - > - {close => ( -
- -
MySy Information
-
- {' '} - - En confirmant cette opération, le contact sera définitivement supprimé.
- - -
-
-
- - -
-
- -
-
-
- )} - } - - - - - - } - -
-
-
- - -
- - - ))} -
-
-
} - - {String(addcontact) === "1" &&
- - {String(formedit_mode_contact) === "1" &&
- Civilité
- - (data).value === String(p_contact_civilite))[0].label} - options={New_civilite} - onChange={(event, value) => { - if (value && value.value) { - setp_contact_civilite(value.value); - setdatamodification_contact("1"); - } - }} - renderInput={(params) => - } - /> - - -
} - - {String(formedit_mode_contact) !== "1" &&
- Civilité
- {New_civilite.length > 0 && (data).value === String(p_contact_civilite))[0].label} - - />} - -
} - - -
- Nom
- setp_contact_nom(e.target.value)} - - /> -
- - -
- Prénom
- setp_contact_prenom(e.target.value)} - /> -
-
Email
- setp_contact_email(e.target.value)} - - /> -
- - -
- Fonction
- setp_contact_fonction(e.target.value)} - - /> -
- - - - -
- Téléphone Fixe
- setcontact_telephone(e.target.value)} - /> -
- -
- Téléphone Mobile
- setp_contact_telephone_mobile(e.target.value)} - /> -
- - -
- Adresse
- setcontact_adresse(e.target.value)} - /> -
-
- ville
- setcontact_ville(e.target.value)} - /> -
-
- Code Postal
- setcontact_code_postal(e.target.value)} - /> -
-
- Pays
- setcontact_pays(e.target.value)} - /> -
- - - - - -
-
-
- - -
- - - -
-
-
-   -
- - - {String(datamodification_contact) === "1" &&
-
/!\ Pensez à enregistrer les modifications
} - - {String(formedit_mode_contact) === "1" &&
-
- -
-
- -
-
- } - {String(formedit_mode_contact) !== "1" &&
- -
- -
- - {String(props.check_user_acces_right("client", "write")) === "1" &&
- -
} -
- } - -
} - -
} - - - {String(submenu).trim() === "submenu_activite" &&
- -
} - - {String(submenu).trim() === "submenu_piece_jointe" &&
- - -
-
- - {String(props.check_user_acces_right("client", "write")) === "1" &&
- -
} - {file_1_name && file_1_name.name && - } - - {Record_All_PJ_api && String(Record_All_PJ_api) === "true" &&
Pièce jointe enregistrée
} - - {Record_All_PJ_api && String(Record_All_PJ_api) === "false" &&
{Record_All_PJ_message}
} - - -
- - - - {file_1_name && file_1_name.name &&
- -
- -
- - - -
} - - -
- -
- -
- - -
} - - -
-   Fermer -
-
} -
- - -
- -
*/}
diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 0423171..1ff40fb 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -826,7 +826,7 @@ const DisplayPartnerSession = (props) => { { field: '_id', headerName: '_id', hide: true }, { - field: 'civilite', headerName: 'Civ.', minWidth: 90, flex: 1, maxWidth: 100, hide: false, editable: false, editable: false, + field: 'civilite', headerName: 'Civ.', minWidth: 90, flex: 1, maxWidth: 100, hide: false, editable: false, renderCell: (cellValues) => { return ( @@ -846,11 +846,11 @@ const DisplayPartnerSession = (props) => { }, }, - { field: 'nom', headerName: 'nom', minWidth: 200, flex: 1, hide: false, editable: true, renderCell: (params) => , }, - { field: 'prenom', headerName: 'prenom', minWidth: 200, flex: 1, hide: false, editable: true, renderCell: (params) => , }, - { field: 'email', headerName: 'email', minWidth: 200, flex: 1, flex: 1, renderCell: (params) => , }, + { field: 'nom', headerName: 'Nom', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { field: 'prenom', headerName: 'Prénom', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { field: 'email', headerName: 'Email', minWidth: 200, flex: 1, flex: 1, renderCell: (params) => , editable: false,}, - { field: 'telephone', headerName: 'telephone', minWidth: 150, flex: 1, flex: 1, renderCell: (params) => , }, + { field: 'telephone', headerName: 'Téléphone', minWidth: 150, flex: 1, flex: 1, renderCell: (params) => , editable: false,}, { field: 'client_rattachement_nom', headerName: 'Client', minWidth: 150, flex: 1, hide: false, editable: false, renderCell: (params) => , }, { field: 'client_rattachement_id', headerName: 'Client_id', Width: 0, hide: true, editable: false, }, @@ -870,7 +870,7 @@ const DisplayPartnerSession = (props) => { } }, - { field: 'employeur', headerName: 'Employeur', minWidth: 150, flex: 1, maxWidth: 200, hide: true, editable: true, renderCell: (params) => , }, + { field: 'employeur', headerName: 'Employeur', minWidth: 150, flex: 1, maxWidth: 200, hide: true, editable: false, renderCell: (params) => , }, { field: 'opco', headerName: 'Centre Opco', minWidth: 100, flex: 1, maxWidth: 150, hide: true, editable: false }, { field: 'modefinancement', headerName: 'Financement', minWidth: 100, flex: 1, maxWidth: 150, hide: true, editable: false, @@ -892,7 +892,7 @@ const DisplayPartnerSession = (props) => { }, }, { - field: 'amount', headerName: 'Prix', minWidth: 100, flex: 1, maxWidth: 150, type: 'number', flex: 1, editable: true, + field: 'amount', headerName: 'Prix', minWidth: 100, flex: 1, maxWidth: 150, type: 'number', flex: 1, editable: false, align: 'right', renderCell: (params) => , }, @@ -924,7 +924,7 @@ const DisplayPartnerSession = (props) => { } }, - { + /* { field: "update", headerName: 'Mise à jour', renderCell: (cellValues) => { return ( @@ -983,7 +983,7 @@ const DisplayPartnerSession = (props) => { ); } }, - +*/ { field: 'bton_vertif', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", @@ -1440,10 +1440,10 @@ const DisplayPartnerSession = (props) => { field: 'nom', headerName: 'nom', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => , }, - { field: 'prenom', headerName: 'prenom', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => , }, - { field: 'email', headerName: 'email', minWidth: 200, flex: 1, renderCell: (params) => , }, + { field: 'prenom', headerName: 'Prénom', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { field: 'email', headerName: 'Email', minWidth: 200, flex: 1, renderCell: (params) => , }, - { field: 'telephone', headerName: 'telephone', minWidth: 150, flex: 1, renderCell: (params) => , }, + { field: 'telephone', headerName: 'Téléphone', minWidth: 150, flex: 1, renderCell: (params) => , }, { field: 'client_rattachement_nom', headerName: 'Client', minWidth: 150, flex: 1, maxWidth: 200, hide: false, editable: false, renderCell: (params) => , }, { field: 'client_rattachement_id', headerName: 'Client_id', Width: 0, hide: true, editable: false, }, @@ -6711,6 +6711,9 @@ const DisplayPartnerSession = (props) => { setp_one_status_part(""); setp_one_detail_client_rattachement_id(''); setp_one_detail_client_rattachement_nom(''); + + setp_one_detail_facture_client_rattachement_id(""); + setp_one_adresse_part(""); setp_one_cp_part(""); @@ -26270,6 +26273,18 @@ const DisplayPartnerSession = (props) => { fontSize: '14px', fontFamily: 'DM Sans', }, + '& .line--statut--selected': { + backgroundColor: '#e9f7f1', + color: '#0a2a4d', + }, + '& .line--statut--pair': { + backgroundColor: 'rgba(235, 235, 235, .7)', + color: '#0a2a4d', + }, + '& .line--statut--impair': { + backgroundColor: '#FFFFFF', + color: '#0a2a4d', + }, }} @@ -26316,6 +26331,26 @@ const DisplayPartnerSession = (props) => { pageSize={10} className="datagridclass" + onRowDoubleClick={(newSelectionModel) => { + // setgridline_id(newSelectionModel.row.id); + var tmp_data = JSON.parse(rowss_preinsc[newSelectionModel.row.id]) + + + var local_selected_id = tmp_data['_id']; + var local_selected_internal_url = tmp_data['class_internal_url']; + var local_selected_email = tmp_data['email']; + + if (local_selected_id && String(local_selected_id).length > 2) { + var tmp_url = selected_code_session + "&" + selected_session_id + "&" + selected_internal_url + "&" + local_selected_email; + + window.open( + process.env.REACT_APP_FRONT_URL + "Partner/mes_stagiaires/" + String(local_selected_id) + "/" + String(tmp_url), + '_blank' + ); + } + } + } + rowsPerPageOptions={[10]} disableSelectionOnClick components={{ @@ -26332,6 +26367,17 @@ const DisplayPartnerSession = (props) => { py: 1, }, }} + + getRowClassName={(params) => { + + if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + }} + /> @@ -26564,7 +26610,7 @@ const DisplayPartnerSession = (props) => { {String(addOneParticipant) !== "1" && selected_code_session && selected_internal_url &&
{String(addOneParticipant) === "1" &&
-
Ajout d'un Nouvelle appenant
+
Nouvel apprenant
Civilité
{New_civilite.length > 0 && { color: "#0a2a4d", fontSize: '14px', fontFamily: 'DM Sans', + }, '& .line--statut--pair': { + backgroundColor: 'rgba(235, 235, 235, .7)', + color: '#0a2a4d', + }, + '& .line--statut--impair': { + backgroundColor: '#FFFFFF', + color: '#0a2a4d', }, @@ -27483,6 +27536,16 @@ const DisplayPartnerSession = (props) => { py: 1, }, }} + getRowClassName={(params) => { + + if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + }} + /> diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index b9d22c4..f50ca6a 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -13896,7 +13896,7 @@ const DisplayPartnerStagiaires = (props) => { /> -
+
Téléphone
{ setLoading(false); if (String(res.data.status) === String("true")) { //console.log(" In Getall_Invoice_Paiement_Payed_Remain_Amounts res.data.status = " + res.data.status); - console.log(" In Getall_Invoice_Paiement_Payed_Remain_Amounts res.data.message r_class = " + res.data.message); + // console.log(" In Getall_Invoice_Paiement_Payed_Remain_Amounts res.data.message r_class = " + res.data.message); setGetall_Invoice_Paiement_Payed_Remain_Amounts_api("true"); setGetall_Invoice_Paiement_Payed_Remain_Amounts_result(res.data.message); diff --git a/src/components/Partner_Securite_Data.js b/src/components/Partner_Securite_Data.js index 06cc1cd..95b90e1 100644 --- a/src/components/Partner_Securite_Data.js +++ b/src/components/Partner_Securite_Data.js @@ -1078,6 +1078,192 @@ const Partner_Securite_Data = (props) => { {String(props.is_partner_admin_account) === "1" &&
+
+ +
+ +
+ Coordonnées bancaires +
+ +
+ + + :not(style)': { m: 1 } }} > + + + + + + + ), + }} + /> + + + + + + + ), + }} + /> + + + + + + + ), + }} + /> + + + + + + + ), + }} + /> + + + + + + + ), + }} + /> + + + + + + + ), + }} + /> + +
+ + + {insert_keyfieldsdesabled == false &&
+ +
+ +
+ +
+
+
+
+ } + {insert_keyfieldsdesabled == true && +
+ } +
+ + +
+ + + + +
+
+
 
+ +
+ +
@@ -1214,26 +1400,21 @@ const Partner_Securite_Data = (props) => {
}
- - - - - -
 
-
} + + {/*
Mot de passe
diff --git a/src/styles/components/_partnerclient.scss b/src/styles/components/_partnerclient.scss index 9671158..9e17e52 100644 --- a/src/styles/components/_partnerclient.scss +++ b/src/styles/components/_partnerclient.scss @@ -176,7 +176,7 @@ border-radius: 10px; border: 1px solid; } - + .training_caract { width: 100%; @@ -552,16 +552,15 @@ } .disabled_style { - //background-color: #ECEFF1; font-size: small !important; - color: black; - width: 95% !important; + color: #0a2a4d !important; + width: 90% !important; height: 3.5rem !important; - - //border: none !important; + margin: 5px !important; border-radius: 5px; background: white; - border: solid gainsboro 1px; + border: none !important; + } @@ -682,7 +681,7 @@ border: 1px solid #9cf; color: #3b3e40; font-family: "DM Sans", "sans-serif"; - font-size: 11px; + font-size: 11px; letter-spacing: 0.1rem; font-weight: normal; } @@ -716,16 +715,15 @@ } .disabled_style { - //background-color: #ECEFF1; font-size: small !important; - color: black; + color: #0a2a4d !important; width: 90% !important; height: 3.5rem !important; margin: 5px !important; - //border: none !important; border-radius: 5px; background: white; - border: solid gainsboro 1px; + border: none !important; + } .training_caract { @@ -1297,16 +1295,16 @@ } .disabled_style { - //background-color: #ECEFF1; font-size: small !important; - color: black; + color: #0a2a4d !important; width: 90% !important; height: 3.5rem !important; margin: 5px !important; - //border: none !important; border-radius: 5px; background: white; - border: solid gainsboro 1px; + border: none !important; + + } .training_caract { @@ -1625,7 +1623,7 @@ font-weight: normal; } - .block_en_mass { + .block_en_mass { width: 50%; float: left; margin-bottom: 1rem; @@ -1737,7 +1735,7 @@ border: 1px solid #9cf; color: #3b3e40; font-family: "DM Sans", "sans-serif"; - font-size: 11px; + font-size: 11px; letter-spacing: 0.1rem; font-weight: normal; } @@ -1771,16 +1769,16 @@ } .disabled_style { - //background-color: #ECEFF1; font-size: small !important; - color: black; + color: #0a2a4d !important; width: 90% !important; height: 3.5rem !important; margin: 5px !important; - //border: none !important; border-radius: 5px; background: white; - border: solid gainsboro 1px; + border: none !important; + + } .training_caract { @@ -1866,7 +1864,7 @@ margin-left: 10rem; } - .block_en_mass { + .block_en_mass { width: 50%; float: left; margin-bottom: 1rem; @@ -2218,10 +2216,10 @@ } - .css-1v4ccyo { + .css-1v4ccyo { height: 3.5rem !important; font-size: small; - color: #0a2a4d !important; + color: #0a2a4d !important; } option { @@ -2287,10 +2285,10 @@ width: 110%; } - .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { - color: #0a2a4d !important; - - font-size: small !important; - font-family: "DM Sans" !important; +.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + color: #0a2a4d !important; + + font-size: small !important; + font-family: "DM Sans" !important; padding-left: 5px !important; } \ No newline at end of file