import React, { useState, useEffect } from "react"; import axios from "axios"; import partnerbannerimg from "../mysy_img/MYSY_banner_compte.png"; import profileimg from "../mysy_img/MYSY-profil-2.png"; import TrainingForm from "./AddClassManual" import PartnerTranings from "./DisplayPartnerTrainingsPagination"; import HebergementLms from "./HebergementLms"; import Button from '@mui/material/Button'; import SendIcon from '@mui/icons-material/Send'; import { getCookie } from 'react-use-cookie'; import { useHistory } from "react-router-dom"; import PartnerInfo from "./UpdatePartnerInfo"; import PartenairStat from "./PartenairStat"; import { Helmet } from "react-helmet"; import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; import logowhite from "../mysy_img/MYSY-LOGO-WHITE.png"; import downarrow from "../mysy_img/downarrow.png"; import uparrow from "../mysy_img/uparrow.png"; import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; import { GiTeacher } from "react-icons/gi"; import Footer from "./Fotter"; import { confirmAlert } from 'react-confirm-alert'; // Import import { useCookies } from "react-cookie"; import Header from "./Header"; import Facture from "./Facture"; import Abonnement from "./Abonnement"; import { useLocation } from "react-router-dom"; import { useParams } from 'react-router-dom' 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, FcList, FcGraduationCap, FcMultipleDevices, FcCurrencyExchange, FcMoneyTransfer, FcFeedback, FcKey, FcVideoCall, FcSettings, FcBusinesswoman, FcServices, FcCollect, FcCandleSticks, FcKindle, FcFlowChart, FcReading, FcFinePrint, FcCancel,FcCalendar, } from "react-icons/fc"; import { BsTools } from "react-icons/bs"; import DisplayPartnerSession from "./DisplayPartnerSession"; import DisplayPartnerStagiaires from "./DisplayPartnerStagiaires"; import Employes from "./Employes"; import Materiels from "./Materiels"; import Partner_Commande from "./Partner_Commande"; import Config_Documents from "./Config_Document"; import Factures_Client from "./Partner_Facture"; import Configuration_Technique from "./Partner_Config_Technique"; import Config_Champs_Personnalise from "./Config_Champs_Personnalise"; import Module_Agenda from "./Module_Agenda"; 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 { ImWarning } from "react-icons/im"; //import { FcHome} from "react-icons/fc"; const Partner = (props) => { const { commingmenu, commingpack } = useParams(); const [myApiResponse, setmyApiResponse] = useState(""); const [result, setResult] = useState(""); const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart']); const stored_part = getCookie('tokenmysypart'); const [parntername, setparntername] = useState(""); const [parnter_user_employee, setparnter_user_employee] = useState(""); const [parnternbformation, setparnternbformation] = useState(""); const [selectedfilt1, setselectedfilt1] = useState(""); const [selectedfilt2, setselectedfilt2] = useState(""); const [selectedfilt3, setselectedfilt3] = useState(""); const [excelimportmessage, setexcelimportmessage] = useState(""); const [apiexcelimportmessage, setapiexcelimportmessage] = useState(""); const [gotocheckout, setgotocheckout] = useState(""); // Constante permet de savoir a fonction du menu on a faire const [menu, setmenu] = useState(); const [selectedFile, setSelectedFile] = useState(); const [isSelected, setIsSelected] = useState(false); const [partnerPackService, setpartnerPackService] = useState(""); const [isimgSelected, setisimgSelected] = useState(false); const [isimgSelectedfile, setisimgSelectedfile] = useState(false); const [userimgprofil, setuserimgprofil] = useState(); const [partnerstatus, setpartnerstatus] = useState(); const [refesh, setrefesh] = useState("init"); const [firstConnexion, setfirstConnexion] = useState(""); const [part_is_partner_admin_account, setpart_is_partner_admin_account] = useState(""); const { action, orderid, packs } = useParams() const changeHandler = (event) => { setSelectedFile(event.target.files[0]); setIsSelected(true); setapiexcelimportmessage(""); }; const changeHandler2 = (event) => { setapiexcelimportmessage(); setformation_file_name(); sethandleSubmission_api(); hiddenFileInput_formation.current.click(); }; const hiddenFileInput_formation = React.useRef(null); const history = useHistory(); const stored_cookie = getCookie('tokenmysypart'); const location = useLocation(); // Si le partenaire n'est pas connecté, il est renvoyé vers la page de connexion if (!stored_cookie || stored_cookie.length <= 0) { if (location && location.state && location.state.mysy_arg) { //alert(" mysy arg (dans partner) = " + location.state.mysy_arg); history.push("/Connexion", { mysy_arg: location.state.mysy_arg }); } else { history.push("/Connexion"); } } const formData = new FormData(); const [handleSubmission_api, sethandleSubmission_api] = useState(); const [handleSubmission_result, sethandleSubmission_result] = useState(); const [handleSubmission_message, sethandleSubmission_message] = useState(); const handleSubmission = event => { const fileUploaded = event.target.files[0]; let file_size = event.target.files[0].size; let file_type = event.target.files[0].type; //console.log("file_size = ",file_size," file_type = ",file_type); if (file_size > 1000000) { alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } setformation_file_name(event.target.files[0].name); //console.log(" import du ficier ", event.target.files[0].name); formData.append('File', fileUploaded); //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); const stored_cookie = getCookie('tokenmysypart'); formData.append("token", stored_cookie); //console.log("token = " + stored_cookie); theme_name setLoading(true); fetch( process.env.REACT_APP_API_URL + "myclass/api/add_class_mass/", { method: 'POST', body: formData, } ) .then((response) => response.json()) .then((result) => { //console.log('Success:', result['message']); setexcelimportmessage(result['message']); setmyApiResponse("true"); setapiexcelimportmessage(result['status']); setLoading(false); if (String(result['status']) === String("true")) { sethandleSubmission_api("true"); var local_message = result['message'] + " Vous allez être redirigé vers la liste des formations" alert(local_message); history.push("/Partner/affichage"); window.location.reload(); return; } else if (String(result['status']) === String("Err_Connexion")) { alert('Erreur: ' + result['message']); history.push("/Connexion"); } else { sethandleSubmission_api("false"); sethandleSubmission_message(result['message']); alert(result['message']); } //alert("result['status'] " + result['status']); }) .catch((error) => { setLoading(false); console.error('Error:', result); setmyApiResponse("false"); setapiexcelimportmessage("-1"); sethandleSubmission_api("false"); alert(" Impossible d'importer/mettre à jour les formations"); }); }; const [myimage, setmyimage] = useState(); const [isimage, setisimage] = useState(); function getImage(e) { var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedImage/"; var form = new FormData(); form.append("token", stored_cookie); form.append("type", "partner"); axios.post(myurl, form).then(res => { if (String(res.data.status) === "true") { //console.log(" getImage : In test res.data.status = " + res.data.status); //console.log(" getImage: res.data.message.img = " + res.data.message); if (res.data.message.img.length > 0) { setisimage("True"); } else { setisimage("False"); } setmyimage(res.data.message.img); var ch_img = "data:image/png;base64," + res.data.message.img; setuserimgprofil(ch_img); } else { //console.log(" In Erreur res.data.status = " + res.data.status); //console.log(" In Erreur res.data.message = " + res.data.message); setisimage("False"); setuserimgprofil(); //alert("4"); } }).catch((error) => { console.warn('Not good man :( mysearchtext = '); setisimage("False"); setuserimgprofil(profileimg); }) } // Cette fonction recuperer les droits d'acces stocké en cookie const [connected_user_access_right, setconnected_user_access_right] = React.useState(null); function retrieve_user_acces_right() { const stored_cookie = getCookie('tokenmysypart'); var acces_right_token_name = stored_cookie + "_uar"; var acces_right_token_val = getCookie(acces_right_token_name, { path: '/' }); var tab_json_access_right = JSON.parse(acces_right_token_val); setconnected_user_access_right(tab_json_access_right); } // check du droit d'acces de l'utilisateur function check_user_acces_right(local_module, local_action) { //console.log(" ### connected_user_access_right = ", connected_user_access_right); //console.log(" #### check_user_acces_right = ", local_module, " --- local_action = ", local_action); if (String(local_action) === "read") { for (let i = 0; i < connected_user_access_right.length; i++) { if (String(connected_user_access_right[i].module) === String(local_module) && String(connected_user_access_right[i].read) === "true") { return 1; } } return 0; } else if (String(local_action) === "write") { for (let i = 0; i < connected_user_access_right.length; i++) { if (String(connected_user_access_right[i].module) === String(local_module) && String(connected_user_access_right[i].write) === "true") { return 1; } } return 0; } else { return 0; } } useEffect(() => { setapiexcelimportmessage(); if (location && location.state && location.state.local_sub_menu) { setmenu(location.state.local_sub_menu); setpartnerPackService(location.state.currentpack); //alert(" le pack = "+location.state.currentpack); } var list_menu = ['creation', 'infopartner', 'statistique', 'abonnement', 'affichage', 'ordervalide', 'mes_sessions', 'setuplms', 'facture', 'pricing', 'mes_clients', 'mes_devis', 'mes_cmd', 'mes_stagiaires', 'mes_employes', 'mon_materiel', 'config_document', 'factures_client', "config_technique", "config_champ_specific", "module_agenda"] if (action && list_menu.includes(action)) { setmenu(action); if (action && orderid && packs && String("ordervalide")) { CheckSalesOrder(); } if (action && orderid && packs && String("abonnement")) { //console.log(" abonnement : payement intent = ", orderid, " pack = ", packs); } } else { DiplaytrainingList(); } getImage(); GetPartnerNameFromToken(); setformation_file_name(); GetPartnerLMSData(); retrieve_user_acces_right(); }, []) function CreateTraining(event) { var security_retval = check_user_acces_right("formation", "read"); if (security_retval === 1) { setmenu("creation"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/creation"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des formations"); } } function PersonnalData(event) { setmenu("infopartner"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/infopartner"); } function config_document_func(event) { var security_retval = check_user_acces_right("config_document", "read"); if (security_retval === 1) { setmenu("config_document"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/config_document"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents"); } } function config_specfic_fields_func(event) { var security_retval = check_user_acces_right("config_document", "read"); if (security_retval === 1) { setmenu("config_champ_specific"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/config_champ_specific"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents"); } } function module_agenda_func(event) { var security_retval = check_user_acces_right("module_agenda", "read"); if (security_retval === 1) { setmenu("module_agenda"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/module_agenda"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents"); } } function config_technique_func(event) { var security_retval = check_user_acces_right("config_document", "read"); if (security_retval === 1) { setmenu("config_technique"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/config_technique"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents"); } } function mes_factures_client_func(event) { //var security_retval = check_user_acces_right("facture_client", "read"); //if (security_retval === 1) { setmenu("factures_client"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/factures_client"); /*} else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents"); }*/ } function DisplayStat(event) { var security_retval = check_user_acces_right("formation", "read"); if (security_retval === 1) { setmenu("statistique"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/statistique"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des formations"); } } function DisplaySetUpLMS(event) { var security_retval = check_user_acces_right("lms", "read"); if (security_retval === 1) { setmenu("setuplms"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/setuplms"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion du E-Learning"); } } function DisplayFacure(event) { var security_retval = check_user_acces_right("commande", "read"); if (security_retval === 1) { setmenu("facture"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/facture"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des commandes"); } } function Abonnement_func(event) { var security_retval = check_user_acces_right("abonnement", "read"); if (security_retval === 1) { setmenu("abonnement"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/abonnement"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des abonnements"); } } function pricing_func(event) { var security_retval = check_user_acces_right("prix", "read"); if (security_retval === 1) { setmenu("pricing"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/pricing"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des prix"); } } function mes_clients_func(event) { var security_retval = check_user_acces_right("client", "read"); if (security_retval === 1) { setmenu("mes_clients"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/mes_clients"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des clients"); } } function mes_devis_func(event) { var security_retval = check_user_acces_right("commande", "read"); if (security_retval === 1) { setmenu("mes_devis"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/mes_devis"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des commandes"); } } function mes_cmd_func(event) { var security_retval = check_user_acces_right("commande", "read"); if (security_retval === 1) { setmenu("mes_cmd"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/mes_cmd"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des commandes"); } } function DiplaySessionList(event) { var security_retval = check_user_acces_right("session", "read"); if (security_retval === 1) { setmenu("mes_sessions"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/mes_sessions"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des sessions"); } } function DiplayStagiaireList(event) { var security_retval = check_user_acces_right("stagiaire", "read"); if (security_retval === 1) { setmenu("mes_stagiaires"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/mes_stagiaires"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des stagiaires"); } } function DisplayeEmployeList(event) { var security_retval = check_user_acces_right("employe", "read"); if (security_retval === 1) { setmenu("mes_employes"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/mes_employes"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des employés"); } } function DisplayeMaterielList(event) { var security_retval = check_user_acces_right("materiel", "read"); if (security_retval === 1) { setmenu("mon_materiel"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/mon_materiel"); } else { Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion du matériel pédagogique"); } } function DiplaytrainingList(event) { setmenu("affichage"); setapiexcelimportmessage(); setformation_file_name(); history.push("/Partner/affichage"); var server_address = "127.0.0.1"; //var server_address = "89.156.84.196"; var form = new FormData(); // Recuperation des parametres var filtre1 = selectedfilt1; var filtre2 = selectedfilt2; var filtre3 = selectedfilt3; var filtre1_value = ""; var filtre2_value = ""; var filtre3_value = ""; // Recuperation des valeurs de filtres if (selectedfilt1) { filtre1_value = document.getElementsByName("filtre1")[0].value; form.append(filtre1, filtre1_value); } if (selectedfilt2) { filtre2_value = document.getElementsByName("filtre2")[0].value; form.append(filtre2, filtre2_value); } if (selectedfilt3) { filtre3_value = document.getElementsByName("filtre3")[0].value; form.append(filtre3, filtre3_value); } //console.log(" filtres1 = " + filtre1 + " = " + filtre1_value); //console.log(" filtres2 = " + filtre2 + " = " + filtre2_value); //console.log(" filtres3 = " + filtre3 + " = " + filtre3_value); form.append("token", stored_cookie); var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_partner_class/"; axios.post(myurl, form).then(res => { if (res.data.status !== "False") { //console.log(" In test res.data.status = " + res.data.status); //console.log(" In test res.data.message = " + res.data.message); setmyApiResponse("true"); setResult(res.data.message) //setmyApimyApiMessage("OK") } else { //console.log(" In test res.data.status = " + res.data.status); //console.log(" In test res.data.message = " + res.data.message); setmyApiResponse("false"); //setmyApimyApiMessage("") } }).catch((error) => { console.warn('Not good man :( mysearchtext = '); setmyApiResponse("false"); //setmyApimyApiMessage("") }) } function logout_confirmation() { /* si c'est une connexion partner qui est active */ if (typeof (stored_part) != "undefined") { removeCookie_part('tokenmysypart', { path: '/' }); history.push("/recherche-formation"); } } function logout() { confirmAlert({ title: 'Deconnexion ?', message: 'Confirmez la deconnexion', buttons: [ { label: 'Oui', onClick: () => logout_confirmation() }, { label: 'Non', onClick: () => { return } } ] }); } const imgchangeHandler = (event) => { let file_size = event.target.files[0].size; //or if you like to have name and type let file_name = event.target.files[0].name; let file_type = event.target.files[0].type; //alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a); if (file_size > 100000) { alert("L'image doit faire moins de 1 mega Kilo Octets"); return; } setisimgSelectedfile(event.target.files[0]); setisimgSelected(true); setuserimgprofil(URL.createObjectURL(event.target.files[0])); }; const [conntected_employee_id, setconntected_employee_id] = useState(""); function GetPartnerNameFromToken(event) { var form = new FormData(); //console.log(" GetPartnerNameFromToken stored_cookie = ", stored_cookie); form.append("token", stored_cookie); var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_partner_account/"; axios.post(myurl, form).then(res => { if (String(res.data.status) === String("true")) { //console.log(" In GetPartnerNameFromToken res.data.status = " + res.data.status); //console.log(" In GetPartnerNameFromToken res.data.message = " + res.data.message); setparntername(JSON.parse(res.data.message).nom); if (JSON.parse(res.data.message).pack_service) { setpartnerPackService(JSON.parse(res.data.message).pack_service); } else { setpartnerPackService("Aucun Service"); } if (JSON.parse(res.data.message).nb_formation) { setparnternbformation(JSON.parse(res.data.message).nb_formation); } else { setparnternbformation(""); } if (JSON.parse(res.data.message).ressource_humaine_id) { setconntected_employee_id(JSON.parse(res.data.message).ressource_humaine_id); } else { setconntected_employee_id(""); } var partner_employee_user_name = "Inconnu"; if (JSON.parse(res.data.message).contact_nom) { partner_employee_user_name = (JSON.parse(res.data.message).contact_nom); } if (JSON.parse(res.data.message).contact_prenom) { partner_employee_user_name = partner_employee_user_name + " " + (JSON.parse(res.data.message).contact_prenom); } setparnter_user_employee(partner_employee_user_name); if (JSON.parse(res.data.message).ispending) { setpartnerstatus(JSON.parse(res.data.message).ispending); } if (JSON.parse(res.data.message).firstconnexion && String(JSON.parse(res.data.message).firstconnexion) === "0") { setfirstConnexion("0"); } else { setfirstConnexion("1"); } if (JSON.parse(res.data.message).is_partner_admin_account && String(JSON.parse(res.data.message).is_partner_admin_account) === "1") { setpart_is_partner_admin_account("1"); } else { setpart_is_partner_admin_account("0"); } } else { //console.log(" In GetPartnerNameFromToken res.data.status = " + res.data.status); //console.log(" In GetPartnerNameFromToken res.data.message = " + res.data.message); } }).catch((error) => { console.warn('In GetPartnerNameFromToken Not good man :( mysearchtext = '); }) } function sendImage(e) { var formData = new FormData(); formData.append('File', isimgSelectedfile); formData.append("token", stored_part); formData.append("type", "partner"); fetch( process.env.REACT_APP_API_URL + "myclass/api/recordImage/", { method: 'POST', body: formData, } ).then((response) => response.json()) .then((result) => { //console.log('Success:', result['message']); setisimgSelected(false); }) .catch((error) => { console.error('Error:'); setisimgSelected(true); }); }; // Create a reference to the hidden file input element const hiddenFileInput = React.useRef(null); // Programatically click the hidden file input element // when the Button component is clicked const handleClick = event => { hiddenFileInput.current.click(); }; // Call a function (passed as a prop from the parent component) // to handle the user-selected file const handleChange = event => { const fileUploaded = event.target.files[0]; props.handleFile(fileUploaded); }; function alertactivecompte() { alert(" Vous devez ajouter un mode de Paiement pour acceder à cette fonctionnalité"); } function ValideFirstConnexion() { setfirstConnexion(""); setmenu("abonnement"); } const [formation_file_name, setformation_file_name] = useState(); const [CheckSalesOrder_api, setCheckSalesOrder_api] = useState(""); const [CheckSalesOrder_message, setCheckSalesOrder_message] = useState(""); function CheckSalesOrder(event) { var form = new FormData(); formData.append("token", stored_part); formData.append("orderid", orderid); var myurl = process.env.REACT_APP_API_URL + "myclass/api/CheckSalesOrder/"; axios.post(myurl, form).then(res => { if (String(res.data.status) === String("true")) { setCheckSalesOrder_api("true") } else { setCheckSalesOrder_api("false") setCheckSalesOrder_message(String(res.data.message)) } }).catch((error) => { //console.log('In CheckSalesOrder ', error); setCheckSalesOrder_api("false") }) } const [isLoading, setLoading] = useState(); const [GetPartnerLMSData_api, setGetPartnerLMSData_api] = useState(); const [GetPartnerLMSData_result, setGetPartnerLMSData_result] = useState(); const [GetPartnerLMSData_message, setGetPartnerLMSData_message] = useState(); const [partner_lms_url, setpartner_lms_url] = useState(); const [has_partner_lms_url, sethas_partner_lms_url] = useState(); function GetPartnerLMSData(event) { var form = new FormData(); form.append("token", stored_cookie); var myurl = process.env.REACT_APP_API_URL + "myclass/api/LMS_Get_Partner_Data/"; axios.post(myurl, form).then(res => { if (String(res.data.status) === String("true")) { //console.log(" In GetPartnerLMSData res.data.status = " + res.data.status); //console.log(" In GetPartnerLMSData res.data.message = " + res.data.message); setGetPartnerLMSData_api("true"); setGetPartnerLMSData_result(res.data.message); var my_lms_url = ""; if (JSON.parse(res.data.message).lms_account && String(JSON.parse(res.data.message).lms_account) === "1") { sethas_partner_lms_url(JSON.parse(res.data.message).lms_account); 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); setpartner_lms_url(my_lms_url); } } else { setGetPartnerLMSData_api("false"); setGetPartnerLMSData_message(res.data.message); } }).catch((error) => { console.warn('In GetPartnerLMSData Not good man :( mysearchtext = ', error); setGetPartnerLMSData_api("false"); }) } const [deplie_hebergement, setdeplie_hebergement] = useState(); function ftion_deplie_hebergement() { if (String(deplie_hebergement) === "1") { setdeplie_hebergement(); } else { setdeplie_hebergement("1"); } } 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"); } } const [Dialog_1_message, setDialog_1_message] = React.useState(false); const [Dialog_1_open, setDialog_1_open] = React.useState(false); function Dialog_1_handle_acces_insuffisant(message) { setDialog_1_message(message); setDialog_1_open(true); } const Dialog_1_handleClose = () => { //alert(" Utiliser le bouton 'fermer' "); //setOpen(false); }; const Dialog_1_handleClose_buton = () => { setDialog_1_open(false); }; return (
Partenaires editeurs formations
{isLoading &&
} MySy Warning {Dialog_1_message}
{!isimgSelected && String(part_is_partner_admin_account) === "1" &&
} {isimgSelected &&
} {String(part_is_partner_admin_account) === "1" &&
{parntername && {parntername} - {String(partnerPackService).toUpperCase()} ({parnternbformation})} {!parntername && Partenaire }
} {String(part_is_partner_admin_account) !== "1" &&
{parnter_user_employee} {!parntername && Utilisateur }
}
Mon Compte
{String(menu) !== "infopartner" &&
MES INFORMATIONS
} {String(menu) === "infopartner" &&
MES INFORMATIONS
}
{String(menu) !== "module_agenda" &&
PLANNING
} {String(menu) === "module_agenda" &&
PLANNING
}
{String(menu) !== "abonnement" &&
ABONNEMENT
} {String(menu) === "abonnement" &&
ABONNEMENT
}
{String(menu) !== "facture" &&
FACTURE MYSY
} {String(menu) === "facture" &&
FACTURE MYSY
}
Mes Formations
{String(menu) !== "creation" &&
CREER FORMATION
} {String(menu) === "creation" &&
CREER FORMATION
}
{String(menu) !== "affichage" &&
MES FORMATIONS
} {String(menu) === "affichage" &&
MES FORMATIONS
}
{String(menu) !== "mes_sessions" &&
MES SESSIONS
} {String(menu) === "mes_sessions" &&
MES SESSIONS
}
{String(menu) !== "mes_stagiaires" &&
MES STAGIAIRES
} {String(menu) === "mes_stagiaires" &&
MES STAGIAIRES
}
{String(menu) !== "mes_employes" &&
MES EMPLOYES
} {String(menu) === "mes_employes" &&
MES EMPLOYES
}
{String(menu) !== "mon_materiel" &&
MON MATERIEL
} {String(menu) === "mon_materiel" &&
MON MATERIEL
}
{String(menu) !== "statistique" &&
STATISTIQUES
} {String(menu) === "statistique" &&
STATISTIQUES
}
Mes Clients

