diff --git a/src/components/AddPartnerClient.js b/src/components/AddPartnerClient.js index 4384c5e..1c7706a 100644 --- a/src/components/AddPartnerClient.js +++ b/src/components/AddPartnerClient.js @@ -2403,7 +2403,7 @@ const AddParnerClient = (props) => { document.getElementsByName("client_invoice_nom")[0].style.backgroundColor = "#ECEFF1"; } - if (document.getElementsByName("field_client_facture_id")) { + if (document.getElementsByName("field_client_facture_id") && document.getElementsByName("field_client_facture_id")[0]) { document.getElementsByName("field_client_facture_id")[0].disabled = true; document.getElementsByName("field_client_facture_id")[0].style.backgroundColor = "#ECEFF1"; } diff --git a/src/components/AddPartnerClient_ARG.js b/src/components/AddPartnerClient_ARG.js deleted file mode 100644 index 7b8edb7..0000000 --- a/src/components/AddPartnerClient_ARG.js +++ /dev/null @@ -1,5665 +0,0 @@ -import React, { useRef, useState, useEffect } from "react"; - -import TextField from '@mui/material/TextField'; - -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 { getCookie, setCookie } from 'react-use-cookie'; -import { AiTwotoneSave } from "react-icons/ai"; -import { useHistory } from "react-router-dom"; -import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"; -import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io"; -import { GrOrderedList } from "react-icons/gr"; -import { Fab } from "@material-ui/core"; -import 'react-tooltip/dist/react-tooltip.css' -import { Tooltip } from 'react-tooltip' -import { CiEdit, CiTrash } from "react-icons/ci"; -import Modules_Mes_Documents from "./Modules_Mes_Documents"; -import { AiOutlineUserAdd } from "react-icons/ai"; -import PartnerClient_Activite_For_Client from "./PartnerClient_Activite_For_Client"; -import Popup from 'reactjs-popup'; -import 'reactjs-popup/dist/index.css'; -import ToggleSwitch from "./ToggleSwitch"; -import { FcSpeaker } from "react-icons/fc"; -import Autocomplete from '@mui/material/Autocomplete'; -import { gridClasses } from '@mui/x-data-grid'; -import Link from '@mui/material/Link'; -import { PiDotsThree } from "react-icons/pi"; -import { IoCloseCircleOutline } from "react-icons/io5"; -import AttachFileIcon from '@mui/icons-material/AttachFile'; -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 Dialog from '@mui/material/Dialog'; -import DialogActions from '@mui/material/DialogActions'; -import DialogContent from '@mui/material/DialogContent'; -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 { 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 { 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 Module_Alert_Confirmation from "./Module_Alert_Confirmation"; - -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 AddPartnerClient_ARG = (props) => { - - const classes = useStyles(); - - const history = useHistory(); - const [submenu, setsubmenu] = useState(""); - - const [current_contact_recid, setcurrent_contact_recid] = useState(""); - - const [datamodification, setdatamodification] = useState("0"); - const [formedit_mode, setformedit_mode] = useState("0"); - - const [datamodification_invoice, setdatamodification_invoice] = useState("0"); - const [formedit_mode_invoice, setformedit_mode_invoice] = useState("0"); - - const [datamodification_contact, setdatamodification_contact] = useState("0"); - const [formedit_mode_contact, setformedit_mode_contact] = useState("0"); - - const [p_client_email, setclient_email] = useState(""); - const [p_client_nom, setclient_nom] = useState(""); - - const [p_client_intranet_account_id, setp_client_intranet_account_id] = useState("0"); - - const [p_client_type_id, setp_client_type_id] = useState(""); - - const [p_client_goupe_client_id, setp_client_goupe_client_id] = useState(""); - - const [p_client_goupe_client_id_label, setp_client_goupe_client_id_label] = useState(""); - - const [p_client_type_label, setp_client_type_label] = useState(""); - - const [p_client_type_financeur, setp_client_type_financeur] = useState(""); - const [p_client_type_pouvoir_public, setp_client_type_pouvoir_public] = useState(""); - - const [p_client_raison_sociale, setclient_raison_sociale] = useState(""); - - const [p_client_is_company, setp_client_is_company] = useState(""); - const [p_detail_archive, setp_detail_archive] = useState(""); - - - - const [p_client_siret, setclient_siret] = useState(""); - const [p_client_tva, setclient_tva] = useState(""); - const [p_client_adresse, setclient_adresse] = useState(""); - const [p_client_ville, setclient_ville] = useState(""); - const [p_client_code_postal, setclient_code_postal] = useState(""); - const [p_client_pays, setclient_pays] = useState(""); - const [p_client_telephone, setclient_telephone] = useState(""); - const [p_client_website, setclient_website] = useState(""); - - // Données de facturation - const [p_client_invoice_email, setclient_invoice_email] = useState(""); - const [p_client_invoice_nom, setclient_invoice_nom] = useState(""); - const [p_client_invoice_siret, setclient_invoice_siret] = useState(""); - const [p_client_invoice_tva, setclient_invoice_tva] = useState(""); - const [p_client_invoice_adresse, setclient_invoice_adresse] = useState(""); - - const [p_client_invoice_paiement_condition_code, setp_client_invoice_paiement_condition_code] = useState(""); - const [p_client_invoice_paiement_condition_id, setp_client_invoice_paiement_condition_id] = useState(""); - - const [p_client_invoice_ville, setclient_invoice_ville] = useState(""); - const [p_client_invoice_code_postal, setclient_invoice_code_postal] = useState(""); - const [p_client_invoice_pays, setclient_invoice_pays] = useState(""); - - // Données contact - const [p_contact_email, setp_contact_email] = useState(""); - const [p_contact_nom, setp_contact_nom] = useState(""); - const [p_contact_prenom, setp_contact_prenom] = useState(""); - const [p_contact_siret, setcontact_siret] = useState(""); - const [p_contact_tva, setcontact_tva] = useState(""); - const [p_contact_adresse, setcontact_adresse] = useState(""); - const [p_contact_ville, setcontact_ville] = useState(""); - const [p_contact_code_postal, setcontact_code_postal] = useState(""); - const [p_contact_pays, setcontact_pays] = useState(""); - const [p_contact_telephone, setcontact_telephone] = useState(""); - const [p_contact_telephone_mobile, setp_contact_telephone_mobile] = useState(""); - - const [p_contact_fonction, setp_contact_fonction] = useState(""); - const [p_contact_civilite, setp_contact_civilite] = useState("neutre"); - - - const [selected_contact_id, setelected_contact_id] = useState(""); - - - - function ExpandableCell_50({ value }) { - const [expanded, setExpanded] = React.useState(false); - - return ( - - ); - } - - - function Display_Colunm_text({ value }) { - - return ( -
- {value}  - -
- ); - } - - - - function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); - } - - - 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'] - - for (let i = 0; i < list_fields.length; i++) { - if (document.getElementsByName(String(list_fields[i])) && document.getElementsByName(String(list_fields[i]))[0]) { - document.getElementsByName(String(list_fields[i]))[0].style.background = "#d8edfc"; - document.getElementsByName(String(list_fields[i]))[0].style.color = "#3b3e40"; - - } - } - - if (document.getElementsByName(String(current_menu_header)) && document.getElementsByName(String(current_menu_header))[0]) { - document.getElementsByName(String(current_menu_header))[0].style.background = "#107758"; - document.getElementsByName(String(current_menu_header))[0].style.color = "white"; - } - - - } - - const [importmessage, setimportmessage] = useState(""); - async function submenu_donnee_client() { - setsubmenu("submenu_donnee_client"); - /* - 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_donnee_client"); - - } - - - - async function submenu_donnee_facturation() { - setsubmenu("submenu_donnees_facturation"); - /* - 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_invoice) !== "1") { - Disable_invoice_fields(); - } else { - Enable_invoice_fields(); - } - - inactive_active_menu_header("submenu_donnee_facturation"); - - } - - async function submenu_contact() { - setsubmenu("submenu_contact"); - /* - 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); - - inactive_active_menu_header("submenu_contact"); - - } - - async function submenu_activite() { - - setsubmenu("submenu_activite"); - /* - 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_invoice) !== "1") { - //Disable_invoice_fields(); - } else { - //Enable_invoice_fields(); - } - inactive_active_menu_header("submenu_activite"); - - - } - - - async function submenu_piece_jointe() { - - setsubmenu("submenu_piece_jointe"); - /* - 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_invoice) !== "1") { - //Disable_invoice_fields(); - } else { - //Enable_invoice_fields(); - } - inactive_active_menu_header("submenu_piece_jointe"); - // Refresh affichage des pièces jointes - Get_List_Of_All_PJ(props.client_id); - } - - - async function submenu_devis() { - setsubmenu("submenu_devis"); - /* - 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); - inactive_active_menu_header("submenu_devis"); - } - - async function submenu_cmd() { - setsubmenu("submenu_cmd"); - /* - 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); - } - - async function submenu_factures() { - setsubmenu("submenu_factures"); - /* - 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); - inactive_active_menu_header("submenu_factures"); - } - - - async function submenu_stagiaires() { - setsubmenu("submenu_stagiaires"); - /* - 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); - } - - function DataUpdated() { - if (String(props.check_user_acces_right("client", "write")) === "1") { - setdatamodification("1"); - } - } - - function DataEditMode() { - if (String(props.check_user_acces_right("client", "write")) === "1") { - setformedit_mode("1"); - Enable_fields(); - } - } - - function AnnulerEdit() { - setformedit_mode("0"); - setdatamodification("0"); - Disable_fields(); - clear_fields(); - fillfield_Only_Main_Data(props.client_mail); - - } - - function DataUpdated_Invoice_Data() { - if (String(props.check_user_acces_right("client", "write")) === "1") { - setdatamodification_invoice("1"); - } - } - - function DataEditMode_Invoice_Data() { - - - if (String(props.check_user_acces_right("client", "write")) === "1") { - setformedit_mode_invoice("1"); - Enable_invoice_fields(); - } - } - - - - function DataUpdated_Contact_Data() { - if (String(props.check_user_acces_right("client", "write")) === "1") { - setdatamodification_contact("1"); - } - } - - function DataEditMode_Contact_Data() { - if (String(props.check_user_acces_right("client", "write")) === "1") { - setformedit_mode_contact("1"); - Enable_contact_fields(); - } - } - - - function AnnulerEdit_Invoice_Data() { - setformedit_mode_invoice("0"); - setdatamodification_invoice("0"); - Disable_invoice_fields(); - clear_invoice_fields(); - fillfield_Invoice_Data(props.client_mail); - } - - - function SetTabFocus() { - - document.getElementById("submenu_donnee_client").style.background = "#d8edfc"; - document.getElementById("submenu_donnee_client").style.color = "#3b3e40"; - document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc"; - document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40"; - - - if (String(submenu) === "submenu_donnee_client") { - document.getElementById("submenu_donnee_client").style.background = "#107758"; - document.getElementById("submenu_donnee_client").style.color = "white"; - } - else if (String(submenu) === "submenu_donnees_facturation") { - document.getElementById("submenu_donnee_facturation").style.background = "#107758"; - document.getElementById("submenu_donnee_facturation").style.color = "white"; - } - - else if (String(submenu) === "submenu_piece_jointe") { - document.getElementById("submenu_piece_jointe").style.background = "#107758"; - document.getElementById("submenu_piece_jointe").style.color = "white"; - } - - } - - const [addcontact, setaddcontact] = useState("0"); - function Add_Contact() { - setis_contact_include_com(false); - setdatamodification_contact("0"); - setformedit_mode_contact("1"); - clean_contact_set_values(); - setaddcontact("1"); - setcurrent_contact_recid(""); - } - - function Close_Contact() { - setaddcontact("0"); - setdatamodification_contact("0"); - setformedit_mode_contact("0"); - clear_contact_fields(); - clean_contact_set_values(); - setdatamodification_invoice("0"); - setformedit_mode_contact("0"); - setcurrent_contact_recid(""); - setis_contact_include_com(false); - } - - const [New_Get_List_Client_Type_result, setNew_Get_List_Client_Type_result] = useState([]); - - const [Get_List_Client_Type_api, setGet_List_Client_Type_api] = useState(); - const [Get_List_Client_Type_message, setGet_List_Client_Type_message] = useState(); - const [Get_List_Client_Type_result, setGet_List_Client_Type_result] = useState(); - function Get_List_Client_Type(event) { - - var form = new FormData(); - const stored_cookie = getCookie('tokenmysypart'); - const related_collection = "partner_client" - - - form.append("token", stored_cookie); - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Client_Type_List/"; - - axios.post(myurl, form).then(res => { - //console.log(" In Get_List_Client_Type res.data.status = " + res.data.status); - //console.log(" In Get_List_Client_Type res.data.message r_class = " + res.data.message); - - if (String(res.data.status) === String("true")) { - setGet_List_Client_Type_api("true"); - setGet_List_Client_Type_result(res.data.message); - - var new_data2 = []; - const new_data = res.data.message.map((x) => { - - //--- - var localid = JSON.parse(x).id; - var local_id = JSON.parse(x)._id; - var local_code = JSON.parse(x).code; - - - //--- - var node = { - "_id": local_id, - "id": localid, - "label": local_code, - "code": local_code, - - }; - new_data2.push(node); - }); - - //--- - var node = { - "_id": "", - "id": "", - "label": "", - "code": "", - - }; - new_data2.push(node); - if (new_data2.length > 0) - setNew_Get_List_Client_Type_result(new_data2); - - - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - } - else { - setGet_List_Client_Type_api("false"); - setGet_List_Client_Type_message(res.data.message); - //alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); - } - - }).catch((error) => { - console.warn('Not good man :( Get_List_Client_Type = ', error); - setGet_List_Client_Type_api("false"); - alert(" Impossible de récupérer les types de clients"); - }) - } - - - const [New_Get_List_Client_Groupe_result, setNew_Get_List_Client_Groupe_result] = useState([]); - - const [Get_List_Client_Groupe_api, setGet_List_Client_Groupe_api] = useState(); - const [Get_List_Client_Groupe_message, setGet_List_Client_Groupe_message] = useState(); - const [Get_List_Client_Groupe_result, setGet_List_Client_Groupe_result] = useState(); - function Get_List_Client_Groupe(event) { - - var form = new FormData(); - const stored_cookie = getCookie('tokenmysypart'); - const related_collection = "partner_client" - - - form.append("token", stored_cookie); - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Groupe_Client/"; - - axios.post(myurl, form).then(res => { - //console.log(" In Get_List_Client_Groupe res.data.status = " + res.data.status); - //console.log(" In Get_List_Client_Groupe res.data.message r_class = " + res.data.message); - - if (String(res.data.status) === String("true")) { - setGet_List_Client_Groupe_api("true"); - setGet_List_Client_Groupe_result(res.data.message); - - var new_data2 = []; - const new_data = res.data.message.map((x) => { - - //--- - var localid = JSON.parse(x).id; - var local_id = JSON.parse(x)._id; - var local_code = JSON.parse(x).code; - - - //--- - var node = { - "_id": local_id, - "id": localid, - "label": local_code, - "code": local_code, - - }; - new_data2.push(node); - }); - - //--- - var node = { - "_id": "", - "id": "", - "label": "", - "code": "", - - }; - new_data2.push(node); - if (new_data2.length > 0) - setNew_Get_List_Client_Groupe_result(new_data2); - - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - } - else { - setGet_List_Client_Groupe_api("false"); - setGet_List_Client_Groupe_message(res.data.message); - //alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); - } - - }).catch((error) => { - console.warn('Not good man :( Get_List_Client_Groupe = ', error); - setGet_List_Client_Groupe_api("false"); - alert(" Impossible de récupérer les types de clients"); - }) - } - - - const [New_Getall_Partner_Paiement_Condition_result, setNew_Getall_Partner_Paiement_Condition_result] = useState([]); - - const [Getall_Partner_Paiement_Condition_api, setGetall_Partner_Paiement_Condition_api] = useState(); - const [Getall_Partner_Paiement_Condition_message, setGetall_Partner_Paiement_Condition_message] = useState(); - const [Getall_Partner_Paiement_Condition_result, setGetall_Partner_Paiement_Condition_result] = useState([]); - function Getall_Partner_Paiement_Condition(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_List_Paiement_Condition/"; - - //setLoading(true); - axios.post(myurl, form).then(res => { - //setLoading(false); - - if (String(res.data.status) === String("true")) { - //console.log(" In Getall_Partner_Paiement_Condition res.data.status = " + res.data.status); - //console.log(" In Getall_Partner_Paiement_Condition res.data.message r_class = " + res.data.message); - setGetall_Partner_Paiement_Condition_api("true"); - setGetall_Partner_Paiement_Condition_result(res.data.message); - - var new_data2 = []; - const new_data = res.data.message.map((x) => { - - //--- - var localid = JSON.parse(x).id; - var local_id = JSON.parse(x)._id; - var local_code = JSON.parse(x).code; - var local_description = JSON.parse(x).description; - var local_nb_jour = JSON.parse(x).nb_jour; - var local_depart = JSON.parse(x).depart; - - - //--- - var node = { - "_id": local_id, - "id": localid, - "label": local_code, - "code": local_code, - "description": local_description, - "nb_jour": local_nb_jour, - "depart": local_depart, - - }; - new_data2.push(node); - }); - - //--- - var node = { - "_id": "", - "id": "", - "label": "", - "code": "", - "description": "", - "nb_jour": "", - "depart": "", - - }; - new_data2.push(node); - - - if (new_data2.length > 0) - setNew_Getall_Partner_Paiement_Condition_result(new_data2); - - - } - else { - setGetall_Partner_Paiement_Condition_api("false"); - setGetall_Partner_Paiement_Condition_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 :( Getall_Partner_Paiement_Condition = ', error); - setGetall_Partner_Paiement_Condition_api("false"); - alert(" Impossible de recuperer la liste des conditions de paiement"); - //setmyApimyApiMessage("") - }) - } - - useEffect(() => { - Get_List_Client_Type(); - Get_List_Client_Groupe(); - Getall_Partner_Paiement_Condition(); - Get_List_Of_All_PJ(props.client_id); - Get_List_Type_Financeur(); - Get_List_Type_Pouvoir_Public(); - - if (String(props.new_customer) !== "1") { - setformedit_mode("0"); - setformedit_mode_invoice("0"); - - submenu_donnee_client(); - fillfield(); - - setdatamodification("0"); - setdatamodification_invoice("0"); - - Get_List_Contact_Of_client_Part(); - - - } else { - setformedit_mode("1"); - setformedit_mode_invoice("1"); - } - - setp_new_pwd(""); - setp_conf_new_login(""); - - - }, [props.client_mail,]); - - - - const [has_client_invoice_email, sethas_client_invoice_email] = useState(); - - - const [fillfield_api, setfillfield_api] = useState(""); - const [fillfield_result, setfillfield_result] = useState(""); - const [fillfield_message, setfillfield_message] = useState(""); - function fillfield() { - - - var form = new FormData(); - - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - form.append("_id", props.client_id); - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Partner_Client_From_Id/"; - - axios.post(myurl, form).then(res => { - if (String(res.data.status) === String("true")) { - //console.log(" In fillfield res.data.status = " + res.data.status); - //console.log(" In fillfield res.data.message = " + res.data.message); - setfillfield_api("true"); - setfillfield_result(res.data.message); - var mylocalclient = JSON.parse(res.data.message); - - - if (mylocalclient) { - - - if (mylocalclient.nom) { - setclient_nom(mylocalclient.nom); - } else { - setclient_nom(""); - } - - if (mylocalclient.email) { - setclient_email(mylocalclient.email); - } else { - setclient_email(""); - } - - - if (mylocalclient.intranet_account_id) { - setp_client_intranet_account_id(mylocalclient.intranet_account_id); - } else { - setp_client_intranet_account_id("0"); - } - - if (mylocalclient.raison_sociale) { - setclient_raison_sociale(mylocalclient.raison_sociale); - } else { - setclient_raison_sociale(""); - } - - setp_client_is_company("0"); - if (mylocalclient.is_company) { - setp_client_is_company(mylocalclient.is_company); - } - - - setp_detail_archive("0"); - if (mylocalclient.archive) { - setp_detail_archive(mylocalclient.archive); - } - - - - if (String(mylocalclient.is_financeur) === "1") - setp_client_is_financeur(true); - else - setp_client_is_financeur(false); - - - if (String(mylocalclient.is_client) === "1") - setp_client_is_client(true); - else - setp_client_is_client(false); - - - if (String(mylocalclient.is_fournisseur) === "1") - setp_client_is_fournisseur(true); - else - setp_client_is_fournisseur(false); - - - - if (mylocalclient.adr_adresse) - setclient_adresse(mylocalclient.adr_adresse); - else - setclient_adresse(""); - - - if (mylocalclient.adr_ville) - setclient_ville(mylocalclient.adr_ville); - else - setclient_ville(""); - - if (mylocalclient.adr_pays) - setclient_pays(mylocalclient.adr_pays); - else - setclient_pays(""); - - if (mylocalclient.siret) - setclient_siret(mylocalclient.siret); - else - setclient_siret(""); - - - if (mylocalclient.client_type_id) { - setp_client_type_id(mylocalclient.client_type_id); - setp_client_type_label(mylocalclient.client_type_code); - } else { - setp_client_type_id(""); - setp_client_type_label(""); - } - - if (mylocalclient.partner_groupe_client_id) { - setp_client_goupe_client_id(mylocalclient.partner_groupe_client_id); - } else { - setp_client_goupe_client_id(""); - - } - - if (mylocalclient.partner_groupe_client_code) { - setp_client_goupe_client_id_label(mylocalclient.partner_groupe_client_code); - } else { - setp_client_goupe_client_id_label(""); - - } - - if (mylocalclient.tva) - setclient_tva(mylocalclient.tva); - else - setclient_tva(""); - - - if (mylocalclient.type_financeur_id) - setp_client_type_financeur(mylocalclient.type_financeur_id); - else - setp_client_type_financeur(""); - - - if (mylocalclient.type_pouvoir_public_id) - setp_client_type_pouvoir_public(mylocalclient.type_pouvoir_public_id); - - else - setp_client_type_pouvoir_public(""); - - - - - if (mylocalclient.website) - setclient_website(mylocalclient.website); - else - setclient_website(""); - - if (mylocalclient.telephone) - setclient_telephone(mylocalclient.telephone); - else - setclient_telephone(""); - - // Remplissage des doonées de facturation - if (mylocalclient.invoice_email) - setclient_invoice_email(mylocalclient.invoice_email); - else { - setclient_invoice_email(""); - sethas_client_invoice_email("0"); - } - - if (mylocalclient.invoice_nom) - setclient_invoice_nom(mylocalclient.invoice_nom); - else - setclient_invoice_nom(""); - - - if (mylocalclient.invoice_siret) - setclient_invoice_siret(mylocalclient.invoice_siret); - else - setclient_invoice_siret(""); - - if (mylocalclient.invoice_tva) - setclient_invoice_tva(mylocalclient.invoice_tva); - else - setclient_invoice_tva(""); - - if (mylocalclient.invoice_adresse) - setclient_invoice_adresse(mylocalclient.invoice_adresse); - else - setclient_invoice_adresse(""); - - if (mylocalclient.invoice_condition_paiement_id) - setp_client_invoice_paiement_condition_id(mylocalclient.invoice_condition_paiement_id); - else { - setp_client_invoice_paiement_condition_id(""); - sethas_client_invoice_email("0"); - } - - if (mylocalclient.invoice_condition_paiement_code) - setp_client_invoice_paiement_condition_code(mylocalclient.invoice_condition_paiement_code); - else - setp_client_invoice_paiement_condition_code(""); - - if (mylocalclient.invoice_ville) - setclient_invoice_ville(mylocalclient.invoice_ville); - else - setclient_invoice_ville(""); - - if (mylocalclient.invoice_code_postal) - setclient_invoice_code_postal(mylocalclient.invoice_code_postal); - else - setclient_invoice_code_postal(""); - - if (mylocalclient.invoice_pays) - setclient_invoice_pays(mylocalclient.invoice_pays); - else - setclient_invoice_pays(""); - - if (mylocalclient.invoice_automatique) - setp_detail_facturation_automatique(mylocalclient.invoice_automatique); - else - setp_detail_facturation_automatique(""); - - setdatamodification("0"); - setdatamodification_invoice("0"); - - Disable_fields(); - //Disable_invoice_fields(); - } - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - return; - } - else { - - setfillfield_api("false"); - setfillfield_message(res.data.message); - } - - - }).catch((error) => { - console.warn('Not good man :( fillfield = ', error); - setfillfield_result("false"); - setfillfield_message(" Impossible de recuperer les informations du client") - - }) - } - - - const [fillfield_Invoice_Data_api, setfillfield_Invoice_Data_api] = useState(""); - const [fillfield_Invoice_Data_result, setfillfield_Invoice_Data_result] = useState(""); - const [fillfield_Invoice_Data_message, setfillfield_Invoice_Data_message] = useState(""); - function fillfield_Invoice_Data(cust_email) { - - var val = cust_email; - - var form = new FormData(); - - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - form.append("_id", props.client_id); - - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Partner_Client_From_Id/"; - - axios.post(myurl, form).then(res => { - if (String(res.data.status) === String("true")) { - //console.log(" In fillfield_Invoice_Data res.data.status = " + res.data.status); - //console.log(" In fillfield_Invoice_Data res.data.message = " + res.data.message); - setfillfield_Invoice_Data_api("true"); - setfillfield_Invoice_Data_result(res.data.message); - var mylocalclient = JSON.parse(res.data.message); - - - if (mylocalclient) { - - // Remplissage des doonées de facturation - if (mylocalclient.invoice_email) - setclient_invoice_email(mylocalclient.invoice_email); - else - setclient_invoice_email(""); - - if (mylocalclient.invoice_nom) - setclient_invoice_nom(mylocalclient.invoice_nom); - else - setclient_invoice_nom(""); - - if (mylocalclient.invoice_siret) - setclient_invoice_siret(mylocalclient.invoice_siret); - else - setclient_invoice_siret(""); - - if (mylocalclient.invoice_tva) - setclient_invoice_tva(mylocalclient.invoice_tva); - else - setclient_invoice_tva(""); - - if (mylocalclient.invoice_adresse) - setclient_invoice_adresse(mylocalclient.invoice_adresse); - else - setclient_invoice_adresse(""); - - if (mylocalclient.invoice_condition_paiement_id) - setp_client_invoice_paiement_condition_id(mylocalclient.invoice_condition_paiement_id); - else - setp_client_invoice_paiement_condition_id(""); - - if (mylocalclient.invoice_condition_paiement_code) - setp_client_invoice_paiement_condition_code(mylocalclient.invoice_condition_paiement_code); - else - setp_client_invoice_paiement_condition_code(""); - - if (mylocalclient.invoice_ville) - setclient_invoice_ville(mylocalclient.invoice_ville); - else - setclient_invoice_ville(""); - - if (mylocalclient.invoice_code_postal) - setclient_invoice_code_postal(mylocalclient.invoice_code_postal); - else - setclient_invoice_code_postal(""); - - if (mylocalclient.invoice_pays) - setclient_invoice_pays(mylocalclient.invoice_pays); - else - setclient_invoice_pays(""); - - if (mylocalclient.invoice_automatique) - setp_detail_facturation_automatique(mylocalclient.invoice_automatique); - else - setp_detail_facturation_automatique(""); - - Disable_invoice_fields(); - } - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - return; - } - else { - - setfillfield_Invoice_Data_api("false"); - setfillfield_Invoice_Data_message(res.data.message); - } - - - }).catch((error) => { - console.warn('Not good man :( fillfield_Invoice_Data = ', error); - setfillfield_Invoice_Data_result("false"); - setfillfield_Invoice_Data_message(" Impossible de recuperer les informations du client") - - }) - } - - const [fillfield_Only_Main_Data_api, setfillfield_Only_Main_Data_api] = useState(""); - const [fillfield_Only_Main_Data_result, setfillfield_Only_Main_Data_result] = useState(""); - const [fillfield_Only_Main_Data_message, setfillfield_Only_Main_Data_message] = useState(""); - function fillfield_Only_Main_Data(cust_email) { - - var val = cust_email; - - var form = new FormData(); - - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - form.append("_id", props.client_id); - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Partner_Client_From_Id/"; - - axios.post(myurl, form).then(res => { - if (String(res.data.status) === String("true")) { - //console.log(" In fillfield_Only_Main_Data res.data.status = " + res.data.status); - //console.log(" In fillfield_Only_Main_Data res.data.message = " + res.data.message); - setfillfield_Only_Main_Data_api("true"); - setfillfield_Only_Main_Data_result(res.data.message); - var mylocalclient = JSON.parse(res.data.message); - - - if (mylocalclient) { - - if (mylocalclient.raison_sociale) { - setclient_raison_sociale(mylocalclient.raison_sociale); - } else { - setclient_raison_sociale(""); - } - - setp_client_is_company("0"); - if (mylocalclient.is_company) { - setp_client_is_company(mylocalclient.is_company); - } - - if (mylocalclient.adr_adresse) - setclient_adresse(mylocalclient.adr_adresse); - else - setclient_adresse(""); - - - if (mylocalclient.adr_ville) - setclient_ville(mylocalclient.adr_ville); - else - setclient_ville(""); - - if (mylocalclient.adr_pays) - setclient_pays(mylocalclient.adr_pays); - else - setclient_pays(""); - - if (mylocalclient.siret) - setclient_siret(mylocalclient.siret); - else - setclient_siret(""); - - if (mylocalclient.tva) - setclient_tva(mylocalclient.tva); - else - setclient_tva(""); - - if (mylocalclient.website) - setclient_website(mylocalclient.website); - else - setclient_website(""); - - if (mylocalclient.telephone) - setclient_telephone(mylocalclient.telephone); - else - setclient_telephone(""); - - - Disable_fields(); - - } - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - return; - } - else { - - setfillfield_Only_Main_Data_api("false"); - setfillfield_Only_Main_Data_message(res.data.message); - } - - - }).catch((error) => { - console.warn('Not good man :( fillfield_Only_Main_Data = ', error); - setfillfield_Only_Main_Data_result("false"); - setfillfield_Only_Main_Data_message(" Impossible de recuperer les informations du client") - - }) - } - - - const [client_has_communication_contact, setclient_has_communication_contact] = useState(); - - const [Get_List_Contact_Of_client_Part_api, setGet_List_Contact_Of_client_Part_api] = useState(); - const [Get_List_Contact_Of_client_Part_message, setGet_List_Contact_Of_client_Part_message] = useState(); - const [Get_List_Contact_Of_client_Part_result, setGet_List_Contact_Of_client_Part_result] = useState(); - function Get_List_Contact_Of_client_Part(event) { - - var form = new FormData(); - const stored_cookie = getCookie('tokenmysypart'); - const related_collection = "partner_client" - - - form.append("token", stored_cookie); - form.append("related_collection", related_collection); - form.append("related_collection_owner_id", props.client_id); - - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Entity_Contact/"; - - axios.post(myurl, form).then(res => { - //console.log(" In Get_List_Contact_Of_client_Part res.data.status = " + res.data.status); - //console.log(" In Get_List_Contact_Of_client_Part res.data.message r_class = " + res.data.message); - - if (String(res.data.status) === String("true")) { - setGet_List_Contact_Of_client_Part_api("true"); - setGet_List_Contact_Of_client_Part_result(res.data.message); - - var contact_com = "0"; - - const new_data = res.data.message.map((x) => { - - //--- - var include_com = JSON.parse(x).include_com; - if (String(include_com) === "1") { - contact_com = "1" - } - }); - - setclient_has_communication_contact(contact_com); - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - } - else { - setGet_List_Contact_Of_client_Part_api("false"); - setGet_List_Contact_Of_client_Part_message(res.data.message); - } - - }).catch((error) => { - console.warn('Not good man :( Get_List_Contact_Of_client_Part = ', error); - setGet_List_Contact_Of_client_Part_api("false"); - //setmyApimyApiMessage("") - }) - } - - - function clear_fields() { - if (document.getElementsByName("client_email")) { - document.getElementsByName("client_email")[0].value = ""; - } - - if (document.getElementsByName("client_nom")) { - document.getElementsByName("client_nom")[0].value = ""; - } - - if (document.getElementsByName("client_raison_sociale")) { - document.getElementsByName("client_raison_sociale")[0].value = ""; - } - - if (document.getElementsByName("client_adresse")) { - document.getElementsByName("client_adresse")[0].value = ""; - } - - if (document.getElementsByName("client_ville")) { - document.getElementsByName("client_ville")[0].value = ""; - } - - if (document.getElementsByName("client_pays")) { - document.getElementsByName("client_pays")[0].value = ""; - } - - if (document.getElementsByName("client_email")) { - document.getElementsByName("client_email")[0].value = ""; - } - - if (document.getElementsByName("client_siret")) { - document.getElementsByName("client_siret")[0].value = ""; - } - - if (document.getElementsByName("client_type_id") && document.getElementsByName("client_type_id")[0]) { - document.getElementsByName("client_type_id")[0].value = ""; - } - - if (document.getElementsByName("client_type_financeur_id") && document.getElementsByName("client_type_financeur_id")[0]) { - document.getElementsByName("client_type_financeur_id")[0].value = ""; - } - - if (document.getElementsByName("client_type_pouvoir_public_id") && document.getElementsByName("client_type_pouvoir_public_id")[0]) { - document.getElementsByName("client_type_pouvoir_public_id")[0].value = ""; - } - - - - if (document.getElementsByName("client_tva")) { - document.getElementsByName("client_tva")[0].value = ""; - } - - if (document.getElementsByName("client_website")) { - document.getElementsByName("client_website")[0].value = ""; - } - - if (document.getElementsByName("client_code_postal")) { - document.getElementsByName("client_code_postal")[0].value = ""; - } - - if (document.getElementsByName("client_telephone")) { - document.getElementsByName("client_telephone")[0].value = ""; - } - - } - - function Disable_fields() { - if (document.getElementsByName("client_email") && document.getElementsByName("client_email")[0]) { - document.getElementsByName("client_email")[0].disabled = true; - document.getElementsByName("client_email")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_nom") && document.getElementsByName("client_nom")[0]) { - document.getElementsByName("client_nom")[0].disabled = true; - document.getElementsByName("client_nom")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_raison_sociale") && document.getElementsByName("client_raison_sociale")[0]) { - document.getElementsByName("client_raison_sociale")[0].disabled = true; - document.getElementsByName("client_raison_sociale")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_adresse") && document.getElementsByName("client_adresse")[0]) { - document.getElementsByName("client_adresse")[0].disabled = true; - document.getElementsByName("client_adresse")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_ville") && document.getElementsByName("client_ville")[0]) { - document.getElementsByName("client_ville")[0].disabled = true; - document.getElementsByName("client_ville")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_pays") && document.getElementsByName("client_pays")[0]) { - document.getElementsByName("client_pays")[0].disabled = true; - document.getElementsByName("client_pays")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_email") && document.getElementsByName("client_pays")[0]) { - document.getElementsByName("client_email")[0].disabled = true; - document.getElementsByName("client_email")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_siret") && document.getElementsByName("client_pays")[0]) { - document.getElementsByName("client_siret")[0].disabled = true; - document.getElementsByName("client_siret")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_type_id") && document.getElementsByName("client_type_id")[0]) { - document.getElementsByName("client_type_id")[0].disabled = true; - document.getElementsByName("client_type_id")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_groupe_id") && document.getElementsByName("client_groupe_id")[0]) { - document.getElementsByName("client_groupe_id")[0].disabled = true; - document.getElementsByName("client_groupe_id")[0].style.backgroundColor = "#ECEFF1"; - } - - - if (document.getElementsByName("client_type_financeur_id") && document.getElementsByName("client_type_financeur_id")[0]) { - document.getElementsByName("client_type_financeur_id")[0].disabled = true; - document.getElementsByName("client_type_financeur_id")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_type_pouvoir_public_id") && document.getElementsByName("client_type_pouvoir_public_id")[0]) { - document.getElementsByName("client_type_pouvoir_public_id")[0].disabled = true; - document.getElementsByName("client_type_pouvoir_public_id")[0].style.backgroundColor = "#ECEFF1"; - } - - - - if (document.getElementsByName("client_tva") && document.getElementsByName("client_tva")[0]) { - document.getElementsByName("client_tva")[0].disabled = true; - document.getElementsByName("client_tva")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_website") && document.getElementsByName("client_website")[0]) { - document.getElementsByName("client_website")[0].disabled = true; - document.getElementsByName("client_website")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_code_postal") && document.getElementsByName("client_code_postal")[0]) { - document.getElementsByName("client_code_postal")[0].disabled = true; - document.getElementsByName("client_code_postal")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_telephone") && document.getElementsByName("client_telephone")[0]) { - document.getElementsByName("client_telephone")[0].disabled = true; - document.getElementsByName("client_telephone")[0].style.backgroundColor = "#ECEFF1"; - } - - - - } - - function Enable_fields() { - if (document.getElementsByName("client_email")) { - document.getElementsByName("client_email")[0].disabled = false; - document.getElementsByName("client_email")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_nom")) { - document.getElementsByName("client_nom")[0].disabled = false; - document.getElementsByName("client_nom")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_raison_sociale")) { - document.getElementsByName("client_raison_sociale")[0].disabled = false; - document.getElementsByName("client_raison_sociale")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_adresse")) { - document.getElementsByName("client_adresse")[0].disabled = false; - document.getElementsByName("client_adresse")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_ville")) { - document.getElementsByName("client_ville")[0].disabled = false; - document.getElementsByName("client_ville")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_pays")) { - document.getElementsByName("client_pays")[0].disabled = false; - document.getElementsByName("client_pays")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_email")) { - document.getElementsByName("client_email")[0].disabled = false; - document.getElementsByName("client_email")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_siret")) { - document.getElementsByName("client_siret")[0].disabled = false; - document.getElementsByName("client_siret")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_type_id") && document.getElementsByName("client_type_id")[0]) { - document.getElementsByName("client_type_id")[0].disabled = false; - document.getElementsByName("client_type_id")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_groupe_id") && document.getElementsByName("client_groupe_id")[0]) { - document.getElementsByName("client_groupe_id")[0].disabled = false; - document.getElementsByName("client_groupe_id")[0].style.backgroundColor = "#FFFFFF"; - } - - - if (document.getElementsByName("client_type_financeur_id") && document.getElementsByName("client_type_financeur_id")[0]) { - document.getElementsByName("client_type_financeur_id")[0].disabled = false; - document.getElementsByName("client_type_financeur_id")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_type_pouvoir_public_id") && document.getElementsByName("client_type_pouvoir_public_id")[0]) { - document.getElementsByName("client_type_pouvoir_public_id")[0].disabled = false; - document.getElementsByName("client_type_pouvoir_public_id")[0].style.backgroundColor = "#FFFFFF"; - } - - - - if (document.getElementsByName("client_tva")) { - document.getElementsByName("client_tva")[0].disabled = false; - document.getElementsByName("client_tva")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_website")) { - document.getElementsByName("client_website")[0].disabled = false; - document.getElementsByName("client_website")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_code_postal")) { - document.getElementsByName("client_code_postal")[0].disabled = false; - document.getElementsByName("client_code_postal")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_telephone")) { - document.getElementsByName("client_telephone")[0].disabled = false; - document.getElementsByName("client_telephone")[0].style.backgroundColor = "#FFFFFF"; - } - - - } - - - async function Disable_contact_fields() { - - await sleep(5); - - if (document.getElementsByName("contact_email")) { - document.getElementsByName("contact_email")[0].disabled = true; - document.getElementsByName("contact_email")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("contact_nom")) { - document.getElementsByName("contact_nom")[0].disabled = true; - document.getElementsByName("contact_nom")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("contact_prenom")) { - document.getElementsByName("contact_prenom")[0].disabled = true; - document.getElementsByName("contact_prenom")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("contact_fonction")) { - document.getElementsByName("contact_fonction")[0].disabled = true; - document.getElementsByName("contact_fonction")[0].style.backgroundColor = "#ECEFF1"; - } - - - if (document.getElementsByName("contact_civilite")) { - document.getElementsByName("contact_civilite")[0].disabled = true; - document.getElementsByName("contact_civilite")[0].style.backgroundColor = "#ECEFF1"; - } - - - - if (document.getElementsByName("contact_siret")) { - document.getElementsByName("contact_siret")[0].disabled = true; - document.getElementsByName("contact_siret")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("contact_tva")) { - document.getElementsByName("contact_tva")[0].disabled = true; - document.getElementsByName("contact_tva")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("contact_adresse")) { - document.getElementsByName("contact_adresse")[0].disabled = true; - document.getElementsByName("contact_adresse")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("contact_ville")) { - document.getElementsByName("contact_ville")[0].disabled = true; - document.getElementsByName("contact_ville")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("contact_code_postal")) { - document.getElementsByName("contact_code_postal")[0].disabled = true; - document.getElementsByName("contact_code_postal")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("contact_pays")) { - document.getElementsByName("contact_pays")[0].disabled = true; - document.getElementsByName("contact_pays")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("contact_telephone")) { - document.getElementsByName("contact_telephone")[0].disabled = true; - document.getElementsByName("contact_telephone")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("contact_telephone_mobile")) { - document.getElementsByName("contact_telephone_mobile")[0].disabled = true; - document.getElementsByName("contact_telephone_mobile")[0].style.backgroundColor = "#ECEFF1"; - } - - } - - function Enable_contact_fields() { - if (document.getElementsByName("contact_email")) { - document.getElementsByName("contact_email")[0].disabled = false; - document.getElementsByName("contact_email")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_nom")) { - document.getElementsByName("contact_nom")[0].disabled = false; - document.getElementsByName("contact_nom")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_prenom")) { - document.getElementsByName("contact_prenom")[0].disabled = false; - document.getElementsByName("contact_prenom")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_civilite")) { - document.getElementsByName("contact_civilite")[0].disabled = false; - document.getElementsByName("contact_civilite")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_fonction")) { - document.getElementsByName("contact_fonction")[0].disabled = false; - document.getElementsByName("contact_fonction")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_siret")) { - document.getElementsByName("contact_siret")[0].disabled = false; - document.getElementsByName("contact_siret")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_tva")) { - document.getElementsByName("contact_tva")[0].disabled = false; - document.getElementsByName("contact_tva")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_adresse")) { - document.getElementsByName("contact_adresse")[0].disabled = false; - document.getElementsByName("contact_adresse")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_ville")) { - document.getElementsByName("contact_ville")[0].disabled = false; - document.getElementsByName("contact_ville")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_code_postal")) { - document.getElementsByName("contact_code_postal")[0].disabled = false; - document.getElementsByName("contact_code_postal")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_pays")) { - document.getElementsByName("contact_pays")[0].disabled = false; - document.getElementsByName("contact_pays")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_telephone")) { - document.getElementsByName("contact_telephone")[0].disabled = false; - document.getElementsByName("contact_telephone")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("contact_telephone_mobile")) { - document.getElementsByName("contact_telephone_mobile")[0].disabled = false; - document.getElementsByName("contact_telephone_mobile")[0].style.backgroundColor = "#FFFFFF"; - } - - } - - - - - const [Add_New_PartnerClient_api, setAdd_New_PartnerClient_api] = useState(""); - const [Add_New_PartnerClient_result, setAdd_New_PartnerClient_result] = useState(""); - const [Add_New_PartnerClient_message, setAdd_New_PartnerClient_message] = useState(""); - function Add_New_PartnerClient(event) { - - - var form = new FormData(); - - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - - // Recupeation des données à enregister - - var client_email = "" - if (document.getElementsByName("client_email")) { - client_email = String(document.getElementsByName("client_email")[0].value).trim(); - } - var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; - - - if (!client_email.match(validRegex)) { - // alert("L'adresse email est invalide."); - setdisplay_alert_mysy("1"); - setalert_message("L'adresse email est invalide."); - setalert_type("error"); - return; - } - - form.append("email", client_email); - - - var client_nom = "" - if (document.getElementsByName("client_nom")) { - client_nom = String(document.getElementsByName("client_nom")[0].value).trim(); - } - form.append("nom", client_nom); - if (String(client_nom).trim() === "") { - // alert("Le nom du client est invalide."); - setdisplay_alert_mysy("1"); - setalert_message("Le nom du client est invalide."); - setalert_type("error"); - return; - } - - - var client_raison_sociale = "" - if (document.getElementsByName("client_raison_sociale")) { - client_raison_sociale = document.getElementsByName("client_raison_sociale")[0].value; - } - form.append("raison_sociale", client_raison_sociale); - - form.append("is_company", p_client_is_company); - - var client_adresse = "" - if (document.getElementsByName("client_adresse")) { - client_adresse = document.getElementsByName("client_adresse")[0].value; - } - form.append("adr_adresse", client_adresse); - - var client_code_postal = "" - if (document.getElementsByName("client_code_postal")) { - client_code_postal = document.getElementsByName("client_code_postal")[0].value; - } - form.append("adr_code_postal", client_code_postal); - - var client_ville = "" - if (document.getElementsByName("client_ville")) { - client_ville = document.getElementsByName("client_ville")[0].value; - } - form.append("adr_ville", client_ville); - - var client_pays = "" - if (document.getElementsByName("client_pays")) { - client_pays = document.getElementsByName("client_pays")[0].value; - } - form.append("adr_pays", client_pays); - - - - var client_telephone = "" - if (document.getElementsByName("client_telephone")) { - client_telephone = document.getElementsByName("client_telephone")[0].value; - } - form.append("telephone", client_telephone); - - - var client_siret = "" - if (document.getElementsByName("client_siret")) { - client_siret = document.getElementsByName("client_siret")[0].value; - } - form.append("siret", client_siret); - - var client_tva = "" - if (document.getElementsByName("client_tva")) { - client_tva = document.getElementsByName("client_tva")[0].value; - } - form.append("tva", client_tva); - - var client_website = "" - if (document.getElementsByName("client_website")) { - client_website = document.getElementsByName("client_website")[0].value; - } - form.append("website", client_website); - - if (p_client_type_id) - form.append("client_type_id", p_client_type_id); - else - form.append("client_type_id", ""); - - if (p_client_goupe_client_id) - form.append("partner_groupe_client_id", p_client_goupe_client_id); - else - form.append("partner_groupe_client_id", ""); - - if (String(p_client_is_financeur) === "true") - form.append("is_financeur", "1"); - else - form.append("is_financeur", "0"); - - - if (String(p_client_is_fournisseur) === "true") - form.append("is_fournisseur", "1"); - else - form.append("is_fournisseur", "0"); - - - if (String(p_client_is_client) === "true") - form.append("is_client", "1"); - else - form.append("is_client", "0"); - - form.append("invoice_automatique", p_detail_facturation_automatique); - form.append("type_financeur_id", p_client_type_financeur); - - form.append("type_pouvoir_public_id", p_client_type_pouvoir_public); - - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Partner_Client/"; - - axios.post(myurl, form).then(res => { - if (String(res.data.status) === String("true")) { - //console.log(" In Add_New_PartnerClient res.data.status = " + res.data.status); - // console.log(" In Add_New_PartnerClient res.data.message = " + res.data.message); - - props.display_child_alert_success(res.data.message); - - setAdd_New_PartnerClient_api("true"); - setAdd_New_PartnerClient_result(res.data.message); - setformedit_mode("0"); - setdatamodification("0"); - Disable_fields(); - - props.Get_List_Partner_Clients(); - props.father_scroll_to_top(); - props.close_detail_client(); - - // alert(res.data.message); - - - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - return; - } - else { - - setAdd_New_PartnerClient_api("false"); - setAdd_New_PartnerClient_message(res.data.message); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); - - } - - - }).catch((error) => { - console.warn('Not good man :( Add_New_PartnerClient = ', error); - setAdd_New_PartnerClient_result("false"); - setAdd_New_PartnerClient_message(" Impossible de recuperer les informations du client") - alert(" Impossible de recuperer les informations du client"); - - }) - } - - function close_current_form() { - props.father_scroll_to_top(); - props.close_detail_client(); - } - - const [recordPartnerClient_api, setrecordPartnerClient_api] = useState(""); - const [recordPartnerClient_result, setrecordPartnerClient_result] = useState(""); - const [recordPartnerClient_message, setrecordPartnerClient_message] = useState(""); - function recordPartnerClient(event) { - - - var form = new FormData(); - - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - - form.append("_id", props.client_id); - - // Recupeation des données à enregister - - var client_email = "" - if (document.getElementsByName("client_email")) { - client_email = String(document.getElementsByName("client_email")[0].value).trim(); - } - var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; - if (!client_email.match(validRegex)) { - // alert("L'adresse email est invalide."); - setdisplay_alert_mysy("1"); - setalert_message("L'adresse email est invalide."); - setalert_type("error"); - return; - } - - form.append("email", client_email); - - - var client_nom = "" - if (document.getElementsByName("client_nom")) { - client_nom = document.getElementsByName("client_nom")[0].value; - } - if (String(client_nom).trim() === "") { - // alert("Le nom du client est invalide."); - setdisplay_alert_mysy("1"); - setalert_message("Le nom du client est invalide."); - setalert_type("error"); - return; - } - - form.append("nom", client_nom); - - var client_raison_sociale = "" - if (document.getElementsByName("client_raison_sociale")) { - client_raison_sociale = document.getElementsByName("client_raison_sociale")[0].value; - } - form.append("raison_sociale", client_raison_sociale); - - - form.append("is_company", p_client_is_company); - - - var client_adresse = "" - if (document.getElementsByName("client_adresse")) { - client_adresse = document.getElementsByName("client_adresse")[0].value; - } - form.append("adr_adresse", client_adresse); - - var client_code_postal = "" - if (document.getElementsByName("client_code_postal")) { - client_code_postal = document.getElementsByName("client_code_postal")[0].value; - } - form.append("adr_code_postal", client_code_postal); - - var client_ville = "" - if (document.getElementsByName("client_ville")) { - client_ville = document.getElementsByName("client_ville")[0].value; - } - form.append("adr_ville", client_ville); - - var client_pays = "" - if (document.getElementsByName("client_pays")) { - client_pays = document.getElementsByName("client_pays")[0].value; - } - form.append("adr_pays", client_pays); - - - - var client_telephone = "" - if (document.getElementsByName("client_telephone")) { - client_telephone = document.getElementsByName("client_telephone")[0].value; - } - form.append("telephone", client_telephone); - - - var client_siret = "" - if (document.getElementsByName("client_siret")) { - client_siret = document.getElementsByName("client_siret")[0].value; - } - form.append("siret", client_siret); - - - - - var client_tva = "" - if (document.getElementsByName("client_tva")) { - client_tva = document.getElementsByName("client_tva")[0].value; - } - form.append("tva", client_tva); - - var client_website = "" - if (document.getElementsByName("client_website")) { - client_website = document.getElementsByName("client_website")[0].value; - } - form.append("website", client_website); - - if (p_client_type_id) - form.append("client_type_id", p_client_type_id); - else - form.append("client_type_id", ""); - - if (p_client_goupe_client_id) - form.append("partner_groupe_client_id", p_client_goupe_client_id); - else - form.append("partner_groupe_client_id", ""); - - - if (String(p_client_is_financeur) === "true") - form.append("is_financeur", "1"); - else - form.append("is_financeur", "0"); - - - if (String(p_client_is_fournisseur) === "true") - form.append("is_fournisseur", "1"); - else - form.append("is_fournisseur", "0"); - - - if (String(p_client_is_client) === "true") - form.append("is_client", "1"); - else - form.append("is_client", "0"); - - - form.append("type_financeur_id", p_client_type_financeur); - - form.append("type_pouvoir_public_id", p_client_type_pouvoir_public); - - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Partner_Client/"; - - axios.post(myurl, form).then(res => { - if (String(res.data.status) === String("true")) { - //console.log(" In recordPartnerClient res.data.status = " + res.data.status); - //console.log(" In recordPartnerClient res.data.message = " + res.data.message); - props.Get_List_Partner_Clients(); - setrecordPartnerClient_api("true"); - setrecordPartnerClient_result(res.data.message); - setformedit_mode("0"); - setdatamodification("0"); - fillfield(); - Disable_fields(); - // alert(res.data.message); - - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("success"); - - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - return; - } - else { - - setrecordPartnerClient_api("false"); - setrecordPartnerClient_message(res.data.message); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); - - } - - - }).catch((error) => { - console.warn('Not good man :( recordPartnerClient = ', error); - setrecordPartnerClient_result("false"); - setrecordPartnerClient_message(" Impossible de recuperer les informations du client") - // alert(" Impossible de recuperer les informations du client"); - - setdisplay_alert_mysy("1"); - setalert_message("Impossible de recuperer les informations du client"); - setalert_type("error"); - - }) - } - - - // Fonction de mise à jour des données de facturation - const [recordPartnerClient_Invoice_Data_api, setrecordPartnerClient_Invoice_Data_api] = useState(""); - const [recordPartnerClient_Invoice_Data_result, setrecordPartnerClient_Invoice_Data_result] = useState(""); - const [recordPartnerClient_Invoice_Data_message, setrecordPartnerClient_Invoice_Data_message] = useState(""); - function recordPartnerClient_Invoice_Data(event) { - - - var form = new FormData(); - - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - - // Recupeation des données à enregister - form.append("email", p_client_email); - form.append("nom", p_client_nom); - - // Données de facturation - var client_invoice_email = p_client_invoice_email - - var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; - - if (String(client_invoice_email) === "" || !client_invoice_email.match(validRegex)) { - // alert("L'adresse email de facturation est invalide."); - setdisplay_alert_mysy("1"); - setalert_message("L'adresse email de facturation est invalide."); - setalert_type("error"); - return; - } - - - if (String(p_client_invoice_paiement_condition_id).trim() === "") { - // alert(" Vous devez choisir une condition de paiement"); - setdisplay_alert_mysy("1"); - setalert_message(" Vous devez choisir une condition de paiement"); - setalert_type("error"); - return; - } - - - form.append("invoice_email", client_invoice_email); - - var client_invoice_nom = p_client_invoice_nom; - - form.append("invoice_nom", client_invoice_nom); - - var client_invoice_siret = p_client_invoice_siret; - - - form.append("invoice_siret", client_invoice_siret); - - var client_invoice_tva = p_client_invoice_tva; - - - form.append("invoice_tva", client_invoice_tva); - - form.append("invoice_condition_paiement_id", p_client_invoice_paiement_condition_id); - - - - var client_invoice_adresse = p_client_invoice_adresse; - - - form.append("invoice_adresse", client_invoice_adresse); - - var client_invoice_ville = p_client_invoice_ville; - - form.append("invoice_ville", client_invoice_ville); - - var client_invoice_code_postal = p_client_invoice_code_postal; - - - form.append("invoice_code_postal", client_invoice_code_postal); - - - var client_invoice_pays = p_client_invoice_pays; - - - form.append("invoice_pays", client_invoice_pays); - - - - form.append("invoice_automatique", p_detail_facturation_automatique); - - form.append("_id", props.client_id); - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Partner_Client/"; - - axios.post(myurl, form).then(res => { - if (String(res.data.status) === String("true")) { - //console.log(" In recordPartnerClient_Invoice_Data res.data.status = " + res.data.status); - //console.log(" In recordPartnerClient_Invoice_Data res.data.message = " + res.data.message); - setrecordPartnerClient_Invoice_Data_api("true"); - setrecordPartnerClient_Invoice_Data_result(res.data.message); - setformedit_mode_invoice("0"); - setdatamodification_invoice("0"); - // alert(" Les données de facturation ont été mises à jour.") - Disable_invoice_fields(); - sethas_client_invoice_email(""); - // alert(res.data.message); - - - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("success"); - - - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - return; - } - else { - - setrecordPartnerClient_Invoice_Data_api("false"); - setrecordPartnerClient_Invoice_Data_message(res.data.message); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); - - } - - - }).catch((error) => { - console.warn('Not good man :( recordPartnerClient_Invoice_Data = ', error); - setrecordPartnerClient_Invoice_Data_result("false"); - setrecordPartnerClient_Invoice_Data_message(" Impossible de recuperer les informations du client") - // alert(" Impossible de recuperer les informations du client"); - setdisplay_alert_mysy("1"); - setalert_message(" Impossible de recuperer les informations du client"); - setalert_type("error"); - - }) - } - - function clear_invoice_fields() { - if (document.getElementsByName("client_invoice_email")) { - document.getElementsByName("client_invoice_email")[0].value = ""; - } - - if (document.getElementsByName("client_invoice_nom")) { - document.getElementsByName("client_invoice_nom")[0].value = ""; - } - - if (document.getElementsByName("client_invoice_siret")) { - document.getElementsByName("client_invoice_siret")[0].value = ""; - } - - if (document.getElementsByName("client_invoice_tva")) { - document.getElementsByName("client_invoice_tva")[0].value = ""; - } - - if (document.getElementsByName("client_invoice_adresse")) { - document.getElementsByName("client_invoice_adresse")[0].value = ""; - } - - - if (document.getElementsByName("client_invoice_paiement_condition")) { - document.getElementsByName("client_invoice_paiement_condition")[0].value = ""; - } - - - if (document.getElementsByName("client_invoice_ville")) { - document.getElementsByName("client_invoice_ville")[0].value = ""; - } - - if (document.getElementsByName("client_invoice_code_postal")) { - document.getElementsByName("client_invoice_code_postal")[0].value = ""; - } - - if (document.getElementsByName("client_invoice_pays")) { - document.getElementsByName("client_invoice_pays")[0].value = ""; - } - - } - - function Disable_invoice_fields() { - if (document.getElementsByName("client_invoice_email")) { - document.getElementsByName("client_invoice_email")[0].disabled = true; - document.getElementsByName("client_invoice_email")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_invoice_nom")) { - document.getElementsByName("client_invoice_nom")[0].disabled = true; - document.getElementsByName("client_invoice_nom")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_invoice_siret")) { - document.getElementsByName("client_invoice_siret")[0].disabled = true; - document.getElementsByName("client_invoice_siret")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_invoice_tva")) { - document.getElementsByName("client_invoice_tva")[0].disabled = true; - document.getElementsByName("client_invoice_tva")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_invoice_paiement_condition")) { - console.log(" client_invoice_paiement_condition") - // document.getElementsByName("client_invoice_paiement_condition")[0].disabled = true; - document.getElementsByName("client_invoice_paiement_condition")[0].style.backgroundColor = "#ECEFF1"; - console.log(" client_invoice_paiement_condition 022") - } - - if (document.getElementsByName("client_invoice_adresse")) { - document.getElementsByName("client_invoice_adresse")[0].disabled = true; - document.getElementsByName("client_invoice_adresse")[0].style.backgroundColor = "#ECEFF1"; - } - - - if (document.getElementsByName("client_invoice_ville")) { - document.getElementsByName("client_invoice_ville")[0].disabled = true; - document.getElementsByName("client_invoice_ville")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_invoice_code_postal")) { - document.getElementsByName("client_invoice_code_postal")[0].disabled = true; - document.getElementsByName("client_invoice_code_postal")[0].style.backgroundColor = "#ECEFF1"; - } - - if (document.getElementsByName("client_invoice_pays")) { - document.getElementsByName("client_invoice_pays")[0].disabled = true; - document.getElementsByName("client_invoice_pays")[0].style.backgroundColor = "#ECEFF1"; - //console.log("iiiiii"); - } - - if (document.getElementsByName("facturation_automatique")) { - document.getElementsByName("facturation_automatique")[0].disabled = true; - document.getElementsByName("facturation_automatique")[0].style.backgroundColor = "#ECEFF1"; - - } - - - } - - function Enable_invoice_fields() { - if (document.getElementsByName("client_invoice_email")) { - document.getElementsByName("client_invoice_email")[0].disabled = false; - document.getElementsByName("client_invoice_email")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_invoice_nom")) { - document.getElementsByName("client_invoice_nom")[0].disabled = false; - document.getElementsByName("client_invoice_nom")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_invoice_siret")) { - document.getElementsByName("client_invoice_siret")[0].disabled = false; - document.getElementsByName("client_invoice_siret")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_invoice_tva")) { - document.getElementsByName("client_invoice_tva")[0].disabled = false; - document.getElementsByName("client_invoice_tva")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_invoice_paiement_condition")) { - // document.getElementsByName("client_invoice_paiement_condition")[0].disabled = false; - document.getElementsByName("client_invoice_paiement_condition")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_invoice_adresse")) { - document.getElementsByName("client_invoice_adresse")[0].disabled = false; - document.getElementsByName("client_invoice_adresse")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_invoice_ville")) { - document.getElementsByName("client_invoice_ville")[0].disabled = false; - document.getElementsByName("client_invoice_ville")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_invoice_code_postal")) { - document.getElementsByName("client_invoice_code_postal")[0].disabled = false; - document.getElementsByName("client_invoice_code_postal")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("client_invoice_pays")) { - document.getElementsByName("client_invoice_pays")[0].disabled = false; - document.getElementsByName("client_invoice_pays")[0].style.backgroundColor = "#FFFFFF"; - } - - if (document.getElementsByName("facturation_automatique")) { - document.getElementsByName("facturation_automatique")[0].disabled = false; - document.getElementsByName("facturation_automatique")[0].style.backgroundColor = "#FFFFFF"; - } - } - - function close_detail_client() { - props.close_detail_client(); - } - - function retour_liste_contact() { - setaddcontact("0"); - setdatamodification_contact('0'); - } - - - function clean_contact_set_values() { - setp_contact_email(""); - setp_contact_nom(""); - setp_contact_prenom(""); - setcontact_siret(""); - setcontact_tva(""); - setcontact_adresse(""); - setcontact_ville(""); - setcontact_code_postal(""); - setcontact_pays(""); - - setcontact_telephone(""); - setp_contact_telephone_mobile(""); - - setp_contact_fonction(""); - setp_contact_civilite("neutre"); - - } - - function clear_contact_fields() { - if (document.getElementsByName("contact_email")) { - document.getElementsByName("contact_email")[0].value = ""; - } - - if (document.getElementsByName("contact_nom")) { - document.getElementsByName("contact_nom")[0].value = ""; - } - - if (document.getElementsByName("contact_prenom")) { - document.getElementsByName("contact_prenom")[0].value = ""; - } - - if (document.getElementsByName("contact_siret")) { - document.getElementsByName("contact_siret")[0].value = ""; - } - - if (document.getElementsByName("contact_tva")) { - document.getElementsByName("contact_tva")[0].value = ""; - } - - if (document.getElementsByName("contact_adresse")) { - document.getElementsByName("contact_adresse")[0].value = ""; - } - - if (document.getElementsByName("contact_ville")) { - document.getElementsByName("contact_ville")[0].value = ""; - } - - if (document.getElementsByName("contact_code_postal")) { - document.getElementsByName("contact_code_postal")[0].value = ""; - } - - if (document.getElementsByName("contact_pays")) { - document.getElementsByName("contact_pays")[0].value = ""; - } - - if (document.getElementsByName("contact_telephone")) { - document.getElementsByName("contact_telephone")[0].value = ""; - } - - if (document.getElementsByName("contact_telephone_mobile")) { - document.getElementsByName("contact_telephone_mobile")[0].value = ""; - } - - } - - // Fonction de mise à jour des données de facturation - const [recordPartnerClient_Contact_Data_api, setrecordPartnerClient_Contact_Data_api] = useState(""); - const [recordPartnerClient_Contact_Data_result, setrecordPartnerClient_Contact_Data_result] = useState(""); - const [recordPartnerClient_Contact_Data_message, setrecordPartnerClient_Contact_Data_message] = useState(""); - function recordPartnerClient_Contact_Data(event) { - - - var form = new FormData(); - - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - - // Recupeation des données à enregister - - var myurl = ""; - if (current_contact_recid && String(current_contact_recid).length > 3) { - // Il s'agit d'un mise à jour. on a une valeur dans le current_activite_recid - myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Contact/"; - form.append("_id", selected_contact_id); - - } else { - // Il s'agit d'un ajout d'une nouvelle activité. on a rien dans le current_activite_recid - myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Contact/"; - form.append("related_collection", "partner_client"); - form.append("related_collection_owner_id", props.client_id); - } - - - //console.log(" ### current_contact_recid = ", current_contact_recid, " myurl = ", myurl) - - // Données de contact du client du partner - var contact_email = "" - if (document.getElementsByName("contact_email")) { - contact_email = String(document.getElementsByName("contact_email")[0].value).trim(); - } - - // Pour activier la fontion de "include com", le contact foit avoir une adresse email - var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; - - if (!contact_email.match(validRegex)) { - // alert("L'adresse email est invalide. Pour créer un contact l'adresse email est obligatoire"); - setdisplay_alert_mysy("1"); - setalert_message("L'adresse email est invalide. Pour créer un contact l'adresse email est obligatoire"); - setalert_type("error"); - - return; - } - - form.append("email", contact_email); - - var contact_nom = "" - if (document.getElementsByName("contact_nom")) { - contact_nom = String(document.getElementsByName("contact_nom")[0].value).trim(); - } - form.append("nom", contact_nom); - if (contact_nom.length < 2) { - // alert("Le nom du contact est invalide "); - setdisplay_alert_mysy("1"); - setalert_message("Le nom du contact est invalide "); - setalert_type("error"); - - return; - } - - - var contact_prenom = "" - if (document.getElementsByName("contact_prenom")) { - contact_prenom = document.getElementsByName("contact_prenom")[0].value; - } - form.append("prenom", contact_prenom); - - - var contact_fonction = "" - if (document.getElementsByName("contact_fonction")) { - contact_fonction = document.getElementsByName("contact_fonction")[0].value; - } - form.append("fonction", contact_fonction); - - var contact_civilite = "neutre" - if (p_contact_civilite) { - contact_civilite = p_contact_civilite; - } - form.append("civilite", contact_civilite); - - - - var contact_siret = "" - if (document.getElementsByName("contact_siret")) { - contact_siret = document.getElementsByName("contact_siret")[0].value; - } - form.append("siret", contact_siret); - - var contact_tva = "" - if (document.getElementsByName("contact_tva")) { - contact_tva = document.getElementsByName("contact_tva")[0].value; - } - form.append("tva", contact_tva); - - var contact_adresse = "" - if (document.getElementsByName("contact_adresse")) { - contact_adresse = document.getElementsByName("contact_adresse")[0].value; - } - form.append("adr_adresse", contact_adresse); - - var contact_ville = "" - if (document.getElementsByName("contact_ville")) { - contact_ville = document.getElementsByName("contact_ville")[0].value; - } - form.append("adr_ville", contact_ville); - - - var contact_code_postal = "" - if (document.getElementsByName("contact_code_postal")) { - contact_code_postal = document.getElementsByName("contact_code_postal")[0].value; - } - form.append("adr_code_postal", contact_code_postal); - - - var contact_pays = "" - if (document.getElementsByName("contact_pays")) { - contact_pays = document.getElementsByName("contact_pays")[0].value; - } - form.append("adr_pays", contact_pays); - - var include_com = "0" - if (is_contact_include_com) { - include_com = "1"; - setclient_has_communication_contact(""); - } - form.append("include_com", include_com); - - - var contact_telephone = "" - if (document.getElementsByName("contact_telephone")) { - contact_telephone = document.getElementsByName("contact_telephone")[0].value; - } - form.append("telephone", contact_telephone); - - - var contact_telephone_mobile = "" - if (document.getElementsByName("contact_telephone_mobile")) { - contact_telephone_mobile = document.getElementsByName("contact_telephone_mobile")[0].value; - } - form.append("telephone_mobile", contact_telephone_mobile); - - - axios.post(myurl, form).then(res => { - if (String(res.data.status) === String("true")) { - //console.log(" In recordPartnerClient_Contact_Data res.data.status = " + res.data.status); - //console.log(" In recordPartnerClient_Contact_Data res.data.message = " + res.data.message); - setrecordPartnerClient_Contact_Data_api("true"); - setrecordPartnerClient_Contact_Data_result(res.data.message); - Get_List_Contact_Of_client_Part(); - - setaddcontact("0"); - setdatamodification_contact(""); - setis_contact_include_com(false) - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("success"); - - - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - return; - } - else { - - setrecordPartnerClient_Contact_Data_api("false"); - setrecordPartnerClient_Contact_Data_message(res.data.message); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); - - } - - - }).catch((error) => { - console.warn('Not good man :( recordPartnerClient_Contact_Data = ', error); - setrecordPartnerClient_Contact_Data_result("false"); - setrecordPartnerClient_Contact_Data_message(" Impossible d'enregistrer les doonées du contact") - // alert(" Impossible d'enregistrer les doonées du contact"); - setdisplay_alert_mysy("1"); - setalert_message(" Impossible d'enregistrer les doonées du contact"); - setalert_type("error"); - - - }) - } - - - const [Display_Part_Client_Contact_api, setDisplay_Part_Client_Contact_api] = useState(""); - const [Display_Part_Client_Contact_result, setDisplay_Part_Client_Contact_result] = useState(""); - const [Display_Part_Client_Contact_message, setDisplay_Part_Client_Contact_message] = useState(""); - function Display_Part_Client_Contact(event) { - - - var form = new FormData(); - - var contactmail = event.currentTarget.getAttribute('contactmail'); - - var contact_id = event.currentTarget.getAttribute('contact_id'); - - setelected_contact_id(contact_id); - - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - form.append("_id", contact_id); - - // Recupeation des données à enregister - form.append("related_collection", "partner_client"); - form.append("related_collection_owner_id", props.client_id); - - //console.log(" ### contactmail = ", contactmail); - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Contact/"; - - axios.post(myurl, form).then(res => { - if (String(res.data.status) === String("true")) { - //console.log(" In Display_Part_Client_Contact res.data.status = " + res.data.status); - //console.log(" In Display_Part_Client_Contact res.data.message = " + res.data.message); - setDisplay_Part_Client_Contact_api("true"); - setDisplay_Part_Client_Contact_result(res.data.message); - Get_List_Contact_Of_client_Part(); - - setaddcontact("1"); - var mylocalclient_contact = JSON.parse(res.data.message); - - - if (mylocalclient_contact) { - - // Remplissage des doonées du contact - if (mylocalclient_contact.nom) - setp_contact_nom(mylocalclient_contact.nom); - else - setp_contact_nom(""); - - if (mylocalclient_contact.email) - setp_contact_email(mylocalclient_contact.email); - else - setp_contact_email(""); - - if (mylocalclient_contact.prenom) - setp_contact_prenom(mylocalclient_contact.prenom); - else - setp_contact_prenom(""); - - - setis_contact_include_com(false); - if (mylocalclient_contact.include_com) { - - if (String(mylocalclient_contact.include_com) === "1") - setis_contact_include_com(true); - } - - - - if (mylocalclient_contact.siret) - setcontact_siret(mylocalclient_contact.siret); - else - setcontact_siret(""); - - - if (mylocalclient_contact.tva) - setcontact_tva(mylocalclient_contact.tva); - else - setcontact_tva(""); - - - if (mylocalclient_contact.adr_adresse) - setcontact_adresse(mylocalclient_contact.adr_adresse); - else - setcontact_adresse(""); - - if (mylocalclient_contact.adr_ville) - setcontact_ville(mylocalclient_contact.adr_ville); - else - setcontact_ville(""); - - if (mylocalclient_contact.adr_code_postal) - setcontact_code_postal(mylocalclient_contact.adr_code_postal); - else - setcontact_code_postal(""); - - if (mylocalclient_contact.adr_pays) - setcontact_pays(mylocalclient_contact.adr_pays); - else - setcontact_pays(""); - - if (mylocalclient_contact.telephone) - setcontact_telephone(mylocalclient_contact.telephone); - else - setcontact_telephone(""); - - if (mylocalclient_contact.telephone_mobile) - setp_contact_telephone_mobile(mylocalclient_contact.telephone_mobile); - else - setp_contact_telephone_mobile(""); - - - if (mylocalclient_contact.fonction) - setp_contact_fonction(mylocalclient_contact.fonction); - else - setp_contact_fonction(""); - - if (mylocalclient_contact.civilite) - setp_contact_civilite(mylocalclient_contact.civilite); - else - setp_contact_civilite("neutre"); - - - - - if (mylocalclient_contact.recid) - setcurrent_contact_recid(mylocalclient_contact.recid); - else - setcurrent_contact_recid(""); - - } - - - Disable_contact_fields(); - setformedit_mode_contact("0"); - - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - return; - } - else { - - setDisplay_Part_Client_Contact_api("false"); - setDisplay_Part_Client_Contact_message(res.data.message); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); - - } - - - }).catch((error) => { - console.warn('Not good man :( Display_Part_Client_Contact = ', error); - setDisplay_Part_Client_Contact_result("false"); - setDisplay_Part_Client_Contact_message(" Impossible de recuperer les detail du contact") - alert(" Impossible de recuperer les details du contact"); - - }) - } - - - const [Delete_Part_Client_Contact_api, setDelete_Part_Client_Contact_api] = useState(""); - const [Delete_Part_Client_Contact_result, setDelete_Part_Client_Contact_result] = useState(""); - const [Delete_Part_Client_Contact_message, setDelete_Part_Client_Contact_message] = useState(""); - function Delete_Part_Client_Contact(event) { - - - var form = new FormData(); - - var contactmail = event.currentTarget.getAttribute('contactmail'); - - var contact_id = event.currentTarget.getAttribute('contact_id'); - - setelected_contact_id(contact_id); - - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - form.append("_id", contact_id); - - form.append("related_collection", "partner_client"); - form.append("related_collection_owner_id", props.client_id); - - //console.log(" ### contactmail = ", contactmail); - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Given_Contact/"; - - axios.post(myurl, form).then(res => { - if (String(res.data.status) === String("true")) { - //console.log(" In Delete_Part_Client_Contact res.data.status = " + res.data.status); - //console.log(" In Delete_Part_Client_Contact res.data.message = " + res.data.message); - setDelete_Part_Client_Contact_api("true"); - setDelete_Part_Client_Contact_result(res.data.message); - Get_List_Contact_Of_client_Part(); - - - } - else if (String(res.data.status) === String("Err_Connexion")) { - alert('Erreur: ' + res.data.message); - history.push("/Connexion"); - return; - } - else { - - setDelete_Part_Client_Contact_api("false"); - setDelete_Part_Client_Contact_message(res.data.message); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); - - } - - - }).catch((error) => { - console.warn('Not good man :( Delete_Part_Client_Contact = ', error); - setDelete_Part_Client_Contact_result("false"); - setDelete_Part_Client_Contact_message(" Impossible de recuperer les detail du contact") - alert(" Impossible de supprimer le contact"); - - }) - } - const [is_contact_include_com, setis_contact_include_com] = useState(false); - - const New_civilite = [ - { "id": "mme", "label": "Mme", "value": "mme" }, - { "id": "m", "label": "M", "value": "m" }, - { "id": "neutre", "label": "Neutre", "value": "neutre" }, - { "id": "", "label": "", "value": "" }, - ] - - const New_Option_Facturation_Automatique = [ - { "id": "mois", "label": "Mensuelle", "value": "mois" }, - { "id": "0", "label": "Facturation Manuelle", "value": "0" }, - { "id": "", "label": "", "value": "" }, - ] - - const [p_detail_facturation_automatique, setp_detail_facturation_automatique] = useState(""); - - const [p_client_is_financeur, setp_client_is_financeur] = useState(false); - const [p_client_is_fournisseur, setp_client_is_fournisseur] = useState(false); - const [p_client_is_client, setp_client_is_client] = useState(true); - - const [isLoading, setLoading] = useState(); - - // -- Gestion pièces jointes - - const [Download_one_attached_document_api, setDownload_one_attached_document_api] = useState(); - const [Download_one_attached_document_result, setDownload_one_attached_document_result] = useState(); - const [Download_one_attached_document_message, setDownload_one_attached_document_message] = useState(); - const Download_one_attached_document = (event) => { - const stored_cookie = getCookie('tokenmysypart'); - - - var nom_fiche_detaillee = "Fiche_Detaillee.pdf"; - var token = stored_cookie; - var file_name = event.target.id; - - - var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Stored_Downloaded_File/" + token + "/" + file_name; - setLoading(true); - - axios.get(url, { responseType: 'blob', },) - .then((res) => { - setLoading(false); - fileDownload(res.data, nom_fiche_detaillee); - setDownload_one_attached_document_api("true"); - }).catch((error) => { - setLoading(false); - console.error('Error:', error); - setDownload_one_attached_document_api("false"); - - }); - } - - - const editorRef_competence = useRef(null); - const [editorRef_competence_limite, seteditorRef_competence_limite] = useState(800); - - - const [file_1_name, setfile_1_name] = useState(); - - const [sessions_file_change_1_api, setsessions_file_change_1_api] = useState(); - const [sessions_file_change_1_result, setsessions_file_change_1_result] = useState(); - const [sessions_file_change_1_message, setsessions_file_change_1_message] = useState(); - const sessions_file_change_1 = event => { - - const fileUploaded = event.target.files[0]; - let file_size = event.target.files[0].size; - let file_type = event.target.files[0].type; - - - if (file_size > 10000000) { - // alert("Le fichier ne doit pas depasser un 1 Méga octets"); - setdisplay_alert_mysy("1"); - setalert_message("Le fichier ne doit pas depasser un 1 Méga octets"); - setalert_type("error"); - - // console.log("Le fichier ne doit pas depasser un 1 Méga octets"); - return; - } - - setfile_1_name(event.target.files[0]); - const formData = new FormData(); - formData.append('File', fileUploaded); - //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); - const stored_cookie = getCookie('tokenmysypart'); - - //formData.append("token", stored_cookie); - //formData.append("class_internal_url", internal_url); - //console.log("token = " + stored_cookie); - - return; - - }; - - - const [file_2_name, setfile_2_name] = useState(); - - const [sessions_file_change_2_api, setsessions_file_change_2_api] = useState(); - const [sessions_file_change_2_result, setsessions_file_change_2_result] = useState(); - const [sessions_file_change_2_message, setsessions_file_change_2_message] = useState(); - const sessions_file_change_2 = event => { - - const fileUploaded = event.target.files[0]; - let file_size = event.target.files[0].size; - let file_type = event.target.files[0].type; - - - - if (file_size > 10000000) { - // alert("Le fichier ne doit pas depasser un 1 Méga octets"); - setdisplay_alert_mysy("1"); - setalert_message("Le fichier ne doit pas depasser un 1 Méga octets"); - setalert_type("error"); - - // console.log("Le fichier ne doit pas depasser un 1 Méga octets"); - return; - } - - setfile_2_name(event.target.files[0]); - const formData = new FormData(); - formData.append('File', fileUploaded); - //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); - const stored_cookie = getCookie('tokenmysypart'); - - //formData.append("token", stored_cookie); - //formData.append("class_internal_url", internal_url); - //console.log("token = " + stored_cookie); - - return; - - fetch( - process.env.REACT_APP_API_URL + "myclass/api/Add_Update_SessionFormation_mass/", - { - method: 'POST', - body: formData, - } - ) - .then((response) => response.json()) - .then((result) => { - - //console.log(" ## result['status'] = ", result['status']) - if (String(result['status']) === String("true")) { - //console.log('Success:', result['message']); - setsessions_file_change_2_result(result['message']); - setsessions_file_change_2_api("true"); - //GetCurrentClass_trainingsession(); - - } - else { - setsessions_file_change_2_message(result['message']); - setsessions_file_change_2_api("false"); - } - - }) - .catch((error) => { - console.error('Error:', error); - setsessions_file_change_2_api("false"); - }); - }; - - const [Record_All_PJ_api, setRecord_All_PJ_api] = useState(); - const [Record_All_PJ_result, setRecord_All_PJ_result] = useState(); - const [Record_All_PJ_message, setRecord_All_PJ_message] = useState(); - function Record_All_PJ() { - - if (!p_detail_one_file_to_download_type_name) { - // alert(" Vous devez donner un nom à la pièce jointe"); - setdisplay_alert_mysy("1"); - setalert_message(" Vous devez donner un nom à la pièce jointe"); - setalert_type("error"); - - return; - } - - if (file_1_name && file_1_name.name) { - - - const formData = new FormData(); - formData.append('File', file_1_name); - //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); - 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_name", file_1_name.name); - formData.append("status", "0"); - formData.append("object_owner_collection", "partner_client"); - formData.append("object_owner_id", props.client_id); - formData.append("type_document", ""); - - //formData.append("class_internal_url", internal_url); - //console.log("token = " + stored_cookie); - - - fetch( - process.env.REACT_APP_API_URL + "myclass/api/Store_User_Downloaded_File/", - { - method: 'POST', - body: formData, - } - ) - .then((response) => response.json()) - .then((result) => { - - //console.log(" ## result['status'] = ", result['status']) - if (String(result['status']) === String("true")) { - //console.log('Success:', result['message']); - setRecord_All_PJ_result(result['message']); - setRecord_All_PJ_api("true"); - - Get_List_Of_All_PJ(props.client_id); - setfile_1_name(); - setp_detail_one_file_to_download_type_name(); - //GetCurrentClass_trainingsession(); - // alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée") - var txt = "La pièce jointe " + file_1_name.name + " a été bien enregistrée"; - setdisplay_alert_mysy("1"); - setalert_message(txt); - setalert_type("success"); - - } - else { - setRecord_All_PJ_message(result['message']); - setRecord_All_PJ_api("false"); - } - - }) - .catch((error) => { - console.error(' Record_All_PJ Error:', error); - setRecord_All_PJ_api("false"); - }); - - } - - if (file_2_name && file_2_name.name) { - console.log(" ### Traitement de : ", file_2_name.name); - } - - } - - - const [Delete_one_attached_document_api, setDelete_one_attached_document_api] = useState(); - const [Delete_one_attached_document_result, setDelete_one_attached_document_result] = useState(); - const [Delete_one_attached_document_message, setDelete_one_attached_document_message] = useState(); - const Delete_one_attached_document = (event) => { - const stored_cookie = getCookie('tokenmysypart'); - - var formData = new FormData(); - var nom_fiche_detaillee = "Fiche_Detaillee.pdf"; - var file_name = event.target.id; - - - formData.append("token", stored_cookie); - formData.append("file_name", file_name); - - var url = process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/"; - - - fetch( - process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/", - { - method: 'POST', - body: formData, - } - ) - .then((response) => response.json()) - .then((result) => { - - //console.log(" ## result['status'] = ", result['status']) - if (String(result['status']) === String("true")) { - //console.log('Success:', result['message']); - setDelete_one_attached_document_result(result['message']); - setDelete_one_attached_document_api("true"); - Get_List_Of_All_PJ(props.client_id); - // alert(result['message']) - - setdisplay_alert_mysy("1"); - setalert_message(result['message']); - setalert_type("success"); - - } - else { - setDelete_one_attached_document_message(result['message']); - setDelete_one_attached_document_api("false"); - } - - }) - .catch((error) => { - console.error(' Record_All_PJ Error:', error); - setDelete_one_attached_document_api("false"); - alert(" Impossible de supprimer le document") - - }); - - - } - - 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(local_employee_id) { - - const formData = new FormData(); - - //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); - const stored_cookie = getCookie('tokenmysypart'); - - formData.append("token", stored_cookie); - formData.append("object_owner_collection", "partner_client"); - formData.append("object_owner_id", local_employee_id); - - - //formData.append("class_internal_url", internal_url); - //console.log("token = " + stored_cookie); - - - fetch( - process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files/", - { - method: 'POST', - body: formData, - } - ) - .then((response) => response.json()) - .then((result) => { - - //console.log(" ## result['status'] = ", result['status']) - if (String(result['status']) === String("true")) { - //console.log('Message :', result['message']); - setGet_List_Of_All_PJ_result(result['message']); - setGet_List_Of_All_PJ_api("true"); - - } - else { - setGet_List_Of_All_PJ_message(result['message']); - setGet_List_Of_All_PJ_api("false"); - } - - }) - .catch((error) => { - console.error(' Get_List_Of_All_PJ Error:', error); - setGet_List_Of_All_PJ_api("false"); - }); - - } - - - - function Delete_file_1_name() { - setfile_1_name(); - } - - function Delete_file_2_name() { - setfile_2_name(); - } - - const [p_detail_one_file_to_download_type_name, setp_detail_one_file_to_download_type_name] = useState(); - - // -- end gestion pièces jointes - - const [New_Get_List_Type_Financeur_result, setNew_Get_List_Type_Financeur_result] = useState([]); - - const [Get_List_Type_Financeur_api, setGet_List_Type_Financeur_api] = useState(); - const [Get_List_Type_Financeur_message, setGet_List_Type_Financeur_message] = useState(); - const [Get_List_Type_Financeur_result, setGet_List_Type_Financeur_result] = useState(); - function Get_List_Type_Financeur() { - - 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_List_Type_Organisme_Financement/"; - - axios.post(myurl, form).then(res => { - - if (String(res.data.status) === "true") { - //console.log(" In Get_List_Type_Financeur res.data.status = " + res.data.status); - //console.log(" In Get_List_Type_Financeur res.data.message r_class = " + res.data.message); - setGet_List_Type_Financeur_api("true"); - setGet_List_Type_Financeur_result(res.data.message); - - var new_data2 = []; - const new_data = res.data.message.map((x) => { - - //--- - - var _id = JSON.parse(x)._id; - var code = JSON.parse(x).code; - var description = JSON.parse(x).description; - - - //--- - var node = { - "_id": _id, - "code": code, - "description": description, - "label": code, - }; - //console.log(" --- node = ", node); - new_data2.push(node); - }); - - var node = { - "_id": "", - "code": "", - "description": "", - "label": "", - }; - //console.log(" --- node = ", node); - new_data2.push(node); - if (new_data2.length > 0) - setNew_Get_List_Type_Financeur_result(new_data2); - } - else { - setGet_List_Type_Financeur_api("false"); - setGet_List_Type_Financeur_message(res.data.message); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); - } - - }).catch((error) => { - console.warn('Not good man :( Get_List_Type_Financeur = ', error); - setGet_List_Type_Financeur_api("false"); - alert(" Impossible de recuperer Get_List_Type_Financeur"); - //setmyApimyApiMessage("") - }) - } - - - const [New_Get_List_Type_Pouvoir_Public_result, setNew_Get_List_Type_Pouvoir_Public_result] = useState([]); - - const [Get_List_Type_Pouvoir_Public_api, setGet_List_Type_Pouvoir_Public_api] = useState(); - const [Get_List_Type_Pouvoir_Public_message, setGet_List_Type_Pouvoir_Public_message] = useState(); - const [Get_List_Type_Pouvoir_Public_result, setGet_List_Type_Pouvoir_Public_result] = useState(); - function Get_List_Type_Pouvoir_Public() { - - 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_List_Type_Pouvoir_Public/"; - - axios.post(myurl, form).then(res => { - - if (String(res.data.status) === "true") { - //console.log(" In Get_List_Type_Pouvoir_Public res.data.status = " + res.data.status); - //console.log(" In Get_List_Type_Pouvoir_Public res.data.message r_class = " + res.data.message); - setGet_List_Type_Pouvoir_Public_api("true"); - setGet_List_Type_Pouvoir_Public_result(res.data.message); - - var new_data2 = []; - const new_data = res.data.message.map((x) => { - - //--- - - var _id = JSON.parse(x)._id; - var code = JSON.parse(x).code; - var description = JSON.parse(x).description; - - - //--- - var node = { - "_id": _id, - "code": code, - "description": description, - "label": code + " - " + description, - }; - //console.log(" --- node = ", node); - new_data2.push(node); - }); - - var node = { - "_id": "", - "code": "", - "description": "", - "label": "", - }; - //console.log(" --- node = ", node); - new_data2.push(node); - if (new_data2.length > 0) - setNew_Get_List_Type_Pouvoir_Public_result(new_data2); - } - else { - setGet_List_Type_Pouvoir_Public_api("false"); - setGet_List_Type_Pouvoir_Public_message(res.data.message); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("error"); - } - - }).catch((error) => { - console.warn('Not good man :( Get_List_Type_Pouvoir_Public = ', error); - setGet_List_Type_Pouvoir_Public_api("false"); - alert(" Impossible de recuperer Get_List_Type_Pouvoir_Public"); - //setmyApimyApiMessage("") - }) - } - - const [Dialog_mysy_intranet_account_open, setDialog_mysy_intranet_account_open] = React.useState(false); - const Dialog_mysy_intranet_account_handleClose = () => { - setp_new_pwd(""); - setp_conf_new_login(""); - setDialog_mysy_intranet_account_open(false) - }; - - const [p_new_login, setp_new_login] = React.useState(""); - const [p_new_pwd, setp_new_pwd] = React.useState(""); - const [p_conf_new_login, setp_conf_new_login] = React.useState(""); - - const [p_detail_user_login_locked, setp_detail_user_login_locked] = useState(""); - - const [p_detail_user_login, setp_detail_user_login] = useState(""); - - function Generate_Pwd() { - var randomstring = Math.random().toString(36).slice(-8); - setp_new_pwd(randomstring); - setp_conf_new_login(randomstring); - } - - const [currentpawdvisible, setcurrentpawdvisible] = useState(false); - - - const handleClickShowPassword = () => { - if (currentpawdvisible == false) { - document.getElementsByName("new_pwd011")[0].type = "text"; - document.getElementsByName("conf_new_login011")[0].type = "text"; - setcurrentpawdvisible(true); - } - else if (currentpawdvisible == true) { - document.getElementsByName("new_pwd011")[0].type = "password"; - document.getElementsByName("conf_new_login011")[0].type = "password"; - setcurrentpawdvisible(false); - } - }; - - const [Add_Update_Client_Intranet_Login_Pass_Data_api, setAdd_Update_Client_Intranet_Login_Pass_Data_api] = useState(); - const [Add_Update_Client_Intranet_Login_Pass_Data_message, setAdd_Update_Client_Intranet_Login_Pass_Data_message] = useState(); - const [Add_Update_Client_Intranet_Login_Pass_Data_result, setAdd_Update_Client_Intranet_Login_Pass_Data_result] = useState(); - function Add_Update_Client_Intranet_Login_Pass_Data() { - var form = new FormData(); - //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); - - // Controle sur les champs - - - if (p_new_pwd.trim() == "") { - // alert(" Vous devez saisir un mot de passe"); - setdisplay_alert_mysy("1"); - setalert_message(" Vous devez saisir un mot de passe"); - setalert_type("error"); - - return; - } - - - if (p_conf_new_login.trim() == "") { - // alert(" Vous devez confirmer le mot de passe"); - setdisplay_alert_mysy("1"); - setalert_message(" Vous devez confirmer le mot de passe"); - setalert_type("error"); - - return; - } - - - /*var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; - if (!p_new_login.match(validRegex)) { - alert("L'adresse email est invalide."); - return; - }*/ - - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - form.append("partner_client_id", props.client_id); - form.append("default_pwd", p_new_pwd); - // form.append("ressource_humaine_id", selected_id); - - - - //console.log(" form == ", form); - - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Create_Partner_Client_Intranet_Account/"; - - if (p_client_intranet_account_id && String(p_client_intranet_account_id).length > 3) { - // Il s'agit d'une mise à jour de mot de passe - myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Pwd_Partner_Client_Intranet_Account/"; - // console.log(" ### mise à jour INTRANET "); - - } - - setLoading(true); - axios.post(myurl, form).then(res => { - setLoading(false); - //console.log(" In Add_Update_Client_Intranet_Login_Pass_Data res.data.status = " + res.data.status); - //console.log(" In Add_Update_Client_Intranet_Login_Pass_Data res.data.message r_class = " + res.data.message); - - if (String(res.data.status) === String("true")) { - setAdd_Update_Client_Intranet_Login_Pass_Data_api("true"); - setAdd_Update_Client_Intranet_Login_Pass_Data_result(res.data.message); - - //setp_detail_user_login(p_new_login); - - Dialog_mysy_intranet_account_handleClose(); - // alert(res.data.message); - setdisplay_alert_mysy("1"); - setalert_message(res.data.message); - setalert_type("success"); - - setp_new_login(''); - setp_new_pwd(''); - setp_conf_new_login(''); - - } - else { - setAdd_Update_Client_Intranet_Login_Pass_Data_api("false"); - setAdd_Update_Client_Intranet_Login_Pass_Data_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('UpdateStagiaireData : Not good man :( Add_Update_Client_Intranet_Login_Pass_Data = ' + error); - setAdd_Update_Client_Intranet_Login_Pass_Data_api("false"); - alert(" Impossible de créer ou mettre à jour le compte intranet "); - - }) - } - - const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); - const [alert_message, setalert_message] = useState(""); - const [alert_type, setalert_type] = useState(""); - - function clear_alert_message() { - setalert_message(""); - } - function clear_alert_type() { - setalert_type(""); - } - function clear_display_alert_mysy() { - setdisplay_alert_mysy(""); - } - - - return ( -
- - {/*** Affichage des messages d'alerte*/} - - {display_alert_mysy && String(display_alert_mysy) === "1" && - - } - - - {/*** FIN Affichage des messages d'alerte*/} - - {/*** GESTION Compte Intranet */} - 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" - - > - Gestion compte intranet - - - -
Login - -
- - -
Mot de passe - { - setp_new_pwd(e.target.value); - - } - } - inputProps={{ - autocomplete: 'new-password', - form: { - autocomplete: 'off', - }, - }} - - /> - - -
-
Confirmer Mot de passe - { - setp_conf_new_login(e.target.value); - - } - } - inputProps={{ - autocomplete: 'new-password', - form: { - autocomplete: 'off', - }, - }} - /> - -
- -
- - - - - - - -
-
-   -
- - -
- - -
- - -
- {/*** FIN GESTION Compte Intranet */} - - - {String(props.new_customer) === "1" &&
-
- -
- -
-  

- -
- -
Raison sociale
- setclient_raison_sociale(e.target.value)} - /> -
-
Nom
- setclient_nom(e.target.value)} - - /> -
- -
Type client
- - { - if (value && value._id) { - setp_client_type_id(value._id); - - } else { - setp_client_type_id(""); - } - }} - //value={p_one_detail_client_rattachement_nom} - - renderInput={(params) => - } - /> - - -
- -
Groupe client
- { - if (value && value._id) { - setp_client_goupe_client_id(value._id); - - } else { - setp_client_goupe_client_id(""); - } - }} - //value={p_one_detail_client_rattachement_nom} - - renderInput={(params) => - } - /> - - -
- - - - {p_client_is_financeur === true &&
Type Financeur
- - { - if (value && value._id) { - setp_client_type_financeur(value._id); - - } else { - - setp_client_type_financeur(""); - - } - }} - //value={p_one_detail_client_rattachement_nom} - - renderInput={(params) => - } - /> - - -
} - - {p_client_is_company && String(p_client_is_company) === "2" &&
Type P. Public
- - { - if (value && value._id) { - setp_client_type_pouvoir_public(value._id); - - } else { - - setp_client_type_pouvoir_public(""); - - } - }} - //value={p_one_detail_client_rattachement_nom} - - renderInput={(params) => - } - /> - - -
} - - -
N° Siret
- setclient_siret(e.target.value)} - /> -
- -
N° TVA
- setclient_tva(e.target.value)} - /> -
- -
- Email
- setclient_email(e.target.value)} - - /> -
-
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)} - /> -
- -
Téléphone
- setclient_telephone(e.target.value)} - /> -
- -
Site web
- setclient_website(e.target.value)} - /> -
- - -
-   -
-
- - - - - - -
- -
- - - - - - - - -
- - -
- - - - - - -
- - -
-   -
-
-
- Enregistrer   - - } - modal - nested - position="center center" - > - {close => ( -
- -
MySy Information
-
- {' '} - - Confirmez la création du nouveau partenaire
- -
-
-
- - -
-
- -
-
-
- )} -
- - -
-
- -
-
-
- } - - {String(props.new_customer) !== "1" &&
-
- - - - - {} - - - - - - - -
- - - {String(submenu).trim() === "submenu_donnee_client" &&
- {p_detail_archive && String(p_detail_archive) === "1" && -
Document Archivé
} - -
-  
- - - - - -
- - - - -
-
- -
- -
Raison sociale
- setclient_raison_sociale(e.target.value)} - /> -
- - -
Nom
- setclient_nom(e.target.value)} - - /> -
- - - - {String(formedit_mode) !== "1" &&
Type client
- -
} - - - {String(formedit_mode) !== "1" &&
Groupe client
- -
} - - - {String(formedit_mode) !== "1" && p_client_is_financeur === true && - New_Get_List_Type_Financeur_result && New_Get_List_Type_Financeur_result.length > 1 &&
Type Financeur
- (data)._id === String(p_client_type_financeur))[0].label} - /> -
} - - {String(formedit_mode) !== "1" && p_client_is_company && String(p_client_is_company) === "2" && - New_Get_List_Type_Pouvoir_Public_result && New_Get_List_Type_Pouvoir_Public_result.length > 1 &&
Type P. Public
- - (data)._id === String(p_client_type_pouvoir_public))[0].code} - /> -
} - - - {New_Get_List_Client_Type_result && New_Get_List_Client_Type_result.length > 1 && - String(formedit_mode) === "1" &&
Type client
- (data)._id === String(p_client_type_id))[0].label} - - onChange={(event, value) => { - if (value && value._id) { - setp_client_type_id(value._id); - DataUpdated(); - } else { - setp_client_type_id(""); - DataUpdated(); - } - }} - - - renderInput={(params) => - } - /> - -
} - - {New_Get_List_Client_Groupe_result && New_Get_List_Client_Groupe_result.length > 0 && - String(formedit_mode) === "1" &&
Groupe client
- (data)._id === String(p_client_goupe_client_id))[0].label} - - onChange={(event, value) => { - if (value && value._id) { - setp_client_goupe_client_id(value._id); - setp_client_goupe_client_id_label(New_Get_List_Client_Groupe_result.filter((data) => (data)._id === String(p_client_goupe_client_id))[0].label) - DataUpdated(); - - } else { - setp_client_goupe_client_id(""); - DataUpdated(); - setp_client_goupe_client_id_label(""); - } - }} - - - renderInput={(params) => - } - /> - -
} - - - {p_client_is_financeur === true && New_Get_List_Type_Financeur_result && New_Get_List_Type_Financeur_result.length > 1 && - String(formedit_mode) === "1" &&
Type Financeur
- (data)._id === String(p_client_type_financeur))[0].label} - - onChange={(event, value) => { - if (value && value._id) { - setp_client_type_financeur(value._id); - - DataUpdated(); - - } - }} - - - renderInput={(params) => - } - /> - -
} - - {p_client_is_company && String(p_client_is_company) === "2" && New_Get_List_Type_Pouvoir_Public_result && New_Get_List_Type_Pouvoir_Public_result.length > 1 && - String(formedit_mode) === "1" &&
Type P. Public
- (data)._id === String(p_client_type_pouvoir_public))[0].label} - - onChange={(event, value) => { - if (value && value._id) { - setp_client_type_pouvoir_public(value._id); - - DataUpdated(); - - } - }} - - - renderInput={(params) => - } - /> - -
} - - -
N° Siret
- setclient_siret(e.target.value)} - /> -
- -
N° TVA
- setclient_tva(e.target.value)} - /> -
- -
Email
- setclient_email(e.target.value)} - - /> -
- -
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)} - /> -
- -
Telephone
- setclient_telephone(e.target.value)} - /> -
- -
Site web
- setclient_website(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 &&
- -
- -
- - - -
} - - {/*Get_List_Of_All_PJ_result &&
-
- Liste des pièces jointes
-
- {Get_List_Of_All_PJ_result && Get_List_Of_All_PJ_result.map((val) => ( -
- - - {String(props.check_user_acces_right("client", "write")) === "1" && Supprimer - - - } - modal - nested - position="center center" - > - {close => ( -
- -
MySy Information
-
- {' '} - - En confirmant cette opération, la pièce jointe sera définitivement supprimée.
- - -
-
-
- - -
-
- -
-
-
- )} -
} - -
- ))} -
-
-
*/} -
- -
- -
- - -
} - - -
-   Fermer -
-
} - - -
- ); -} - -export default AddPartnerClient_ARG; - - -const local_css = ` -:root { - --bg: #f6f8fb; - --card: #ffffff; - --text: #0f172a; - --muted: #64748b; - --border: #e5e7eb; - --shadow: 0 10px 25px rgba(2, 6, 23, .06); - --green-700: #0f6b53; - --green-600: #167a5e; - --green-100: #e9f7f1; - --blue-600: #2563eb; - --radius: 14px; - --radius-sm: 10px; -} - .Grid_2_col{ - margin-top: 12px; - display:grid; - grid-template-columns: 1.2fr 1fr; - gap: 14px; - padding:5px; -} - - .Grid_1_col{ - margin-top: 12px; - display:grid; - grid-template-columns: 1fr; - gap: 14px; - padding:5px; -} - -.Grid_2_col_sub_colone { - background: #fff; - border: 1px solid #e5e7eb; - border-radius: 14px; - box-shadow: 0 6px 18px rgba(2,6,23,.04); - padding: 0px; - display: flex; - flex-direction: column; - gap: 14px; -} - - -.Grid_2_col_sub_colone_header { - background: #dbeafe; - border-top-right-radius: 10px; - border-top-left-radius: 10px; - text-align: center; - font-family: DM Sans; - font-weight: 700; - height: 2rem; - padding-top: 5px; - font-size: 15px; -} - -.Grid_2_col_sub_colone_bottom_menu{ - -} - -.card__header{ -background: #e2e8f0; - font-size: small; - text-align: center; -} - -.card__title{ - display:flex; - align-items:center; - gap: 10px; -} - -.card__icon{ - width: 34px; - height: 34px; - display:grid; - place-items:center; - border-radius: 12px; - background:#eff6ff; - border:1px solid #dbeafe; -} - -.card__header h2{ - margin:0; - font-size: 15px; - letter-spacing: -0.01em; -} - -.card__actions{ display:flex; align-items:center; gap:8px; } - -.block_detail_action{ -width: 100%; - float: left; - background: #fafafa; - padding: 10px; - border: unset; - border-radius: 10px; - } -`; diff --git a/src/components/DisplayPartnerPromotion.js b/src/components/DisplayPartnerPromotion.js index 1f21c23..5fdbf76 100644 --- a/src/components/DisplayPartnerPromotion.js +++ b/src/components/DisplayPartnerPromotion.js @@ -818,7 +818,11 @@ const DisplayPartnerPromotion = (props) => { ); }, }, - { field: 'amount', headerName: 'Montant Formation', minWidth: 100, flex: 1, maxWidth: 150, type: 'number', flex: 1, editable: true, renderCell: (params) => , }, + { field: 'amount', headerName: 'Prix', minWidth: 100, flex: 1, maxWidth: 150, type: 'number', flex: 1, editable: true, + align:'right', + renderCell: (params) => , + + }, { field: "update", headerName: 'Mise à jour', renderCell: (cellValues) => { @@ -25408,7 +25412,14 @@ const DisplayPartnerPromotion = (props) => { setp_one_detail_client_rattachement_id(value._id); setp_one_detail_client_rattachement_nom(value.nom); Dialog_1_handle_change_participant_session(" Attention, vous allez modifier le client de rattachement du participant. Pensez à mettre à jour le client à facturer s'il est différent du client principal"); - setp_one_detail_facture_client_rattachement_id(value._id); + + + if (value.client_facturation_id && value.client_facturation_id !== "") { + setp_one_detail_facture_client_rattachement_id(value.client_facturation_id); + } else { + setp_one_detail_facture_client_rattachement_id(value._id); + } + } else { setp_one_detail_client_rattachement_id(""); @@ -26512,7 +26523,12 @@ const DisplayPartnerPromotion = (props) => { setp_one_detail_client_rattachement_id(value._id); setp_one_detail_client_rattachement_nom(value.nom); Dialog_1_handle_change_participant_session(" Attention, vous allez modifier le client de rattachement du participant. Pensez à mettre à jour le client à facturer s'il est différent du client principal"); - setp_one_detail_facture_client_rattachement_id(value._id); + + if (value.client_facturation_id && value.client_facturation_id !== "") { + setp_one_detail_facture_client_rattachement_id(value.client_facturation_id); + } else { + setp_one_detail_facture_client_rattachement_id(value._id); + } } else { setp_one_detail_client_rattachement_id(""); @@ -27389,7 +27405,13 @@ const DisplayPartnerPromotion = (props) => { Dialog_1_handle_change_participant_session(" Attention, vous allez modifier le client de rattachement du participant. Pensez à mettre à jour le client à facturer s'il est différent du client principal"); if (value._id !== p_detail_client_rattachement_id) { - setp_detail_facture_client_rattachement_id(value._id); + + if (value.client_facturation_id && value.client_facturation_id !== "") { + setp_detail_facture_client_rattachement_id(value.client_facturation_id); + } else { + setp_detail_facture_client_rattachement_id(value._id); + } + } } else { diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 6ee9e86..0423171 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -289,55 +289,55 @@ const DisplayPartnerSession = (props) => { ); } - function local_format_monetaire(local_amount) { + function local_format_monetaire(local_amount) { + return new Intl.NumberFormat('fr-FR', { + style: 'currency', + currency: 'EUR', + }).format(Number(local_amount)); + } + + function local_format_monetaire_v2(local_amount) { + if (isNaN(parseFloat(local_amount))) { + return "—" + } else { return new Intl.NumberFormat('fr-FR', { - style: 'currency', - currency: 'EUR', - }).format(Number(local_amount)); + minimumFractionDigits: 0, + maximumFractionDigits: 0, + }).format(parseFloat(local_amount)); } - - function local_format_monetaire_v2(local_amount) { - if (isNaN(parseFloat(local_amount))) { - return "—" - } else { - return new Intl.NumberFormat('fr-FR', { - minimumFractionDigits: 0, - maximumFractionDigits: 0, - }).format(parseFloat(local_amount)); - } + } + + + 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: 0, + maximumFractionDigits: 0, + }).format(number); } - - - 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: 0, - maximumFractionDigits: 0, - }).format(number); - } - - - - return ( - - ); - } - + + + + return ( + + ); + } + const [datagrid_columns_size_model1, setdatagrid_columns_size_model1] = useState(200); @@ -499,7 +499,7 @@ const DisplayPartnerSession = (props) => { { field: 'nb_inscrit', headerName: 'Insc', minWidth: 20, align: "center", hide: true, hideable: true, renderCell: (params) => , }, { field: 'nb_preinscrit', headerName: 'Preinsc.', minWidth: 20, align: "center", hide: false, hideable: true, renderCell: (params) => , }, { - field: 'prix_session', headerName: 'Prix', minWidth: 50, align:'right', + field: 'prix_session', headerName: 'Prix', minWidth: 50, align: 'right', renderCell: (params) => , }, { field: 'title', headerName: 'Formation', minWidth: 250, flex: 1, align: "center", hide: true, hideable: true, renderCell: (params) => , }, @@ -891,7 +891,11 @@ const DisplayPartnerSession = (props) => { ); }, }, - { field: 'amount', headerName: 'Montant Formation', minWidth: 100, flex: 1, maxWidth: 150, type: 'number', flex: 1, editable: true, renderCell: (params) => , }, + { + field: 'amount', headerName: 'Prix', minWidth: 100, flex: 1, maxWidth: 150, type: 'number', flex: 1, editable: true, + align: 'right', + renderCell: (params) => , + }, { field: 'comment_or_memo', headerName: 'Memo & Comment.', Width: 50, hide: false, editable: false, @@ -3038,6 +3042,8 @@ const DisplayPartnerSession = (props) => { var local_id = JSON.parse(x)._id; var local_nom = JSON.parse(x).nom; var local_raison_sociale = JSON.parse(x).raison_sociale; + var local_client_facturation_id = JSON.parse(x).client_facturation_id; + var local_client_facturation_raison_sociale = JSON.parse(x).client_facturation_raison_sociale; //--- var node = { @@ -3046,6 +3052,8 @@ const DisplayPartnerSession = (props) => { "label": local_nom, "nom": local_nom, "raison_sociale": local_raison_sociale, + "client_facturation_id": local_client_facturation_id, + "client_facturation_raison_sociale": local_client_facturation_raison_sociale, }; new_data2.push(node); @@ -3057,6 +3065,8 @@ const DisplayPartnerSession = (props) => { "label": "", "nom": "", "raison_sociale": "", + "client_facturation_id": "", + "client_facturation_raison_sociale": "", }; new_data2.push(node); @@ -25849,7 +25859,7 @@ const DisplayPartnerSession = (props) => {
- Client   + Client  
{ if (value && value._id) { setp_one_detail_client_rattachement_id(value._id); setp_one_detail_client_rattachement_nom(value.nom); + Dialog_1_handle_change_participant_session(" Attention, vous allez modifier le client de rattachement du participant. Pensez à mettre à jour le client à facturer s'il est différent du client principal"); - setp_one_detail_facture_client_rattachement_id(value._id); + if (value.client_facturation_id && value.client_facturation_id !== "") { + setp_one_detail_facture_client_rattachement_id(value.client_facturation_id); + } else { + setp_one_detail_facture_client_rattachement_id(value._id); + } } else { setp_one_detail_client_rattachement_id(""); @@ -26967,7 +26982,13 @@ const DisplayPartnerSession = (props) => { setp_one_detail_client_rattachement_id(value._id); setp_one_detail_client_rattachement_nom(value.nom); Dialog_1_handle_change_participant_session(" Attention, vous allez modifier le client de rattachement du participant. Pensez à mettre à jour le client à facturer s'il est différent du client principal"); - setp_one_detail_facture_client_rattachement_id(value._id); + + if (value.client_facturation_id && value.client_facturation_id !== "") { + setp_one_detail_facture_client_rattachement_id(value.client_facturation_id); + } else { + setp_one_detail_facture_client_rattachement_id(value._id); + } + } else { setp_one_detail_client_rattachement_id(""); @@ -27846,7 +27867,11 @@ const DisplayPartnerSession = (props) => { Dialog_1_handle_change_participant_session(" Attention, vous allez modifier le client de rattachement du participant. Pensez à mettre à jour le client à facturer s'il est différent du client principal"); if (value._id !== p_detail_client_rattachement_id) { - setp_detail_facture_client_rattachement_id(value._id); + if (value.client_facturation_id && value.client_facturation_id !== "") { + setp_detail_facture_client_rattachement_id(value.client_facturation_id); + } else { + setp_detail_facture_client_rattachement_id(value._id); + } } } else { @@ -27854,10 +27879,8 @@ const DisplayPartnerSession = (props) => { setp_detail_client_rattachement_nom(""); setparticipant_data_changed("1"); Dialog_1_handle_change_participant_session(" Attention, vous allez modifier le client de rattachement du participant. Pensez à mettre à jour le client à facturer s'il est différent du client principal"); + setp_detail_facture_client_rattachement_id("") - if (value._id !== p_detail_client_rattachement_id) { - setp_detail_facture_client_rattachement_id(value._id); - } } }} diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index b81bd0b..034a94a 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -4183,7 +4183,7 @@ const DisplayPartnerStagiaires = (props) => { if (String(res.data.status) === "true") { // console.log(" In GetAttendee res.data.status = " + res.data.status); - // console.log(" In GetAttendee res.data.message r_class = " + res.data.message); + // console.log(" In GetAttendee res.data.message r_class = " + res.data.message); setGetAttendee_api("true"); setGetAttendee_result(res.data.message); @@ -5609,6 +5609,8 @@ const DisplayPartnerStagiaires = (props) => { var local_id = JSON.parse(x)._id; var local_nom = JSON.parse(x).nom; var local_raison_sociale = JSON.parse(x).raison_sociale; + var local_client_facturation_id = JSON.parse(x).client_facturation_id; + var local_client_facturation_raison_sociale = JSON.parse(x).client_facturation_raison_sociale; //--- var node = { @@ -5617,6 +5619,8 @@ const DisplayPartnerStagiaires = (props) => { "label": local_nom, "nom": local_nom, "raison_sociale": local_raison_sociale, + "client_facturation_id": local_client_facturation_id, + "client_facturation_raison_sociale": local_client_facturation_raison_sociale, }; new_data2.push(node); @@ -5629,6 +5633,8 @@ const DisplayPartnerStagiaires = (props) => { "label": "", "nom": "", "raison_sociale": "", + "client_facturation_id": "", + "client_facturation_raison_sociale": "", }; new_data2.push(node); @@ -12705,7 +12711,7 @@ const DisplayPartnerStagiaires = (props) => {
} - + {((selected_id && String(selected_id).length > 2) || (String(addOneParticipant) === "1")) &&
@@ -12990,6 +12996,8 @@ const DisplayPartnerStagiaires = (props) => { setp_one_detail_session_class(''); setp_one_detail_session_class(""); setp_one_formation_is_ftion_initiale(value.is_ftion_initiale); + + } else { setp_one_formation(""); setp_one_detail_session_class(''); @@ -13101,9 +13109,13 @@ const DisplayPartnerStagiaires = (props) => { setp_one_detail_client_rattachement_id(value._id); setp_one_detail_client_rattachement_nom(value.nom); - Dialog_1_handle_change_participant_session(" Pensez à mettre à jour le client à facturer s'il est différent du client principal"); - setp_one_detail_facture_client_rattachement_id(value._id); + + if (value.client_facturation_id && value.client_facturation_id !== "") { + setp_one_detail_facture_client_rattachement_id(value.client_facturation_id); + } else { + setp_one_detail_facture_client_rattachement_id(value._id); + } } @@ -13113,7 +13125,12 @@ const DisplayPartnerStagiaires = (props) => { Dialog_1_handle_change_participant_session(" Pensez à mettre à jour le client à facturer s'il est différent du client principal"); - setp_one_detail_facture_client_rattachement_id(""); + + if (value.client_facturation_id && value.client_facturation_id !== "") { + setp_one_detail_facture_client_rattachement_id(value.client_facturation_id); + } else { + setp_one_detail_facture_client_rattachement_id(value._id); + } } @@ -14216,7 +14233,12 @@ const DisplayPartnerStagiaires = (props) => { Dialog_1_handle_change_participant_session(" Attention, vous allez modifier le client de rattachement du participant. Pensez à mettre à jour le client à facturer s'il est différent du client principal"); if (value._id !== p_detail_client_rattachement_id) { - setp_detail_facture_client_rattachement_id(value._id); + + if (value.client_facturation_id && value.client_facturation_id !== "") { + setp_detail_facture_client_rattachement_id(value.client_facturation_id); + } else { + setp_detail_facture_client_rattachement_id(value._id); + } } } else { diff --git a/src/components/Intranet_Commande_Devis.js b/src/components/Intranet_Commande_Devis.js index 19a3ac7..8d42828 100644 --- a/src/components/Intranet_Commande_Devis.js +++ b/src/components/Intranet_Commande_Devis.js @@ -6781,7 +6781,7 @@ const Intranet_Commande_Devis = (props) => {
- {rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => ())} + {rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => ())}
diff --git a/src/components/Jmj_Theme/jmj_formation.css b/src/components/Jmj_Theme/jmj_formation.css index a4d73e6..281c33f 100644 --- a/src/components/Jmj_Theme/jmj_formation.css +++ b/src/components/Jmj_Theme/jmj_formation.css @@ -831,7 +831,7 @@ width: 108px; height: 12px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 900; font-size: 10px; @@ -885,7 +885,7 @@ top: 250px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-size: 12px; line-height: 17px; @@ -902,7 +902,7 @@ .title1 { width: 100%; text-align: center; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -1003,7 +1003,7 @@ .cta_recherche_txt { - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 17px; @@ -1139,7 +1139,7 @@ height: 24px; letter-spacing: 1px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 18px; @@ -1242,7 +1242,7 @@ letter-spacing: 2px; height: 19px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -1360,7 +1360,7 @@ width: 26px; height: 22px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -1495,7 +1495,7 @@ width: 92px; height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -1611,7 +1611,7 @@ margin-top: 10px; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -1636,7 +1636,7 @@ width: 85px; height: 14px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -1706,7 +1706,7 @@ width: 201px; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 18px; @@ -1773,7 +1773,7 @@ width: 261px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 30px; @@ -1869,7 +1869,7 @@ .block_list_actu_actu1_date_text_date { height: 19px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 12px; @@ -1892,7 +1892,7 @@ height: 64px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -1955,7 +1955,7 @@ width: 156px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -2068,7 +2068,7 @@ .block_partner_sous_block_logo_desc_desc { height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 25px; @@ -2094,7 +2094,7 @@ width: 100%; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -2156,7 +2156,7 @@ width: 100%; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -3193,7 +3193,7 @@ width: 108px; height: 12px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 900; font-size: 10px; @@ -3220,7 +3220,7 @@ cursor: pointer; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -3337,7 +3337,7 @@ cursor: pointer; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -3367,7 +3367,7 @@ cursor: pointer; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -3431,7 +3431,7 @@ width: 100%; text-align: center; height: 120px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -3449,7 +3449,7 @@ text-align: left; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 18px; @@ -3547,7 +3547,7 @@ width: 534px; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -3620,7 +3620,7 @@ width: 90px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 17px; @@ -3712,7 +3712,7 @@ width: 100%; height: 28px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 28px; @@ -3904,7 +3904,7 @@ height: 24px; letter-spacing: 1px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 18px; @@ -4007,7 +4007,7 @@ letter-spacing: 2px; height: 19px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -4125,7 +4125,7 @@ width: 26px; height: 22px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -4260,7 +4260,7 @@ width: 92px; height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -4376,7 +4376,7 @@ height: 22px; margin-top: 10px; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -4401,7 +4401,7 @@ width: 85px; height: 14px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -4461,7 +4461,7 @@ width: 201px; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 15px; @@ -4529,7 +4529,7 @@ width: 261px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 30px; @@ -4630,7 +4630,7 @@ width: 152px; height: 19px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 16px; @@ -4653,7 +4653,7 @@ height: 64px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: medium; @@ -4726,7 +4726,7 @@ height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -4840,7 +4840,7 @@ width: 600px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 25px; @@ -4866,7 +4866,7 @@ width: 100%; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -4928,7 +4928,7 @@ width: 100%; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -5006,7 +5006,7 @@ width: 100%; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -5030,7 +5030,7 @@ text-align: left; height: 80px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 14px; @@ -5063,7 +5063,7 @@ height: 80px; padding-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -6283,7 +6283,7 @@ width: 108px; height: 12px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 900; font-size: 10px; @@ -6309,7 +6309,7 @@ cursor: pointer; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -6426,7 +6426,7 @@ cursor: pointer; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -6454,7 +6454,7 @@ cursor: pointer; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -6519,7 +6519,7 @@ width: 100%; text-align: center; height: 120px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -6537,7 +6537,7 @@ text-align: left; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 18px; @@ -6612,7 +6612,7 @@ height: 17px; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -6685,7 +6685,7 @@ width: 90px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 17px; @@ -6780,7 +6780,7 @@ width: 227px; height: 28px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 30px; @@ -6970,7 +6970,7 @@ height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -7073,7 +7073,7 @@ letter-spacing: 2px; height: 19px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -7190,7 +7190,7 @@ width: 26px; height: 22px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 16px; @@ -7325,7 +7325,7 @@ width: 92px; height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -7441,7 +7441,7 @@ text-align: left; margin-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -7466,7 +7466,7 @@ width: 85px; height: 14px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -7526,7 +7526,7 @@ width: 201px; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 18px; @@ -7595,7 +7595,7 @@ width: 261px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -7698,7 +7698,7 @@ width: 152px; height: 19px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 16px; @@ -7721,7 +7721,7 @@ height: 64px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: medium; @@ -7795,7 +7795,7 @@ height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -7910,7 +7910,7 @@ width: 600px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 25px; @@ -7936,7 +7936,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -7998,7 +7998,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -8074,7 +8074,7 @@ width: 100%; height: 62px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 18px; @@ -8100,7 +8100,7 @@ text-align: left; height: 80px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 14px; @@ -8132,7 +8132,7 @@ height: 80px; padding-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -9364,7 +9364,7 @@ width: 108px; height: 12px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 900; font-size: 10px; @@ -9390,7 +9390,7 @@ cursor: pointer; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -9507,7 +9507,7 @@ cursor: pointer; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -9536,7 +9536,7 @@ width: 112px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -9601,7 +9601,7 @@ width: 100%; text-align: center; height: 192px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 50px; @@ -9619,7 +9619,7 @@ text-align: left; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 18px; @@ -9716,7 +9716,7 @@ width: 534px; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -9789,7 +9789,7 @@ width: 90px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 17px; @@ -9882,7 +9882,7 @@ width: 227px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -10072,7 +10072,7 @@ height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -10176,7 +10176,7 @@ letter-spacing: 2px; height: 19px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -10293,7 +10293,7 @@ width: 26px; height: 22px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 16px; @@ -10428,7 +10428,7 @@ width: 92px; height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -10544,7 +10544,7 @@ text-align: left; margin-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 18px; @@ -10569,7 +10569,7 @@ width: 85px; height: 14px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -10629,7 +10629,7 @@ width: 201px; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 18px; @@ -10697,7 +10697,7 @@ width: 261px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -10798,7 +10798,7 @@ width: 152px; height: 19px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 16px; @@ -10821,7 +10821,7 @@ height: 64px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: medium; @@ -10893,7 +10893,7 @@ .bton_tout_nos_article_txt { height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -11009,7 +11009,7 @@ width: 600px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 25px; @@ -11035,7 +11035,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -11097,7 +11097,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -11181,7 +11181,7 @@ width: 100%; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 20px; @@ -11207,7 +11207,7 @@ text-align: left; height: 80px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 14px; @@ -11240,7 +11240,7 @@ height: 80px; padding-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -12476,7 +12476,7 @@ width: 108px; height: 12px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 900; font-size: 10px; @@ -12502,7 +12502,7 @@ cursor: pointer; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -12620,7 +12620,7 @@ height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -12649,7 +12649,7 @@ width: 112px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -12717,7 +12717,7 @@ width: 100%; text-align: center; height: 192px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 50px; @@ -12735,7 +12735,7 @@ text-align: left; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 18px; @@ -12832,7 +12832,7 @@ width: 534px; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -12906,7 +12906,7 @@ width: 90px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 17px; @@ -13000,7 +13000,7 @@ width: 227px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -13190,7 +13190,7 @@ height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -13294,7 +13294,7 @@ letter-spacing: 2px; height: 19px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -13411,7 +13411,7 @@ width: 26px; height: 22px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 16px; @@ -13546,7 +13546,7 @@ width: 92px; height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -13662,7 +13662,7 @@ text-align: left; margin-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 18px; @@ -13687,7 +13687,7 @@ width: 85px; height: 14px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -13747,7 +13747,7 @@ width: 201px; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 18px; @@ -13817,7 +13817,7 @@ width: 261px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -13919,7 +13919,7 @@ width: 152px; height: 19px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 16px; @@ -13942,7 +13942,7 @@ height: 64px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: medium; @@ -14013,7 +14013,7 @@ .bton_tout_nos_article_txt { height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -14128,7 +14128,7 @@ width: 600px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 25px; @@ -14154,7 +14154,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -14216,7 +14216,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -14301,7 +14301,7 @@ width: 100%; height: 32px; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 20px; @@ -14326,7 +14326,7 @@ text-align: left; height: 80px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 14px; @@ -14358,7 +14358,7 @@ height: 80px; padding-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; diff --git a/src/components/New_C_Formation_2025.js b/src/components/New_C_Formation_2025.js index cab4ddd..265bde5 100644 --- a/src/components/New_C_Formation_2025.js +++ b/src/components/New_C_Formation_2025.js @@ -328,15 +328,20 @@ const New_C_Formation_2025 = (props) => { }, }; + const maxStars = 5; + + return (
-
+ {/*
-
 
+
+ {props.formation.domaine_code && {String(props.formation.domaine_code)}} +
{props.formation.cpf && String(props.formation.cpf) === String("1") &&
{"OUI CPF"} @@ -350,6 +355,8 @@ const New_C_Formation_2025 = (props) => { {"NON CPF"}
} + +
@@ -405,21 +412,21 @@ const New_C_Formation_2025 = (props) => {
autre {/*props.formation.institut_formation &&
Dispensé par :
- {String(props.formation.institut_formation)}
*/} + {String(props.formation.institut_formation)}
* /}
} {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 &&
autre {/*props.formation.institut_formation &&
Dispensé par :
- {String(props.formation.institut_formation)}
*/} + {String(props.formation.institut_formation)}
* /}
} {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" &&
autre {/*props.formation.institut_formation &&
Dispensé par :
- {String(props.formation.institut_formation)}
*/} + {String(props.formation.institut_formation)}
* /}
} @@ -441,13 +448,13 @@ const New_C_Formation_2025 = (props) => {  

} {props.formation.business_prices && props.formation.business_prices.length <= 0 - &&

- {parseFloat(String(props.formation.price)) <= 0 && Gratuit} - - {parseFloat(String(props.formation.price)) > 0 && <> {props.formation.price} € } + &&

+ {parseFloat(String(props.formation.price)) <= 0 && Gratuit } - {parseFloat(String(props.formation.partnaire_tva)) > 0 && parseFloat(String(props.formation.price)) > 0 && <> HT } - {parseFloat(String(props.formation.partnaire_tva)) <= 0 && parseFloat(String(props.formation.price)) > 0 && <> TTC } + {parseFloat(String(props.formation.price)) > 0 && <> {props.formation.price} € } + + {parseFloat(String(props.formation.partnaire_tva)) > 0 && parseFloat(String(props.formation.price)) > 0 && <> HT } + {parseFloat(String(props.formation.partnaire_tva)) <= 0 && parseFloat(String(props.formation.price)) > 0 && <> TTC }  

} @@ -491,14 +498,451 @@ const New_C_Formation_2025 = (props) => { }}> Voir les détails
-
+
*/} + +
+
+ + {/*{`Formation*/} + + {class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 && + Formation + } + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && + (!props.formation.img_url || String(props.formation.img_url).length <= 10) && + String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" && + +
+ + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") && + String(isclassimage) === "False" && informatique} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") && + String(isclassimage) === "False" && graphisme} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") && + String(isclassimage) === "False" && management} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") && + String(isclassimage) === "False" && digital} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") && + String(isclassimage) === "False" && office} + + {!props.formation.img_url || String(props.formation.img_url).length <= 0 && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") && + String(isclassimage) === "False" && ressources humaines} + + {!props.formation.img_url || String(props.formation.img_url).length <= 0 && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") && + String(isclassimage) === "False" && vente} + + {!props.formation.img_url || String(props.formation.img_url).length <= 0 && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("dev_perso") && + String(isclassimage) === "False" && developpement personnel} + + {String(isclassimage) === "True" && developpement personnel} + + +
+ } + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 && +
+ autre + {/*props.formation.institut_formation &&
Dispensé par :
+ {String(props.formation.institut_formation)}
*/} +
} + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 && +
+ autre + {/*props.formation.institut_formation &&
Dispensé par :
+ {String(props.formation.institut_formation)}
*/} +
} + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" && +
+ autre + {/*props.formation.institut_formation &&
Dispensé par :
+ {String(props.formation.institut_formation)}
*/} +
} + {props.formation.domaine_code && String(props.formation.domaine_code) !== "" &&
+ {props.formation.domaine_code} +
} + + {String(props.formation.cpf) === String("1") && ( +
+ + OUI CPF +
+ )} +
+ +
+
+

