04/04/24 - 19h30
parent
14a34145c7
commit
2b6d2372d1
141
src/App.js
141
src/App.js
|
@ -1,7 +1,7 @@
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import {BrowserRouter, Switch, Route} from "react-router-dom"
|
import { BrowserRouter, Switch, Route } from "react-router-dom"
|
||||||
import './App.css';
|
import './App.css';
|
||||||
import NotFound from './pages/NotFound'
|
import NotFound from './pages/NotFound'
|
||||||
import Contact from './pages/Contact'
|
import Contact from './pages/Contact'
|
||||||
import Connexion from './pages/Connexion'
|
import Connexion from './pages/Connexion'
|
||||||
import Login from './pages/Login';
|
import Login from './pages/Login';
|
||||||
|
@ -9,7 +9,7 @@ import Recherche from "./pages/recherche_new";
|
||||||
import Recherche_new_v2 from "./pages/recherche_new_v2";
|
import Recherche_new_v2 from "./pages/recherche_new_v2";
|
||||||
import TestUrl from "./pages/testurl";
|
import TestUrl from "./pages/testurl";
|
||||||
import Account from "./pages/account";
|
import Account from "./pages/account";
|
||||||
import DisplayDetailClass from "./pages/displaydetailclass";
|
import DisplayDetailClass from "./pages/displaydetailclass";
|
||||||
import DisplayDetailClass_new_v2 from "./pages/displaydetailclass_new_v2";
|
import DisplayDetailClass_new_v2 from "./pages/displaydetailclass_new_v2";
|
||||||
import DisplayDetailClassAction from "./pages/displaydetailclassaction";
|
import DisplayDetailClassAction from "./pages/displaydetailclassaction";
|
||||||
import DisplayDetailArticle from "./pages/displaydetailarticle";
|
import DisplayDetailArticle from "./pages/displaydetailarticle";
|
||||||
|
@ -43,10 +43,11 @@ import TestUrl_New from "./pages/testurl_new";
|
||||||
import QuiSommesNous_v3 from "./pages/quisommesnous_v3";
|
import QuiSommesNous_v3 from "./pages/quisommesnous_v3";
|
||||||
import Test_Drag_Drop from "./pages/test_drag_drop";
|
import Test_Drag_Drop from "./pages/test_drag_drop";
|
||||||
|
|
||||||
import Test_Drag_Drop2 from "./pages/test_dnd";
|
import Test_Drag_Drop2 from "./pages/test_dnd";
|
||||||
|
|
||||||
import ESign from "./pages/eSigne";
|
import ESign from "./pages/eSigne";
|
||||||
import ESignDiplayDignedDocument from "./pages/edigndiplaydigneddocument";
|
import ESignDiplayDignedDocument from "./pages/edigndiplaydigneddocument";
|
||||||
|
import SurveyDocument from "./pages/surveydocument";
|
||||||
|
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
|
@ -57,80 +58,82 @@ function App() {
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="App">
|
<div className="App">
|
||||||
{/*API DEV = {process.env.REACT_APP_API_URL_DEV} <br/>
|
{/*API DEV = {process.env.REACT_APP_API_URL_DEV} <br/>
|
||||||
API REC = {process.env.REACT_APP_API_URL_REC}<br/>
|
API REC = {process.env.REACT_APP_API_URL_REC}<br/>
|
||||||
API URL = {process.env.REACT_APP_API_URL}<br/>
|
API URL = {process.env.REACT_APP_API_URL}<br/>
|
||||||
*/}
|
*/}
|
||||||
<div className="main_haut">
|
<div className="main_haut">
|
||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
<scrollToTop />
|
<scrollToTop />
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route path="/" exact component={Recherche_new_v2} />
|
<Route path="/" exact component={Recherche_new_v2} />
|
||||||
|
|
||||||
<Route path="/acceuil" exact component={Acceuil} />
|
|
||||||
<Route path="/contact" exact component={Contact} />
|
|
||||||
<Route path="/mysy-user-account" exact component={Account} />
|
|
||||||
<Route path="/create_account" exact component={CreateAccount} />
|
|
||||||
<Route path="/user-connexion" exact component={Connexion} />
|
|
||||||
<Route path="/Connexion" exact component={Login} />
|
|
||||||
<Route path="/recherche-formation" exact component={Recherche_new_v2} />
|
|
||||||
<Route path="/recherche-formation/ref/:NewSearchText" exact component={Recherche_new_v2} />
|
|
||||||
<Route path="/testurl/:course/:tab" exact component={TestUrl} />
|
|
||||||
<Route path="/testurl_new/:courseid/:tabid" exact component={TestUrl_New} />
|
|
||||||
<Route path="/Display-Detail-formation/:classId" exact component={DisplayDetailClass_new_v2} />
|
|
||||||
<Route path="/Display-Detail-formation/:classId" exact component={DisplayDetailClass_new_v2} />
|
|
||||||
<Route path="/Display-Detail-formation/:classId/:action" exact component={DisplayDetailClass_new_v2} />
|
|
||||||
<Route path="/Display-Detail-formation_old/:classId/:action" exact component={DisplayDetailClass_new_v2} />
|
|
||||||
<Route path="/Display-Detail-Article/:articleId" exact component={DisplayDetailArticle} />
|
|
||||||
<Route path="/Display-Detail-formation-Coeur/:classId" exact component={CoupDeCoeur} />
|
|
||||||
<Route path="/Partner/:action/:orderid/:packs" exact component={Partner} />
|
|
||||||
|
|
||||||
<Route path="/Partner/:action/:orderid" exact component={Partner} />
|
<Route path="/acceuil" exact component={Acceuil} />
|
||||||
|
<Route path="/contact" exact component={Contact} />
|
||||||
|
<Route path="/mysy-user-account" exact component={Account} />
|
||||||
|
<Route path="/create_account" exact component={CreateAccount} />
|
||||||
|
<Route path="/user-connexion" exact component={Connexion} />
|
||||||
|
<Route path="/Connexion" exact component={Login} />
|
||||||
|
<Route path="/recherche-formation" exact component={Recherche_new_v2} />
|
||||||
|
<Route path="/recherche-formation/ref/:NewSearchText" exact component={Recherche_new_v2} />
|
||||||
|
<Route path="/testurl/:course/:tab" exact component={TestUrl} />
|
||||||
|
<Route path="/testurl_new/:courseid/:tabid" exact component={TestUrl_New} />
|
||||||
|
<Route path="/Display-Detail-formation/:classId" exact component={DisplayDetailClass_new_v2} />
|
||||||
|
<Route path="/Display-Detail-formation/:classId" exact component={DisplayDetailClass_new_v2} />
|
||||||
|
<Route path="/Display-Detail-formation/:classId/:action" exact component={DisplayDetailClass_new_v2} />
|
||||||
|
<Route path="/Display-Detail-formation_old/:classId/:action" exact component={DisplayDetailClass_new_v2} />
|
||||||
|
<Route path="/Display-Detail-Article/:articleId" exact component={DisplayDetailArticle} />
|
||||||
|
<Route path="/Display-Detail-formation-Coeur/:classId" exact component={CoupDeCoeur} />
|
||||||
|
<Route path="/Partner/:action/:orderid/:packs" exact component={Partner} />
|
||||||
|
|
||||||
|
<Route path="/Partner/:action/:orderid" exact component={Partner} />
|
||||||
<Route path="/Partner/:action" exact component={Partner} />
|
|
||||||
<Route path="/Partner" exact component={Partner} />
|
|
||||||
<Route path="/PartnerLogin" exact component={PartnerLogin} />
|
<Route path="/Partner/:action" exact component={Partner} />
|
||||||
<Route path="/PartnerLogin0" exact component={PartnerLogin0} />
|
<Route path="/Partner" exact component={Partner} />
|
||||||
<Route path="/PartnerLogin1" exact component={PartnerLogin1} />
|
<Route path="/PartnerLogin" exact component={PartnerLogin} />
|
||||||
<Route path="/Recherche-Article-formation" exact component={RechecheArticles} />
|
<Route path="/PartnerLogin0" exact component={PartnerLogin0} />
|
||||||
<Route path="/Ajout-Article-formation" exact component={AddArticle} />
|
<Route path="/PartnerLogin1" exact component={PartnerLogin1} />
|
||||||
<Route path="/ResetUserPwd/:token/:accounttype" exact component={ResetUserPwd} />
|
<Route path="/Recherche-Article-formation" exact component={RechecheArticles} />
|
||||||
<Route path="/DeleteUserAccount/:token" exact component={DeleteUserAccount} />
|
<Route path="/Ajout-Article-formation" exact component={AddArticle} />
|
||||||
<Route path="/QuiSommesNous" exact component={QuiSommesNous_v3} />
|
<Route path="/ResetUserPwd/:token/:accounttype" exact component={ResetUserPwd} />
|
||||||
<Route path="/QuiSommesNous_v3" exact component={QuiSommesNous_v3} />
|
<Route path="/DeleteUserAccount/:token" exact component={DeleteUserAccount} />
|
||||||
<Route path="/ContactezNous" exact component={ContactezNous} />
|
<Route path="/QuiSommesNous" exact component={QuiSommesNous_v3} />
|
||||||
<Route path="/mysy-training-login/:obj/:objid" exact component={Login} />
|
<Route path="/QuiSommesNous_v3" exact component={QuiSommesNous_v3} />
|
||||||
<Route path="/mysy-account-activated/" exact component={AccountUserActivated} />
|
<Route path="/ContactezNous" exact component={ContactezNous} />
|
||||||
<Route path="/Produits-Services/" exact component={ProduitsService} />
|
<Route path="/mysy-training-login/:obj/:objid" exact component={Login} />
|
||||||
<Route path="/Recherche_new/" exact component={Recherche_new} />
|
<Route path="/mysy-account-activated/" exact component={AccountUserActivated} />
|
||||||
<Route path="/GestionAdministrative/:internal_url" exact component={GestionAdministrative} />
|
<Route path="/Produits-Services/" exact component={ProduitsService} />
|
||||||
<Route path="/Recherche_new/:type/:categorie" exact component={Recherche_new} />
|
<Route path="/Recherche_new/" exact component={Recherche_new} />
|
||||||
<Route path="/Recherche_old/" exact component={Recherche_old} />
|
<Route path="/GestionAdministrative/:internal_url" exact component={GestionAdministrative} />
|
||||||
<Route path="/Connexion-utilisateur-0/" exact component={UserSignFirst} />
|
<Route path="/Recherche_new/:type/:categorie" exact component={Recherche_new} />
|
||||||
<Route path="/Emargement/" exact component={Emargement} />
|
<Route path="/Recherche_old/" exact component={Recherche_old} />
|
||||||
<Route path="/CartoucheComMySy/" exact component={Formation_Cartouche_Com} />
|
<Route path="/Connexion-utilisateur-0/" exact component={UserSignFirst} />
|
||||||
<Route path="/Test_DragDrop/" exact component={Test_Drag_Drop} />
|
<Route path="/Emargement/" exact component={Emargement} />
|
||||||
<Route path="/Test_DragDrop2/" exact component={Test_Drag_Drop2} />
|
<Route path="/CartoucheComMySy/" exact component={Formation_Cartouche_Com} />
|
||||||
<Route path="/Recherche_new_v2/" exact component={Recherche_new_v2} />
|
<Route path="/Test_DragDrop/" exact component={Test_Drag_Drop} />
|
||||||
<Route path="/Recherche_new_v2/:type/:categorie" exact component={Recherche_new_v2} />
|
<Route path="/Test_DragDrop2/" exact component={Test_Drag_Drop2} />
|
||||||
<Route path="/unsubscribe/" exact component={SeDesabonner} />
|
<Route path="/Recherche_new_v2/" exact component={Recherche_new_v2} />
|
||||||
<Route path="/OrderConfirmation_3DS/:orderid/:packs" exact component={OrderConfirmation_3DS} />
|
<Route path="/Recherche_new_v2/:type/:categorie" exact component={Recherche_new_v2} />
|
||||||
<Route path="/page-inconnue/" exact component={NotFound} />
|
<Route path="/unsubscribe/" exact component={SeDesabonner} />
|
||||||
<Route path="/formation-inconnue/" exact component={Training_Inactive_Or_Not_Found} />
|
<Route path="/OrderConfirmation_3DS/:orderid/:packs" exact component={OrderConfirmation_3DS} />
|
||||||
<Route path="/E_Signature/:document_id" exact component={ESign} />
|
<Route path="/page-inconnue/" exact component={NotFound} />
|
||||||
<Route path="/E_Document/:document_id/:partner_owner_recid/:secret_key_signature" exact component={ESignDiplayDignedDocument} />
|
<Route path="/formation-inconnue/" exact component={Training_Inactive_Or_Not_Found} />
|
||||||
<Route component={NotFound} />
|
<Route path="/E_Signature/:document_id" exact component={ESign} />
|
||||||
|
<Route path="/E_Document/:document_id/:partner_owner_recid/:secret_key_signature" exact component={ESignDiplayDignedDocument} />
|
||||||
|
|
||||||
|
<Route path="/Survey/:survey_id/" exact component={SurveyDocument} />
|
||||||
|
<Route component={NotFound} />
|
||||||
</Switch>
|
</Switch>
|
||||||
</BrowserRouter>
|
</BrowserRouter>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4637,7 +4637,7 @@ const Apprenant = (props) => {
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
'& .line--statut--pair': {
|
'& .line--statut--pair': {
|
||||||
backgroundColor: 'rgba(235, 235, 235, .7)',
|
backgroundColor: 'rgba(235, 235, 235, .7)',
|
||||||
color: 'black',
|
color: 'black',
|
||||||
|
@ -4741,7 +4741,7 @@ const Apprenant = (props) => {
|
||||||
|
|
||||||
// Pour la gestion de la couleur de zone double cliquée
|
// Pour la gestion de la couleur de zone double cliquée
|
||||||
if (String(params.row.id) === String(gridline_id)) {
|
if (String(params.row.id) === String(gridline_id)) {
|
||||||
|
|
||||||
return 'line--statut--selected';
|
return 'line--statut--selected';
|
||||||
}
|
}
|
||||||
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||||
|
@ -6056,9 +6056,9 @@ const Apprenant = (props) => {
|
||||||
return 'cell--presentiel';
|
return 'cell--presentiel';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
getRowClassName={(params) => {
|
||||||
|
|
||||||
// Pour la gestion de la couleur de zone double cliquée
|
// Pour la gestion de la couleur de zone double cliquée
|
||||||
if (String(params.row.id) === String(gridline_id)) {
|
if (String(params.row.id) === String(gridline_id)) {
|
||||||
return 'line--statut--selected';
|
return 'line--statut--selected';
|
||||||
|
@ -6069,10 +6069,16 @@ const Apprenant = (props) => {
|
||||||
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
||||||
return 'line--statut--impair';
|
return 'line--statut--impair';
|
||||||
}
|
}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
getEstimatedRowHeight={() => 200}
|
||||||
|
getRowHeight={() => "auto"}
|
||||||
|
sx={{
|
||||||
|
"& .MuiDataGrid-cellContent": {
|
||||||
|
minHeight: 50,
|
||||||
|
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
<br />
|
<br />
|
||||||
|
@ -6197,7 +6203,7 @@ const Apprenant = (props) => {
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
{String(display_detail_piece_joint) === "1" && String(add_One_Apprenant) !== "1" && selected_apprenant_id && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
|
{String(display_detail_piece_joint) === "1" && String(add_One_Apprenant) !== "1" && selected_apprenant_id && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
|
||||||
|
|
||||||
<div className="div_row" >
|
<div className="div_row" >
|
||||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}> Pièces Jointes </nav>
|
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}> Pièces Jointes </nav>
|
||||||
<div className="div_row" style={{ "padding": "5px" }}>
|
<div className="div_row" style={{ "padding": "5px" }}>
|
||||||
|
|
|
@ -60,6 +60,7 @@ import Dashbord_Ressources_Humaines from "./Dashbord_Ressources_Humaines";
|
||||||
import Dashbord_Inscriptions from "./Dashbord_Inscription";
|
import Dashbord_Inscriptions from "./Dashbord_Inscription";
|
||||||
import Materiel_Salle from "./Materiel_Salle";
|
import Materiel_Salle from "./Materiel_Salle";
|
||||||
import CRM_Opportunite from "./Crm_Opportunite";
|
import CRM_Opportunite from "./Crm_Opportunite";
|
||||||
|
import Partner_Config_Formulaires from "./Partner_Config_Formulaires";
|
||||||
|
|
||||||
import Mon_Tableau_De_Bord from "./Mon_Tableau_De_Bord";
|
import Mon_Tableau_De_Bord from "./Mon_Tableau_De_Bord";
|
||||||
import Dashbord_Formation from "./Dashbord_Formation";
|
import Dashbord_Formation from "./Dashbord_Formation";
|
||||||
|
@ -276,11 +277,11 @@ const Partner = (props) => {
|
||||||
function retrieve_user_acces_right() {
|
function retrieve_user_acces_right() {
|
||||||
const stored_cookie = getCookie('tokenmysypart');
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
|
||||||
if( !stored_cookie || String(stored_cookie).trim() === ""){
|
if (!stored_cookie || String(stored_cookie).trim() === "") {
|
||||||
history.push("/Connexion");
|
history.push("/Connexion");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var acces_right_token_name = stored_cookie + "_uar";
|
var acces_right_token_name = stored_cookie + "_uar";
|
||||||
|
|
||||||
|
|
||||||
|
@ -339,7 +340,7 @@ const Partner = (props) => {
|
||||||
'mes_stagiaires', 'mes_employes', 'mon_materiel', 'config_document', 'factures_client', "config_technique",
|
'mes_stagiaires', 'mes_employes', 'mon_materiel', 'config_document', 'factures_client', "config_technique",
|
||||||
"config_champ_specific", "module_agenda", "config_session_steps", "config_jours_heures", "dashbord_formation",
|
"config_champ_specific", "module_agenda", "config_session_steps", "config_jours_heures", "dashbord_formation",
|
||||||
"dashbord_session", "mon_tableau_de_bord", "prix_achat", "mes_apprenants", "dashbord_ressources_humaines",
|
"dashbord_session", "mon_tableau_de_bord", "prix_achat", "mes_apprenants", "dashbord_ressources_humaines",
|
||||||
"dashbord_inscriptions", "mes_salles", "mes_opportunites"]
|
"dashbord_inscriptions", "mes_salles", "mes_opportunites", "config_formulaires"]
|
||||||
|
|
||||||
if (action && list_menu.includes(action)) {
|
if (action && list_menu.includes(action)) {
|
||||||
|
|
||||||
|
@ -493,6 +494,20 @@ const Partner = (props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function config_formulaires_func(event) {
|
||||||
|
var security_retval = check_user_acces_right("config_document", "read");
|
||||||
|
if (security_retval === 1) {
|
||||||
|
setmenu("config_formulaires");
|
||||||
|
setapiexcelimportmessage();
|
||||||
|
setformation_file_name();
|
||||||
|
history.push("/Partner/config_formulaires");
|
||||||
|
document.body.style.backgroundColor = "#ffffff";
|
||||||
|
} else {
|
||||||
|
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function mes_factures_client_func(event) {
|
function mes_factures_client_func(event) {
|
||||||
//var security_retval = check_user_acces_right("facture_client", "read");
|
//var security_retval = check_user_acces_right("facture_client", "read");
|
||||||
//if (security_retval === 1) {
|
//if (security_retval === 1) {
|
||||||
|
@ -1421,6 +1436,12 @@ const Partner = (props) => {
|
||||||
|
|
||||||
</Dropdown.Item>
|
</Dropdown.Item>
|
||||||
|
|
||||||
|
<Dropdown.Item>
|
||||||
|
{String(menu) !== "config_formulaires" && <div className="sousmenu" onClick={config_formulaires_func}> <FcFinePrint className="icone_menu" /> FORMULAIRES</div>}
|
||||||
|
{String(menu) === "config_formulaires" && <div className="sousmenu_selected" onClick={config_formulaires_func}> <FcFinePrint className="icone_menu" /> FORMULAIRES</div>}
|
||||||
|
|
||||||
|
</Dropdown.Item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
@ -1685,10 +1706,10 @@ const Partner = (props) => {
|
||||||
{String(menu) === "mes_opportunites" &&
|
{String(menu) === "mes_opportunites" &&
|
||||||
<div className="div_droite">
|
<div className="div_droite">
|
||||||
|
|
||||||
<CRM_Opportunite conntected_employee_id={conntected_employee_id}
|
<CRM_Opportunite conntected_employee_id={conntected_employee_id}
|
||||||
read_access={check_user_acces_right("materiel", "read")}
|
read_access={check_user_acces_right("materiel", "read")}
|
||||||
write_access={check_user_acces_right("materiel", "write")}
|
write_access={check_user_acces_right("materiel", "write")}
|
||||||
reduce={"0"}/>
|
reduce={"0"} />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1774,6 +1795,15 @@ const Partner = (props) => {
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
{String(menu) === "config_formulaires" && <div className="div_droite">
|
||||||
|
|
||||||
|
<Partner_Config_Formulaires conntected_employee_id={conntected_employee_id} read_access={check_user_acces_right("config_document", "read")} write_access={check_user_acces_right("config_document", "write")} />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
{String(menu) === "config_champ_specific" && <div className="div_droite">
|
{String(menu) === "config_champ_specific" && <div className="div_droite">
|
||||||
|
|
||||||
<Config_Champs_Personnalise conntected_employee_id={conntected_employee_id} read_access={check_user_acces_right("config_document", "read")} write_access={check_user_acces_right("config_document", "write")} />
|
<Config_Champs_Personnalise conntected_employee_id={conntected_employee_id} read_access={check_user_acces_right("config_document", "read")} write_access={check_user_acces_right("config_document", "write")} />
|
||||||
|
@ -2118,7 +2148,7 @@ const Partner = (props) => {
|
||||||
<Button variant="outlined" onClick={changeHandler2} className="detail_class_submenu" style={{
|
<Button variant="outlined" onClick={changeHandler2} className="detail_class_submenu" style={{
|
||||||
"background": "#c8cfd5",
|
"background": "#c8cfd5",
|
||||||
"minWidth": "15rem", "color": "black", "width": "auto",
|
"minWidth": "15rem", "color": "black", "width": "auto",
|
||||||
|
|
||||||
}}
|
}}
|
||||||
id='menu_import_formation' name='menu_import_formation'>Choisir un fichier et importer des formations <SendIcon />
|
id='menu_import_formation' name='menu_import_formation'>Choisir un fichier et importer des formations <SendIcon />
|
||||||
</Button><br />
|
</Button><br />
|
||||||
|
@ -2331,10 +2361,10 @@ const Partner = (props) => {
|
||||||
|
|
||||||
{String(menu) === "config_technique" && <div className="div_droite div_droite_ralonge">
|
{String(menu) === "config_technique" && <div className="div_droite div_droite_ralonge">
|
||||||
|
|
||||||
<Configuration_Technique conntected_employee_id={conntected_employee_id}
|
<Configuration_Technique conntected_employee_id={conntected_employee_id}
|
||||||
read_access={check_user_acces_right("config_document", "read")}
|
read_access={check_user_acces_right("config_document", "read")}
|
||||||
write_access={check_user_acces_right("config_document", "write")}
|
write_access={check_user_acces_right("config_document", "write")}
|
||||||
reduce={"1"} />
|
reduce={"1"} />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2353,6 +2383,15 @@ const Partner = (props) => {
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
{String(menu) === "config_formulaires" && <div className="div_droite div_droite_ralonge">
|
||||||
|
|
||||||
|
<Partner_Config_Formulaires conntected_employee_id={conntected_employee_id} read_access={check_user_acces_right("config_document", "read")} write_access={check_user_acces_right("config_document", "write")} />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
{String(menu) === "config_champ_specific" && <div className="div_droite div_droite_ralonge">
|
{String(menu) === "config_champ_specific" && <div className="div_droite div_droite_ralonge">
|
||||||
|
|
||||||
<Config_Champs_Personnalise conntected_employee_id={conntected_employee_id} read_access={check_user_acces_right("config_document", "read")} write_access={check_user_acces_right("config_document", "write")} />
|
<Config_Champs_Personnalise conntected_employee_id={conntected_employee_id} read_access={check_user_acces_right("config_document", "read")} write_access={check_user_acces_right("config_document", "write")} />
|
||||||
|
|
|
@ -1867,7 +1867,6 @@ const Partner_Commande = (props) => {
|
||||||
disable_Order_Header_DetailFields();
|
disable_Order_Header_DetailFields();
|
||||||
order_header_submenu_main();
|
order_header_submenu_main();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const [Update_One_Order_Data_api, setUpdate_One_Order_Data_api] = useState();
|
const [Update_One_Order_Data_api, setUpdate_One_Order_Data_api] = useState();
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -40,7 +40,7 @@ import DialogTitle from '@mui/material/DialogTitle';
|
||||||
import { TransitionProps } from '@mui/material/transitions';
|
import { TransitionProps } from '@mui/material/transitions';
|
||||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||||
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
||||||
|
|
||||||
const Partner_Configuration_Session_Steps = (props) => {
|
const Partner_Configuration_Session_Steps = (props) => {
|
||||||
|
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
@ -766,7 +766,7 @@ const Partner_Configuration_Session_Steps = (props) => {
|
||||||
|
|
||||||
</div>}
|
</div>}
|
||||||
{String(config_data_edit_mode) !== "1" &&
|
{String(config_data_edit_mode) !== "1" &&
|
||||||
<div className="session_caract"> Point de configuration laaa<br />
|
<div className="session_caract"> Point de configuration <br />
|
||||||
<TextField
|
<TextField
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
required
|
required
|
||||||
|
@ -779,8 +779,6 @@ const Partner_Configuration_Session_Steps = (props) => {
|
||||||
disabled={false}
|
disabled={false}
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
value={p_detail_config_point}
|
value={p_detail_config_point}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,357 @@
|
||||||
|
import React, { useRef, useState, useEffect } from "react";
|
||||||
|
import TextField from '@mui/material/TextField';
|
||||||
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
|
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
||||||
|
import Button from '@mui/material/Button';
|
||||||
|
import axios from "axios";
|
||||||
|
import { getCookie, setCookie } from 'react-use-cookie';
|
||||||
|
import { useHistory } from "react-router-dom";
|
||||||
|
import Rating from '@mui/material/Rating';
|
||||||
|
import CheckOut from "./CheckOut";
|
||||||
|
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
||||||
|
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||||
|
import { Editor } from '@tinymce/tinymce-react';
|
||||||
|
import parse from 'html-react-parser';
|
||||||
|
import { FcViewDetails, FcDisapprove } from "react-icons/fc";
|
||||||
|
import 'react-tooltip/dist/react-tooltip.css'
|
||||||
|
import { Tooltip } from 'react-tooltip'
|
||||||
|
import add_plus from "../mysy_img/plus.png";
|
||||||
|
import excel_icone from "../mysy_img/excel_icone.png";
|
||||||
|
import participants from "../mysy_img/participants.png";
|
||||||
|
import fileDownload from 'js-file-download'
|
||||||
|
import Autocomplete from '@mui/material/Autocomplete';
|
||||||
|
import Popup from 'reactjs-popup';
|
||||||
|
import 'reactjs-popup/dist/index.css';
|
||||||
|
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||||
|
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
|
||||||
|
import DatePicker from "react-datepicker";
|
||||||
|
import "react-datepicker/dist/react-datepicker.css";
|
||||||
|
import { format } from 'date-fns'
|
||||||
|
import moment from "moment";
|
||||||
|
import InputAdornment from '@mui/material/InputAdornment';
|
||||||
|
import { AiFillCloseCircle } from "react-icons/ai";
|
||||||
|
import Box from '@mui/material/Box';
|
||||||
|
import { Typography, LinearProgress } from '@mui/material';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
import { CiTrash } from "react-icons/ci";
|
||||||
|
import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md";
|
||||||
|
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 { TransitionProps } from '@mui/material/transitions';
|
||||||
|
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
||||||
|
import { useParams } from 'react-router-dom'
|
||||||
|
import Header from "./Header";
|
||||||
|
import Footer from "./Fotter";
|
||||||
|
import { FcInfo } from "react-icons/fc";
|
||||||
|
import { Document, Page } from 'react-pdf';
|
||||||
|
import RadioGroup from '@mui/material/RadioGroup';
|
||||||
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||||
|
import FormControl from '@mui/material/FormControl';
|
||||||
|
import FormLabel from '@mui/material/FormLabel';
|
||||||
|
import Radio from '@mui/material/Radio';
|
||||||
|
import { daDK } from "@mui/material/locale";
|
||||||
|
|
||||||
|
function SurveyDocument() {
|
||||||
|
|
||||||
|
const history = useHistory();
|
||||||
|
const { survey_id } = useParams();
|
||||||
|
const [isLoading, setLoading] = useState();
|
||||||
|
|
||||||
|
|
||||||
|
const [tab_variable, settab_variable] = useState([]);
|
||||||
|
|
||||||
|
|
||||||
|
const [get_Given_Survey_Data_api, setget_Given_Survey_Data_api] = useState();
|
||||||
|
const [get_Given_Survey_Data_message, setget_Given_Survey_Data_message] = useState();
|
||||||
|
const [get_Given_Survey_Data_result, setget_Given_Survey_Data_result] = useState([]);
|
||||||
|
function get_Given_Survey_Data() {
|
||||||
|
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_Survey_Data_No_Token/";
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
//form.append("token", stored_cookie);
|
||||||
|
form.append("survey_id", survey_id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
//console.log(" get_Given_Survey_Data : In test res.data.status = " + res.data.status);
|
||||||
|
//console.log(" get_Given_Survey_Data: res.data.message = " + res.data.message);
|
||||||
|
|
||||||
|
if (String(res.data.status) === "true") {
|
||||||
|
setget_Given_Survey_Data_api("true");
|
||||||
|
setget_Given_Survey_Data_result(res.data.message);
|
||||||
|
|
||||||
|
var new_data2 = {};
|
||||||
|
|
||||||
|
const new_data = JSON.parse(res.data.message).list_questions.map((x) => {
|
||||||
|
var obj_name = x._id;
|
||||||
|
var local_node = {}
|
||||||
|
new_data2[String(obj_name)] = "";
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
settab_variable(new_data2);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (String(res.data.status) === String("Err_Connexion")) {
|
||||||
|
alert('Erreur: ' + res.data.message);
|
||||||
|
history.push("/Connexion");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setget_Given_Survey_Data_api("false");
|
||||||
|
setget_Given_Survey_Data_message(res.data.message)
|
||||||
|
alert(res.data.message);
|
||||||
|
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('get_Given_Survey_Data ee: Not good man :( = ', error);
|
||||||
|
setget_Given_Survey_Data_api("false");
|
||||||
|
get_Given_Survey_Data_message(" Impossible de recuperer les données")
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
|
||||||
|
get_Given_Survey_Data();
|
||||||
|
|
||||||
|
window.scrollTo({
|
||||||
|
top: 0,
|
||||||
|
behavior: "smooth",
|
||||||
|
});
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
|
||||||
|
const [Record_Survey_Data_api, setRecord_Survey_Data_api] = useState();
|
||||||
|
const [Record_Survey_Data_message, setRecord_Survey_Data_message] = useState();
|
||||||
|
const [Record_Survey_Data_result, setRecord_Survey_Data_result] = useState();
|
||||||
|
function Record_Survey_Data() {
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const myJSON = JSON.stringify(tab_variable);
|
||||||
|
|
||||||
|
|
||||||
|
form.append("survey_id", survey_id);
|
||||||
|
form.append("list_response", myJSON);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
console.log(" form == ", form);
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Record_Survey_Data_No_Token/";
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
//console.log(" In Record_Survey_Data res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Record_Survey_Data res.data.message r_class = " + res.data.message);
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
|
||||||
|
alert(res.data.message);
|
||||||
|
history.push("/");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setRecord_Survey_Data_api("false");
|
||||||
|
setRecord_Survey_Data_message(res.data.message);
|
||||||
|
alert(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Record_Survey_Data : Not good man :( Record_Survey_Data = ' + error);
|
||||||
|
setRecord_Survey_Data_api("false");
|
||||||
|
alert(" Impossible d'enregistrer le formulaire ");
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function change_survey_data(e) {
|
||||||
|
|
||||||
|
var tmp = tab_variable;
|
||||||
|
|
||||||
|
tmp[String(e.name)] = e.value;
|
||||||
|
|
||||||
|
settab_variable(tmp)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="surveydocument">
|
||||||
|
|
||||||
|
|
||||||
|
{isLoading && <div className="loader-container">
|
||||||
|
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
|
<Header />
|
||||||
|
|
||||||
|
{String(get_Given_Survey_Data_api) === "true" && <div style={{ "textAlign": "left", }}>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div style={{ "width": "80%", "marginLeft": "10%", "background": "#F2F4F4", overflow: "auto", "paddingBottom": "1rem" }}>
|
||||||
|
<br />
|
||||||
|
<div className="question_box_entete">
|
||||||
|
Formation : {JSON.parse(get_Given_Survey_Data_result).class_title} <br />
|
||||||
|
session_code : {JSON.parse(get_Given_Survey_Data_result).session_code} <br />
|
||||||
|
session_title : {JSON.parse(get_Given_Survey_Data_result).session_title} <br />
|
||||||
|
session_code_date_debut : {JSON.parse(get_Given_Survey_Data_result).session_code_date_debut} <br />
|
||||||
|
session_code_date_fin : {JSON.parse(get_Given_Survey_Data_result).session_code_date_fin} <br />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{JSON.parse(get_Given_Survey_Data_result).list_questions && JSON.parse(get_Given_Survey_Data_result).list_questions.length > 0 &&
|
||||||
|
JSON.parse(get_Given_Survey_Data_result).list_questions.map((question) => (
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div className="question_box">
|
||||||
|
{question.question} <br />
|
||||||
|
|
||||||
|
|
||||||
|
{question.type && String(question.type) === "text" &&
|
||||||
|
<TextField
|
||||||
|
margin="dense"
|
||||||
|
name={question._id}
|
||||||
|
fullWidth
|
||||||
|
type="text"
|
||||||
|
multiline={true}
|
||||||
|
rows={2}
|
||||||
|
onChange={(e) => {
|
||||||
|
change_survey_data(e.target);
|
||||||
|
}}
|
||||||
|
|
||||||
|
/>}
|
||||||
|
|
||||||
|
{question.type && String(question.type) === "note" && question.max_note &&
|
||||||
|
<div id={question._id}
|
||||||
|
name={question._id}>
|
||||||
|
<Rating
|
||||||
|
id={question._id}
|
||||||
|
name={question._id}
|
||||||
|
precision={0.5}
|
||||||
|
defaultValue={0}
|
||||||
|
max={parseInt(question.max_note)}
|
||||||
|
onChange={(e) => {
|
||||||
|
change_survey_data(e.target);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
{question.type && String(question.type) === "entier" && question.max_note &&
|
||||||
|
<div>
|
||||||
|
<TextField
|
||||||
|
margin="dense"
|
||||||
|
fullWidth
|
||||||
|
type="integer"
|
||||||
|
name={question._id}
|
||||||
|
onChange={(e) => {
|
||||||
|
change_survey_data(e.target);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
{question.type && String(question.type) === "bool" &&
|
||||||
|
<div>
|
||||||
|
<FormControl>
|
||||||
|
<FormLabel id="demo-row-radio-buttons-group-label">Gender</FormLabel>
|
||||||
|
<RadioGroup
|
||||||
|
row
|
||||||
|
aria-labelledby="demo-row-radio-buttons-group-label"
|
||||||
|
|
||||||
|
onChange={(e) => {
|
||||||
|
change_survey_data(e.target);
|
||||||
|
}}
|
||||||
|
name={question._id}
|
||||||
|
>
|
||||||
|
<FormControlLabel value="oui" control={<Radio />} label="Oui" />
|
||||||
|
<FormControlLabel value="non" control={<Radio />} label="Non" />
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
</FormControl>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/*
|
||||||
|
Question : {question.question} <br />
|
||||||
|
Type : {question.type} <br />
|
||||||
|
{question.max_note && question.max_note} <br />
|
||||||
|
|
||||||
|
*/}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
))}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ "width": "80%", "marginLeft": "10%", "background": "white", }}>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||||
|
|
||||||
|
<div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||||
|
|
||||||
|
<Button variant="contained" className="bton_enreg" onClick={Record_Survey_Data}>Envoyer
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }} >
|
||||||
|
<Button variant="contained" className="bton_annule" onClick={"annule_edit_formulaire"}>Annuler
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
{String(get_Given_Survey_Data_api) === "false" && <div style={{ height: "40vh" }}>
|
||||||
|
|
||||||
|
Le document est invalide
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
<div className="div_row">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div className="pieddepage">
|
||||||
|
<Footer />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SurveyDocument;
|
|
@ -0,0 +1,17 @@
|
||||||
|
import Link from "next/link";
|
||||||
|
import Navigation from "../components/Navigation";
|
||||||
|
import SurveyDocument from "../components/SurveyDocument"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default function Login() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Navigation />
|
||||||
|
<div>
|
||||||
|
<SurveyDocument />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -102,3 +102,5 @@
|
||||||
@import "./components/materiel_salle";
|
@import "./components/materiel_salle";
|
||||||
@import "./components/crm_opportunite";
|
@import "./components/crm_opportunite";
|
||||||
@import "./components/esign";
|
@import "./components/esign";
|
||||||
|
@import "./components/partner_configiguration_formulaires";
|
||||||
|
@import "./components/surveydocument";
|
||||||
|
|
Loading…
Reference in New Issue