{String(menu) !== "mes_clients" &&
   MES CLIENTS
} {String(menu) === "mes_clients" &&
    MES CLIENTS
}

{String(menu) !== "pricing" &&
    MES PRIX CLIENT
} {String(menu) === "pricing" &&
   MES PRIX CLIENT
}

{String(menu) !== "mes_cmd" &&
   MES COMMANDES & DEVIS
} {String(menu) === "mes_cmd" &&
    MES COMMANDES & DEVIS
}

{String(menu) !== "factures_client" &&
   MES FACTURES
} {String(menu) === "factures_client" &&
    MES FACTURES
}
Espace E-Learning
{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
}
}
Ma config

{String(menu) !== "config_document" &&
   MES DOCUMENTS
} {String(menu) === "config_document" &&
    MES DOCUMENTS
}

{String(menu) !== "config_champ_specific" &&
   CHAMP SPECIFIQUE
} {String(menu) === "config_champ_specific" &&
    CHAMP SPECIFIQUE
}

{String(menu) !== "config_technique" &&
   TECHNIQUE
} {String(menu) === "config_technique" &&
    TECHNIQUE
}

{String(firstConnexion) === "1" && String(part_is_partner_admin_account) === "1" &&
Cher partenaire, c'est votre première connexion,
 
Nous sommes ravis de vous accueillir dans notre aventure MySy. Pour commencer à publier vos formations, veuillez choisir une formule d'abonnement en cliquant
 
Merci.
} {String(firstConnexion) === "1" && String(part_is_partner_admin_account) !== "1" &&
Cher Utilisateur, c'est votre première connexion,
 
Nous sommes ravis de vous accueillir dans notre aventure MySy.


 
Merci.
} {String(myApiResponse) === String("false") &&
Impossible de contacter l'hote distant. Merci de contacter votre administrateur
} {String(menu) === "affichage" &&
}
{String(menu) === "checkout" &&
} {String(menu) === "creation" &&
{String(apiexcelimportmessage) === String("true") &&
{excelimportmessage}
 
} {String(apiexcelimportmessage) === String("false") &&
Impossible de traiter le fichier
{excelimportmessage}
 
} {String(apiexcelimportmessage) === String("-1") &&
Impossible de traiter le fichier
 
}
{String(partnerstatus) === String("0") &&

{formation_file_name && } Télécharger un fichier modèle
{/*
*/}
 
Pour le reste,
  • Il s'agit d'un fichier csv. Les colonnes sont separées par des ";"
  • A l'interieur d'une même colonne, les informations sont separées par des ";"
  • Champ 'Metier' : les valeurs acceptées sont : IT, RH, vente, dev_perso, Graphisme, Management, Digital, Office, Autre
  • ...
Télécharger le guide complet pour plus d'informations
 
} {String(partnerstatus) !== String("0") &&
Import excel d'une formation Télécharger un fichier modèle

}

Création manuelle d'une formation
} {String(menu) === "infopartner" &&
} {String(menu) === "statistique" &&
} {String(menu) === "setuplms" &&
} {String(menu) === "mes_sessions" &&
} {String(menu) === "mes_employes" &&
} {String(menu) === "factures_client" &&
} {String(menu) === "mon_materiel" &&
} {String(menu) === "mes_cmd" &&
} {String(menu) === "facture" &&
} {String(menu) === "pricing" &&
} {String(menu) === "mes_stagiaires" &&
} {String(menu) === "abonnement" &&
} {String(menu) === "ordervalide" && orderid && packs &&
} {String(menu) === "mes_clients" &&
} {String(menu) === "config_document" &&
} {String(menu) === "config_technique" &&
} {String(menu) === "config_champ_specific" &&
} {String(menu) === "module_agenda" &&
}
) } export default Partner;