23/07/2023 - 17h
parent
b0db0b0b5f
commit
0ed4c2471c
File diff suppressed because it is too large
Load Diff
|
@ -4,6 +4,8 @@
|
|||
"private": true,
|
||||
"dependencies": {
|
||||
"@dr.pogodin/react-global-state": "^0.6.5",
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@fortawesome/fontawesome": "^1.1.8",
|
||||
"@fortawesome/fontawesome-free-solid": "^5.0.13",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.1.1",
|
||||
|
@ -17,8 +19,8 @@
|
|||
"@material-ui/core": "^4.12.4",
|
||||
"@material/tooltip": "^14.0.0",
|
||||
"@mui/icons-material": "^5.4.2",
|
||||
"@mui/material": "^5.4.2",
|
||||
"@mui/x-data-grid": "^5.5.1",
|
||||
"@mui/material": "^5.14.1",
|
||||
"@mui/x-data-grid": "^5.17.26",
|
||||
"@mui/x-date-pickers": "^5.0.0",
|
||||
"@mui/x-date-pickers-pro": "^5.0.0",
|
||||
"@stripe/react-stripe-js": "^1.12.0",
|
||||
|
@ -48,6 +50,7 @@
|
|||
"js-file-download": "^0.4.12",
|
||||
"js-video-url-parser": "^0.5.1",
|
||||
"moment": "^2.29.4",
|
||||
"mui-datatables": "^4.3.0",
|
||||
"mui-daterange-picker": "^1.0.5",
|
||||
"next": "^12.0.10",
|
||||
"next-link": "^2.0.0",
|
||||
|
@ -73,7 +76,6 @@
|
|||
"react-dom": "^17.0.2",
|
||||
"react-draft-wysiwyg": "^1.14.7",
|
||||
"react-dropdown-select": "^4.8.0",
|
||||
"react-dual-range-slider": "^1.0.4",
|
||||
"react-dual-rangeslider": "^1.2.16",
|
||||
"react-elastic-carousel": "^0.11.5",
|
||||
"react-facebook": "^8.1.4",
|
||||
|
|
|
@ -2,7 +2,8 @@ import React, { useRef, useState, useEffect } from "react";
|
|||
import Box from '@mui/material/Box';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
|
||||
import { confirmAlert } from 'react-confirm-alert'; // Import
|
||||
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
||||
import Button from '@mui/material/Button';
|
||||
import axios from "axios";
|
||||
import DeleteIcon from '@mui/icons-material/Delete';
|
||||
|
@ -30,6 +31,7 @@ import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
|||
import { Fab } from "@material-ui/core";
|
||||
import { ConsoleView } from "react-device-detect";
|
||||
import fileDownload from 'js-file-download'
|
||||
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
||||
|
||||
const AddParnerClient = (props) => {
|
||||
const history = useHistory();
|
||||
|
@ -67,21 +69,57 @@ const AddParnerClient = (props) => {
|
|||
|
||||
|
||||
const [importmessage, setimportmessage] = useState("");
|
||||
|
||||
function submenu_donnee_client() {
|
||||
async function submenu_donnee_client() {
|
||||
setsubmenu("submenu_donnee_client");
|
||||
|
||||
console.log(" ### formedit_mode = ", formedit_mode);
|
||||
if( String(formedit_mode) === "0" && p_client_email ){
|
||||
/*
|
||||
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();
|
||||
}
|
||||
|
||||
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";
|
||||
|
||||
|
||||
document.getElementById("submenu_donnee_client").style.background = "#104277";
|
||||
document.getElementById("submenu_donnee_client").style.color = "white";
|
||||
|
||||
}
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
|
||||
function submenu_donnee_facturation() {
|
||||
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();
|
||||
}
|
||||
|
||||
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";
|
||||
|
||||
document.getElementById("submenu_donnee_facturation").style.background = "#104277";
|
||||
document.getElementById("submenu_donnee_facturation").style.color = "white";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -121,14 +159,45 @@ const AddParnerClient = (props) => {
|
|||
}
|
||||
|
||||
|
||||
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 = "#104277";
|
||||
document.getElementById("submenu_donnee_client").style.color = "white";
|
||||
}
|
||||
else if (String(submenu) === "submenu_donnees_facturation") {
|
||||
document.getElementById("submenu_donnee_facturation").style.background = "#104277";
|
||||
document.getElementById("submenu_donnee_facturation").style.color = "white";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
|
||||
if (String(props.new_customer) !== "1") {
|
||||
setformedit_mode("0");
|
||||
setformedit_mode_invoice("0");
|
||||
|
||||
submenu_donnee_client();
|
||||
fillfield(props.client_mail);
|
||||
|
||||
setdatamodification("0");
|
||||
setdatamodification_invoice("0");
|
||||
|
||||
window.scrollTo(0, 0);
|
||||
} else {
|
||||
setformedit_mode("1");
|
||||
setformedit_mode_invoice("1");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}, [props.client_mail,]);
|
||||
|
||||
|
@ -166,50 +235,87 @@ const AddParnerClient = (props) => {
|
|||
|
||||
if (mylocalclient.raison_sociale) {
|
||||
setclient_raison_sociale(mylocalclient.raison_sociale);
|
||||
} else {
|
||||
setclient_raison_sociale("");
|
||||
}
|
||||
|
||||
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("");
|
||||
|
||||
// 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_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("");
|
||||
|
||||
setdatamodification("0");
|
||||
setdatamodification_invoice("0");
|
||||
|
@ -269,27 +375,43 @@ const AddParnerClient = (props) => {
|
|||
// 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_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("");
|
||||
|
||||
Disable_invoice_fields();
|
||||
}
|
||||
|
@ -340,28 +462,48 @@ const AddParnerClient = (props) => {
|
|||
|
||||
if (mylocalclient) {
|
||||
|
||||
// Remplissage des doonées de principale (première tab)
|
||||
if (mylocalclient.raison_sociale) {
|
||||
document.getElementsByName("client_raison_sociale")[0].value = mylocalclient.raison_sociale;
|
||||
setclient_raison_sociale(mylocalclient.raison_sociale);
|
||||
} else {
|
||||
setclient_raison_sociale("");
|
||||
}
|
||||
|
||||
if (mylocalclient.adr_adresse)
|
||||
document.getElementsByName("client_adresse")[0].value = mylocalclient.adr_adresse;
|
||||
setclient_adresse(mylocalclient.adr_adresse);
|
||||
else
|
||||
setclient_adresse("");
|
||||
|
||||
|
||||
if (mylocalclient.adr_ville)
|
||||
document.getElementsByName("client_ville")[0].value = mylocalclient.adr_ville;
|
||||
setclient_ville(mylocalclient.adr_ville);
|
||||
else
|
||||
setclient_ville("");
|
||||
|
||||
if (mylocalclient.adr_pays)
|
||||
document.getElementsByName("client_pays")[0].value = mylocalclient.adr_pays;
|
||||
setclient_pays(mylocalclient.adr_pays);
|
||||
else
|
||||
setclient_pays("");
|
||||
|
||||
if (mylocalclient.siret)
|
||||
document.getElementsByName("client_siret")[0].value = mylocalclient.siret;
|
||||
setclient_siret(mylocalclient.siret);
|
||||
else
|
||||
setclient_siret("");
|
||||
|
||||
if (mylocalclient.tva)
|
||||
document.getElementsByName("client_tva")[0].value = mylocalclient.tva;
|
||||
setclient_tva(mylocalclient.tva);
|
||||
else
|
||||
setclient_tva("");
|
||||
|
||||
if (mylocalclient.website)
|
||||
document.getElementsByName("client_website")[0].value = mylocalclient.website;
|
||||
setclient_website(mylocalclient.website);
|
||||
else
|
||||
setclient_website("");
|
||||
|
||||
if (mylocalclient.telephone)
|
||||
setclient_telephone(mylocalclient.telephone);
|
||||
else
|
||||
setclient_telephone("");
|
||||
|
||||
|
||||
Disable_fields();
|
||||
|
||||
|
@ -567,6 +709,151 @@ const AddParnerClient = (props) => {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function confirm_add_user() {
|
||||
confirmAlert({
|
||||
title: '',
|
||||
message: 'Confirmez la creation du client',
|
||||
buttons: [
|
||||
{
|
||||
label: 'Oui',
|
||||
onClick: () => Add_New_PartnerClient()
|
||||
},
|
||||
{
|
||||
label: 'Non',
|
||||
onClick: () => { return }
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
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 = document.getElementsByName("client_email")[0].value;
|
||||
}
|
||||
form.append("email", client_email);
|
||||
|
||||
|
||||
var client_nom = ""
|
||||
if (document.getElementsByName("client_nom")) {
|
||||
client_nom = document.getElementsByName("client_nom")[0].value;
|
||||
}
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
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);
|
||||
setAdd_New_PartnerClient_api("true");
|
||||
setAdd_New_PartnerClient_result(res.data.message);
|
||||
setformedit_mode("0");
|
||||
setdatamodification("0");
|
||||
Disable_fields();
|
||||
alert(res.data.message);
|
||||
props.Get_List_Partner_Clients();
|
||||
props.close_detail_client();
|
||||
|
||||
|
||||
}
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}).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");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
const [recordPartnerClient_api, setrecordPartnerClient_api] = useState("");
|
||||
const [recordPartnerClient_result, setrecordPartnerClient_result] = useState("");
|
||||
const [recordPartnerClient_message, setrecordPartnerClient_message] = useState("");
|
||||
|
@ -916,17 +1203,216 @@ const AddParnerClient = (props) => {
|
|||
document.getElementsByName("client_invoice_pays")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
}
|
||||
|
||||
function close_detail_client() {
|
||||
props.close_detail_client();
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<div className="add_partner_client">
|
||||
|
||||
{String(props.new_customer) === "1" && <div className="div_row">
|
||||
<div className="div_row">
|
||||
<Button variant="outlined" onClick={submenu_donnee_client} className="detail_submenu" id='submenu_donnee_client' name='submenu_donnee_client'>Données Client</Button>
|
||||
</div>
|
||||
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_email"
|
||||
label="Email"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_email}
|
||||
onChange={(e) => setclient_email(e.target.value)}
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_nom"
|
||||
label="Nom"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_nom}
|
||||
onChange={(e) => setclient_nom(e.target.value)}
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_raison_sociale"
|
||||
label="raison_sociale"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_raison_sociale}
|
||||
onChange={(e) => setclient_raison_sociale(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_siret"
|
||||
label="N° Siret"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_siret}
|
||||
onChange={(e) => setclient_siret(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_tva"
|
||||
label="N° TVA"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_tva}
|
||||
onChange={(e) => setclient_tva(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_adresse"
|
||||
label="Adresse"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_adresse}
|
||||
onChange={(e) => setclient_adresse(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_ville"
|
||||
label="ville"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_ville}
|
||||
onChange={(e) => setclient_ville(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_code_postal"
|
||||
label="Code Postal"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_code_postal}
|
||||
onChange={(e) => setclient_code_postal(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_pays"
|
||||
label="Pays"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_pays}
|
||||
onChange={(e) => setclient_pays(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_telephone"
|
||||
label="Telephone"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_telephone}
|
||||
onChange={(e) => setclient_telephone(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="training_caract">
|
||||
<TextField
|
||||
required
|
||||
name="client_website"
|
||||
label="Site web"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_client_website}
|
||||
onChange={(e) => setclient_website(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
<Button variant="contained" color="success" className="bton_enreg " onClick={confirm_add_user}>Enregistrer <AiTwotoneSave /> </Button>
|
||||
</div>
|
||||
<div className="div_row_droite" style={{ "textAlign": "right" }}>
|
||||
<Button variant="contained" color="success" className="bton_annule" onClick={close_detail_client}>Fermer</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{String(props.new_customer) !== "1" && <div className="div_row">
|
||||
<div className="div_row">
|
||||
<Button variant="outlined" onClick={submenu_donnee_client} className="detail_submenu" id='submenu_donnee_client' name='submenu_donnee_client'>Données Client</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_donnee_facturation' name='submenu_donnee_facturation'>Données Facuturation</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_client} className="detail_submenu" id='submenu_donnee_client' name='submenu_donnee_client'>Contact & Adresses</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_donnee_facturation' name='submenu_donnee_facturation'>Activité</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_donnee_facturation' name='submenu_donnee_facturation'>Devis</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_donnee_facturation' name='submenu_donnee_facturation'>Commandes</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_donnee_facturation' name='submenu_donnee_facturation'>Factures</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_donnee_facturation' name='submenu_donnee_facturation'>Stagiaires</Button>
|
||||
|
||||
<Button variant="outlined" onClick={submenu_donnee_client} className="detail_submenu" id='submenu_contact' name='submenu_contact'>Contact & Adresses</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_activite' name='submenu_activite'>Activité</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_devis' name='submenu_devis'>Devis</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_cmd' name='submenu_cmd'>Commandes</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_factures' name='submenu_factures'>Factures</Button>
|
||||
<Button variant="outlined" onClick={submenu_donnee_facturation} className="detail_submenu" id='submenu_stagiaires' name='submenu_stagiaires'>Stagiaires</Button>
|
||||
</div>
|
||||
|
||||
{String(submenu).trim() === "submenu_donnee_client" && <div className="training_data" onChange={DataUpdated}>
|
||||
|
||||
|
@ -1114,7 +1600,7 @@ const AddParnerClient = (props) => {
|
|||
</div>
|
||||
}
|
||||
|
||||
formedit_mode == {formedit_mode}
|
||||
|
||||
{String(formedit_mode) !== "1" && <div className="div_row">
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": "right" }}>
|
||||
|
@ -1273,6 +1759,13 @@ const AddParnerClient = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
<div className="div_row" style={{
|
||||
"border": "None", "marginLeft": "auto", "marginLeft": "auto", "marginRight": "auto", "textAlign": "center",
|
||||
"marginTop": "1rem", "cursor": "pointer", "marginBottom": "1rem", "marginLeft": "auto", "marginRight": "auto"
|
||||
}} onClick={close_detail_client}>
|
||||
<IoCloseCircleOutline /> Fermer
|
||||
</div>
|
||||
</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
import React, { useRef, useState, useEffect } from "react";
|
||||
import Box from '@mui/material/Box';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import { confirmAlert } from 'react-confirm-alert'; // Import
|
||||
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
||||
import Button from '@mui/material/Button';
|
||||
import axios from "axios";
|
||||
import DeleteIcon from '@mui/icons-material/Delete';
|
||||
import { getCookie, setCookie } from 'react-use-cookie';
|
||||
import { Alert } from "@mui/material";
|
||||
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
|
||||
import profileimg from "../mysy_img/MYSY-profil-2.png";
|
||||
import Abonnement from "./Abonnement";
|
||||
import { PropaneSharp } from "@mui/icons-material";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import CheckOut from "./CheckOut";
|
||||
|
||||
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||
import { RichTextEditor } from '@mantine/rte';
|
||||
import { Editor } from '@tinymce/tinymce-react';
|
||||
import { IoArrowUndoCircle } from "react-icons/io5";
|
||||
import { GrUserAdmin, GrOrderedList } from "react-icons/gr";
|
||||
import parse from 'html-react-parser';
|
||||
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
|
||||
import GestionAdministrative from "./GestionAdministrative";
|
||||
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||
import { Fab } from "@material-ui/core";
|
||||
import { ConsoleView } from "react-device-detect";
|
||||
import fileDownload from 'js-file-download'
|
||||
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
||||
|
||||
const Contact_Partner_Client = (props) => {
|
||||
const history = useHistory();
|
||||
|
||||
|
||||
return (
|
||||
<div className="contact_partner_client">
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Contact_Partner_Client;
|
|
@ -17,7 +17,8 @@ import logowhite from "../mysy_img/MYSY-LOGO-WHITE.png";
|
|||
|
||||
import downarrow from "../mysy_img/downarrow.png";
|
||||
import uparrow from "../mysy_img/uparrow.png";
|
||||
|
||||
import excel_icone from "../mysy_img/excel_icone.png";
|
||||
import participants from "../mysy_img/participants.png";
|
||||
|
||||
import Footer from "./Fotter";
|
||||
import { confirmAlert } from 'react-confirm-alert'; // Import
|
||||
|
@ -39,9 +40,16 @@ import {
|
|||
} from "react-icons/fc";
|
||||
import { DataGrid, GridToolbar, frFR, GridCellParams } from '@mui/x-data-grid';
|
||||
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint, FcDeleteDatabase } from "react-icons/fc";
|
||||
import { darken, lighten, styled } from '@mui/material/styles';
|
||||
|
||||
import AddParnerClient from "./AddPartnerClient";
|
||||
//import { FcHome} from "react-icons/fc";
|
||||
import { alpha } from '@mui/material/styles';
|
||||
import { gridClasses } from '@mui/x-data-grid';
|
||||
import { AiOutlineUserAdd } from "react-icons/ai";
|
||||
|
||||
|
||||
|
||||
|
||||
const Partner_Client = (props) => {
|
||||
|
||||
|
@ -59,10 +67,10 @@ const Partner_Client = (props) => {
|
|||
renderCell: (cellValues) => {
|
||||
return (
|
||||
|
||||
<div style={{ "width": "45%", "float": "center" }} onClick={(event) => {
|
||||
<div style={{ "marginLeft": "auto", "marginRight": "auto", }} onClick={(event) => {
|
||||
handleClick_modifier(event, cellValues);
|
||||
}}>
|
||||
<FcAcceptDatabase />
|
||||
<FcAcceptDatabase style={{ "fontSize": "x-large" }} />
|
||||
</div>
|
||||
|
||||
);
|
||||
|
@ -73,10 +81,10 @@ const Partner_Client = (props) => {
|
|||
renderCell: (cellValues) => {
|
||||
return (
|
||||
|
||||
<div style={{ "width": "45%", "float": "center" }} onClick={(event) => {
|
||||
<div style={{ "marginLeft": "auto", "marginRight": "auto", }} onClick={(event) => {
|
||||
handleClick_supprimer(event, cellValues);
|
||||
}}>
|
||||
<FcDeleteDatabase />
|
||||
<FcDeleteDatabase style={{ "fontSize": "x-large" }} />
|
||||
</div>
|
||||
|
||||
);
|
||||
|
@ -86,6 +94,9 @@ const Partner_Client = (props) => {
|
|||
|
||||
]
|
||||
|
||||
const [rowSelectionModel, setRowSelectionModel] = React.useState([]);
|
||||
|
||||
|
||||
const [Edite_Client, setEdite_Client] = useState("");
|
||||
const [Client_email, setClient_email] = useState("");
|
||||
function handleClick_modifier(event, cellValues) {
|
||||
|
@ -94,15 +105,17 @@ const Partner_Client = (props) => {
|
|||
setEdite_Client("1");
|
||||
}
|
||||
|
||||
function handleClick_add_new_client(event, cellValues) {
|
||||
setEdite_Client("2");
|
||||
}
|
||||
|
||||
|
||||
function handleClick_supprimer(event, cellValues) {
|
||||
var clientmail = String(cellValues.row.email);
|
||||
alert(" en cours de dev");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const [Get_List_Partner_Clients_api, setGet_List_Partner_Clients_api] = useState();
|
||||
const [Get_List_Partner_Clients_message, setGet_List_Partner_Clients_message] = useState();
|
||||
const [Get_List_Partner_Clients_result, setGet_List_Partner_Clients_result] = useState();
|
||||
|
@ -117,8 +130,8 @@ const Partner_Client = (props) => {
|
|||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Partner_List_Partner_Client/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
console.log(" In Get_List_Partner_Clients res.data.status = " + res.data.status);
|
||||
console.log(" In Get_List_Partner_Clients res.data.message r_class = " + res.data.message);
|
||||
//console.log(" In Get_List_Partner_Clients res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_List_Partner_Clients res.data.message r_class = " + res.data.message);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setGet_List_Partner_Clients_api("true");
|
||||
|
@ -141,6 +154,11 @@ const Partner_Client = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
function close_detail_client() {
|
||||
|
||||
setEdite_Client("0");
|
||||
|
||||
}
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -149,6 +167,7 @@ const Partner_Client = (props) => {
|
|||
|
||||
}, []);
|
||||
|
||||
|
||||
return (
|
||||
|
||||
<div className="partner_client">
|
||||
|
@ -159,7 +178,16 @@ const Partner_Client = (props) => {
|
|||
|
||||
<div className="titre1"> Detail client : {Client_email}</div>
|
||||
|
||||
<AddParnerClient client_mail={Client_email}/>
|
||||
<AddParnerClient client_mail={Client_email} close_detail_client={close_detail_client} />
|
||||
|
||||
</div>}
|
||||
|
||||
{String(Edite_Client) === "2" && <div className="div_row">
|
||||
|
||||
<div className="titre1"> Detail client : {Client_email}</div>
|
||||
|
||||
<AddParnerClient client_mail={Client_email} close_detail_client={close_detail_client} new_customer="1"
|
||||
Get_List_Partner_Clients={Get_List_Partner_Clients} />
|
||||
|
||||
</div>}
|
||||
|
||||
|
@ -168,13 +196,17 @@ const Partner_Client = (props) => {
|
|||
|
||||
<div className="div_row">
|
||||
<div style={{ height: 500, width: '100%' }}>
|
||||
<div className="div_row">
|
||||
<Button variant="outlined" onClick={handleClick_add_new_client}
|
||||
className="detail_class_submenu bton_add_session"
|
||||
id='menu_one_participant' name='menu_one_participant'><img src={participants} alt="ajout un client" className="icon_plus" />
|
||||
Ajouter 1 Client
|
||||
|
||||
</Button>
|
||||
|
||||
</div>
|
||||
<DataGrid
|
||||
checkboxSelection
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setSelectionModel(newSelectionModel);
|
||||
//console.log("ch selected--" + newSelectionModel);
|
||||
}}
|
||||
selectionModel={selectionModel}
|
||||
|
||||
|
||||
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
|
||||
rows={rows_list_clients.map((item, index) => (
|
||||
|
@ -206,6 +238,27 @@ const Partner_Client = (props) => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="titre1"> Grid des clients</div>
|
||||
<div className="div_row" style={{"marginLeft":"5px", "marginRight":"5px"}}>
|
||||
<div className="client_grid">
|
||||
|
||||
{Get_List_Partner_Clients_result && String(Get_List_Partner_Clients_api) === "true" &&
|
||||
Get_List_Partner_Clients_result.map((client) => (
|
||||
|
||||
<div>
|
||||
mail = {String(JSON.parse(client).email)} <br/>
|
||||
nom = {String(JSON.parse(client).nom)} <br/>
|
||||
Tel = {String(JSON.parse(client).telephone)} <br/>
|
||||
Adresse = {String(JSON.parse(client).adr_adresse)} - {String(JSON.parse(client).adr_ville)} <br/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -11,11 +11,13 @@ import bannerimg from "../mysy_img/MYSY_banner_compte.png";
|
|||
import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png";
|
||||
import { useParams } from 'react-router-dom'
|
||||
import Select, { StylesConfig } from 'react-select';
|
||||
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import { Fade } from 'react-slideshow-image';
|
||||
import { getCookie, setCookie } from 'react-use-cookie';
|
||||
import Button from '@mui/material/Button';
|
||||
|
||||
import { FaHandPointRight } from "react-icons/fa";
|
||||
|
||||
import Header from "./Header";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import fileDownload from 'js-file-download'
|
||||
|
@ -55,12 +57,19 @@ import {
|
|||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
|
||||
import MUIDataTable from "mui-datatables";
|
||||
import { createTheme, ThemeProvider } from '@mui/material/styles';
|
||||
|
||||
|
||||
|
||||
// pour le payement stripe : https://stripe.com/docs/payments/quickstart?client=react&lang=python
|
||||
const stripePromise = loadStripe('pk_test_51LUUfAAbmaEugrFTI25uZBD3IFjbtaL6jUfRV83diDf7nco8worna4NGKhMHbPP71WCwT5EHFRdDNatxPrJWwgZ300kgH5EO4p');
|
||||
|
||||
|
||||
|
||||
const TestUrl = (props) => {
|
||||
|
||||
|
||||
const stripe = useStripe();
|
||||
const elements = useElements();
|
||||
|
||||
|
@ -71,153 +80,14 @@ const TestUrl = (props) => {
|
|||
clientSecret: '{{CLIENT_SECRET}}',
|
||||
};
|
||||
|
||||
const particleOptions = [
|
||||
{
|
||||
'maxParticles': 50,
|
||||
'colors': ['#2E1D62', '#513D91', '#487EEF', '#11A887', '#fc5c65', '#fed330'],
|
||||
'shapes': ['circle', 'square'],
|
||||
'size': 10,
|
||||
'minSpeed': 0.05,
|
||||
'maxSpeed': 0.20,
|
||||
'alpha': 0.70,
|
||||
'backgroundColor': '#1E1F29'
|
||||
}
|
||||
]
|
||||
|
||||
const data = [
|
||||
{ x: 0, y: 0 },
|
||||
{ x: 1, y: 2 },
|
||||
{ x: 2, y: 1 },
|
||||
{ x: 3, y: 4 },
|
||||
{ x: 4, y: 3 },
|
||||
{ x: 5, y: 5 }
|
||||
];
|
||||
|
||||
const cartesianInterpolations = [
|
||||
"basis",
|
||||
"bundle",
|
||||
"cardinal",
|
||||
"catmullRom",
|
||||
"linear",
|
||||
"monotoneX",
|
||||
"monotoneY",
|
||||
"natural",
|
||||
"step",
|
||||
"stepAfter",
|
||||
"stepBefore"
|
||||
];
|
||||
|
||||
const polarInterpolations = [
|
||||
"basis",
|
||||
"cardinal",
|
||||
"catmullRom",
|
||||
"linear"
|
||||
];
|
||||
|
||||
const InterpolationSelect = ({ currentValue, values, onChange }) => (
|
||||
<select onChange={onChange} value={currentValue} style={{ width: 75 }}>
|
||||
{values.map(
|
||||
(value) => <option value={value} key={value}>{value}</option>
|
||||
)}
|
||||
</select>
|
||||
);
|
||||
|
||||
const [interpolation, setinterpolation] = useState("linear");
|
||||
const [polar, setpolar] = useState(false);
|
||||
|
||||
|
||||
// note: the id field is mandatory
|
||||
const items = [
|
||||
{
|
||||
id: 0,
|
||||
name: 'Cobol'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: 'JavaScript'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'Basic'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'PHP'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: 'Java'
|
||||
}
|
||||
]
|
||||
|
||||
// note: the id field is mandatory
|
||||
const items2 = [
|
||||
{ id: 1, name: "ADN" },
|
||||
{ id: 2, name: "AFP" },
|
||||
{ id: 3, name: "ANC" },
|
||||
{ id: 4, name: "Aaron" },
|
||||
{ id: 5, name: "Abdel" },
|
||||
{ id: 6, name: "Abidjan" },
|
||||
{ id: 7, name: "Abyssin" },
|
||||
{ id: 8, name: "Abyssine" },
|
||||
{ id: 9, name: "Abyssinie" },
|
||||
{ id: 10, name: "Abyssinien" },
|
||||
{ id: 11, name: "Abyssinienne" },
|
||||
{ id: 12, name: "Academie" },
|
||||
{ id: 13, name: "Adam" },
|
||||
{ id: 14, name: "Adams" },
|
||||
{ id: 15, name: "Afghan" },
|
||||
{ id: 16, name: "Afghane" },
|
||||
{ id: 17, name: "Afghanistan" },
|
||||
{ id: 18, name: "Afghans" },
|
||||
{ id: 19, name: "Afrique" },
|
||||
{ id: 20, name: "Agathe" },
|
||||
{ id: 21, name: "Agen" },
|
||||
{ id: 22, name: "Agnes" },
|
||||
{ id: 23, name: "Ahmed" },
|
||||
{ id: 24, name: "Ain" },
|
||||
{ id: 25, name: "Aisne" },
|
||||
{ id: 26, name: "Aix" },
|
||||
{ id: 27, name: "Ajaccio" },
|
||||
{ id: 28, name: "Ajax" },
|
||||
{ id: 29, name: "Akbar" },
|
||||
{ id: 30, name: "Alain" },
|
||||
{ id: 31, name: "Albanais" },
|
||||
{ id: 32, name: "Albanaise" },
|
||||
{ id: 33, name: "Albanie" },
|
||||
{ id: 34, name: "Albert" },
|
||||
{ id: 35, name: "Albin" },
|
||||
{ id: 36, name: "Alexandra" },
|
||||
]
|
||||
|
||||
|
||||
const handleOnSearch = (string, results) => {
|
||||
// onSearch will have as the first callback parameter
|
||||
// the string searched and for the second the results.
|
||||
//console.log(string, results)
|
||||
}
|
||||
|
||||
const handleOnHover = (result) => {
|
||||
// the item hovered
|
||||
//console.log(result)
|
||||
}
|
||||
|
||||
const handleOnSelect = (item) => {
|
||||
// the item selected
|
||||
//console.log(item)
|
||||
}
|
||||
|
||||
const handleOnFocus = () => {
|
||||
//console.log('Focused')
|
||||
}
|
||||
|
||||
const formatResult = (item) => {
|
||||
return (
|
||||
<>
|
||||
<span style={{ display: 'block', textAlign: 'left' }}> {item.name}</span>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const [suggestedwords, setsuggestedwords] = useState([]);
|
||||
const [texte, settext] = useState("");
|
||||
|
@ -489,116 +359,6 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
|
|||
|
||||
const [my_tabb, setmy_tabb] = useState([]);
|
||||
|
||||
function Get_Top_test_Stat() {
|
||||
var form = new FormData();
|
||||
|
||||
var date_start = ""
|
||||
var date_end = ""
|
||||
|
||||
var my_tab = [];
|
||||
|
||||
if (state[0].startDate) {
|
||||
//console.log("Start = " + state[0].startDate);
|
||||
//console.log("Start = " + moment(state[0].startDate).format('YYYY-MM-DD'));
|
||||
date_start = moment(state[0].startDate).format('YYYY-MM-DD');
|
||||
}
|
||||
if (state[0].endDate) {
|
||||
//console.log("endDate = " + state[0].endDate);
|
||||
//console.log("END = " + moment(state[0].endDate).format('YYYY-MM-DD'));
|
||||
date_end = moment(state[0].endDate).format('YYYY-MM-DD');
|
||||
}
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetStat_class_view_topX/";
|
||||
form.append("date_start", date_start);
|
||||
form.append("date_end", date_end);
|
||||
form.append('token', 'cherif');
|
||||
form.append('topX', '5');
|
||||
|
||||
//alert("myurl = "+myurl);
|
||||
|
||||
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 test res.data.message = " + res.data.message);
|
||||
|
||||
res.data.message.map(obj => {
|
||||
if (JSON.parse(obj).name1) {
|
||||
//console.log(" ---name_serie = " + JSON.parse(obj).name1 + " data_series = " + JSON.parse(obj).data1);
|
||||
var ch_data2 = JSON.parse(obj).data1;
|
||||
|
||||
let new_data2 = ch_data2.map(i => Number(i));
|
||||
setdetail_view_data1(new_data2);
|
||||
|
||||
|
||||
var nom = JSON.parse(obj).name1;
|
||||
setdetail_view_data1_name(nom);
|
||||
//console.log("new_data2 = ", ch_data2);
|
||||
//console.log("result = ", new_data2);
|
||||
|
||||
}
|
||||
|
||||
if (JSON.parse(obj).name2) {
|
||||
//console.log(" ---name_serie = " + JSON.parse(obj).name2 + " data_series = " + JSON.parse(obj).data2);
|
||||
var ch_data2 = JSON.parse(obj).data2;
|
||||
let new_data2 = ch_data2.map(i => Number(i));
|
||||
setdetail_view_data2(new_data2);
|
||||
|
||||
var nom = JSON.parse(obj).name2;
|
||||
setdetail_view_data2_name(nom);
|
||||
}
|
||||
|
||||
if (JSON.parse(obj).name3) {
|
||||
//console.log(" ---name_serie = " + JSON.parse(obj).name3 + " data_series = " + JSON.parse(obj).data3);
|
||||
var ch_data2 = JSON.parse(obj).data3;
|
||||
let new_data2 = ch_data2.map(i => Number(i));
|
||||
setdetail_view_data3(new_data2);
|
||||
|
||||
var nom = JSON.parse(obj).name3;
|
||||
setdetail_view_data3_name(nom);
|
||||
}
|
||||
|
||||
if (JSON.parse(obj).name4) {
|
||||
//console.log(" ---name_serie = " + JSON.parse(obj).name4 + " data_series = " + JSON.parse(obj).data4);
|
||||
var ch_data2 = JSON.parse(obj).data4;
|
||||
let new_data2 = ch_data2.map(i => Number(i));
|
||||
setdetail_view_data4(new_data2);
|
||||
|
||||
var nom = JSON.parse(obj).name4;
|
||||
setdetail_view_data4_name(nom);
|
||||
}
|
||||
|
||||
if (JSON.parse(obj).categories) {
|
||||
//console.log(" ---categories = " + JSON.parse(obj).categories);
|
||||
var ch_data2 = JSON.parse(obj).categories;
|
||||
var new_data2 = ch_data2.split(',');
|
||||
setdetail_view_categorie(new_data2);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
//console.log(" In test res.data.status = " + res.data.status);
|
||||
//console.log(" In test res.data.message = " + res.data.message);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( mysearchtext sss= ');
|
||||
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function ici() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
const [topX_formation, settopX_formation] = useState([]);
|
||||
|
@ -693,21 +453,7 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
|
|||
key: 'selection',
|
||||
}
|
||||
|
||||
function handleSelect(ranges) {
|
||||
|
||||
//console.log("Start = " + moment(ranges.selection.startDate).format('DD/MM/YYYY'));
|
||||
//console.log("END = " + moment(ranges.selection.endDate).format('DD/MM/YYYY'));
|
||||
|
||||
//console.log("Start = "+ranges.selection.startDate.format('YYYY-MM-DD'));
|
||||
//console.log("Start = " + ranges.selection.startDate);
|
||||
//console.log("END = " + ranges.selection.endDate);
|
||||
// {
|
||||
// selection: {
|
||||
// startDate: [native Date Object],
|
||||
// endDate: [native Date Object],
|
||||
// }
|
||||
// }
|
||||
}
|
||||
const today = new Date();
|
||||
const tomorrow = new Date(today);
|
||||
const [state, setState] = useState([
|
||||
|
@ -830,18 +576,7 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
|
|||
|
||||
}
|
||||
|
||||
const PopupExample = () => (
|
||||
<Popup trigger={<button>Trigger</button>} position="top left">
|
||||
{close => (
|
||||
<div>
|
||||
Content here
|
||||
<a className="close" onClick={close}>
|
||||
×
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -878,6 +613,102 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
|
|||
|
||||
}
|
||||
|
||||
const columns = ["Name", "Company", "City", "State"];
|
||||
|
||||
const data11 = [
|
||||
["Joe James", "Test Corp", "Yonkers", "NY"],
|
||||
["John Walsh", "Test Corp", "Hartford", "CT"],
|
||||
["Bob Herm", "Test Corp", "Tampa", "FL"],
|
||||
["James Houston", "Test Corp", "Dallas", "TX"],
|
||||
];
|
||||
|
||||
function hellofoo(){
|
||||
alert(" hellooooooooo");
|
||||
}
|
||||
|
||||
const options11 = {
|
||||
filterType: 'checkbox',
|
||||
selectableRows: 'single',
|
||||
selectableRowsOnClick: true,
|
||||
customToolbar: () => {
|
||||
return (
|
||||
<IconButton style={{ order: -1 }} onClick={hellofoo}>
|
||||
<FaHandPointRight />
|
||||
</IconButton>
|
||||
);
|
||||
},
|
||||
|
||||
selectedRows: {
|
||||
text: "ligne(s) selectionée(s)",
|
||||
delete: "Supprimer",
|
||||
deleteAria: "Delete Selected Rows",
|
||||
},
|
||||
toolbar: {
|
||||
search: "Recherche",
|
||||
downloadCsv: "Download CSV",
|
||||
print: "Imprimer",
|
||||
viewColumns: "Voir Columns",
|
||||
filterTable: "Filtrer Table",
|
||||
},
|
||||
pagination: {
|
||||
next: "Prochaine Page",
|
||||
previous: "Page Precedente",
|
||||
rowsPerPage: "ligne par page:",
|
||||
displayRows: "of",
|
||||
},
|
||||
};
|
||||
|
||||
const getMuiTheme = () =>
|
||||
createTheme({
|
||||
components: {
|
||||
|
||||
MuiTableCell: {
|
||||
styleOverrides: {
|
||||
root: {
|
||||
padding: '8px',
|
||||
//backgroundColor: '#CDCAC6',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
MUIDataTableToolbar: {
|
||||
actions: {
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
flex: 'initial',
|
||||
},
|
||||
},
|
||||
|
||||
MuiToolbar: {
|
||||
styleOverrides: {
|
||||
regular: {
|
||||
minHeight: '8px',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
MuiTableRow: {
|
||||
root: {
|
||||
"&.MuiTableRow-hover": {
|
||||
"&:hover": {
|
||||
backgroundColor: "yellow",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div className="test_page2">
|
||||
<Helmet>
|
||||
|
@ -893,6 +724,21 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
|
|||
|
||||
<h2> cartouche formaion </h2>
|
||||
|
||||
<div style={{ "width": "100%", }}>
|
||||
|
||||
<ThemeProvider theme={getMuiTheme()}>
|
||||
<MUIDataTable
|
||||
title={"Employee List"}
|
||||
data={data11}
|
||||
columns={columns}
|
||||
options={options11}
|
||||
/>
|
||||
<IconButton style={{ order: -1 }} onClick={hellofoo}>
|
||||
<FaHandPointRight /> Ajouter une ligne
|
||||
</IconButton>
|
||||
</ThemeProvider>
|
||||
|
||||
</div>
|
||||
<Tooltip id="my-tooltip" />
|
||||
|
||||
<a data-tooltip-id="my-tooltip" data-tooltip-content="Hello world!">
|
||||
|
|
|
@ -173,6 +173,15 @@
|
|||
letter-spacing: 0.1rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
.detail_submenu:hover,
|
||||
.detail_submenu:focus,
|
||||
.detail_submenu:active,
|
||||
.detail_submenu:checked {
|
||||
background-color: #104277;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,187 @@
|
|||
.contact_partner_client {
|
||||
|
||||
.okUpdateData {
|
||||
font-size: small;
|
||||
color: green;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.koUpdateData {
|
||||
font-size: small;
|
||||
color: red;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {}
|
||||
|
||||
@media only screen and (min-width: 601px) and (max-width: 991px) {}
|
||||
|
||||
@media only screen and (min-width: 992px) and (max-width: 1199px) {}
|
||||
|
||||
@media only screen and (min-width: 1200px) {
|
||||
|
||||
.div_row {
|
||||
float: left;
|
||||
//border:0px solid black;
|
||||
border-width: 0.01rem;
|
||||
width: 100%;
|
||||
margin-bottom: 1rem;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.div_row_gauche {
|
||||
float: left;
|
||||
//border:0px solid black;
|
||||
border-width: 0.01rem;
|
||||
width: 48%;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.div_row_droite {
|
||||
float: right;
|
||||
//border:0px solid black;
|
||||
border-width: 0.01rem;
|
||||
width: 48%;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.titre1 {
|
||||
font-family: "Quicksand", "Signika", sans-serif;
|
||||
font-size: medium;
|
||||
text-align: center;
|
||||
margin-bottom: 0.8rem;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
font-style: italic;
|
||||
background-color: gray;
|
||||
font-weight: normal;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.training_data {
|
||||
float: left;
|
||||
width: 100%;
|
||||
box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5);
|
||||
border-radius: 10px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.training_caract {
|
||||
width: 30%;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.training_text {
|
||||
width: 50%;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
height: 320px !important;
|
||||
min-height: 320px !important;
|
||||
max-height: 320px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.titre_training_text {
|
||||
font-size: small;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input {
|
||||
padding-left: 5px !important;
|
||||
}
|
||||
|
||||
.css-1sumxir-MuiFormLabel-root-MuiInputLabel-root {
|
||||
margin-left: 1px !important;
|
||||
}
|
||||
|
||||
.disabled_style {
|
||||
//background-color: #ECEFF1;
|
||||
font-size: small !important;
|
||||
color: black;
|
||||
width: 90% !important;
|
||||
height: 3rem !important;
|
||||
margin: 5px !important;
|
||||
}
|
||||
|
||||
.bton_suppr {
|
||||
background: transparent;
|
||||
color: red;
|
||||
border-radius: 5rem;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
height: 2.5rem;
|
||||
width: 40%;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.bton_enreg {
|
||||
border-radius: 5rem;
|
||||
font-size: small;
|
||||
background: #81BC3A !important;
|
||||
text-align: right;
|
||||
height: 2.5rem;
|
||||
width: 40%;
|
||||
color: white;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.bton_edit {
|
||||
border-radius: 5rem;
|
||||
font-size: small;
|
||||
background: black !important;
|
||||
text-align: right;
|
||||
height: 2.5rem;
|
||||
width: 40%;
|
||||
color: white;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.bton_annule {
|
||||
border-radius: 5rem;
|
||||
font-size: small;
|
||||
background: lightgray !important;
|
||||
text-align: right;
|
||||
height: 2.5rem;
|
||||
width: 40%;
|
||||
color: black;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.detail_submenu {
|
||||
background: #d8edfc;
|
||||
border-radius: 15px;
|
||||
margin-right: 1rem;
|
||||
padding: 0.3rem;
|
||||
margin-bottom: 0.5rem;
|
||||
min-width: 10rem;
|
||||
text-align: center;
|
||||
border: 1px solid #9cf;
|
||||
color: #3b3e40;
|
||||
font-family: "verdana", "Quicksand", "Signika", sans-serif;
|
||||
font-size: small;
|
||||
letter-spacing: 0.1rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
.detail_submenu:hover,
|
||||
.detail_submenu:focus,
|
||||
.detail_submenu:active,
|
||||
.detail_submenu:checked {
|
||||
background-color: #104277;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -59,6 +59,58 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.detail_submenu {
|
||||
background: #d8edfc;
|
||||
border-radius: 15px;
|
||||
margin-right: 1rem;
|
||||
padding: 0.3rem;
|
||||
margin-bottom: 0.5rem;
|
||||
min-width: 10rem;
|
||||
text-align: center;
|
||||
border: 1px solid #9cf;
|
||||
color: #3b3e40;
|
||||
font-family: "verdana", "Quicksand", "Signika", sans-serif;
|
||||
font-size: small;
|
||||
letter-spacing: 0.1rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
.bton_add_session {
|
||||
background: #c8cfd5;
|
||||
color: black;
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.icon_plus {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
|
||||
.client_grid {
|
||||
margin-right: 10px !important;
|
||||
margin-left: 10px !important;
|
||||
display: grid;
|
||||
height: 200px;
|
||||
grid-template: repeat(2, 1fr) / repeat(2, 1fr);
|
||||
gap: 20px 10px;
|
||||
}
|
||||
|
||||
.client_grid>div {
|
||||
display: inline-block;
|
||||
color: #444;
|
||||
border: 1px solid #CCC;
|
||||
background: #DDD;
|
||||
box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%);
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.client_grid>div:hover {
|
||||
box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -66,3 +66,4 @@
|
|||
@import "./components/hebergementlms";
|
||||
@import "./components/addpartnerclient";
|
||||
@import "./components/partnerclient";
|
||||
@import "./components/contactpartnerclient"
|
||||
|
|
Loading…
Reference in New Issue