{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 45)}

+ + {parseFloat(String(props.formation.price)) <= 0 && Gratuit } + + {parseFloat(String(props.formation.price)) > 0 && {Intl.NumberFormat("fr-FR").format(props.formation.price)} € + {parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT } + {parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC } + } +
+ +
+ + + {Number(props.formation.note).toFixed(1).replace(".", ",")} + +
+ +

{String(parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))).substring(0, 80)}

+ + + + +
+
+ +
) } -export default New_C_Formation_2025; \ No newline at end of file +export default New_C_Formation_2025; + + +const local_css = ` + +.block_formation{ +border: none; + +} + +.elyos-page { + min-height: 100vh; + padding: 60px 24px; + background: + radial-gradient(circle at top left, rgba(20, 177, 160, 0.12), transparent 35%), + linear-gradient(135deg, #f7fafc 0%, #edf3f8 100%); + display: flex; + align-items: center; + justify-content: center; + font-family: "DM Sans", Arial, Helvetica, sans-serif; +} + +.elyos-card { + width: 100%; + max-width: 430px; + background: #ffffff; + border-radius: 28px; + overflow: hidden; + box-shadow: + 0 24px 60px rgba(16, 66, 119, 0.13), + 0 4px 16px rgba(16, 66, 119, 0.06); + border: 1px solid rgba(16, 66, 119, 0.08); + transition: all 0.28s ease; +} + +.elyos-card:hover { + transform: translateY(-8px); + box-shadow: + 0 34px 80px rgba(16, 66, 119, 0.18), + 0 8px 22px rgba(16, 66, 119, 0.08); +} + +.elyos-card__image-wrapper { + position: relative; + height: 260px; + overflow: hidden; + background: #eef3f7; +} + +.elyos-card__image { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} + +.elyos-card__image-wrapper::after { + content: ""; + position: absolute; + inset: 0; + background: linear-gradient( + 180deg, + rgba(8, 35, 66, 0.08) 0%, + rgba(8, 35, 66, 0.02) 45%, + rgba(255, 255, 255, 0.04) 100% + ); + pointer-events: none; +} + +.elyos-card__badge { + position: absolute; + z-index: 2; + top: 22px; + display: inline-flex; + align-items: center; + gap: 8px; + padding: 10px 15px; + border-radius: 999px; + font-size: 12px; + font-weight: 800; + letter-spacing: 0.04em; + text-transform: uppercase; + backdrop-filter: blur(14px); + box-shadow: 0 8px 22px rgba(16, 66, 119, 0.12); +} + +.elyos-card__badge--left { + left: 22px; + color: #13a998; + background: rgba(255, 255, 255, 0.86); + background: rgb(218, 242, 238); + max-width: 8rem; +} + +.elyos-card__badge--right { + right: 22px; + color: #104277; + background: rgba(255, 255, 255, 0.9); +} + +.elyos-card__badge-icon { + width: 22px; + height: 22px; + border-radius: 999px; + display: inline-flex; + align-items: center; + justify-content: center; + color: #13a998; + font-size: 13px; +} + +.elyos-card__content { +padding: 10px 10px 20px; +} + +.elyos-card__header { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 18px; + margin-bottom: 14px; +} + +.elyos-card__title { +margin: 0; + color: #0a2a4d; + font-size: 16px !important; + line-height: 1.15; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.2px; + text-align: left; + height: 4rem; +} + +.elyos-card__price { + flex: 0 0 auto; + color: #13a998; + font-size: 18px; + font-weight: 900; + text-transform: uppercase; + letter-spacing: -0.02em; + margin-top: 3px; +} + +.elyos-card__rating { + display: flex; + align-items: center; + gap: 12px; + padding-bottom: 20px; + border-bottom: 1px solid #e8eef5; +} + +.elyos-card__stars { + display: flex; + gap: 2px; + font-size: 22px; + line-height: 1; + color: #b8c1cc; +} + +.elyos-card__stars .active { + color: #f6ad24; +} + +.elyos-card__rating-text { + color: #6b7a90; + font-size: 14px; + font-weight: 600; +} + +.elyos-card__description { +margin: 5px 0; + color: #31445f; + font-size: 15px; + line-height: 1.65; + padding: 0px; + height: 5rem; + text-align: left; +} + +.elyos-card__meta { + display: grid; + grid-template-columns: repeat(3, 1fr); + border-top: 1px solid #e8eef5; + border-bottom: 1px solid #e8eef5; + margin-bottom: 24px; +} + +.elyos-card__meta-item { + padding: 16px 8px; + display: flex; + align-items: center; + justify-content: center; + gap: 9px; + color: #263b58; + font-size: 14px; + font-weight: 700; + text-align: center; +} + +.elyos-card__meta-item:not(:last-child) { + border-right: 1px solid #e8eef5; +} + +.elyos-card__meta-icon { + color: #104277; + font-size: 17px; +} + +.elyos-card__button { + width: 100%; + border: none; + cursor: pointer; + padding: 17px 20px; + border-radius: 17px; + background: linear-gradient(135deg, #104277 0%, #062b5f 100%); + color: #ffffff; + font-size: 16px; + font-weight: 850; + letter-spacing: -0.01em; + display: flex; + align-items: center; + justify-content: center; + gap: 14px; + box-shadow: 0 16px 30px rgba(16, 66, 119, 0.25); + transition: all 0.25s ease; + background: rgb(49, 140, 127); +} + +.elyos-card__button span { + font-size: 24px; + line-height: 1; + transition: transform 0.25s ease; +} + +.elyos-card__button:hover { + transform: translateY(-2px); + box-shadow: 0 20px 38px rgba(16, 66, 119, 0.32); +} + +.elyos-card__button:hover span { + transform: translateX(5px); +} + +@media (max-width: 520px) { + .elyos-page { + padding: 32px 14px; + } + + .elyos-card { + max-width: 100%; + border-radius: 22px; + font-family: 'DM sans'; + } + + .elyos-card__image-wrapper { + height: 220px; + } + + .elyos-card__content { + padding: 22px; + } + + .elyos-card__header { + flex-direction: column; + gap: 8px; + } + + .elyos-card__title { + font-size: 16px !important; + height: 4rem; + } + + .elyos-card__meta { + grid-template-columns: 1fr; + } + + .elyos-card__meta-item:not(:last-child) { + border-right: none; + border-bottom: 1px solid #e8eef5; + } + + .elyos-card__badge { + top: 16px; + font-size: 11px; + padding: 8px 12px; + } + + .elyos-card__badge--left { + left: 16px; + } + + .elyos-card__badge--right { + right: 16px; + } +} + + +`; diff --git a/src/components/New_C_Formation_2025_ARG_070526.js b/src/components/New_C_Formation_2025_ARG_070526.js new file mode 100644 index 0000000..1a5c28a --- /dev/null +++ b/src/components/New_C_Formation_2025_ARG_070526.js @@ -0,0 +1,791 @@ +import React, { useState, useEffect } from "react"; + +import { useHistory } from "react-router-dom"; + +import { useCookies } from "react-cookie"; +import { confirmAlert } from 'react-confirm-alert'; + +import img_met_program from "../mysy_img/met_programmation.jpg"; + +import img_met_graphisme from "../mysy_img/metier_graphisme.jpg"; + +import img_met_autre from "../mysy_img/met_autre.jpg"; +import img_met_digital from "../mysy_img/met_digital.jpg"; +import img_met_management from "../mysy_img/met_management.jpg"; + +import img_met_dev_perso from "../mysy_img/metier_dev_perso.jpg"; +import img_met_rh from "../mysy_img/met_rh.jpg"; + +import img_met_bureautic from "../mysy_img/met_burautic.jpg"; +import img_met_vente from "../mysy_img/met_vente.jpg"; +import axios from "axios"; +//import { Rating } from 'react-simple-star-rating' +import Rating from '@mui/material/Rating'; +import parse from 'html-react-parser' +import { CiLocationOn } from "react-icons/ci"; + +const New_C_Formation_2025_ARG_070526 = (props) => { + const [userconnected, setuserconnected] = useState("0"); + const [partnerconnected, setpartnerconnected] = useState("0"); + const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']); + const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart']); + const history = useHistory(); + const [myfilter, setmyfilter] = useState(props.formation.price); + + const [profileimg, setprofileimg] = useState(props.formation.price); + + + // Gestion des Cookies + const stored_partner = cookie_part.tokenmysypart; + const stored_user = cookie.tokenmysych; + + function test(val) { + + if (userconnected === "0" && partnerconnected === "0") { + confirmAlert({ + title: 'Activer votre session ?', + message: 'Merci de vous connecter pour acceder au detail de cette formation', + buttons: [ + { + label: 'Oui', + onClick: () => { history.push("/mysy-training-login/training/" + props.formation.internal_url) } + }, + { + label: 'Non', + onClick: () => { return } + + } + ], + closeOnEscape: false, + closeOnClickOutside: false, + keyCodeForClose: [8, 32], + willUnmount: () => { }, + afterClose: () => { }, + onClickOutside: () => { }, + onKeypress: () => { }, + onKeypressEscape: () => { }, + }); + } else { + window.open( + "/Display-Detail-formation/" + props.formation.internal_url, + '_blank' + ); + } + + + } + + const [myclassimage, setmyclassimage] = useState(); + const [isclassimage, setisclassimage] = useState("False"); + const [userimgclassprofil, setuserimgclassprofil] = useState(""); + + const [class_img_stored_in_bdd, setclass_img_stored_in_bdd] = useState(""); + + function getClassImage_no_token() { + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedClassImage_no_token/"; + + var form = new FormData(); + + form.append("type", "partner"); + form.append("related_collection", "myclass"); + form.append("related_collection_recid", props.formation._id); + form.append("class_external_code", props.formation.external_code); + + axios.post(myurl, form).then(res => { + + // console.log(" getClassImage_no_token : In test res.data.status = ", res.data.status); + if (String(res.data.status) === "true") { + + + //console.log(" getClassImage_no_token: res.data.message.img = ", res.data.message); + + if (res.data.message.img.length > 0) { + setisclassimage("True"); + } + else { + setisclassimage("False"); + } + setisclassimage(res.data.message.img); + var ch_img = "data:image/png;base64," + res.data.message.img; + setclass_img_stored_in_bdd(ch_img); + // console.log(" getClassImage_no_token: setclass_img_stored_in_bdd = ", setclass_img_stored_in_bdd); + + } + else { + // console.log(" In Erreur res.data.status = " + res.data.status); + //console.log(" In Erreur res.data.message = " + res.data.message); + setisclassimage("False"); + setuserimgclassprofil(); + setclass_img_stored_in_bdd(); + } + }).catch((error) => { + + console.warn('getClassImage ee: Not good man :( getClassImage = '); + setisclassimage("False"); + setuserimgclassprofil(""); + setclass_img_stored_in_bdd(""); + }) + + } + + + /* Cette variable accompagne la gestion des images par defaut. + idée : si la valeur de "DetailTraining.metier" != "management, digital, office, rh, vente, dev_perso" + alors l'utilisateur à créer une formation avec un metier qui n'est pas geré, donc on met une image par defaut + */ + const [ismetiermanaged, setismetiermanaged] = useState(); + const liste_metier = ["management", "digital", "office", "rh", "vente", "dev_perso"]; + + useEffect(() => { + setmyfilter(props.myfil); + + // console.log(" #### useEffect props.formation = ", props.formation); + + + if (typeof (stored_user) === "undefined" || String(stored_user) === '') { + setuserconnected("0"); + } else { + setuserconnected("1"); + } + + if (typeof (stored_partner) === "undefined" || String(stored_partner) === '') { + setpartnerconnected("0"); + } else { + setpartnerconnected("1"); + } + + getClassImage_no_token(); + GetCurrentClass_trainingsession(); + + GetCurrentClass_trainingsession_cities(); + + // Verifier si le metier est geré + if (props.formation.metier) { + if (!liste_metier.includes(props.formation.metier)) { + setismetiermanaged("0"); // j'ai une valeur dans metier, mais qui n'est pas geré + } + } + else { + setismetiermanaged("0"); + } + + if (props.formation.img_url && String(props.formation.img_url).length > 0) { + setismetiermanaged("1"); + } + + }, []); + + + const [GetCurrentClass_api, setGetCurrentClass_api] = useState(); + const [GetCurrentClass_message, setGetCurrentClass_message] = useState(); + const [GetCurrentClass_result, setGetCurrentClass_result] = useState(); + function GetCurrentClass_trainingsession(event) { + + var form = new FormData(); + + form.append("class_internal_url", props.formation.internal_url); + + form.append("token", stored_partner); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSessionFormation_List/"; + + axios.post(myurl, form).then(res => { + + if (res.data.status != "false") { + //console.log(" In GetCurrentClass_trainingsession res.data.status = " + res.data.status); + //console.log(" In GetCurrentClass_trainingsession res.data.message r_class = " + res.data.message); + setGetCurrentClass_api("true"); + setGetCurrentClass_result(res.data.message); + } + else { + setGetCurrentClass_api("false"); + setGetCurrentClass_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( GetCurrentClass_trainingsession = ', error); + setGetCurrentClass_api("false"); + //setmyApimyApiMessage("") + }) + } + + + const [GetCurrentClass_trainingsession_cities_api, setGetCurrentClass_trainingsession_cities_api] = useState(); + const [GetCurrentClass_trainingsession_cities_message, setGetCurrentClass_trainingsession_cities_message] = useState(); + const [GetCurrentClass_trainingsession_cities_result, setGetCurrentClass_trainingsession_cities_result] = useState([]); + function GetCurrentClass_trainingsession_cities(event) { + + var form = new FormData(); + + form.append("class_internal_url", props.formation.internal_url); + + form.append("token", stored_partner); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSession_Cities_And_Distance_Formation_List/"; + + axios.post(myurl, form).then(res => { + + if (res.data.status != "false") { + //console.log(" In GetCurrentClass_trainingsession_cities res.data.status = " + res.data.status); + //console.log(" In GetCurrentClass_trainingsession_cities res.data.message r_class = " + res.data.message); + setGetCurrentClass_trainingsession_cities_api("true"); + setGetCurrentClass_trainingsession_cities_result(res.data.message); + } + else { + setGetCurrentClass_trainingsession_cities_api("false"); + setGetCurrentClass_trainingsession_cities_message(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( GetCurrentClass_trainingsession_cities = ', error); + setGetCurrentClass_trainingsession_cities_api("false"); + //setmyApimyApiMessage("") + }) + } + + const styles = { + list: { + display: 'flex', + flexDirection: 'column', + gap: '32px', + width: '100%', + }, + row: { + display: 'flex', + flexDirection: 'row', + gap: '24px', + width: '100%', + }, + card: { + flexGrow: 1, + backgroundColor: '#fff', + borderRadius: '8px', + overflow: 'hidden', + display: 'flex', + flexDirection: 'column', + }, + + image: { + maxWidth: '100%', + height: '200px', + overflow: 'hidden', + margin: "auto", + + }, + content: { + padding: '16px', + }, + header: { + display: 'flex', + justifyContent: 'space-between', + alignItems: 'center', + }, + eligibility: { + backgroundColor: '#e2e9fb', + padding: '4px 8px', + borderRadius: '4px', + fontSize: '12px', + fontWeight: 'bold', + }, + title: { + fontSize: '14px', + fontWeight: 'bold', + margin: '8px 0', + }, + price: { + fontSize: '14px', + fontWeight: 'bold', + color: '#000', + }, + description: { + fontSize: '12px', + color: '#666', + margin: '8px 0', + height: "40px", + overflow: "hidden", + }, + details: { + display: 'flex', + justifyContent: 'space-between', + marginTop: '16px', + }, + button: { + backgroundColor: '#007bff', + color: '#fff', + padding: '8px 16px', + border: 'none', + borderRadius: '4px', + cursor: 'pointer', + }, + buttonOutline: { + backgroundColor: '#fff', + color: '#007bff', + padding: '8px 16px', + border: '1px solid #007bff', + borderRadius: '4px', + cursor: 'pointer', + }, + }; + + return ( + +
+ + +
+
+ +
+ {props.formation.domaine_code && {String(props.formation.domaine_code)}} +
+ + {props.formation.cpf && String(props.formation.cpf) === String("1") &&
+ {"OUI CPF"} +
+ } + {props.formation.cpf && String(props.formation.cpf) !== String("1") &&
+ {"NON CPF"} +
+ } + {!props.formation.cpf && String(props.formation.cpf) !== String("1") &&
+ {"NON CPF"} +
} + + + +
+ + + {class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 && + Formation + } + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && + (!props.formation.img_url || String(props.formation.img_url).length <= 10) && + String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" && + +
+ + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") && + String(isclassimage) === "False" && informatique} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") && + String(isclassimage) === "False" && graphisme} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") && + String(isclassimage) === "False" && management} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") && + String(isclassimage) === "False" && digital} + + {(!props.formation.img_url || String(props.formation.img_url).length <= 0) && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") && + String(isclassimage) === "False" && office} + + {!props.formation.img_url || String(props.formation.img_url).length <= 0 && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") && + String(isclassimage) === "False" && ressources humaines} + + {!props.formation.img_url || String(props.formation.img_url).length <= 0 && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") && + String(isclassimage) === "False" && vente} + + {!props.formation.img_url || String(props.formation.img_url).length <= 0 && + props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("dev_perso") && + String(isclassimage) === "False" && developpement personnel} + + {String(isclassimage) === "True" && developpement personnel} + + +
+ } + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 && +
+ autre + {/*props.formation.institut_formation &&
Dispensé par :
+ {String(props.formation.institut_formation)}
*/} +
} + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 && +
+ autre + {/*props.formation.institut_formation &&
Dispensé par :
+ {String(props.formation.institut_formation)}
*/} +
} + + {(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" && +
+ autre + {/*props.formation.institut_formation &&
Dispensé par :
+ {String(props.formation.institut_formation)}
*/} +
} + + +
+
+
+ {props.formation.note && String(props.formation.note).length === 1 && + parseInt(String(props.formation.note)) <= 5 && + + } +
+ +

{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 50)}

