+
+
+
+
+
+
+
+
+
+
+ {String(submenu).trim() === "submenu_donnee_client" &&
+
+
+ setclient_email(e.target.value)}
+
+ />
+
+
+
+
+ setclient_nom(e.target.value)}
+
+ />
+
+
+
+
+ setclient_raison_sociale(e.target.value)}
+ />
+
+
+
+
+ setclient_siret(e.target.value)}
+ />
+
+
+
+ setclient_tva(e.target.value)}
+ />
+
+
+
+ setclient_adresse(e.target.value)}
+ />
+
+
+ setclient_ville(e.target.value)}
+ />
+
+
+ setclient_code_postal(e.target.value)}
+ />
+
+
+ setclient_pays(e.target.value)}
+ />
+
+
+
+ setclient_telephone(e.target.value)}
+ />
+
+
+
+ setclient_website(e.target.value)}
+ />
+
+
+
+
+
+
+
+ {String(datamodification) === "1" &&
+
/!\ Pensez à enregistrer les modifications
}
+ {String(formedit_mode) === "1" &&
+ }
+
+ formedit_mode == {formedit_mode}
+ {String(formedit_mode) !== "1" &&
+ }
+
+
}
+
+ {String(submenu).trim() === "submenu_donnees_facturation" &&
+
+
+ setclient_invoice_email(e.target.value)}
+ />
+
+
+
+
+ setclient_invoice_nom(e.target.value)}
+ />
+
+
+
+
+
+ setclient_invoice_siret(e.target.value)}
+ />
+
+
+
+ setclient_invoice_tva(e.target.value)}
+ />
+
+
+
+ setclient_invoice_adresse(e.target.value)}
+ />
+
+
+ setclient_invoice_ville(e.target.value)}
+ />
+
+
+ setclient_invoice_code_postal(e.target.value)}
+ />
+
+
+ setclient_invoice_pays(e.target.value)}
+ />
+
+
+
+
+
+
+
+ {String(datamodification_invoice) === "1" &&
+
/!\ Pensez à enregistrer les modifications
}
+ {String(formedit_mode_invoice) === "1" &&
+ }
+ {String(formedit_mode_invoice) !== "1" &&
+ }
+
+
}
+
+
+ );
+}
+
+export default AddParnerClient;
+
diff --git a/src/components/Partner.js b/src/components/Partner.js
index 8fafd02..2e429b9 100644
--- a/src/components/Partner.js
+++ b/src/components/Partner.js
@@ -31,6 +31,7 @@ import CheckOut from "./CheckOut";
import { IoCheckmarkCircleSharp } from "react-icons/io5";
import { FaHandPointRight } from "react-icons/fa";
import OrderConfirmation from "./OrderConfirmation";
+import Partner_Client from "./Partner_Client";
import Pricing from "./Pricing";
import {
FcHome, FcButtingIn, FcDepartment, FcBullish, FcAddDatabase, FcFolder,
@@ -135,7 +136,7 @@ const Partner = (props) => {
formData.append("token", stored_cookie);
-
+
//console.log("token = " + stored_cookie); theme_name
fetch(
@@ -153,7 +154,7 @@ const Partner = (props) => {
setapiexcelimportmessage(result['status']);
if (String(result['status']) === String("true")) {
sethandleSubmission_api("true");
- }else if (String(result['status']) === String("Err_Connexion")) {
+ } else if (String(result['status']) === String("Err_Connexion")) {
alert('Erreur: ' + result['message']);
history.push("/Connexion");
}
@@ -291,6 +292,25 @@ const Partner = (props) => {
setformation_file_name();
}
+ function mes_clients_func(event) {
+ setmenu("mes_clients");
+ setapiexcelimportmessage();
+ setformation_file_name();
+ }
+
+ function mes_devis_func(event) {
+ setmenu("mes_devis");
+ setapiexcelimportmessage();
+ setformation_file_name();
+ }
+
+ function mes_cmd_func(event) {
+ setmenu("mes_cmd");
+ setapiexcelimportmessage();
+ setformation_file_name();
+ }
+
+
function DiplaytrainingList(event) {
setmenu("affichage");
@@ -568,7 +588,7 @@ const Partner = (props) => {
my_lms_url = (JSON.parse(res.data.message).lms_virtualhost_url) + "user_portal.php?recid=" + encodeURIComponent(JSON.parse(res.data.message).lms_part_recid) +
"&mysytoken=" + encodeURIComponent(JSON.parse(res.data.message).lms_pwd_mask);
- console.log(" ### LMS url = ", my_lms_url);
+ //console.log(" ### LMS url = ", my_lms_url);
setpartner_lms_url(my_lms_url);
}
@@ -595,6 +615,16 @@ const Partner = (props) => {
}
}
+ const [deplie_mes_clients, setdeplie_mes_clients] = useState();
+ function ftion_deplie_mes_clients() {
+ if (String(deplie_mes_clients) === "1") {
+ setdeplie_mes_clients();
+ } else {
+ setdeplie_mes_clients("1");
+ }
+
+ }
+
return (
@@ -661,33 +691,65 @@ const Partner = (props) => {
- Espace Hébergement

+ {String(deplie_mes_clients) === "1" &&
+ Mes Clients
}
-
- {String(deplie_hebergement) !== "1" &&
-
-
-
-
- {String(has_partner_lms_url) === "1" &&
{
- e.preventDefault();
- window.open(
- partner_lms_url,
- '_blank'
- );
- }}> MON HEBERGEMENT
}
-
- {String(has_partner_lms_url) === "1" &&
+ {String(deplie_mes_clients) !== "1" &&
+
+
- {String(menu) !== "statistique" &&
CONFIGURATION
}
- {String(menu) === "statistique" &&
CONFIGURATION
}
+
+
+
+ {String(menu) !== "mes_clients" &&
MES CLIENTS
}
+ {String(menu) === "mes_clients" &&
MES CLIENTS
}
+
+
+
+
+ {String(menu) !== "mes_devis" &&
MES DEVIS
}
+ {String(menu) === "mes_devis" &&
MES DEVIS
}
+
+
+
+
+ {String(menu) !== "mes_cmd" &&
MES COMMANDES
}
+ {String(menu) === "mes_cmd" &&
MES COMMANDES
}
+
}
+
+
+
+
+ {String(deplie_hebergement) === "1" &&
+ Espace Hébergement
}
+
+
+ {String(deplie_hebergement) !== "1" &&
+
+
+
+
+ {String(has_partner_lms_url) === "1" &&
{
+ e.preventDefault();
+ window.open(
+ partner_lms_url,
+ '_blank'
+ );
+ }}> MON HEBERGEMENT
}
+
+ {String(has_partner_lms_url) === "1" &&
+
+ {String(menu) !== "statistique" &&
CONFIGURATION
}
+ {String(menu) === "statistique" &&
CONFIGURATION
}
+
}
+
}
+
@@ -919,6 +981,13 @@ const Partner = (props) => {
}
+ {String(menu) === "mes_clients" &&
+ }
+
+
diff --git a/src/components/Partner_Client.js b/src/components/Partner_Client.js
index 78a08ca..0390384 100644
--- a/src/components/Partner_Client.js
+++ b/src/components/Partner_Client.js
@@ -37,15 +37,177 @@ import {
FcList, FcGraduationCap, FcMultipleDevices, FcCurrencyExchange,
FcMoneyTransfer, FcFeedback, FcKey, FcVideoCall, FcSettings
} 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 AddParnerClient from "./AddPartnerClient";
//import { FcHome} from "react-icons/fc";
const Partner_Client = (props) => {
+ const history = useHistory();
+
+ const [rows_list_clients, setrows_list_clients] = useState([]);
+ const [selectionModel, setSelectionModel] = React.useState([]);
+ const columns_clients = [
+ { field: 'id', headerName: 'id', hide: true },
+ { field: 'email', headerName: 'email', width: 100, hideable: false, flex: 1 },
+ { field: 'nom', headerName: 'nom', width: 100, hide: false, editable: true },
+
+ {
+ field: "update", headerName: 'Modifier',
+ renderCell: (cellValues) => {
+ return (
+
+
{
+ handleClick_modifier(event, cellValues);
+ }}>
+
+
+
+ );
+ }
+ },
+ {
+ field: "delete", headerName: 'Supprimer',
+ renderCell: (cellValues) => {
+ return (
+
+
{
+ handleClick_supprimer(event, cellValues);
+ }}>
+
+
+
+ );
+ }
+ },
+
+
+ ]
+
+ const [Edite_Client, setEdite_Client] = useState("");
+ const [Client_email, setClient_email] = useState("");
+ function handleClick_modifier(event, cellValues) {
+ var clientmail = String(cellValues.row.email);
+ setClient_email(clientmail);
+ setEdite_Client("1");
+ }
+
+ 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();
+ function Get_List_Partner_Clients(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_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);
+
+ if (String(res.data.status) === String("true")) {
+ setGet_List_Partner_Clients_api("true");
+ setGet_List_Partner_Clients_result(res.data.message);
+ setrows_list_clients(res.data.message);
+ }
+ else if (String(res.data.status) === String("Err_Connexion")) {
+ alert('Erreur: ' + res.data.message);
+ history.push("/Connexion");
+ }
+ else {
+ setGet_List_Partner_Clients_api("false");
+ setGet_List_Partner_Clients_message(res.data.message);
+ }
+
+ }).catch((error) => {
+ console.warn('Not good man :( Get_List_Partner_Clients = ', error);
+ setGet_List_Partner_Clients_api("false");
+ //setmyApimyApiMessage("")
+ })
+ }
+
+
+
+ useEffect(() => {
+ //menu_info();
+ Get_List_Partner_Clients();
+
+ }, []);
+
return (
+
+
+ {String(Edite_Client) === "1" &&
+
+
Detail client : {Client_email}
+
+
+
+ }
+
+
+
Liste des clients
+
+
+
+ {
+ setSelectionModel(newSelectionModel);
+ //console.log("ch selected--" + newSelectionModel);
+ }}
+ selectionModel={selectionModel}
+
+ localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
+ rows={rows_list_clients.map((item, index) => (
+ {
+ id: index,
+ email: JSON.parse(item).email,
+ nom: JSON.parse(item).nom,
+
+ }
+ ))}
+
+ columns={columns_clients}
+ pageSize={10}
+ className="datagridclass"
+
+ rowsPerPageOptions={[10]}
+ disableSelectionOnClick
+ components={{
+ Toolbar: GridToolbar,
+ }}
+
+
+ />
+
+
+
+
+ {/* */}
+
+
+
+
+
)
diff --git a/src/styles/components/_addpartnerclient.scss b/src/styles/components/_addpartnerclient.scss
new file mode 100644
index 0000000..5e8fb3b
--- /dev/null
+++ b/src/styles/components/_addpartnerclient.scss
@@ -0,0 +1,178 @@
+.add_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;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/src/styles/components/_partner_client.scss b/src/styles/components/_partner_client.scss
deleted file mode 100644
index 0e6b47c..0000000
--- a/src/styles/components/_partner_client.scss
+++ /dev/null
@@ -1,28 +0,0 @@
-.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) {
- }
-
-}
\ No newline at end of file
diff --git a/src/styles/components/_partnerclient.scss b/src/styles/components/_partnerclient.scss
new file mode 100644
index 0000000..3a70919
--- /dev/null
+++ b/src/styles/components/_partnerclient.scss
@@ -0,0 +1,64 @@
+.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%;
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/styles/index.scss b/src/styles/index.scss
index 48a9f33..5a54348 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -64,4 +64,5 @@
@import "./components/sedesabonner";
@import "./components/pricing";
@import "./components/hebergementlms";
-@import "./components/partner_client";
+@import "./components/addpartnerclient";
+@import "./components/partnerclient";