Compare commits

..

No commits in common. "main" and "branche_01062025" have entirely different histories.

306 changed files with 131348 additions and 16425 deletions

View File

@ -2,6 +2,7 @@
<html lang="fr">
<head>
<link rel="stylesheet" href="../src/App.css">
<script src="https://widget-js.cometchat.io/v2/cometchatwidget.js"></script>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
@ -104,17 +105,19 @@
gtag("config", "UA-37423053-2");
</script>
<!-- Smartsupp Live Chat script -->
<!-- Smartsupp Live Chat script -- >
<script type="text/javascript">
var _smartsupp = _smartsupp || {};
_smartsupp.key = '2193f283b62a483c4d12f96fb3e48d866f1bfe61';
window.smartsupp || (function (d) {
var s, c, o = smartsupp = function () { o._.push(arguments) }; o._ = [];
s = d.getElementsByTagName('script')[0]; c = d.createElement('script');
c.type = 'text/javascript'; c.charset = 'utf-8'; c.async = true;
c.src = 'https://www.smartsuppchat.com/loader.js?'; s.parentNode.insertBefore(c, s);
})(document);
</script>
</script> -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-17B18WZKPN"></script>
@ -126,14 +129,16 @@
gtag('config', 'G-17B18WZKPN');
</script>
<!-- Google Fonts-->
<!-- Google Fonts-- >
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap"
rel="stylesheet">
</head>
-->
</head>
<body>
<!-- Google Tag Manager (noscript) -->

View File

@ -1,3 +1,2 @@
nom;raison_sociale;email;adresse;code_postal;ville;pays;siret;telephone;tva;website;invoice_adresse;invoice_code_postal;invoice_email;invoice_nom;invoice_siret;invoice_tva;invoice_ville;invoice_pays
client_test01;raison_sociale1;email-test01@mysy-training.fr;2 place du test;75001;Paris;France;Siret1;1010101;;www.client_test01.fr;invoice_adresse;invoice_code_postal;fact@mysy.fr;invoice_nom_val;invoice_siret_val;invoice_tva;invoice_ville;invoice_pays
client_test02;raison_sociale1;email_test02@mysy-training.fr;2 place du test;75001;Paris;France;Siret1;1010101;;www.client-test02.fr;invoice_adresse;invoice_code_postal;fact@mysy.fr;invoice_nom_val;invoice_siret_val;invoice_tva;invoice_ville;invoice_pays
nom;raison_sociale;email;adresse;code_postal;ville;pays;siret;telephone;tva;website;invoice_adresse;invoice_code_postal;invoice_email;invoice_nom;invoice_siret;invoice_tva;invoice_ville;invoice_pays;condition_paiement_code;is_compagnie;partner_groupe_client_code;contact_civilite;contact_nom;contact_prenom;contact_email;is_contact_communication;contact_fonction;contact_mobile;contact_phone;contact_adresse;contact_code_postal;contact_ville;contact_pays;contact_siret;contact_tva;is_fournisseur;is_client;is_financeur;client_type_code
imprt_client_01;raison_sociale1;import_mail_01@mysy-training.fr;2 place du test;75001;Paris;France;Siret1;1010101;;www.client_test01.fr;invoice_adresse;invoice_code_postal;fact@mysy.fr;invoice_nom_val;invoice_siret_val;invoice_tva;invoice_ville;invoice_pays;15JM;1;qsd;M;toto1;prenom_toto;toto@lll.fr;1;fonction;6060606;1020304;addd;45000;villllle;payssss;siret011_contact;tvz_ci;0;1;;CL_TYPE1

1 nom raison_sociale email adresse code_postal ville pays siret telephone tva website invoice_adresse invoice_code_postal invoice_email invoice_nom invoice_siret invoice_tva invoice_ville invoice_pays condition_paiement_code is_compagnie partner_groupe_client_code contact_civilite contact_nom contact_prenom contact_email is_contact_communication contact_fonction contact_mobile contact_phone contact_adresse contact_code_postal contact_ville contact_pays contact_siret contact_tva is_fournisseur is_client is_financeur client_type_code
2 client_test01 imprt_client_01 raison_sociale1 email-test01@mysy-training.fr import_mail_01@mysy-training.fr 2 place du test 75001 Paris France Siret1 1010101 www.client_test01.fr invoice_adresse invoice_code_postal fact@mysy.fr invoice_nom_val invoice_siret_val invoice_tva invoice_ville invoice_pays 15JM 1 qsd M toto1 prenom_toto toto@lll.fr 1 fonction 6060606 1020304 addd 45000 villllle payssss siret011_contact tvz_ci 0 1 CL_TYPE1
client_test02 raison_sociale1 email_test02@mysy-training.fr 2 place du test 75001 Paris France Siret1 1010101 www.client-test02.fr invoice_adresse invoice_code_postal fact@mysy.fr invoice_nom_val invoice_siret_val invoice_tva invoice_ville invoice_pays

View File

@ -1,3 +1,3 @@
formation_code_externe;code_session;date_debut;date_fin;nb_participant;adresse;code_postal;ville;pays;date_debut_inscription;date_fin_inscription;distanciel;presentiel;prix_session;session_status;lms_class_code;session_etape;formateur_email;titre;location_type;is_bpf
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;05/07/2024;15/07/2024;10;2 passage de la Providence 01;75001;Paris 1;France;03/01/2024;05/07/2024;1;0;1550;1;;0;;Session Fev;intra;1
MYSY_Demo_AP_v2;SESS_02_DEMO_AP_V2;20/08/2024;30/08/2024;15;3 passage de la Providence 03;75001;Paris 2;France;04/01/2024;20/08/2024;0;1;1550;1;;0;;Session Avril;extra;1
formation_code_externe;code_session;date_debut;date_fin;nb_participant;adresse;code_postal;ville;pays;date_debut_inscription;date_fin_inscription;distanciel;presentiel;prix_session;session_status;lms_class_code;session_etape;formateur_email;titre;location_type;is_bpf;type_session
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;05/07/2024;15/07/2024;10;2 passage de la Providence 01;75001;Paris 1;France;03/01/2024;05/07/2024;1;0;1550;1;;0;;Session Fev;intra;1;0
MYSY_Demo_AP_v2;SESS_02_DEMO_AP_V2;20/08/2024;30/08/2024;15;3 passage de la Providence 03;75001;Paris 2;France;04/01/2024;20/08/2024;0;1;1550;1;;0;;Session Avril;extra;1;0

1 formation_code_externe code_session date_debut date_fin nb_participant adresse code_postal ville pays date_debut_inscription date_fin_inscription distanciel presentiel prix_session session_status lms_class_code session_etape formateur_email titre location_type is_bpf type_session
2 MYSY_Demo_AP_v2 SESS_01_DEMO_AP_V2 05/07/2024 15/07/2024 10 2 passage de la Providence 01 75001 Paris 1 France 03/01/2024 05/07/2024 1 0 1550 1 0 Session Fev intra 1 0
3 MYSY_Demo_AP_v2 SESS_02_DEMO_AP_V2 20/08/2024 30/08/2024 15 3 passage de la Providence 03 75001 Paris 2 France 04/01/2024 20/08/2024 0 1 1550 1 0 Session Avril extra 1 0

View File

@ -1,6 +1,4 @@
formation_code_externe;code_session;client_rattachement_email;client_rattachement_nom;prenom;nom;employeur;telephone;email;adresse;code_postal;ville;pays;modefinancement;opco;status;prix
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;;;part 2;part nom2;employeur 2;10101;mysytraining+apprenant1@gmail.com;adresse01;code_postal01;ville01;pays01;modefinancement;opco;0;1500
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client1@gmail.com ;Client 1 ;part 3;part nom3_client;employeur 3;10101;mysytraining+apprenant2@gmail.com;adresse02;code_postal02;ville02;pays02;modefinancement;;0;1500
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client1@gmail.com ;Client 1 ;part 4;part nom4_client;employeur 4;10101;mysytraining+apprenant3@gmail.com;adresse03;code_postal03;ville03;pays03;modefinancement;;0;1500
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client2@gmail.com;Client 2;part 5;part nom5_client;employeur 5;10101; mysylaplumedepierrot+01@gmail.com;adresse04;code_postal04;ville04;pays04;modefinancement;;0;1500
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client2@gmail.com;Client 2;part 6;part nom6_client;employeur 6;10101;mysylaplumedepierrot+02@gmail.com;adresse05;code_postal05;ville05;pays05;modefinancement;;0;1500
formation_code_externe;code_session;client_rattachement_email;client_rattachement_nom;facture_client_rattachement_email;facture_client_rattachement_nom;civilite;prenom;nom;employeur;telephone;email;adresse;code_postal;ville;pays;modefinancement;opco;status;prix;type_apprenant;date_naissance
IFOD_01;test_facturatop_dup ;mysytraining+client1@gmail.com;Client 1;PP_ETAT_GENERAL_01@mysy-training.com ;PP_ETAT_GENERAL_01 ;mme;Ibrahim uuu;nom1;employeur 4;10101;mysytraining+apprenant8@gmail.com;adresse03;code_postal03;ville03;pays03;modefinancement;;0;18500;0;20/12/1990
IFOD_01;test_facturatop_dup ;mysytraining+client2@gmail.com;Client 2;mysylaplumedepierrot@gmail.com;Etat financeur;mme;Alice excel;nom2;employeur 5;10101;mysytraining+apprenant9@gmail.com;adresse04;code_postal04;ville04;pays04;modefinancement;;0;15009;;06/04/1977
IFOD_01;test_facturatop_dup ;mysytraining+client2@gmail.com;Client 2;mysylaplumedepierrot@gmail.com;Etat financeur;mme;Thomas excel;nom3;employeur 6;10101;mysytraining+apprenant10@gmail.com;adresse05;code_postal05;ville05;pays05;modefinancement;;0;120;0;

1 formation_code_externe code_session client_rattachement_email client_rattachement_nom facture_client_rattachement_email facture_client_rattachement_nom civilite prenom nom employeur telephone email adresse code_postal ville pays modefinancement opco status prix type_apprenant date_naissance
2 MYSY_Demo_AP_v2 IFOD_01 SESS_01_DEMO_AP_V2 test_facturatop_dup  mysytraining+client1@gmail.com Client 1 PP_ETAT_GENERAL_01@mysy-training.com PP_ETAT_GENERAL_01 mme part 2 Ibrahim uuu part nom2 nom1 employeur 2 employeur 4 10101 mysytraining+apprenant1@gmail.com mysytraining+apprenant8@gmail.com adresse01 adresse03 code_postal01 code_postal03 ville01 ville03 pays01 pays03 modefinancement opco 0 1500 18500 0 20/12/1990
3 MYSY_Demo_AP_v2 IFOD_01 SESS_01_DEMO_AP_V2 test_facturatop_dup  mysytraining+client1@gmail.com mysytraining+client2@gmail.com Client 1  Client 2 mysylaplumedepierrot@gmail.com Etat financeur mme part 3 Alice excel part nom3_client nom2 employeur 3 employeur 5 10101 mysytraining+apprenant2@gmail.com mysytraining+apprenant9@gmail.com adresse02 adresse04 code_postal02 code_postal04 ville02 ville04 pays02 pays04 modefinancement 0 1500 15009 06/04/1977
4 MYSY_Demo_AP_v2 IFOD_01 SESS_01_DEMO_AP_V2 test_facturatop_dup  mysytraining+client1@gmail.com mysytraining+client2@gmail.com Client 1  Client 2 mysylaplumedepierrot@gmail.com Etat financeur mme part 4 Thomas excel part nom4_client nom3 employeur 4 employeur 6 10101 mysytraining+apprenant3@gmail.com mysytraining+apprenant10@gmail.com adresse03 adresse05 code_postal03 code_postal05 ville03 ville05 pays03 pays05 modefinancement 0 1500 120 0
MYSY_Demo_AP_v2 SESS_01_DEMO_AP_V2 mysytraining+client2@gmail.com Client 2 part 5 part nom5_client employeur 5 10101 mysylaplumedepierrot+01@gmail.com adresse04 code_postal04 ville04 pays04 modefinancement 0 1500
MYSY_Demo_AP_v2 SESS_01_DEMO_AP_V2 mysytraining+client2@gmail.com Client 2 part 6 part nom6_client employeur 6 10101 mysylaplumedepierrot+02@gmail.com adresse05 code_postal05 ville05 pays05 modefinancement 0 1500

View File

@ -0,0 +1,6 @@
formation_code_externe;code_session;client_rattachement_email;client_rattachement_nom;prenom;nom;employeur;telephone;email;adresse;code_postal;ville;pays;modefinancement;opco;status;prix
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;;;part 2;part nom2;employeur 2;10101;mysytraining+apprenant1@gmail.com;adresse01;code_postal01;ville01;pays01;modefinancement;opco;0;1500
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client1@gmail.com ;Client 1 ;part 3;part nom3_client;employeur 3;10101;mysytraining+apprenant2@gmail.com;adresse02;code_postal02;ville02;pays02;modefinancement;;0;1500
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client1@gmail.com ;Client 1 ;part 4;part nom4_client;employeur 4;10101;mysytraining+apprenant3@gmail.com;adresse03;code_postal03;ville03;pays03;modefinancement;;0;1500
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client2@gmail.com;Client 2;part 5;part nom5_client;employeur 5;10101; mysylaplumedepierrot+01@gmail.com;adresse04;code_postal04;ville04;pays04;modefinancement;;0;1500
MYSY_Demo_AP_v2;SESS_01_DEMO_AP_V2;mysytraining+client2@gmail.com;Client 2;part 6;part nom6_client;employeur 6;10101;mysylaplumedepierrot+02@gmail.com;adresse05;code_postal05;ville05;pays05;modefinancement;;0;1500
1 formation_code_externe code_session client_rattachement_email client_rattachement_nom prenom nom employeur telephone email adresse code_postal ville pays modefinancement opco status prix
2 MYSY_Demo_AP_v2 SESS_01_DEMO_AP_V2 part 2 part nom2 employeur 2 10101 mysytraining+apprenant1@gmail.com adresse01 code_postal01 ville01 pays01 modefinancement opco 0 1500
3 MYSY_Demo_AP_v2 SESS_01_DEMO_AP_V2 mysytraining+client1@gmail.com Client 1  part 3 part nom3_client employeur 3 10101 mysytraining+apprenant2@gmail.com adresse02 code_postal02 ville02 pays02 modefinancement 0 1500
4 MYSY_Demo_AP_v2 SESS_01_DEMO_AP_V2 mysytraining+client1@gmail.com Client 1  part 4 part nom4_client employeur 4 10101 mysytraining+apprenant3@gmail.com adresse03 code_postal03 ville03 pays03 modefinancement 0 1500
5 MYSY_Demo_AP_v2 SESS_01_DEMO_AP_V2 mysytraining+client2@gmail.com Client 2 part 5 part nom5_client employeur 5 10101 mysylaplumedepierrot+01@gmail.com adresse04 code_postal04 ville04 pays04 modefinancement 0 1500
6 MYSY_Demo_AP_v2 SESS_01_DEMO_AP_V2 mysytraining+client2@gmail.com Client 2 part 6 part nom6_client employeur 6 10101 mysylaplumedepierrot+02@gmail.com adresse05 code_postal05 ville05 pays05 modefinancement 0 1500

View File

@ -1,3 +1,46 @@
/* latin-ext */
@font-face {
font-family: 'DM Sans';
font-style: italic;
font-weight: 100 1000;
font-display: swap;
src: url(./fonts_elyos/dmsans/DMSans.ttf) format('truetype');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'DM Sans';
font-style: italic;
font-weight: 100 1000;
font-display: swap;
src: url(./fonts_elyos/dmsans/DMSans.ttf) format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 100 1000;
font-display: swap;
src: url(./fonts_elyos/dmsans/DMSans.ttf) format('truetype');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 100 1000;
font-display: swap;
src: url(./fonts_elyos/dmsans/DMSans.ttf) format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.react-confirm-alert-body {
font-family: Arial, Helvetica, sans-serif;
padding: 30px;
@ -13,6 +56,7 @@
@media only screen and (max-width: 600px) {
/*style smartphones et petites tablettes en portrait*/
.react-confirm-alert-body {
font-family: Arial, Helvetica, sans-serif;
@ -22,30 +66,31 @@
border-radius: 10px;
box-shadow: 0 20px 75px rgb(0 0 0 / 13%);
color: #666;
width:90% !important;
width: 90% !important;
margin-left: auto !important;
margin-right: auto !important;
padding-left: 0.2rem !important;
padding-right: 0.2rem !important;
z-index: 99999999 !important;
}
.overlay-custom-class-name{
.overlay-custom-class-name {
z-index: 99999999 !important;
}
.react-confirm-alert{
.react-confirm-alert {
width: 90% !important;
z-index: 999999 !important;
}
.App {
align-items: center;
margin-left: 0%;
margin-right: 0%;
text-align: center;
height: calc(100vh - 10rem);
min-height : calc(100vh - 10rem);
min-height: calc(100vh - 10rem);
}
.App-link {
@ -56,6 +101,7 @@
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
@ -77,7 +123,7 @@
margin-right: 0%;
text-align: center;
height: calc(100vh - 10rem);
min-height : calc(100vh - 10rem);
min-height: calc(100vh - 10rem);
}
.App-link {
@ -88,6 +134,7 @@
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
@ -109,7 +156,7 @@
margin-right: 0%;
text-align: center;
height: calc(100vh - 10rem);
min-height : calc(100vh - 10rem);
min-height: calc(100vh - 10rem);
}
.App-link {
@ -120,6 +167,7 @@
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
@ -132,7 +180,7 @@
}
}
@media only screen and (min-width: 1200px) {
@media only screen and (min-width: 1200px) {
/*style petites-moyennes tablettes */
.App {
@ -141,7 +189,7 @@
margin-right: 0%;
text-align: center;
height: calc(100vh - 10rem);
min-height : calc(100vh - 10rem);
min-height: calc(100vh - 10rem);
}
.App-link {
@ -152,6 +200,7 @@
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
@ -164,8 +213,7 @@
}
}
.main_cont {
}
.main_cont {}
.main_haut {
float: left;
@ -177,18 +225,22 @@
.main_bas {
float: left;
border-width: 0.01rem;
width: 100%;
font-family: 'Quicksand', 'Signika', "sans-serif" !important;
font-size: small !important;
color: black;
height: 5rem;
position:fixed;
top: calc(100vh - 5rem);
z-index: 13;
float: left;
border-width: 0.01rem;
width: 100%;
font-family: 'Quicksand', 'Signika', "sans-serif" !important;
font-size: small !important;
color: black;
height: 5rem;
position: fixed;
top: calc(100vh - 5rem);
z-index: 13;
}
.MuiAutocomplete-input {
font-size: small !important;
font-family: DM Sans !important;
}
.radio-container {
justify-content: space-around;
@ -201,11 +253,11 @@
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.452);
}
input{
transform: translateY(1px);
}
input {
transform: translateY(1px);
}
label {
margin-left: 10px;
cursor: pointer;
}
label {
margin-left: 10px;
cursor: pointer;
}

View File

@ -1,27 +1,26 @@
import React, { useState, useEffect } from "react";
import { BrowserRouter, Switch, Route } from "react-router-dom"
import React, { useState, useEffect, lazy, Suspense } from "react";
import { BrowserRouter, Route, Switch, useHistory } from "react-router-dom";
import './App.css';
import NotFound from './pages/NotFound'
import Contact from './pages/Contact'
import Connexion from './pages/Connexion'
import Login from './pages/Login';
/*// ---
import Recherche_new_v2 from "./pages/recherche_new_v2";
import Recherche_new_v3 from "./pages/recherche_new_v3";
import Recherche_new_v4 from "./pages/recherche_new_v4";
import Mon_Catalogue_Public from "./pages/mon_catalogue_public";
import Mon_Intranet_Public from "./pages/mon_intranet_public";
import Mon_Ent_Student from "./pages/mon_ent_student";
import TestUrl from "./pages/testurl";
import Account from "./pages/account";
import Student_Account from "./pages/student_account";
import DisplayDetailClass_new_v2 from "./pages/displaydetailclass_new_v2";
import DisplayDetailClass_new_v3 from "./pages/displaydetailclass_new_v3";
//---------*/
/*
import Display_Partner_Catalog_DetailClass_new_v2 from "./pages/display_partner_catalog_detailclass_new_v2"
import DisplayDetailArticle from "./pages/displaydetailarticle";
import AddArticleAvis from "./pages/addarticleavis";
import Acceuil from "./pages/acceuil";
import Partner from "./pages/partner";
@ -29,29 +28,25 @@ import CreateAccount from "./pages/createaccount";
import PartnerLogin from "./pages/partnerlogin";
import PartnerLogin0 from "./pages/partnerlogin0";
import PartnerLogin1 from "./pages/partnerlogin1";
*/
/*
import RechecheArticles from "./pages/recherchearticles";
import AddArticle from "./pages/addarticle";
import ResetUserPwd from "./pages/resetuserpwd";
import DeleteUserAccount from "./pages/deleteuseraccount";
import ContactezNous from "./pages/contactez_nous";
import CoupDeCoeur from "./pages/coupdecoeur";
import AccountUserActivated from "./pages/accountuseractivated";
import ProduitsService from "./pages/produitservice";
import Recherche_new from "./pages/recherche_new";
import Recherche_old from "./pages/recherche";
import UserSignFirst from "./pages/usersigninfirst";
import GestionAdministrative from "./components/GestionAdministrative";
import Emargement from "./pages/emargementOk";
import Formation_Cartouche_Com from "./pages/recherche_cartouche_com";
*/
/*
import SeDesabonner from './pages/sedesabonner';
import OrderConfirmation_3DS from "./pages/orderconfirmation_3DS";
import Training_Inactive_Or_Not_Found from "./pages/Traning_Inactif_Or_Not_Exist";
import TestUrl_New from "./pages/testurl_new";
import QuiSommesNous_v3 from "./pages/quisommesnous_v3";
import Fonctionnalites from "./pages/fonctionnalite";
import Test_Drag_Drop from "./pages/test_drag_drop";
import Test_Drag_Drop2 from "./pages/test_dnd";
import ESign from "./pages/eSigne";
@ -63,27 +58,92 @@ import AutomaticQuotation from "./pages/automaticquotation";
import MySyIA from "./pages/iamysy";
import Maintenance from "./pages/maintenance_page";
import Subdomain_Recherche_new_v2 from "./pages/subdomain_recherche_new_v2";
*/
/*
// New Design 2025
import New_Sign_In_2025 from "./pages/new_p_sign_in_2025";
import New_Sign_Up_2025 from "./pages/new_p_sign_up_2025";
import New_Tarif_2025 from "./pages/new_p_tarif_2025";
import New_Contact_2025 from "./pages/new_p_contact_2025";
import New_Article_Detail_2025 from "./pages/new_p_article_detail_2025";
import New_Formation_Detail_2025 from "./pages/new_p_detail_formation_2025";
import New_Marktplace_2025 from "./pages/new_p_marketplace_2025";
//import New_Marktplace_2025 from "./pages/new_p_marketplace_2025";
import New_Fonctionnalite_2025 from "./pages/new_p_fonctionnalite_2025";
import New_A_Propos_2025 from "./pages/new_p_a_propos_2025";
import New_Home_Page_2025 from "./pages/new_p_home_page_2025";
import Jmjformation_catalogue from "./pages/jmjformation_catalogue_public";
import New_Test_Header_Footer_2025 from "./pages/new_p_test_header_footer_2025";
*/
import img_loading_spin from "./mysy_img/mysy_spin_loading.gif";
function App() {
const New_Marktplace_2025 = lazy(() => import("./pages/new_p_marketplace_2025"));
const New_Test_Header_Footer_2025 = lazy(() => import("./pages/new_p_test_header_footer_2025"));
const Jmjformation_catalogue = lazy(() => import("./pages/jmjformation_catalogue_public"));
const New_Home_Page_2025 = lazy(() => import("./pages/new_p_home_page_2025"));
const New_A_Propos_2025 = lazy(() => import("./pages/new_p_a_propos_2025"));
const New_Fonctionnalite_2025 = lazy(() => import("./pages/new_p_fonctionnalite_2025"));
const New_Formation_Detail_2025 = lazy(() => import("./pages/new_p_detail_formation_2025"));
const New_Article_Detail_2025 = lazy(() => import("./pages/new_p_article_detail_2025"));
const New_Contact_2025 = lazy(() => import("./pages/new_p_contact_2025"));
const New_Tarif_2025 = lazy(() => import("./pages/new_p_tarif_2025"));
const New_Sign_Up_2025 = lazy(() => import("./pages/new_p_sign_up_2025"));
const New_Sign_In_2025 = lazy(() => import("./pages/new_p_sign_in_2025"));
const Student_Account = lazy(() => import("./pages/student_account"));
const Account = lazy(() => import("./pages/account"));
const TestUrl = lazy(() => import("./pages/testurl"));
const Mon_Ent_Student = lazy(() => import("./pages/mon_ent_student"));
const Mon_Intranet_Public = lazy(() => import("./pages/mon_intranet_public"));
const Mon_Catalogue_Public = lazy(() => import("./pages/mon_catalogue_public"));
const Recherche_new_v4 = lazy(() => import("./pages/recherche_new_v4"));
const Recherche_new_v3 = lazy(() => import("./pages/recherche_new_v3"));
const Recherche_new_v2 = lazy(() => import("./pages/recherche_new_v2"));
const Subdomain_Recherche_new_v2 = lazy(() => import("./pages/subdomain_recherche_new_v2"));
const Maintenance = lazy(() => import("./pages/maintenance_page"));
const MySyIA = lazy(() => import("./pages/iamysy"));
const AutomaticQuotation = lazy(() => import("./pages/automaticquotation"));
const Emarge_QR_Code = lazy(() => import("./pages/emarge_qr_code"));
const Survey_Eval_QR_Code = lazy(() => import("./pages/survey_eval_qr_code"));
const UpdateAttendeeList = lazy(() => import("./pages/updateattendeelist"));
const SurveyDocument = lazy(() => import("./pages/surveydocument"));
const SurveyDocument_Qr_Code = lazy(() => import("./pages/surveydocument_qr_code"));
const ESignDiplayDignedDocument = lazy(() => import("./pages/edigndiplaydigneddocument"));
const ESign = lazy(() => import("./pages/eSigne"));
const Test_Drag_Drop2 = lazy(() => import("./pages/test_dnd"));
const Test_Drag_Drop = lazy(() => import("./pages/test_drag_drop"));
const TestUrl_New = lazy(() => import("./pages/testurl_new"));
const Training_Inactive_Or_Not_Found = lazy(() => import("./pages/Traning_Inactif_Or_Not_Exist"));
const OrderConfirmation_3DS = lazy(() => import("./pages/orderconfirmation_3DS"));
const SeDesabonner = lazy(() => import("./pages/sedesabonner"));
const Emargement = lazy(() => import("./pages/emargementOk"));
const UserSignFirst = lazy(() => import("./pages/usersigninfirst"));
const Recherche_new = lazy(() => import("./pages/recherche_new"));
const ProduitsService = lazy(() => import("./pages/produitservice"));
const AccountUserActivated = lazy(() => import("./pages/accountuseractivated"));
const DeleteUserAccount = lazy(() => import("./pages/deleteuseraccount"));
const ResetUserPwd = lazy(() => import("./pages/resetuserpwd"));
const AddArticle = lazy(() => import("./pages/addarticle"));
const RechecheArticles = lazy(() => import("./pages/recherchearticles"));
const PartnerLogin1 = lazy(() => import("./pages/partnerlogin1"));
const PartnerLogin0 = lazy(() => import("./pages/partnerlogin0"));
const PartnerLogin = lazy(() => import("./pages/partnerlogin"));
const CreateAccount = lazy(() => import("./pages/createaccount"));
const Partner = lazy(() => import("./pages/partner"));
const Acceuil = lazy(() => import("./pages/acceuil"));
const AddArticleAvis = lazy(() => import("./pages/addarticleavis"));
const Display_Partner_Catalog_DetailClass_new_v2 = lazy(() => import("./pages/display_partner_catalog_detailclass_new_v2"));
const [screenSizeh, getDimension] = useState({
dynamicWidth: window.innerHeight
});
@ -98,13 +158,24 @@ function App() {
return subdomain;
};
const history = useHistory();
const [isLoading, setLoading] = useState();
const [mysy_domain, setmysy_domain] = useState(window.location.hostname.split('.')[0]);
useEffect(() => {
setLoading(true);
let myurl = window.location.host;
let myurl_pathname = window.location.pathname;
// console.log(" ### mysy_domain =", mysy_domain)
// console.log(" ### myurl =", myurl)
// console.log(" ### window.location.hostname =", window.location.hostname)
var domain = myurl;
if (domain.includes('://')) {
@ -124,22 +195,27 @@ function App() {
var tab_action = ['/moncatalog', '/Display-Partner-Catalog-Detail-formation', 'Display-Partner-Catalog-Detail-formation', 'moncatalog'];
if (tab_myurl_pathname.length > 0 && !tab_action.includes(tab_myurl_pathname[1]) && !tab_reserved_subdomain.includes(subdomain)) {
var new_url = window.location.protocol + "//" + domain.split('.')[0] + "." + domain.split('.')[1] + "/moncatalog";
}
}
setLoading(false);
}, []);
return (
<div>
<div className="App">
{isLoading && <div className="loader-container">
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
</div>}
{/*API DEV = {process.env.REACT_APP_API_URL_DEV} <br/>
API REC = {process.env.REACT_APP_API_URL_REC}<br/>
API URL = {process.env.REACT_APP_API_URL}<br/>
@ -147,84 +223,83 @@ function App() {
<div className="main_haut">
<BrowserRouter>
<scrollToTop />
<Switch>
<Suspense fallback={<div>Loading...</div>}>
<BrowserRouter>
<scrollToTop />
<Switch>
<Route path="/v3" exact component={Recherche_new_v3} />
<Route path="/v4" exact component={Recherche_new_v4} />
<Route path="/subdomain" exact component={Subdomain_Recherche_new_v2} />
<Route path="/moncatalog" exact component={Mon_Catalogue_Public} />
<Route path="/intranet" exact component={Mon_Intranet_Public} />
<Route path="/ent_student" exact component={Mon_Ent_Student} />
<Route path="/acceuil" exact component={Acceuil} />
<Route path="/v3" exact component={Recherche_new_v3} />
<Route path="/v4" exact component={Recherche_new_v4} />
<Route path="/maintenance" exact component={Maintenance} />
<Route path="/subdomain" exact component={Subdomain_Recherche_new_v2} />
<Route path="/markeplace" exact component={Contact} />
<Route path="/moncatalog" exact component={Mon_Catalogue_Public} />
<Route path="/intranet" exact component={Mon_Intranet_Public} />
<Route path="/create_account" exact component={CreateAccount} />
<Route path="/user-connexion" exact component={Connexion} />
<Route path="/acceuil" exact component={Acceuil} />
<Route path="/testurl/:course/:tab" exact component={TestUrl} />
<Route path="/testurl_new/:courseid/:tabid" exact component={TestUrl_New} />
<Route path="/maintenance" exact component={Maintenance} />
<Route path="/ajout-article" exact component={AddArticleAvis} />
<Route path="/markeplace" exact component={Contact} />
<Route path="/create_account" exact component={CreateAccount} />
<Route path="/user-connexion" exact component={Connexion} />
<Route path="/Display-Partner-Catalog-Detail-formation/:classId" exact component={Display_Partner_Catalog_DetailClass_new_v2} />
<Route path="/Display-Partner-Catalog-Detail-formation/:classId/:action" exact component={Display_Partner_Catalog_DetailClass_new_v2} />
<Route path="/testurl/:course/:tab" exact component={TestUrl} />
<Route path="/testurl_new/:courseid/:tabid" exact component={TestUrl_New} />
<Route path="/mysy-account-activated/" exact component={AccountUserActivated} />
{/* <Route path="/Produits-Services/" exact component={ProduitsService} />*/}
<Route path="/tarifs_produits_services/" exact component={ProduitsService} />
<Route path="/Recherche_new/" exact component={Recherche_new} />
<Route path="/Recherche_new/:type/:categorie" exact component={Recherche_new} />
<Route path="/ajout-article" exact component={AddArticleAvis} />
<Route path="/Connexion-utilisateur-0/" exact component={UserSignFirst} />
<Route path="/Emargement/" exact component={Emargement} />
<Route path="/Test_DragDrop/" exact component={Test_Drag_Drop} />
<Route path="/Test_DragDrop2/" exact component={Test_Drag_Drop2} />
<Route path="/Recherche_new_v2/" exact component={Recherche_new_v2} />
<Route path="/Recherche_new_v2/:type/:categorie" exact component={Recherche_new_v2} />
<Route path="/unsubscribe/" exact component={SeDesabonner} />
<Route path="/OrderConfirmation_3DS/:orderid/:packs" exact component={OrderConfirmation_3DS} />
<Route path="/page-inconnue/" exact component={NotFound} />
<Route path="/formation-inconnue/" exact component={Training_Inactive_Or_Not_Found} />
<Route path="/Display-Partner-Catalog-Detail-formation/:classId" exact component={Display_Partner_Catalog_DetailClass_new_v2} />
<Route path="/Display-Partner-Catalog-Detail-formation/:classId/:action" exact component={Display_Partner_Catalog_DetailClass_new_v2} />
<Route path="/qr_emargement/:session_id/:partner_owner_recid/:my_safe_token" exact component={Emarge_QR_Code} />
<Route path="/qr_survey_eval/:session_id/:survey_type/:qr_code_safe_token" exact component={Survey_Eval_QR_Code} />
<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 path="/Survey/qrcode/:survey_id/" exact component={SurveyDocument_Qr_Code} />
<Route path="/UpadateAttendeeList/:client_id/:session_id/:partner_owner_recid/" exact component={UpdateAttendeeList} />
<Route path="/automatic-quotation/:partner_owner_recid/:objid/" exact component={AutomaticQuotation} />
<Route path="/mysy-account-activated/" exact component={AccountUserActivated} />
{/* <Route path="/Produits-Services/" exact component={ProduitsService} />*/}
<Route path="/tarifs_produits_services/" exact component={ProduitsService} />
<Route path="/Recherche_new/" exact component={Recherche_new} />
<Route path="/GestionAdministrative/:internal_url" exact component={GestionAdministrative} />
<Route path="/Recherche_new/:type/:categorie" exact component={Recherche_new} />
<Route path="/Recherche_old/" exact component={Recherche_old} />
<Route path="/Connexion-utilisateur-0/" exact component={UserSignFirst} />
<Route path="/Emargement/" exact component={Emargement} />
<Route path="/CartoucheComMySy/" exact component={Formation_Cartouche_Com} />
<Route path="/Test_DragDrop/" exact component={Test_Drag_Drop} />
<Route path="/Test_DragDrop2/" exact component={Test_Drag_Drop2} />
<Route path="/Recherche_new_v2/" exact component={Recherche_new_v2} />
<Route path="/Recherche_new_v2/:type/:categorie" exact component={Recherche_new_v2} />
<Route path="/unsubscribe/" exact component={SeDesabonner} />
<Route path="/OrderConfirmation_3DS/:orderid/:packs" exact component={OrderConfirmation_3DS} />
<Route path="/page-inconnue/" exact component={NotFound} />
<Route path="/formation-inconnue/" exact component={Training_Inactive_Or_Not_Found} />
<Route path="/intelligence-artificielle-mysy-training/" exact component={MySyIA} />
<Route path="/qr_emargement/:session_id/:partner_owner_recid/:my_safe_token" exact component={Emarge_QR_Code} />
{/**** New design 2025 */}
<Route path="/signin/" exact component={New_Sign_In_2025} />
<Route path="/signup/" exact component={New_Sign_Up_2025} />
<Route path="/tarif/" exact component={New_Tarif_2025} />
<Route path="/contact/" exact component={New_Contact_2025} />
<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 path="/UpadateAttendeeList/:client_id/:session_id/:partner_owner_recid/" exact component={UpdateAttendeeList} />
<Route path="/automatic-quotation/:partner_owner_recid/:objid/" exact component={AutomaticQuotation} />
<Route path="/intelligence-artificielle-mysy-training/" exact component={MySyIA} />
{/**** New design 2025 */}
<Route path="/signin/" exact component={New_Sign_In_2025} />
<Route path="/signup/" exact component={New_Sign_Up_2025} />
<Route path="/tarif/" exact component={New_Tarif_2025} />
<Route path="/contact/" exact component={New_Contact_2025} />
{/*
{/*
09/03/25 : un redirection a été faite dans cloudflaire pour les lignes ci-dessous
@ -234,17 +309,17 @@ function App() {
<Route path="/display-detail-article/:articleId" exact component={New_Article_Detail_2025} />
<Route path="/Display-Detail-Article/:articleId" exact component={New_Article_Detail_2025} />
<Route path="/display-detail-article/:articleId" exact component={New_Article_Detail_2025} />
<Route path="/Display-Detail-Article/:articleId" exact component={New_Article_Detail_2025} />
<Route path="/detaile-formation/:classId" exact component={New_Formation_Detail_2025} />
{/* ex : http://localhost:3009/detaile-formation/habilitation-electrique-882*/}
<Route path="/detail-formation/:classId" exact component={New_Formation_Detail_2025} />
{/* ex : http://localhost:3009/detail-formation/habilitation-electrique-882*/}
<Route path="/marketplace/" exact component={New_Marktplace_2025} />
<Route path="/fonctionnalites/" exact component={New_Fonctionnalite_2025} />
<Route path="/marketplace/" exact component={New_Marktplace_2025} />
<Route path="/fonctionnalites/" exact component={New_Fonctionnalite_2025} />
<Route path="/apropos/" exact component={New_A_Propos_2025} />
{/*
<Route path="/apropos/" exact component={New_A_Propos_2025} />
{/*
09/03/25 : un redirection a été faite dans cloudflaire pour les lignes ci-dessous
<Route path="/QuiSommesNous" exact component={New_A_Propos_2025} />
@ -253,48 +328,52 @@ function App() {
*/}
<Route path="/" exact component={New_Home_Page_2025} />
<Route path="/" exact component={New_Home_Page_2025} />
<Route path="/jmjformation" exact component={Jmjformation_catalogue} />
<Route path="/jmjcatalogue" exact component={Jmjformation_catalogue} />
{/* Debut Migration */}
<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="/recherche-formation" exact component={New_Marktplace_2025} />
<Route path="/recherche-formation/ref/:NewSearchText" exact component={New_Marktplace_2025} />
<Route path="/mysy-training-login/:obj/:objid" exact component={New_Sign_In_2025} />
<Route path="/Connexion" exact component={New_Sign_In_2025} />
<Route path="/Recherche-Article-formation" exact component={RechecheArticles} />
<Route path="/Display-Detail-formation_v3/:classId" exact component={New_Formation_Detail_2025} />
<Route path="/Display-Detail-formation/:classId" exact component={New_Formation_Detail_2025} />
<Route path="/Display-Detail-formation/:classId/:action" exact component={New_Formation_Detail_2025} />
<Route path="/Display-Detail-formation_old/:classId/:action" exact component={New_Formation_Detail_2025} />
<Route path="/PartnerLogin" exact component={PartnerLogin} />
<Route path="/PartnerLogin0" exact component={PartnerLogin0} />
<Route path="/PartnerLogin1" exact component={PartnerLogin1} />
<Route path="/mysy-user-account" exact component={Account} />
<Route path="/Ajout-Article-formation" exact component={AddArticle} />
<Route path="/ResetUserPwd/:token/:accounttype" exact component={ResetUserPwd} />
<Route path="/DeleteUserAccount/:token" exact component={DeleteUserAccount} />
<Route path="/mysy-student-account" exact component={Student_Account} />
{/* Fin Migration */}
{/* Debut Migration */}
<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="/recherche-formation" exact component={New_Marktplace_2025} />
<Route path="/recherche-formation/ref/:NewSearchText" exact component={New_Marktplace_2025} />
<Route path="/mysy-training-login/:obj/:objid" exact component={New_Sign_In_2025} />
<Route path="/Connexion" exact component={New_Sign_In_2025} />
<Route path="/Recherche-Article-formation" exact component={RechecheArticles} />
<Route path="/new_header_footer/" exact component={New_Test_Header_Footer_2025} />
<Route path="/Display-Detail-formation_v3/:classId" exact component={New_Formation_Detail_2025} />
<Route path="/Display-Detail-formation/:classId" exact component={New_Formation_Detail_2025} />
<Route path="/Display-Detail-formation/:classId/:action" exact component={New_Formation_Detail_2025} />
<Route path="/Display-Detail-formation_old/:classId/:action" exact component={New_Formation_Detail_2025} />
<Route component={NotFound} />
</Switch>
</BrowserRouter>
<Route path="/PartnerLogin" exact component={PartnerLogin} />
<Route path="/PartnerLogin0" exact component={PartnerLogin0} />
<Route path="/PartnerLogin1" exact component={PartnerLogin1} />
<Route path="/mysy-user-account" exact component={Account} />
<Route path="/Ajout-Article-formation" exact component={AddArticle} />
<Route path="/ResetUserPwd/:token/:accounttype" exact component={ResetUserPwd} />
<Route path="/DeleteUserAccount/:token" exact component={DeleteUserAccount} />
{/* Fin Migration */}
<Route path="/new_header_footer/" exact component={New_Test_Header_Footer_2025} />
<Route component={NotFound} />
</Switch>
</BrowserRouter>
</Suspense>
</div>
</div>

View File

@ -934,8 +934,8 @@ function Abonnement(props) {
setnew_nb_formations(event.target.value);
// document.getElementById('div_nb_formation').style.color = "#104277";
//document.getElementById('div_ttc').style.color = "#104277";
// document.getElementById('div_nb_formation').style.color = "#107758";
//document.getElementById('div_ttc').style.color = "#107758";
}

View File

@ -335,7 +335,7 @@ function Account() {
//alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a);
if (file_size > 100000) {
if (file_size > 10000000) {
alert("L'image doit faire moins de 100 Kilo Octets");
return;
}
@ -398,7 +398,7 @@ function Account() {
{isSelected && <div className="nonlable">
<Button variant="outlined" onClick={sendImage} >Enregistrer</Button>
</div>}
</div>
<div className="nom_prenom"> {username && <b> {username} </b>}
{!username && <b> xxxx </b>} </div>
@ -443,7 +443,7 @@ function Account() {
{/** Menu pour un utilisateur NON type 'user' exemple un apprenant */}
{connected_user_data && connected_user_data.type &&
String(connected_user_data.type) !== "user" &&
String(connected_user_data.type) !== "student" &&
<div>
<div className="sousmenu" onClick={displayPersoInfo}> INFORMATIONS PERSONNELLES</div>
<hr className="my_hr" />
@ -482,13 +482,7 @@ function Account() {
{result}
</div>}
{String(menu) === String("affichage") && <UpdateUserInfo />}
{String(menu) === String("recherche") && <UserHistoryRecherche />}
{String(menu) === String("upgradecompte") && <UpgradeToPro />}
{String(menu) === String("profil_objectif") && <Profil_Objectif />}
{String(menu) === String("mes_factures") && connected_user_data && connected_user_data.partner_owner_recid &&
connected_user_data.partner_client_id &&
@ -568,8 +562,6 @@ function Account() {
/>}
{String(menu) === String("mes_documents") && <Profil_Objectif />}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,8 @@ import moment from "moment";
import SendIcon from '@mui/icons-material/Send';
import axios from "axios";
import { Editor } from '@tinymce/tinymce-react';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -80,7 +82,7 @@ const useStyles = makeStyles((theme) => ({
const Article = (props) => {
registerLocale('fr', fr);
const classes = useStyles();
const history = useHistory();
const [isLoading, setLoading] = useState();
@ -484,7 +486,7 @@ const Article = (props) => {
//console.log("file_size = ", file_size, " file_type = ", file_type);
//console.log(" fileUploaded = ", fileUploaded);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
return;
}

View File

@ -63,7 +63,7 @@ const Article = (props) => {
<Button variant="contained" color="success"
style={{
'borderRadius': "10rem", "width": "100%",
"width": "60% !important", background: "#104277"
"width": "60% !important", background: "#107758"
}}
onClick={(e) => {
e.preventDefault();

12043
src/components/Autre_RH.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -485,7 +485,7 @@ const ButtonHilight = () => {
className="displaypartnersession"
>
<DialogTitle>Contactez Nous</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Contactez Nous</DialogTitle>
<DialogContent className="DialogContent_width">
@ -625,7 +625,7 @@ const ButtonHilight = () => {
className="displaypartnersession"
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
Confirmez la deconnexion

View File

@ -1166,8 +1166,8 @@ function CheckOut(props) {
setnb_formations(event.target.value);
}
document.getElementById('div_nb_formation').style.color = "#104277";
document.getElementById('div_ttc').style.color = "#104277";
document.getElementById('div_nb_formation').style.color = "#107758";
document.getElementById('div_ttc').style.color = "#107758";
}
@ -2258,7 +2258,7 @@ function CheckOut(props) {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
close();

File diff suppressed because it is too large Load Diff

View File

@ -220,7 +220,7 @@ const Config_Documents = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();
@ -2256,7 +2256,7 @@ const Config_Documents = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent>
<DialogContentText>
{Dialog_1_message}
@ -3209,7 +3209,7 @@ const Config_Documents = (props) => {
set_field_corp_mail(one_editorRef_corp_mail.current.getContent());
setpartner_document_data_changed("1");
}}
init={{
init={{
resize: false,
height: 700,
menubar: true,
@ -3239,7 +3239,7 @@ const Config_Documents = (props) => {
name="detail_document_principal"
onInit={(evt, editor) => one_editorRef_programme.current = editor}
//initialValue={field_programme_initial_value}
onKeyUp={editor_keyup}
value={field_programme}
onEditorChange={(newValue, editor) => {
@ -3330,7 +3330,7 @@ const Config_Documents = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();

View File

@ -179,7 +179,7 @@ const Config_Documents_Super_Admin = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();
@ -2158,7 +2158,7 @@ const Config_Documents_Super_Admin = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent>
<DialogContentText>
{Dialog_1_message}
@ -2178,7 +2178,7 @@ const Config_Documents_Super_Admin = (props) => {
className="displaypartnersession"
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<div className="session_caract_Dialog" > Type Document
@ -2773,7 +2773,7 @@ const Config_Documents_Super_Admin = (props) => {
}}
/>
</div>}
</div>}
{String(partner_document_data_edit_mode) === "1" && <div className="div_row_gauche texte_area_filter" >
Version par defaut <br />

File diff suppressed because it is too large Load Diff

View File

@ -23,6 +23,8 @@ 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 fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -99,7 +101,7 @@ const useStyles = makeStyles((theme) => ({
}));
const CRM_Opportunite = (props) => {
registerLocale('fr', fr);
const classes_dialog = useStyles();
const history = useHistory();
@ -184,7 +186,7 @@ const CRM_Opportunite = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -293,7 +295,7 @@ const CRM_Opportunite = (props) => {
let file_type = event.target.files[0].type;
//console.log("file_size = ",file_size," file_type = ",file_type);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
return;
}
@ -1665,7 +1667,7 @@ const CRM_Opportunite = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent>
<DialogContentText>
{Dialog_1_message}
@ -2029,7 +2031,7 @@ const CRM_Opportunite = (props) => {
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>

View File

@ -10,6 +10,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -39,7 +41,7 @@ const palette = ['red', 'blue', 'green'];
const Dashbord_Factures = (props) => {
registerLocale('fr', fr);
const history = useHistory();
const [isLoading, setLoading] = useState();
@ -697,7 +699,7 @@ const Dashbord_Factures = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>

View File

@ -10,6 +10,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -39,6 +41,7 @@ const pieParams = { height: 200, margin: { right: 5 } };
const palette = ['red', 'blue', 'green'];
const Dashbord_Factures_Devis_Par_Periode = (props) => {
registerLocale('fr', fr);
const history = useHistory();
const [isLoading, setLoading] = useState();
@ -474,7 +477,7 @@ const Dashbord_Factures_Devis_Par_Periode = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
/>
@ -589,7 +592,7 @@ const Dashbord_Factures_Devis_Par_Periode = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -10,6 +10,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -38,6 +40,7 @@ import fileDownload from 'js-file-download'
const Dashbord_Factures_Par_Client = (props) => {
registerLocale('fr', fr);
const history = useHistory();
const [isLoading, setLoading] = useState();
@ -496,7 +499,7 @@ const Dashbord_Factures_Par_Client = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
@ -614,7 +617,7 @@ const Dashbord_Factures_Par_Client = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -10,6 +10,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -39,6 +41,7 @@ const pieParams = { height: 200, margin: { right: 5 } };
const palette = ['red', 'blue', 'green'];
const Dashbord_Factures_Par_Periode = (props) => {
registerLocale('fr', fr);
const history = useHistory();
const [isLoading, setLoading] = useState();
@ -483,7 +486,7 @@ const Dashbord_Factures_Par_Periode = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
@ -598,7 +601,7 @@ const Dashbord_Factures_Par_Periode = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -10,6 +10,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -39,6 +41,7 @@ const pieParams = { height: 200, margin: { right: 5 } };
const palette = ['red', 'blue', 'green'];
const Dashbord_Factures_Previsionnel_Par_Periode = (props) => {
registerLocale('fr', fr);
const history = useHistory();
const [isLoading, setLoading] = useState();
@ -420,7 +423,7 @@ const Dashbord_Factures_Previsionnel_Par_Periode = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
@ -535,7 +538,7 @@ const Dashbord_Factures_Previsionnel_Par_Periode = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -10,6 +10,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -31,7 +33,7 @@ import { TbColumns2, TbColumns1 } from "react-icons/tb";
const Dashbord_Formation = (props) => {
registerLocale('fr', fr);
const history = useHistory();
const [isLoading, setLoading] = useState();
@ -277,7 +279,7 @@ const Dashbord_Formation = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
/>

View File

@ -264,7 +264,7 @@ const Dashbord_Formation_Evol_Session = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
/>
@ -338,7 +338,7 @@ const Dashbord_Formation_Evol_Session = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -10,6 +10,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -34,7 +36,7 @@ import { pieArcLabelClasses } from '@mui/x-charts/PieChart';
const Dashbord_Inscriptions = (props) => {
const history = useHistory();
const [isLoading, setLoading] = useState();
registerLocale('fr', fr);
const theme = useTheme();
const colors = tokens(theme.palette.mode);
@ -375,7 +377,7 @@ const Dashbord_Inscriptions = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>

View File

@ -10,6 +10,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -38,7 +40,7 @@ import { RiFileExcel2Line } from "react-icons/ri";
const Dashbord_Inscriptions_all_inscriptions = (props) => {
const history = useHistory();
const [isLoading, setLoading] = useState();
registerLocale('fr', fr);
const theme = useTheme();
const colors = tokens(theme.palette.mode);
@ -130,7 +132,7 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
form.append("filter_value", filter_value);
console.log(" LAAA filter_group_by = ", filter_group_by)
// console.log(" LAAA filter_group_by = ", filter_group_by)
var myurl = "";
if (String(filter_group_by) === "class")
@ -472,7 +474,7 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
@ -585,7 +587,7 @@ const Dashbord_Inscriptions_all_inscriptions = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -10,6 +10,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -559,7 +561,7 @@ const Dashbord_Ressources_Humaines = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>

View File

@ -28,6 +28,8 @@ import Autocomplete from '@mui/material/Autocomplete';
import TextField from '@mui/material/TextField';
import { format } from 'date-fns'
import moment from "moment";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import Button from '@mui/material/Button';
@ -37,7 +39,7 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
const [isLoading, setLoading] = useState();
const [selectionModel, setSelectionModel] = React.useState([]);
const [user_dashbord_id, setuser_dashbord_id] = useState(props.user_dashbord_id);
registerLocale('fr', fr);
var date_today_90j = new Date();
date_today_90j.setDate(date_today_90j.getDate() - 90);
@ -435,7 +437,7 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
@ -576,7 +578,7 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -28,6 +28,8 @@ import Autocomplete from '@mui/material/Autocomplete';
import TextField from '@mui/material/TextField';
import { format } from 'date-fns'
import moment from "moment";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import Button from '@mui/material/Button';
@ -37,7 +39,7 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
const [isLoading, setLoading] = useState();
const [selectionModel, setSelectionModel] = React.useState([]);
const [user_dashbord_id, setuser_dashbord_id] = useState(props.user_dashbord_id);
registerLocale('fr', fr);
var date_today_90j = new Date();
date_today_90j.setDate(date_today_90j.getDate() - 90);
@ -412,7 +414,7 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
@ -553,7 +555,7 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -10,6 +10,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -29,7 +31,7 @@ import { ResponsiveBar } from "@nivo/bar";
import { TbColumns2, TbColumns1 } from "react-icons/tb";
const Dashbord_Session = (props) => {
registerLocale('fr', fr);
const history = useHistory();
const [isLoading, setLoading] = useState();
@ -393,7 +395,7 @@ const Dashbord_Session = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
/>

View File

@ -444,7 +444,7 @@ const Dashbord_Session_Par_Fteur = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -446,7 +446,7 @@ const Dashbord_Session_Repartition_Fteur = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
/>
@ -519,7 +519,7 @@ const Dashbord_Session_Repartition_Fteur = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -448,7 +448,7 @@ const Dashbord_Session_Taux_Remplissage = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();

View File

@ -614,14 +614,13 @@ const DisplayDetailClassAction = (props) => {
</div>
</div>}
{(String(action).toLocaleLowerCase() === "inscription" || String(action).toLocaleLowerCase() === "information")
&& String(action).toLocaleLowerCase() !== "evaluation"
&& <div className="description detail_element" name='section_info'>
<Inscription_Information internal_url={classId} action={action} trainig_price={DetailTraining["price"]} />
</div>
}
{String(action).toLocaleLowerCase() !== "inscription" && String(action).toLocaleLowerCase() !== "information" && String(tokenEval_api) === "true"
&& <div className="description detail_element" name='section_info'>
Zone evaluation : <button> fermer</button>

View File

@ -576,7 +576,7 @@ const DisplayDetailClass_new_v2 = (props) => {
//console.log(" ON PASSE&nbsp; au&nbsp;MIN");
var local_tmp_val = 2100 + decalage_pr_certificat;
var local_main_h_px = 4800 + decalage_pr_certificat;
local_tmp = local_tmp_val + "px";
main_h_px = local_main_h_px + "px";
@ -1619,7 +1619,7 @@ const DisplayDetailClass_new_v2 = (props) => {
{DetailTraining["pourqui"] && <div className="mob_info_page_title_desc_long_txt">
<div className="mob_info_page_title_desc_title">
Pour Qui ?
Pour Qui
</div>
{DetailTraining["pourqui"] && <div className="mob_info_page_title_desc_desc pourqui_block">
@ -2146,7 +2146,7 @@ const DisplayDetailClass_new_v2 = (props) => {
{DetailTraining["pourqui"] && String(DetailTraining["pourqui"]).length > 2 && <div className="block_info_page_pave_title_desc_long_text">
<div className="block_info_page_pave_title_desc_title ">
Pour Qui ?
Pour Qui
</div>
{DetailTraining["pourqui"] && <div className="block_info_page_pave_title_desc_desc pourqui_block">
{parse(String(DetailTraining["pourqui"]))}

View File

@ -1227,7 +1227,7 @@ const DisplayDetailClass_new_v3 = (props) => {
className="displaypartnersession"
>
<DialogTitle>Contactez Nous</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Contactez Nous</DialogTitle>
<DialogContent className="DialogContent_width">
@ -1836,7 +1836,7 @@ const DisplayDetailClass_new_v3 = (props) => {
{DetailTraining["pourqui"] && <div className="mob_info_page_title_desc_long_txt">
<div className="mob_info_page_title_desc_title">
Pour Qui ?
Pour Qui
</div>
{DetailTraining["pourqui"] && <div className="mob_info_page_title_desc_desc pourqui_block">
@ -2242,7 +2242,7 @@ const DisplayDetailClass_new_v3 = (props) => {
{DetailTraining["pourqui"] && String(DetailTraining["pourqui"]).length > 2 && <div className="block_info_page_pave_title_desc_long_text">
<div className="block_info_page_pave_title_desc_title ">
Pour Qui ?
Pour Qui
</div>
{DetailTraining["pourqui"] && <div className="block_info_page_pave_title_desc_desc pourqui_block">
{parse(String(DetailTraining["pourqui"]))}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,12 @@
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 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';
@ -14,23 +14,20 @@ 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 Popup from 'reactjs-popup';
import { FcInfo } from "react-icons/fc";
import Autocomplete from '@mui/material/Autocomplete';
import 'reactjs-popup/dist/index.css';
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, sliderClasses } 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';
@ -221,7 +218,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -330,7 +327,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -716,16 +713,12 @@ const DisplayPartnerUnite_Enseignement = (props) => {
}
if (local_ue.support) {
setp_detail_support(local_ue.support);
} else {
setp_detail_support("");
}
if (local_ue.duration) {
setp_detail_duration(local_ue.duration);
} else {
@ -782,13 +775,30 @@ const DisplayPartnerUnite_Enseignement = (props) => {
if (local_ue.niveau_competence) {
setp_detail_tab_competence(local_ue.niveau_competence);
var tab_tmp = String(local_ue.niveau_competence).split(",");
setVal(tab_tmp);
// setVal(tab_tmp);
} else {
setp_detail_tab_competence([]);
// setVal([]);
}
if (local_ue.list_competence_code) {
setp_detail_list_competence_code(local_ue.list_competence_code);
} else {
setp_detail_list_competence_code("");
}
if (local_ue.tab_competence_JSON) {
setVal(local_ue.tab_competence_JSON);
} else {
setp_detail_tab_competence([]);
setVal([]);
}
if (local_ue.note_ue_calculation_rule_id) {
setp_detail_note_ue_calculation_rule_id(local_ue.note_ue_calculation_rule_id);
} else {
@ -918,6 +928,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
Getall_Parter_Unite_Enseignement();
Getall_Partner_Competence_List();
if (document.getElementById('myRef_head')) {
var divh = document.getElementById('myRef_head').offsetTop;
window.scrollTo({
@ -984,7 +996,15 @@ const DisplayPartnerUnite_Enseignement = (props) => {
form.append("note_ue_calculation_rule_id", p_detail_note_ue_calculation_rule_id);
form.append("niveau_competence", val);
var tab_competence_id = []
for (var i = 0; i < val.length; i++) {
tab_competence_id.push(val[i]._id)
}
form.append("niveau_competence", tab_competence_id);
// console.log(" ### val = ", val);
//console.log(" ### tab_competence_id = ", tab_competence_id);
var description = "";
@ -992,7 +1012,10 @@ const DisplayPartnerUnite_Enseignement = (props) => {
description = editorRef_description.current.getContent();
if (parse(description.replace(/(<([^>]+)>)/ig, '')).length > editorRef_description_limite) {
alert(" Champ 'Description', limite depassée !")
setdisplay_alert_mysy("1");
setalert_message(" Champ 'Description', limite depassée !");
setalert_type("error");
return;
}
}
@ -1004,7 +1027,10 @@ const DisplayPartnerUnite_Enseignement = (props) => {
objectif = editorRef_objectif.current.getContent();
if (parse(objectif.replace(/(<([^>]+)>)/ig, '')).length > editorRef_objectif_limite) {
alert(" Champ 'Objectif', limite depassée !")
setdisplay_alert_mysy("1");
setalert_message(" Champ 'Objectif', limite depassée !");
setalert_type("error");
return;
}
}
@ -1016,7 +1042,10 @@ const DisplayPartnerUnite_Enseignement = (props) => {
prerequis = editorRef_prerequis.current.getContent();
if (parse(prerequis.replace(/(<([^>]+)>)/ig, '')).length > editorRef_prerequis_limite) {
alert(" Champ 'Pré-requis', limite depassée !")
setdisplay_alert_mysy("1");
setalert_message(" Champ 'Pré-requis', limite depassée !");
setalert_type("error");
return;
}
}
@ -1028,7 +1057,10 @@ const DisplayPartnerUnite_Enseignement = (props) => {
programme = editorRef_programme.current.getContent();
if (parse(programme.replace(/(<([^>]+)>)/ig, '')).length > editorRef_prerequis_limite) {
alert(" Champ 'Programme', limite depassée !")
setdisplay_alert_mysy("1");
setalert_message(" Champ 'Programme', limite depassée !");
setalert_type("error");
return;
}
}
@ -1041,7 +1073,10 @@ const DisplayPartnerUnite_Enseignement = (props) => {
methode_eval = editorRef_methode_eval.current.getContent();
if (parse(methode_eval.replace(/(<([^>]+)>)/ig, '')).length > editorRef_methode_eval_limite) {
alert(" Champ 'Suivi & Evaluation', limite depassée !")
setdisplay_alert_mysy("1");
setalert_message(" Champ 'Suivi & Evaluation', limite depassée !");
setalert_type("error");
return;
}
}
@ -1054,7 +1089,10 @@ const DisplayPartnerUnite_Enseignement = (props) => {
methode_pedago = editorRef_methode_pedago.current.getContent();
if (parse(methode_pedago.replace(/(<([^>]+)>)/ig, '')).length > editorRef_methode_eval_limite) {
alert(" Champ 'Méhode Pédagogique', limite depassée !")
setdisplay_alert_mysy("1");
setalert_message("Champ 'Méhode Pédagogique', limite depassée !");
setalert_type("error");
return;
}
}
@ -1128,6 +1166,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
setdisplay_ue("0");
setue_data_edit_mode("");
setadd_one_ue("1");
setVal([]);
if (document.getElementById('myRef')) {
var divh = document.getElementById('myRef').offsetTop;
@ -1153,6 +1193,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
const [p_detail_domaine, setp_detail_domaine] = useState("");
const [p_detail_list_competence_code, setp_detail_list_competence_code] = useState("");
const [p_detail_support, setp_detail_support] = useState("");
const [p_detail_duration, setp_detail_duration] = useState("");
@ -1255,6 +1297,11 @@ const DisplayPartnerUnite_Enseignement = (props) => {
setdisplay_ue("0");
setue_data_edit_mode("");
setadd_one_ue("");
setVal([]);
window.scrollTo({
top: 0,
behavior: "smooth",
});
}
const New_Option_Filter = [
@ -1345,6 +1392,88 @@ const DisplayPartnerUnite_Enseignement = (props) => {
}
const [New_Get_List_Competence_result, setNew_Get_List_Competence_result] = useState([]);
const [Get_List_Competence_api, setGet_List_Competence_api] = useState();
const [Get_List_Competence_message, setGet_List_Competence_message] = useState();
const [Get_List_Competence_result, setGet_List_Competence_result] = useState();
function Get_List_Competence() {
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_Competence_no_filter/";
fetch(myurl,
{
method: 'POST',
body: form,
})
.then((data) => data.json())
.then((data) => {
//console.log(' IN Get_List_Competence Success:', data['message'], "data['status'] = ", data['status']);
if (String(data['status']) === String("true")) {
setGet_List_Competence_api("true");
setGet_List_Competence_result(data['message']);
var new_data2 = [];
const new_data = data['message'].map((x) => {
//---
var localid = JSON.parse(x).id;
var local_id = JSON.parse(x)._id;
var local_code = JSON.parse(x).code;
var local_nom = JSON.parse(x).nom;
//---
var node = {
"id": localid,
"_id": local_id,
"nom": local_nom,
"code": local_code,
"label": local_nom,
};
new_data2.push(node);
});
var node = {
"id": "",
"_id": "",
"nom": "",
"code": "",
"label": "",
};
new_data2.push(node);
if (new_data2.length > 0) {
setNew_Get_List_Competence_result(new_data2);
// console.log(" ## new_data2 = ", new_data2);
// console.log(" ## New_Get_List_Competence_result = ", New_Get_List_Competence_result);
} else {
setNew_Get_List_Competence_result([])
}
}
else {
setGet_List_Competence_api("false");
setGet_List_Competence_message(data['message']);
}
}).catch((error) => {
console.error('Error Get_List_Competence :', error);
setGet_List_Competence_api("false");
});
}
const [New_Get_List_Regle_Calcul_Note_UE_result, setNew_Get_List_Regle_Calcul_Note_UE_result] = useState([]);
const [Get_List_Regle_Calcul_Note_UE_api, setGet_List_Regle_Calcul_Note_UE_api] = useState();
@ -1552,7 +1681,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
}
if (document.getElementById(current_menu)) {
document.getElementById(current_menu).style.backgroundColor = "#104277";
document.getElementById(current_menu).style.backgroundColor = "#107758";
document.getElementById(current_menu).style.color = "white";
document.getElementById(current_menu).style.fontWeight = "bold";
}
@ -1728,7 +1857,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
let file_type = event.target.files[0].type;
//console.log("file_size = ",file_size," file_type = ",file_type);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
return;
}
@ -1806,6 +1935,87 @@ const DisplayPartnerUnite_Enseignement = (props) => {
/**** fin gestion fichier csv a importer */
const [New_Getall_Partner_Competence_List_result, setNew_Getall_Partner_Competence_List_result] = useState([]);
const [Getall_Partner_Competence_List_api, setGetall_Partner_Competence_List_api] = useState();
const [Getall_Partner_Competence_List_message, setGetall_Partner_Competence_List_message] = useState();
const [Getall_Partner_Competence_List_result, setGetall_Partner_Competence_List_result] = useState([]);
function Getall_Partner_Competence_List(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_Competence_no_filter/";
setLoading(true);
axios.post(myurl, form).then(res => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Partner_Competence_List res.data.status = " + res.data.status);
// console.log(" In Getall_Partner_Competence_List res.data.message r_class = " + res.data.message);
setGetall_Partner_Competence_List_api("true");
setGetall_Partner_Competence_List_result(res.data.message);
var new_data2 = [];
const new_data = res.data.message.map((x) => {
//---
var localid = JSON.parse(x).id;
var local_id = JSON.parse(x)._id;
var local_description = JSON.parse(x).description;
var local_code = JSON.parse(x).code;
//---
var node = {
"_id": local_id,
"id": localid,
"label": local_code,
"code": local_code,
"description": local_description,
};
new_data2.push(node);
});
//---
var node = {
"_id": "",
"id": "",
"label": "",
"code": "",
"description": "",
};
new_data2.push(node);
if (new_data2.length > 0)
setNew_Getall_Partner_Competence_List_result(new_data2);
}
else {
setGetall_Partner_Competence_List_api("false");
setGetall_Partner_Competence_List_message(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
setLoading(false);
console.warn('Not good man :( Getall_Partner_Competence_List = ', error);
setGetall_Partner_Competence_List_api("false");
alert(" Impossible de recuperer la liste des compétences ");
//setmyApimyApiMessage("")
})
}
const nivau_competence = [
"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
@ -1862,7 +2072,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent>
<DialogContentText>
{Dialog_1_message}
@ -1888,7 +2098,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
>
<DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title">
{String(update_planif_line) !== "1" && "Ajouter une ligne"}
{String(update_planif_line) === "1" && "Mettre à jour une ligne"}
@ -2414,7 +2624,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
onRowDoubleClick={(newSelectionModel) => {
// handleClick_edit_config_From_Line(newSelectionModel.row.id);
setVal([]);
setselected_id(newSelectionModel.row._id);
handleClick_edit_ue_From_Line(newSelectionModel.row.id);
setsession_file_name("");
@ -2675,10 +2885,10 @@ const DisplayPartnerUnite_Enseignement = (props) => {
/>
</div>}
</div>}
{ue_data_edit_mode && String(ue_data_edit_mode) === "1" && <div>
<div className="session_caract"> Compétences <br />
<div className="session_caract"> Compétences<br />
<Autocomplete
multiple
onChange={(event, newValue) => {
@ -2689,8 +2899,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
}}
value={val}
options={nivau_competence}
className="disabled_style"
options={New_Getall_Partner_Competence_List_result}
className="disabled_style disabled_style_no_border"
renderInput={(params) => (
<TextField
{...params}
@ -2699,7 +2909,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
/>
)}
renderTags={CustomChip}
/>
</div>
@ -2719,7 +2929,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
}}
//disabled={true}
className="disabled_style"
value={p_detail_tab_competence}
value={p_detail_list_competence_code}
/>
@ -2728,7 +2938,14 @@ const DisplayPartnerUnite_Enseignement = (props) => {
</div>}
{ue_data_edit_mode && String(ue_data_edit_mode) === "1" && New_Get_List_Regle_Calcul_Note_UE_result && New_Get_List_Regle_Calcul_Note_UE_result.length > 0 &&
<div className="session_caract"> Règle de calcul note <br />
<div className="session_caract"> Règle de calcul note &nbsp;
<Tooltip className="tooltip_css" id="detail_regle_calcul2" />
<a data-tooltip-id="detail_regle_calcul2" data-tooltip-html={New_Get_List_Regle_Calcul_Note_UE_result.filter((data) => (data)._id === String(p_detail_note_ue_calculation_rule_id))[0].calcul_rule}>
<FcInfo />
</a>
<br />
<Autocomplete
disablePortal
name="detail_ue_note_ue_calculation_rule_id"
@ -2754,7 +2971,15 @@ const DisplayPartnerUnite_Enseignement = (props) => {
{ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && New_Get_List_Regle_Calcul_Note_UE_result && New_Get_List_Regle_Calcul_Note_UE_result.length > 0 &&
<div className="session_caract"> Règle de calcul note <br />
<div className="session_caract"> Règle de calcul note &nbsp;
<Tooltip className="tooltip_css" id="detail_regle_calcul" />
<a data-tooltip-id="detail_regle_calcul" data-tooltip-html={New_Get_List_Regle_Calcul_Note_UE_result.filter((data) => (data)._id === String(p_detail_note_ue_calculation_rule_id))[0].calcul_rule}>
<FcInfo />
</a>
<br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
@ -2765,8 +2990,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
InputLabelProps={{
shrink: true,
}}
//disabled={true}
disabled={true}
value={New_Get_List_Regle_Calcul_Note_UE_result.filter((data) => (data)._id === String(p_detail_note_ue_calculation_rule_id))[0].label}
@ -3850,7 +4074,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
</div>}
<div className="session_caract"> Compétence <br />
<div className="session_caract"> Compétence <br />
<Autocomplete
multiple
onChange={(event, newValue) => {
@ -3861,7 +4085,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
}}
value={val}
options={nivau_competence}
options={New_Getall_Partner_Competence_List_result}
className="disabled_style"
renderInput={(params) => (
<TextField
@ -3895,7 +4119,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
}
}}
renderInput={(params) => <TextField {...params} label="Formateur" />
renderInput={(params) => <TextField {...params} label="Formule de calcul" />
}
/>}

View File

@ -1,18 +1,17 @@
import React, { useRef, useState, useEffect } from "react";
import { useParams } from 'react-router-dom'
import axios from "axios";
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png";
import logowhite from "../mysy_img/MYSY-LOGO-WHITE.png";
import { Helmet } from "react-helmet";
import 'react-slideshow-image/dist/styles.css'
import { Fade } from 'react-slideshow-image';
import slideimg1 from "../mysy_img/education.jpg";
import slideimg4 from "../mysy_img/mysy_img.png";
import Footer from "./Fotter";
import Header from "./Header";
import bannerimg from "../mysy_img/MYSY_banner_compte.png";
import img_met_program from "../mysy_img/met_programmation.jpg";
import img_met_hotel from "../mysy_img/met_hotel.jpg";
import img_met_graphisme from "../mysy_img/metier_graphisme.jpg";
@ -26,15 +25,14 @@ import img_met_rh from "../mysy_img/met_rh.jpg";
import img_met_bureautic from "../mysy_img/met_burautic.jpg";
import img_met_vente from "../mysy_img/met_vente.jpg";
import img_met_sport from "../mysy_img/met_sport.png";
import img_met_sante_nat from "../mysy_img/met_sante_nat.jpeg";
/*
/!\ important: les images du slides doivent avoir une dimension de : 250 X 450
*/
import { Button, } from "reactstrap";
import { useHistory } from "react-router-dom";
import { useCookies } from "react-cookie";
import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from "react-share";
import { SocialIcon } from 'react-social-icons';
import { confirmAlert } from 'react-confirm-alert';
//import { Rating } from 'react-simple-star-rating';
@ -42,11 +40,7 @@ import Rating from '@mui/material/Rating';
import parse from 'html-react-parser';
import Inscription from "./Inscription_Information";
import mysy_logo2 from "../mysy_img2/Logo_MySy.png"
import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa';
import { areOptionsEqual } from "@mui/base";
import { style } from "@mui/system";
const Display_Action_And_Class = (props) => {
const [classId, setclassId] = useState(props.classId);
const [action, setaction] = useState(props.action);
@ -296,7 +290,7 @@ const Display_Action_And_Class = (props) => {
if (res.data.status != "False") {
//console.log(" getClassImage : In test res.data.status = " + res.data.status);
console.log(" getClassImage: res.data.message.img = " + res.data.message);
// console.log(" getClassImage: res.data.message.img = " + res.data.message);
if (res.data.message.img.length > 0) {
setisclassimage("True");
@ -328,7 +322,7 @@ const Display_Action_And_Class = (props) => {
function Display(e) {
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class/";
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class_without_marketplace_check/";
var form = new FormData();
form.append("internal_url", classId);
@ -1401,7 +1395,7 @@ const Display_Action_And_Class = (props) => {
{DetailTraining["pourqui"] && <div className="mob_info_page_title_desc_long_txt">
<div className="mob_info_page_title_desc_title">
Pour Qui ?
Pour Qui
</div>
{DetailTraining["pourqui"] && <div className="mob_info_page_title_desc_desc pourqui_block">
@ -1584,7 +1578,7 @@ const Display_Action_And_Class = (props) => {
{DetailTraining["pourqui"] && String(DetailTraining["pourqui"]).length > 2 && <div className="block_info_page_pave_title_desc_long_text">
<div className="block_info_page_pave_title_desc_title ">
Pour Qui ?
Pour Qui
</div>
{DetailTraining["pourqui"] && <div className="block_info_page_pave_title_desc_desc pourqui_block">
{parse(String(DetailTraining["pourqui"]))}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,428 @@
.ent_student_header_automatic_files {
@media only screen and (max-width: 600px) {
position: fixed;
/* margin-top: 22px;*/
width: 100%;
opacity: 1;
background: #FFF;
.header_new_2025 {
border-bottom: 1px solid #dcdcdc;
width: 100%;
padding-left: 50px;
padding-top: 15px;
padding-bottom: 10px;
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin: 0 auto;
}
.logo-menu {
display: flex;
align-items: center;
gap: 40px;
margin-left: 2rem;
}
.logo {
width: 96px;
height: 32px;
}
.menu-list {
display: none;
}
.menu-link {
display: none;
}
.cta-login {
display: flex;
align-items: center;
gap: 12px;
}
.cta-buttons {
display: flex;
gap: 12px;
}
.hide_on_mobile {
display: none;
}
.btn {
padding: 10px 15px;
border-radius: 200px;
font-family: 'DM Sans', sans-serif;
font-size: 12px;
font-weight: 600;
line-height: 126%;
cursor: pointer;
}
.btn-primary {
background-color: #3e6ee3;
color: #ffffff;
border: none;
}
.btn-secondary {
background-color: transparent;
color: #4b5162;
border: 1px solid #c7c9ce;
}
.separator {
width: 1px;
height: 12px;
background-color: rgba(23, 23, 23, 0.1);
border-radius: 30px;
}
.login-link {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
}
.user-icon {
width: 18px;
height: 18px;
}
.login-link span {
font-family: 'DM Sans', sans-serif;
font-size: 16px;
font-weight: 500;
color: #171717;
line-height: 122%;
}
}
@media only screen and (min-width: 601px) and (max-width: 991px) {
.header_new_2025 {
border-bottom: 1px solid #dcdcdc;
padding: 14px 48px;
width: 100%;
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin: 0 auto;
}
.logo-menu {
display: flex;
align-items: center;
gap: 10px;
max-width: 60%;
flex-direction: row;
}
.logo {
width: 96px;
height: 32px;
}
.menu-list {
display: flex;
align-items: center;
gap: 14px;
flex-direction: row;
flex-wrap: wrap;
}
.menu-link {
font-family: 'DM Sans', sans-serif;
font-size: 16px;
font-weight: 500;
color: #4b5162;
text-decoration: none;
line-height: 122%;
}
.cta-login {
display: flex;
align-items: center;
gap: 3px;
}
.cta-buttons {
display: flex;
gap: 1px;
}
.btn {
padding: 5px 8px;
border-radius: 200px;
font-family: 'DM Sans', sans-serif;
font-size: 12px;
font-weight: 700;
line-height: 126%;
cursor: pointer;
}
.btn-primary {
background-color: #3e6ee3;
color: #ffffff;
border: none;
}
.btn-secondary {
background-color: transparent;
color: #4b5162;
border: 1px solid #c7c9ce;
}
.separator {
width: 1px;
height: 12px;
background-color: rgba(23, 23, 23, 0.1);
border-radius: 30px;
}
.login-link {
display: flex;
align-items: center;
gap: 2px;
cursor: pointer;
}
.user-icon {
width: 18px;
height: 18px;
}
.login-link span {
font-family: 'DM Sans', sans-serif;
font-size: 16px;
font-weight: 500;
color: #171717;
line-height: 122%;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.header_new_2025 {
border-bottom: 1px solid #dcdcdc;
padding: 14px 48px;
width: 100%;
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin: 0 auto;
}
.logo-menu {
display: flex;
align-items: center;
gap: 10px;
width: 70%;
flex-direction: row;
}
.logo {
width: 96px;
height: 32px;
}
.menu-list {
display: flex;
align-items: center;
gap: 14px;
flex-direction: row;
flex-wrap: wrap;
}
.menu-link {
font-family: 'DM Sans', sans-serif;
font-size: 16px;
font-weight: 500;
color: #4b5162;
text-decoration: none;
line-height: 122%;
}
.cta-login {
display: flex;
align-items: center;
gap: 5px;
}
.cta-buttons {
display: flex;
gap: 5px;
}
.btn {
padding: 3px 10px;
border-radius: 200px;
font-family: 'DM Sans', sans-serif;
font-size: 14px;
font-weight: 700;
line-height: 126%;
cursor: pointer;
}
.btn-primary {
background-color: #3e6ee3;
color: #ffffff;
border: none;
}
.btn-secondary {
background-color: transparent;
color: #4b5162;
border: 1px solid #c7c9ce;
}
.separator {
width: 1px;
height: 5px;
background-color: rgba(23, 23, 23, 0.1);
border-radius: 30px;
}
.login-link {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
}
.user-icon {
width: 18px;
height: 18px;
}
.login-link span {
font-family: 'DM Sans', sans-serif;
font-size: 16px;
font-weight: 500;
color: #171717;
line-height: 122%;
}
}
@media only screen and (min-width: 1200px) {
.header_new_2025 {
border-bottom: 1px solid #dcdcdc;
padding: 14px 48px;
width: 100%;
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin: 0 auto;
}
.logo-menu {
display: flex;
align-items: center;
gap: 40px;
}
.logo {
width: 96px;
height: 32px;
}
.menu-list {
display: flex;
align-items: center;
gap: 24px;
}
.menu-link {
font-family: 'DM Sans', sans-serif;
font-size: 16px;
font-weight: 500;
color: #4b5162;
text-decoration: none;
line-height: 122%;
}
.cta-login {
display: flex;
align-items: center;
gap: 12px;
}
.cta-buttons {
display: flex;
gap: 12px;
}
.btn {
padding: 12px 24px;
border-radius: 200px;
font-family: 'DM Sans', sans-serif;
font-size: 14px;
font-weight: 700;
line-height: 126%;
cursor: pointer;
}
.btn-primary {
background-color: #3e6ee3;
color: #ffffff;
border: none;
}
.btn-secondary {
background-color: transparent;
color: #4b5162;
border: 1px solid #c7c9ce;
}
.separator {
width: 1px;
height: 12px;
background-color: rgba(23, 23, 23, 0.1);
border-radius: 30px;
}
.login-link {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
}
.user-icon {
width: 18px;
height: 18px;
}
.login-link span {
font-family: 'DM Sans', sans-serif;
font-size: 16px;
font-weight: 500;
color: #171717;
line-height: 122%;
}
}
}

View File

@ -0,0 +1,322 @@
import React, { useState, useEffect } from 'react';
import './ENT_Student_Header.css';
import moment from "moment";
import { getCookie } from 'react-use-cookie';
import { useHistory } from "react-router-dom";
import Header_MySy_Logo from '../../img_new_design_2025/header_mysy_logo.png';
import Header_User from '../../img_new_design_2025/header_user.png';
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 Button from '@mui/material/Button';
import { useCookies } from "react-cookie";
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
import { makeStyles } from "@material-ui/core/styles";
import Paper from '@material-ui/core/Paper';
import Draggable from 'react-draggable';
import { IconButton } from '@material-ui/core';
function PaperComponent(props) {
return (
<Draggable
handle="#draggable-dialog-title"
cancel={'[class*="MuiDialogContent-root"]'}
>
<Paper {...props} />
</Draggable>
);
}
const useStyles = makeStyles((theme) => ({
dialog: {
position: 'absolute',
// left: 10,
top: 400
},
paper: {
overflowY: 'unset',
},
customizedButton: {
position: 'absolute',
left: '98%',
top: '-3%',
backgroundColor: 'lightgray',
color: 'gray',
},
}));
const ENT_Student_Header = () => {
const history = useHistory();
const classes = useStyles();
const [userconnected, setuserconnected] = useState("0");
const [someoneconnected, setsomeoneconnected] = useState("0");
const [partnerconnected, setpartnerconnected] = useState("0");
const stored_user = getCookie('tokenmysych');
const stored_part = getCookie('tokenmysypart');
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych'], { path: '/' });
const [partcookie, setpartCookie, removepartCookie] = useCookies(['tokenmysypart'], { path: '/' });
const [PartnerMenu, setPartnerMenu] = React.useState(null);
const [AccountMenu, setAccountMenu] = React.useState(null);
const [ProduitMenu, setproduitMenu] = React.useState(null);
useEffect(() => {
var local_user_connect = 0;
var local_part_connect = 0;
if (typeof (stored_user) === "undefined" || String(stored_user) === '') {
setuserconnected("0");
local_user_connect = 0;
} else {
setuserconnected("1");
setsomeoneconnected("1");
local_user_connect = 1;
//alert(" user connected OK");
}
if (typeof (stored_part) === "undefined" || String(stored_part) === '') {
setpartnerconnected("0");
local_part_connect = 0;
} else {
setpartnerconnected("1");
setsomeoneconnected("1");
local_part_connect = 1;
//alert(" partner connected OK");
}
}, []);
const handleAccountCreation = () => {
setAccountMenu(null);
history.push("/signup/")
};
const handleMyAccount = () => {
setAccountMenu(null);
history.push("/mysy-user-account")
};
const handleAccountConnexion = () => {
setAccountMenu(null);
history.push("/signin/")
};
const handleMyPartnerAccount = () => {
setAccountMenu(null);
history.push("/Partner")
};
function handleAccountConnexion_v2() {
if (String(userconnected) === String("1")) {
handleMyAccount();
}
else if (String(partnerconnected) === String("1")) {
handleMyPartnerAccount();
}
}
const [Dialog_1_open, setDialog_1_open] = React.useState(false);
const Dialog_1_handleClose = () => {
};
const Dialog_1_handleClose_buton = () => {
setDialog_1_open(false);
};
function part_logout_confirmation() {
/* si c'est une connexion partner qui est active */
if (typeof (stored_part) != "undefined") {
const stored_cookie = getCookie('tokenmysypart');
var acces_right_token_name = stored_cookie + "_uar";
setpartCookie("tokenmysypart", "", { path: '/' });
setpartCookie(acces_right_token_name, "", { path: '/' });
removeCookie(acces_right_token_name, { path: '/' });
setpartCookie("mysy_session_display_view", "", { path: '/' });
setpartCookie("mysy_menu_gauche_reduit", "", { path: '/' });
setpartCookie("mysy_catalog_data_row_grouped_by", "", { path: '/' });
removeCookie("tokenmysypart", { path: '/' });
removeCookie("mysy_session_display_view", { path: '/' });
removeCookie("mysy_menu_gauche_reduit", { path: '/' });
removeCookie("mysy_catalog_data_row_grouped_by", { path: '/' });
}
setsomeoneconnected("0");
setDialog_1_open(false);
history.push("/recherche-formation");
}
function user_logout_confirmation() {
/* si c'est une connexion partner qui est active */
if (typeof (stored_user) != "undefined") {
const stored_cookie = getCookie('tokenmysych');
var acces_right_token_name = stored_cookie + "_uar";
setpartCookie("tokenmysych", "", { path: '/' });
setpartCookie(acces_right_token_name, "", { path: '/' });
removeCookie(acces_right_token_name, { path: '/' });
removeCookie("tokenmysych", { path: '/' });
}
history.push("/ent_student");
}
return (
<div className='ent_student_header_automatic_files'>
{/*** GESTION Deconnexion */}
<Dialog
open={Dialog_1_open}
// onClose={Dialog_1_handleClose}
className="displaypartnersession"
static
onClose={() => null}
PaperProps={{
className: classes.paper, // Apply the paper style
style: {
overflowY: 'unset',
position: 'absolute',
top: '20rem',
margin: "2px",
},
}}
hideBackdrop={true}
disableScrollLock
classes={{
paper: classes.dialog
}}
PaperComponent={PaperComponent}
aria-labelledby="draggable-dialog-title"
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title" >MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
Confirmez la deconnexion de l'ENT <br />
</DialogContentText>
</DialogContent>
<DialogActions>
<IconButton
//autoFocus
onClick={Dialog_1_handleClose_buton}
color="primary"
className={classes.customizedButton}
>
<CancelPresentationIcon />
</IconButton>
<div className="div_row">
<div className="div_row_gauche">
<Button
onClick={(e) => {
if (partnerconnected && String(partnerconnected) === '1')
part_logout_confirmation();
if (userconnected && String(userconnected) === '1')
user_logout_confirmation();
}}
className="bton_enreg_dialog">Deconnexion</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Dialog_1_handleClose_buton} className="bton_annule_dialog" >Annuler</Button>
</div>
</div>
</DialogActions>
</Dialog>
{/*** Fin GESTION Deconnexion */}
<header className="header_new_2025">
<div className="header-content">
<div className="logo-menu">
<img src={Header_MySy_Logo} alt="Logo MySy" className="logo" style={{ cursor: 'pointer' }} onClick={(e) => {
// e.preventDefault();
history.push("/");
}} />
<nav className="menu-list">
<a href="/apropos" className="menu-link">À propos</a>
<a href="/fonctionnalites" className="menu-link">Fonctionnalités</a>
<a href="#" className="menu-link">
<nav onClick={(e) => {
history.push("/tarif/#debut");
// window.open("/tarif/#debut", "_self");
}}>Tarifs </nav>
</a>
<a href="/Recherche-Article-formation" className="menu-link">Blog</a>
<div className="separator"></div>
<a href="/marketplace" className="menu-link">Marketplace</a>
</nav>
</div>
<div className="cta-login">
<div className="cta-buttons">
<button className="btn btn-primary" onClick={(e) => {
e.preventDefault();
var date2 = new Date();
const format2 = "YYYY-MM";
var dateTime2 = moment(date2).format(format2);
window.open(
"https://calendly.com/mysytraining/demo-mysy-training-solution?month=" + String(dateTime2),
'_blank'
);
}}>Réserver une démo</button>
</div>
<div className="cta-buttons hide_on_mobile">
{String(someoneconnected) !== String("1") && <button className="btn btn-secondary" onClick={handleAccountCreation}>Créer un compte</button>}
{String(someoneconnected) === String("1") && <button className="btn btn-secondary" onClick={handleAccountConnexion_v2}>Mon compte</button>}
</div>
<div className="separator hide_on_mobile"></div>
{String(someoneconnected) !== String("1") && <div className="login-link hide_on_mobile" onClick={handleAccountConnexion}>
<img src={Header_User} alt="User icon" className="user-icon hide_on_mobile" />
<span className='hide_on_mobile'>Connexion</span>
</div>}
{String(someoneconnected) === String("1") && <div className="login-link hide_on_mobile" onClick={(e) => setDialog_1_open(true)}>
<img src={Header_User} alt="User icon" className="user-icon hide_on_mobile" />
<span className='hide_on_mobile'>Deconnexion</span>
</div>}
</div>
</div >
</header >
</div >
);
};
export default ENT_Student_Header;

View File

@ -23,6 +23,8 @@ 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 fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -90,7 +92,7 @@ const useStyles = makeStyles((theme) => ({
function ESign() {
registerLocale('fr', fr);
const classes = useStyles();
const history = useHistory();
@ -332,7 +334,7 @@ function ESign() {
//alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("L'image ne doit pas dépasser un 1 Méga octets");
return;
}
@ -402,7 +404,7 @@ function ESign() {
className="esign"
>
<DialogTitle>Signature Manuscrite </DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Signature Manuscrite </DialogTitle>
<DialogContent className="DialogContent_width">
<div style={{ width: "100%" }}>
@ -477,8 +479,8 @@ function ESign() {
>
{!erreur_recup_e_doc && <DialogTitle>Signature </DialogTitle>}
{erreur_recup_e_doc && <DialogTitle>Signature - <font color="red"> Identifiants invalides </font></DialogTitle>}
{!erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Signature </DialogTitle>}
{erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Signature - <font color="red"> Identifiants invalides </font></DialogTitle>}
<DialogContent className="DialogContent_width">
@ -583,8 +585,8 @@ function ESign() {
aria-labelledby="draggable-dialog-title"
>
{!erreur_recup_e_doc && <DialogTitle>Authentification </DialogTitle>}
{erreur_recup_e_doc && <DialogTitle>Authentification - <font color="red"> Identifiants invalides </font></DialogTitle>}
{!erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Authentification </DialogTitle>}
{erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Authentification - <font color="red"> Identifiants invalides </font></DialogTitle>}
<DialogContent className="DialogContent_width">
@ -663,7 +665,7 @@ function ESign() {
>
<DialogTitle>Information </DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Information </DialogTitle>
<DialogContent className="DialogContent_width">

View File

@ -23,6 +23,8 @@ 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 fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -48,7 +50,7 @@ import { FcInfo } from "react-icons/fc";
import { Document, Page } from 'react-pdf'
function ESignDiplayDignedDocument() {
registerLocale('fr', fr);
const history = useHistory();
const { document_id, secret_key_signature, partner_owner_recid } = useParams();
const [isLoading, setLoading] = useState();

View File

@ -1,60 +1,37 @@
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 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 Module_Alert_Confirmation from "./Module_Alert_Confirmation";
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 { gridClasses } from '@mui/x-data-grid';
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import SignatureCanvas from 'react-signature-canvas';
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import { makeStyles } from "@material-ui/core/styles";
import Paper from '@material-ui/core/Paper';
import Draggable from 'react-draggable';
import { IconButton } from '@material-ui/core';
import AutoFixHighOutlinedIcon from '@mui/icons-material/AutoFixHighOutlined';
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
function PaperComponent(props) {
@ -160,6 +137,9 @@ function Emarge_QR_Code() {
{ field: 'code_session', headerName: 'Session', minWidth: 200, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'sequence_start', headerName: 'Du', minWidth: 100, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'sequence_end', headerName: 'Au', minWidth: 100, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'time_in_hour', headerName: 'Nb Heure', minWidth: 100, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'sequence_title', headerName: 'Séquence', minWidth: 100, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
]
@ -208,6 +188,8 @@ function Emarge_QR_Code() {
var local_class_title = JSON.parse(x).class_title;
var local_code_session = JSON.parse(x).code_session;
var local_sequence_title = JSON.parse(x).sequence_title;
var local_sequence_time_in_hour = JSON.parse(x).time_in_hour;
//---
@ -220,6 +202,8 @@ function Emarge_QR_Code() {
"email": local_email,
"class_title": local_class_title,
"code_session": local_code_session,
"sequence_title": local_sequence_title,
"time_in_hour": local_sequence_time_in_hour,
};
new_data2.push(node);
});
@ -279,6 +263,12 @@ function Emarge_QR_Code() {
var liste_formation = GetSelectedRows_Emarg_Ids();
var tab_emargement = [];
if (liste_formation.length <= 0) {
setdisplay_alert_mysy("1");
setalert_message("Vous devez sélectionner une ligne d'émargement");
setalert_type("error");
}
for (var i = 0; i < liste_formation.length; i++) {
var line = JSON.parse(get_E_Document_result[liste_formation[i]]);
tab_emargement.push(line._id)
@ -445,7 +435,7 @@ function Emarge_QR_Code() {
//alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("L'image ne doit pas dépasser un 1 Méga octets");
return;
}
@ -507,17 +497,41 @@ function Emarge_QR_Code() {
const [pad_signature_img, setpad_signature_img] = React.useState("");
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
const [alert_message, setalert_message] = useState("");
const [alert_type, setalert_type] = useState("");
function clear_alert_message() {
setalert_message("");
}
function clear_alert_type() {
setalert_type("");
}
function clear_display_alert_mysy() {
setdisplay_alert_mysy("");
}
return (
<div className="emarge_qr_code">
{/*** Affichage des messages d'alerte*/}
{display_alert_mysy && String(display_alert_mysy) === "1" &&
<Module_Alert_Confirmation alert_message={alert_message}
alert_type={alert_type}
clear_alert_message={clear_alert_message}
clear_alert_type={clear_alert_type}
clear_display_alert_mysy={clear_display_alert_mysy}
/>
}
{/*** FIN Affichage des messages d'alerte*/}
{/* POUR SIGNATURE MANUSCRITE */}
<Dialog
open={Dialog_SIGN_MANUSCRITE_open}
// onClose={Dialog_SIGN_MANUSCRITE_handleClose}
// onClose={Dialog_SIGN_MANUSCRITE_handleClose}
className="esign"
static
onClose={() => null}
@ -544,7 +558,7 @@ function Emarge_QR_Code() {
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title">Signature Manuscrite </DialogTitle>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title">Signature Manuscrite </DialogTitle>
<DialogContent className="DialogContent_width" >
<div style={{ width: "100%" }}>
@ -556,9 +570,9 @@ function Emarge_QR_Code() {
}} />
</div>
<div style={{ width: "100%", marginLeft:'auto', marginRight:'auto', width:315 }}>
<nav className="bton_supprime_image_class" style={{width:'100%'}} onClick={(e) => {
<div style={{ width: "100%", marginLeft: 'auto', marginRight: 'auto', width: 315 }}>
<nav className="bton_supprime_image_class" style={{ width: '100%' }} onClick={(e) => {
clearCanvas();
}}>Effacer </nav>
@ -571,7 +585,7 @@ function Emarge_QR_Code() {
<DialogActions>
<IconButton
<IconButton
autoFocus
onClick={Dialog_SIGN_MANUSCRITE_handleClose_buton}
color="primary"
@ -602,10 +616,10 @@ function Emarge_QR_Code() {
onClose={Dialog_SIGN_VALIDATION_handleClose}
className="esign"
>
>
{!erreur_recup_e_doc && <DialogTitle>Signature </DialogTitle>}
{erreur_recup_e_doc && <DialogTitle>Signature - <font color="red"> Identifiants invalides </font></DialogTitle>}
{!erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Signature </DialogTitle>}
{erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Signature - <font color="red"> Identifiants invalides </font></DialogTitle>}
<DialogContent className="DialogContent_width">
@ -678,13 +692,13 @@ function Emarge_QR_Code() {
>
{!erreur_recup_e_doc && <DialogTitle>Authentification </DialogTitle>}
{erreur_recup_e_doc && <DialogTitle>Authentification - <font color="red"> Identifiants invalides </font></DialogTitle>}
{!erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Authentification </DialogTitle>}
{erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Authentification - <font color="red"> Identifiants invalides </font></DialogTitle>}
<DialogContent className="DialogContent_width">
<div className="div_row_dialog">
<div className="session_caract_Dialog" > <b>Email </b>
<div className="session_caract_Dialog" > <b>Saisir votre email </b>
<TextField
autoFocus
margin="dense"
@ -749,7 +763,7 @@ function Emarge_QR_Code() {
>
<DialogTitle>Information </DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Information </DialogTitle>
<DialogContent className="DialogContent_width">
@ -782,7 +796,7 @@ function Emarge_QR_Code() {
</div>}
<h3 style={{ fontFamily:'DM Sans' }}> Emargement électronique </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Emargement électronique </h3>
<div className="div_row">
<div className="block_guide_line" >
@ -845,6 +859,8 @@ function Emarge_QR_Code() {
session_id: (item).session_id,
class_title: (item).class_title,
code_session: (item).code_session,
time_in_hour: (item).time_in_hour,
sequence_title: (item).sequence_title,
}
))}
@ -987,7 +1003,7 @@ function Emarge_QR_Code() {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -1026,7 +1042,7 @@ function Emarge_QR_Code() {
<div className="div_row">
&nbsp;
</div>
</div>
);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,471 @@
import React, { useState, useEffect } from "react";
import { useHistory } from "react-router-dom";
import { useCookies } from "react-cookie";
import { confirmAlert } from 'react-confirm-alert';
import img_met_program from "../mysy_img/met_programmation.jpg";
import img_met_graphisme from "../mysy_img/metier_graphisme.jpg";
import img_met_autre from "../mysy_img/met_autre.jpg";
import img_met_digital from "../mysy_img/met_digital.jpg";
import img_met_management from "../mysy_img/met_management.jpg";
import img_met_dev_perso from "../mysy_img/metier_dev_perso.jpg";
import img_met_rh from "../mysy_img/met_rh.jpg";
import img_met_bureautic from "../mysy_img/met_burautic.jpg";
import img_met_vente from "../mysy_img/met_vente.jpg";
import axios from "axios";
//import { Rating } from 'react-simple-star-rating'
import Rating from '@mui/material/Rating';
import parse from 'html-react-parser'
const Ent_Student_Affichage_Ftion_Grid = (props) => {
const [userconnected, setuserconnected] = useState("0");
const [partnerconnected, setpartnerconnected] = useState("0");
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']);
const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart']);
const history = useHistory();
const [myfilter, setmyfilter] = useState(props.formation.price);
const [profileimg, setprofileimg] = useState(props.formation.price);
// Gestion des Cookies
const stored_partner = cookie_part.tokenmysypart;
const stored_user = cookie.tokenmysych;
function test(val) {
if (userconnected === "0" && partnerconnected === "0") {
confirmAlert({
title: 'Activer votre session ?',
message: 'Merci de vous connecter pour acceder au detail de cette formation',
buttons: [
{
label: 'Oui',
onClick: () => { history.push("/mysy-training-login/training/" + props.formation.internal_url) }
},
{
label: 'Non',
onClick: () => { return }
}
],
closeOnEscape: false,
closeOnClickOutside: false,
keyCodeForClose: [8, 32],
willUnmount: () => { },
afterClose: () => { },
onClickOutside: () => { },
onKeypress: () => { },
onKeypressEscape: () => { },
});
} else {
window.open(
"/Display-Detail-formation/" + props.formation.internal_url,
'_blank'
);
}
}
const [myclassimage, setmyclassimage] = useState();
const [isclassimage, setisclassimage] = useState("False");
const [userimgclassprofil, setuserimgclassprofil] = useState("");
const [class_img_stored_in_bdd, setclass_img_stored_in_bdd] = useState("");
function getClassImage_no_token() {
var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedClassImage_no_token/";
var form = new FormData();
form.append("type", "partner");
form.append("related_collection", "myclass");
form.append("related_collection_recid", props.formation._id);
form.append("class_external_code", props.formation.external_code);
axios.post(myurl, form).then(res => {
// console.log(" getClassImage_no_token : In test res.data.status = ", res.data.status);
if (String(res.data.status) === "true") {
//console.log(" getClassImage_no_token: res.data.message.img = ", res.data.message);
if (res.data.message.img.length > 0) {
setisclassimage("True");
}
else {
setisclassimage("False");
}
setisclassimage(res.data.message.img);
var ch_img = "data:image/png;base64," + res.data.message.img;
setclass_img_stored_in_bdd(ch_img);
// console.log(" getClassImage_no_token: setclass_img_stored_in_bdd = ", setclass_img_stored_in_bdd);
}
else {
// console.log(" In Erreur res.data.status = " + res.data.status);
//console.log(" In Erreur res.data.message = " + res.data.message);
setisclassimage("False");
setuserimgclassprofil();
setclass_img_stored_in_bdd();
}
}).catch((error) => {
console.warn('getClassImage ee: Not good man :( getClassImage = ');
setisclassimage("False");
setuserimgclassprofil("");
setclass_img_stored_in_bdd("");
})
}
/* Cette variable accompagne la gestion des images par defaut.
idée : si la valeur de "DetailTraining.metier" != "management, digital, office, rh, vente, dev_perso"
alors l'utilisateur à créer une formation avec un metier qui n'est pas geré, donc on met une image par defaut
*/
const [ismetiermanaged, setismetiermanaged] = useState();
const liste_metier = ["management", "digital", "office", "rh", "vente", "dev_perso"];
useEffect(() => {
setmyfilter(props.myfil);
// console.log(" #### useEffect props.formation = ", props.formation);
if (typeof (stored_user) === "undefined" || String(stored_user) === '') {
setuserconnected("0");
} else {
setuserconnected("1");
}
if (typeof (stored_partner) === "undefined" || String(stored_partner) === '') {
setpartnerconnected("0");
} else {
setpartnerconnected("1");
}
getClassImage_no_token();
GetCurrentClass_trainingsession();
GetCurrentClass_trainingsession_cities();
// Verifier si le metier est geré
if (props.formation.metier) {
if (!liste_metier.includes(props.formation.metier)) {
setismetiermanaged("0"); // j'ai une valeur dans metier, mais qui n'est pas geré
}
}
else {
setismetiermanaged("0");
}
if (props.formation.img_url && String(props.formation.img_url).length > 0) {
setismetiermanaged("1");
}
}, []);
const [GetCurrentClass_api, setGetCurrentClass_api] = useState();
const [GetCurrentClass_message, setGetCurrentClass_message] = useState();
const [GetCurrentClass_result, setGetCurrentClass_result] = useState();
function GetCurrentClass_trainingsession(event) {
var form = new FormData();
form.append("class_internal_url", props.formation.internal_url);
form.append("token", stored_partner);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSessionFormation_List/";
axios.post(myurl, form).then(res => {
if (res.data.status != "false") {
//console.log(" In GetCurrentClass_trainingsession res.data.status = " + res.data.status);
//console.log(" In GetCurrentClass_trainingsession res.data.message r_class = " + res.data.message);
setGetCurrentClass_api("true");
setGetCurrentClass_result(res.data.message);
}
else {
setGetCurrentClass_api("false");
setGetCurrentClass_message(res.data.message);
}
}).catch((error) => {
console.warn('Not good man :( GetCurrentClass_trainingsession = ', error);
setGetCurrentClass_api("false");
//setmyApimyApiMessage("")
})
}
const [GetCurrentClass_trainingsession_cities_api, setGetCurrentClass_trainingsession_cities_api] = useState();
const [GetCurrentClass_trainingsession_cities_message, setGetCurrentClass_trainingsession_cities_message] = useState();
const [GetCurrentClass_trainingsession_cities_result, setGetCurrentClass_trainingsession_cities_result] = useState([]);
function GetCurrentClass_trainingsession_cities(event) {
var form = new FormData();
form.append("class_internal_url", props.formation.internal_url);
form.append("token", stored_partner);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSession_Cities_And_Distance_Formation_List/";
axios.post(myurl, form).then(res => {
if (res.data.status != "false") {
//console.log(" In GetCurrentClass_trainingsession_cities res.data.status = " + res.data.status);
//console.log(" In GetCurrentClass_trainingsession_cities res.data.message r_class = " + res.data.message);
setGetCurrentClass_trainingsession_cities_api("true");
setGetCurrentClass_trainingsession_cities_result(res.data.message);
}
else {
setGetCurrentClass_trainingsession_cities_api("false");
setGetCurrentClass_trainingsession_cities_message(res.data.message);
}
}).catch((error) => {
console.warn('Not good man :( GetCurrentClass_trainingsession_cities = ', error);
setGetCurrentClass_trainingsession_cities_api("false");
//setmyApimyApiMessage("")
})
}
const styles = {
list: {
display: 'flex',
flexDirection: 'column',
gap: '32px',
width: '100%',
},
row: {
display: 'flex',
flexDirection: 'row',
gap: '24px',
width: '100%',
},
card: {
flexGrow: 1,
backgroundColor: '#fff',
borderRadius: '8px',
overflow: 'hidden',
display: 'flex',
flexDirection: 'column',
},
image: {
maxWidth: '100%',
height: '200px',
overflow: 'hidden',
margin: "auto",
},
content: {
padding: '16px',
},
header: {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
},
eligibility: {
backgroundColor: '#e2e9fb',
padding: '4px 8px',
borderRadius: '4px',
fontSize: '12px',
fontWeight: 'bold',
},
title: {
fontSize: '14px',
fontWeight: 'bold',
margin: '8px 0',
},
price: {
fontSize: '14px',
fontWeight: 'bold',
color: '#000',
},
description: {
fontSize: '12px',
color: '#666',
margin: '8px 0',
height: "40px",
overflow: "hidden",
},
details: {
display: 'flex',
justifyContent: 'space-between',
marginTop: '16px',
},
button: {
backgroundColor: '#007bff',
color: '#fff',
padding: '8px 16px',
border: 'none',
borderRadius: '4px',
cursor: 'pointer',
},
buttonOutline: {
backgroundColor: '#fff',
color: '#007bff',
padding: '8px 16px',
border: '1px solid #007bff',
borderRadius: '4px',
cursor: 'pointer',
},
};
return (
<div className="new_formation_2025">
<div style={styles.card}>
<div style={{ width: '100%', textAlign: 'right', zIndex: '9999' }}>
<div style={{ width: '50%', float: 'left' }}> &nbsp; </div>
{props.formation.cpf && String(props.formation.cpf) === String("1") && <div className="case_cpf" >
<span className="tag_cpf_txt_ok_cpf" >{"OUI CPF"}</span>
</div>
}
{props.formation.cpf && String(props.formation.cpf) !== String("1") && <div className="case_cpf">
<span className="tag_cpf_txt_no_ok_cpf">{"NON CPF"}</span>
</div>
}
{!props.formation.cpf && String(props.formation.cpf) !== String("1") && <div className="case_cpf">
<span className="tag_cpf_txt_no_ok_cpf">{"NON CPF"}</span>
</div>}
</div>
{class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 &&
<img src={class_img_stored_in_bdd} alt="Formation" style={styles.image} />
}
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) &&
(!props.formation.img_url || String(props.formation.img_url).length <= 10) &&
String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" &&
<div >
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") &&
String(isclassimage) === "False" && <img src={img_met_program} alt="informatique" style={styles.image} />}
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") &&
String(isclassimage) === "False" && <img src={img_met_graphisme} alt="graphisme" style={styles.image} />}
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") &&
String(isclassimage) === "False" && <img src={img_met_management} alt="management" style={styles.image} />}
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") &&
String(isclassimage) === "False" && <img src={img_met_digital} alt="digital" style={styles.image} />}
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") &&
String(isclassimage) === "False" && <img src={img_met_bureautic} alt="office" style={styles.image} />}
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") &&
String(isclassimage) === "False" && <img src={img_met_rh} alt="ressources humaines" style={styles.image} />}
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") &&
String(isclassimage) === "False" && <img src={img_met_vente} alt="vente" style={styles.image} />}
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("dev_perso") &&
String(isclassimage) === "False" && <img src={img_met_dev_perso} alt="developpement personnel" style={styles.image} />}
{String(isclassimage) === "True" && <img src={userimgclassprofil} alt="developpement personnel" style={styles.image} />}
</div>
}
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 &&
<div>
<img src={userimgclassprofil} alt="autre" style={styles.image} />
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br />
{String(props.formation.institut_formation)} </div>*/}
</div>}
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 &&
<div>
<img src={img_met_autre} alt="autre" style={styles.image} />
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br />
{String(props.formation.institut_formation)} </div>*/}
</div>}
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" &&
<div>
<img src={props.formation.img_url} alt="autre" style={styles.image} />
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par : <br />
{String(props.formation.institut_formation)} </div>*/}
</div>}
<div className="block_main_contente">
<div className="block_top_content">
<div className="div_row_gauche" >
{props.formation.note && String(props.formation.note).length === 1 &&
parseInt(String(props.formation.note)) <= 5 &&
<Rating name="half-rating-read" defaultValue={props.formation.note} precision={0.5} readOnly style={{ fontSize: '15px' }} />
}
</div>
<h3 className="formation_titre">{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 50)}</h3>
{props.formation.discounted_price && props.formation.business_prices && <p className="formation_prix">{props.formation.discounted_price} HT&nbsp; </p>}
{props.formation.business_prices && props.formation.business_prices.length <= 0
&& <p className="formation_prix">{props.formation.price} HT&nbsp; </p>}
{props.formation.business_prices && props.formation.business_prices.length > 0 &&
<p style={{ width: '100%', float: 'left' }}>
<p className="formation_prix" style={{ width: '100%', float: 'left' }}>{props.formation.business_prices[0].discounted_price} HT&nbsp;
<font className='training_price_barre' style={{ fontSize: '14px' }}> {props.formation.price} HT &nbsp;</font>
<font className='discount_block' style={{ fontSize: '14px' }}> ({props.formation.business_prices[0].discount} %) </font></p>
</p>}
<p className="formation_description"> {String(parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))).substring(0, 80)}...</p>
</div>
</div>
<div className="block_cats">
<button className="block_cats_bton_detail">
<nav className="block_cats_bton_detail_text"
onClick={(e) => {
e.preventDefault();
props.display_detail_from_grid(props.formationid, props.formation_id, props.session_id,
props.inscription_id, props.class_id)
}}> Voir les détails </nav></button>
</div>
</div>
</div>
)
}
export default Ent_Student_Affichage_Ftion_Grid;

View File

@ -6,33 +6,18 @@ import Button from '@mui/material/Button';
import axios from "axios";
import { getCookie, setCookie } from 'react-use-cookie';
import { useHistory } from "react-router-dom";
import CheckOut from "./CheckOut";
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import { DataGrid, 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 { FcPodiumWithAudience } from "react-icons/fc";
import { FcInfo } from "react-icons/fc";
import { LiaDharmachakraSolid } from "react-icons/lia";
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 Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint, FcCheckmark } from "react-icons/fc";
import DatePicker from "react-datepicker";
import { FcAcceptDatabase} from "react-icons/fc";
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';
@ -40,29 +25,18 @@ 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 ColorPicker from 'react-pick-color';
import Visibility from '@mui/icons-material/Visibility';
import VisibilityOff from '@mui/icons-material/VisibilityOff';
import { Fab } from "@material-ui/core";
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
import { AiTwotoneSave } from "react-icons/ai";
import Autocomplete from '@mui/material/Autocomplete';
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import Chip from "@mui/material/Chip";
import { gridClasses } from '@mui/x-data-grid';
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
import Rating from '@mui/material/Rating';
import Module_Selection_Evaluation_Apprenants from "./Module_Selection_Evaluation_Apprenants";
import AttachFileIcon from '@mui/icons-material/AttachFile';
import Module_Selection_Apprenants from "./Module_Selection_Apprenants";
import { FcAlarmClock, FcMultipleSmartphones, FcWorkflow } from "react-icons/fc";
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import Module_Historique_Action from "./Module_Historique_Action";
import { makeStyles } from "@material-ui/core/styles";
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
import { IconButton } from '@material-ui/core';
@ -73,13 +47,11 @@ import {
GridToolbarFilterButton, GridToolbarDensitySelector, GridToolbarExportContainer, useGridApiContext,
gridFilteredSortedRowIdsSelector,
gridVisibleColumnFieldsSelector,
GridValueGetterParams,
GridPreferencePanelsValue,
} from '@mui/x-data-grid';
import * as XLSX from 'xlsx';
import { ReactReduxContext } from "react-redux";
import { RestaurantMenu } from "@mui/icons-material";
function PaperComponent(props) {
return (
@ -263,7 +235,7 @@ const Equipe_Team = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -360,7 +332,7 @@ const Equipe_Team = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -1148,7 +1120,7 @@ const Equipe_Team = (props) => {
if (document.getElementsByName(String(current_menu_header)) && document.getElementsByName(String(current_menu_header))[0]) {
document.getElementsByName(String(current_menu_header))[0].style.fontWeight = "700";
document.getElementsByName(String(current_menu_header))[0].style.backgroundColor = "#104277";
document.getElementsByName(String(current_menu_header))[0].style.backgroundColor = "#107758";
document.getElementsByName(String(current_menu_header))[0].style.color = "white";
}
}
@ -1179,7 +1151,7 @@ const Equipe_Team = (props) => {
function getExcelData(apiRef) {
// Select rows and columns
const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
// Format the data. Here we only keep the value
const data = filteredSortedRowIds.map((id) => {
@ -1204,7 +1176,7 @@ const Equipe_Team = (props) => {
function handleExport(apiRef, data_colums) {
const data = getExcelData(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
const local_config = {
@ -1602,7 +1574,10 @@ const Equipe_Team = (props) => {
function Record_All_PJ() {
if (!p_detail_one_file_to_download_type_name) {
alert(" Vous devez donner un nom à la pièce jointe");
// alert(" Vous devez donner un nom à la pièce jointe");
setdisplay_alert_mysy("1");
setalert_message(" Vous devez donner un nom à la pièce jointe");
setalert_type("error");
return;
}
@ -1645,7 +1620,10 @@ const Equipe_Team = (props) => {
setfile_1_name();
setp_detail_one_file_to_download_type_name();
//GetCurrentClass_trainingsession();
alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
// alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
setdisplay_alert_mysy("1");
setalert_message(" La pièce jointe " + file_1_name.name + " a été bien enregistrée");
setalert_type("success");
}
else {
@ -2507,7 +2485,7 @@ const Equipe_Team = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -2927,8 +2905,6 @@ const Equipe_Team = (props) => {
</div>
<div className="div_row" style={{ "border": "None" }}>
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
<div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
@ -3349,7 +3325,7 @@ const Equipe_Team = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();

View File

@ -1,5 +1,5 @@
import React, { useState, useEffect } from "react";
import ReactPlayer from 'react-player'
import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from "react-share";
import { SocialIcon } from 'react-social-icons';
import { Button, } from "reactstrap";
@ -7,19 +7,16 @@ import { useHistory } from "react-router-dom";
import { Helmet } from "react-helmet";
import { useCookies } from "react-cookie";
import { confirmAlert } from 'react-confirm-alert';
import topimg from "../mysy_img/top.png";
import coeurimg from "../mysy_img/coeur.png";
import img_met_program from "../mysy_img/met_programmation.jpg";
import img_met_hotel from "../mysy_img/met_hotel.jpg";
import img_met_graphisme from "../mysy_img/metier_graphisme.jpg";
import img_met_autre from "../mysy_img/met_autre.jpg";
import img_met_digital from "../mysy_img/met_digital.jpg";
import img_met_management from "../mysy_img/met_management.jpg";
import img_met_projet from "../mysy_img/met_projet.jpg";
import img_met_market from "../mysy_img/met_market.jpg";
import img_met_autre2 from "../mysy_img/met_autre2.jpg";
import img_met_dev_perso from "../mysy_img/metier_dev_perso.jpg";
import img_met_rh from "../mysy_img/met_rh.jpg";
@ -413,7 +410,7 @@ const Formation_Partner_Catalog = (props) => {
</div>
<div className="div_row row_formation_desc">
<div className="div_row row_formation_desc">
{parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))}
</div>
@ -570,75 +567,7 @@ const Formation_Partner_Catalog = (props) => {
</div>
{/* <div style={{ "width": "90%" }}>
<div className="criteres ftion_tab_gauche">
Type
</div>
<div className="criteres ftion_tab_droite">
{props.formation.type} &nbsp;
</div>
</div>
<div style={{ "width": "90%" }}>
<div className="criteres ftion_tab_gauche">
Support
</div>
<div className="criteres ftion_tab_droite">
{props.formation.support} &nbsp;
</div>
</div>
*/}
{/*props.formation.zone_diffusion && props.formation.zone_diffusion.country && <div style={{ "width": "100%" }}>
<div className="criteres ftion_tab_gauche">
Test : pays
</div>
<div className="criteres ftion_tab_droite">
{props.formation.zone_diffusion.country} &nbsp;
</div>
</div>*/}
{/*props.formation.zone_diffusion && props.formation.zone_diffusion.city && <div style={{ "width": "100%" }}>
<div className="criteres ftion_tab_gauche">
Test : Ville
</div>
<div className="criteres ftion_tab_droite">
{props.formation.zone_diffusion.city} &nbsp;
</div>
</div>*/}
{/*
{props.formation.presentiel && props.formation.presentiel.presentiel &&
<div style={{ "width": "100%" }}>
<div className="criteres ftion_tab_gauche">
Presentiel
</div>
<div className="criteres ftion_tab_droite">
{props.formation.presentiel.presentiel} &nbsp;
</div>
</div>}
{props.formation.presentiel && props.formation.presentiel.distantiel &&
<div style={{ "width": "100%" }}>
<div className="criteres ftion_tab_gauche">
Distantiel
</div>
<div className="criteres ftion_tab_droite">
{props.formation.presentiel.distantiel} &nbsp;
</div>
</div>}
*/}
</div>}
@ -707,20 +636,6 @@ const Formation_Partner_Catalog = (props) => {
</div>}
</div>
{/*<div style={{ "width": "100%", "float": "right" }}>
<div className="criteres ftion_tab_gauche">
Type
</div>
{props.formation.type &&
<div className="criteres ftion_tab_droite">
{props.formation.type}
</div>}
{!props.formation.type &&
<div className="criteres ftion_tab_droite">
NC
</div>}
</div>*/}
</div>

View File

@ -1,17 +1,6 @@
import React, { useRef, useState, useEffect } from "react";
import { styled } from '@mui/material/styles';
import Paper from '@mui/material/Paper';
import Grid from '@mui/material/Grid';
import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from "react-share";
import { SocialIcon } from 'react-social-icons';
import {
Box,
Container,
Row,
Column,
FooterLink,
Heading,
} from "./FooterStyles";
import moment from "moment";
const Fotter_Catalog_Pub = (props) => {
@ -56,6 +45,14 @@ const Fotter_Catalog_Pub = (props) => {
downloadLink.click();
}
const [current_year, setcurrent_year] = useState("");
useEffect(() => {
var date2 = new Date();
const format2 = "YYYY";
var dateTime2 = moment(date2).format(format2);
setcurrent_year(dateTime2)
}, []);
return (
<div className='footer_catalog_pub'>
@ -67,8 +64,8 @@ const Fotter_Catalog_Pub = (props) => {
<hr />
<i className='copyright'>
Copyright © 2024 {props.partner_data.nom} . Tous droits réservés. &nbsp;
Copyright © {current_year} {props.partner_data.nom} . Tous droits réservés. &nbsp;
<a> <nav onClick={Display_Mention_Legale_File} >| Mentions légales </nav> </a>
<a> <nav onClick={Display_CGU_File} >| Conditions générales dutilisation </nav> </a>
<a><nav onClick={Display_CGV_File} > | Conditions générales de vente </nav> </a>

View File

@ -17,6 +17,8 @@ import { AiFillFolderOpen, AiFillMinusSquare } from "react-icons/ai";
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
@ -112,7 +114,7 @@ function GestionAdministrative(props) {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -173,7 +175,7 @@ function GestionAdministrative(props) {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -237,7 +239,7 @@ function GestionAdministrative(props) {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -297,7 +299,7 @@ function GestionAdministrative(props) {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -430,7 +432,7 @@ function GestionAdministrative(props) {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -851,7 +853,7 @@ function GestionAdministrative(props) {
setCreateSessionFormation_api();
setdisplay_detail_insc();
document.getElementById('menu_preinscrit').style.background = "#104277";
document.getElementById('menu_preinscrit').style.background = "#107758";
document.getElementById('menu_preinscrit').style.color = "#ffffff";
document.getElementById('menu_inscrit').style.background = "#d8edfc";
@ -877,7 +879,7 @@ function GestionAdministrative(props) {
setCreateSessionFormation_api();
document.getElementById('menu_inscrit').style.background = "#104277";
document.getElementById('menu_inscrit').style.background = "#107758";
document.getElementById('menu_inscrit').style.color = "#ffffff";
document.getElementById('menu_preinscrit').style.background = "#d8edfc";
@ -910,7 +912,7 @@ function GestionAdministrative(props) {
setCreateSessionFormation_api();
setdisplay_detail_insc();
document.getElementById('menu_emarge').style.background = "#104277";
document.getElementById('menu_emarge').style.background = "#107758";
document.getElementById('menu_emarge').style.color = "#ffffff";
document.getElementById('menu_preinscrit').style.background = "#d8edfc";
@ -932,7 +934,7 @@ function GestionAdministrative(props) {
setCreateSessionFormation_api();
setdisplay_detail_insc();
document.getElementById('menu_eval').style.background = "#104277";
document.getElementById('menu_eval').style.background = "#107758";
document.getElementById('menu_eval').style.color = "#ffffff";
document.getElementById('menu_preinscrit').style.background = "#d8edfc";
@ -3548,7 +3550,7 @@ function GestionAdministrative(props) {
let file_type = event.target.files[0].type;
//console.log("file_size = ",file_size," file_type = ",file_type);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
return;
}
@ -3793,7 +3795,7 @@ function GestionAdministrative(props) {
let file_type = event.target.files[0].type;
//console.log("file_size = ",file_size," file_type = ",file_type);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
return;
}
@ -5135,7 +5137,7 @@ function GestionAdministrative(props) {
//alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("L'image ne doit pas dépasser un 1 Méga octets");
return;
}
@ -6217,7 +6219,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent>
<DialogContentText>
{Dialog_1_message}
@ -6458,7 +6460,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
</div>
@ -6498,7 +6500,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
</div>
@ -6734,8 +6736,8 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
{rows_champs_specifics_session &&
rows_champs_specifics_session.map((champ_spec) => (
<div className="session_caract"> {JSON.parse(champ_spec).field_label} <br />
<br />
<div className="session_caract"> {String(JSON.parse(champ_spec).is_mandatory) === "1" && <font> <b> {JSON.parse(champ_spec).field_label} </b> </font>}
{String(JSON.parse(champ_spec).is_mandatory) !== "1" && <font> {JSON.parse(champ_spec).field_label} </font>} <br/>
{String(JSON.parse(champ_spec).field_type) === "float" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
@ -7167,7 +7169,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
</div>
@ -7207,7 +7209,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
</div>
@ -7621,8 +7623,8 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
<button
className="gest_bton_popup_annuler"
onClick={() => {
close();
@ -7896,8 +7898,8 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -8037,8 +8039,8 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -8162,8 +8164,8 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -8749,7 +8751,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
</div>
@ -9154,7 +9156,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
@ -9254,7 +9256,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
@ -9269,7 +9271,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
style={{ "visibility": "hidden" }}
/>

File diff suppressed because it is too large Load Diff

View File

@ -426,7 +426,7 @@ const Header = () => {
className="displaypartnersession"
>
<DialogTitle>Contactez Nous</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Contactez Nous</DialogTitle>
<DialogContent className="DialogContent_width">
@ -566,7 +566,7 @@ const Header = () => {
className="displaypartnersession"
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
Confirmez la deconnexion <br />

View File

@ -1,31 +1,22 @@
import React, { useRef, useState, useEffect } from "react";
import Button from '@mui/material/Button';
import { getCookie } from 'react-use-cookie';
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import axios from "axios";
import Box from '@mui/material/Box';
import { useHistory } from "react-router-dom";
import { FcIdea } from "react-icons/fc";
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import img_paypal from "./../mysy_img/paypal.png"
import moment from "moment";
import {
CardElement,
useStripe,
useElements,
} from '@stripe/react-stripe-js';
import { Elements } from '@stripe/react-stripe-js';
import { loadStripe } from '@stripe/stripe-js';
import { PaymentElement } from '@stripe/react-stripe-js';
import Popup from 'reactjs-popup';
import SendIcon from '@mui/icons-material/Send';
import Popup from 'reactjs-popup';
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import EditIcon from '@mui/icons-material/Edit';
import { MdDeleteForever } from "react-icons/md";
import Fab from '@mui/material/Fab';
import { IoIosAddCircleOutline, IoMdTrash } from "react-icons/io";
@ -255,7 +246,7 @@ function HebergementLms(props) {
//console.log("file_size = ", file_size, " file_type = ", file_type);
//console.log(" fileUploaded = ", fileUploaded);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
return;
}
@ -279,7 +270,7 @@ function HebergementLms(props) {
img_height = this.height;
img_width = this.width;
_URL.revokeObjectURL(objectUrl);
// console.log(" img_width = ", img_width, " img_height = ", img_height)
// console.log(" img_width = ", img_width, " img_height = ", img_height)
if (parseFloat(img_width) > 130 && parseFloat(img_width) < 260 &&
parseFloat(img_height) > 60 && parseFloat(img_height) < 150) {
@ -521,7 +512,7 @@ function HebergementLms(props) {
let file_type = event.target.files[0].type;
// console.log("file_size = ", file_size, " file_type = ", file_type, " naturalWidth = ", fileUploaded.naturalWidth);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
return;
}
@ -753,7 +744,9 @@ function HebergementLms(props) {
<div className="session_caract">Choisir un exemple de thème : <br />
<select id="lms_theme_liste" name="lms_theme_liste" value={selected_lms_theme} onChange={handleChangeselected_lms_theme} className="selectsession">
<select id="lms_theme_liste" name="lms_theme_liste"
disabled={!Boolean(String(props.check_user_acces_right("lms", "write")))}
value={selected_lms_theme} onChange={handleChangeselected_lms_theme} className="selectsession">
<option value="">Choisir un modèle </option>
{GetLms_Themes_result &&
GetLms_Themes_result.map((lms_theme) => (
@ -774,7 +767,7 @@ function HebergementLms(props) {
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
</div>
{<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
{String(props.check_user_acces_right("lms", "write")) === "1" && <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="btn_modif" onClick={"One_annuleSessionUpdate"}>Annuler
@ -807,7 +800,7 @@ function HebergementLms(props) {
</div>}
<div style={{ "width": "250px", textAlign: 'left', "marginTop": "1rem", marginBottom: '1rem' }} onClick={(e) => {
{String(props.check_user_acces_right("lms", "write")) === "1" && <div style={{ "width": "250px", textAlign: 'left', "marginTop": "1rem", marginBottom: '1rem' }} onClick={(e) => {
e.preventDefault();
}}>
@ -867,7 +860,7 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();
@ -883,7 +876,7 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
</nav>
</a>
</div>
</div>}
@ -910,13 +903,13 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
</nav>*/}
<br />
{logo_file_name && <nav className="okUpdateData"><i>{logo_file_name}</i></nav>}
<input type="file"
{String(props.check_user_acces_right("lms", "write")) === "1" && <input type="file"
accept=".png"
ref={hiddenFileInput_logo}
style={{ display: 'none' }}
name="liste_formation_file"
onChange={handleSubmission_logo}
/>
/>}
{img_logo_file && <nav> Fichier à importer : {img_logo_file.name} <br />
<img src={img_logo_file} alt={""} />
@ -938,7 +931,7 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
</div>
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
{String(props.check_user_acces_right("lms", "write")) === "1" && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
<div className="div_row" style={{
@ -947,7 +940,8 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
}}>
<FcIdea style={{ fontSize: '20px' }} /> &nbsp; Pour avoir une meilleure corrélation entre les dimensions du logo et les dimensions de la bannière, il est conseillé de respecter la règle suivante : <br />
<il> Hauteur de la bannière = Hauteur de logo + 100px </il>
<il> Largeur entre 130px et 250 px, la heuteur entre 60px et 150px. <br />
Hauteur de la bannière = Hauteur de logo + 100px </il>
</div>
</div>
@ -964,7 +958,7 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
</div>
</div>
</div>}
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
</div>
@ -983,7 +977,7 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
</Button>*/}
</div>}
<div style={{ "width": "250px", marginLeft: 'auto', marginRight: 'auto', "marginTop": "1rem", marginBottom: '1rem' }} onClick={(e) => {
{String(props.check_user_acces_right("lms", "write")) === "1" && <div style={{ "width": "250px", marginLeft: 'auto', marginRight: 'auto', "marginTop": "1rem", marginBottom: '1rem' }} onClick={(e) => {
e.preventDefault();
}}>
@ -1043,7 +1037,7 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
console.log('modal closed ');
close();
@ -1059,7 +1053,7 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
</nav>
</a>
</div>
</div>}
@ -1072,13 +1066,13 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
{bg_file_name && <nav className="okUpdateData"><i>{bg_file_name}</i></nav>}
<input type="file"
{String(props.check_user_acces_right("lms", "write")) === "1" && <input type="file"
accept=".png"
ref={hiddenFileInput_bg}
style={{ display: 'none' }}
name="liste_formation_file"
onChange={handleSubmission_bg}
/>
/>}
{img_bg_file && <nav> Fichier à importer : {img_bg_file.name} <br />
<img src={img_bg_file} alt={""} className="img_bg_file_css" />
@ -1097,7 +1091,7 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
</div>
<div className="div_row">
{String(props.check_user_acces_right("lms", "write")) === "1" && <div className="div_row">
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
<div className="div_row" style={{
@ -1128,7 +1122,7 @@ Le nom du fichier ne contient que des caractères alphanumériques </i>">
&nbsp;
</div>
</div>
</div>}
</div>
</div>}

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,8 @@ import fileDownload from 'js-file-download'
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -74,7 +76,7 @@ import Menu from '@mui/material/Menu';
const Intranet_Factures_Client = (props) => {
const { action, orderid } = useParams();
registerLocale('fr', fr);
const history = useHistory();
const [submenu, setsubmenu] = useState("");
@ -298,7 +300,7 @@ const options_menu_vertical = [
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -430,7 +432,7 @@ const options_menu_vertical = [
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -500,7 +502,7 @@ const options_menu_vertical = [
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -1520,7 +1522,7 @@ const options_menu_vertical = [
submenu_color_management("main");
/* if (document.getElementById("order_header_main")) {
document.getElementById("order_header_main").style.backgroundColor = "#104277";
document.getElementById("order_header_main").style.backgroundColor = "#107758";
document.getElementById("order_header_main").style.color = "white";
}
@ -1547,7 +1549,7 @@ const options_menu_vertical = [
submenu_color_management("detail");
/* if (document.getElementById("order_header_detail")) {
document.getElementById("order_header_detail").style.backgroundColor = "#104277";
document.getElementById("order_header_detail").style.backgroundColor = "#107758";
document.getElementById("order_header_detail").style.color = "white";
}
@ -1573,7 +1575,7 @@ const options_menu_vertical = [
submenu_color_management("facturation");
/* if (document.getElementById("order_header_facturation")) {
document.getElementById("order_header_facturation").style.backgroundColor = "#104277";
document.getElementById("order_header_facturation").style.backgroundColor = "#107758";
document.getElementById("order_header_facturation").style.color = "white";
}
@ -1604,7 +1606,7 @@ const options_menu_vertical = [
submenu_color_management("paiement");
/* if (document.getElementById("order_header_facturation")) {
document.getElementById("order_header_facturation").style.backgroundColor = "#104277";
document.getElementById("order_header_facturation").style.backgroundColor = "#107758";
document.getElementById("order_header_facturation").style.color = "white";
}
@ -1640,7 +1642,7 @@ const options_menu_vertical = [
}
if (document.getElementById(current_menu)) {
document.getElementById(current_menu).style.backgroundColor = "#104277";
document.getElementById(current_menu).style.backgroundColor = "#107758";
document.getElementById(current_menu).style.color = "white";
document.getElementById(current_menu).style.fontWeight = "bold";
}
@ -2603,7 +2605,7 @@ const options_menu_vertical = [
function getExcelData(apiRef) {
// Select rows and columns
const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
// Format the data. Here we only keep the value
const data = filteredSortedRowIds.map((id) => {
@ -2628,7 +2630,7 @@ const options_menu_vertical = [
function handleExport(apiRef, data_colums) {
const data = getExcelData(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
const local_config = {
@ -2810,7 +2812,7 @@ const options_menu_vertical = [
className="partner_commande"
>
<DialogTitle> Détail ligne Facture <font style={{ fontWeight: "700" }}> {String(invoice_internal_ref)} </font> </DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Détail ligne Facture <font style={{ fontWeight: "700" }}> {String(invoice_internal_ref)} </font> </DialogTitle>
<DialogContent>
@ -3024,7 +3026,7 @@ const options_menu_vertical = [
static
onClose={() => null} >
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
<div>
@ -3073,7 +3075,7 @@ const options_menu_vertical = [
static
onClose={() => null} >
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
<DialogContentText>
Envoi Facture par email
@ -3186,7 +3188,7 @@ const options_menu_vertical = [
>
<DialogTitle> Paiement </DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Paiement </DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_Paiement_1_message}
@ -3267,7 +3269,7 @@ const options_menu_vertical = [
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
fullWidth
/>
@ -3324,7 +3326,7 @@ const options_menu_vertical = [
>
<DialogTitle> Annotation </DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> Annotation </DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "15rem" }}>
<DialogContentText>
{Dialog_annotation_1_message}

View File

@ -22,6 +22,8 @@ import {
FcCancel, FcApproval, FcAcceptDatabase,
FcPrint, FcExpired
} from "react-icons/fc";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import moment from "moment";
@ -59,6 +61,7 @@ import Checkbox from '@mui/material/Checkbox';
import Module_Email_Management from "./Module_Email_Management";
import FormGroup from '@mui/material/FormGroup';
import FormControlLabel from '@mui/material/FormControlLabel';
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import {
GridToolbarContainer, GridToolbarExport, GridToolbarColumnsButton,
@ -122,7 +125,7 @@ const Intranet_Mes_Stagiaires = (props) => {
const [selectionModel_notes, setselectionModel_notes] = React.useState([]);
registerLocale('fr', fr);
const [p_filtre1, setp_filtre1] = useState("");
const [p_filtre1_value, setp_filtre1_value] = useState("");
@ -150,10 +153,10 @@ const Intranet_Mes_Stagiaires = (props) => {
const columns = [
{ field: '_id', headerName: '_id', hide: true, editable: false, Width: 0, disableExport: true, },
{ field: 'session_id', headerName: 'session_id', hide: true, editable: false, Width: 0 , disableExport: true,},
{ field: 'id', headerName: 'id', hide: true, Width: 0 , disableExport: true,},
{ field: 'class_id', headerName: 'class_id', hide: true, Width: 0 , disableExport: true,},
{ field: 'class_internal_url', headerName: 'class_internal_url', hide: true, editable: false, Width: 0 , disableExport: true,},
{ field: 'session_id', headerName: 'session_id', hide: true, editable: false, Width: 0, disableExport: true, },
{ field: 'id', headerName: 'id', hide: true, Width: 0, disableExport: true, },
{ field: 'class_id', headerName: 'class_id', hide: true, Width: 0, disableExport: true, },
{ field: 'class_internal_url', headerName: 'class_internal_url', hide: true, editable: false, Width: 0, disableExport: true, },
{ field: 'telephone', headerName: 'Téléphone', hide: true, editable: false, Width: 0 },
{ field: 'date_naissance', headerName: 'date_naissance', hide: true, editable: false, Width: 0 },
@ -788,18 +791,18 @@ const Intranet_Mes_Stagiaires = (props) => {
}
const stored_cookie = getCookie('tokenmysych');
const stored_cookie = getCookie('tokenmysych');
form.append("token", stored_cookie);
/*** Si le formulaire est appelé avec un type de document;
* on va forcer dans les argument un champ avec partner_client_id = client_rattachement_id
*/
if (props.partner_client_id ) {
if (props.partner_client_id) {
form.delete("client_rattachement_id");
form.append("client_rattachement_id", props.partner_client_id);
}
// console.log(" ### Getall_TrainingParticipant form = ", form)
// console.log(" ### Getall_TrainingParticipant form = ", form)
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Statgaire_List_Partner_with_filter/";
@ -1082,7 +1085,7 @@ const Intranet_Mes_Stagiaires = (props) => {
setsubmenu("inscrit");
if (document.getElementById("inscrit")) {
document.getElementById("inscrit").style.backgroundColor = "#104277";
document.getElementById("inscrit").style.backgroundColor = "#107758";
document.getElementById("inscrit").style.color = "white";
}
@ -1399,7 +1402,7 @@ const Intranet_Mes_Stagiaires = (props) => {
//alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("L'image ne doit pas dépasser un 1 Méga octets");
return;
}
@ -1813,7 +1816,7 @@ const Intranet_Mes_Stagiaires = (props) => {
const list_menu_header_names = ['detail_session_class', 'detail_client_rattachement', 'detail_facture_client_rattachement', 'detail_financeur_rattachement', 'detail_nom', 'detail_status_inscript',
'detail_opco', 'detail_prenom', 'detail_mode_financement', 'detail_mail', 'detail_naissance', 'detail_tel', 'detail_adresse', 'detail_code_postal',
'detail_ville', 'detail_pays', 'certif_date', 'detail_cout', 'detail_mode_fin', 'detail_employeur', 'date_evaluation', 'certif_date',
'note_eval', 'detail_type_apprenant', 'date_evaluation', 'detail_incr_date']
'note_eval', 'detail_type_apprenant', 'date_evaluation', 'detail_incr_date']
@ -1902,27 +1905,11 @@ const Intranet_Mes_Stagiaires = (props) => {
const [attendee_lms_login, setattendee_lms_login] = useState();
function submenu_sessions() {
setsubmenu("sessions");
setdisplay_detail_stagiaire();
setdisplay_detail_absence();
setdisplay_notes("");
setdisplay_detail_ue();
setdisplay_detail_historique();
desableSessionFields();
}
function submenu_absence() {
setsubmenu("absence");
setdisplay_detail_stagiaire();
setdisplay_detail_historique();
setdisplay_detail_ue();
setdisplay_notes("");
setdisplay_detail_absence("1");
desableSessionFields();
}
function submenu_historique() {
submenu_color_management("historique");
setsubmenu("historique");
setdisplay_detail_stagiaire();
setdisplay_detail_absence();
@ -1930,10 +1917,13 @@ const Intranet_Mes_Stagiaires = (props) => {
setdisplay_notes("");
setdisplay_detail_historique("1");
desableSessionFields();
}
function submenu_unite_enseignement() {
submenu_color_management("ue");
setsubmenu("ue");
if (selected_id) {
@ -1947,10 +1937,11 @@ const Intranet_Mes_Stagiaires = (props) => {
setdisplay_notes("");
setdisplay_detail_ue("1");
desableSessionFields();
}
function submenu_notes() {
submenu_color_management("notes");
setsubmenu("notes");
if (selected_id) {
@ -1964,6 +1955,8 @@ const Intranet_Mes_Stagiaires = (props) => {
setdisplay_detail_ue("");
setdisplay_notes("1");
desableSessionFields();
}
@ -2164,7 +2157,7 @@ const Intranet_Mes_Stagiaires = (props) => {
let file_type = event.target.files[0].type;
//console.log("file_size = ",file_size," file_type = ",file_type);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
return;
}
@ -2230,62 +2223,43 @@ const Intranet_Mes_Stagiaires = (props) => {
}
async function submenu_detail_stagaire() {
function submenu_detail_stagaire() {
submenu_color_management("detail_session");
setsubmenu("detail_session");
await sleep(5);
setdisplay_detail_stagiaire("1");
setaddOneParticipant();
}
if (document.getElementById("detail_session")) {
document.getElementById("detail_session").style.backgroundColor = "#104277";
document.getElementById("detail_session").style.color = "white";
}
if (document.getElementById("piece_jointe")) {
document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc";
document.getElementById("piece_jointe").style.color = "black";
}
/* if (document.getElementById("preinscrit")) {
document.getElementById("preinscrit").style.backgroundColor = "#d8edfc";
document.getElementById("preinscrit").style.color = "black";
}
*/
function submenu_piece_jointe() {
submenu_color_management("piece_jointe");
setsubmenu("piece_jointe");
setdisplay_detail_stagiaire("");
setaddOneParticipant();
}
async function submenu_piece_jointe() {
setsubmenu("piece_jointe");
function submenu_color_management(current_menu) {
const list_sous_menu = ['detail_session', 'piece_jointe', 'ue', 'notes', 'historique']
await sleep(5);
for (let i = 0; i < list_sous_menu.length; i++) {
setdisplay_detail_stagiaire("");
setaddOneParticipant();
if (document.getElementById("piece_jointe")) {
document.getElementById("piece_jointe").style.backgroundColor = "#104277";
document.getElementById("piece_jointe").style.color = "white";
var sous_menu = list_sous_menu[i];
if (String(sous_menu) !== current_menu) {
if (document.getElementById(sous_menu)) {
document.getElementById(sous_menu).style.backgroundColor = "#d8edfc";
document.getElementById(sous_menu).style.color = "black";
document.getElementById(sous_menu).style.fontWeight = "normal";
}
}
}
if (document.getElementById("detail_session")) {
document.getElementById("detail_session").style.backgroundColor = "#d8edfc";
document.getElementById("detail_session").style.color = "black";
if (document.getElementById(current_menu)) {
document.getElementById(current_menu).style.backgroundColor = "#107758";
document.getElementById(current_menu).style.color = "white";
document.getElementById(current_menu).style.fontWeight = "bold";
}
/* if (document.getElementById("preinscrit")) {
document.getElementById("preinscrit").style.backgroundColor = "#d8edfc";
document.getElementById("preinscrit").style.color = "black";
}
*/
}
@ -2299,7 +2273,7 @@ const Intranet_Mes_Stagiaires = (props) => {
const stored_cookie = getCookie('tokenmysych');
form.append("token", stored_cookie);
form.append("archive", "0");
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/";
setLoading(true);
@ -2514,11 +2488,11 @@ const Intranet_Mes_Stagiaires = (props) => {
var local_class_id = JSON.parse(x).class_id;
var local_class_eu_id = JSON.parse(x).class_eu_id;
var local_class_eu_code = JSON.parse(x).class_eu_code;
var local_type_eval__id = JSON.parse(x).type_eval__id;
var local_type_eval_id = JSON.parse(x).type_eval_id;
var local_type_eval_code = JSON.parse(x).type_eval_code;
var local_type_eval_nom = JSON.parse(x).type_eval_nom;
tab_tmp.push(local_type_eval__id);
tab_tmp.push(local_type_eval_id);
@ -2530,7 +2504,7 @@ const Intranet_Mes_Stagiaires = (props) => {
"class_id": local_class_id,
"class_eu_id": local_class_eu_id,
"class_eu_code": local_class_eu_code,
"type_eval__id": local_type_eval__id,
"type_eval_id": local_type_eval_id,
"type_eval_code": local_type_eval_code,
"type_eval_nom": local_type_eval_nom,
};
@ -2547,7 +2521,7 @@ const Intranet_Mes_Stagiaires = (props) => {
"class_id": "",
"class_eu_id": "",
"class_eu_code": "",
"type_eval__id": "",
"type_eval_id": "",
"type_eval_code": "",
"type_eval_nom": "",
};
@ -4195,6 +4169,7 @@ const Intranet_Mes_Stagiaires = (props) => {
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
const stored_cookie = getCookie('tokenmysych');
form.append("token", stored_cookie);
form.append("archive", "0");
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_partner_class/";
setLoading(true);
@ -4898,7 +4873,10 @@ const Intranet_Mes_Stagiaires = (props) => {
function Record_All_PJ() {
if (!p_detail_one_file_to_download_type_name) {
alert(" Vous devez donner un nom à la pièce jointe");
// alert(" Vous devez donner un nom à la pièce jointe");
setdisplay_alert_mysy("1");
setalert_message(" Vous devez donner un nom à la pièce jointe");
setalert_type("error");
return;
}
@ -4943,7 +4921,11 @@ const Intranet_Mes_Stagiaires = (props) => {
setfile_1_name();
setp_detail_one_file_to_download_type_name();
//GetCurrentClass_trainingsession();
alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
// alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
setdisplay_alert_mysy("1");
setalert_message(result['message']);
setalert_type("error");
}
else {
@ -6345,115 +6327,130 @@ const Intranet_Mes_Stagiaires = (props) => {
setdisplay_stagiaire_with_alert(event.target.checked);
};
// DEBUT EXPORT EXCEL DATAGRID
// DEBUT EXPORT EXCEL DATAGRID
function CustomToolbar(props) {
function CustomToolbar(props) {
return (
<GridToolbarContainer {...props}>
return (
<GridToolbarContainer {...props}>
<GridToolbarColumnsButton />
<GridToolbarFilterButton />
<GridToolbarDensitySelector
slotProps={{ tooltip: { title: 'Change density' } }}
/>
<Box sx={{ flexGrow: 1 }} />
<ExportButton data_colums={props.data_colums} />
<GridToolbarColumnsButton />
<GridToolbarFilterButton />
<GridToolbarDensitySelector
slotProps={{ tooltip: { title: 'Change density' } }}
/>
<Box sx={{ flexGrow: 1 }} />
<ExportButton data_colums={props.data_colums} />
</GridToolbarContainer>
);
}
</GridToolbarContainer>
);
}
function getExcelData(apiRef) {
// Select rows and columns
const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
function getExcelData(apiRef) {
// Select rows and columns
const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
// Format the data. Here we only keep the value
const data = filteredSortedRowIds.map((id) => {
const row = {};
visibleColumnsField.forEach((field) => {
row[field] = apiRef.current.getCellParams(id, field).value;
// Format the data. Here we only keep the value
const data = filteredSortedRowIds.map((id) => {
const row = {};
visibleColumnsField.forEach((field) => {
row[field] = apiRef.current.getCellParams(id, field).value;
});
return row;
});
return row;
});
return data;
}
return data;
}
function ExportButton(props) {
return (
<GridToolbarExportContainer {...props}>
<ExportMenuItem data_colums={props.data_colums} />
</GridToolbarExportContainer>
);
}
function ExportButton(props) {
return (
<GridToolbarExportContainer {...props}>
<ExportMenuItem data_colums={props.data_colums} />
</GridToolbarExportContainer>
);
}
function handleExport(apiRef, data_colums) {
const data = getExcelData(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
function handleExport(apiRef, data_colums) {
const data = getExcelData(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
const local_config = {
keys: visibleColumnsField,
columnNames: data_colums.filter((mydata) => (mydata).disableExport !== true).map(function (mydata) {
if (mydata.headerName && visibleColumnsField.includes(mydata.field)) {
if (mydata.headerName) {
return mydata.headerName;
const local_config = {
keys: visibleColumnsField,
columnNames: data_colums.filter((mydata) => (mydata).disableExport !== true).map(function (mydata) {
if (mydata.headerName && visibleColumnsField.includes(mydata.field)) {
if (mydata.headerName) {
return mydata.headerName;
}
}
}),
fileName: 'data_' + String(new Date().toJSON().slice(0, 10)).replaceAll("-", "_") + '.xlsx',
sheetName: 'Export_' + String(new Date().toJSON().slice(0, 10)).replaceAll("-", "_"),
};
local_config.columnNames = local_config.columnNames.filter(function (element) {
return element !== undefined;
});
const rows = data.map((row) => {
const mRow = {};
for (const key of local_config.keys) {
mRow[key] = row[key];
}
return mRow;
});
}),
const worksheet = XLSX.utils.json_to_sheet(rows);
XLSX.utils.sheet_add_aoa(worksheet, [[...local_config.columnNames]], {
origin: 'A1',
});
fileName: 'data_' + String(new Date().toJSON().slice(0, 10)).replaceAll("-", "_") + '.xlsx',
sheetName: 'Export_' + String(new Date().toJSON().slice(0, 10)).replaceAll("-", "_"),
};
const workbook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(workbook, worksheet, local_config.sheetName);
XLSX.writeFile(workbook, local_config.fileName, { compression: true });
}
local_config.columnNames = local_config.columnNames.filter(function( element ) {
return element !== undefined;
});
function ExportMenuItem(props) {
const apiRef = useGridApiContext();
const { hideMenu } = props;
return (
<MenuItem
onClick={() => {
handleExport(apiRef, props.data_colums);
// Hide the export menu after the export
hideMenu?.();
}}
>
Export Excel
</MenuItem>
);
}
const rows = data.map((row) => {
const mRow = {};
for (const key of local_config.keys) {
mRow[key] = row[key];
}
return mRow;
});
// FIN EXPORT EXCEL DATAGRID
const worksheet = XLSX.utils.json_to_sheet(rows);
XLSX.utils.sheet_add_aoa(worksheet, [[...local_config.columnNames]], {
origin: 'A1',
});
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
const [alert_message, setalert_message] = useState("");
const [alert_type, setalert_type] = useState("");
const workbook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(workbook, worksheet, local_config.sheetName);
XLSX.writeFile(workbook, local_config.fileName, { compression: true });
}
function clear_alert_message() {
setalert_message("");
}
function clear_alert_type() {
setalert_type("");
}
function clear_display_alert_mysy() {
setdisplay_alert_mysy("");
}
function ExportMenuItem(props) {
const apiRef = useGridApiContext();
const { hideMenu } = props;
return (
<MenuItem
onClick={() => {
handleExport(apiRef, props.data_colums);
// Hide the export menu after the export
hideMenu?.();
}}
>
Export Excel
</MenuItem>
);
}
// FIN EXPORT EXCEL DATAGRID
return (
<div className="intranet_mes_stagiaires">
@ -6461,15 +6458,26 @@ function ExportMenuItem(props) {
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
</div>}
{/*** Affichage des messages d'alerte*/}
{display_alert_mysy && String(display_alert_mysy) === "1" &&
<Module_Alert_Confirmation alert_message={alert_message}
alert_type={alert_type}
clear_alert_message={clear_alert_message}
clear_alert_type={clear_alert_type}
clear_display_alert_mysy={clear_display_alert_mysy}
/>
}
{/*** FIN Affichage des messages d'alerte*/}
{ /**** Dialog info stagiaire */}
<Dialog
open={Dialog_stagiaire_open}
//onClose={Dialog_stagiaire_handleClose}
className="displaypartnersession"
static
onClose={() => null}
@ -6494,7 +6502,7 @@ function ExportMenuItem(props) {
aria-labelledby="draggable-dialog-title"
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title">Info Stagiaire</DialogTitle>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title">Info Stagiaire</DialogTitle>
<DialogContent className="DialogContent_width">
<div className="div_row_dialog">
@ -6640,7 +6648,7 @@ function ExportMenuItem(props) {
<DialogActions>
<IconButton
<IconButton
autoFocus
onClick={Dialog_stagiaire_handleClose_buton}
color="primary"
@ -6671,7 +6679,7 @@ function ExportMenuItem(props) {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent>
<DialogContentText>
{Dialog_1_message}
@ -6715,7 +6723,7 @@ function ExportMenuItem(props) {
aria-labelledby="draggable-dialog-title"
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title">Tuteur {quel_tuteur}</DialogTitle>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title">Tuteur {quel_tuteur}</DialogTitle>
{String(quel_tuteur) === "1" && <DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_tuteur_1_message}
@ -7097,7 +7105,7 @@ function ExportMenuItem(props) {
<DialogActions>
<IconButton
<IconButton
autoFocus
onClick={Dialog_tuteur_1_handleClose_buton}
color="primary"
@ -7133,7 +7141,7 @@ function ExportMenuItem(props) {
static
onClose={() => null}>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
@ -7445,7 +7453,7 @@ function ExportMenuItem(props) {
</Dialog>
{ /**** FIN Dialog Convention */}
<h3 style={{ fontFamily:'DM Sans' }}> Mes stagiaires </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Mes stagiaires </h3>
<div className="div_row">
<div className="titre1"> Utilisez les filtres !</div>
@ -7950,7 +7958,7 @@ function ExportMenuItem(props) {
}}
>
<DataGrid
// checkboxSelection
// checkboxSelection
components={{
Toolbar: CustomToolbar
}}
@ -8057,9 +8065,9 @@ function ExportMenuItem(props) {
rowsPerPageOptions={[10]}
disableSelectionOnClick
/* components={{
Toolbar: GridToolbar,
}}*/
/* components={{
Toolbar: GridToolbar,
}}*/
//sx={datagridSx}
getCellClassName={(params) => {
//field === 'distantiel'
@ -8343,7 +8351,7 @@ function ExportMenuItem(props) {
</div>}
</div>
@ -8352,7 +8360,7 @@ function ExportMenuItem(props) {
<div className="div_row" style={{ "border": "None" }}>
{/*} <div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
{/*} <div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
<Button variant="outlined" onClick={submenu_import_stagiaire} className="detail_class_submenu bton_import_excel"
id='menu_import_participant' name='menu_import_participant'>Importer des participants excel &nbsp;
@ -8385,20 +8393,15 @@ function ExportMenuItem(props) {
</div>
<div className="div_row" ref={myRef_details} id="myRef_details"> &nbsp;</div>
{((selected_id && String(selected_id).length > 2) || (String(addOneParticipant) === "1")) && <div className="div_row">
<Button variant="outlined" ref={myRef} onClick={submenu_detail_stagaire} className="detail_class_submenu" id='detail_session' name='detail_session'>Détail Participant</Button>
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_class_submenu" id='piece_jointe' name='piece_jointe'>Pièces Jointes </Button>
{/* <Button variant="outlined" onClick={submenu_sessions} className="detail_class_submenu" id='preinscrit' name='preinscrit'>Détail Session </Button>
<Button variant="outlined" onClick={submenu_absence} className="detail_class_submenu" id='absence' name='absence'>Absence </Button> */}
{String(props.formation_initiale) === "1" && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_unite_enseignement} className="detail_class_submenu" id='ue' name='ue'>Unit. Enseignement </Button>}
{String(props.formation_initiale) === "1" && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_notes} className="detail_class_submenu" id='notes' name='ue'>Notes </Button>}
{String(addOneParticipant) !== "1" && String(history_securite_read) === "1" && <Button variant="outlined" onClick={submenu_historique} className="detail_class_submenu" id='historique' name='historique'>Historique </Button>}
</div>}
@ -8583,7 +8586,7 @@ function ExportMenuItem(props) {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
@ -9655,7 +9658,7 @@ function ExportMenuItem(props) {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
@ -9771,7 +9774,7 @@ function ExportMenuItem(props) {
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
</div>
@ -10313,7 +10316,7 @@ function ExportMenuItem(props) {
<hr className="hr_break" />
</div>
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
Acces Plateforme E-Learning (LMS)
Acces Plateforme E-Learning (LMS)
</div>
<div className="div_row" style={{ "border": "None" }}>
@ -10382,7 +10385,7 @@ function ExportMenuItem(props) {
selected={detailuser_date_evaluation}
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
@ -10485,7 +10488,7 @@ function ExportMenuItem(props) {
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
@ -10500,7 +10503,7 @@ function ExportMenuItem(props) {
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
style={{ "visibility": "hidden" }}
/>
@ -10691,7 +10694,7 @@ function ExportMenuItem(props) {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -10726,7 +10729,7 @@ function ExportMenuItem(props) {
{String(props.formation_initiale) === "1" && String(submenu) === "ue" && String(addOneParticipant) !== "1" && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
<h3 style={{ fontFamily:'DM Sans' }}> Gestion des UE d'un inscrit </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Gestion des UE d'un inscrit </h3>
<div className="div_row">
<div className="session_caract"> <b>Unite D'enseignement </b> <br />
@ -10799,7 +10802,7 @@ function ExportMenuItem(props) {
//console.log(" lecture de New_Get_Inscrit_List_Evaluation_Par_UE_result[i] = ", New_Get_Inscrit_List_Evaluation_Par_UE_result[i])
if (data.class_ue_id && String(data.class_ue_id) !== "" && data.class_ue_id === New_Get_Inscrit_List_Evaluation_Par_UE_result[i].class_eu_id &&
data.type_evaluation_id === New_Get_Inscrit_List_Evaluation_Par_UE_result[i].type_eval__id
data.type_evaluation_id === New_Get_Inscrit_List_Evaluation_Par_UE_result[i].type_eval_id
) {
//console.log(" GAGNEEEE ");
return data;
@ -10872,7 +10875,7 @@ function ExportMenuItem(props) {
{String(props.formation_initiale) === "1" && String(submenu) === "notes" && String(display_notes) === "1" && String(addOneParticipant) !== "1" && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
<h3 style={{ fontFamily:'DM Sans' }}> Les notes de l'inscrit </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Les notes de l'inscrit </h3>
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
<Button className="bton_emarge" onClick={(event) => {
Export_Inscrit_Notes();

View File

@ -29,6 +29,8 @@ import fileDownload from 'js-file-download'
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -72,7 +74,7 @@ import { GridExportCsvOptions } from '@mui/x-data-grid';
const Intranet_Tous_Documents = (props) => {
const { action, orderid } = useParams();
registerLocale('fr', fr);
const history = useHistory();
const [submenu, setsubmenu] = useState("");
@ -211,7 +213,7 @@ const Intranet_Tous_Documents = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -374,7 +376,7 @@ const Intranet_Tous_Documents = (props) => {
}
if (document.getElementById(current_menu)) {
document.getElementById(current_menu).style.backgroundColor = "#104277";
document.getElementById(current_menu).style.backgroundColor = "#107758";
document.getElementById(current_menu).style.color = "white";
document.getElementById(current_menu).style.fontWeight = "bold";
}
@ -552,7 +554,7 @@ const Intranet_Tous_Documents = (props) => {
function getExcelData(apiRef) {
// Select rows and columns
const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
// Format the data. Here we only keep the value
const data = filteredSortedRowIds.map((id) => {
@ -577,7 +579,7 @@ const Intranet_Tous_Documents = (props) => {
function handleExport(apiRef, data_colums) {
const data = getExcelData(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
const local_config = {
@ -1168,7 +1170,7 @@ const Intranet_Tous_Documents = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();

View File

@ -0,0 +1,480 @@
import React, { useState, useEffect } from "react";
import { useHistory } from "react-router-dom";
import { useCookies } from "react-cookie";
import { confirmAlert } from 'react-confirm-alert';
import Fotter_Catalog_Pub from "../Fotter_Catalog_Pub";
import img_met_program from "../../mysy_img/met_programmation.jpg";
import img_met_graphisme from "../../mysy_img/metier_graphisme.jpg";
import img_met_autre from "../../mysy_img/met_autre.jpg";
import img_met_digital from "../../mysy_img/met_digital.jpg";
import img_met_management from "../../mysy_img/met_management.jpg";
import img_met_dev_perso from "../../mysy_img/metier_dev_perso.jpg";
import img_met_rh from "../../mysy_img/met_rh.jpg";
import img_met_bureautic from "../../mysy_img/met_burautic.jpg";
import img_met_vente from "../../mysy_img/met_vente.jpg";
import axios from "axios";
//import { Rating } from 'react-simple-star-rating'
import Rating from '@mui/material/Rating';
import parse from 'html-react-parser'
import { CiLocationOn } from "react-icons/ci";
const Formation_Partner_Catalog_Special_JMJFormation = (props) => {
const [userconnected, setuserconnected] = useState("0");
const [partnerconnected, setpartnerconnected] = useState("0");
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']);
const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart']);
const history = useHistory();
const [myfilter, setmyfilter] = useState(props.formation.price);
const [profileimg, setprofileimg] = useState(props.formation.price);
// Gestion des Cookies
const stored_partner = cookie_part.tokenmysypart;
const stored_user = cookie.tokenmysych;
function test(val) {
if (userconnected === "0" && partnerconnected === "0") {
confirmAlert({
title: 'Activer votre session ?',
message: 'Merci de vous connecter pour acceder au detail de cette formation',
buttons: [
{
label: 'Oui',
onClick: () => { history.push("/mysy-training-login/training/" + props.formation.internal_url) }
},
{
label: 'Non',
onClick: () => { return }
}
],
closeOnEscape: false,
closeOnClickOutside: false,
keyCodeForClose: [8, 32],
willUnmount: () => { },
afterClose: () => { },
onClickOutside: () => { },
onKeypress: () => { },
onKeypressEscape: () => { },
});
} else {
window.open(
"/Display-Detail-formation/" + props.formation.internal_url,
'_blank'
);
}
}
const [myclassimage, setmyclassimage] = useState();
const [isclassimage, setisclassimage] = useState("False");
const [userimgclassprofil, setuserimgclassprofil] = useState("");
const [class_img_stored_in_bdd, setclass_img_stored_in_bdd] = useState("");
function getClassImage_no_token() {
var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedClassImage_no_token/";
var form = new FormData();
form.append("type", "partner");
form.append("related_collection", "myclass");
form.append("related_collection_recid", props.formation._id);
form.append("class_external_code", props.formation.external_code);
axios.post(myurl, form).then(res => {
// console.log(" getClassImage_no_token : In test res.data.status = ", res.data.status);
if (String(res.data.status) === "true") {
//console.log(" getClassImage_no_token: res.data.message.img = ", res.data.message);
if (res.data.message.img.length > 0) {
setisclassimage("True");
}
else {
setisclassimage("False");
}
setisclassimage(res.data.message.img);
var ch_img = "data:image/png;base64," + res.data.message.img;
setclass_img_stored_in_bdd(ch_img);
// console.log(" getClassImage_no_token: setclass_img_stored_in_bdd = ", setclass_img_stored_in_bdd);
}
else {
// console.log(" In Erreur res.data.status = " + res.data.status);
//console.log(" In Erreur res.data.message = " + res.data.message);
setisclassimage("False");
setuserimgclassprofil();
setclass_img_stored_in_bdd();
}
}).catch((error) => {
console.warn('getClassImage ee: Not good man :( getClassImage = ');
setisclassimage("False");
setuserimgclassprofil("");
setclass_img_stored_in_bdd("");
})
}
/* Cette variable accompagne la gestion des images par defaut.
idée : si la valeur de "DetailTraining.metier" != "management, digital, office, rh, vente, dev_perso"
alors l'utilisateur à créer une formation avec un metier qui n'est pas geré, donc on met une image par defaut
*/
const [ismetiermanaged, setismetiermanaged] = useState();
const liste_metier = ["management", "digital", "office", "rh", "vente", "dev_perso"];
useEffect(() => {
setmyfilter(props.myfil);
// console.log(" #### useEffect props.formation = ", props.formation);
if (typeof (stored_user) === "undefined" || String(stored_user) === '') {
setuserconnected("0");
} else {
setuserconnected("1");
}
if (typeof (stored_partner) === "undefined" || String(stored_partner) === '') {
setpartnerconnected("0");
} else {
setpartnerconnected("1");
}
getClassImage_no_token();
GetCurrentClass_trainingsession();
GetCurrentClass_trainingsession_cities();
// Verifier si le metier est geré
if (props.formation.metier) {
if (!liste_metier.includes(props.formation.metier)) {
setismetiermanaged("0"); // j'ai une valeur dans metier, mais qui n'est pas geré
}
}
else {
setismetiermanaged("0");
}
if (props.formation.img_url && String(props.formation.img_url).length > 0) {
setismetiermanaged("1");
}
}, []);
const [GetCurrentClass_api, setGetCurrentClass_api] = useState();
const [GetCurrentClass_message, setGetCurrentClass_message] = useState();
const [GetCurrentClass_result, setGetCurrentClass_result] = useState();
function GetCurrentClass_trainingsession(event) {
var form = new FormData();
form.append("class_internal_url", props.formation.internal_url);
form.append("token", stored_partner);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSessionFormation_List/";
axios.post(myurl, form).then(res => {
if (res.data.status != "false") {
//console.log(" In GetCurrentClass_trainingsession res.data.status = " + res.data.status);
//console.log(" In GetCurrentClass_trainingsession res.data.message r_class = " + res.data.message);
setGetCurrentClass_api("true");
setGetCurrentClass_result(res.data.message);
}
else {
setGetCurrentClass_api("false");
setGetCurrentClass_message(res.data.message);
}
}).catch((error) => {
console.warn('Not good man :( GetCurrentClass_trainingsession = ', error);
setGetCurrentClass_api("false");
//setmyApimyApiMessage("")
})
}
const [GetCurrentClass_trainingsession_cities_api, setGetCurrentClass_trainingsession_cities_api] = useState();
const [GetCurrentClass_trainingsession_cities_message, setGetCurrentClass_trainingsession_cities_message] = useState();
const [GetCurrentClass_trainingsession_cities_result, setGetCurrentClass_trainingsession_cities_result] = useState([]);
function GetCurrentClass_trainingsession_cities(event) {
var form = new FormData();
form.append("class_internal_url", props.formation.internal_url);
form.append("token", stored_partner);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSession_Cities_And_Distance_Formation_List/";
axios.post(myurl, form).then(res => {
if (res.data.status != "false") {
//console.log(" In GetCurrentClass_trainingsession_cities res.data.status = " + res.data.status);
//console.log(" In GetCurrentClass_trainingsession_cities res.data.message r_class = " + res.data.message);
setGetCurrentClass_trainingsession_cities_api("true");
setGetCurrentClass_trainingsession_cities_result(res.data.message);
}
else {
setGetCurrentClass_trainingsession_cities_api("false");
setGetCurrentClass_trainingsession_cities_message(res.data.message);
}
}).catch((error) => {
console.warn('Not good man :( GetCurrentClass_trainingsession_cities = ', error);
setGetCurrentClass_trainingsession_cities_api("false");
//setmyApimyApiMessage("")
})
}
const styles = {
list: {
display: 'flex',
flexDirection: 'column',
gap: '32px',
width: '100%',
},
row: {
display: 'flex',
flexDirection: 'row',
gap: '24px',
width: '100%',
},
card: {
flexGrow: 1,
backgroundColor: '#fff',
borderRadius: '8px',
overflow: 'hidden',
display: 'flex',
flexDirection: 'column',
},
image: {
maxWidth: '100%',
height: '200px',
overflow: 'hidden',
margin: "auto",
},
content: {
padding: '16px',
},
header: {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
},
eligibility: {
backgroundColor: '#e2e9fb',
padding: '4px 8px',
borderRadius: '4px',
fontSize: '12px',
fontWeight: 'bold',
},
title: {
fontSize: '14px',
fontWeight: 'bold',
margin: '8px 0',
},
price: {
fontSize: '14px',
fontWeight: 'bold',
color: '#000',
},
description: {
fontSize: '12px',
color: '#666',
margin: '8px 0',
height: "40px",
overflow: "hidden",
},
details: {
display: 'flex',
justifyContent: 'space-between',
marginTop: '16px',
},
button: {
backgroundColor: '#007bff',
color: '#fff',
padding: '8px 16px',
border: 'none',
borderRadius: '4px',
cursor: 'pointer',
},
buttonOutline: {
backgroundColor: '#fff',
color: '#007bff',
padding: '8px 16px',
border: '1px solid #007bff',
borderRadius: '4px',
cursor: 'pointer',
},
};
return (
<div className="new_formation_2025">
<div style={styles.card}>
<div style={{ width: '100%', textAlign: 'right', zIndex: '9999' }}>
<div style={{ width: '50%', float: 'left' }}> &nbsp; </div>
{props.formation.cpf && String(props.formation.cpf) === String("1") && <div className="case_cpf" >
<span className="tag_cpf_txt_ok_cpf" >{"OUI CPF"}</span>
</div>
}
{props.formation.cpf && String(props.formation.cpf) !== String("1") && <div className="case_cpf">
<span className="tag_cpf_txt_no_ok_cpf">{"NON CPF"}</span>
</div>
}
{!props.formation.cpf && String(props.formation.cpf) !== String("1") && <div className="case_cpf">
<span className="tag_cpf_txt_no_ok_cpf">{"NON CPF"}</span>
</div>}
</div>
{class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 &&
<img src={class_img_stored_in_bdd} alt="Formation" style={styles.image} />
}
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) &&
(!props.formation.img_url || String(props.formation.img_url).length <= 10) &&
String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" &&
<div >
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") &&
String(isclassimage) === "False" && <img src={img_met_program} alt="informatique" style={styles.image} />}
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") &&
String(isclassimage) === "False" && <img src={img_met_graphisme} alt="graphisme" style={styles.image} />}
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") &&
String(isclassimage) === "False" && <img src={img_met_management} alt="management" style={styles.image} />}
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") &&
String(isclassimage) === "False" && <img src={img_met_digital} alt="digital" style={styles.image} />}
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") &&
String(isclassimage) === "False" && <img src={img_met_bureautic} alt="office" style={styles.image} />}
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") &&
String(isclassimage) === "False" && <img src={img_met_rh} alt="ressources humaines" style={styles.image} />}
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") &&
String(isclassimage) === "False" && <img src={img_met_vente} alt="vente" style={styles.image} />}
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("dev_perso") &&
String(isclassimage) === "False" && <img src={img_met_dev_perso} alt="developpement personnel" style={styles.image} />}
{String(isclassimage) === "True" && <img src={userimgclassprofil} alt="developpement personnel" style={styles.image} />}
</div>
}
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 &&
<div>
<img src={userimgclassprofil} alt="autre" style={styles.image} />
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br />
{String(props.formation.institut_formation)} </div>*/}
</div>}
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 &&
<div>
<img src={img_met_autre} alt="autre" style={styles.image} />
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br />
{String(props.formation.institut_formation)} </div>*/}
</div>}
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" &&
<div>
<img src={props.formation.img_url} alt="autre" style={styles.image} />
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par : <br />
{String(props.formation.institut_formation)} </div>*/}
</div>}
<div className="block_main_contente">
<div className="block_top_content">
<div className="div_row_gauche" >
{props.formation.note && String(props.formation.note).length === 1 &&
parseInt(String(props.formation.note)) <= 5 &&
<Rating name="half-rating-read" defaultValue={props.formation.note} precision={0.5} readOnly style={{ fontSize: '15px' }} />
}
</div>
<h3 className="formation_titre">{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 50)}</h3>
{props.formation.discounted_price && props.formation.business_prices && <p className="formation_prix">{props.formation.discounted_price} HT&nbsp; </p>}
{props.formation.business_prices && props.formation.business_prices.length <= 0
&& <p className="formation_prix">{props.formation.price} HT&nbsp; </p>}
{props.formation.business_prices && props.formation.business_prices.length > 0 &&
<p style={{ width: '100%', float: 'left' }}>
<p className="formation_prix" style={{ width: '100%', float: 'left' }}>{props.formation.business_prices[0].discounted_price} HT&nbsp;
<font className='training_price_barre' style={{ fontSize: '14px' }}> {props.formation.price} HT &nbsp;</font>
<font className='discount_block' style={{ fontSize: '14px' }}> ({props.formation.business_prices[0].discount} %) </font></p>
</p>}
<p className="formation_description"> {String(parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))).substring(0, 80)}...</p>
</div>
</div>
<div className="block_cats">
<button className="block_cats_bton_detail">
<nav className="block_cats_bton_detail_text"
onClick={(e) => {
e.preventDefault();
if (props.formation.url && props.formation.url.length > 5) {
window.open(
props.formation.url,
'_blank'
);
} else {
window.open(
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url,
'_blank'
);
}
}}> Voir les détails </nav></button>
</div>
</div>
</div>
)
}
export default Formation_Partner_Catalog_Special_JMJFormation;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ 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 { getCookie, } from 'react-use-cookie';
import { useHistory } from "react-router-dom";
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
@ -18,9 +18,10 @@ import fileDownload from 'js-file-download';
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
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";
@ -44,11 +45,10 @@ import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import { IoAddCircleOutline } from "react-icons/io5";
import AttachFileIcon from '@mui/icons-material/AttachFile';
import { FcAcceptDatabase, FcPlanner } from "react-icons/fc";
import { FcAcceptDatabase, FcPlanner } from "react-icons/fc";
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import Module_Historique_Action from "./Module_Historique_Action";
import ToggleSwitch from "./ToggleSwitch";
import daygridPlugin from "@fullcalendar/daygrid";
import FullCalendar, { formatDate } from "@fullcalendar/react";
@ -115,7 +115,7 @@ const useStyles = makeStyles((theme) => ({
const Jury = (props) => {
registerLocale('fr', fr);
const classes = useStyles();
const history = useHistory();
const [submenu, setsubmenu] = useState("");
@ -225,9 +225,7 @@ const Jury = (props) => {
{ field: '_id', headerName: '_id', hide: true, Width: 0, disableExport: true, },
{ field: 'id', headerName: 'id', hide: true, Width: 0, disableExport: true, },
{ field: 'session_id', headerName: 'session_id', hide: true, Width: 0, disableExport: true, },
{ field: 'chef_jury_id', headerName: 'chef_jury_id', hide: true, Width: 0, disableExport: true, },
{ field: 'code', headerName: 'Code', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'description', headerName: 'Description', flex: 1, hide: false, minWidth: 180, renderCell: (params) => <ExpandableCell_50 {...params} />, },
@ -244,66 +242,68 @@ const Jury = (props) => {
field: "delete", headerName: 'Supprimer', disableExport: true,
renderCell: (cellValues) => {
return (
<nav>
{String(cellValues.row.nb_membre) !== "0" && <Button onClick={(e) => {
alert(" Vous devez supprimer les membres avant de supprimer le jury");
}}>
<CiTrash />
<>
{String(props.check_user_acces_right("jury", "write")) === "1" && <nav>
{String(cellValues.row.nb_membre) !== "0" && <Button onClick={(e) => {
alert(" Vous devez supprimer les membres avant de supprimer le jury");
}}>
<CiTrash />
</Button>}
</Button>}
{String(cellValues.row.nb_membre) === "0" &&
<Popup
trigger={<Button
{String(cellValues.row.nb_membre) === "0" &&
<Popup
trigger={<Button
>
<CiTrash />
</Button>}
modal
nested
position="center center"
>
<CiTrash />
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, le jury sera <i><font color="red"> définitivement supprimé</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
Delete_Given_Jury(cellValues.row._id);
//console.log('modal closed ');
close();
}}> Valider </button>
En confirmant cette opération, le jury sera <i><font color="red"> définitivement supprimé</font></i>. <br />
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
Delete_Given_Jury(cellValues.row._id);
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
</div>
)}
</Popup>}
)}
</Popup>}
</nav>
</nav>}
</>
);
}
}
@ -344,61 +344,62 @@ const Jury = (props) => {
field: "delete", headerName: 'Supprimer', disableExport: true,
renderCell: (cellValues) => {
return (
<>
{String(props.check_user_acces_right("jury", "write")) === "1" && <Popup
trigger={<Button
<Popup
trigger={<Button
onClick={(event) => {
onClick={(event) => {
// handleClick_delete(event, cellValues);
}}
>
<CiTrash />
// handleClick_delete(event, cellValues);
}}
</Button>}
modal
nested
position="center center"
>
<CiTrash />
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, la personne sera <i><font color="red"> supprimée de l'équipe </font></i>. <br />
En confirmant cette opération, la personne sera <i><font color="red"> supprimée de l'équipe </font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
var tab = []
tab.push(String(cellValues.row._id));
Delete_List_Membre_From_Jury(tab);
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
//console.log('modal closed ');
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
var tab = []
tab.push(String(cellValues.row._id));
Delete_List_Membre_From_Jury(tab);
close();
}}
>
Annuler
</button>
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
</div>
)}
</Popup>
)}
</Popup>}
</>
);
@ -448,7 +449,7 @@ const Jury = (props) => {
renderCell: (cellValues) => {
return (
<nav>
<Button onClick={(e) => {
{String(props.check_user_acces_right("jury", "write")) === "1" && <Button onClick={(e) => {
Get_Jury_List_Apprenant_Soutenance(cellValues.row._id, cellValues.row.jury_soutenance_id);
@ -464,10 +465,7 @@ const Jury = (props) => {
}}>
<TbUsersGroup />
</Button>
</Button>}
</nav>
);
}
@ -478,7 +476,7 @@ const Jury = (props) => {
renderCell: (cellValues) => {
return (
<nav>
<Popup
{String(props.check_user_acces_right("jury", "write")) === "1" && <Popup
trigger={<Button
>
<CiTrash />
@ -512,7 +510,7 @@ const Jury = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -524,7 +522,7 @@ const Jury = (props) => {
</div>
</div>
)}
</Popup>
</Popup>}
</nav>
);
@ -536,7 +534,7 @@ const Jury = (props) => {
renderCell: (cellValues) => {
return (
<div>
<nav style={{ width: '100%', 'textAlign': 'center' }}>
{String(props.check_user_acces_right("jury", "write")) === "1" && <nav style={{ width: '100%', 'textAlign': 'center' }}>
<IconButton
aria-label="more"
id="long-button"
@ -632,7 +630,7 @@ const Jury = (props) => {
</nav>
</nav>}
</div>
);
},
@ -660,7 +658,7 @@ const Jury = (props) => {
renderCell: (cellValues) => {
return (
<nav>
<Popup
{String(props.check_user_acces_right("jury", "write")) === "1" && <Popup
trigger={<Button
>
<CiTrash />
@ -694,7 +692,7 @@ const Jury = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -706,7 +704,7 @@ const Jury = (props) => {
</div>
</div>
)}
</Popup>
</Popup>}
</nav>
);
@ -2068,7 +2066,7 @@ const Jury = (props) => {
async function submenu_detail() {
await sleep(5);
setsubmenu("detail_jury");
inactive_active_menu_header("detail_jury");
@ -2080,7 +2078,7 @@ const Jury = (props) => {
}
async function submenu_membres() {
await sleep(5);
setsubmenu("membre");
inactive_active_menu_header("membre");
@ -2092,7 +2090,7 @@ const Jury = (props) => {
}
async function submenu_piece_jointe() {
await sleep(5);
setsubmenu("piece_jointe");
inactive_active_menu_header("piece_jointe");
@ -2107,7 +2105,7 @@ const Jury = (props) => {
}
async function submenu_selection() {
await sleep(5);
setsubmenu("selection");
inactive_active_menu_header("selection");
@ -2161,7 +2159,7 @@ const Jury = (props) => {
if (document.getElementsByName(String(current_menu_header)) && document.getElementsByName(String(current_menu_header))[0]) {
document.getElementsByName(String(current_menu_header))[0].style.fontWeight = "700";
document.getElementsByName(String(current_menu_header))[0].style.backgroundColor = "#104277";
document.getElementsByName(String(current_menu_header))[0].style.backgroundColor = "#107758";
document.getElementsByName(String(current_menu_header))[0].style.color = "white";
}
}
@ -2192,7 +2190,7 @@ const Jury = (props) => {
function getExcelData(apiRef) {
// Select rows and columns
const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
// Format the data. Here we only keep the value
const data = filteredSortedRowIds.map((id) => {
@ -2217,7 +2215,7 @@ const Jury = (props) => {
function handleExport(apiRef, data_colums) {
const data = getExcelData(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
const local_config = {
@ -2705,7 +2703,10 @@ const Jury = (props) => {
function Record_All_PJ() {
if (!p_detail_one_file_to_download_type_name) {
alert(" Vous devez donner un nom à la pièce jointe");
// alert(" Vous devez donner un nom à la pièce jointe");
setdisplay_alert_mysy("1");
setalert_message(" Vous devez donner un nom à la pièce jointe");
setalert_type("error");
return;
}
@ -2748,7 +2749,10 @@ const Jury = (props) => {
setfile_1_name();
setp_detail_one_file_to_download_type_name();
//GetCurrentClass_trainingsession();
alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
// alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
setdisplay_alert_mysy("1");
setalert_message(" La pièce jointe " + file_1_name.name + " a été bien enregistrée");
setalert_type("success");
}
else {
@ -3029,9 +3033,6 @@ const Jury = (props) => {
const handleSelect_V2 = (info) => {
GetListeInscrit();
setGet_Jury_List_Apprenant_Seance_insc_result([]);
setselected_agenda_id("");
@ -3426,7 +3427,7 @@ const Jury = (props) => {
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("archive", "0");
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/";
@ -4410,6 +4411,14 @@ const Jury = (props) => {
const [selected_inscription_id_for_jury, setselected_inscription_id_for_jury] = useState("");
const New_Option_mode_animation = [
{ "id": "1", "label": "Distanciel", "value": "1" },
{ "id": "2", "label": "Hybride", "value": "2" },
{ "id": "0", "label": "Présentiel", "value": "0" },
{ "id": "", "label": "", "value": "" },
]
return (
<div className="jurys">
{isLoading && <div className="loader-container">
@ -4459,7 +4468,7 @@ const Jury = (props) => {
>
<DialogTitle> Délibération du Jury</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Délibération du Jury</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContentText>
{Dialog_1_message}
@ -4602,7 +4611,7 @@ const Jury = (props) => {
>
<DialogTitle>Gestion membres jury</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Gestion membres jury</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContentText>
{Dialog_1_message}
@ -4920,7 +4929,7 @@ const Jury = (props) => {
>
<DialogTitle>Gestion soutenance</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Gestion soutenance</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContentText>
{Dialog_1_message}
@ -5258,7 +5267,7 @@ const Jury = (props) => {
className="disabled_style enable_style datepicker_complement"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -5288,7 +5297,7 @@ const Jury = (props) => {
className="disabled_style enable_style datepicker_complement"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -5787,7 +5796,7 @@ const Jury = (props) => {
aria-labelledby="draggable-dialog-title"
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_1_message}
@ -5933,7 +5942,7 @@ const Jury = (props) => {
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -5959,7 +5968,7 @@ const Jury = (props) => {
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -6349,7 +6358,7 @@ const Jury = (props) => {
},
"& .MuiDataGrid-columnHeaders": {
backgroundColor: "#c8cfd5",
@ -6573,7 +6582,7 @@ const Jury = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -6600,11 +6609,11 @@ const Jury = (props) => {
&nbsp;
<Button variant="outlined" onClick={Ajout_1_jury}
{String(props.check_user_acces_right("jury", "write")) === "1" && <Button variant="outlined" onClick={Ajout_1_jury}
className="detail_class_submenu bton_add_session"
id='menu_import_participant' name='menu_import_participant'>Ajout 1 Jury &nbsp;
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
</Button>
</Button>}
</div>
</div>
@ -6678,7 +6687,7 @@ const Jury = (props) => {
</div>
<div className="session_caract"> <b> Cible 1</b> <br />
<div className="session_caract"> <b> Cible </b> <br />
{New_Option_Cible_Jury && New_Option_Cible_Jury.length > 0 && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
@ -6975,7 +6984,7 @@ const Jury = (props) => {
</div>}
{New_Option_Cible_Jury && New_Option_Cible_Jury.length > 0 && <div className="session_caract"> <b> Cible 2 </b> <br />
{New_Option_Cible_Jury && New_Option_Cible_Jury.length > 0 && <div className="session_caract"> <b> Cible </b> <br />
<Autocomplete
disablePortal
@ -7340,12 +7349,12 @@ const Jury = (props) => {
&nbsp;
</div>
<div className="div_row" style={{ "border": "None" }}>
{String(equipe_data_changed) === "1" && String(equipe_data_edit_mode) === "1" && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
{String(props.check_user_acces_right("jury", "write")) === "1" && String(equipe_data_changed) === "1" && String(equipe_data_edit_mode) === "1" && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
/!\ Pensez à enregistrer les modifications
</div>}
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
{String(props.check_user_acces_right("jury", "write")) === "1" && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
{String(equipe_data_edit_mode) === "1" && <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
@ -7358,10 +7367,10 @@ const Jury = (props) => {
<Button variant="contained" className="bton_annule" onClick={Annule_Jury_DetailFields}>Annuler
</Button>
</div>}
</div>
</div>}
{String(equipe_data_edit_mode) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
{String(props.check_user_acces_right("jury", "write")) === "1" && String(equipe_data_edit_mode) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
<Button variant="contained" className="bton_edit" onClick={Enable_Jury_DetailFields}>Editer
</Button>
@ -8035,7 +8044,7 @@ const Jury = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -8098,7 +8107,7 @@ const Jury = (props) => {
<div className="div_row session_data">
<div className="div_row" style={{ "padding": "5px", 'paddingTop': '15px' }}>
<div style={{ "fontSize": "12px" }}>
{String(props.check_user_acces_right("jury", "write")) === "1" && <div style={{ "fontSize": "12px" }}>
<label htmlFor="upload-photo">
<input
style={{ display: "none" }}
@ -8119,7 +8128,7 @@ const Jury = (props) => {
</Fab>
</label>
</div>
</div>}
{file_1_name && file_1_name.name &&
<nav style={{ "fontSize": "12px" }}>
<div className="session_caract">Nom du fichier <br />
@ -8178,7 +8187,7 @@ const Jury = (props) => {
name={(JSON.parse(val).file_name)}
id={(JSON.parse(val).file_name)} onClick={Download_one_attached_document}> Télécharger &nbsp;</font></nav>
<Popup
{String(props.check_user_acces_right("jury", "write")) === "1" && <Popup
trigger={
<nav style={{ "color": "red", "cursor": "pointer" }} > Supprimer</nav>
@ -8214,7 +8223,7 @@ const Jury = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -8226,7 +8235,7 @@ const Jury = (props) => {
</div>
</div>
)}
</Popup>
</Popup>}
</div>
))}
@ -8253,7 +8262,6 @@ const Jury = (props) => {
{
String(submenu) === "planning" && <div className="div_row ">
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Soutenances</nav>
<div style={{ "textAlign": "right", "float": "right", "width": "98%", "marginRight": "15px", paddingRight: '20px' }}>
Affichage : <nav className="mode_affichage" onClick={func_display_planning_view}> <FcPlanner /> planning </nav>
@ -8262,34 +8270,39 @@ const Jury = (props) => {
{String(display_view) === "planning" && <div style={{ "width": "98%", "marginLeft": "5px" }}>
&nbsp;
<div className="session_data">
<div style={{ "border": "None" }}>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px" }}> Planning de soutenances </nav>
<FullCalendar
locales={allLocales}
locale={'fr'}
editable
selectable
contentHeight='auto'
//events={events}
events={mysy_events}
<FullCalendar
locales={allLocales}
locale={'fr'}
editable
selectable
contentHeight='auto'
//events={events}
events={mysy_events}
select={handleSelect_V2}
headerToolbar={{
start: "today prev next",
center: "title",
end: "dayGridMonth,timeGridWeek,timeGridDay",
}}
//eventContent={(info) => <EventItem info={info} />}
//plugins={[timeGridPlugin]}
plugins={[timeGridPlugin, daygridPlugin, interactionPlugin,]}
views={["dayGridMonth", "dayGridWeek", "dayGridDay"]}
slotMinTime={Partner_Debut_Journee}
slotMaxTime={Partner_Fin_Journee}
scrollTime='08:00'
displayEventEnd={true}
eventContent={renderEventContent}
eventClick={handleEventClick}
eventColor='#378006'
/>
select={handleSelect_V2}
headerToolbar={{
start: "today prev next",
center: "title",
end: "dayGridMonth,timeGridWeek,timeGridDay",
}}
//eventContent={(info) => <EventItem info={info} />}
//plugins={[timeGridPlugin]}
plugins={[timeGridPlugin, daygridPlugin, interactionPlugin,]}
views={["dayGridMonth", "dayGridWeek", "dayGridDay"]}
slotMinTime={Partner_Debut_Journee}
slotMaxTime={Partner_Fin_Journee}
scrollTime='08:00'
displayEventEnd={true}
eventContent={renderEventContent}
eventClick={handleEventClick}
eventColor='#378006'
/>
</div>
</div>
</div>}
{String(display_view) === "list" && <div style={{ "width": "98%", "marginLeft": "5px" }}>
@ -8298,7 +8311,7 @@ const Jury = (props) => {
<div className="div_row">
<div className="session_data">
<div style={{ "border": "None" }}>
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "5px", "paddingLeft": "5px" }}> Soutenances </nav>
<div style={{ height: 550, width: '100%', paddingRight: '1px' }}>
&nbsp;
<Box
@ -8376,23 +8389,25 @@ const Jury = (props) => {
className="datagridclass"
onRowDoubleClick={(newSelectionModel) => {
setselected_agenda_id(newSelectionModel.row._id);
setselected_jury_soutenance_id(newSelectionModel.row.jury_soutenance_id);
setp_detail_linked_collection_recid(newSelectionModel.row.jury_session_id);
setsubmenu_detail_seance("display_jury_seance");
GetCurrentSession(newSelectionModel.row.jury_session_id);
if (String(props.check_user_acces_right("jury", "write")) === "1") {
setselected_agenda_id(newSelectionModel.row._id);
setselected_jury_soutenance_id(newSelectionModel.row.jury_soutenance_id);
setp_detail_linked_collection_recid(newSelectionModel.row.jury_session_id);
setsubmenu_detail_seance("display_jury_seance");
GetCurrentSession(newSelectionModel.row.jury_session_id);
if (String(selected_jury_cible) === "soutenance") {
Get_Jury_List_Apprenant_Soutenance(newSelectionModel.row._id, newSelectionModel.row.jury_soutenance_id);
}
if (String(selected_jury_cible) === "soutenance") {
Get_Jury_List_Apprenant_Soutenance(newSelectionModel.row._id, newSelectionModel.row.jury_soutenance_id);
}
if (document.getElementById('myRef_note_classemment')) {
var divh = document.getElementById('myRef_note_classemment').offsetTop;
if (document.getElementById('myRef_note_classemment')) {
var divh = document.getElementById('myRef_note_classemment').offsetTop;
window.scrollTo({
top: divh,
behavior: "smooth",
});
window.scrollTo({
top: divh,
behavior: "smooth",
});
}
}
}}
@ -8557,10 +8572,11 @@ const Jury = (props) => {
</div>
</div>
<div className="div_row" style={{ "border": "None" }}>
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
<Button variant="outlined"
{String(props.check_user_acces_right("jury", "write")) === "1" && <Button variant="outlined"
onClick={(event) => {
GetListeInscrit();
setGet_Jury_List_Apprenant_Seance_insc_result([]);
@ -8586,7 +8602,7 @@ const Jury = (props) => {
className="detail_class_submenu bton_add_session"
id='menu_import_participant' name='menu_import_participant'>Ajout 1 Soutenance &nbsp;
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
</Button>
</Button>}
</div>
</div>
@ -8779,7 +8795,7 @@ const Jury = (props) => {
<div className="div_row" style={{ "border": "None" }}>
&nbsp;
</div>
{String(soutenance_data_edit_mode) === "1" && <div className="div_row" style={{ "border": "None" }}>
{String(props.check_user_acces_right("jury", "write")) === "1" && String(soutenance_data_edit_mode) === "1" && <div className="div_row" style={{ "border": "None" }}>
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
@ -8803,8 +8819,8 @@ const Jury = (props) => {
{String(soutenance_data_edit_mode) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
<Button variant="contained" className="bton_edit" onClick={Enable_Jury_Soutenance_DetailFields}>Editer
</Button>
{String(props.check_user_acces_right("jury", "write")) === "1" && <Button variant="contained" className="bton_edit" onClick={Enable_Jury_Soutenance_DetailFields}>Editer
</Button>}
</div>}

View File

@ -15,6 +15,8 @@ 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 fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -29,8 +31,8 @@ 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 { IoAddCircleOutline } from "react-icons/io5";
import ToggleSwitch from "./ToggleSwitch";
import ToggleSwitch_v2_mysy from "./ToggleSwitch_v2_mysy";
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
@ -86,7 +88,7 @@ const Materiel_Salle = (props) => {
const [submenu, setsubmenu] = useState("");
const [rowss, setRows] = useState([]);
const [selectionModel, setSelectionModel] = React.useState([]);
registerLocale('fr', fr);
const classes = useStyles();
const [rows_affectations, setrows_affectations] = useState([]);
const [selectionModel_affectations, setSelectionModel_affectations] = React.useState([]);
@ -143,57 +145,58 @@ const Materiel_Salle = (props) => {
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
return (
<>
{String(props.check_user_acces_right("materiel", "write")) === "1" && <Popup
trigger={<Button
<Popup
trigger={<Button
onClick={(event) => {
// handleClick_delete(event, cellValues);
}}
>
<CiTrash />
onClick={(event) => {
// handleClick_delete(event, cellValues);
}}
</Button>}
modal
nested
position="center center"
>
<CiTrash />
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, la salle sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete(event, cellValues);
//console.log('modal closed ');
close();
}}> Valider </button>
En confirmant cette opération, la salle sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete(event, cellValues);
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
</div>
)}
</Popup>
)}
</Popup>}
</>
);
@ -217,56 +220,58 @@ const Materiel_Salle = (props) => {
renderCell: (cellValues) => {
return (
<Popup
trigger={<Button
<>
{String(props.check_user_acces_right("materiel", "write")) === "1" && <Popup
trigger={<Button
onClick={(event) => {
//handleClick_delete(event, cellValues);
}}
onClick={(event) => {
//handleClick_delete(event, cellValues);
}}
>
<CiTrash />
</Button>}
modal
nested
position="center center"
>
<CiTrash />
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, la fonction sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete_affection(event, cellValues);
//console.log('modal closed ');
close();
}}> Valider </button>
En confirmant cette opération, la fonction sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete_affection(event, cellValues);
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
</div>
)}
</Popup>
)}
</Popup>}
</>
);
@ -287,67 +292,6 @@ const Materiel_Salle = (props) => {
{ field: 'related_target_collection_id_nom', headerName: 'Cible Nom', flex: 1, hide: false, },
{ field: 'target_related_collection', headerName: 'Type', hide: true },
{ field: 'target_related_collection_id', headerName: 'Type ID', hide: true },
{/*
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
return (
<Popup
trigger={<Button
onClick={(event) => {
//handleClick_delete(event, cellValues);
}}
>
<CiTrash />
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, la fonction sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete_affection(event, cellValues);
//console.log('modal closed ');
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
)}
</Popup>
);
}
*/}
]
@ -371,7 +315,7 @@ const Materiel_Salle = (props) => {
const [Partner_Debut_Journee, setPartner_Debut_Journee] = useState("7:00");
const [Partner_Fin_Journee, setPartner_Fin_Journee] = useState("20:00");
const [New_Getall_Partner_Site_Formation_result, setNew_Getall_Partner_Site_Formation_result] = useState([]);
const [Getall_Partner_Site_Formation_api, setGetall_Partner_Site_Formation_api] = useState();
@ -723,7 +667,7 @@ const Materiel_Salle = (props) => {
let file_type = event.target.files[0].type;
//console.log("file_size = ",file_size," file_type = ",file_type);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("Le fichier ne doit pas dépasser un 1 Méga octets");
return;
}
@ -760,14 +704,20 @@ const Materiel_Salle = (props) => {
setliste_sessions_file_change_api("true");
Getall_Training_Materiel_Salle();
alert(" Le materiel ont été correctement importé");
// alert(" Le materiel ont été correctement importé");
setdisplay_alert_mysy("1");
setalert_message(" Le materiel ont été correctement importé");
setalert_type("success");
}
else {
setliste_sessions_file_change_message(result['message']);
setliste_sessions_file_change_api("false");
alert('Erreur: ' + result['message']);
// alert('Erreur: ' + result['message']);
setdisplay_alert_mysy("1");
setalert_message(result['message']);
setalert_type("error");
}
@ -1628,8 +1578,8 @@ const Materiel_Salle = (props) => {
).then((response) => response.json())
.then((result) => {
console.log(' removeRecodedClassImage : status:', result['status']);
console.log('removeRecodedClassImage : Success:', result['message']);
// console.log(' removeRecodedClassImage : status:', result['status']);
// console.log('removeRecodedClassImage : Success:', result['message']);
if (String(result['status']) === String("true")) {
@ -1673,7 +1623,7 @@ const Materiel_Salle = (props) => {
//alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a);
if (file_size > 1000000) {
if (file_size > 10000000) {
alert("L'image ne doit pas dépasser un 1 Méga octets");
return;
}
@ -1782,12 +1732,15 @@ const Materiel_Salle = (props) => {
)
.then((response) => response.json())
.then((result) => {
console.log('Success:', result['message'], "result['status'] = ", result['status']);
// console.log('Success:', result['message'], "result['status'] = ", result['status']);
if (String(result['status']) === String("true")) {
setrecord_materiel_Image_api("true");
setuserimgclassprofilchanged("");
alert(" L'image a été enregistrée ");
//alert(" L'image a été enregistrée ");
setdisplay_alert_mysy("1");
setalert_message(" L'image a été enregistrée ");
setalert_type("success");
} else if (String(result['status']) === String("Err_Connexion")) {
alert('Erreur: ' + result['message']);
@ -1795,6 +1748,9 @@ const Materiel_Salle = (props) => {
} else {
setrecord_materiel_Image_api("false");
alert(result['message']);
// setdisplay_alert_mysy("1");
setalert_message(result['message']);
setalert_type("error");
}
})
@ -2734,16 +2690,18 @@ const Materiel_Salle = (props) => {
// Pas d'acces en ecriture.
return;
}
setp_detail_title("Nouvelle")
setp_detail_start(info.start)
setp_detail_end(info.end)
setp_detail_comment("");
setp_detail_sequence_session_id("");
setp_detail_event_id("");
if (String(props.check_user_acces_right("materiel", "write")) === "1") {
setp_detail_title("Nouvelle")
setp_detail_start(info.start)
setp_detail_end(info.end)
setp_detail_comment("");
setp_detail_sequence_session_id("");
setp_detail_event_id("");
setStartDate(info.start);
setendDate(info.end);
setDialog_1_open(true);
setStartDate(info.start);
setendDate(info.end);
setDialog_1_open(true);
}
};
const [Get_List_Agenda_Events_For_Given_User_api, setGet_List_Agenda_Events_For_Given_User_api] = useState();
@ -2946,47 +2904,48 @@ const Materiel_Salle = (props) => {
const handleEventClick = (arg) => {
if (String(props.check_user_acces_right("materiel", "write")) === "1") {
setp_detail_title(arg.event.title)
setp_detail_start(arg.event.start)
setp_detail_end(arg.event.end)
setp_detail_event_id(arg.event.id);
setp_detail_title(arg.event.title)
setp_detail_start(arg.event.start)
setp_detail_end(arg.event.end)
setp_detail_event_id(arg.event.id);
if (arg.event.extendedProps.comment) {
setp_detail_comment(arg.event.extendedProps.comment);
if (arg.event.extendedProps.comment) {
setp_detail_comment(arg.event.extendedProps.comment);
}
else
setp_detail_comment("");
}
else
setp_detail_comment("");
if (arg.event.extendedProps.sequence_session_id) {
setp_detail_sequence_session_id(arg.event.extendedProps.sequence_session_id);
if (arg.event.extendedProps.sequence_session_id) {
setp_detail_sequence_session_id(arg.event.extendedProps.sequence_session_id);
}
else
setp_detail_sequence_session_id("");
}
else
setp_detail_sequence_session_id("");
if (arg.event.extendedProps.justified) {
if (String(arg.event.extendedProps.justified) === "true")
setp_detail_justified(true);
if (arg.event.extendedProps.justified) {
if (String(arg.event.extendedProps.justified) === "true")
setp_detail_justified(true);
else
setp_detail_justified(false);
}
else
setp_detail_justified(false);
if (arg.event.extendedProps.type) {
setp_detail_event_type(arg.event.extendedProps.type);
}
else
setp_detail_event_type("");
setStartDate(arg.event.start);
setendDate(arg.event.end);
setDialog_1_open(true);
}
else
setp_detail_justified(false);
if (arg.event.extendedProps.type) {
setp_detail_event_type(arg.event.extendedProps.type);
}
else
setp_detail_event_type("");
setStartDate(arg.event.start);
setendDate(arg.event.end);
setDialog_1_open(true);
}
const [Delete_One_Agenda_Event_api, setDelete_One_Agenda_Event_api] = useState();
@ -3080,7 +3039,7 @@ const Materiel_Salle = (props) => {
}
if (document.getElementById(current_menu)) {
document.getElementById(current_menu).style.backgroundColor = "#104277";
document.getElementById(current_menu).style.backgroundColor = "#107758";
document.getElementById(current_menu).style.color = "white";
document.getElementById(current_menu).style.fontWeight = "bold";
}
@ -3136,7 +3095,7 @@ const Materiel_Salle = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent>
<DialogContentText>
{Dialog_1_message}
@ -3180,7 +3139,7 @@ const Materiel_Salle = (props) => {
aria-labelledby="draggable-dialog-title"
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_1_message}
@ -3274,7 +3233,7 @@ const Materiel_Salle = (props) => {
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -3300,7 +3259,7 @@ const Materiel_Salle = (props) => {
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -3345,7 +3304,7 @@ const Materiel_Salle = (props) => {
<DialogActions>
<IconButton
autoFocus
// autoFocus
onClick={Close_Dialog_Detail_Event_open}
color="primary"
className={classes.customizedButton}
@ -3388,7 +3347,7 @@ const Materiel_Salle = (props) => {
</Dialog>
{/*** FIn Dialog detail eventement */}
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Salles </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Les salles </h3>
<div className="div_row">
<div className="titre1"> Utilisez les filtres !</div>
<div className="div_row" style={{ "marginBottom": "5px" }}>
@ -3771,11 +3730,11 @@ const Materiel_Salle = (props) => {
*/}
<Button variant="outlined" onClick={submenu_add_one_materiel}
{String(props.check_user_acces_right("materiel", "write")) === "1" && <Button variant="outlined" onClick={submenu_add_one_materiel}
className="detail_class_submenu bton_add_session"
id='menu_import_participant' name='menu_import_participant'>Ajout 1 Salle &nbsp;
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
</Button>
</Button>}
<br />
{session_file_name && <nav><i>{session_file_name}</i></nav>}
@ -3816,7 +3775,7 @@ const Materiel_Salle = (props) => {
</div>
<div className="div_row_droite_image">
<input type="file" id="files_img_class" accept="image/*" onChange={imglogoclasschangeHandler} style={{ opacity: "0", zIndex: "-1", maxWidth: "5px", maxHeight: "0px" }} /><br />
{<nav>
{String(props.check_user_acces_right("materiel", "write")) === "1" && <nav>
<label for="files_img_class" className="bton_image_class">Charger une photo</label><br />
@ -3870,9 +3829,10 @@ const Materiel_Salle = (props) => {
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_ref_interne}
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
onChange={(e) => {
setp_detail_ref_interne(e.target.value);
setmateriel_data_changed("1");
@ -3892,7 +3852,7 @@ const Materiel_Salle = (props) => {
InputLabelProps={{
shrink: true,
}}
disabled={false}
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
className="disabled_style"
value={p_detail_nom}
onChange={(e) => {
@ -3914,7 +3874,7 @@ const Materiel_Salle = (props) => {
InputLabelProps={{
shrink: true,
}}
disabled={false}
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
className="disabled_style"
value={p_detail_description}
onChange={(e) => {
@ -3943,7 +3903,7 @@ const Materiel_Salle = (props) => {
className="disabled_style"
options={New_Getall_Partner_Site_Formation_result}
value={New_Getall_Partner_Site_Formation_result.filter((data) => (data)._id === String(p_detail_site_formation))[0].label}
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
onChange={(event, value) => {
if (value && value._id) {
setp_detail_site_formation(value._id);
@ -3968,11 +3928,11 @@ const Materiel_Salle = (props) => {
required
name="detail_site_formation"
id="detail_site_formation"
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={New_Getall_Partner_Site_Formation_result.filter((data) => (data)._id === String(p_detail_site_formation))[0].label}
/>
@ -3989,11 +3949,11 @@ const Materiel_Salle = (props) => {
required
name="detail_prix_achat"
id="detail_prix_achat"
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style disabled_style_moitier"
value={p_detail_prix_achat}
onChange={(e) => {
@ -4008,12 +3968,12 @@ const Materiel_Salle = (props) => {
required
name="detail_prix_achat_by"
id="detail_prix_achat_by"
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "1", max: "1000", step: "1" }}
disabled={false}
className="disabled_style disabled_style_moitier"
value={New_Price_by.filter((data) => (data).value === String(p_detail_prix_achat_by))[0].label}
@ -4024,7 +3984,7 @@ const Materiel_Salle = (props) => {
id="detail_prix_achat_by"
className="disabled_style disabled_style_moitier"
value={New_Price_by.filter((data) => (data).value === String(p_detail_prix_achat_by))[0].label}
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
options={New_Price_by}
onChange={(event, value) => {
if (value && value.value) {
@ -4057,7 +4017,7 @@ const Materiel_Salle = (props) => {
InputLabelProps={{
shrink: true,
}}
disabled={false}
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
className="disabled_style"
value={p_detail_complement_adresse}
onChange={(e) => {
@ -4079,7 +4039,7 @@ const Materiel_Salle = (props) => {
InputLabelProps={{
shrink: true,
}}
disabled={false}
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
className="disabled_style"
value={p_detail_capacite_ideale}
onChange={(e) => {
@ -4101,7 +4061,7 @@ const Materiel_Salle = (props) => {
InputLabelProps={{
shrink: true,
}}
disabled={false}
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
className="disabled_style"
value={p_detail_capacite_max}
onChange={(e) => {
@ -4117,13 +4077,16 @@ const Materiel_Salle = (props) => {
<div className="session_caract" >
Accès handicapé ?<br />
<nav className="disabled_style" style={{ "height": '3rem', border: "none" }}
onChange={(e) => {
setmateriel_data_changed("1");
if (p_detail_acces_handicape === true)
setp_detail_acces_handicape(false)
else {
setp_detail_acces_handicape(true);
onChange={(e) => {
if (String(props.check_user_acces_right("materiel", "write")) === "1") {
setmateriel_data_changed("1");
if (p_detail_acces_handicape === true)
setp_detail_acces_handicape(false)
else {
setp_detail_acces_handicape(true);
}
}
}}
@ -4144,7 +4107,7 @@ const Materiel_Salle = (props) => {
InputLabelProps={{
shrink: true,
}}
disabled={false}
disabled={Boolean(String(props.check_user_acces_right("materiel", "write")))}
className="disabled_style"
value={p_detail_detail}
onChange={(e) => {
@ -4179,7 +4142,7 @@ const Materiel_Salle = (props) => {
</div>
{String(materiel_data_edit_mode) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
{String(props.check_user_acces_right("materiel", "write")) === "1" && String(materiel_data_edit_mode) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
<Button variant="contained" className="bton_edit" onClick={Enable_Materiel_DetailFields}>Editer
</Button>
@ -4631,11 +4594,11 @@ const Materiel_Salle = (props) => {
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
<Button variant="outlined" onClick={add_one_affectation_block}
{String(props.check_user_acces_right("materiel", "write")) === "1" && <Button variant="outlined" onClick={add_one_affectation_block}
className="detail_class_submenu bton_add_session"
id='menu_add_participant' name='menu_add_participant'>Ajout 1 affectation &nbsp;
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
</Button>
</Button>}
<br />
@ -4842,7 +4805,7 @@ const Materiel_Salle = (props) => {
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
</div>}
@ -4878,7 +4841,7 @@ const Materiel_Salle = (props) => {
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
</div>}
@ -4938,7 +4901,7 @@ const Materiel_Salle = (props) => {
</div>}
{String(edite_affectation_form) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
{String(props.check_user_acces_right("materiel", "write")) === "1" && String(edite_affectation_form) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
<Button variant="contained" className="bton_edit" onClick={Enable_Detail_Affectation_Fields}>Editer
</Button>
@ -5097,7 +5060,7 @@ const Materiel_Salle = (props) => {
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
</div>
@ -5116,7 +5079,7 @@ const Materiel_Salle = (props) => {
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
</div>

View File

@ -18,6 +18,8 @@ import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -89,7 +91,7 @@ const Materiels = (props) => {
const classes = useStyles();
const [Partner_Debut_Journee, setPartner_Debut_Journee] = useState("7:00");
const [Partner_Fin_Journee, setPartner_Fin_Journee] = useState("20:00");
registerLocale('fr', fr);
const [rows_affectations, setrows_affectations] = useState([]);
const [selectionModel_affectations, setSelectionModel_affectations] = React.useState([]);
const [selectionModel_ressources_associes, setselectionModel_ressources_associes] = React.useState([]);
@ -126,57 +128,59 @@ const Materiels = (props) => {
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
return (
<>
{String(props.check_user_acces_right("materiel", "write")) === "1" &&
<Popup
trigger={<Button
<Popup
trigger={<Button
onClick={(event) => {
// handleClick_delete(event, cellValues);
}}
>
<CiTrash />
onClick={(event) => {
// handleClick_delete(event, cellValues);
}}
>
<CiTrash />
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, le matériel sera <i><font color="red"> définitivement supprimé</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete(event, cellValues);
//console.log('modal closed ');
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, le matériel sera <i><font color="red"> définitivement supprimé</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete(event, cellValues);
//console.log('modal closed ');
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
</div>
</div>
)}
</Popup>
)}
</Popup>}
</>
);
@ -199,57 +203,59 @@ const Materiels = (props) => {
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
return (
<>
{String(props.check_user_acces_right("materiel", "write")) === "1" &&
<Popup
trigger={<Button
<Popup
trigger={<Button
onClick={(event) => {
//handleClick_delete(event, cellValues);
}}
>
<CiTrash />
onClick={(event) => {
//handleClick_delete(event, cellValues);
}}
>
<CiTrash />
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, la fonction sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete_affection(event, cellValues);
//console.log('modal closed ');
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, la fonction sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
handleClick_delete_affection(event, cellValues);
//console.log('modal closed ');
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
</div>
</div>
)}
</Popup>
)}
</Popup>}
</>
);
@ -616,7 +622,7 @@ const Materiels = (props) => {
let file_type = event.target.files[0].type;
//console.log("file_size = ",file_size," file_type = ",file_type);
if (file_size > 1000000) {
if (file_size > 10000000) {
// alert(res.data.message);
setdisplay_alert_mysy("1");
@ -676,7 +682,7 @@ const Materiels = (props) => {
.catch((error) => {
console.error('Error:', error);
setliste_sessions_file_change_api("false");
setdisplay_alert_mysy("1");
setalert_message(" Impossible d'importer le materiel ");
setalert_type("error");
@ -702,19 +708,19 @@ const Materiels = (props) => {
if (p_one_detail_ref_interne.trim() == "") {
setdisplay_alert_mysy("1");
setalert_message(" Vous devez saisir la référence interne du materiel");
setalert_type("error");
setalert_message(" Vous devez saisir la référence interne du materiel");
setalert_type("error");
return;
}
if (p_one_detail_nom.trim() == "") {
setdisplay_alert_mysy("1");
setalert_message(" Vous devez saisir le nom du materiel");
setalert_type("error");
setalert_message(" Vous devez saisir le nom du materiel");
setalert_type("error");
return;
}
@ -823,8 +829,8 @@ const Materiels = (props) => {
console.warn('UpdateStagiaireData : Not good man :( Add_One_Materiel_Data = ' + error);
setAdd_One_Materiel_Data_api("false");
setdisplay_alert_mysy("1");
setalert_message(" Impossible d'ajouter le materiel");
setalert_type("error");
setalert_message(" Impossible d'ajouter le materiel");
setalert_type("error");
})
@ -868,10 +874,10 @@ const Materiels = (props) => {
console.warn('Not good man :( Getall_Training_Materiel_No_Salle_No_Filter = ', error);
setGetall_Training_Materiel_No_Salle_No_Filter_api("false");
setdisplay_alert_mysy("1");
setalert_message(" Impossible de recuperer la liste du materiel");
setalert_type("error");
setalert_message(" Impossible de recuperer la liste du materiel");
setalert_type("error");
//setmyApimyApiMessage("")
})
}
@ -1264,7 +1270,7 @@ const Materiels = (props) => {
Getall_Materiel_Affectation(materiel_id);
Getall_Materiel_Rattachement(materiel_id);
if (document.getElementById('myRef')) {
var divh = document.getElementById('myRef').offsetTop;
window.scrollTo({
@ -1443,7 +1449,7 @@ const Materiels = (props) => {
//alert("file_size = "+file_size+" file_type = "+file_type+" a = "+a);
if (file_size > 1000000) {
if (file_size > 10000000) {
// alert("L'image ne doit pas dépasser un 1 Méga octets");
// alert(res.data.message);
setdisplay_alert_mysy("1");
@ -2843,7 +2849,7 @@ const Materiels = (props) => {
}
if (document.getElementById(current_menu)) {
document.getElementById(current_menu).style.backgroundColor = "#104277";
document.getElementById(current_menu).style.backgroundColor = "#107758";
document.getElementById(current_menu).style.color = "white";
document.getElementById(current_menu).style.fontWeight = "bold";
}
@ -2897,7 +2903,7 @@ const Materiels = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent>
<DialogContentText>
{Dialog_1_message}
@ -2941,7 +2947,7 @@ const Materiels = (props) => {
aria-labelledby="draggable-dialog-title"
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_1_message}
@ -3035,7 +3041,7 @@ const Materiels = (props) => {
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -3061,7 +3067,7 @@ const Materiels = (props) => {
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -3106,7 +3112,7 @@ const Materiels = (props) => {
<DialogActions>
<IconButton
autoFocus
// autoFocus
onClick={Close_Dialog_Detail_Event_open}
color="primary"
className={classes.customizedButton}
@ -3564,11 +3570,11 @@ const Materiels = (props) => {
*/}
<Button variant="outlined" onClick={submenu_add_one_materiel}
{String(props.check_user_acces_right("materiel", "write")) === "1" && <Button variant="outlined" onClick={submenu_add_one_materiel}
className="detail_class_submenu bton_add_session"
id='menu_import_participant' name='menu_import_participant'>Ajout 1 Materiel &nbsp;
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
</Button>
</Button>}
<br />
{session_file_name && <nav><i>{session_file_name}</i></nav>}
@ -3618,7 +3624,7 @@ const Materiels = (props) => {
</div>
<div className="div_row_droite_image">
<input type="file" id="files_img_class" accept="image/*" onChange={imglogoclasschangeHandler} style={{ opacity: "0", zIndex: "-1", maxWidth: "5px", maxHeight: "0px" }} /><br />
{<nav>
{String(props.check_user_acces_right("materiel", "write")) === "1" && <nav>
<label for="files_img_class" className="bton_image_class">Charger une photo</label><br />
@ -3985,7 +3991,7 @@ const Materiels = (props) => {
</div>
{String(materiel_data_edit_mode) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
{String(props.check_user_acces_right("materiel", "write")) === "1" && String(materiel_data_edit_mode) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
<Button variant="contained" className="bton_edit" onClick={Enable_Materiel_DetailFields}>Editer
</Button>
@ -4427,11 +4433,11 @@ const Materiels = (props) => {
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
<Button variant="outlined" onClick={add_one_affectation_block}
{String(props.check_user_acces_right("materiel", "write")) === "1" && <Button variant="outlined" onClick={add_one_affectation_block}
className="detail_class_submenu bton_add_session"
id='menu_add_participant' name='menu_add_participant'>Ajout 1 affectation &nbsp;
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
</Button>
</Button>}
<br />
@ -4638,7 +4644,7 @@ const Materiels = (props) => {
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
</div>}
@ -4674,7 +4680,7 @@ const Materiels = (props) => {
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
</div>}
@ -4734,7 +4740,7 @@ const Materiels = (props) => {
</div>}
{String(edite_affectation_form) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
{String(props.check_user_acces_right("materiel", "write")) === "1" && String(edite_affectation_form) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
<Button variant="contained" className="bton_edit" onClick={Enable_Detail_Affectation_Fields}>Editer
</Button>
@ -4893,7 +4899,7 @@ const Materiels = (props) => {
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
</div>
@ -4912,7 +4918,7 @@ const Materiels = (props) => {
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
locale={'fr'}
/>
</div>

View File

@ -1,4 +1,4 @@
import React, { useRef, useState, useEffect } from "react";
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
@ -11,6 +11,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, FcPlanner } from "react-icons/fc";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
@ -18,7 +20,7 @@ import moment from "moment";
import Box from '@mui/material/Box';
import { CiBoxList } from "react-icons/ci";
import { CiBoxList } from "react-icons/ci";
import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
@ -34,13 +36,13 @@ import timeGridPlugin from "@fullcalendar/timegrid";
import allLocales from '@fullcalendar/core/locales-all'
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import ToggleSwitch from "./ToggleSwitch";
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
const Module_Absence = (props) => {
const myconntected_employee_id = props.conntected_employee_id;
registerLocale('fr', fr);
const attendee_email = props.attendee_email;
const [selected_employee_id, setselected_employee_id] = useState(props.conntected_employee_id);
@ -82,8 +84,6 @@ const Module_Absence = (props) => {
{ field: 'event_comment', headerName: 'Comment', flex: 1, hide: true, editable: false, },
]
@ -420,7 +420,10 @@ const Module_Absence = (props) => {
else {
setGetAttendee_api("false");
setGetAttendee_message(res.data.message);
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
@ -437,7 +440,11 @@ const Module_Absence = (props) => {
const handleSelect = (info) => {
if (String(selected_attendee_email).length < 2) {
alert(" Vous devez choisir un stagiaire");
// alert(" Vous devez choisir un stagiaire");
setdisplay_alert_mysy("1");
setalert_message(" Vous devez choisir un stagiaire");
setalert_type("error");
return;
}
@ -477,7 +484,11 @@ const Module_Absence = (props) => {
const handleSelect_list = (info) => {
if (String(selected_attendee_email).length < 2) {
alert(" Vous devez choisir un stagiaire");
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(" Vous devez choisir un stagiaire");
setalert_type("error");
return;
}
@ -512,48 +523,52 @@ const Module_Absence = (props) => {
const handleEventClick = (arg) => {
if (String(selected_attendee_email).length < 2) {
alert(" Vous devez choisir un stagiaire");
return;
}
if (String(props.check_user_acces_right("stagiaire", "write")) === "1") {
if (String(selected_attendee_email).length < 2) {
setdisplay_alert_mysy("1");
setalert_message(" Vous devez choisir un stagiaire");
setalert_type("error");
return;
}
setp_detail_title(arg.event.title)
setp_detail_start(arg.event.start)
setp_detail_end(arg.event.end)
setp_detail_event_id(arg.event.id);
setp_detail_title(arg.event.title)
setp_detail_start(arg.event.start)
setp_detail_end(arg.event.end)
setp_detail_event_id(arg.event.id);
if (arg.event.extendedProps.comment) {
setp_detail_comment(arg.event.extendedProps.comment);
}
else
setp_detail_comment("");
if (arg.event.extendedProps.comment) {
setp_detail_comment(arg.event.extendedProps.comment);
}
else
setp_detail_comment("");
if (arg.event.extendedProps.justified) {
if (String(arg.event.extendedProps.justified) === "true")
setp_detail_justified(true);
if (arg.event.extendedProps.justified) {
if (String(arg.event.extendedProps.justified) === "true")
setp_detail_justified(true);
else
setp_detail_justified(false);
}
else
setp_detail_justified(false);
if (arg.event.extendedProps.type) {
setp_detail_event_type(arg.event.extendedProps.type);
}
else
setp_detail_event_type("");
setStartDate(arg.event.start);
setendDate(arg.event.end);
setDialog_1_open(true);
}
else
setp_detail_justified(false);
if (arg.event.extendedProps.type) {
setp_detail_event_type(arg.event.extendedProps.type);
}
else
setp_detail_event_type("");
setStartDate(arg.event.start);
setendDate(arg.event.end);
setDialog_1_open(true);
}
@ -566,7 +581,11 @@ const Module_Absence = (props) => {
if (String(selected_attendee_email).length < 2) {
alert(" Vous devez choisir un stagiaire");
// alert(" Vous devez choisir un stagiaire");
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(" Vous devez choisir un stagiaire");
setalert_type("error");
return;
}
@ -603,7 +622,7 @@ const Module_Absence = (props) => {
else
setp_detail_event_type("");
console.log(" (line.event_start =", line.event_start);
// console.log(" (line.event_start =", line.event_start);
@ -723,12 +742,18 @@ const Module_Absence = (props) => {
var local_related_collection = p_filtre1;
if (String(selected_attendee_email).length < 2) {
alert(" Vous devez un stagiaire");
// alert(" Vous devez un stagiaire");
setdisplay_alert_mysy("1");
setalert_message(" Vous devez choisir un stagiaire");
setalert_type("error");
return;
}
if (moment(endDate) <= moment(startDate)) {
alert(" Les dates de début et de fin sont incohérentes");
//alert(" Les dates de début et de fin sont incohérentes");
setdisplay_alert_mysy("1");
setalert_message(" Les dates de début et de fin sont incohérentes");
setalert_type("error");
return;
}
var new_title = p_detail_title;
@ -785,14 +810,20 @@ const Module_Absence = (props) => {
setp_detail_event_type();
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("success");
Close_Dialog_Detail_Event_open();
}
else {
setUpdate_One_Agenda_Event_api("false");
setUpdate_One_Agenda_Event_message(res.data.message);
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
@ -850,14 +881,20 @@ const Module_Absence = (props) => {
setp_detail_event_type();
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("success");
Close_Dialog_Detail_Event_open();
}
else {
setDelete_One_Agenda_Event_api("false");
setDelete_One_Agenda_Event_message(res.data.message);
alert(res.data.message);
//alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
@ -888,7 +925,22 @@ const Module_Absence = (props) => {
setdisplay_view("list");
}
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
const [alert_message, setalert_message] = useState("");
const [alert_type, setalert_type] = useState("");
function clear_alert_message() {
setalert_message("");
}
function clear_alert_type() {
setalert_type("");
}
function clear_display_alert_mysy() {
setdisplay_alert_mysy("");
}
return (
<div className="module_agenda">
@ -896,6 +948,17 @@ const Module_Absence = (props) => {
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
</div>}
{/*** Affichage des messages d'alerte*/}
{display_alert_mysy && String(display_alert_mysy) === "1" &&
<Module_Alert_Confirmation alert_message={alert_message}
alert_type={alert_type}
clear_alert_message={clear_alert_message}
clear_alert_type={clear_alert_type}
clear_display_alert_mysy={clear_display_alert_mysy}
/>
}
{/*** FIN Affichage des messages d'alerte*/}
<Dialog
open={Dialog_1_open}
onClose={Dialog_1_handleClose}
@ -904,7 +967,7 @@ const Module_Absence = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_1_message}
@ -998,7 +1061,7 @@ const Module_Absence = (props) => {
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -1024,7 +1087,7 @@ const Module_Absence = (props) => {
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -1100,14 +1163,14 @@ const Module_Absence = (props) => {
</Dialog>
<h3 style={{ fontFamily:'DM Sans' }}> Planning </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Planning </h3>
<div style={{ "textAlign": "right", "float": "right", "width": "100%" }}>
Affichage : <nav className="mode_affichage" onClick={func_display_planning_view}> <FcPlanner /> planning </nav>
<nav className="mode_affichage" onClick={func_display_list_view}> <CiBoxList /> Liste </nav>
</div>
{String(display_view) === "planning" && <div style={{ "width": "98%", "marginLeft": "5px" }}>
&nbsp;

View File

@ -21,6 +21,8 @@ import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcSearch } from "react-icons/fc";
import { FcAlarmClock, FcMultipleSmartphones, FcWorkflow } from "react-icons/fc";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -76,7 +78,7 @@ import listPlugin from '@fullcalendar/list';
import multiMonthPlugin from '@fullcalendar/multimonth'
const Module_Activite = (props) => {
registerLocale('fr', fr);
const history = useHistory();
const [submenu, setsubmenu] = useState("");
const [rowss, setRows] = useState([]);

View File

@ -9,6 +9,8 @@ import { useHistory } from "react-router-dom";
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import 'reactjs-popup/dist/index.css';
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -96,7 +98,7 @@ const useStyles = makeStyles((theme) => ({
}));
const Module_Agenda = (props) => {
registerLocale('fr', fr);
const myconntected_employee_id = props.conntected_employee_id;
const classes = useStyles();
const [selected_employee_id, setselected_employee_id] = useState(props.conntected_employee_id);
@ -695,6 +697,8 @@ const Module_Agenda = (props) => {
const handleEventClick = (arg) => {
if (String(selected_employee_id).length < 2) {
// alert(" Vous devez choisir un employé ou un materiel");
// alert(res.data.message);
@ -1174,10 +1178,52 @@ const Module_Agenda = (props) => {
function show_other_agenda() {
settab_selected_users([]);
New_Option_Type_Ressource = []
if (String(props.check_user_acces_right("agenda_employes", "read")) !== "1" && String(props.check_user_acces_right("agenda_materiel_salle", "read")) !== "1") {
setdisplay_alert_mysy("1");
setalert_message(" Vos droits ne sont pas suffisants pour accéder à cette fonctionnalité ");
setalert_type("warning");
return;
}
if (String(props.check_user_acces_right("agenda_employes", "read")) === "1" && String(props.check_user_acces_right("agenda_materiel_salle", "read")) === "1") {
New_Option_Type_Ressource = [
{ "id": "0", "label": "Employe", "value": "ressource_humaine" },
{ "id": "1", "label": "Materiel & Salle", "value": "ressource_materielle" },
]
setp_filtre1("ressource_humaine");
setp_filtre1_label("Employe");
setp_filtre1_value("ressource_humaine")
} else if (String(props.check_user_acces_right("agenda_employes", "read")) === "1") {
New_Option_Type_Ressource = [
{ "id": "0", "label": "Employe", "value": "ressource_humaine" },
]
setp_filtre1("ressource_humaine");
setp_filtre1_label("Employe");
setp_filtre1_value("ressource_humaine")
} else if (String(props.check_user_acces_right("agenda_materiel_salle", "read")) === "1") {
New_Option_Type_Ressource = [
{ "id": "0", "label": "Materiel & Salle", "value": "ressource_materielle" },
]
setp_filtre1("ressource_materielle");
setp_filtre1_label("Materiel & Salle");
setp_filtre1_value("ressource_materielle")
}
setdisplay_other_agenda("1");
}
function show_my_agenda() {
settab_selected_users([]);
setp_filtre1("ressource_humaine");
setagenda_owner_name("Mon Planning");
setselected_employee_id(myconntected_employee_id);
@ -1192,12 +1238,26 @@ const Module_Agenda = (props) => {
{ "id": "2", "label": "Autre", "value": "autre" },
]
const New_Option_Type_Ressource = [
{ "id": "0", "label": "Employe", "value": "ressource_humaine" },
{ "id": "1", "label": "Materiel", "value": "ressource_materielle" },
var New_Option_Type_Ressource = [
]
if (String(props.check_user_acces_right("agenda_employes", "read")) === "1" && String(props.check_user_acces_right("agenda_materiel_salle", "read")) === "1") {
New_Option_Type_Ressource = [
{ "id": "0", "label": "Employe", "value": "ressource_humaine" },
{ "id": "1", "label": "Materiel & Salle", "value": "ressource_materielle" },
]
} else if (String(props.check_user_acces_right("agenda_employes", "read")) === "1") {
New_Option_Type_Ressource = [
{ "id": "0", "label": "Employe", "value": "ressource_humaine" },
]
} else if (String(props.check_user_acces_right("agenda_materiel_salle", "read")) === "1") {
New_Option_Type_Ressource = [
{ "id": "0", "label": "Materiel & Salle", "value": "ressource_materielle" },
]
}
const events_test = [{
"id": 1,
"type": null,
@ -1315,7 +1375,7 @@ const Module_Agenda = (props) => {
aria-labelledby="draggable-dialog-title"
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_1_message}
@ -1409,7 +1469,7 @@ const Module_Agenda = (props) => {
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -1435,7 +1495,7 @@ const Module_Agenda = (props) => {
className="disabled_style session_caract_Dialog_DatePicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
@ -1480,7 +1540,7 @@ const Module_Agenda = (props) => {
<DialogActions>
<IconButton
autoFocus
// autoFocus
onClick={Close_Dialog_Detail_Event_open}
color="primary"
className={classes.customizedButton}
@ -1488,8 +1548,44 @@ const Module_Agenda = (props) => {
<CancelPresentationIcon />
</IconButton>
<div className="div_row">
{String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" && <div className="div_row_gauche">
{/*** Si l'agenda d'une autre personne, je dois etre autorisé à ecrire */}
{String(agenda_owner_name) !== "Mon Planning" && String(p_filtre1) === "ressource_humaine" && String(props.check_user_acces_right("agenda_employes", "write")) === "1" &&
<div className="div_row_gauche">
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog">Mettre à jour</Button>}
{(!p_detail_event_id || String(p_detail_event_id) === "") && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog">Ajouter</Button>}
</div>}
{/*** Si l'agenda d'un materiel, je dois etre autorisé à ecrire */}
{String(agenda_owner_name) !== "Mon Planning" && String(p_filtre1) === "ressource_materielle" && String(props.check_user_acces_right("agenda_materiel_salle", "write")) === "1" &&
<div className="div_row_gauche">
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog">Mettre à jour</Button>}
{(!p_detail_event_id || String(p_detail_event_id) === "") && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog">Ajouter</Button>}
</div>}
{/*** Si c'est mon agenda, j'ai tous les droit */}
{String(agenda_owner_name) === "Mon Planning" &&
<div className="div_row_gauche">
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog">Mettre à jour</Button>}
{(!p_detail_event_id || String(p_detail_event_id) === "") && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog">Ajouter</Button>}
</div>}
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Close_Dialog_Detail_Event_open} className="bton_annule_dialog" >Fermer</Button>
</div>
</div>
{/* <div className="div_row">
{String(setagenda_owner_name) !== "setagenda_owner_name" && String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" && <div className="div_row_gauche">
{p_detail_event_id && String(p_detail_event_id) !== "" && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog">Mettre à jour</Button>}
{(!p_detail_event_id || String(p_detail_event_id) === "") && <Button onClick={Update_One_Agenda_Event} className="bton_enreg_dialog">Ajouter</Button>}
@ -1499,12 +1595,15 @@ const Module_Agenda = (props) => {
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Close_Dialog_Detail_Event_open} className="bton_annule_dialog" >Fermer</Button>
</div>
</div>
</div>*/}
</DialogActions>
{String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" && p_detail_event_id && String(p_detail_event_id) !== "" &&
String(agenda_owner_name) !== "Mon Planning" && String(p_filtre1) === "ressource_humaine" && String(props.check_user_acces_right("agenda_employes", "write")) === "1" &&
<DialogActions>
<div className="div_row" style={{ "textAlign": "center" }}>
<Button onClick={(e) => {
@ -1520,6 +1619,59 @@ const Module_Agenda = (props) => {
</DialogActions>}
{String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" && p_detail_event_id && String(p_detail_event_id) !== "" &&
String(agenda_owner_name) !== "Mon Planning" && String(p_filtre1) === "ressource_materielle" && String(props.check_user_acces_right("agenda_materiel_salle", "write")) === "1" && <DialogActions>
<div className="div_row" style={{ "textAlign": "center" }}>
<Button onClick={(e) => {
const response = window.confirm("Confirmez-vous la suppression de l'événement ?");
if (!response) {
return;
}
Delete_One_Agenda_Event();
}
} className="bton_supprime_dialog">Supprimer l'événement</Button>
</div>
</DialogActions>}
{String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" && p_detail_event_id && String(p_detail_event_id) !== "" &&
String(agenda_owner_name) === "Mon Planning" && <DialogActions>
<div className="div_row" style={{ "textAlign": "center" }}>
<Button onClick={(e) => {
const response = window.confirm("Confirmez-vous la suppression de l'événement ?");
if (!response) {
return;
}
Delete_One_Agenda_Event();
}
} className="bton_supprime_dialog">Supprimer l'événement</Button>
</div>
</DialogActions>}
{/*String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" && p_detail_event_id && String(p_detail_event_id) !== "" &&
<DialogActions>
<div className="div_row" style={{ "textAlign": "center" }}>
<Button onClick={(e) => {
const response = window.confirm("Confirmez-vous la suppression de l'événement ?");
if (!response) {
return;
}
Delete_One_Agenda_Event();
}
} className="bton_supprime_dialog">Supprimer l'événement</Button>
</div>
</DialogActions>*/}
</Dialog>
{/*** FIn Dialog detail eventement */}
@ -1577,7 +1729,7 @@ const Module_Agenda = (props) => {
{p_filtre1 && String(p_filtre1) === "ressource_humaine" && <div className="div_row_droite texte_area_filter_value" >
<Autocomplete
disablePortal
@ -1592,7 +1744,7 @@ const Module_Agenda = (props) => {
onChange={(event, value) => {
// console.log(" ## settab_selected_users = ", tab_selected_users)
// console.log(" ## settab_selected_users = ", tab_selected_users)
settab_selected_users([
...fixedVal,
...value.filter((i) => fixedVal.indexOf(i) === -1),
@ -1810,7 +1962,7 @@ const Module_Agenda = (props) => {
className="timeline_datepicker"
locale='fr-FR'
locale={'fr'}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}

View File

@ -7,15 +7,15 @@ import Button from '@mui/material/Button';
import axios from "axios";
import { getCookie, setCookie } from 'react-use-cookie';
import { useHistory } from "react-router-dom";
import CheckOut from "./CheckOut";
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import fileDownload from 'js-file-download';
import Popup from 'reactjs-popup'
import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import Box from '@mui/material/Box';
import Dialog from '@mui/material/Dialog';
@ -23,7 +23,7 @@ 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 img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import Autocomplete from '@mui/material/Autocomplete';
import { gridClasses } from '@mui/x-data-grid';
@ -174,6 +174,7 @@ const Module_Attestation_Formation = (props) => {
const New_Option_attestation_Masse = [
{ "id": "resend", "label": "(R)envoyer", "value": "resend" },
{ "id": "download", "label": "Télécharger", "value": "download" },
]
const [gridline_id, setgridline_id] = useState("");
@ -357,6 +358,60 @@ const Module_Attestation_Formation = (props) => {
}
function Download_Attestation_PDF() {
const stored_cookie = getCookie('tokenmysypart');
var nom_fichier_cmd = "Attesations.zip";
var tab_attestation_formation_id = []
for (var i = 0; i < selectionModel_attestation.length; i++) {
var myid = parseInt(String(selectionModel_attestation[i]));
var line = JSON.parse(Getall_Attestation_By_Session_result[myid]);
var line_id = JSON.parse(Getall_Attestation_By_Session_result[myid])._id;
tab_attestation_formation_id.push(line_id);
}
var url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Attestation_From_Session_By_PDF/" + stored_cookie + "/" + props.related_collection_recid + "/" + tab_attestation_formation_id;
//console.log(" ### tab_my_inscription_ids = ", tab_attestation_formation_id);
//console.log(" ### url = ", url);
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_session_id = ", selected_session_id, " --- selected_convention_id =", selected_convention_id);
setLoading(true);
axios.get(url, { responseType: 'blob', },)
.then((res) => {
setLoading(false);
//console.log(" In Download_Stagiaire_Conventions_PDF res.data = " + res.data);
if (String(res.data) === String("false")) {
alert("Impossible de télécharger les attestation, (2) ");
} else {
fileDownload(res.data, nom_fichier_cmd);
setselectionModel_attestation([]);
setactionmass_attesation_val("");
Getall_Attestation_By_Session();
}
}).catch((error) => {
setLoading(false);
console.error('Error:', error);
setdisplay_alert_mysy("1");
setalert_message(" Impossible de télécharger les attestations");
setalert_type("error");
// alert(" Impossible de télécharger la convention ")
});
}
const [Send_Attestation_By_Email_For_Ids_api, setSend_Attestation_By_Email_For_Ids_api] = useState();
const [Send_Attestation_By_Email_For_Ids_message, setSend_Attestation_By_Email_For_Ids_message] = useState();
const [Send_Attestation_By_Email_For_Ids_result, setSend_Attestation_By_Email_For_Ids_result] = useState();
@ -443,6 +498,9 @@ const Module_Attestation_Formation = (props) => {
Send_Attestation_By_Email_For_Ids(tab_ids_inscription);
}
else if (String(actionmass_attesation_val) === String("download")) {
Download_Attestation_PDF();
}
}
@ -602,7 +660,7 @@ const Module_Attestation_Formation = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_1_message}
@ -656,14 +714,14 @@ const Module_Attestation_Formation = (props) => {
className="displaypartnersession"
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContentText>
{Dialog_1_message}
</DialogContentText>
<div className="session_caract_Dialog" > Type Document<br />
{ <div className="session_caract_Dialog" > Type Document<br />
<Autocomplete
disablePortal
@ -690,9 +748,9 @@ const Module_Attestation_Formation = (props) => {
</div>
</div>}
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") && <div className="session_caract_Dialog" > Choisir une attestation de formation
{<div className="session_caract_Dialog" > <b> Choisir un modèle attestation </b>
<Autocomplete
disablePortal
name="event_dialog_version_convention"
@ -703,7 +761,6 @@ const Module_Attestation_Formation = (props) => {
onChange={(event, value) => {
if (value && value._id) {
setselected_convention_id(value._id);
if (String(value._id) === "default_mail") {
@ -841,7 +898,7 @@ const Module_Attestation_Formation = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -926,7 +983,6 @@ const Module_Attestation_Formation = (props) => {
date_envoie: JSON.parse(item).date_envoie,
courrier_template_id: JSON.parse(item).courrier_template_id,
courrier_template_nom: JSON.parse(item).courrier_template_nom,
}
))}
@ -1014,7 +1070,8 @@ const Module_Attestation_Formation = (props) => {
options={New_Option_attestation_Masse}
onChange={(event, value) => {
if (value && value.value) {
if (String(value.value) === "reinit" || String(value.value) === "resend") {
if (String(value.value) === "reinit" || String(value.value) === "resend"
|| String(value.value) === "download") {
setactionmass_attesation_val(value.value);
@ -1055,9 +1112,12 @@ const Module_Attestation_Formation = (props) => {
<div className="gest_content">
{' '}
{String(actionmass_attesation_val) === "resend" &&
<font color="red"> Confirmer l'envoi de en masse de {selectionModel_attestation.length} attestation(s) de formation.
</font>}
{String(actionmass_attesation_val) === "download" &&
<font color="red"> Confirmer le téléchargement en masse de {selectionModel_attestation.length} attestation(s) de formation.
</font>}
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
@ -1069,7 +1129,7 @@ const Module_Attestation_Formation = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();

View File

@ -0,0 +1,549 @@
import React, { useState, useEffect } from "react";
import { useForm } from "react-hook-form";
import { useHistory } from "react-router-dom";
import { Button, FormGroup, Label, Input } from "reactstrap";
import { useCookies } from "react-cookie";
import { confirmAlert } from 'react-confirm-alert'; // Import
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import axios from "axios";
import { useParams } from 'react-router-dom'
import { useLocation } from "react-router-dom";
import Visibility from '@mui/icons-material/Visibility';
import VisibilityOff from '@mui/icons-material/VisibilityOff';
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import ent_studend_img from "../mysy_img/ent_studend_img.jpg";
function Module_Connexion_Ent_Student() {
const [isconnected, setisconnected] = useState("");
const [cookie_acces_right, setCookie_acces_right, removeCookie_acces_right] = useCookies(['mysy_user_access_right']);
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych'], { path: '/' });
const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart'], { path: '/' });
const [retval, setretval] = useState("0");
const [myApimyApiMessage, setmyApimyApiMessage] = useState("");
const [initpasswd, setinitpasswd] = useState();
const [result, setResult] = useState("");
const [myApiResponse, setmyApiResponse] = useState("false");
const url_login = process.env.REACT_APP_API_URL + "myclass/api/Ent_Student_login/";
const random1 = Math.floor(Math.random() * 10);
const random2 = Math.floor(Math.random() * 10);
const [closepopup, setclosepopup] = useState(0);
const { obj, objid } = useParams();
const [menucompte, setmenucompte] = useState("user");
const [currentpawdvisible, setcurrentpawdvisible] = useState(false);
const [typecompte, settypecompte] = useState("");
const {
register,
formState: { errors },
handleSubmit,
} = useForm();
const history = useHistory();
function logout_partner_confirmation() {
removeCookie_part('tokenmysypart', { path: '/' });
}
function retnull() {
setretval("-1");
}
function logout_user_confirmation() {
removeCookie_part('tokenmysych', { path: '/' });
}
function Logout_User() {
confirmAlert({
title: 'Deconnexion utilisateur ?',
message: 'Confirmez la deconnexion utilisateur',
buttons: [
{
label: 'Oui',
onClick: () => logout_user_confirmation()
},
/* {
label: 'Non',
onClick: () => retnull()
}*/
]
});
}
const onSubmit = async (data) => {
//console.log(" CONNEXION DE = ",menucompte);
var partner_connexion = "";
var url_login = "";
url_login = process.env.REACT_APP_API_URL + "myclass/api/Ent_Student_login/";
setmenucompte("user");
partner_connexion = "user";
// console.log( " ### full url_login = ", url_login)
// Gestion des Cookies
const stored_partner = cookie_part.tokenmysypart;
const stored_user = cookie.tokenmysych;
const formData = new FormData();
var mymail = document.getElementsByName("email")[0].value;
var mypwd = document.getElementsByName("pwd")[0].value;
formData.append("email", mymail);
formData.append("pwd", mypwd);
formData.append("type", "student");
var re = /\S+@\S+\.\S+/;
if (re.test(mymail) === false) {
alert("l'adresse email est incorrecte");
return;
}
if (mypwd.length <= 0) {
alert("Vous n'avez pas saisi de mot de passe");
return;
}
// si c'est une connexion user qui est active
if (typeof (stored_user) != "undefined" && String(stored_user) !== String('')) {
//alert(" c'est une connexion USERR qui est active");
Logout_User();
}
fetch(
url_login,
{
method: 'POST',
body: formData,
}
).then((response) => response.json())
.then((result) => {
//console.log('Success:', result['message'], "result['status'] = ", result['status']);
var val = result['status'];
if (String(val) === String("true")) {
setCookie("tokenmysych", result['message']);
// Verification vers quelle page les renvoyer
if (obj === "training" && String(objid).length > 0) {
// redirection vers l'affichage d'une formation
history.push("/Display-Detail-formation/" + objid);
}
else {
// Redirection par defaut vers la compte de l'apprenant - ENT
history.push({
pathname: "/mysy-student-account",
state: {
firstconnexion: String(result['firstconnexion'])
}
});
}
}
else {
setisconnected("false");
setmyApimyApiMessage(result['message']);
}
})
.catch((error) => {
console.error('Error:', error);
setisconnected("false");
setmyApimyApiMessage("Le service est momentanément indisponible, merci de ressayer plus tard. ");
});
}
const location = useLocation();
useEffect(() => {
setmenucompte("partner");
const listener = event => {
if (event.code === "Enter" || event.code === "NumpadEnter") {
event.preventDefault();
onSubmit();
}
};
document.addEventListener("keydown", listener);
if (String(menucompte) === String("user")) {
menu_user_account();
}
else {
menu_parter_account();
}
if (location && location.state && location.state.mysy_arg && String(location.state.mysy_arg) === "partner") {
menu_parter_account();
}
}, []);
function menu_parter_account() {
//alert(" menu_parter_account = "+String(menucompte));
setmenucompte("partner");
if (document.getElementsByName("partner_account") && document.getElementsByName("partner_account")[0])
document.getElementsByName("partner_account")[0].style.backgroundColor = "#81BC3A";
if (document.getElementsByName("user_account") && document.getElementsByName("user_account")[0])
document.getElementsByName("user_account")[0].style.backgroundColor = "#ffffff";
}
function menu_user_account() {
setmenucompte("user");
if (document.getElementsByName("user_account") && document.getElementsByName("user_account")[0])
document.getElementsByName("user_account")[0].style.backgroundColor = "#81BC3A";
}
function resetpasswd_ok(e) {
var total = " ?? ";
if (document.getElementsByName("sommerandom")[0].value) {
total = document.getElementsByName("sommerandom")[0].value;
}
var calcaul_total = parseInt(random1) + parseInt(random2);
if (parseInt(total) != parseInt(calcaul_total)) {
document.getElementsByName("pasrobot")[0].style.backgroundColor = "red";
alert(" Le total dans la zone 'je ne suis pas un robot' est incohérent. Recommencez svp :) !!!");
return;
}
// Controle du mail
var mymail = document.getElementsByName("resetemailvalue")[0].value;
//alert(" le mail de reset = "+mymail);
var re = /\S+@\S+\.\S+/;
if (re.test(mymail) === false) {
alert("l'adresse email est incorrecte");
return;
}
var form = new FormData();
form.append("email", mymail);
// Controle du type de compte
if (String(typecompte) !== "partner" && String(typecompte) !== "user") {
alert("Le type de compte est inconnu");
document.getElementsByName("is_user_or_pro")[0].style.backgroundColor = "orangered";
return;
}
form.append("account_type", typecompte);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/InitUserPasswd/";
//alert("myurl = "+myurl);
axios.post(myurl, form).then(res => {
setclosepopup(1);
setinitpasswd("true");
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);
setmyApiResponse("true");
setResult(res.data.message);
}
else {
//console.log(" In test res.data.status = " + res.data.status);
//console.log(" In test res.data.message = " + res.data.message);
setmyApiResponse("false");
setResult(res.data.message);
}
}).catch((error) => {
console.warn('Not good man :( mysearchtext = ');
setmyApiResponse("false");
setinitpasswd("false");
//setmyApimyApiMessage("")
})
}
function resetpasswd(e) {
confirmAlert({
title: 'Reinitialisation Mot de Passe?',
message: 'Confirmez la reinitialisation',
buttons: [
{
label: 'Oui',
onClick: () => resetpasswd_ok()
},
{
label: 'Non',
onClick: () => { return }
},
],
closeOnEscape: false,
closeOnClickOutside: false,
keyCodeForClose: [8, 32],
willUnmount: () => { },
afterClose: () => { },
onClickOutside: () => { },
onKeypress: () => { },
onKeypressEscape: () => { },
});
}
function closepopupinitpwd() {
setclosepopup("1");
}
// Cette fonction permet de cacher le mot de passer et eviter les
// autocompletion
const [realpwdvalue, setrealpwdvalue] = useState("");
const [realpwdhidenvalue, setrealpwdhidenvalue] = useState("");
function realpwd(e) {
const val = e.target.value;
const last = val.charAt(val.length - 1);
var new_val = realpwdvalue;
var new_val_hiden = realpwdhidenvalue;
//alert(" new_val avant saisie= "+new_val);
new_val = new_val + last;
new_val_hiden = new_val_hiden + "*";
//alert(" - new_val apres sisie = "+new_val+" new_val_hiden = "+new_val_hiden);
setrealpwdhidenvalue(new_val_hiden);
setrealpwdvalue(new_val);
//setrealpwdvalue(val);
//document.getElementById("cle_secrete").value = new_val_hiden;
}
/* function displayvlaue(){
alert(" la valeur secrete = "+realpwdvalue);
}*/
const handleClickShowPassword = () => {
if (currentpawdvisible == false) {
document.getElementsByName("pwd")[0].type = "text";
setcurrentpawdvisible(true);
}
else if (currentpawdvisible == true) {
document.getElementsByName("pwd")[0].type = "password";
setcurrentpawdvisible(false);
}
};
return (
<div style={{ width: "100%", float: "left" }}>
<div className="module_connexion_intranet_client">
<div className="div_mobile">
<div className="block_centrer">
<div className="display_screen_600_901">
<div style={{ width: '100%', }}>
<h3 style={{ fontFamily: 'DM Sans' }}> Bienvenue sur Espace Numérique de Travail </h3>
</div>
<div style={{ width: '100%', }}>
<div style={{ width: '50%', float: 'left' }}>
<img src={ent_studend_img} style={{width:'100%'}}/>
</div>
<div style={{ width: '50%', float: 'left', paddingTop:'2rem' }}>
<div className="div_centre_master">
<div className="div_centre_002">
<Button variant="outlined" onClick={menu_user_account} className="signin_menu"
id="user_account" name="user_account"
style={{ "float": "left", "textAlign": "center", "height": "3rem" }}> Espace numérique de travail - ENT</Button>
</div>
<div className="div_centre">
<div className="div_row_bis" >
<FormGroup>
<Label style={{ fontSize: "14px" }}>Votre adresse email</Label>
<Input type="email" placeholder="Email" name="email" />
</FormGroup>
<div style={{ height: '10px' }}> &nbsp; </div>
<FormGroup>
<div className="label_pwd_div">
<div className="label_div" >
<Label style={{ fontSize: "14px" }}>Votre mot de passe </Label>
</div>
<div className="show_pwd_div" onClick={handleClickShowPassword}>
{currentpawdvisible ? <Visibility style={{ fontSize: '15px' }} /> : <VisibilityOff style={{ fontSize: '15px' }} />}
</div>
</div>
<Input type="password" placeholder="Password" name="pwd" />
</FormGroup>
{String(initpasswd) === String("true") && closepopup === 1 && <div className="okUpdateData">
La demande reinitialisation a bien ete prise en compte.
Verifiez votre boite email.
</div>}
<div className="forgot_pass" >
{String(initpasswd) !== String("true") && String(closepopup) !== String("1")
&& <Popup trigger={<button className="avisformation"> Mot de passe oublié</button>}
position="center" className="signin popup-reset-pwd">
<div className="signin-content popup-reset-pwd-content">
<div className="div_row" style={{
"textAlign": "center", "background": "orangered",
"height": "2rem", "paddingTop": "5px", "fontSize": "14px", "fontWeight": "bold"
}}
> Modifier le mot de passe</div>
<br />
<label for="exampleFormControlTextarea1">Saisir votre email</label>
<br />
<input type="text" id="resetemailvalue" name="resetemailvalue" rows="1" cols="20"
className="zone_mail" />
<br />
<div>
<br />
<Tooltip className="tooltip_css" id="is_user_or_pro-tooltip" />
<a data-tooltip-id="is_user_or_pro-tooltip" data-tooltip-html="Compte partenaire : création et gestion de formation <br/>
compte utilisateur : non autorisé à la création et gestion de formation">
<label for="is_user_or_pro">Compte partenaire ou utilisateur * ?</label>
<br />
<select id="is_user_or_pro" name="is_user_or_pro" style={{
"width": '100%', "height": "2.5rem",
'marginTop': '5px'
}}
onChange={(event) => settypecompte(event.target.value)}>
<option selected value="">Choisir </option>
<option value="partner">Partenaire </option>
<option value="user">Utilisateur </option>
</select>
</a>
<br />
</div>
<div className="text_pwd_crit" style={{ "textAlign": "center" }}>
Je ne suis pas un robot <br />
<div >
<div name="pasrobot" > {random1} + {random2} = <input
type='text'
name='sommerandom'
id='sommerandom'
{...register('sommerandom', {
required: { value: true, message: 'sommes de valeurs' },
maxLength: {
value: 30,
}
})}
className="pasrobot_css"
placeholder='Le total est ?'
/>
{errors.sommerandom && (
<span className='koUpdateData'>la sommes est incorrect</span>
)}
</div>
</div>
</div>
<button type="submit" class="btn btn-secondary btn-sm" onClick={resetpasswd_ok}>Envoyer</button> &nbsp; &nbsp; &nbsp;
<button type="submit" class="btn btn-secondary btn-sm" onClick={closepopupinitpwd}> Annuler</button>
</div>
</Popup>
}
</div>
</div>
<FormGroup>
&nbsp;
</FormGroup>
<div className="div_row22">
<Button variant="contained" color="success" className="div_row22 btn_login button" onClick={onSubmit}>Connectez-Vous</Button>
</div>
</div>
</div>
</div>
</div>
{isconnected === "false" && <div className="erreurconnexion">
<br />
{myApimyApiMessage}</div>
}
</div>
</div>
</div>
</div>
{/* <div style={{ height: "5rem", width: "100%" }}>
<Fotter_v3 />
</div>*/}
</div>
);
}
export default Module_Connexion_Ent_Student;

View File

@ -2,9 +2,6 @@ import React, { useState, useEffect } from "react";
import { useForm } from "react-hook-form";
import { useHistory } from "react-router-dom";
import { Button, FormGroup, Label, Input } from "reactstrap";
import { FacebookLoginButton, GoogleLoginButton } from "react-social-login-buttons";
//import { getCookie, setCookie, removeCookie } from 'react-use-cookie';
import { Helmet } from "react-helmet";
import { useCookies } from "react-cookie";
import { confirmAlert } from 'react-confirm-alert'; // Import
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
@ -12,14 +9,12 @@ import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import axios from "axios";
import { useParams } from 'react-router-dom'
import Header from "./Header";
import { useLocation } from "react-router-dom";
import Visibility from '@mui/icons-material/Visibility';
import VisibilityOff from '@mui/icons-material/VisibilityOff';
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import Fotter_v3 from "./Fotter_v3";
import client_intranet from "../mysy_img/client_intranet.jpg";
function Module_Connexion_Intranet_Client() {
const [isconnected, setisconnected] = useState("");
@ -107,6 +102,7 @@ function Module_Connexion_Intranet_Client() {
formData.append("email", mymail);
formData.append("pwd", mypwd);
formData.append("type", "user");
var re = /\S+@\S+\.\S+/;
if (re.test(mymail) === false) {
@ -214,8 +210,6 @@ function Module_Connexion_Intranet_Client() {
if (document.getElementsByName("user_account") && document.getElementsByName("user_account")[0])
document.getElementsByName("user_account")[0].style.backgroundColor = "#ffffff";
}
function menu_user_account() {
@ -381,138 +375,154 @@ function Module_Connexion_Intranet_Client() {
<div className="block_centrer">
<div className="display_screen_600_901">
<div className="div_centre_master">
<div className="div_centre_002">
<Button variant="outlined" onClick={menu_user_account} className="signin_menu"
id="user_account" name="user_account"
style={{ "float": "left", "textAlign": "center", "height": "3rem" }}>Intranet Utilisateur</Button>
<div style={{ width: '100%', }}>
<h3 style={{ fontFamily: 'DM Sans' }}> Bienvenue sur l'Intranet </h3>
</div>
<div style={{ width: '100%', }}>
<div style={{ width: '50%', float: 'left' }}>
<img src={client_intranet} style={{ height: '100%', marginTop:'5rem' }} />
</div>
<div className="div_centre">
<div style={{ width: '50%', float: 'left', paddingTop: '2rem' }}>
<div className="div_row_bis" >
<FormGroup>
<Label style={{ fontSize: "14px" }}>Votre adresse email</Label>
<Input type="email" placeholder="Email" name="email" />
</FormGroup>
<div style={{ height: '10px' }}> &nbsp; </div>
<div className="div_centre_master">
<div className="div_centre_002">
<Button variant="outlined" onClick={menu_user_account} className="signin_menu"
id="user_account" name="user_account"
style={{ "float": "left", "textAlign": "center", "height": "3rem" }}>Intranet Client</Button>
<FormGroup>
<div className="label_pwd_div">
<div className="label_div" >
<Label style={{ fontSize: "14px" }}>Votre mot de passe </Label>
</div>
<div className="show_pwd_div" onClick={handleClickShowPassword}>
{currentpawdvisible ? <Visibility style={{ fontSize: '15px' }} /> : <VisibilityOff style={{ fontSize: '15px' }} />}
</div>
</div>
<Input type="password" placeholder="Password" name="pwd" />
</FormGroup>
</div>
<div className="div_centre">
<div className="div_row_bis" >
<FormGroup>
<Label style={{ fontSize: "14px" }}>Votre adresse email</Label>
<Input type="email" placeholder="Email" name="email" />
</FormGroup>
<div style={{ height: '10px' }}> &nbsp; </div>
{String(initpasswd) === String("true") && closepopup === 1 && <div className="okUpdateData">
La demande reinitialisation a bien ete prise en compte.
Verifiez votre boite email.
</div>}
<div className="forgot_pass" >
{String(initpasswd) !== String("true") && String(closepopup) !== String("1")
&& <Popup trigger={<button className="avisformation"> Mot de passe oublié</button>}
position="center" className="signin popup-reset-pwd">
<div className="signin-content popup-reset-pwd-content">
<div className="div_row" style={{
"textAlign": "center", "background": "orangered",
"height": "2rem", "paddingTop": "5px", "fontSize": "14px", "fontWeight": "bold"
}}
> Modifier le mot de passe</div>
<br />
<FormGroup>
<div className="label_pwd_div">
<div className="label_div" >
<Label style={{ fontSize: "14px" }}>Votre mot de passe </Label>
</div>
<div className="show_pwd_div" onClick={handleClickShowPassword}>
{currentpawdvisible ? <Visibility style={{ fontSize: '15px' }} /> : <VisibilityOff style={{ fontSize: '15px' }} />}
</div>
<label for="exampleFormControlTextarea1">Saisir votre email</label>
<br />
<input type="text" id="resetemailvalue" name="resetemailvalue" rows="1" cols="20"
className="zone_mail" />
<br />
</div>
<Input type="password" placeholder="Password" name="pwd" />
</FormGroup>
<div>
<br />
<Tooltip className="tooltip_css" id="is_user_or_pro-tooltip" />
<a data-tooltip-id="is_user_or_pro-tooltip" data-tooltip-html="Compte partenaire : création et gestion de formation <br/>
compte utilisateur : non autorisé à la création et gestion de formation">
<label for="is_user_or_pro">Compte partenaire ou utilisateur * ?</label>
{String(initpasswd) === String("true") && closepopup === 1 && <div className="okUpdateData">
La demande reinitialisation a bien ete prise en compte.
Verifiez votre boite email.
</div>}
<div className="forgot_pass" >
{String(initpasswd) !== String("true") && String(closepopup) !== String("1")
&& <Popup trigger={<button className="avisformation"> Mot de passe oublié</button>}
position="center" className="signin popup-reset-pwd">
<div className="signin-content popup-reset-pwd-content">
<div className="div_row" style={{
"textAlign": "center", "background": "orangered",
"height": "2rem", "paddingTop": "5px", "fontSize": "14px", "fontWeight": "bold"
}}
> Modifier le mot de passe</div>
<br />
<label for="exampleFormControlTextarea1">Saisir votre email</label>
<br />
<input type="text" id="resetemailvalue" name="resetemailvalue" rows="1" cols="20"
className="zone_mail" />
<br />
<select id="is_user_or_pro" name="is_user_or_pro" style={{
"width": '100%', "height": "2.5rem",
'marginTop': '5px'
}}
onChange={(event) => settypecompte(event.target.value)}>
<option selected value="">Choisir </option>
<option value="partner">Partenaire </option>
<option value="user">Utilisateur </option>
</select>
</a>
<br />
</div>
<div>
<br />
<Tooltip className="tooltip_css" id="is_user_or_pro-tooltip" />
<a data-tooltip-id="is_user_or_pro-tooltip" data-tooltip-html="Compte partenaire : création et gestion de formation <br/>
compte utilisateur : non autorisé à la création et gestion de formation">
<label for="is_user_or_pro">Compte partenaire ou utilisateur * ?</label>
<br />
<select id="is_user_or_pro" name="is_user_or_pro" style={{
"width": '100%', "height": "2.5rem",
'marginTop': '5px'
}}
onChange={(event) => settypecompte(event.target.value)}>
<option selected value="">Choisir </option>
<div className="text_pwd_crit" style={{ "textAlign": "center" }}>
Je ne suis pas un robot <br />
<div >
<option value="partner">Partenaire </option>
<option value="user">Utilisateur </option>
</select>
</a>
<br />
<div name="pasrobot" > {random1} + {random2} = <input
type='text'
name='sommerandom'
id='sommerandom'
{...register('sommerandom', {
required: { value: true, message: 'sommes de valeurs' },
maxLength: {
value: 30,
}
})}
className="pasrobot_css"
placeholder='Le total est ?'
/>
{errors.sommerandom && (
<span className='koUpdateData'>la sommes est incorrect</span>
)}
</div>
<div className="text_pwd_crit" style={{ "textAlign": "center" }}>
Je ne suis pas un robot <br />
<div >
<div name="pasrobot" > {random1} + {random2} = <input
type='text'
name='sommerandom'
id='sommerandom'
{...register('sommerandom', {
required: { value: true, message: 'sommes de valeurs' },
maxLength: {
value: 30,
}
})}
className="pasrobot_css"
placeholder='Le total est ?'
/>
{errors.sommerandom && (
<span className='koUpdateData'>la sommes est incorrect</span>
)}
</div>
</div>
</div>
<button type="submit" class="btn btn-secondary btn-sm" onClick={resetpasswd_ok}>Envoyer</button> &nbsp; &nbsp; &nbsp;
<button type="submit" class="btn btn-secondary btn-sm" onClick={closepopupinitpwd}> Annuler</button>
</div>
</div>
<button type="submit" class="btn btn-secondary btn-sm" onClick={resetpasswd_ok}>Envoyer</button> &nbsp; &nbsp; &nbsp;
<button type="submit" class="btn btn-secondary btn-sm" onClick={closepopupinitpwd}> Annuler</button>
</div>
</Popup>
}
</div>
</div>
<FormGroup>
&nbsp;
</FormGroup>
<div className="div_row22">
<Button variant="contained" color="success" className="div_row22 btn_login button" onClick={onSubmit}>Connectez-Vous</Button>
</div>
</Popup>
}
</div>
</div>
<FormGroup>
&nbsp;
</FormGroup>
<div className="div_row22">
<Button variant="contained" color="success" className="div_row22 btn_login button" onClick={onSubmit}>Connectez-Vous</Button>
</div>
</div>
</div>
{isconnected === "false" && <div className="erreurconnexion">
<br />

View File

@ -17,6 +17,8 @@ import fileDownload from 'js-file-download'
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -107,9 +109,9 @@ const useStyles = makeStyles((theme) => ({
color: 'gray',
},
}));
const Module_Editique = (props) => {
registerLocale('fr', fr);
const classes = useStyles();
const myconntected_employee_id = props.conntected_employee_id;
@ -200,12 +202,14 @@ const Module_Editique = (props) => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In Invoice_Session_Formation res.data.status = " + res.data.status);
//console.log(" In Invoice_Session_Formation res.data.message r_class = " + res.data.message);
setInvoice_Session_Formation_api("true");
setInvoice_Session_Formation_result(res.data.message);
Getall_Editable_Document_By_Partner_By_Collection();
props.GetListeInscrit(props.related_collection_recid, props.internal_url);
props.Get_List_Partner_Clients();
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
@ -1501,6 +1505,24 @@ const Module_Editique = (props) => {
{ "id": "", "label": "", "value": "" },
]
const New_Option_Automatic_Doc_Action_Target_For_Q_Position = [
{ "id": "start_session", "label": "Date Début Session", "value": "start_session" },
{ "id": "end_session", "label": "Date Fin Session", "value": "end_session" },
{ "id": "preinscription", "label": "A la pré-inscription", "value": "preinscription" },
{ "id": "inscription", "label": "A l'inscription", "value": "inscription" },
{ "id": "", "label": "", "value": "" },
]
const New_Option_Automatic_Doc_Action_Target_GLOBAL_FOR_ALL = [
{ "id": "start_session", "label": "Date Début Session", "value": "start_session" },
{ "id": "end_session", "label": "Date Fin Session", "value": "end_session" },
{ "id": "preinscription", "label": "A la pré-inscription", "value": "preinscription" },
{ "id": "inscription", "label": "A l'inscription", "value": "inscription" },
{ "id": "every_session_sequence_day", "label": "Envoyer chaque jour", "value": "every_session_sequence_day" },
{ "id": "", "label": "", "value": "" },
]
return (
<div className="module_editique">
@ -1528,7 +1550,7 @@ const Module_Editique = (props) => {
>
<DialogTitle>MySy Warning</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Warning</DialogTitle>
<DialogContent>
<DialogContentText>
<ImWarning /> {Dialog_Access_Right_message}
@ -1553,7 +1575,7 @@ const Module_Editique = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_1_message}
@ -1700,35 +1722,34 @@ const Module_Editique = (props) => {
/>}
</div>
{(String(p_doc_automatic_setup_action_target_date) === "start_session" || String(p_doc_automatic_setup_action_target_date) === "end_session") &&
{String(p_doc_automatic_setup_action_target_date) !== "every_session_sequence_day" &&
<div className="session_caract_Dialog"> Nb Jours <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="nb_jour_document"
id="nb_jour_document"
<div className="session_caract_Dialog"> Nb Jours <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="nb_jour_document"
id="nb_jour_document"
InputLabelProps={{
shrink: true,
}}
InputLabelProps={{
shrink: true,
}}
type="number"
inputProps={{ min: "0", max: "200", step: "1" }}
type="number"
inputProps={{ min: "0", max: "200", step: "1" }}
disabled={false}
className="disabled_style"
value={p_doc_automatic_setup_nb_jour}
onChange={(e) => {
setp_doc_automatic_setup_nb_jour(e.target.value);
setis_modified_doc_automatic_setup("1");
}}
disabled={false}
className="disabled_style"
value={p_doc_automatic_setup_nb_jour}
onChange={(e) => {
setp_doc_automatic_setup_nb_jour(e.target.value);
setis_modified_doc_automatic_setup("1");
}}
style={{ background: '#FFFFFF' }}
style={{ background: '#FFFFFF' }}
/>
</div>}
/>
</div>}
<div className="session_caract_Dialog">
<Tooltip className="tooltip_css" id="help_target_action_document" style={{ "fontSize": "12px" }} />
@ -1738,6 +1759,7 @@ const Module_Editique = (props) => {
{String(p_doc_automatic_setup_nom_document) !== "EMARGEMENT" &&
String(p_doc_automatic_setup_nom_document) !== "QUESTION POSITIONNEMENT" &&
<Autocomplete
disablePortal
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 } }}
@ -1775,6 +1797,33 @@ const Module_Editique = (props) => {
options={New_Option_Automatic_Doc_Action_Target_For_Emargement}
value={New_Option_Automatic_Doc_Action_Target_For_Emargement.filter((data) => (data).value === String(p_doc_automatic_setup_action_target_date))[0].label}
onChange={(event, value) => {
setis_modified_doc_automatic_setup("1");
if (value && value.value) {
setp_doc_automatic_setup_action_target_date(value.value);
} else {
setp_doc_automatic_setup_action_target_date("")
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>}
{String(p_doc_automatic_setup_nom_document) === "QUESTION POSITIONNEMENT" &&
<Autocomplete
disablePortal
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 } }}
name="target_action_document"
id="target_action_document"
className="disabled_style"
options={New_Option_Automatic_Doc_Action_Target_For_Q_Position}
value={New_Option_Automatic_Doc_Action_Target_For_Q_Position.filter((data) => (data).value === String(p_doc_automatic_setup_action_target_date))[0].label}
onChange={(event, value) => {
setis_modified_doc_automatic_setup("1");
if (value && value.value) {
@ -2238,7 +2287,7 @@ const Module_Editique = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContentText>
{Dialog_1_message}
@ -2274,39 +2323,39 @@ const Module_Editique = (props) => {
</div>
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
<div className="session_caract_Dialog" > Choisir une convocation
<Autocomplete
disablePortal
name="event_dialog_version_convention"
id="event_dialog_version_convention"
fullWidth
//className="disabled_style enable_style"
options={New_Get_List_Stagiaire_Convocations_result}
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
<div className="session_caract_Dialog" > Choisir une convocation
<Autocomplete
disablePortal
name="event_dialog_version_convention"
id="event_dialog_version_convention"
fullWidth
//className="disabled_style enable_style"
options={New_Get_List_Stagiaire_Convocations_result}
onChange={(event, value) => {
if (value && value._id) {
onChange={(event, value) => {
if (value && value._id) {
setselected_convention_id(value._id);
setselected_convention_id(value._id);
if (String(value._id) === "default_mail") {
setselected_convention_type("email");
if (String(value._id) === "default_mail") {
setselected_convention_type("email");
}
else if (String(value._id) === "default_pdf") {
setselected_convention_type("pdf");
} else {
var result2 = Get_List_Stagiaire_Convocations_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id))
setselected_convention_type(JSON.parse(result2).type_doc);
}
settab_convention_pieces_jointes_result([]);
}
else if (String(value._id) === "default_pdf") {
setselected_convention_type("pdf");
} else {
var result2 = Get_List_Stagiaire_Convocations_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id))
setselected_convention_type(JSON.parse(result2).type_doc);
}
settab_convention_pieces_jointes_result([]);
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option" />
}
}}
/>
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option" />
}
/>
</div>}
</div>}
{String(selected_convention_type) === "email" && <div className="session_caract_Dialog" > Type Document<br />
<TextField
@ -2875,7 +2924,7 @@ const Module_Editique = (props) => {
className="displaypartnersession"
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "10rem" }}>
<DialogContentText>
<div style={{ "textAlign": "left" }}>
@ -2916,7 +2965,7 @@ const Module_Editique = (props) => {
className="displaypartnersession"
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "10rem" }}>
<DialogContentText>
<div style={{ "textAlign": "left" }}>
@ -3134,16 +3183,25 @@ const Module_Editique = (props) => {
}}
>
{x && String(x.actif) === "1" &&
{x && String(x.actif) === "1" && New_Option_Automatic_Doc_Action_Target_GLOBAL_FOR_ALL.length > 0 &&
<nav>
<Tooltip className="tooltip_css" id={x.courrier_template_type_document_id} style={{ textAlign: 'left' }} />
<a data-tooltip-id={x.courrier_template_type_document_id}
{(String(x.action_target_date) === "start_session" || String(x.action_target_date) === "end_session") && <a data-tooltip-id={x.courrier_template_type_document_id}
data-tooltip-html={" Traitement Automatique : Oui <br/> Nb Jours : " + `${x.nb_jour_action}` + " <br/>Date Cible: " + `${x.action_target_date}` + " <br/>Exécution dans : " + `${x.delta_day}` + " Jour(s)"}>
{String(x.delta_day) < "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#FFA500' }} />}
{String(x.delta_day) >= "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#218e1f' }} />}
</a>
</a>}
{String(x.action_target_date) !== "start_session" && String(x.action_target_date) !== "end_session" && <a data-tooltip-id={x.courrier_template_type_document_id}
data-tooltip-html={"Traitement Automatique : Oui <br/>Exécution : " + `${New_Option_Automatic_Doc_Action_Target_GLOBAL_FOR_ALL.filter((data) => (data).value === String(x.action_target_date))[0].label}`}>
{String(x.delta_day) < "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#FFA500' }} />}
{String(x.delta_day) >= "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#218e1f' }} />}
</a>}
</nav>}
{x && String((x).actif) !== "1" &&
@ -3320,16 +3378,25 @@ const Module_Editique = (props) => {
}}
>
{x && String(x.actif) === "1" &&
{x && String(x.actif) === "1" && New_Option_Automatic_Doc_Action_Target_GLOBAL_FOR_ALL.length > 0 &&
<nav>
<Tooltip className="tooltip_css" id={x.courrier_template_type_document_id} style={{ textAlign: 'left' }} />
<a data-tooltip-id={x.courrier_template_type_document_id}
{(String(x.action_target_date) === "start_session" || String(x.action_target_date) === "end_session") && <a data-tooltip-id={x.courrier_template_type_document_id}
data-tooltip-html={" Traitement Automatique : Oui <br/> Nb Jours : " + `${x.nb_jour_action}` + " <br/>Date Cible: " + `${x.action_target_date}` + " <br/>Exécution dans : " + `${x.delta_day}` + " Jour(s)"}>
{String(x.delta_day) < "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#FFA500' }} />}
{String(x.delta_day) >= "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#218e1f' }} />}
</a>
</a>}
{String(x.action_target_date) !== "start_session" && String(x.action_target_date) !== "end_session" && <a data-tooltip-id={x.courrier_template_type_document_id}
data-tooltip-html={"Traitement Automatique : Oui <br/>Exécution : " + `${New_Option_Automatic_Doc_Action_Target_GLOBAL_FOR_ALL.filter((data) => (data).value === String(x.action_target_date))[0].label}`}>
{String(x.delta_day) < "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#FFA500' }} />}
{String(x.delta_day) >= "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#218e1f' }} />}
</a>}
</nav>}
{x && String((x).actif) !== "1" &&
@ -3504,16 +3571,25 @@ const Module_Editique = (props) => {
}}
>
{x && String(x.actif) === "1" &&
{x && String(x.actif) === "1" && New_Option_Automatic_Doc_Action_Target_GLOBAL_FOR_ALL.length > 0 &&
<nav>
<Tooltip className="tooltip_css" id={x.courrier_template_type_document_id} style={{ textAlign: 'left' }} />
<a data-tooltip-id={x.courrier_template_type_document_id}
{(String(x.action_target_date) === "start_session" || String(x.action_target_date) === "end_session") && <a data-tooltip-id={x.courrier_template_type_document_id}
data-tooltip-html={" Traitement Automatique : Oui <br/> Nb Jours : " + `${x.nb_jour_action}` + " <br/>Date Cible: " + `${x.action_target_date}` + " <br/>Exécution dans : " + `${x.delta_day}` + " Jour(s)"}>
{String(x.delta_day) < "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#FFA500' }} />}
{String(x.delta_day) >= "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#218e1f' }} />}
</a>
</a>}
{String(x.action_target_date) !== "start_session" && String(x.action_target_date) !== "end_session" && <a data-tooltip-id={x.courrier_template_type_document_id}
data-tooltip-html={"Traitement Automatique : Oui <br/>Exécution : " + `${New_Option_Automatic_Doc_Action_Target_GLOBAL_FOR_ALL.filter((data) => (data).value === String(x.action_target_date))[0].label}`}>
{String(x.delta_day) < "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#FFA500' }} />}
{String(x.delta_day) >= "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#218e1f' }} />}
</a>}
</nav>}
{x && String((x).actif) !== "1" &&
@ -3591,15 +3667,25 @@ const Module_Editique = (props) => {
}}
>
{x && String(x.actif) === "1" &&
{x && String(x.actif) === "1" && New_Option_Automatic_Doc_Action_Target_GLOBAL_FOR_ALL.length > 0 &&
<nav>
<Tooltip className="tooltip_css" id={x.courrier_template_type_document_id} style={{ textAlign: 'left' }} />
<a data-tooltip-id={x.courrier_template_type_document_id}
{(String(x.action_target_date) === "start_session" || String(x.action_target_date) === "end_session") && <a data-tooltip-id={x.courrier_template_type_document_id}
data-tooltip-html={" Traitement Automatique : Oui <br/> Nb Jours : " + `${x.nb_jour_action}` + " <br/>Date Cible: " + `${x.action_target_date}` + " <br/>Exécution dans : " + `${x.delta_day}` + " Jour(s)"}>
{String(x.delta_day) < "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#FFA500' }} />}
{String(x.delta_day) >= "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#218e1f' }} />}
</a>
</a>}
{String(x.action_target_date) !== "start_session" && String(x.action_target_date) !== "end_session" && <a data-tooltip-id={x.courrier_template_type_document_id}
data-tooltip-html={"Traitement Automatique : Oui <br/>Exécution : " + `${New_Option_Automatic_Doc_Action_Target_GLOBAL_FOR_ALL.filter((data) => (data).value === String(x.action_target_date))[0].label}`}>
{String(x.delta_day) < "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#FFA500' }} />}
{String(x.delta_day) >= "0" && <MdFlashAuto style={{ fontSize: '25px', color: '#218e1f' }} />}
</a>}
</nav>}
{x && String((x).actif) !== "1" &&
@ -3762,7 +3848,7 @@ const Module_Editique = (props) => {
</Button>
</nav>
<nav style={{ float: "right", "width": '45%' , display:'none'}}> Non Traité
<nav style={{ float: "right", "width": '45%', display: 'none' }}> Non Traité
<Button onClick={handleExpandClick_audit}>
{expanded_nom_traite.length === 0 ? 'Voir tout' : 'Réduire'}
</Button>

View File

@ -1,83 +1,32 @@
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 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 '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 Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
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, sliderClasses } 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 img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
//import FullCalendar from "@fullcalendar/react";
import daygridPlugin from "@fullcalendar/daygrid";
//import interactionPlugin from "@fullcalendar/interaction";
//import timeGridPlugin from "@fullcalendar/timegrid";
import Checkbox from '@mui/material/Checkbox';
import allLocales from '@fullcalendar/core/locales-all'
import { RepeatOnRounded, ResetTvRounded, RestaurantMenu } from "@mui/icons-material";
import { alignPropType } from "react-bootstrap/esm/types";
import AttachFileIcon from '@mui/icons-material/AttachFile';
import ToggleSwitch from "./ToggleSwitch";
import ToggleSwitch_v2_mysy from "./ToggleSwitch_v2_mysy";
import ToggleSwitch_v3_mysy from "./ToggleSwitch_v3_mysy";
import Autocomplete from '@mui/material/Autocomplete';
import FullCalendar, { formatDate } from "@fullcalendar/react";
import dayGridPlugin from "@fullcalendar/daygrid";
import timeGridPlugin from "@fullcalendar/timegrid";
import interactionPlugin from "@fullcalendar/interaction";
import { FcSearch } from "react-icons/fc";
import { Fab } from "@material-ui/core";
import {
ListItem,
ListItemText,
useTheme,
} from "@mui/material";
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
import { TreeView } from '@mui/x-tree-view/TreeView';
import { TreeItem } from '@mui/x-tree-view/TreeItem';
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
import { FcViewDetails, FcDisapprove, FcInfo } from "react-icons/fc";
import { convertNwSeToNeSw } from "google-map-react";
import { IoMdAddCircle } from "react-icons/io";
import FormGroup from '@mui/material/FormGroup';
import FormControlLabel from '@mui/material/FormControlLabel';
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
const Module_Email_Management = (props) => {
const myconntected_employee_id = props.conntected_employee_id;
@ -248,7 +197,10 @@ const Module_Email_Management = (props) => {
else {
setGet_Partner_List_SendEmail_Document_api("false");
setGet_Partner_List_SendEmail_Document_message(res.data.message);
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
@ -384,7 +336,11 @@ const Module_Email_Management = (props) => {
else {
setGet_Given_Partner_Document_Data_By_id_api("false");
setGet_Given_Partner_Document_Data_By_id_message(res.data.message);
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
@ -401,40 +357,53 @@ const Module_Email_Management = (props) => {
const [Send_Front_Email_message, setSend_Front_Email_message] = useState();
const [Send_Front_Email_result, setSend_Front_Email_result] = useState();
function Send_Front_Email() {
/*
/!\ : Pour eviter les spams, ce module ne doit pas envoyer plus de 20 email à la fois
*/
const tab_destinataire = email_destinataire.split(',');
if (tab_destinataire.length > 30) {
alert(" Vous ne pouvez pas envoyer plus de 20 emails (destinataires) à la fois.");
if (tab_destinataire.length > 50) {
// alert(" Vous ne pouvez pas envoyer plus de 50 emails (destinataires) à la fois.");
setdisplay_alert_mysy("1");
setalert_message(" Vous ne pouvez pas envoyer plus de 50 emails (destinataires) à la fois.");
setalert_type("error");
return;
}
const tab_email_cc = email_cc.split(',');
if (tab_email_cc.length > 10) {
alert(" Vous ne pouvez mettre plus de 10 adresses en copie.");
// alert(" Vous ne pouvez mettre plus de 10 adresses en copie.");
setdisplay_alert_mysy("1");
setalert_message(" Vous ne pouvez mettre plus de 10 adresses en copie.");
setalert_type("error");
return;
}
const tab_email_bcc = email_bcc.split(',');
if (tab_email_bcc.length > 10) {
alert(" Vous ne pouvez mettre plus de 10 adresses en copie-cachée.");
// alert(" Vous ne pouvez mettre plus de 10 adresses en copie-cachée.");
setdisplay_alert_mysy("1");
setalert_message(" Vous ne pouvez mettre plus de 10 adresses en copie-cachée.");
setalert_type("error");
return;
}
if (tab_email_pieces_jointes_result.length > 10) {
alert("Vous ne pouvez pas envoyer plus de 5 pièces jointes à la fois.");
if (tab_email_pieces_jointes_result.length > 5) {
// alert("Vous ne pouvez pas envoyer plus de 5 pièces jointes à la fois.");
setdisplay_alert_mysy("1");
setalert_message("Vous ne pouvez pas envoyer plus de 5 pièces jointes à la fois.");
setalert_type("error");
return;
}
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
@ -445,7 +414,7 @@ const Module_Email_Management = (props) => {
form.append("email_corps", field_programme);
form.append("related_collection", props.related_collection);
form.append("email_sujet", email_sujet);
// pièce jointe
@ -454,7 +423,7 @@ const Module_Email_Management = (props) => {
}
var myurl = "";
var myurl = "";
if (props.related_collection === "nointernalcontact") {
myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Email_From_Front_For_Unknown_Contact/";
@ -475,8 +444,19 @@ const Module_Email_Management = (props) => {
} else {
form.append("include_tuteur", "0");
}
if (store_file_in_ent === true) {
form.append("store_file_in_ent", "1");
} else {
form.append("store_file_in_ent", "0");
}
}
console.log(" ### form = ",form)
// return;
setLoading(true);
@ -497,13 +477,20 @@ const Module_Email_Management = (props) => {
if (props.Clean_Selected_Rows_For_Email)
props.Clean_Selected_Rows_For_Email();
alert(res.data.message);
//alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("success");
}
else {
setSend_Front_Email_api("false");
setSend_Front_Email_message(res.data.message);
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
@ -558,15 +545,23 @@ const Module_Email_Management = (props) => {
if (file_type !== "application/pdf") {
alert("Le fichier n'est pas de type PDF");
// alert("Le fichier n'est pas de type PDF");
setdisplay_alert_mysy("1");
setalert_message("Le fichier n'est pas de type PDF");
setalert_type("error");
return;
}
if (file_size > 10000000) {
alert("Le fichier ne doit pas depasser un 1 Méga octets");
console.log("Le fichier ne doit pas depasser un 1 Méga octets");
// alert("Le fichier ne doit pas depasser un 1 Méga octets");
// console.log("Le fichier ne doit pas depasser un 1 Méga octets");
setdisplay_alert_mysy("1");
setalert_message("Le fichier ne doit pas depasser un 1 Méga octets");
setalert_type("error");
return;
}
@ -618,6 +613,19 @@ const Module_Email_Management = (props) => {
const [include_client, setinclude_client] = useState(false);
const [include_tuteur, setinclude_tuteur] = useState(false);
const [store_file_in_ent, setstore_file_in_ent] = useState(false);
const handleChange_file_to_ent = (event) => {
if (event.currentTarget.checked) {
setstore_file_in_ent(true);
}
else {
setstore_file_in_ent(false);
}
}
const handleChange_include_tuteur = (event) => {
if (event.currentTarget.checked) {
setinclude_tuteur(true);
@ -639,6 +647,22 @@ const Module_Email_Management = (props) => {
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
const [alert_message, setalert_message] = useState("");
const [alert_type, setalert_type] = useState("");
function clear_alert_message() {
setalert_message("");
}
function clear_alert_type() {
setalert_type("");
}
function clear_display_alert_mysy() {
setdisplay_alert_mysy("");
}
return (
<div className="module_email_management">
@ -646,6 +670,16 @@ const Module_Email_Management = (props) => {
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
</div>}
{/*** Affichage des messages d'alerte*/}
{display_alert_mysy && String(display_alert_mysy) === "1" &&
<Module_Alert_Confirmation alert_message={alert_message}
alert_type={alert_type}
clear_alert_message={clear_alert_message}
clear_alert_type={clear_alert_type}
clear_display_alert_mysy={clear_display_alert_mysy}
/>
}
{/*** FIN Affichage des messages d'alerte*/}
<Dialog
@ -660,7 +694,7 @@ const Module_Email_Management = (props) => {
open={Dialog_1_open}
>
<DialogTitle></DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> </DialogTitle>
<DialogContent style={{ "width": "400px" }}>
<DialogContentText>
{Dialog_1_message}
@ -891,8 +925,6 @@ const Module_Email_Management = (props) => {
</div>
<div>
<div className="div_row" style={{ "padding": "5px" }}>
<div style={{ "fontSize": "12px" }}>
@ -995,6 +1027,25 @@ const Module_Email_Management = (props) => {
</div>
</div>
</div>}
{tab_email_pieces_jointes_result && tab_email_pieces_jointes_result.length > 0 &&
<div style={{ position: 'flex', flexDirection: 'row', justifyContent: 'right', alignItems: 'right' }}>
<FormControlLabel
control={
<Checkbox
size="small"
checked={store_file_in_ent}
onChange={handleChange_file_to_ent}
name="send_file_to_ent"
/>
}
label="Partage ENT"
/>
</div>}
</div>
</div>}
@ -1006,8 +1057,6 @@ const Module_Email_Management = (props) => {
<Popup
trigger={
<Button onClick={(e) => {
}} className="bton_enreg_dialog">Envoyer</Button>
@ -1042,7 +1091,7 @@ const Module_Email_Management = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();

View File

@ -0,0 +1,498 @@
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 { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import { Editor } from '@tinymce/tinymce-react';
import { FcViewDetails, FcDisapprove } from "react-icons/fc";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import Checkbox from '@mui/material/Checkbox';
import excel_icone from "../mysy_img/excel_icone.png";
import fileDownload from 'js-file-download'
import { FcInfo } from "react-icons/fc";
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcAcceptDatabase, } from "react-icons/fc";
import { format } from 'date-fns'
import InputAdornment from '@mui/material/InputAdornment';
import { AiFillCloseCircle, AiOutlineConsoleSql } from "react-icons/ai";
import Box from '@mui/material/Box';
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 img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import { Fab } from "@material-ui/core";
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
import { AiTwotoneSave } from "react-icons/ai";
import { FcEditImage } from "react-icons/fc";
import ToggleSwitch from "./ToggleSwitch";
import { FcSpeaker } from "react-icons/fc";
import Autocomplete from '@mui/material/Autocomplete';
import { FcOpenedFolder } from "react-icons/fc";
import Module_Absence from "./Module_Absence";
import { RiMoreFill } from "react-icons/ri";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import moment from "moment";
import 'moment/locale/fr';
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
import { gridClasses } from '@mui/x-data-grid';
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import {
GridToolbarContainer, GridToolbarExport, GridToolbarColumnsButton,
GridToolbarFilterButton, GridToolbarDensitySelector, GridToolbarExportContainer, useGridApiContext,
gridFilteredSortedRowIdsSelector,
gridVisibleColumnFieldsSelector,
GridValueGetterParams,
GridPreferencePanelsValue,
} from '@mui/x-data-grid';
import * as XLSX from 'xlsx';
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
import { makeStyles } from "@material-ui/core/styles";
import Paper from '@material-ui/core/Paper';
import Draggable from 'react-draggable';
import { IconButton } from '@material-ui/core';
function PaperComponent(props) {
return (
<Draggable
handle="#draggable-dialog-title"
cancel={'[class*="MuiDialogContent-root"]'}
>
<Paper {...props} />
</Draggable>
);
}
const useStyles = makeStyles((theme) => ({
dialog: {
position: 'absolute',
// left: 10,
top: 400
},
paper: {
overflowY: 'unset',
},
customizedButton: {
position: 'absolute',
left: '98%',
top: '-3%',
backgroundColor: 'lightgray',
color: 'gray',
},
}));
const Module_Ent_Mes_Documents = (props) => {
registerLocale('fr', fr);
const classes = useStyles();
const history = useHistory();
const [submenu, setsubmenu] = useState("");
const filters = [
{ value: 'email', label: 'Email' },
{ value: 'nom', label: 'Nom' },
{ value: 'prenom', label: 'Prénom' }
]
const [selectedfilt1, setselectedfilt1] = useState("");
const [selectedfilt2, setselectedfilt2] = useState("");
const [selectedfilt3, setselectedfilt3] = useState("");
function ExpandableCell_50({ value }) {
const [expanded, setExpanded] = React.useState(false);
return (
<nav>
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
{expanded ? value : value.slice(0, 50)}&nbsp;
{value.length > 50 && (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<Link
type="button"
component="button"
sx={{ fontSize: 'inherit' }}
onClick={() => setExpanded(!expanded)}
>
{expanded ? <nav> <PiDotsThree />Réduire</nav> : <nav> <PiDotsThree />Voir</nav>}
</Link>
)}
</div>}
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
&nbsp;
</div>
}
</nav>
);
}
function Display_Colunm_text({ value }) {
return (
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
{value}&nbsp;
</div>
);
}
const columns_apprenant_inscriptions = [
{ field: 'id', headerName: 'id', hide: true },
{ field: '_id', headerName: '_id', hide: true },
{ field: 'session_id', headerName: 'session_id', hide: true, Width: 1 },
{ field: 'session_code', headerName: 'Code Session', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'class_title', headerName: 'Titre Formation', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'class_internal_url', headerName: 'class_internal_url', hide: true, Width: 1 },
{
field: 'status', headerName: 'Statut', hide: false, flex: 1, minWidth: 50, maxWidth: 70,
valueFormatter: (params) => {
if (String(params.value) === "0")
return "Pré.";
else if (String(params.value) === "1")
return "Ins";
else if (String(params.value) === "-1")
return "Ann";
else if (String(params.value) === "2")
return "Enc";
else
return "???";
}
},
{ field: 'client_rattachement_id', headerName: 'client__id', hide: true, Width: 1 },
{ field: 'client_rattachement_nom', headerName: 'Client', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'date_debut', headerName: 'Début', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'date_fin', headerName: 'Fin', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'presentiel', headerName: 'Présentiel', hide: false, flex: 1, minWidth: 50, maxWidth: 70 },
{ field: 'distanciel', headerName: 'Distantiel', hide: false, flex: 1, minWidth: 50, maxWidth: 70 },
{ field: 'class_recyclage_delai', headerName: 'Recycl. Delai', hide: false, flex: 1, minWidth: 100, },
{ field: 'class_recyclage_periodicite', headerName: 'Recycl. Perio', hide: false, flex: 1, minWidth: 100, },
{ field: 'nb_jour_avant_recyclage', headerName: 'Jrs avant Recycl.', hide: false, flex: 1, minWidth: 100, },
{
field: "Detail", headerName: 'Voir détail',
renderCell: (cellValues) => {
return (
<Button
onClick={(event) => {
//handleClick_edit_apprenant_From_Line(cellValues.row.id);
}}
>
<FcViewDetails />
</Button>
);
}
},
{
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
return (
<Popup
trigger={<Button
>
<CiTrash />
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, l'inscription sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
//handleClick_delete_Apprenant(event, cellValues);
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
)}
</Popup>
);
}
},
]
const [isLoading, setLoading] = useState();
const [p_filtre1, setp_filtre1] = useState("");
const [p_filtre1_value, setp_filtre1_value] = useState("");
const [p_filtre2, setp_filtre2] = useState("");
const [p_filtre2_value, setp_filtre2_value] = useState("");
const [p_filtre3, setp_filtre3] = useState("");
const [p_filtre3_value, setp_filtre3_value] = useState("");
const [p_filtre4, setp_filtre4] = useState("");
const [p_filtre4_value, setp_filtre4_value] = useState("");
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
const [alert_message, setalert_message] = useState("");
const [alert_type, setalert_type] = useState("");
function clear_alert_message() {
setalert_message("");
}
function clear_alert_type() {
setalert_type("");
}
function clear_display_alert_mysy() {
setdisplay_alert_mysy("");
}
return (
<div className="module_ent_mes_documents">
{isLoading && <div className="loader-container">
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
</div>}
{/*** Affichage des messages d'alerte*/}
{display_alert_mysy && String(display_alert_mysy) === "1" &&
<Module_Alert_Confirmation alert_message={alert_message}
alert_type={alert_type}
clear_alert_message={clear_alert_message}
clear_alert_type={clear_alert_type}
clear_display_alert_mysy={clear_display_alert_mysy}
/>
}
{/*** FIN Affichage des messages d'alerte*/}
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Documents </h3>
<div>
<div className="titre1"> Utilisez les filtres !</div>
<div className="div_row" style={{ "marginBottom": "5px" }}>
<div className="div_row_gauche texte_area_filter" >
<TextField
name="filtre1"
label="Choisir un champ"
select
sx={{ m: 1, width: '100%' }}
value={p_filtre1}
onChange={(e) => {
setp_filtre1(e.target.value)
}}
>
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Email &nbsp;&nbsp;</MenuItem>
<MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom &nbsp;</MenuItem>
<MenuItem value="prenom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Prénom &nbsp;</MenuItem>
</TextField>
</div>
<div className="div_row_droite texte_area_filter_value" >
{p_filtre1 &&
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="filtre1_value"
id="filtre1_value"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_filtre1_value}
onChange={(e) => { setp_filtre1_value(e.target.value); }}
InputProps={{
endAdornment: (
<InputAdornment position="end">
<AiFillCloseCircle
style={{ 'cursor': "pointer", "color": "orangered" }}
onClick={(e) => {
setp_filtre1_value("");
}} />
</InputAdornment>
),
}}
/>
}
</div>
{p_filtre1 && <div className='filter_bton_add'>
<Tooltip className="tooltip_css" id="my-tooltip01" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="my-tooltip01" data-tooltip-html="Ajouter une nouvelle ligne de filtre">
&nbsp; <MdAddCircleOutline onClick={(e) => {
setp_filtre2("1");
}} />
</a>
</div>}
{p_filtre1 && <div className='filter_bton_add'>
<Tooltip className="tooltip_css" id="my-tooltip02" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="my-tooltip02" data-tooltip-html="Supprimer cette ligne de filtre">
&nbsp; <MdRemoveCircleOutline onClick={(e) => {
setp_filtre1();
setp_filtre1_value();
}}
/>
</a>
</div>}
</div>
{p_filtre2 &&
<div className="div_row" style={{ "marginBottom": "5px" }}>
<div className="div_row_gauche texte_area_filter">
<TextField
name="filtre2"
label="Choisir un champ"
select
sx={{ m: 1, width: '100%' }}
options={filters}
value={p_filtre2}
onChange={(e) => {
setp_filtre2(e.target.value)
}}
>
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Email &nbsp;&nbsp;</MenuItem>
<MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom &nbsp;</MenuItem>
<MenuItem value="prenom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Prénom &nbsp;</MenuItem>
</TextField>
</div>
<div className="div_row_droite texte_area_filter" >
{String(p_filtre2).length > 3 &&
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="filtre2_value"
id="filtre2_value"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_filtre2_value}
onChange={(e) => setp_filtre2_value(e.target.value)}
InputProps={{
endAdornment: (
<InputAdornment position="end">
<AiFillCloseCircle
style={{ 'cursor': "pointer", "color": "orangered" }}
onClick={(e) => {
setp_filtre2_value("");
}} />
</InputAdornment>
),
}}
/>}
</div>
{String(p_filtre2).length > 3 && <div className='filter_bton_add'>
<Tooltip className="tooltip_css" id="my-tooltip04" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="my-tooltip04" data-tooltip-html="Supprimer cette ligne de filtre">
&nbsp; <MdRemoveCircleOutline
onClick={(e) => {
setp_filtre2();
setp_filtre2_value();
}}
/>
</a>
</div>}
</div>
}
{<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={"Get_All_Apprenant"}>Rechercher
</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
<Button variant="contained" className="bton_annule" onClick={"clean_all_filters"}>Annuler
</Button>
</div>
</div>}
</div>
<br />
</div >
);
}
export default Module_Ent_Mes_Documents;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,501 @@
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 { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import { Editor } from '@tinymce/tinymce-react';
import { FcViewDetails, FcDisapprove } from "react-icons/fc";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import Checkbox from '@mui/material/Checkbox';
import excel_icone from "../mysy_img/excel_icone.png";
import fileDownload from 'js-file-download'
import { FcInfo } from "react-icons/fc";
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcAcceptDatabase, } from "react-icons/fc";
import { format } from 'date-fns'
import InputAdornment from '@mui/material/InputAdornment';
import { AiFillCloseCircle, AiOutlineConsoleSql } from "react-icons/ai";
import Box from '@mui/material/Box';
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 img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import { Fab } from "@material-ui/core";
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
import { AiTwotoneSave } from "react-icons/ai";
import { FcEditImage } from "react-icons/fc";
import ToggleSwitch from "./ToggleSwitch";
import { FcSpeaker } from "react-icons/fc";
import Autocomplete from '@mui/material/Autocomplete';
import { FcOpenedFolder } from "react-icons/fc";
import Module_Absence from "./Module_Absence";
import { RiMoreFill } from "react-icons/ri";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import moment from "moment";
import 'moment/locale/fr';
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
import { gridClasses } from '@mui/x-data-grid';
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import {
GridToolbarContainer, GridToolbarExport, GridToolbarColumnsButton,
GridToolbarFilterButton, GridToolbarDensitySelector, GridToolbarExportContainer, useGridApiContext,
gridFilteredSortedRowIdsSelector,
gridVisibleColumnFieldsSelector,
GridValueGetterParams,
GridPreferencePanelsValue,
} from '@mui/x-data-grid';
import * as XLSX from 'xlsx';
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
import { makeStyles } from "@material-ui/core/styles";
import Paper from '@material-ui/core/Paper';
import Draggable from 'react-draggable';
import { IconButton } from '@material-ui/core';
function PaperComponent(props) {
return (
<Draggable
handle="#draggable-dialog-title"
cancel={'[class*="MuiDialogContent-root"]'}
>
<Paper {...props} />
</Draggable>
);
}
const useStyles = makeStyles((theme) => ({
dialog: {
position: 'absolute',
// left: 10,
top: 400
},
paper: {
overflowY: 'unset',
},
customizedButton: {
position: 'absolute',
left: '98%',
top: '-3%',
backgroundColor: 'lightgray',
color: 'gray',
},
}));
const Module_Ent_Mes_Notes = (props) => {
registerLocale('fr', fr);
const classes = useStyles();
const history = useHistory();
const [submenu, setsubmenu] = useState("");
const filters = [
{ value: 'email', label: 'Email' },
{ value: 'nom', label: 'Nom' },
{ value: 'prenom', label: 'Prénom' }
]
const [selectedfilt1, setselectedfilt1] = useState("");
const [selectedfilt2, setselectedfilt2] = useState("");
const [selectedfilt3, setselectedfilt3] = useState("");
function ExpandableCell_50({ value }) {
const [expanded, setExpanded] = React.useState(false);
return (
<nav>
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
{expanded ? value : value.slice(0, 50)}&nbsp;
{value.length > 50 && (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<Link
type="button"
component="button"
sx={{ fontSize: 'inherit' }}
onClick={() => setExpanded(!expanded)}
>
{expanded ? <nav> <PiDotsThree />Réduire</nav> : <nav> <PiDotsThree />Voir</nav>}
</Link>
)}
</div>}
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
&nbsp;
</div>
}
</nav>
);
}
function Display_Colunm_text({ value }) {
return (
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
{value}&nbsp;
</div>
);
}
const columns_apprenant_inscriptions = [
{ field: 'id', headerName: 'id', hide: true },
{ field: '_id', headerName: '_id', hide: true },
{ field: 'session_id', headerName: 'session_id', hide: true, Width: 1 },
{ field: 'session_code', headerName: 'Code Session', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'class_title', headerName: 'Titre Formation', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'class_internal_url', headerName: 'class_internal_url', hide: true, Width: 1 },
{
field: 'status', headerName: 'Statut', hide: false, flex: 1, minWidth: 50, maxWidth: 70,
valueFormatter: (params) => {
if (String(params.value) === "0")
return "Pré.";
else if (String(params.value) === "1")
return "Ins";
else if (String(params.value) === "-1")
return "Ann";
else if (String(params.value) === "2")
return "Enc";
else
return "???";
}
},
{ field: 'client_rattachement_id', headerName: 'client__id', hide: true, Width: 1 },
{ field: 'client_rattachement_nom', headerName: 'Client', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'date_debut', headerName: 'Début', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'date_fin', headerName: 'Fin', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'presentiel', headerName: 'Présentiel', hide: false, flex: 1, minWidth: 50, maxWidth: 70 },
{ field: 'distanciel', headerName: 'Distantiel', hide: false, flex: 1, minWidth: 50, maxWidth: 70 },
{ field: 'class_recyclage_delai', headerName: 'Recycl. Delai', hide: false, flex: 1, minWidth: 100, },
{ field: 'class_recyclage_periodicite', headerName: 'Recycl. Perio', hide: false, flex: 1, minWidth: 100, },
{ field: 'nb_jour_avant_recyclage', headerName: 'Jrs avant Recycl.', hide: false, flex: 1, minWidth: 100, },
{
field: "Detail", headerName: 'Voir détail',
renderCell: (cellValues) => {
return (
<Button
onClick={(event) => {
//handleClick_edit_apprenant_From_Line(cellValues.row.id);
}}
>
<FcViewDetails />
</Button>
);
}
},
{
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
return (
<Popup
trigger={<Button
>
<CiTrash />
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, l'inscription sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
//handleClick_delete_Apprenant(event, cellValues);
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
)}
</Popup>
);
}
},
]
const [isLoading, setLoading] = useState();
const [p_filtre1, setp_filtre1] = useState("");
const [p_filtre1_value, setp_filtre1_value] = useState("");
const [p_filtre2, setp_filtre2] = useState("");
const [p_filtre2_value, setp_filtre2_value] = useState("");
const [p_filtre3, setp_filtre3] = useState("");
const [p_filtre3_value, setp_filtre3_value] = useState("");
const [p_filtre4, setp_filtre4] = useState("");
const [p_filtre4_value, setp_filtre4_value] = useState("");
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
const [alert_message, setalert_message] = useState("");
const [alert_type, setalert_type] = useState("");
function clear_alert_message() {
setalert_message("");
}
function clear_alert_type() {
setalert_type("");
}
function clear_display_alert_mysy() {
setdisplay_alert_mysy("");
}
return (
<div className="module_ent_mes_notes">
{isLoading && <div className="loader-container">
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
</div>}
{/*** Affichage des messages d'alerte*/}
{display_alert_mysy && String(display_alert_mysy) === "1" &&
<Module_Alert_Confirmation alert_message={alert_message}
alert_type={alert_type}
clear_alert_message={clear_alert_message}
clear_alert_type={clear_alert_type}
clear_display_alert_mysy={clear_display_alert_mysy}
/>
}
{/*** FIN Affichage des messages d'alerte*/}
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Notes </h3>
<div>
<div className="titre1"> Utilisez les filtres !</div>
<div className="div_row" style={{ "marginBottom": "5px" }}>
<div className="div_row_gauche texte_area_filter" >
<TextField
name="filtre1"
label="Choisir un champ"
select
sx={{ m: 1, width: '100%' }}
value={p_filtre1}
onChange={(e) => {
setp_filtre1(e.target.value)
}}
>
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Email &nbsp;&nbsp;</MenuItem>
<MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom &nbsp;</MenuItem>
<MenuItem value="prenom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Prénom &nbsp;</MenuItem>
</TextField>
</div>
<div className="div_row_droite texte_area_filter_value" >
{p_filtre1 &&
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="filtre1_value"
id="filtre1_value"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_filtre1_value}
onChange={(e) => { setp_filtre1_value(e.target.value); }}
InputProps={{
endAdornment: (
<InputAdornment position="end">
<AiFillCloseCircle
style={{ 'cursor': "pointer", "color": "orangered" }}
onClick={(e) => {
setp_filtre1_value("");
}} />
</InputAdornment>
),
}}
/>
}
</div>
{p_filtre1 && <div className='filter_bton_add'>
<Tooltip className="tooltip_css" id="my-tooltip01" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="my-tooltip01" data-tooltip-html="Ajouter une nouvelle ligne de filtre">
&nbsp; <MdAddCircleOutline onClick={(e) => {
setp_filtre2("1");
}} />
</a>
</div>}
{p_filtre1 && <div className='filter_bton_add'>
<Tooltip className="tooltip_css" id="my-tooltip02" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="my-tooltip02" data-tooltip-html="Supprimer cette ligne de filtre">
&nbsp; <MdRemoveCircleOutline onClick={(e) => {
setp_filtre1();
setp_filtre1_value();
}}
/>
</a>
</div>}
</div>
{p_filtre2 &&
<div className="div_row" style={{ "marginBottom": "5px" }}>
<div className="div_row_gauche texte_area_filter">
<TextField
name="filtre2"
label="Choisir un champ"
select
sx={{ m: 1, width: '100%' }}
options={filters}
value={p_filtre2}
onChange={(e) => {
setp_filtre2(e.target.value)
}}
>
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Email &nbsp;&nbsp;</MenuItem>
<MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom &nbsp;</MenuItem>
<MenuItem value="prenom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Prénom &nbsp;</MenuItem>
</TextField>
</div>
<div className="div_row_droite texte_area_filter" >
{String(p_filtre2).length > 3 &&
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="filtre2_value"
id="filtre2_value"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_filtre2_value}
onChange={(e) => setp_filtre2_value(e.target.value)}
InputProps={{
endAdornment: (
<InputAdornment position="end">
<AiFillCloseCircle
style={{ 'cursor': "pointer", "color": "orangered" }}
onClick={(e) => {
setp_filtre2_value("");
}} />
</InputAdornment>
),
}}
/>}
</div>
{String(p_filtre2).length > 3 && <div className='filter_bton_add'>
<Tooltip className="tooltip_css" id="my-tooltip04" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="my-tooltip04" data-tooltip-html="Supprimer cette ligne de filtre">
&nbsp; <MdRemoveCircleOutline
onClick={(e) => {
setp_filtre2();
setp_filtre2_value();
}}
/>
</a>
</div>}
</div>
}
{<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={"Get_All_Apprenant"}>Rechercher
</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
<Button variant="contained" className="bton_annule" onClick={"clean_all_filters"}>Annuler
</Button>
</div>
</div>}
</div>
<br />
</div >
);
}
export default Module_Ent_Mes_Notes;

View File

@ -0,0 +1,498 @@
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 { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import { Editor } from '@tinymce/tinymce-react';
import { FcViewDetails, FcDisapprove } from "react-icons/fc";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import Checkbox from '@mui/material/Checkbox';
import excel_icone from "../mysy_img/excel_icone.png";
import fileDownload from 'js-file-download'
import { FcInfo } from "react-icons/fc";
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcAcceptDatabase, } from "react-icons/fc";
import { format } from 'date-fns'
import InputAdornment from '@mui/material/InputAdornment';
import { AiFillCloseCircle, AiOutlineConsoleSql } from "react-icons/ai";
import Box from '@mui/material/Box';
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 img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import { Fab } from "@material-ui/core";
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
import { AiTwotoneSave } from "react-icons/ai";
import { FcEditImage } from "react-icons/fc";
import ToggleSwitch from "./ToggleSwitch";
import { FcSpeaker } from "react-icons/fc";
import Autocomplete from '@mui/material/Autocomplete';
import { FcOpenedFolder } from "react-icons/fc";
import Module_Absence from "./Module_Absence";
import { RiMoreFill } from "react-icons/ri";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import moment from "moment";
import 'moment/locale/fr';
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
import { gridClasses } from '@mui/x-data-grid';
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import {
GridToolbarContainer, GridToolbarExport, GridToolbarColumnsButton,
GridToolbarFilterButton, GridToolbarDensitySelector, GridToolbarExportContainer, useGridApiContext,
gridFilteredSortedRowIdsSelector,
gridVisibleColumnFieldsSelector,
GridValueGetterParams,
GridPreferencePanelsValue,
} from '@mui/x-data-grid';
import * as XLSX from 'xlsx';
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
import { makeStyles } from "@material-ui/core/styles";
import Paper from '@material-ui/core/Paper';
import Draggable from 'react-draggable';
import { IconButton } from '@material-ui/core';
function PaperComponent(props) {
return (
<Draggable
handle="#draggable-dialog-title"
cancel={'[class*="MuiDialogContent-root"]'}
>
<Paper {...props} />
</Draggable>
);
}
const useStyles = makeStyles((theme) => ({
dialog: {
position: 'absolute',
// left: 10,
top: 400
},
paper: {
overflowY: 'unset',
},
customizedButton: {
position: 'absolute',
left: '98%',
top: '-3%',
backgroundColor: 'lightgray',
color: 'gray',
},
}));
const Module_Ent_Mon_Planning = (props) => {
registerLocale('fr', fr);
const classes = useStyles();
const history = useHistory();
const [submenu, setsubmenu] = useState("");
const filters = [
{ value: 'email', label: 'Email' },
{ value: 'nom', label: 'Nom' },
{ value: 'prenom', label: 'Prénom' }
]
const [selectedfilt1, setselectedfilt1] = useState("");
const [selectedfilt2, setselectedfilt2] = useState("");
const [selectedfilt3, setselectedfilt3] = useState("");
function ExpandableCell_50({ value }) {
const [expanded, setExpanded] = React.useState(false);
return (
<nav>
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
{expanded ? value : value.slice(0, 50)}&nbsp;
{value.length > 50 && (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<Link
type="button"
component="button"
sx={{ fontSize: 'inherit' }}
onClick={() => setExpanded(!expanded)}
>
{expanded ? <nav> <PiDotsThree />Réduire</nav> : <nav> <PiDotsThree />Voir</nav>}
</Link>
)}
</div>}
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
&nbsp;
</div>
}
</nav>
);
}
function Display_Colunm_text({ value }) {
return (
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
{value}&nbsp;
</div>
);
}
const columns_apprenant_inscriptions = [
{ field: 'id', headerName: 'id', hide: true },
{ field: '_id', headerName: '_id', hide: true },
{ field: 'session_id', headerName: 'session_id', hide: true, Width: 1 },
{ field: 'session_code', headerName: 'Code Session', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'class_title', headerName: 'Titre Formation', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'class_internal_url', headerName: 'class_internal_url', hide: true, Width: 1 },
{
field: 'status', headerName: 'Statut', hide: false, flex: 1, minWidth: 50, maxWidth: 70,
valueFormatter: (params) => {
if (String(params.value) === "0")
return "Pré.";
else if (String(params.value) === "1")
return "Ins";
else if (String(params.value) === "-1")
return "Ann";
else if (String(params.value) === "2")
return "Enc";
else
return "???";
}
},
{ field: 'client_rattachement_id', headerName: 'client__id', hide: true, Width: 1 },
{ field: 'client_rattachement_nom', headerName: 'Client', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'date_debut', headerName: 'Début', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'date_fin', headerName: 'Fin', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'presentiel', headerName: 'Présentiel', hide: false, flex: 1, minWidth: 50, maxWidth: 70 },
{ field: 'distanciel', headerName: 'Distantiel', hide: false, flex: 1, minWidth: 50, maxWidth: 70 },
{ field: 'class_recyclage_delai', headerName: 'Recycl. Delai', hide: false, flex: 1, minWidth: 100, },
{ field: 'class_recyclage_periodicite', headerName: 'Recycl. Perio', hide: false, flex: 1, minWidth: 100, },
{ field: 'nb_jour_avant_recyclage', headerName: 'Jrs avant Recycl.', hide: false, flex: 1, minWidth: 100, },
{
field: "Detail", headerName: 'Voir détail',
renderCell: (cellValues) => {
return (
<Button
onClick={(event) => {
//handleClick_edit_apprenant_From_Line(cellValues.row.id);
}}
>
<FcViewDetails />
</Button>
);
}
},
{
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
return (
<Popup
trigger={<Button
>
<CiTrash />
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
En confirmant cette opération, l'inscription sera <i><font color="red"> définitivement supprimée</font></i>. <br />
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
//handleClick_delete_Apprenant(event, cellValues);
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
)}
</Popup>
);
}
},
]
const [isLoading, setLoading] = useState();
const [p_filtre1, setp_filtre1] = useState("");
const [p_filtre1_value, setp_filtre1_value] = useState("");
const [p_filtre2, setp_filtre2] = useState("");
const [p_filtre2_value, setp_filtre2_value] = useState("");
const [p_filtre3, setp_filtre3] = useState("");
const [p_filtre3_value, setp_filtre3_value] = useState("");
const [p_filtre4, setp_filtre4] = useState("");
const [p_filtre4_value, setp_filtre4_value] = useState("");
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
const [alert_message, setalert_message] = useState("");
const [alert_type, setalert_type] = useState("");
function clear_alert_message() {
setalert_message("");
}
function clear_alert_type() {
setalert_type("");
}
function clear_display_alert_mysy() {
setdisplay_alert_mysy("");
}
return (
<div className="module_ent_mon_planning">
{isLoading && <div className="loader-container">
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
</div>}
{/*** Affichage des messages d'alerte*/}
{display_alert_mysy && String(display_alert_mysy) === "1" &&
<Module_Alert_Confirmation alert_message={alert_message}
alert_type={alert_type}
clear_alert_message={clear_alert_message}
clear_alert_type={clear_alert_type}
clear_display_alert_mysy={clear_display_alert_mysy}
/>
}
{/*** FIN Affichage des messages d'alerte*/}
<h3 style={{ fontFamily: 'DM Sans' }}> Mes apprenants </h3>
<div>
<div className="titre1"> Utilisez les filtres !</div>
<div className="div_row" style={{ "marginBottom": "5px" }}>
<div className="div_row_gauche texte_area_filter" >
<TextField
name="filtre1"
label="Choisir un champ"
select
sx={{ m: 1, width: '100%' }}
value={p_filtre1}
onChange={(e) => {
setp_filtre1(e.target.value)
}}
>
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Email &nbsp;&nbsp;</MenuItem>
<MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom &nbsp;</MenuItem>
<MenuItem value="prenom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Prénom &nbsp;</MenuItem>
</TextField>
</div>
<div className="div_row_droite texte_area_filter_value" >
{p_filtre1 &&
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="filtre1_value"
id="filtre1_value"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_filtre1_value}
onChange={(e) => { setp_filtre1_value(e.target.value); }}
InputProps={{
endAdornment: (
<InputAdornment position="end">
<AiFillCloseCircle
style={{ 'cursor': "pointer", "color": "orangered" }}
onClick={(e) => {
setp_filtre1_value("");
}} />
</InputAdornment>
),
}}
/>
}
</div>
{p_filtre1 && <div className='filter_bton_add'>
<Tooltip className="tooltip_css" id="my-tooltip01" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="my-tooltip01" data-tooltip-html="Ajouter une nouvelle ligne de filtre">
&nbsp; <MdAddCircleOutline onClick={(e) => {
setp_filtre2("1");
}} />
</a>
</div>}
{p_filtre1 && <div className='filter_bton_add'>
<Tooltip className="tooltip_css" id="my-tooltip02" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="my-tooltip02" data-tooltip-html="Supprimer cette ligne de filtre">
&nbsp; <MdRemoveCircleOutline onClick={(e) => {
setp_filtre1();
setp_filtre1_value();
}}
/>
</a>
</div>}
</div>
{p_filtre2 &&
<div className="div_row" style={{ "marginBottom": "5px" }}>
<div className="div_row_gauche texte_area_filter">
<TextField
name="filtre2"
label="Choisir un champ"
select
sx={{ m: 1, width: '100%' }}
options={filters}
value={p_filtre2}
onChange={(e) => {
setp_filtre2(e.target.value)
}}
>
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Email &nbsp;&nbsp;</MenuItem>
<MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom &nbsp;</MenuItem>
<MenuItem value="prenom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Prénom &nbsp;</MenuItem>
</TextField>
</div>
<div className="div_row_droite texte_area_filter" >
{String(p_filtre2).length > 3 &&
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="filtre2_value"
id="filtre2_value"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_filtre2_value}
onChange={(e) => setp_filtre2_value(e.target.value)}
InputProps={{
endAdornment: (
<InputAdornment position="end">
<AiFillCloseCircle
style={{ 'cursor': "pointer", "color": "orangered" }}
onClick={(e) => {
setp_filtre2_value("");
}} />
</InputAdornment>
),
}}
/>}
</div>
{String(p_filtre2).length > 3 && <div className='filter_bton_add'>
<Tooltip className="tooltip_css" id="my-tooltip04" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="my-tooltip04" data-tooltip-html="Supprimer cette ligne de filtre">
&nbsp; <MdRemoveCircleOutline
onClick={(e) => {
setp_filtre2();
setp_filtre2_value();
}}
/>
</a>
</div>}
</div>
}
{<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={"Get_All_Apprenant"}>Rechercher
</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
<Button variant="contained" className="bton_annule" onClick={"clean_all_filters"}>Annuler
</Button>
</div>
</div>}
</div>
<br />
</div >
);
}
export default Module_Ent_Mon_Planning;

View File

@ -1,21 +1,22 @@
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 CheckOut from "./CheckOut";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import 'react-tooltip/dist/react-tooltip.css'
import fileDownload from 'js-file-download';
import Popup from 'reactjs-popup'
import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
import DatePicker from "react-datepicker";
import { FcAcceptDatabase, FcPrint } from "react-icons/fc";
import { FcViewDetails, FcInfo } from "react-icons/fc";
import "react-datepicker/dist/react-datepicker.css";
import Box from '@mui/material/Box';
import Dialog from '@mui/material/Dialog';
@ -23,7 +24,7 @@ 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 img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import Autocomplete from '@mui/material/Autocomplete';
import { gridClasses } from '@mui/x-data-grid';
@ -113,8 +114,8 @@ const Module_Evaluation_Positionnement = (props) => {
{ field: 'id', headerName: 'id', hide: true },
{ field: '_id', headerName: '_id', hide: true },
{ field: 'form_code', headerName: 'Form. Code', hide: true, minwidth: 200, flex: 1, hideable: true, resizable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'email', headerName: 'email', minwidth: 300, flex: 1, hideable: true, resizable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'nom', headerName: 'nom', minwidth: 300, flex: 1, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'email', headerName: 'email', minwidth: 300, flex: 1, hideable: false, resizable: true, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'nom', headerName: 'nom', minwidth: 300, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'prenom', headerName: 'prenom', minwidth: 300, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{
field: 'status', headerName: 'Statut', width: 100, editable: false, flex: true,
@ -130,6 +131,9 @@ const Module_Evaluation_Positionnement = (props) => {
},
},
{ field: 'mode_envoi', headerName: 'Mode Envoi', minwidth: 300, flex: 1, hide: true, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{
field: 'date_envoie', headerName: 'Date Envoi', width: 150, editable: false,
valueFormatter: (params) => {
@ -230,8 +234,11 @@ const Module_Evaluation_Positionnement = (props) => {
}
useEffect(() => {
setactionmass_q_position_val("");
setselected_session_id(props.related_collection_recid);
Getall_Survey_Q_Positionnement_By_Session();
GetListeInscrit();
}, [])
@ -241,7 +248,7 @@ const Module_Evaluation_Positionnement = (props) => {
{ "id": "email", "label": "Email", "value": "email" },
]
const [selected_formulaire_id, setselected_formulaire_id] = useState();
const [selected_formulaire_id, setselected_formulaire_id] = useState("");
const [selected_formulaire_type, setselected_formulaire_type] = useState("");
const [New_Getall_Partner_Formulaires_with_Filter, setNew_Getall_Partner_Formulaires_with_Filter] = useState([]);
@ -326,6 +333,14 @@ const Module_Evaluation_Positionnement = (props) => {
const [Create_List_Survey_For_Session_For_Inscrit_message, setCreate_List_Survey_For_Session_For_Inscrit_message] = useState();
const [Create_List_Survey_For_Session_For_Inscrit_result, setCreate_List_Survey_For_Session_For_Inscrit_result] = useState();
function Create_List_Survey_For_Session_For_Inscrit() {
if (String(selected_formulaire_id).length < 5) {
setdisplay_alert_mysy("1");
setalert_message("Vous devez choisir un questionnaire de positionnement");
setalert_type("error");
return;
}
var form = new FormData();
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
const stored_cookie = getCookie('tokenmysypart');
@ -335,7 +350,14 @@ const Module_Evaluation_Positionnement = (props) => {
form.append("survey_type", "pos");
form.append("sending_date", "");
var tab_inscrit_ids = []
for (var i = 0; i < val.length; i++) {
tab_inscrit_ids.push(val[i]._id)
}
form.append("tab_inscrit_ids", tab_inscrit_ids);
//alert(" mysession = "+mysession);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Init_Survey_Tab_For_All_Session_Inscrit/";
@ -374,7 +396,7 @@ const Module_Evaluation_Positionnement = (props) => {
setLoading(false);
console.warn('Create_List_Survey_For_Session_For_Inscrit : Not good man :( mysearchtext = ' + error);
setCreate_List_Survey_For_Session_For_Inscrit_api("false");
// alert(" Impossible d'initialiser la liste des enquête de positionnement ");
// alert(" Impossible d'initialiser la liste des enquête de positionnement ");
setdisplay_alert_mysy("1");
setalert_message(" Impossible d'initialiser la liste des enquête de positionnement ");
setalert_type("error");
@ -383,8 +405,10 @@ const Module_Evaluation_Positionnement = (props) => {
}
const New_Option_q_position_Masse = [
{ "id": "resend", "label": "(R)envoyer", "value": "resend" },
{ "id": "resend", "label": "(R)envoyer email", "value": "resend" },
{ "id": "cold_eval_qr_code", "label": "Générer un QR Code", "value": "cold_eval_qr_code" },
{ "id": "print", "label": "Export (PDF) ", "value": "print" },
{ "id": "delete_survey", "label": "Supprimer ", "value": "delete_survey" },
]
const [actionmass_q_position_val, setactionmass_q_position_val] = useState();
@ -431,9 +455,84 @@ const Module_Evaluation_Positionnement = (props) => {
}
else if (String(actionmass_q_position_val) === String("delete_survey")) {
var tab_ids_survey = []
for (var i = 0; i < selectionModel_q_position.length; i++) {
var myid = parseInt(String(selectionModel_q_position[i]));
var line = JSON.parse(Getall_Survey_Q_Positionnement_By_Session_result[myid]);
var line_id = JSON.parse(Getall_Survey_Q_Positionnement_By_Session_result[myid])._id;
tab_ids_survey.push(line_id);
}
// console.log(" ### tab_ids_survey === ", tab_ids_survey);
Delete_Survey_Ids(tab_ids_survey);
}
else if (String(actionmass_q_position_val) === String("cold_eval_qr_code")) {
var tab_ids_survey = []
for (var i = 0; i < selectionModel_q_position.length; i++) {
var myid = parseInt(String(selectionModel_q_position[i]));
var line = JSON.parse(Getall_Survey_Q_Positionnement_By_Session_result[myid]);
var line_id = JSON.parse(Getall_Survey_Q_Positionnement_By_Session_result[myid])._id;
tab_ids_survey.push(line_id);
}
// console.log(" ### tab_ids_survey === ", tab_ids_survey);
Export_QR_CODE_Q_Position(tab_ids_survey);
}
setactionmass_q_position_val("");
}
function Export_QR_CODE_Q_Position(tab_ids_survey) {
if (tab_ids_survey.length <= 0) {
// alert(" Aucune ligne selectionnée ");
setdisplay_alert_mysy("1");
setalert_message(" Aucune ligne selectionnée ");
setalert_type("error");
return;
}
const stored_cookie = getCookie('tokenmysypart');
var nom_fichier_cmd = "Q_Position_QR_Code.png";
var url = process.env.REACT_APP_API_URL + "myclass/api/Create_Evaluation_QR_Code_From_Survey/" + stored_cookie + "/" + selected_session_id + "/" + tab_ids_survey + "/pos";
setLoading(true);
axios.get(url, { responseType: 'blob', },)
.then((res) => {
setLoading(false);
//console.log(" In Export_Dashbord_to_CSV res.data = " + res.data);
if (String(res.data) === String("false")) {
alert("Impossible de générer le QR code (2) ");
} else {
fileDownload(res.data, nom_fichier_cmd)
}
}).catch((error) => {
setLoading(false);
console.error('Error:', error);
alert(" Impossible de générer le QR code ")
});
setLoading(false);
}
const [Send_Survey_By_Email_For_Ids_api, setSend_Survey_By_Email_For_Ids_api] = useState();
const [Send_Survey_By_Email_For_Ids_message, setSend_Survey_By_Email_For_Ids_message] = useState();
@ -487,7 +586,68 @@ const Module_Evaluation_Positionnement = (props) => {
setLoading(false);
console.warn('Send_Survey_By_Email_For_Ids : Not good man :( mysearchtext = ' + error);
setSend_Survey_By_Email_For_Ids_api("false");
// alert(" Impossible d'envoyer les demandes");
// alert(" Impossible d'envoyer les demandes");
setdisplay_alert_mysy("1");
setalert_message("Impossible d'envoyer les demandes");
setalert_type("error");
})
}
const [Delete_Survey_Ids_api, setDelete_Survey_Ids_api] = useState();
const [Delete_Survey_Ids_message, setDelete_Survey_Ids_message] = useState();
const [Delete_Survey_Ids_result, setDelete_Survey_Ids_result] = useState();
function Delete_Survey_Ids(tab_survey) {
var form = new FormData();
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("tab_ids", tab_survey);
//alert(" mysession = "+mysession);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_List_Survey/";
setLoading(true);
axios.post(myurl, form).then(res => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In UpdateStagiaireData res.data.status = " + res.data.status);
//console.log(" In UpdateStagiaireData res.data.message r_class = " + res.data.message);
setDelete_Survey_Ids_api("true");
setDelete_Survey_Ids_result(res.data.message);
Getall_Survey_Q_Positionnement_By_Session();
setactionmass_q_position_val("");
setselectionModel_q_position([]);
// alert(res.data.message)
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("success");
} else if (String(res.data.status) === String("Err_Connexion")) {
alert('Erreur: ' + res.data.message);
history.push("/Connexion");
}
else {
setDelete_Survey_Ids_api("false");
setDelete_Survey_Ids_message(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
setLoading(false);
console.warn('Delete_Survey_Ids : Not good man :( mysearchtext = ' + error);
setDelete_Survey_Ids_api("false");
// alert(" Impossible d'envoyer les demandes");
setdisplay_alert_mysy("1");
setalert_message("Impossible d'envoyer les demandes");
setalert_type("error");
@ -510,7 +670,7 @@ const Module_Evaluation_Positionnement = (props) => {
setLoading(false);
//console.log(" In Export_Dashbord_to_CSV res.data = " + res.data);
if (String(res.data) === String("false")) {
// alert("Impossible d'exporter les réponses (2) ");
// alert("Impossible d'exporter les réponses (2) ");
setdisplay_alert_mysy("1");
setalert_message("Impossible d'exporter les réponses (2)");
setalert_type("error");
@ -521,7 +681,7 @@ const Module_Evaluation_Positionnement = (props) => {
}).catch((error) => {
setLoading(false);
console.error('Error:', error);
// alert(" Impossible d'exporter les réponses ")
// alert(" Impossible d'exporter les réponses ")
setdisplay_alert_mysy("1");
setalert_message("Impossible d'exporter les réponses");
setalert_type("error");
@ -597,6 +757,103 @@ const Module_Evaluation_Positionnement = (props) => {
setdisplay_alert_mysy("");
}
const [New_GetListeInscrit_insc_result, setNew_GetListeInscrit_insc_result] = useState([]);
const [GetListeIinscrit_insc_api, setGetListeIinscrit_insc_api] = useState();
const [GetListeIinscrit_insc_meassage, setGetListeIinscrit_insc_meassage] = useState();
const [GetListeIinscrit_insc_result, setGetListeIinscrit_insc_result] = useState([])
function GetListeInscrit() {
var form = new FormData();
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("class_internal_url", props.class_internal_url);
form.append("session_id", props.related_collection_recid);
form.append("status", "1");
/*
/!\ : Cette fonction a besoin d'un token actif
*/
if (String(stored_cookie) === String("")) {
alert(" La session n'est plus valide ");
history.push("/Connexion");
return;
}
setLoading(true);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllClassStagiaire/";
fetch(myurl,
{
method: 'POST',
body: form,
})
.then((data) => data.json())
.then((data) => {
setLoading(false);
//console.log(' GetListeInscrit : Success:', data['message'], "data['status'] = ", data['status']);
setGetListeIinscrit_insc_result(data['message']);
if (String(data['status']) === String("true")) {
//console.log("erreur rrrr:" + data['status'])
setGetListeIinscrit_insc_api("true");
var new_data2 = [];
const new_data = data['message'].map((x) => {
//---
var localid = JSON.parse(x).id;
var local_id = JSON.parse(x)._id;
var local_nom = JSON.parse(x).nom;
var local_prenom = JSON.parse(x).prenom;
//---
var node = {
"_id": local_id,
"id": localid,
"label": local_prenom + " " + local_nom,
"nom": local_nom,
"prenom": local_prenom,
};
new_data2.push(node);
});
if (new_data2.length > 0)
setNew_GetListeInscrit_insc_result(new_data2);
} else if (String(data['status']) === String("Err_Connexion")) {
alert('Erreur: ' + data['message']);
history.push("/Connexion");
}
else {
setGetListeIinscrit_insc_api("false");
}
}).catch((error) => {
setLoading(false);
console.error('Error:', error);
setGetListeIinscrit_insc_api("false");
});
}
const fixedVal = [];
const [val, setVal] = useState([...fixedVal]);
return (
<div className="module_evaluation_positionnement">
@ -615,6 +872,7 @@ const Module_Evaluation_Positionnement = (props) => {
}
{/*** FIN Affichage des messages d'alerte*/}
<Dialog
open={Dialog_1_open}
// onClose={Dialog_1_handleClose}
@ -644,7 +902,7 @@ const Module_Evaluation_Positionnement = (props) => {
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title">MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title">MySy Information</DialogTitle>
<DialogContent className="DialogContent_width">
<DialogContentText>
{Dialog_1_message}
@ -700,7 +958,6 @@ const Module_Evaluation_Positionnement = (props) => {
</Dialog>
{/* Dialog pour gerer les LIST_POSITION_QUESTION */}
<Dialog
open={Dialog_LIST_POSITION_QUESTION_open}
@ -730,14 +987,52 @@ const Module_Evaluation_Positionnement = (props) => {
aria-labelledby="draggable-dialog-title"
>
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title">MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title">MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContentText>
{Dialog_1_message}
</DialogContentText>
<div className="session_caract_Dialog">
<Tooltip className="tooltip_css" id="tooltip_emarge01" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_emarge01" data-tooltip-html="Si vide, tous les apprenants sont pris en compte ">
Apprenant &nbsp; <FcInfo />
</a>
<br />
{New_GetListeInscrit_insc_result.length > 0 && <Autocomplete
disablePortal
name="inscrit_data_list"
id="inscrit_data_list"
// value={New_Option_Type_Cout.filter((data) => (data).id === String(p_detail_fin_data_type_cout))[0].label}
<div className="session_caract_Dialog" > Choisir un questionnaire de positionnement
fullWidth
options={New_GetListeInscrit_insc_result}
multiple
onChange={(event, newValue) => {
setVal([
...fixedVal,
...newValue.filter((i) => fixedVal.indexOf(i) === -1),
]);
}}
value={val}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option (tout si vide)"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>}
</div>
<div className="session_caract_Dialog" > <b> Choisir un questionnaire de positionnement </b>
<Autocomplete
disablePortal
name="event_dialog_version_q_position"
@ -748,7 +1043,6 @@ const Module_Evaluation_Positionnement = (props) => {
onChange={(event, value) => {
if (value && value._id) {
setselected_formulaire_id(value._id);
} else {
@ -781,6 +1075,13 @@ const Module_Evaluation_Positionnement = (props) => {
<div className="div_row_gauche">
<Button onClick={(e) => {
if (String(selected_formulaire_id).length < 5) {
setdisplay_alert_mysy("1");
setalert_message("Vous devez choisir un questionnaire de positionnement");
setalert_type("error");
return;
}
var tab_ids_inscription = []
for (var i = 0; i < selectionModel_q_position.length; i++) {
var myid = parseInt(String(selectionModel_q_position[i]));
@ -795,7 +1096,7 @@ const Module_Evaluation_Positionnement = (props) => {
Dialog_LIST_POSITION_QUESTION_handleClose_buton();
}}
className="bton_enreg_dialog">Initialiser la liste </Button>
className="bton_enreg_dialog">(R)Initialiser </Button>
</div>
@ -813,57 +1114,12 @@ const Module_Evaluation_Positionnement = (props) => {
<div>
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem" }}>
<Button className="bton_emarge" onClick={(event, value) => {
setVal([]);
<Popup
trigger={
<Button className="bton_emarge">Initialiser le questionnaire</Button>
}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
<font> Confirmez la ()initialisation l'enquête. <br />
<font color="red"> /!\ Si une enquête de positionnement existe pour cette session, elle sera supprimée et récréée </font>
</font>
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
Getall_Partner_Formulaires_with_Filter();
setDialog_LIST_POSITION_QUESTION_open(true);
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
//console.log('modal closed ');
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
)}
</Popup>
Getall_Partner_Formulaires_with_Filter();
setDialog_LIST_POSITION_QUESTION_open(true);
}}>Initialiser Q. Position</Button>
@ -929,8 +1185,8 @@ const Module_Evaluation_Positionnement = (props) => {
onSelectionModelChange={(newSelectionModel) => {
setselectionModel_q_position(newSelectionModel);
/*if (newSelectionModel.length === 1)
handleClick_edit_session_From_Line(newSelectionModel);*/
if (newSelectionModel.length <= 0)
setactionmass_q_position_val("");
if (newSelectionModel.length !== 1) {
}
@ -949,6 +1205,7 @@ const Module_Evaluation_Positionnement = (props) => {
form_code: JSON.parse(item).formulaire.code,
date_envoie: JSON.parse(item).date_envoi,
date_reponse: JSON.parse(item).date_reponse,
mode_envoi: JSON.parse(item).mode_envoi,
}
))}
@ -1027,7 +1284,9 @@ const Module_Evaluation_Positionnement = (props) => {
onChange={(event, value) => {
if (value && value.value) {
if (String(value.value) === "reinit" || String(value.value) === "resend"
|| String(value.value) === "print") {
|| String(value.value) === "print"
|| String(value.value) === "delete_survey"
|| String(value.value) === "cold_eval_qr_code") {
setactionmass_q_position_val(value.value);
@ -1045,8 +1304,7 @@ const Module_Evaluation_Positionnement = (props) => {
/>
{actionmass_q_position_val && String(actionmass_q_position_val).length > 1 && <nav className='block_en_mass_bton_action'>
{actionmass_q_position_val && String(actionmass_q_position_val).length > 2 && <nav className='block_en_mass_bton_action'>
<Popup
trigger={<Button className="bton_enreg" style={{ "width": "90%" }}>
@ -1076,6 +1334,18 @@ const Module_Evaluation_Positionnement = (props) => {
Confirmer l'export PDF de questionnaire de positionnement pour {selectionModel_q_position.length} ligne(s).
</nav>}
{String(actionmass_q_position_val) === "delete_survey" &&
<font color="red"> Seule les demandes au statut <b>'Init' </b> sont supprimables<br />
<font color="red"> Confirmer la suppression en masse de {selectionModel_q_position.length} questionnaire(s) de positionnement.
</font>
</font>}
{actionmass_q_position_val && String(actionmass_q_position_val) === "cold_eval_qr_code" && <nav>
Générer le QR du questionnaire de positionnement {selectionModel_q_position.length} ligne(s).
</nav>}
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
@ -1087,10 +1357,11 @@ const Module_Evaluation_Positionnement = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
setactionmass_q_position_val("");
}}
>
Annuler

View File

@ -1,55 +1,30 @@
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 img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
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 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import add_plus from "../mysy_img/plus.png";
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import "react-datepicker/dist/react-datepicker.css";
import InputAdornment from '@mui/material/InputAdornment';
import { AiFillCloseCircle } from "react-icons/ai";
import Box from '@mui/material/Box';
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 { HiOutlineDocumentDuplicate } from "react-icons/hi2";
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
import { Fab } from "@material-ui/core";
import fileDownload from 'js-file-download'
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
import Timeline from '@mui/lab/Timeline';
import TimelineItem from '@mui/lab/TimelineItem';
import TimelineSeparator from '@mui/lab/TimelineSeparator';
import TimelineConnector from '@mui/lab/TimelineConnector';
import TimelineContent from '@mui/lab/TimelineContent';
import TimelineDot from '@mui/lab/TimelineDot';
import TimelineOppositeContent, {
timelineOppositeContentClasses,
} from '@mui/lab/TimelineOppositeContent';
import FastfoodIcon from '@mui/icons-material/Fastfood';
import LaptopMacIcon from '@mui/icons-material/LaptopMac';
import HotelIcon from '@mui/icons-material/Hotel';
import RepeatIcon from '@mui/icons-material/Repeat';
import Typography from '@mui/material/Typography';
} from '@mui/lab/TimelineOppositeContent';
import { FcInfo } from "react-icons/fc";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
const Module_Historique_Action = (props) => {
const history = useHistory();
@ -78,14 +53,16 @@ const Module_Historique_Action = (props) => {
useEffect(() => {
//menu_info();
Get_List_Historic_Action();
//var divh = document.getElementById('div_header').offsetTop;
}, [related_collection_recid]);
const [max_history_line, setmax_history_line] = useState("");
const [Get_List_Historic_Action_api, setGet_List_Historic_Action_api] = useState();
const [Get_List_Historic_Action_message, setGet_List_Historic_Action_message] = useState();
const [Get_List_Historic_Action_result, setGet_List_Historic_Action_result] = useState();
@ -110,6 +87,7 @@ const Module_Historique_Action = (props) => {
if (String(res.data.status) === String("true")) {
setGet_List_Historic_Action_api("true");
setGet_List_Historic_Action_result(res.data.message);
setmax_history_line(res.data.max_line);
}
else if (String(res.data.status) === String("Err_Connexion")) {
@ -145,7 +123,7 @@ const Module_Historique_Action = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
<DialogContent>
<DialogContentText>
{Dialog_1_message}
@ -158,8 +136,12 @@ const Module_Historique_Action = (props) => {
</DialogActions>
</Dialog>
<div className="div_row" id="div_header" style={{border:"none"}}>
<nav style={{fontSize:"calc(1.1rem + .3vw)", color:"rgb(10, 42, 77)"}}> Historique des actions </nav>
<div className="div_row" id="div_header" style={{ border: "none" }}>
<Tooltip className="tooltip_css" id="tooltip_historique01" style={{ "fontSize": "12px", fontFamily: "DM Sans" }} />
<a data-tooltip-id="tooltip_historique01" data-tooltip-html={" Affichage des " + `${max_history_line}` + " derniers événements(s) "}>
<nav style={{ fontSize: "calc(1.1rem + .3vw)", color: "rgb(10, 42, 77)", fontFamily: "DM Sans" }}> Historique des actions &nbsp; <FcInfo /> </nav>
</a>
</div>
<Timeline
@ -174,14 +156,14 @@ const Module_Historique_Action = (props) => {
Get_List_Historic_Action_result.map((event) => (
<TimelineItem>
<TimelineOppositeContent color="textSecondary" style={{"fontSize":"13px"}}>
{JSON.parse(event).date_update}
<TimelineOppositeContent color="textSecondary" style={{ "fontSize": "13px" }}>
{JSON.parse(event).date_update}
</TimelineOppositeContent>
<TimelineSeparator>
<TimelineDot />
<TimelineConnector />
</TimelineSeparator>
<TimelineContent style={{"fontSize":"13px"}}><b>{JSON.parse(event).connected_user_nom} :</b> {JSON.parse(event).action_description} </TimelineContent>
<TimelineContent style={{ "fontSize": "13px" }}><b>{JSON.parse(event).connected_user_nom} :</b> {JSON.parse(event).action_description} </TimelineContent>
</TimelineItem>
))}

View File

@ -21,6 +21,8 @@ import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcSearch } from "react-icons/fc";
import { FcAlarmClock, FcMultipleSmartphones, FcWorkflow } from "react-icons/fc";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -83,7 +85,7 @@ import { AiOutlineClear } from "react-icons/ai";
import { Parser } from "html-to-react";
const Module_IA = (props) => {
registerLocale('fr', fr);
const history = useHistory();
const [submenu, setsubmenu] = useState("");
const [rowss, setRows] = useState([]);

View File

@ -21,6 +21,8 @@ import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcSearch } from "react-icons/fc";
import { FcAlarmClock, FcMultipleSmartphones, FcWorkflow } from "react-icons/fc";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -80,7 +82,7 @@ import Checkbox from '@mui/material/Checkbox';
const Module_Jury_Selection_Apprenants = (props) => {
registerLocale('fr', fr);
const history = useHistory();
const [submenu, setsubmenu] = useState("");
const [rowss, setRows] = useState([]);

View File

@ -1,6 +1,5 @@
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";
@ -8,75 +7,21 @@ import { getCookie, setCookie } from 'react-use-cookie';
import { useHistory } from "react-router-dom";
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, FcInfo } 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 Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcSearch } from "react-icons/fc";
import { FcAlarmClock, FcMultipleSmartphones, FcWorkflow } 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 'moment/locale/fr';
import InputAdornment from '@mui/material/InputAdornment';
import { AiFillCloseCircle, AiOutlineConsoleSql } 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 { RestoreFromTrashRounded } from "@mui/icons-material";
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import { Fab } from "@material-ui/core";
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
import { confirmAlert } from 'react-confirm-alert';
import ToggleSwitch from "./ToggleSwitch";
import Module_Historique_Action from "./Module_Historique_Action";
import { HiDocumentCheck } from "react-icons/hi2";
import { BsSend } from "react-icons/bs";
import Autocomplete from '@mui/material/Autocomplete';
import { FcOpenedFolder } from "react-icons/fc";
import { gridClasses } from '@mui/x-data-grid';
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import Module_Editique from "./Module_Editique";
import Module_Attestation_Formation from "./Module_Attestation_Formation";
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint, FcPlanner } from "react-icons/fc";
import { CiBoxList } from "react-icons/ci";
import FullCalendar from "@fullcalendar/react";
import daygridPlugin from "@fullcalendar/daygrid";
import interactionPlugin from "@fullcalendar/interaction";
import timeGridPlugin from "@fullcalendar/timegrid";
import resourceTimeGridPlugin from '@fullcalendar/resource-timegrid';
import Radio from '@mui/material/Radio';
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 allLocales from '@fullcalendar/core/locales-all'
import listPlugin from '@fullcalendar/list';
import multiMonthPlugin from '@fullcalendar/multimonth'
import { FcAcceptDatabase, } from "react-icons/fc";
import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';
import CheckBoxIcon from '@mui/icons-material/CheckBox';
import Checkbox from '@mui/material/Checkbox';
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
const Module_Selection_Apprenants = (props) => {
@ -292,7 +237,7 @@ const Module_Selection_Apprenants = (props) => {
}
}
const [Record_Membres_To_Groupe_Inscrit_api, setRecord_Membres_To_Groupe_Inscrit_api] = useState();
const [Record_Membres_To_Groupe_Inscrit_message, setRecord_Membres_To_Groupe_Inscrit_message] = useState();
const [Record_Membres_To_Groupe_Inscrit_result, setRecord_Membres_To_Groupe_Inscrit_result] = useState();
@ -306,7 +251,6 @@ const Module_Selection_Apprenants = (props) => {
form.append("tab_inscriptions_ids", list_inscription_id);
setLoading(true);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_Groupe_Inscrit_Membres/";
@ -321,7 +265,10 @@ const Module_Selection_Apprenants = (props) => {
setselectionModel_participants([]);
setactionmass_preinsc_val("");
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("success");
} else if (String(res.data.status) === String("Err_Connexion")) {
@ -333,7 +280,10 @@ const Module_Selection_Apprenants = (props) => {
setLoading(false);
setRecord_Membres_To_Groupe_Inscrit_api("false");
setRecord_Membres_To_Groupe_Inscrit_message(res.data.message);
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
@ -341,7 +291,11 @@ const Module_Selection_Apprenants = (props) => {
setLoading(false);
console.warn('Record_Membres_To_Groupe_Inscrit : Not good man :( mysearchtext = ' + error);
setRecord_Membres_To_Groupe_Inscrit_api("false");
alert(" Impossible d'inscrire les apprenants au groupe ");
// alert(" Impossible d'inscrire les apprenants au groupe ");
setdisplay_alert_mysy("1");
setalert_message(" Impossible d'inscrire les apprenants au groupe ");
setalert_type("error");
})
}
@ -426,7 +380,10 @@ const Module_Selection_Apprenants = (props) => {
else {
setGet_List_UE_From_Class_Id_api("false");
setGet_List_UE_From_Class_Id_message(res.data.message);
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
@ -434,7 +391,11 @@ const Module_Selection_Apprenants = (props) => {
setLoading(false);
console.warn('Not good man :( Get_List_UE_From_Class_Id = ', error);
setGet_List_UE_From_Class_Id_api("false");
alert(" Impossible de recuperer la liste des UE de la formation");
//alert(" Impossible de recuperer la liste des UE de la formation");
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(" Impossible de recuperer la liste des UE de la formation");
setalert_type("error");
//setmyApimyApiMessage("")
})
}
@ -522,7 +483,10 @@ const Module_Selection_Apprenants = (props) => {
else {
setGetall_Class_List_Evalution_api("false");
setGetall_Class_List_Evalution_message(res.data.message);
alert(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
@ -530,7 +494,11 @@ const Module_Selection_Apprenants = (props) => {
setLoading(false);
console.warn('Not good man :( Getall_Class_List_Evalution = ', error);
setGetall_Class_List_Evalution_api("false");
alert(" Impossible de recuperer la liste des évaluations de la formatio");
// alert(" Impossible de recuperer la liste des évaluations de la formation");
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(" Impossible de recuperer la liste des évaluations de la formation");
setalert_type("error");
//setmyApimyApiMessage("")
})
}
@ -658,7 +626,20 @@ const Module_Selection_Apprenants = (props) => {
const [ueChanged, setueChanged] = useState("");
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
const [alert_message, setalert_message] = useState("");
const [alert_type, setalert_type] = useState("");
function clear_alert_message() {
setalert_message("");
}
function clear_alert_type() {
setalert_type("");
}
function clear_display_alert_mysy() {
setdisplay_alert_mysy("");
}
return (
<div className="moduleselectionevaluationapprenants">
@ -666,6 +647,20 @@ const Module_Selection_Apprenants = (props) => {
{isLoading && <div className="loader-container">
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
</div>}
{/*** Affichage des messages d'alerte*/}
{display_alert_mysy && String(display_alert_mysy) === "1" &&
<Module_Alert_Confirmation alert_message={alert_message}
alert_type={alert_type}
clear_alert_message={clear_alert_message}
clear_alert_type={clear_alert_type}
clear_display_alert_mysy={clear_display_alert_mysy}
/>
}
{/*** FIN Affichage des messages d'alerte*/}
<nav style={{ "border": "None", "fontSize": "20px", "paddingTop": "10px", "paddingLeft": "5px" }}> Selection des Apprenants & Groupe d'apprenants </nav>

View File

@ -149,7 +149,7 @@ const Module_Selection_Evaluation_Apprenants = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();
@ -425,7 +425,7 @@ const Module_Selection_Evaluation_Apprenants = (props) => {
var line_json = line;
console.log(" line_json = ", line_json);
// console.log(" line_json = ", line_json);
//console.log(" line_json['_id'] = ", line_json['_id']);
tab_mongo_preins_ids.push(line_json._id)

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
import React, { useRef, useState, useEffect } from "react";
import TextField from '@mui/material/TextField';
import fileDownload from 'js-file-download';
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
import Button from '@mui/material/Button';
import axios from "axios";
@ -219,54 +219,26 @@ const Module_Session_Notes_Classement = (props) => {
},
{ field: 'credit_acquis', headerName: 'Credit acquis', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'rang_calculation_date', headerName: 'Date Calcul', minwidth: 100, flex: 1, hide: true, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'jury_note', headerName: 'Note Jury', width: 200, editable: jury_cell_editable, renderCell: (params) => <ExpandableCell_50_bg_hiligt_red_color {...params} />, align: "center", },
{ field: 'jury_observation', headerName: 'Observ. Jury', width: 200, editable: jury_cell_editable, renderCell: (params) => <ExpandableCell_50_bg_hiligt_red_color {...params} />, align: "left", },
{ field: 'jury_note', headerName: 'Note Jury', width: 200, editable: false, renderCell: (params) => <ExpandableCell_50_bg_hiligt_red_color {...params} />, align: "center", },
{ field: 'jury_observation', headerName: 'Observ. Jury', width: 200, editable: false, renderCell: (params) => <ExpandableCell_50_bg_hiligt_red_color {...params} />, align: "left", },
{
field: 'jury_validation', headerName: 'Validation Jury', width: 150, hide: false, editable: jury_cell_editable,
field: 'jury_validation', headerName: 'Validation Jury', width: 150, hide: false, editable: false,
renderCell: (cellValues) => {
return (
<nav>
{New_Option_Valisation_Jury && New_Option_Valisation_Jury.length > 0 && jury_cell_editable === true && <Autocomplete
disablePortal
name="filtre1"
id="filtre1"
value={New_Option_Valisation_Jury.filter((data) => (data).value === String(cellValues.row.jury_validation))[0].label}
options={New_Option_Valisation_Jury}
onChange={(event, value) => {
if (value && value.value) {
mysy_onchange_list(cellValues.row.id, "jury_validation_champ_technique", value.value);
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder=""
inputProps={{ ...params.inputProps, style: { fontSize: 10, height: "1rem" } }}
/>
}
/>}
{jury_cell_editable !== true &&
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
{cellValues.row.jury_validation_champ_technique && String(cellValues.row.jury_validation_champ_technique) === "1" && "Oui"}
{cellValues.row.jury_validation_champ_technique && String(cellValues.row.jury_validation_champ_technique) === "0" && "Non"}
</div>
}
</nav>
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
{cellValues.row.jury_validation && String(cellValues.row.jury_validation) === "1" && "Oui"}
{cellValues.row.jury_validation && String(cellValues.row.jury_validation) === "0" && "Non"}
</div>
);
}
},
{
field: 'jury_validation_champ_technique', headerName: 'Validation Jury_tech', width: 200, renderCell: (params) => <ExpandableCell_50_bg_hiligt_red_color {...params} />, align: "center",
field: 'jury_validation_champ_technique', headerName: 'Validation Jury_tech', width: 0, hide: true, renderCell: (params) => <ExpandableCell_50_bg_hiligt_red_color {...params} />, align: "center",
},
{
@ -361,7 +333,7 @@ const Module_Session_Notes_Classement = (props) => {
{ field: 'ue_id', headerName: 'ue_id', hide: true },
{ field: 'class_id', headerName: 'class_id', hide: true },
{ field: 'class_id_external_code', headerName: 'Code Formation', hide: true },
{ field: 'ue_id_code', headerName: 'UE Code', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'ue_id_code', headerName: 'UE/Matière', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'inscription_id_nom', headerName: 'Nom', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'inscription_id_prenom', headerName: 'Prenom', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
@ -387,7 +359,7 @@ const Module_Session_Notes_Classement = (props) => {
{ field: 'ue_id', headerName: 'ue_id', hide: true },
{ field: 'class_id', headerName: 'class_id', hide: true },
{ field: 'class_id_external_code', headerName: 'Code Formation', hide: true },
{ field: 'ue_id_code', headerName: 'UE Code', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'ue_id_code', headerName: 'UE/Matière', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'inscription_id_nom', headerName: 'Nom', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'inscription_id_prenom', headerName: 'Prenom', minwidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
@ -396,7 +368,7 @@ const Module_Session_Notes_Classement = (props) => {
{ field: 'seuil_validation', headerName: 'Seuil val.', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'ue_coefficient', headerName: 'Coeff.', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'credit', headerName: 'Credit.', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'moyenne_session_ue', headerName: 'Moy. Ens.', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{
field: 'ue_validation', headerName: 'Validé', minwidth: 100, flex: 1, hide: false, editable: false,
@ -416,11 +388,12 @@ const Module_Session_Notes_Classement = (props) => {
{ field: 'note_td', headerName: 'note_td', hide: true },
{ field: 'note_tp', headerName: 'note_tp', hide: true },
{ field: 'note_examen', headerName: 'note_examen', hide: true },
{ field: 'jury_note', headerName: 'Note Jury', hide: true },
{ field: 'jury_observation', headerName: 'Observ. Jury', width: 200, editable: jury_cell_editable, renderCell: (params) => <ExpandableCell_50_bg_hiligt_red_color {...params} />, align: "left", },
{ field: 'jury_note', headerName: 'Note Jury', width: 200, editable: jury_cell_editable, renderCell: (params) => <ExpandableCell_50_bg_hiligt_red_color {...params} />, align: "left", },
{ field: 'detail', headerName: 'Detail Note', minwidth: 100, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'detail', headerName: 'Detail Note', hide: true },
{
field: 'gestion', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center",
@ -865,6 +838,8 @@ const Module_Session_Notes_Classement = (props) => {
var inscription_id_nom = JSON.parse(x).inscription_id_nom;
var inscription_id_prenom = JSON.parse(x).inscription_id_prenom;
var moyenne_session_ue = JSON.parse(x).moyenne_session_ue;
//---
@ -894,6 +869,7 @@ const Module_Session_Notes_Classement = (props) => {
"inscription_id_mail": inscription_id_mail,
"inscription_id_nom": inscription_id_nom,
"inscription_id_prenom": inscription_id_prenom,
"moyenne_session_ue": moyenne_session_ue,
};
new_data2.push(node);
@ -922,6 +898,7 @@ const Module_Session_Notes_Classement = (props) => {
"seuil_validation": "",
"ue_coefficient": "",
"ue_validation": "",
"moyenne_session_ue": "",
};
new_data2.push(node);
@ -1076,7 +1053,7 @@ const Module_Session_Notes_Classement = (props) => {
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("archive", "0");
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetAllValideSessionPartner_List/";
@ -1535,7 +1512,7 @@ const Module_Session_Notes_Classement = (props) => {
const New_Option_Filter = [
{ "id": "ue_id", "label": "Code UE", "value": "ue_id" },
{ "id": "ue_id", "label": "UE/matière", "value": "ue_id" },
{ "id": "inscrit_id", "label": "Apprenant ", "value": "inscrit_id" },
{ "id": "", "label": "", "value": "" },
{ "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres.
@ -1946,7 +1923,7 @@ const Module_Session_Notes_Classement = (props) => {
function getExcelData(apiRef) {
// Select rows and columns
const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
// Format the data. Here we only keep the value
const data = filteredSortedRowIds.map((id) => {
@ -1971,7 +1948,7 @@ const Module_Session_Notes_Classement = (props) => {
function handleExport(apiRef, data_colums) {
const data = getExcelData(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
const local_config = {
@ -2036,6 +2013,7 @@ const Module_Session_Notes_Classement = (props) => {
const [actionmass_ftion_val, setactionmass_ftion_val] = useState();
const New_Option = [
{ "id": "0", "label": "(R)Inscrire", "value": "inscription" },
{ "id": "1", "label": "Imp. Bulletin", "value": "print_bulletin" },
{ "id": "2", "label": "", "value": "" },
]
@ -2190,6 +2168,51 @@ const Module_Session_Notes_Classement = (props) => {
}
function Download_Bulletins_Notes() {
const stored_cookie = getCookie('tokenmysypart');
var nom_fichier_cmd = "Bulletin.zip";
var tab_inscrit_ids = []
for (var i = 0; i < selectionModel_note_Session_classement.length; i++) {
var myid = parseInt(String(selectionModel_note_Session_classement[i]));
var line = New_Getall_Session_Final_Note_Classement_result[myid];
tab_inscrit_ids.push(line._id);
//console.log(rowss[myid]['external_code']);
}
// console.log(" ### tab_inscrit_ids = ", tab_inscrit_ids)
var url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Inscrit_Bulletin_Note_By_PDF/" + stored_cookie + "/" + tab_inscrit_ids + "/685ebd41ed392125a88f1574";
setLoading(true);
axios.get(url, { responseType: 'blob', },)
.then((res) => {
setLoading(false);
//console.log(" In Download_Stagiaire_Conventions_PDF res.data = " + res.data);
if (String(res.data) === String("false")) {
alert("Impossible de télécharger les bulletins (2) ");
} else {
fileDownload(res.data, nom_fichier_cmd);
setactionmass_ftion_val("");
}
}).catch((error) => {
setLoading(false);
console.error('Error:', error);
setdisplay_alert_mysy("1");
setalert_message(" Impossible de télécharger les bulletins");
setalert_type("error");
});
}
const [Add_Inscription_List_Apprenant_api, setAdd_Inscription_List_Apprenant_api] = useState();
const [Add_Inscription_List_Apprenant_message, setAdd_Inscription_List_Apprenant_message] = useState();
const [Add_Inscription_List_Apprenant_result, setAdd_Inscription_List_Apprenant_result] = useState();
@ -2448,7 +2471,7 @@ const Module_Session_Notes_Classement = (props) => {
<DialogActions>
<IconButton
autoFocus
// autoFocus
onClick={Dialog_add_inscription_handleClose_buton}
color="primary"
className={classes.customizedButton}
@ -2509,7 +2532,7 @@ const Module_Session_Notes_Classement = (props) => {
>
<DialogTitle> Délibération du Jury</DialogTitle>
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Délibération du Jury</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContentText>
{Dialog_1_message}
@ -2560,23 +2583,27 @@ const Module_Session_Notes_Classement = (props) => {
</div>
<div className="session_caract_Dialog" > <b> Validation </b> <br />
{New_Option_Valisation_Jury && New_Option_Valisation_Jury.length > 0 && jury_cell_editable === true && <Autocomplete
disablePortal
name="filtre1"
id="filtre1"
<TextareaAutosize
name="detail_jury_note"
id="detail_jury_note"
aria-label="minimum height"
rows={1}
value={New_Option_Valisation_Jury.filter((data) => (data).value === String(p_detail_jury_validation))[0].label}
options={New_Option_Valisation_Jury}
onChange={(event, value) => {
if (value && value.value) {
setp_detail_jury_validation(value.value)
}
style={{
border: "1px solid gainsboro", width: '99%', padding: '2px',
maxHeight: '3rem', height: '3rem', minHeight: '3rem', marginBottom: '3rem'
}}
value={p_detail_jury_validation}
onChange={(e) => {
setp_detail_jury_validation(e.target.value);
}}
/>
renderInput={(params) => <TextField {...params} label="" placeholder=""
inputProps={{ ...params.inputProps, style: { fontSize: 10, height: "1rem" } }}
/>
}
/>}
</div>
@ -2650,7 +2677,7 @@ const Module_Session_Notes_Classement = (props) => {
&nbsp;
<div style={{ width: '100%', float: 'left' }}>
<nav style={{ textAlign: 'center', width: '50%', float: 'left' }}> Notes & Classement Final (session)</nav>
<nav style={{ textAlign: 'center', width: '50%', float: 'left' }}> Notes & Classement Final (Promotion)</nav>
<nav style={{ textAlign: 'right', width: '50%', float: 'left' }}>
<Button variant="outlined" onClick={Calcul_Note_Classement_Session} className="detail_class_submenu" id='calcul_moyenne' name='calcul_moyenne'> Calcul Moyenne </Button>
@ -2821,11 +2848,12 @@ const Module_Session_Notes_Classement = (props) => {
options={New_Option}
onChange={(event, value) => {
if (value && value.value) {
if (String(value.value) === "inscription") {
if (String(value.value) === "inscription"
|| String(value.value) === "print_bulletin") {
setactionmass_ftion_val(value.value);
}
else {
setactionmass_ftion_val();
setactionmass_ftion_val("");
}
}
@ -2852,6 +2880,16 @@ const Module_Session_Notes_Classement = (props) => {
</nav>}
{actionmass_ftion_val && String(actionmass_ftion_val) === "print_bulletin" && <nav className='block_en_mass_bton_action'>
<Button className="bton_enreg" style={{ "width": "90%" }} onClick={(event) => {
Download_Bulletins_Notes();
}}>
<FcAcceptDatabase /> Traiter
</Button>
</nav>}
</div>}
@ -3194,7 +3232,7 @@ const Module_Session_Notes_Classement = (props) => {
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
&nbsp;
<nav style={{ textAlign: 'center' }}> Notes & Rang par UE</nav>
<nav style={{ textAlign: 'center' }}> Notes & Rang par UE/Matière</nav>
<Box
sx={{
height: 500,
@ -3310,6 +3348,8 @@ const Module_Session_Notes_Classement = (props) => {
jury_note: JSON.parse(item).jury_note,
jury_observation: JSON.parse(item).jury_observation,
jury_validation: JSON.parse(item).jury_validation,
moyenne_session_ue: JSON.parse(item).moyenne_session_ue,
}
))}
@ -3392,7 +3432,7 @@ const Module_Session_Notes_Classement = (props) => {
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
&nbsp;
<nav style={{ textAlign: 'center' }}> Matrice détaillée des notes Toutes UE </nav>
<nav style={{ textAlign: 'center' }}> Matrice détaillée des notes Toutes UE/Matières </nav>
<Box
sx={{
height: 500,

File diff suppressed because it is too large Load Diff

View File

@ -7,28 +7,21 @@ import axios from "axios";
import { useParams } from 'react-router-dom';
import { getCookie, setCookie } from 'react-use-cookie';
import { useHistory } from "react-router-dom";
import CheckOut from "./CheckOut";
import {
DataGrid, frFR, GridToolbar,
} from '@mui/x-data-grid';
import * as XLSX from 'xlsx';
import { Fab } from "@material-ui/core";
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import { Editor } from '@tinymce/tinymce-react';
import parse from 'html-react-parser';
import { FcViewDetails, FcDisapprove, FcInfo } 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 Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns'
@ -36,18 +29,10 @@ 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, sliderClasses } from '@mui/material';
import styled from 'styled-components';
import { CiTrash } from "react-icons/ci";
import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md";
import Autocomplete from '@mui/material/Autocomplete';
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
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 Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import { gridClasses } from '@mui/x-data-grid';
@ -67,7 +52,7 @@ import MoreVertIcon from '@mui/icons-material/MoreVert';
import Menu from '@mui/material/Menu';
const Modules_Mes_Documents = (props) => {
registerLocale('fr', fr);
const { action, orderid } = useParams();
@ -149,12 +134,12 @@ const Modules_Mes_Documents = (props) => {
{ field: 'file_extention', hide: true, editable: false },
{ field: 'file_name', headerName: 'tech_file_name', hide: true, disableExport: true },
{
field: 'created_date', headerName: 'Date Création', Width: 100, flex: 1, hide: false, editable: false,
field: 'creation_date', headerName: 'Date Création', Width: 100, flex: 1, hide: false, editable: false,
renderCell: (cellValues) => {
return (
<nav style={{ width: '100%', 'textAlign': 'left' }}>
{String(cellValues.row.created_date).substring(0, 10)}
{String(cellValues.row.creation_date).substring(0, 10)}
</nav>)
},
@ -353,7 +338,7 @@ const Modules_Mes_Documents = (props) => {
}
if (document.getElementById(current_menu)) {
document.getElementById(current_menu).style.backgroundColor = "#104277";
document.getElementById(current_menu).style.backgroundColor = "#107758";
document.getElementById(current_menu).style.color = "white";
document.getElementById(current_menu).style.fontWeight = "bold";
}
@ -481,8 +466,8 @@ const Modules_Mes_Documents = (props) => {
{ "id": "filter_type_document", "label": "Type Document", "value": "filter_type_document" },
{ "id": "filter_nom_client", "label": "Nom Client", "value": "filter_nom_client" },
{ "id": "date_creation", "label": "Date Création (jj/mm/aaaa) ", "value": "date_creation" },
{ "id": "filter_formation_external_code", "label": "Lié a la Formation (code externe)", "value": "filter_formation_external_code" },
{ "id": "filter_session_code", "label": "Lié a la session (code session)", "value": "filter_session_code" },
/*{ "id": "filter_formation_external_code", "label": "Lié a la Formation (code externe)", "value": "filter_formation_external_code" },
{ "id": "filter_session_code", "label": "Lié a la session (code session)", "value": "filter_session_code" },*/
{ "id": "", "label": "", "value": "" },
{ "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres.
]
@ -540,7 +525,7 @@ const Modules_Mes_Documents = (props) => {
function getExcelData(apiRef) {
// Select rows and columns
const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
// Format the data. Here we only keep the value
const data = filteredSortedRowIds.map((id) => {
@ -565,7 +550,7 @@ const Modules_Mes_Documents = (props) => {
function handleExport(apiRef, data_colums) {
const data = getExcelData(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef);
const visibleColumnsField = gridVisibleColumnFieldsSelector(apiRef).filter((data) => (data) !== "__check__" );
const local_config = {
@ -990,7 +975,7 @@ const Modules_Mes_Documents = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style datepicker_complement"
locale='fr-FR'
locale={'fr'}
/>
@ -1013,7 +998,7 @@ const Modules_Mes_Documents = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style datepicker_complement"
locale='fr-FR'
locale={'fr'}
/>
</div>
@ -1382,7 +1367,7 @@ const Modules_Mes_Documents = (props) => {
file_extention: JSON.parse(item).file_extention,
client_raison_sociale: JSON.parse(item).client_raison_sociale,
client_nom: JSON.parse(item).client_nom,
created_date: JSON.parse(item).created_date,
creation_date: JSON.parse(item).creation_date,
}
))}
@ -1478,7 +1463,7 @@ const Modules_Mes_Documents = (props) => {
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
className="gest_bton_popup_annuler"
onClick={() => {
//console.log('modal closed ');
close();

View File

@ -3,7 +3,7 @@ import { useForm } from "react-hook-form";
import axios from "axios";
import Formation_Partner_Catalog from "./Formation_Partner_Catalog";
import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa';
import { IoAppsSharp, IoListSharp } from "react-icons/io5";
import Formation_Grid_2Col from "./Formation_Grid_2Col";
import Pagination from "./TestPagination";
@ -16,6 +16,9 @@ import AideRecherche from "./AideRecherche"
import { useParams } from 'react-router-dom'
import Fotter_Catalog_Pub from "./Fotter_Catalog_Pub";
import img_header_jmg from "../mysy_img2/img_jmj_modif.jpg"
import Formation_Partner_Catalog_Special_JMJFormation from "./Jmj_Theme/Formation_Partner_Catalog_Special_JMJFormation";
import "./Jmj_Theme/jmj_formation.css";
import { confirmAlert } from 'react-confirm-alert'; // Import
import { useCookies } from "react-cookie";
@ -29,7 +32,6 @@ let PageSize = 10;
const Mon_Catalogue_Public = (props) => {
const { type, categorie } = useParams();
const { NewSearchText } = useParams();
const [v11, setv11] = useState("");
@ -919,23 +921,12 @@ const Mon_Catalogue_Public = (props) => {
var ip = "";
Get_Subdomain_Partner_Data(window.location.host)
Get_Subdomain_Partner_Data(window.location.host);
async function fetchData() {
// const result = await axios('https://geolocation-db.com/json/',);
/* setuserIp("172.71.122.128");
setcountry_code("FR");
setcountry_name("France");
setcity("Paris");
setpostal("75001");
setlatitude("48.861000061035156");
setlongitude("2.3380000591278076");
setIPv4("172.71.122.128");
setstate("France");*/
let windowWidth = window.innerWidth;
if (showelement === "init") {
@ -953,70 +944,11 @@ const Mon_Catalogue_Public = (props) => {
}
}
if (categorie && String(categorie).length > 0) {
getClassByMetier_categorie(categorie);
}
else {
DisplayXfirstClas(result.data);
}
DisplayXfirstClas(result.data);
}
fetchData();
async function loadSuggestedWord() {
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Suggested_Word/";
//alert(" URL = "+process.env.REACT_APP_API_URL + "myclass/api/Get_Suggested_Word/");
//console.log(" ### URL ##### = "+process.env.REACT_APP_API_URL + "myclass/api/Get_Suggested_Word/");
var form = new FormData();
fetch(
process.env.REACT_APP_API_URL + "myclass/api/Get_Suggested_Word/",
{
method: 'POST',
}
).then((response) => response.json())
.then((result) => {
//console.log('Success:', result['message']);
setsuggestedwords(result['message']);
})
.catch((error) => {
console.error('Error:');
});
}
loadSuggestedWord();
async function loadSuggestedFrCities() {
fetch(
process.env.REACT_APP_API_URL + "myclass/api/Get_Suggested_Fr_Cities/",
{
method: 'POST',
}
).then((response) => response.json())
.then((result) => {
//console.log(' loadSuggestedFrCities CITIES = Success:', result['message']);
setsuggestedcities(result['message']);
//console.log(" CITIES = " + result['message']);
})
.catch((error) => {
console.error('Error:');
});
}
loadSuggestedFrCities();
async function loadDomainMetier() {
@ -1060,7 +992,7 @@ const Mon_Catalogue_Public = (props) => {
});
}
//loadDomainMetier();
loadDomainMetier();
async function loadDomain() {
@ -1478,9 +1410,6 @@ const Mon_Catalogue_Public = (props) => {
}
var my_local_user_connect;
var my_local_part_connect;
@ -2614,8 +2543,8 @@ const Mon_Catalogue_Public = (props) => {
axios.post(myurl, form).then(res => {
if (String(res.data.status) === "true") {
//console.log(" In Get_Subdomain_Partner_Data res.data.status = " + res.data.status);
// console.log(" In Get_Subdomain_Partner_Data res.data.message r_class = " + res.data.message);
console.log(" In Get_Subdomain_Partner_Data res.data.status = " + res.data.status);
console.log(" In Get_Subdomain_Partner_Data res.data.message r_class = " + res.data.message);
setGet_Subdomain_Partner_Data_api("true");
setGet_Subdomain_Partner_Data_result(res.data.message);
@ -2781,6 +2710,19 @@ const Mon_Catalogue_Public = (props) => {
setmy_theme_code(theme_code);
var catalog_pub_affiche_indicateur = ""
if (JSON.parse(x).affiche_indicateur)
catalog_pub_affiche_indicateur = JSON.parse(x).affiche_indicateur;
var catalog_pub_affiche_raison_sociale = ""
if (JSON.parse(x).affiche_raison_sociale)
catalog_pub_affiche_raison_sociale = JSON.parse(x).affiche_raison_sociale;
var catalog_pub_affiche_contact = ""
if (JSON.parse(x).affiche_contact)
catalog_pub_affiche_contact = JSON.parse(x).affiche_contact;
console.log(" ### setmy_theme_code = ", theme_code);
@ -2842,8 +2784,12 @@ const Mon_Catalogue_Public = (props) => {
"catalog_pub_theme_id": catalog_pub_theme_id,
"theme_code": theme_code,
"affiche_indicateur": catalog_pub_affiche_indicateur,
"affiche_raison_sociale": catalog_pub_affiche_raison_sociale,
"affiche_contact": catalog_pub_affiche_contact,
};
// console.log(" --- node = ", node);
console.log(" --- node = ", node);
new_data2.push(node);
});
@ -2897,7 +2843,7 @@ const Mon_Catalogue_Public = (props) => {
<Helmet>
<title>Formation & Tutoriel Gratuit ou payant Excellente qualité</title>
<meta name="description" content="(zzz)Trouver des Formations et Tutoriels d'excellente qualité : Gratuit ou payant / A distance ou en presentiel, etc." />
<meta name="description" content="Trouver des Formations et Tutoriels d'excellente qualité : Gratuit ou payant / A distance ou en presentiel, etc." />
<meta name="robots" content="index,follow" />
<link rel="canonical" href={`${process.env.REACT_APP_BASE_URL}` + "/recherche-formation"} />
<meta name="title" content="Formation & Tutoriel Gratuit ou payant Excellente qualité" />
@ -2918,7 +2864,7 @@ const Mon_Catalogue_Public = (props) => {
<div className="bloc_logo_indic_model_2">
<div className="bloc_logo_indic_logo_model_2">
<img src={New_Get_Subdomain_Partner_Data_result[0].catalog_pub_logo} alt={New_Get_Subdomain_Partner_Data_result[0].nom} />
<img src={New_Get_Subdomain_Partner_Data_result[0].catalog_pub_logo} />
</div>
<div className="bloc_logo_indic_contact_model_2">
@ -2930,13 +2876,13 @@ const Mon_Catalogue_Public = (props) => {
&nbsp;
</div>
</div>
<div className="bloc_milieu_model_2">
<div className="bloc_milieu_text_model_2">
<div className="bloc_milieu_text_model_2_gauche">
{String(New_Get_Subdomain_Partner_Data_result[0].affiche_indicateur) === "1" && <div className="bloc_milieu_text_model_2_gauche">
<font className="bloc_logo_indic_indic_text"> Indicateurs </font> <br />
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_1_txt &&
@ -2982,8 +2928,10 @@ const Mon_Catalogue_Public = (props) => {
}}> {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_4_txt}
</div>}
</div>
<div className="bloc_milieu_text_model_2_centre">
</div>}
{String(New_Get_Subdomain_Partner_Data_result[0].affiche_raison_sociale) === "1" && <div className="bloc_milieu_text_model_2_centre">
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 &&
<nav>
<font className='title1_nom_model_2'> {New_Get_Subdomain_Partner_Data_result[0].nom} </font> <br />
@ -3002,14 +2950,16 @@ const Mon_Catalogue_Public = (props) => {
fontWeight: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_2_gras}`,
}}> {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_2_txt} </nav>}
</div>
<div className="bloc_milieu_text_model_2_droite">
</div>}
{String(New_Get_Subdomain_Partner_Data_result[0].affiche_contact) === "1" && <div className="bloc_milieu_text_model_2_droite">
<font className="bloc_logo_indic_contact_text_model_2"> Contact </font> <br />
Tel : {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_contact_public_telephone} <br />
Email : {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_contact_public_email}
</div>
</div>}
</div>
</div>
@ -3641,7 +3591,7 @@ const Mon_Catalogue_Public = (props) => {
{/******* Gestion du THEME PAR DEFAULT " */}
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& String(my_theme_code) !== "MySy_Theme2" && <div>
&& String(my_theme_code) !== "MySy_Theme2" && String(my_theme_code) !== "MySy_Theme_JMJ" && <div>
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& New_Get_Subdomain_Partner_Data_result[0].catalog_pub_banniere_img && <div >
@ -3652,17 +3602,17 @@ const Mon_Catalogue_Public = (props) => {
<div className="bloc_logo_indic">
<div className="bloc_logo_indic_logo">
<img src={New_Get_Subdomain_Partner_Data_result[0].catalog_pub_logo} alt={New_Get_Subdomain_Partner_Data_result[0].nom} />
<img src={New_Get_Subdomain_Partner_Data_result[0].catalog_pub_logo} />
</div>
<div className="bloc_logo_indic_contact">
{String(New_Get_Subdomain_Partner_Data_result[0].affiche_contact) === "1" && <div className="bloc_logo_indic_contact">
<font className="bloc_logo_indic_contact_text"> Contact </font> <br />
Tel : {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_contact_public_telephone} <br />
Email : {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_contact_public_email}
</div>
</div>}
<div className="bloc_logo_indic_indic">
{String(New_Get_Subdomain_Partner_Data_result[0].affiche_indicateur) === "1" && <div className="bloc_logo_indic_indic">
<font className="bloc_logo_indic_indic_text"> Indicateurs </font> <br />
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_1_txt &&
@ -3707,11 +3657,11 @@ const Mon_Catalogue_Public = (props) => {
fontWeight: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_4_gras}`,
}}> {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_4_txt}
</div>}
</div>
</div>}
</div>
<div className="bloc_milieu">
{String(New_Get_Subdomain_Partner_Data_result[0].affiche_raison_sociale) === "1" && <div className="bloc_milieu">
<div className="bloc_milieu_text">
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 &&
@ -3736,7 +3686,7 @@ const Mon_Catalogue_Public = (props) => {
<img style={{ width: '60%' }}
src={img_header} />
</div>
</div>
</div>}
<div className="Header_Content">
@ -4443,7 +4393,7 @@ const Mon_Catalogue_Public = (props) => {
{result && myApiResponse === "True" && !newresult &&
<div className="okUpdateData">
<div style={{ "width": "100%" }}>
<div style={{ "width": "50%", "float": "left" }}>
<div className="pave_trier_par_gauche">
<Pagination
className="pagination-bar"
currentPage={currentPage2}
@ -4452,8 +4402,8 @@ const Mon_Catalogue_Public = (props) => {
onPageChange={page => setCurrentPage2(page)}
/>
</div>
<div style={{ "width": "40%", "float": "right" }}>
<div className="input-group input-group-sm mb-3 ">
<div className="pave_trier_par_droite">
<div>
<span className="filter_span">Trier par </span>
<select className="filter_val"
@ -4464,7 +4414,7 @@ const Mon_Catalogue_Public = (props) => {
<option value="duration">Duree</option>
<option selected value="note">Pertinence</option>
</select>
<span style={{ width: '10%' }}><TbArrowsDownUp style={{ height: '2rem', paddingTop: '5px', width: '40%' }}
<span style={{ width: '10%' }}><TbArrowsDownUp style={{ height: '2rem', minWidth: '20px' }}
onClick={(e) => {
if (trier_par === "1")
settrier_par("-1");
@ -4593,6 +4543,406 @@ const Mon_Catalogue_Public = (props) => {
</div>}
{/******* FIN Gestion du THEME PAR DEFAULT " */}
{/******* Gestion du THEME THEME SPECIAL JMJ Formation " */}
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& String(my_theme_code) === "MySy_Theme_JMJ" &&
<div className="jmj_formation">
<div className="jmj_block_header">
<div className="jmj_block_header_img">
<div style={{ "width": "100%", float: "left" }}>
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& New_Get_Subdomain_Partner_Data_result[0].catalog_pub_banniere_img && <div >
<img src={New_Get_Subdomain_Partner_Data_result[0].catalog_pub_banniere_img} className="Partner_Catalog_Background_Header_jmj"></img>
</div>}
<div className="jmj_header_gauche">
<div className="bloc_logo_indic" style={{ position: "unset" }}>
<div className="bloc_logo_indic_logo">
<img src={New_Get_Subdomain_Partner_Data_result[0].catalog_pub_logo} />
</div>
{String(New_Get_Subdomain_Partner_Data_result[0].affiche_contact) === "1" && <div className="bloc_logo_indic_contact">
<font className="bloc_logo_indic_contact_text"> Contact </font> <br />
Tel : {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_contact_public_telephone} <br />
Email : {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_contact_public_email}
</div>}
{String(New_Get_Subdomain_Partner_Data_result[0].affiche_indicateur) === "1" && <div className="bloc_logo_indic_indic">
<font className="bloc_logo_indic_indic_text"> Indicateurs </font> <br />
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_1_txt &&
<div style={{
textAlign: "left",
width: '100%',
fontSize: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_1_taille}` + "px",
color: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_1_color}`,
fontWeight: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_1_gras}`,
}}> {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_1_txt}
</div>}
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_2_txt &&
<div style={{
textAlign: "left",
width: '100%',
fontSize: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_2_taille}` + "px",
color: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_2_color}`,
fontWeight: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_2_gras}`,
}}> {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_2_txt}
</div>}
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_3_txt &&
<div style={{
textAlign: "left",
width: '100%',
fontSize: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_3_taille}` + "px",
color: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_3_color}`,
fontWeight: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_3_gras}`,
}}> {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_3_txt}
</div>}
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_4_txt &&
<div style={{
textAlign: "left",
width: '100%',
fontSize: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_4_taille}` + "px",
color: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_4_color}`,
fontWeight: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_4_gras}`,
}}> {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_4_txt}
</div>}
</div>}
{String(New_Get_Subdomain_Partner_Data_result[0].affiche_raison_sociale) === "1" && <div className="bloc_milieu" style={{ position: "unset" }}>
<div className="bloc_milieu_text">
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 &&
<nav className="title1_nom" style={{ marginBottom: "2rem" }}>
{New_Get_Subdomain_Partner_Data_result[0].nom}
</nav>}
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0 &&
<nav style={{ marginBottom: "2rem" }}>
<font className='title1_text1' style={{
fontSize: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_1_taille}` + "px",
color: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_1_color}`,
fontWeight: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_1_gras}`,
}}> {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_1_txt} </font>
</nav>}
{New_Get_Subdomain_Partner_Data_result[0] && New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_2_txt &&
<nav className="title2" style={{
fontSize: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_2_taille}` + "px",
color: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_2_color}`,
fontWeight: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_2_gras}`,
}}> {New_Get_Subdomain_Partner_Data_result[0].catalog_pub_message_2_txt} </nav>}
</div>
<div className="bloc_img_milieu_gauche">
<img style={{ width: '60%' }}
src={img_header_jmg} />
</div>
</div>}
</div>
</div>
<div className="jmj_header_droite">
{/* <img src={img_header_jmg} style={{ width: '100%', paddingTop: '3rem' }} />*/} &nbsp;
</div>
</div>
</div>
<div style={{ width: '100%', background: '#f3f4fb', paddingTop: "2rem" }}>
<div className="jmj_block_milieu">
<div className="jmj_block_milieu_gauche">
{showelement === "true" && <div className="rech_leftbox" >
<div className="sous_filter">
<div className="tab_critere_espace">
<div className="filter_valeur" onChange={TrainingCPFHandle}>
<div className="filter_valeur_txt" > Eligible CPF
</div>
<div className="filter_valeur_block_val">
<div className="frame_133" >
<div className="frame_133_grp" >
<input className="frame_133_grp_radio" type="radio" value="1" id={"TrainingCPF"} name={"TrainingCPF"} />
<nav className="frame_133_grp_txt"> Oui </nav>
</div>
</div>
<div className="frame_134">
<div className="frame_134_grp" >
<input className="frame_133_grp_radio" type="radio" value="0" id={"TrainingCPF"} name={"TrainingCPF"} />
<nav className="frame_133_grp_txt"> Non </nav>
</div>
</div>
{String(cpfchecked) === String("1") && <div className="frame_135" onClick={annulefiltrecpf}>
<div className="frame_135_grp" >
<img src={tick_ko} alt="KO" className="tick_ok_ko" />
</div>
</div>}
</div>
</div>
<div className="filter_valeur" onChange={TrainingCertifHandle}>
<div className="filter_valeur_txt" > Certification
</div>
<div className="filter_valeur_block_val">
<div className="frame_133" >
<div className="frame_133_grp" >
<input className="frame_133_grp_radio" type="radio" value="1" id={"TrainingCertif"} name={"TrainingCertif"} />
<nav className="frame_133_grp_txt"> Oui </nav>
</div>
</div>
<div className="frame_134">
<div className="frame_134_grp" >
<input className="frame_133_grp_radio" type="radio" value="0" id={"TrainingCertif"} name={"TrainingCertif"} />
<nav className="frame_133_grp_txt"> Non </nav>
</div>
</div>
{String(certifchecked) === String("1") && <div className="frame_135" onClick={annulefiltrecertif}>
<div className="frame_135_grp" >
<img src={tick_ko} alt="KO" className="tick_ok_ko" />
</div>
</div>}
</div>
</div>
<div className="filter_valeur" onChange={TrainingTypeHandle}>
<div className="filter_valeur_txt" > Type
</div>
<div className="filter_valeur_block_val">
<div className="frame_133" >
<div className="frame_133_grp" >
<input className="frame_133_grp_radio" type="radio" value="cours" id={"TrainingType"} name={"TrainingType"} />
<nav className="frame_133_grp_txt"> Cours </nav>
</div>
</div>
<div className="frame_134">
<div className="frame_134_grp" >
<input className="frame_133_grp_radio" type="radio" value="tuto" id={"TrainingType"} name={"TrainingType"} />
<nav className="frame_133_grp_txt"> Tuto </nav>
</div>
</div>
{String(typechecked) === String("1") && <div className="frame_135" onClick={annulefiltretypechecked}>
<div className="frame_135_grp" >
<img src={tick_ko} alt="KO" className="tick_ok_ko" />
</div>
</div>}
</div>
</div>
<div className="filter_valeur" >
<div className="filter_valeur_txt" > Support
</div>
<div className="filter_valeur_block_val">
<select className="form-select form-select-sm limite_input" onChange={TrainingSupportHandle} aria-label=".form-select-sm example"
id="supoort_list_derou" name="supoort_list_derou" >
<option selected value="">Choisir</option>
<option value="video">Video</option>
<option value="réalité virtuelle">Realité Virtuelle</option>
<option value="document">Document</option>
<option value="mixte">Mixte</option>
</select>
</div>
</div>
<div className="filter_valeur">
<div className="filter_valeur_txt" > Prix
</div>
<div className="new_filter_zone_cerif_radio_left range_prix_mobile" style={{
"width": "90%",
'float': "right", "textAlign": 'right', "marginTop": "1rem",
"fontFamily": 'Manrope',
}} onClick={TrainingPriceHandle}>
<InputRange
maxValue={10000}
minValue={0}
formatLabel={value => `${value}`}
value={range_price}
step={500}
name="toto"
onChange={value => setrange_price(value)}
//onChange={TrainingPriceHandle}
onChangeComplete={value => console.log(value)}
/>
</div>
<div> &nbsp;</div>
</div>
</div>
</div>
</div>
}
</div>
<div className="jmj_block_milieu_droite">
<div className="rech_middlebox" id="rech_middlebox" style={{ width: '100%' }}>
<div> <h3 style={{ fontFamily: 'DM Sans', color: '#0A043C' }}> Nos Formations </h3></div>
<div style={{
display: 'flex', flexDirection: 'row', justifyContent: 'center', width: '100%', flexWrap: 'wrap',
padding: "2px", margin: '2px', gap: '10px', alignItems: 'center',
}}>
<div style={{ width: '100%' }}>
{result && myApiResponse === "True" && !newresult &&
<div className="okUpdateData">
<div style={{ "width": "100%" }}>
<div style={{ "width": "40%", "float": "left" }}>
<Pagination
className="pagination-bar"
currentPage={currentPage2}
totalCount={result.length}
pageSize={PageSize}
onPageChange={page => setCurrentPage2(page)}
/>
</div>
<div style={{ "width": "60%", "float": "right" }}>
<div className="input-group input-group-sm mb-3 ">
<span className="filter_span">Trier par </span>
<select className="filter_val"
id={"trierpar"} name={"trierpar"}
onChange={trier}>
<option value="price">Prix</option>
<option value="duration">Duree</option>
<option selected value="note">Pertinence</option>
</select>
<span style={{ width: '10%' }}><TbArrowsDownUp style={{ height: '2rem', paddingTop: '5px', width: '40%' }}
onClick={(e) => {
if (trier_par === "1")
settrier_par("-1");
else
settrier_par("1");
trier();
}}
/> </span>
</div>
</div>
</div>
</div>}
</div>
<div style={{ width: '100%', marginBottom:"1rem" }}>
<div className="block_display_flex_formation" style={{ width: '100%' }}>
{result && myApiResponse == "True" && fin == 0 && !newresult &&
result.slice(0, PageSize).map((formation) => (
<div className="block_formation" ref={inputEl} id="inputEl_element">
<Formation_Partner_Catalog_Special_JMJFormation formation={JSON.parse(formation)}
key={JSON.parse(formation).title} coeur={JSON.parse(formation).title}
partner_data={New_Get_Subdomain_Partner_Data_result[0]} />
</div>
))}
{result && myApiResponse == "True" && fin == 0 && newresult &&
newresult.slice(0, PageSize).map((formation) => (
<div className="block_formation" >
<Formation_Partner_Catalog_Special_JMJFormation formation={JSON.parse(formation)}
key={JSON.parse(formation).title} partner_data={New_Get_Subdomain_Partner_Data_result[0]} />
</div>
))}
{result && myApiResponse === "True" && fin === 1 && !newresult
&& currentTableData2
&& currentTableData2.map((formation) => (
<div className="block_formation" >
<Formation_Partner_Catalog_Special_JMJFormation formation={JSON.parse(formation)}
key={JSON.parse(formation).title} partner_data={New_Get_Subdomain_Partner_Data_result[0]} />
</div>
))}
{result && myApiResponse === "True" && fin === 1 && newresult
&& currentTableData2
&& currentTableData2.map((formation) => (
<div className="block_formation" >
<Formation_Partner_Catalog_Special_JMJFormation formation={JSON.parse(formation)} key={JSON.parse(formation).title}
partner_data={New_Get_Subdomain_Partner_Data_result[0]} />
</div>
))}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div >
<Fotter_Catalog_Pub partner_data={New_Get_Subdomain_Partner_Data_result[0]} />
</div>
</div>
</div>}
{/******* FIN Gestion du THEME SPECIAL JMJ Formation " */}
</div >
);

View File

@ -1,65 +1,18 @@
import React, { useRef, useState, useMemo, useEffect } from "react";
import { useForm } from "react-hook-form";
import axios from "axios";
import Formation_Partner_Catalog from "./Formation_Partner_Catalog";
import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa';
import { BsFillXCircleFill } from "react-icons/bs";
import { IoAppsSharp, IoListSharp } from "react-icons/io5";
import Formation_Grid_2Col from "./Formation_Grid_2Col";
import Pagination from "./TestPagination";
import data from "./data/mock-data.json";
import { useHistory } from "react-router-dom";
import { getCookie, removeCookie } from 'react-use-cookie';
import { Helmet } from "react-helmet";
import AideRecherche from "./AideRecherche"
import { useParams } from 'react-router-dom'
import Fotter_Catalog_Pub from "./Fotter_Catalog_Pub";
import Footer from "./Fotter";
import LogoutOutlinedIcon from '@mui/icons-material/LogoutOutlined';
import Button from '@mui/material/Button';
import MenuItem from "@material-ui/core/MenuItem";
import Menu from "@material-ui/core/Menu";
import Header from "./Header";
import connect_white from "../mysy_img/connect_white_v2.png";
import connect_green from "../mysy_img/connect_green.png";
import { getCookie, } from 'react-use-cookie';
import { useParams } from 'react-router-dom';
import { confirmAlert } from 'react-confirm-alert'; // Import
import { useCookies } from "react-cookie";
import InputRange from 'react-input-range';
import 'react-input-range/lib/css/index.css';
import tick_ko from "../mysy_img/tick_KO.png";
import { SelectChangeEvent } from '@mui/material/Select';
import Chip from '@mui/material/Chip';
import Select, { StylesConfig } from 'react-select';
import img_header from "../mysy_img2/img_header.png"
import mysy_logo2 from "../mysy_img2/Logo_MySy.png"
import { AiTwotoneFolder } from "react-icons/ai";
import serv_img_market_digi from "../mysy_img/market_digi.jpg";
import serv_img_gestion_admin from "../mysy_img/gestion_admin_2.jpg";
import serv_img_publication from "../mysy_img/publication.jpg";
import mysy_search from "../mysy_img2/mysy_search.jpg";
import mysy_lms from "../mysy_img2/mysy_e_learning.jpg";
import mysy_consulting from "../mysy_img2/mysy_consulting.jpg";
import mysy_datacenter from "../mysy_img2/mysy_datacenter.png";
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 Module_Connexion_Intranet_Client from "./Module_Connexion_Intranet_Client";
import Fotter_Intranet_Client_Pub from "./Fotter_Intranet_Client_Pub"
import { CiCircleRemove, CiCircleMinus } from "react-icons/ci";
import Fotter_v3 from "./Fotter_v3";
let PageSize = 10;
const Mon_Intranet_Public = (props) => {
@ -119,8 +72,6 @@ const Mon_Intranet_Public = (props) => {
const inputEl = useRef(null);
const url = process.env.REACT_APP_API_URL + "myclass/api/add_user_account/";
const {
register,
@ -3060,7 +3011,7 @@ const Mon_Intranet_Public = (props) => {
{New_Get_Subdomain_Partner_Data_result && New_Get_Subdomain_Partner_Data_result.length > 0
&& New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_2_txt &&
<div style={{
textAlign: "left",
textAlign: "left",
width: '100%',
fontSize: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_2_taille}` + "px",
color: `${New_Get_Subdomain_Partner_Data_result[0].catalog_pub_indicateur_2_color}`,

View File

@ -1,25 +1,18 @@
import React, { useRef, useState, useEffect } from "react";
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
import axios from "axios";
import { getCookie, setCookie } from 'react-use-cookie';
import { useHistory } from "react-router-dom";
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import 'react-tooltip/dist/react-tooltip.css'
import { Tooltip } from 'react-tooltip'
import 'reactjs-popup/dist/index.css';
import "react-datepicker/dist/react-datepicker.css";
import Button from '@mui/material/Button';
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
import fileDownload from 'js-file-download'
import Dashbord_Session_Par_Fteur from "./Dashbord_Session_Par_Fteur";
import Dashbord_Session_Taux_Remplissage from "./Dashbord_Session_Taux_Remplissage";
import Dashbord_Session_Repartition_Fteur from "./Dashbord_Session_Repartition_Fteur";
@ -34,31 +27,30 @@ import Dashbord_Factures_Previsionnel_Par_Periode from "./Dashbord_Factures_Prev
import Box from '@mui/material/Box';
import { TbColumns2, TbColumns1 } from "react-icons/tb";
import { BarChart } from '@mui/x-charts';
import { axisClasses } from '@mui/x-charts';
import { pieArcLabelClasses } from '@mui/x-charts/PieChart';
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';
import { MdDeleteForever } from "react-icons/md";
import { RiFileExcel2Line } from "react-icons/ri";
import Autocomplete from '@mui/material/Autocomplete';
import TextField from '@mui/material/TextField';
import { format } from 'date-fns'
import moment from "moment";
import fr from 'date-fns/locale/fr';
import { registerLocale } from 'react-datepicker';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { ResponsiveBar } from "@nivo/bar";
import {
useTheme,
} from "@mui/material";
import { tokens } from "../theme";
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
import { FcPrint } from "react-icons/fc";
const Mon_Tableau_De_Bord = (props) => {
registerLocale('fr', fr);
const theme = useTheme();
const colors = tokens(theme.palette.mode);
const history = useHistory();
@ -291,7 +283,7 @@ const Mon_Tableau_De_Bord = (props) => {
}
if (document.getElementById(current_menu)) {
document.getElementById(current_menu).style.backgroundColor = "#104277";
document.getElementById(current_menu).style.backgroundColor = "#107758";
document.getElementById(current_menu).style.color = "white";
document.getElementById(current_menu).style.fontWeight = "bold";
}
@ -466,8 +458,8 @@ const Mon_Tableau_De_Bord = (props) => {
axios.post(myurl, form).then(res => {
setLoading(false);
if (String(res.data.status) === String("true")) {
console.log(" In Getall_Qry_Formation_Session res.data.status = " + res.data.status);
console.log(" In Getall_Qry_Formation_Session res.data.message r_class = " + res.data.message);
//console.log(" In Getall_Qry_Formation_Session res.data.status = " + res.data.status);
// console.log(" In Getall_Qry_Formation_Session res.data.message r_class = " + res.data.message);
setGetall_Qry_Formation_Session_result_JSON(JSON.parse('[' + res.data.message + ']'));
@ -1145,7 +1137,7 @@ const Mon_Tableau_De_Bord = (props) => {
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url);
console.log(" #### url = ", url)
// console.log(" #### url = ", url)
setLoading(true);
axios.get(url, { responseType: 'blob', },)
@ -1169,6 +1161,184 @@ const Mon_Tableau_De_Bord = (props) => {
const [Get_Qualiopi_Indic_Apprenant_Formation_api, setGet_Qualiopi_Indic_Apprenant_Formation_api] = useState();
const [Get_Qualiopi_Indic_Apprenant_Formation_message, setGet_Qualiopi_Indic_Apprenant_Formation_message] = useState();
const [Get_Qualiopi_Indic_Apprenant_Formation_result, setGet_Qualiopi_Indic_Apprenant_Formation_result] = useState([]);
function Get_Qualiopi_Indic_Apprenant_Formation(local_from_beginning) {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
var date_from = "";
if (p_filter_date_from) {
date_from = p_filter_date_from;
}
var date_to = "";
if (p_filter_date_to) {
date_to = p_filter_date_to;
}
form.append("token", stored_cookie);
form.append("session_start_date", date_from);
form.append("session_end_date", date_to);
form.append("tab_formation_ids", "");
form.append("from_beginning", local_from_beginning);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Taux_Success_For_List_Class/";
setLoading(true);
axios.post(myurl, form).then(res => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In Get_Qualiopi_Indic_Apprenant_Formation res.data.status = " + res.data.status);
// console.log(" In Get_Qualiopi_Indic_Apprenant_Formation res.data.message r_class = " + res.data.message);
var json_data = JSON.parse(res.data.message[0]);
// console.log(" ### json_data = ", json_data);
var jsonObj0 = json_data.data
if (json_data.total_nb_inscrit) {
setqualiopi_indic_nb_apprenant(json_data.total_nb_inscrit)
} else {
setqualiopi_indic_nb_apprenant("");
}
if (json_data.taux_success) {
setqualiopi_indic_taux_sucess(json_data.taux_success)
} else {
setqualiopi_indic_taux_sucess("");
}
//console.log(" ### jsonObj0 = ", jsonObj0);
setGet_Qualiopi_Indic_Apprenant_Formation_api("true");
setGet_Qualiopi_Indic_Apprenant_Formation_result(res.data.message);
}
else {
setGet_Qualiopi_Indic_Apprenant_Formation_api("false");
setGet_Qualiopi_Indic_Apprenant_Formation_message(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
setLoading(false);
console.warn('Not good man :( Get_Qualiopi_Indic_Apprenant_Formation = ', error);
setGet_Qualiopi_Indic_Apprenant_Formation_api("false");
// alert("Impossible de récuperer les données demandées");
setdisplay_alert_mysy("1");
setalert_message("Impossible de récuperer les données demandées");
setalert_type("error");
//setmyApimyApiMessage("")
})
}
const [Get_Qualiopi_Indic_Nb_Heure_api, setGet_Qualiopi_Indic_Nb_Heure_api] = useState();
const [Get_Qualiopi_Indic_Nb_Heure_message, setGet_Qualiopi_Indic_Nb_Heure_message] = useState();
const [Get_Qualiopi_Indic_Nb_Heure_result, setGet_Qualiopi_Indic_Nb_Heure_result] = useState([]);
function Get_Qualiopi_Indic_Nb_Heure(local_from_beginning) {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
var date_from = "";
if (p_filter_date_from) {
date_from = p_filter_date_from;
}
var date_to = "";
if (p_filter_date_to) {
date_to = p_filter_date_to;
}
form.append("token", stored_cookie);
form.append("session_start_date", date_from);
form.append("session_end_date", date_to);
form.append("tab_formation_ids", "");
form.append("from_beginning", local_from_beginning);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Session_For_List_Class/";
setLoading(true);
axios.post(myurl, form).then(res => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In Get_Qualiopi_Indic_Nb_Heure res.data.status = " + res.data.status);
// console.log(" In Get_Qualiopi_Indic_Nb_Heure res.data.message r_class = " + res.data.message);
var json_data = JSON.parse(res.data.message[0]);
// console.log(" ### json_data = ", json_data);
var jsonObj0 = json_data.data
if (json_data.total_nb_heure) {
setqualiopi_indic_nb_heure(json_data.total_nb_heure)
} else {
setqualiopi_indic_nb_heure("")
}
//console.log(" ### jsonObj0 = ", jsonObj0);
setGet_Qualiopi_Indic_Nb_Heure_api("true");
setGet_Qualiopi_Indic_Nb_Heure_result(res.data.message);
}
else {
setGet_Qualiopi_Indic_Nb_Heure_api("false");
setGet_Qualiopi_Indic_Nb_Heure_message(res.data.message);
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
}
}).catch((error) => {
setLoading(false);
console.warn('Not good man :( Get_Qualiopi_Indic_Nb_Heure = ', error);
setGet_Qualiopi_Indic_Nb_Heure_api("false");
// alert("Impossible de récuperer les données demandées");
setdisplay_alert_mysy("1");
setalert_message("Impossible de récuperer les données demandées");
setalert_type("error");
//setmyApimyApiMessage("")
})
}
const [qualiopi_indic_nb_apprenant, setqualiopi_indic_nb_apprenant] = React.useState("");
const [qualiopi_indic_nb_heure, setqualiopi_indic_nb_heure] = React.useState("");
const [qualiopi_indic_taux_sucess, setqualiopi_indic_taux_sucess] = React.useState("");
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
const [alert_message, setalert_message] = useState("");
const [alert_type, setalert_type] = useState("");
function clear_alert_message() {
setalert_message("");
}
function clear_alert_type() {
setalert_type("");
}
function clear_display_alert_mysy() {
setdisplay_alert_mysy("");
}
/****** FIN GESTION BPF */
return (
@ -1177,6 +1347,17 @@ const Mon_Tableau_De_Bord = (props) => {
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
</div>}
{/*** Affichage des messages d'alerte*/}
{display_alert_mysy && String(display_alert_mysy) === "1" &&
<Module_Alert_Confirmation alert_message={alert_message}
alert_type={alert_type}
clear_alert_message={clear_alert_message}
clear_alert_type={clear_alert_type}
clear_display_alert_mysy={clear_display_alert_mysy}
/>
}
{/*** FIN Affichage des messages d'alerte*/}
<div className="div_row">
{/* <Button variant="outlined" onClick={submenu_montbd} className="detail_class_submenu" id='montbd' name='montbd' >Mon tableau de bord </Button> */}
@ -1238,7 +1419,7 @@ const Mon_Tableau_De_Bord = (props) => {
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style"
locale='fr-FR'
locale={'fr'}
/>
@ -1272,6 +1453,8 @@ const Mon_Tableau_De_Bord = (props) => {
// Recuperation des rapports d'activités
if (String(submenu) === "rapport_activite") {
Get_Qualiopi_Indic_Apprenant_Formation();
Get_Qualiopi_Indic_Nb_Heure();
Getall_Qry_Inscription_Data("");
Getall_Qry_Formation_Session("");
// Getall_Qry_Session_Data();
@ -1307,7 +1490,7 @@ const Mon_Tableau_De_Bord = (props) => {
<hr className="hr_break" />
{String(submenu) === String("rapport_financier") && <div style={{ "border": "None" }}>
<h3 style={{ fontFamily:'DM Sans' }}> Rapports Financiers </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Rapports Financiers </h3>
<Box >
<div className="session_data" >
@ -1497,7 +1680,7 @@ const Mon_Tableau_De_Bord = (props) => {
{String(submenu) === String("rapport_rh") && <div style={{ "border": "None" }}>
<h3 style={{ fontFamily:'DM Sans' }}> Rapports Ressources Humaines </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Rapports Ressources Humaines </h3>
<Box >
<div className="session_data" >
<div style={{ "border": "None" }}>
@ -1842,10 +2025,43 @@ const Mon_Tableau_De_Bord = (props) => {
</div>}
{String(submenu) === String("rapport_activite") && <div style={{ "border": "None" }}>
<h3 style={{ fontFamily:'DM Sans' }}> Rapport d'activité </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Rapport d'activité </h3>
<Box >
<div className="session_data" >
<div>
<div className="titre1"> Incateurs Qualiopi </div>
<div style={{ minHeight: '10rem', padding:'10px' }}>
<nav style={{ "border": "None", "fontSize": "16px", "fontWeight": "700", fontFamily: "DM Sans" }}> Les indicateurs qualiopi</nav>
<div style={{ width: '100%', float: 'left' }}>
<div style={{
display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', width: '100%',
paddingLeft: '10px', flexWrap: 'wrap'
}}>
<div className="session_caract" style={{ fontSize: '26px' }}>
Nombre d'apprenants<br />
{qualiopi_indic_nb_apprenant}
</div>
<div className="session_caract" style={{ fontSize: '26px' }}>
Nombre d'heures dispensé<br />
{qualiopi_indic_nb_heure}
</div>
<div className="session_caract" style={{ fontSize: '26px' }}>
Taux de réussite<br />
{qualiopi_indic_taux_sucess}%
</div>
</div>
</div>
</div>
</div>
{Getall_Qry_Inscription_Data_result_JSON && Getall_Qry_Inscription_Data_result_JSON.length > 0 &&
Getall_Qry_Inscription_Data_result_JSON[0].data &&
<div>
@ -1860,9 +2076,7 @@ const Mon_Tableau_De_Bord = (props) => {
</div>
<BarChart
dataset={Getall_Qry_Inscription_Data_result_JSON[0].data}
// xAxis={[{ scaleType: 'band', dataKey: 'label', tickPlacement: 'middle' }]}
xAxis={[{
@ -2017,7 +2231,7 @@ const Mon_Tableau_De_Bord = (props) => {
</div>}
{String(submenu) === String("bpf") && <div style={{ "border": "None" }}>
<h3 style={{ fontFamily:'DM Sans' }}> Bilan Pédagogique et Financier (BPF) </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Bilan Pédagogique et Financier (BPF) </h3>
<div className="titre1"> C. Bilan financier hors taxes : Origine des produits de l'organisme </div>
<div className="div_row">
@ -2458,18 +2672,18 @@ const Mon_Tableau_De_Bord = (props) => {
}}
>
Imprimer &nbsp; <FcPrint/> &nbsp;
Imprimer &nbsp; <FcPrint /> &nbsp;
</Button>
</div>
</div>}
{String(submenu) === String("montbd") && <div style={{ "border": "None" }}>
<h3 style={{ fontFamily:'DM Sans' }}> Mon tableau de bord </h3>
<h3 style={{ fontFamily: 'DM Sans' }}> Mon tableau de bord </h3>
<div className="div_row"> &nbsp;</div>
<div className="div_row" style={{ "textAlign": "right", "paddingRight": "20px" }}> Affichage &nbsp;

View File

@ -233,7 +233,7 @@ const New_ButtonHilight_2025 = () => {
}
history.push("/intranet");
}
function user_logout() {
confirmAlert({

Some files were not shown because too many files have changed in this diff Show More