+ {props.formation.discounted_price && props.formation.business_prices &&

{props.formation.discounted_price} € + + {parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT } + {parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC } + +  

} + + {props.formation.business_prices && props.formation.business_prices.length <= 0 + &&

+ {parseFloat(String(props.formation.price)) <= 0 && Gratuit } + + {parseFloat(String(props.formation.price)) > 0 && <> {props.formation.price} € } + + {parseFloat(String(props.formation.partnaire_tva)) > 0 && parseFloat(String(props.formation.price)) > 0 && <> HT } + {parseFloat(String(props.formation.partnaire_tva)) <= 0 && parseFloat(String(props.formation.price)) > 0 && <> TTC } + +  

} + + {props.formation.business_prices && props.formation.business_prices.length > 0 && +

+ +

{props.formation.business_prices[0].discounted_price}€ + + {parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT } + {parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC } + +   + {props.formation.price} € + {parseFloat(String(props.formation.partnaire_tva)) > 0 && <> HT } + {parseFloat(String(props.formation.partnaire_tva)) <= 0 && <> TTC } +   + ({props.formation.business_prices[0].discount} %)

+

} + +

{String(parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))).substring(0, 80)}...

+
+ +
+
+ + +
+
+ + + +
+ + ) +} + + +export default New_C_Formation_2025_ARG_070526; + + +const local_css = ` +.elyos-page { + min-height: 100vh; + padding: 60px 24px; + background: + radial-gradient(circle at top left, rgba(20, 177, 160, 0.12), transparent 35%), + linear-gradient(135deg, #f7fafc 0%, #edf3f8 100%); + display: flex; + align-items: center; + justify-content: center; + font-family: "DM Sans", Arial, Helvetica, sans-serif; +} + +.elyos-card { + width: 100%; + max-width: 430px; + background: #ffffff; + border-radius: 28px; + overflow: hidden; + box-shadow: + 0 24px 60px rgba(16, 66, 119, 0.13), + 0 4px 16px rgba(16, 66, 119, 0.06); + border: 1px solid rgba(16, 66, 119, 0.08); + transition: all 0.28s ease; +} + +.elyos-card:hover { + transform: translateY(-8px); + box-shadow: + 0 34px 80px rgba(16, 66, 119, 0.18), + 0 8px 22px rgba(16, 66, 119, 0.08); +} + +.elyos-card__image-wrapper { + position: relative; + height: 260px; + overflow: hidden; + background: #eef3f7; +} + +.elyos-card__image { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} + +.elyos-card__image-wrapper::after { + content: ""; + position: absolute; + inset: 0; + background: linear-gradient( + 180deg, + rgba(8, 35, 66, 0.08) 0%, + rgba(8, 35, 66, 0.02) 45%, + rgba(255, 255, 255, 0.04) 100% + ); + pointer-events: none; +} + +.elyos-card__badge { + position: absolute; + z-index: 2; + top: 22px; + display: inline-flex; + align-items: center; + gap: 8px; + padding: 10px 15px; + border-radius: 999px; + font-size: 12px; + font-weight: 800; + letter-spacing: 0.04em; + text-transform: uppercase; + backdrop-filter: blur(14px); + box-shadow: 0 8px 22px rgba(16, 66, 119, 0.12); +} + +.elyos-card__badge--left { + left: 22px; + color: #13a998; + background: rgba(255, 255, 255, 0.86); +} + +.elyos-card__badge--right { + right: 22px; + color: #104277; + background: rgba(255, 255, 255, 0.9); +} + +.elyos-card__badge-icon { + width: 22px; + height: 22px; + border-radius: 999px; + display: inline-flex; + align-items: center; + justify-content: center; + color: #13a998; + font-size: 13px; +} + +.elyos-card__content { + padding: 28px 28px 30px; +} + +.elyos-card__header { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 18px; + margin-bottom: 14px; +} + +.elyos-card__title { + margin: 0; + color: #0f2d4f; + font-size: 24px; + line-height: 1.15; + font-weight: 900; + text-transform: uppercase; + letter-spacing: -0.03em; +} + +.elyos-card__price { + flex: 0 0 auto; + color: #13a998; + font-size: 18px; + font-weight: 900; + text-transform: uppercase; + letter-spacing: -0.02em; + margin-top: 3px; +} + +.elyos-card__rating { + display: flex; + align-items: center; + gap: 12px; + padding-bottom: 20px; + border-bottom: 1px solid #e8eef5; +} + +.elyos-card__stars { + display: flex; + gap: 2px; + font-size: 22px; + line-height: 1; + color: #b8c1cc; +} + +.elyos-card__stars .active { + color: #f6ad24; +} + +.elyos-card__rating-text { + color: #6b7a90; + font-size: 14px; + font-weight: 600; +} + +.elyos-card__description { + margin: 22px 0; + color: #31445f; + font-size: 15.5px; + line-height: 1.65; +} + +.elyos-card__meta { + display: grid; + grid-template-columns: repeat(3, 1fr); + border-top: 1px solid #e8eef5; + border-bottom: 1px solid #e8eef5; + margin-bottom: 24px; +} + +.elyos-card__meta-item { + padding: 16px 8px; + display: flex; + align-items: center; + justify-content: center; + gap: 9px; + color: #263b58; + font-size: 14px; + font-weight: 700; + text-align: center; +} + +.elyos-card__meta-item:not(:last-child) { + border-right: 1px solid #e8eef5; +} + +.elyos-card__meta-icon { + color: #104277; + font-size: 17px; +} + +.elyos-card__button { + width: 100%; + border: none; + cursor: pointer; + padding: 17px 20px; + border-radius: 17px; + background: linear-gradient(135deg, #104277 0%, #062b5f 100%); + color: #ffffff; + font-size: 16px; + font-weight: 850; + letter-spacing: -0.01em; + display: flex; + align-items: center; + justify-content: center; + gap: 14px; + box-shadow: 0 16px 30px rgba(16, 66, 119, 0.25); + transition: all 0.25s ease; +} + +.elyos-card__button span { + font-size: 24px; + line-height: 1; + transition: transform 0.25s ease; +} + +.elyos-card__button:hover { + transform: translateY(-2px); + box-shadow: 0 20px 38px rgba(16, 66, 119, 0.32); +} + +.elyos-card__button:hover span { + transform: translateX(5px); +} + +@media (max-width: 520px) { + .elyos-page { + padding: 32px 14px; + } + + .elyos-card { + max-width: 100%; + border-radius: 22px; + } + + .elyos-card__image-wrapper { + height: 220px; + } + + .elyos-card__content { + padding: 22px; + } + + .elyos-card__header { + flex-direction: column; + gap: 8px; + } + + .elyos-card__title { + font-size: 21px; + } + + .elyos-card__meta { + grid-template-columns: 1fr; + } + + .elyos-card__meta-item:not(:last-child) { + border-right: none; + border-bottom: 1px solid #e8eef5; + } + + .elyos-card__badge { + top: 16px; + font-size: 11px; + padding: 8px 12px; + } + + .elyos-card__badge--left { + left: 16px; + } + + .elyos-card__badge--right { + right: 16px; + } +} + + +`; diff --git a/src/components/Partner_Commande.js b/src/components/Partner_Commande.js index b778900..61bbc35 100644 --- a/src/components/Partner_Commande.js +++ b/src/components/Partner_Commande.js @@ -7884,7 +7884,7 @@ const Partner_Commande = (props) => {
- {rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => ())} + {rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => ())}
diff --git a/src/components/Partner_Commande_ARG.js b/src/components/Partner_Commande_ARG.js index ccfdc6e..87d8db1 100644 --- a/src/components/Partner_Commande_ARG.js +++ b/src/components/Partner_Commande_ARG.js @@ -7823,7 +7823,7 @@ const Partner_Commande_ARG = (props) => {
- {rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => ())} + {rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => ())}
diff --git a/src/components/marketplace_automatic_files/new_marketplace_2025.js b/src/components/marketplace_automatic_files/new_marketplace_2025.js index 95cb90c..b84304f 100644 --- a/src/components/marketplace_automatic_files/new_marketplace_2025.js +++ b/src/components/marketplace_automatic_files/new_marketplace_2025.js @@ -1400,7 +1400,7 @@ const New_C_Marketplace_2025 = () => { form.append("user_latitude", latitude); form.append("user_longitude", longitude); form.append("user_state", state); - + var myurl = "" if (displayAllClasses == true) { @@ -1415,7 +1415,7 @@ const New_C_Marketplace_2025 = () => { axios.post(myurl, form).then(res => { if (String(res.data.status) != String("false")) { //console.log(" In test res.data.status = " + res.data.status); - // console.log(" In searchFunction res.data.message = " + res.data.message); + //console.log(" In searchFunction res.data.message = " + res.data.message); setmyApiResponse("True"); setResult(res.data.message) @@ -1559,7 +1559,7 @@ const New_C_Marketplace_2025 = () => { axios.post(myurl, form).then(res => { if (String(res.data.status) != String("false")) { //console.log(" In test res.data.status = " + res.data.status); - //console.log(" In DisplayXfirstClas res.data.message = " + res.data.message); + console.log(" In DisplayXfirstClas res.data.message = " + res.data.message); setmyApiResponse("True"); setResult(res.data.message) diff --git a/src/components/marketplace_automatic_files/new_s_marketplace_2025.css b/src/components/marketplace_automatic_files/new_s_marketplace_2025.css index dfdc4f6..8b1821e 100644 --- a/src/components/marketplace_automatic_files/new_s_marketplace_2025.css +++ b/src/components/marketplace_automatic_files/new_s_marketplace_2025.css @@ -830,7 +830,7 @@ width: 108px; height: 12px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 900; font-size: 10px; @@ -884,7 +884,7 @@ top: 250px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-size: 12px; line-height: 17px; @@ -901,7 +901,7 @@ .title1 { width: 100%; text-align: center; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -1013,7 +1013,7 @@ .cta_recherche_txt { - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 17px; @@ -1149,7 +1149,7 @@ height: 24px; letter-spacing: 1px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 18px; @@ -1252,7 +1252,7 @@ letter-spacing: 2px; height: 19px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -1370,7 +1370,7 @@ width: 26px; height: 22px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -1505,7 +1505,7 @@ width: 92px; height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -1621,7 +1621,7 @@ margin-top: 10px; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -1646,7 +1646,7 @@ width: 85px; height: 14px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -1716,7 +1716,7 @@ width: 201px; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 18px; @@ -1783,7 +1783,7 @@ width: 261px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 30px; @@ -1879,7 +1879,7 @@ .block_list_actu_actu1_date_text_date { height: 19px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 12px; @@ -1902,7 +1902,7 @@ height: 64px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -1965,7 +1965,7 @@ width: 156px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -2078,7 +2078,7 @@ .block_partner_sous_block_logo_desc_desc { height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 25px; @@ -2104,7 +2104,7 @@ width: 100%; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -2166,7 +2166,7 @@ width: 100%; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -3186,7 +3186,7 @@ width: 108px; height: 12px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 900; font-size: 10px; @@ -3213,7 +3213,7 @@ cursor: pointer; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -3330,7 +3330,7 @@ cursor: pointer; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -3360,7 +3360,7 @@ cursor: pointer; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -3424,7 +3424,7 @@ width: 100%; text-align: center; height: 120px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -3442,7 +3442,7 @@ text-align: left; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 18px; @@ -3540,7 +3540,7 @@ width: 534px; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -3613,7 +3613,7 @@ width: 90px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 17px; @@ -3705,7 +3705,7 @@ width: 100%; height: 28px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 28px; @@ -3897,7 +3897,7 @@ height: 24px; letter-spacing: 1px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 18px; @@ -4000,7 +4000,7 @@ letter-spacing: 2px; height: 19px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -4118,7 +4118,7 @@ width: 26px; height: 22px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -4253,7 +4253,7 @@ width: 92px; height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -4369,7 +4369,7 @@ height: 22px; margin-top: 10px; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -4394,7 +4394,7 @@ width: 85px; height: 14px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -4454,7 +4454,7 @@ width: 201px; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 15px; @@ -4522,7 +4522,7 @@ width: 261px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 30px; @@ -4623,7 +4623,7 @@ width: 152px; height: 19px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 16px; @@ -4646,7 +4646,7 @@ height: 64px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: medium; @@ -4719,7 +4719,7 @@ height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -4833,7 +4833,7 @@ width: 600px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 25px; @@ -4859,7 +4859,7 @@ width: 100%; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -4921,7 +4921,7 @@ width: 100%; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -4999,7 +4999,7 @@ width: 100%; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -5023,7 +5023,7 @@ text-align: left; height: 80px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 14px; @@ -5056,7 +5056,7 @@ height: 80px; padding-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -6269,7 +6269,7 @@ width: 108px; height: 12px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 900; font-size: 10px; @@ -6295,7 +6295,7 @@ cursor: pointer; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -6412,7 +6412,7 @@ cursor: pointer; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -6440,7 +6440,7 @@ cursor: pointer; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -6505,7 +6505,7 @@ width: 100%; text-align: center; height: 120px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -6523,7 +6523,7 @@ text-align: left; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 18px; @@ -6598,7 +6598,7 @@ height: 17px; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -6671,7 +6671,7 @@ width: 90px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 17px; @@ -6766,7 +6766,7 @@ width: 227px; height: 28px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 30px; @@ -6956,7 +6956,7 @@ height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -7059,7 +7059,7 @@ letter-spacing: 2px; height: 19px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -7176,7 +7176,7 @@ width: 26px; height: 22px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 16px; @@ -7311,7 +7311,7 @@ width: 92px; height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -7427,7 +7427,7 @@ text-align: left; margin-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -7452,7 +7452,7 @@ width: 85px; height: 14px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -7512,7 +7512,7 @@ width: 201px; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 18px; @@ -7581,7 +7581,7 @@ width: 261px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -7684,7 +7684,7 @@ width: 152px; height: 19px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 16px; @@ -7707,7 +7707,7 @@ height: 64px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: medium; @@ -7781,7 +7781,7 @@ height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -7896,7 +7896,7 @@ width: 600px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 25px; @@ -7922,7 +7922,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -7984,7 +7984,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -8060,7 +8060,7 @@ width: 100%; height: 62px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 18px; @@ -8086,7 +8086,7 @@ text-align: left; height: 80px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 14px; @@ -8118,7 +8118,7 @@ height: 80px; padding-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -9343,7 +9343,7 @@ width: 108px; height: 12px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 900; font-size: 10px; @@ -9369,7 +9369,7 @@ cursor: pointer; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -9486,7 +9486,7 @@ cursor: pointer; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -9515,7 +9515,7 @@ width: 112px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -9580,7 +9580,7 @@ width: 100%; text-align: center; height: 192px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 50px; @@ -9598,7 +9598,7 @@ text-align: left; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 18px; @@ -9695,7 +9695,7 @@ width: 534px; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -9768,7 +9768,7 @@ width: 90px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 17px; @@ -9861,7 +9861,7 @@ width: 227px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -10051,7 +10051,7 @@ height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -10155,7 +10155,7 @@ letter-spacing: 2px; height: 19px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -10272,7 +10272,7 @@ width: 26px; height: 22px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 16px; @@ -10407,7 +10407,7 @@ width: 92px; height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -10523,7 +10523,7 @@ text-align: left; margin-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 18px; @@ -10548,7 +10548,7 @@ width: 85px; height: 14px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -10608,7 +10608,7 @@ width: 201px; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 18px; @@ -10676,7 +10676,7 @@ width: 261px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -10777,7 +10777,7 @@ width: 152px; height: 19px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 16px; @@ -10800,7 +10800,7 @@ height: 64px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: medium; @@ -10872,7 +10872,7 @@ .bton_tout_nos_article_txt { height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -10988,7 +10988,7 @@ width: 600px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 25px; @@ -11014,7 +11014,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -11076,7 +11076,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -11160,7 +11160,7 @@ width: 100%; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 20px; @@ -11186,7 +11186,7 @@ text-align: left; height: 80px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 14px; @@ -11219,7 +11219,7 @@ height: 80px; padding-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -12449,7 +12449,7 @@ width: 108px; height: 12px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 900; font-size: 10px; @@ -12475,7 +12475,7 @@ cursor: pointer; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -12593,7 +12593,7 @@ height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -12622,7 +12622,7 @@ width: 112px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -12690,7 +12690,7 @@ width: 100%; text-align: center; height: 192px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 50px; @@ -12708,7 +12708,7 @@ text-align: left; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 18px; @@ -12805,7 +12805,7 @@ width: 534px; height: 17px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 14px; @@ -12879,7 +12879,7 @@ width: 90px; height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 17px; @@ -12973,7 +12973,7 @@ width: 227px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -13163,7 +13163,7 @@ height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -13267,7 +13267,7 @@ letter-spacing: 2px; height: 19px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 14px; @@ -13384,7 +13384,7 @@ width: 26px; height: 22px; - font-family: 'Manrope'; + font-family: 'DM Sans', 'Manrope'; font-style: normal; font-weight: 600; font-size: 16px; @@ -13519,7 +13519,7 @@ width: 92px; height: 24px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 800; font-size: 20px; @@ -13635,7 +13635,7 @@ text-align: left; margin-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 18px; @@ -13660,7 +13660,7 @@ width: 85px; height: 14px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 12px; @@ -13720,7 +13720,7 @@ width: 201px; height: 22px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 18px; @@ -13790,7 +13790,7 @@ width: 261px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px; @@ -13892,7 +13892,7 @@ width: 152px; height: 19px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 16px; @@ -13915,7 +13915,7 @@ height: 64px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: medium; @@ -13988,7 +13988,7 @@ .bton_tout_nos_article_txt { height: 30px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 16px; @@ -14103,7 +14103,7 @@ width: 600px; height: 48px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 25px; @@ -14129,7 +14129,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -14191,7 +14191,7 @@ width: 858px; height: 72px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 16px; @@ -14276,7 +14276,7 @@ width: 100%; height: 32px; text-align: left; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 600; font-size: 20px; @@ -14301,7 +14301,7 @@ text-align: left; height: 80px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 500; font-size: 14px; @@ -14333,7 +14333,7 @@ height: 80px; padding-top: 10px; - font-family: 'Albert Sans'; + font-family: 'DM Sans', 'Albert Sans'; font-style: normal; font-weight: 700; font-size: 40px;