From ddb2d4fea0f6a902d70f0f0af422d38531fc2aa9 Mon Sep 17 00:00:00 2001 From: cherif Date: Mon, 4 Dec 2023 12:26:52 +0100 Subject: [PATCH] 04/12/2023 - 12h30 --- .env | 1 + package-lock.json | 365 ++- package.json | 8 +- src/components/Dashbord_Formation.js | 431 +++ .../Dashbord_Formation_Evol_Session.js | 444 +++ src/components/Dashbord_Session.js | 307 +- src/components/Dashbord_Session_Par_Fteur.js | 97 +- .../Dashbord_Session_Repartition_Fteur.js | 104 +- .../Dashbord_Session_Taux_Remplissage.js | 107 +- src/components/DeleteUserAccount.js | 13 +- src/components/DisplayClass.js | 49 - src/components/DisplayPartnerStagiaires.js | 269 +- src/components/ListeArticles.js | 18 +- src/components/Mon_Tableau_De_Bord.js | 118 +- src/components/Partner.js | 19 +- src/components/PartnerSignIn.js | 7 +- src/components/PartnerSignInSecond.js | 5 +- src/components/Partner_Facture.js | 7 +- src/components/Partner_Invoicing_Data.js | 21 +- src/components/Partner_Securite_Data.js | 16 +- src/components/ProduitsServices.js | 7 +- src/components/ProfilObjectif.js | 8 +- src/components/Recherche.js | 2767 ---------------- src/components/RechercheArticles.js | 5 +- src/components/Recherche_formation_com.js | 23 +- src/components/Recherche_new.js | 2799 ----------------- src/components/Recherche_new_v2.js | 22 +- src/components/UpdatePartnerInfo.js | 6 +- src/pages/recherche.js | 4 +- src/pages/recherche_new.js | 4 +- .../components/_dashbord_formation.scss | 2638 ++++++++++++++++ .../components/_mon_tableau_de_bord.scss | 11 + src/styles/index.scss | 1 + 33 files changed, 4426 insertions(+), 6275 deletions(-) create mode 100644 src/components/Dashbord_Formation.js create mode 100644 src/components/Dashbord_Formation_Evol_Session.js delete mode 100644 src/components/DisplayClass.js delete mode 100644 src/components/Recherche.js delete mode 100644 src/components/Recherche_new.js create mode 100644 src/styles/components/_dashbord_formation.scss diff --git a/.env b/.env index 8879694..d4d13fe 100644 --- a/.env +++ b/.env @@ -7,3 +7,4 @@ REACT_APP_API_URL_recette=https://devapimysy.mysy-training.com/ REACT_APP_API_URL=http://localhost:5001/ REACT_APP_BASE_URL=http://localhost:3009/recherche-formation REACT_APP_ENV=DEV +GENERATE_SOURCEMAP=false \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0c2df58..18f343c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "my-app2", + "name": "MySy Training", "version": "0.1.0", "lockfileVersion": 2, "requires": true, @@ -33,6 +33,7 @@ "@mui/x-date-pickers": "^5.0.0", "@mui/x-date-pickers-pro": "^5.0.0", "@nivo/bar": "^0.84.0", + "@nivo/line": "^0.84.0", "@nivo/pie": "^0.84.0", "@react-icons/all-files": "^4.1.0", "@stripe/react-stripe-js": "^1.12.0", @@ -57,6 +58,7 @@ "gatsby-plugin-cookie-gdpr-axeptio": "^1.0.2", "google-map-react": "^2.1.10", "html-react-parser": "^2.0.0", + "increase-memory-limit": "^1.0.7", "js-cookie": "^3.0.1", "js-file-download": "^0.4.12", "js-video-url-parser": "^0.5.1", @@ -5380,6 +5382,40 @@ "react": ">= 16.14.0 < 19.0.0" } }, + "node_modules/@nivo/line": { + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@nivo/line/-/line-0.84.0.tgz", + "integrity": "sha512-QE0JwZ7oIwMnsDQeSr1Q6iyqD2UBVLtBMdfMsJLhnlI3V62VkY98/L3o8M7+7Wy/V2UiEMJ+14C2qhXd+XLgsA==", + "dependencies": { + "@nivo/annotations": "0.84.0", + "@nivo/axes": "0.84.0", + "@nivo/colors": "0.84.0", + "@nivo/core": "0.84.0", + "@nivo/legends": "0.84.0", + "@nivo/scales": "0.84.0", + "@nivo/tooltip": "0.84.0", + "@nivo/voronoi": "0.84.0", + "@react-spring/web": "9.4.5 || ^9.7.2", + "d3-shape": "^1.3.5", + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": ">= 16.14.0 < 19.0.0" + } + }, + "node_modules/@nivo/line/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==" + }, + "node_modules/@nivo/line/node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "dependencies": { + "d3-path": "1" + } + }, "node_modules/@nivo/pie": { "version": "0.84.0", "resolved": "https://registry.npmjs.org/@nivo/pie/-/pie-0.84.0.tgz", @@ -5462,6 +5498,21 @@ "@react-spring/web": "9.4.5 || ^9.7.2" } }, + "node_modules/@nivo/voronoi": { + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@nivo/voronoi/-/voronoi-0.84.0.tgz", + "integrity": "sha512-CJTb0sQWYNbfjjrCEK3W0jt1v+hqAd4fDUNJxB3SNRHEEQtF+MCr2EG3p/CWyxIb3avjF4N53/03tQpnuDwBvQ==", + "dependencies": { + "@nivo/core": "0.84.0", + "@types/d3-delaunay": "^5.3.0", + "@types/d3-scale": "^3.2.3", + "d3-delaunay": "^5.3.0", + "d3-scale": "^3.2.3" + }, + "peerDependencies": { + "react": ">= 16.14.0 < 19.0.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -6555,6 +6606,11 @@ "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-2.0.3.tgz", "integrity": "sha512-+0EtEjBfKEDtH9Rk3u3kLOUXM5F+iZK+WvASPb0MhIZl8J8NUvGeZRwKCXl+P3HkYx5TdU4YtcibpqHkSR9n7w==" }, + "node_modules/@types/d3-delaunay": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-5.3.4.tgz", + "integrity": "sha512-GEQuDXVKQvHulQ+ecKyCubOmVjXrifAj7VR26rWVAER/IbWemaT/Tmo84ESiTtoDghg5ILdMZH7pYXQEt/Vu9A==" + }, "node_modules/@types/d3-ease": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.0.tgz", @@ -11530,6 +11586,14 @@ "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-2.0.0.tgz", "integrity": "sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ==" }, + "node_modules/d3-delaunay": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-5.3.0.tgz", + "integrity": "sha512-amALSrOllWVLaHTnDLHwMIiz0d1bBu9gZXd1FiLfXf8sHcX9jrcj81TVZOqD4UX7MgBZZ07c8GxzEgBpJqc74w==", + "dependencies": { + "delaunator": "4" + } + }, "node_modules/d3-ease": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", @@ -15351,6 +15415,17 @@ "node": ">=0.8.19" } }, + "node_modules/increase-memory-limit": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/increase-memory-limit/-/increase-memory-limit-1.0.7.tgz", + "integrity": "sha512-ozyn+HHAPD9VxMT1U50A7G8XXlktUWhnnEDYSeDYnQjKsNrBWHqq6XfEA0uhMdDPD+q/7rXWlzF1CbXX/c1LiQ==", + "dependencies": { + "glob": "^7.1.1" + }, + "bin": { + "increase-memory-limit": "index.js" + } + }, "node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", @@ -34194,7 +34269,8 @@ "@bedrock-layout/use-stateful-ref": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/@bedrock-layout/use-stateful-ref/-/use-stateful-ref-1.4.1.tgz", - "integrity": "sha512-4eKO2KdQEXcR5LI4QcxqlJykJUDQJWDeWYAukIn6sRQYoabcfI5kDl61PUi6FR6o8VFgQ8IEP7HleKqWlSe8SQ==" + "integrity": "sha512-4eKO2KdQEXcR5LI4QcxqlJykJUDQJWDeWYAukIn6sRQYoabcfI5kDl61PUi6FR6o8VFgQ8IEP7HleKqWlSe8SQ==", + "requires": {} }, "@callstack/react-theme-provider": { "version": "3.0.8", @@ -34329,12 +34405,14 @@ "@csstools/postcss-unset-value": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@csstools/postcss-unset-value/-/postcss-unset-value-1.0.2.tgz", - "integrity": "sha512-c8J4roPBILnelAsdLr4XOAR/GsTm0GJi4XpcfvoWk3U6KiTCqiFYc63KhRMQQX35jYMp4Ao8Ij9+IZRgMfJp1g==" + "integrity": "sha512-c8J4roPBILnelAsdLr4XOAR/GsTm0GJi4XpcfvoWk3U6KiTCqiFYc63KhRMQQX35jYMp4Ao8Ij9+IZRgMfJp1g==", + "requires": {} }, "@csstools/selector-specificity": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.0.2.tgz", - "integrity": "sha512-IkpVW/ehM1hWKln4fCA3NzJU8KwD+kIOvPZA4cqxoJHtE21CCzjyp+Kxbu0i5I4tBNOlXPL9mjwnWlL0VEG4Fg==" + "integrity": "sha512-IkpVW/ehM1hWKln4fCA3NzJU8KwD+kIOvPZA4cqxoJHtE21CCzjyp+Kxbu0i5I4tBNOlXPL9mjwnWlL0VEG4Fg==", + "requires": {} }, "@date-io/core": { "version": "2.16.0", @@ -34566,7 +34644,8 @@ "@emotion/use-insertion-effect-with-fallbacks": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz", - "integrity": "sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A==" + "integrity": "sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A==", + "requires": {} }, "@emotion/utils": { "version": "1.0.0", @@ -34850,17 +34929,20 @@ "@fullcalendar/daygrid": { "version": "6.1.9", "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.9.tgz", - "integrity": "sha512-o/6joH/7lmVHXAkbaa/tUbzWYnGp/LgfdiFyYPkqQbjKEeivNZWF1WhHqFbhx0zbFONSHtrvkjY2bjr+Ef2quQ==" + "integrity": "sha512-o/6joH/7lmVHXAkbaa/tUbzWYnGp/LgfdiFyYPkqQbjKEeivNZWF1WhHqFbhx0zbFONSHtrvkjY2bjr+Ef2quQ==", + "requires": {} }, "@fullcalendar/interaction": { "version": "6.1.9", "resolved": "https://registry.npmjs.org/@fullcalendar/interaction/-/interaction-6.1.9.tgz", - "integrity": "sha512-I3FGnv0kKZpIwujg3HllbKrciNjTqeTYy3oJG226oAn7lV6wnrrDYMmuGmA0jPJAGN46HKrQqKN7ItxQRDec4Q==" + "integrity": "sha512-I3FGnv0kKZpIwujg3HllbKrciNjTqeTYy3oJG226oAn7lV6wnrrDYMmuGmA0jPJAGN46HKrQqKN7ItxQRDec4Q==", + "requires": {} }, "@fullcalendar/react": { "version": "6.1.9", "resolved": "https://registry.npmjs.org/@fullcalendar/react/-/react-6.1.9.tgz", - "integrity": "sha512-ioxu0V++pYz2u/N1LL1V8DkMyiKGRun0gMAll2tQz3Kzi3r9pTwncGKRb1zO8h0e+TrInU08ywk/l5lBwp7eog==" + "integrity": "sha512-ioxu0V++pYz2u/N1LL1V8DkMyiKGRun0gMAll2tQz3Kzi3r9pTwncGKRb1zO8h0e+TrInU08ywk/l5lBwp7eog==", + "requires": {} }, "@fullcalendar/timegrid": { "version": "6.1.9", @@ -35762,7 +35844,8 @@ "@mantine/hooks": { "version": "4.2.12", "resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-4.2.12.tgz", - "integrity": "sha512-/2GOsgv1tAUFBXOUV0YBZdDZHj3pHN82Sv1oI/hJMjfIT3ZkGeeiJO8Cw9cBcn76t6caP6Czi3hcuKhjz71O+A==" + "integrity": "sha512-/2GOsgv1tAUFBXOUV0YBZdDZHj3pHN82Sv1oI/hJMjfIT3ZkGeeiJO8Cw9cBcn76t6caP6Czi3hcuKhjz71O+A==", + "requires": {} }, "@mantine/rte": { "version": "4.2.12", @@ -35862,7 +35945,8 @@ "@material-ui/types": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.1.0.tgz", - "integrity": "sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A==" + "integrity": "sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A==", + "requires": {} }, "@material-ui/utils": { "version": "4.11.3", @@ -35877,7 +35961,8 @@ "@modulz/radix-icons": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@modulz/radix-icons/-/radix-icons-4.0.0.tgz", - "integrity": "sha512-d79T4cYvMGMocVC/q1WiMO578FPFfUoxmXIkduc8cUQAPDr7thuEV5HrCHhqqqkoVaYD0QPct180ilcNUyGPrg==" + "integrity": "sha512-d79T4cYvMGMocVC/q1WiMO578FPFfUoxmXIkduc8cUQAPDr7thuEV5HrCHhqqqkoVaYD0QPct180ilcNUyGPrg==", + "requires": {} }, "@mui/base": { "version": "5.0.0-beta.11", @@ -36113,7 +36198,8 @@ "@mui/types": { "version": "7.2.4", "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.4.tgz", - "integrity": "sha512-LBcwa8rN84bKF+f5sDyku42w1NTxaPgPyYKODsh01U1fVstTClbUoSA96oyRBnSNyEiAVjKm6Gwx9vjR+xyqHA==" + "integrity": "sha512-LBcwa8rN84bKF+f5sDyku42w1NTxaPgPyYKODsh01U1fVstTClbUoSA96oyRBnSNyEiAVjKm6Gwx9vjR+xyqHA==", + "requires": {} }, "@mui/utils": { "version": "5.14.5", @@ -36446,6 +36532,39 @@ "prop-types": "^15.7.2" } }, + "@nivo/line": { + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@nivo/line/-/line-0.84.0.tgz", + "integrity": "sha512-QE0JwZ7oIwMnsDQeSr1Q6iyqD2UBVLtBMdfMsJLhnlI3V62VkY98/L3o8M7+7Wy/V2UiEMJ+14C2qhXd+XLgsA==", + "requires": { + "@nivo/annotations": "0.84.0", + "@nivo/axes": "0.84.0", + "@nivo/colors": "0.84.0", + "@nivo/core": "0.84.0", + "@nivo/legends": "0.84.0", + "@nivo/scales": "0.84.0", + "@nivo/tooltip": "0.84.0", + "@nivo/voronoi": "0.84.0", + "@react-spring/web": "9.4.5 || ^9.7.2", + "d3-shape": "^1.3.5", + "prop-types": "^15.7.2" + }, + "dependencies": { + "d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==" + }, + "d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "requires": { + "d3-path": "1" + } + } + } + }, "@nivo/pie": { "version": "0.84.0", "resolved": "https://registry.npmjs.org/@nivo/pie/-/pie-0.84.0.tgz", @@ -36526,6 +36645,18 @@ "@react-spring/web": "9.4.5 || ^9.7.2" } }, + "@nivo/voronoi": { + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@nivo/voronoi/-/voronoi-0.84.0.tgz", + "integrity": "sha512-CJTb0sQWYNbfjjrCEK3W0jt1v+hqAd4fDUNJxB3SNRHEEQtF+MCr2EG3p/CWyxIb3avjF4N53/03tQpnuDwBvQ==", + "requires": { + "@nivo/core": "0.84.0", + "@types/d3-delaunay": "^5.3.0", + "@types/d3-scale": "^3.2.3", + "d3-delaunay": "^5.3.0", + "d3-scale": "^3.2.3" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -36719,7 +36850,8 @@ "@react-icons/all-files": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@react-icons/all-files/-/all-files-4.1.0.tgz", - "integrity": "sha512-hxBI2UOuVaI3O/BhQfhtb4kcGn9ft12RWAFVMUeNjqqhLsHvFtzIkFaptBJpFDANTKoDfdVoHTKZDlwKCACbMQ==" + "integrity": "sha512-hxBI2UOuVaI3O/BhQfhtb4kcGn9ft12RWAFVMUeNjqqhLsHvFtzIkFaptBJpFDANTKoDfdVoHTKZDlwKCACbMQ==", + "requires": {} }, "@react-spring/animated": { "version": "9.7.3", @@ -36767,7 +36899,8 @@ "@restart/context": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@restart/context/-/context-2.1.4.tgz", - "integrity": "sha512-INJYZQJP7g+IoDUh/475NlGiTeMfwTXUEr3tmRneckHIxNolGOW9CTq83S8cxq0CgJwwcMzMJFchxvlwe7Rk8Q==" + "integrity": "sha512-INJYZQJP7g+IoDUh/475NlGiTeMfwTXUEr3tmRneckHIxNolGOW9CTq83S8cxq0CgJwwcMzMJFchxvlwe7Rk8Q==", + "requires": {} }, "@restart/hooks": { "version": "0.4.7", @@ -37298,6 +37431,11 @@ "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-2.0.3.tgz", "integrity": "sha512-+0EtEjBfKEDtH9Rk3u3kLOUXM5F+iZK+WvASPb0MhIZl8J8NUvGeZRwKCXl+P3HkYx5TdU4YtcibpqHkSR9n7w==" }, + "@types/d3-delaunay": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-5.3.4.tgz", + "integrity": "sha512-GEQuDXVKQvHulQ+ecKyCubOmVjXrifAj7VR26rWVAER/IbWemaT/Tmo84ESiTtoDghg5ILdMZH7pYXQEt/Vu9A==" + }, "@types/d3-ease": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.0.tgz", @@ -38267,12 +38405,14 @@ "acorn-import-assertions": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==" + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "requires": {} }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "requires": {} }, "acorn-node": { "version": "1.8.2", @@ -38363,7 +38503,8 @@ "ajv-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==" + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "requires": {} }, "ajv-formats": { "version": "2.1.1", @@ -38394,7 +38535,8 @@ "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "requires": {} }, "alphanum-sort": { "version": "1.0.2", @@ -38869,7 +39011,8 @@ "babel-plugin-named-asset-import": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.8.tgz", - "integrity": "sha512-WXiAc++qo7XcJ1ZnTYGtLxmBCVbddAml3CEXgWaBzNzLNoxtQ8AiGEFDMOhot9XjTCQbvP5E77Fj9Gk924f00Q==" + "integrity": "sha512-WXiAc++qo7XcJ1ZnTYGtLxmBCVbddAml3CEXgWaBzNzLNoxtQ8AiGEFDMOhot9XjTCQbvP5E77Fj9Gk924f00Q==", + "requires": {} }, "babel-plugin-polyfill-corejs2": { "version": "0.3.3", @@ -39176,7 +39319,8 @@ "bootstrap": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz", - "integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==" + "integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==", + "requires": {} }, "bootstrap-icons": { "version": "1.10.3", @@ -40333,7 +40477,8 @@ "css-declaration-sorter": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz", - "integrity": "sha512-fBffmak0bPAnyqc/HO8C3n2sHrp9wcqQz6ES9koRF2/mLOVAx9zIQ3Y7R29sYCteTPqMCwns4WYQoCX91Xl3+w==" + "integrity": "sha512-fBffmak0bPAnyqc/HO8C3n2sHrp9wcqQz6ES9koRF2/mLOVAx9zIQ3Y7R29sYCteTPqMCwns4WYQoCX91Xl3+w==", + "requires": {} }, "css-tree": { "version": "1.1.3", @@ -40437,22 +40582,26 @@ "postcss-discard-comments": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz", - "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==" + "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==", + "requires": {} }, "postcss-discard-duplicates": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz", - "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==" + "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==", + "requires": {} }, "postcss-discard-empty": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz", - "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==" + "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==", + "requires": {} }, "postcss-discard-overridden": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz", - "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==" + "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==", + "requires": {} }, "postcss-merge-longhand": { "version": "5.1.7", @@ -40513,7 +40662,8 @@ "postcss-normalize-charset": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", - "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==" + "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==", + "requires": {} }, "postcss-normalize-display-values": { "version": "5.1.0", @@ -40788,7 +40938,8 @@ "css-prefers-color-scheme": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-6.0.3.tgz", - "integrity": "sha512-4BqMbZksRkJQx2zAjrokiGMd07RqOa2IxIrrN10lyBe9xhn9DEvjUK79J6jkeiv9D9hQFXKb6g1jwU62jziJZA==" + "integrity": "sha512-4BqMbZksRkJQx2zAjrokiGMd07RqOa2IxIrrN10lyBe9xhn9DEvjUK79J6jkeiv9D9hQFXKb6g1jwU62jziJZA==", + "requires": {} }, "css-select": { "version": "4.3.0", @@ -41047,7 +41198,8 @@ "cssnano-utils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz", - "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==" + "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==", + "requires": {} }, "csso": { "version": "4.2.0", @@ -41147,6 +41299,14 @@ "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-2.0.0.tgz", "integrity": "sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ==" }, + "d3-delaunay": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-5.3.0.tgz", + "integrity": "sha512-amALSrOllWVLaHTnDLHwMIiz0d1bBu9gZXd1FiLfXf8sHcX9jrcj81TVZOqD4UX7MgBZZ07c8GxzEgBpJqc74w==", + "requires": { + "delaunator": "4" + } + }, "d3-ease": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", @@ -41745,7 +41905,8 @@ "draftjs-utils": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/draftjs-utils/-/draftjs-utils-0.10.2.tgz", - "integrity": "sha512-EstHqr3R3JVcilJrBaO/A+01GvwwKmC7e4TCjC7S94ZeMh4IVmf60OuQXtHHpwItK8C2JCi3iljgN5KHkJboUg==" + "integrity": "sha512-EstHqr3R3JVcilJrBaO/A+01GvwwKmC7e4TCjC7S94ZeMh4IVmf60OuQXtHHpwItK8C2JCi3iljgN5KHkJboUg==", + "requires": {} }, "duplexer": { "version": "0.1.1", @@ -42348,7 +42509,8 @@ "eslint-plugin-react-hooks": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", - "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==" + "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", + "requires": {} }, "eslint-plugin-testing-library": { "version": "5.9.1", @@ -43329,7 +43491,8 @@ "gatsby-plugin-cookie-gdpr-axeptio": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/gatsby-plugin-cookie-gdpr-axeptio/-/gatsby-plugin-cookie-gdpr-axeptio-1.0.2.tgz", - "integrity": "sha512-2XvGm0s6iS8tBGer/ntQ904L2LrQOR+MQ9o07/6We993bgZiqUvgezSxz39G/33GcN3Ccwn1tVSqhG48+nNjVQ==" + "integrity": "sha512-2XvGm0s6iS8tBGer/ntQ904L2LrQOR+MQ9o07/6We993bgZiqUvgezSxz39G/33GcN3Ccwn1tVSqhG48+nNjVQ==", + "requires": {} }, "generic-names": { "version": "2.0.1", @@ -43855,7 +44018,8 @@ "html-to-draftjs": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/html-to-draftjs/-/html-to-draftjs-1.5.0.tgz", - "integrity": "sha512-kggLXBNciKDwKf+KYsuE+V5gw4dZ7nHyGMX9m0wy7urzWjKGWyNFetmArRLvRV0VrxKN70WylFsJvMTJx02OBQ==" + "integrity": "sha512-kggLXBNciKDwKf+KYsuE+V5gw4dZ7nHyGMX9m0wy7urzWjKGWyNFetmArRLvRV0VrxKN70WylFsJvMTJx02OBQ==", + "requires": {} }, "html-webpack-plugin": { "version": "5.5.0", @@ -44012,7 +44176,8 @@ "icss-utils": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", - "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==" + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "requires": {} }, "idb": { "version": "7.1.1", @@ -44098,6 +44263,14 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" }, + "increase-memory-limit": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/increase-memory-limit/-/increase-memory-limit-1.0.7.tgz", + "integrity": "sha512-ozyn+HHAPD9VxMT1U50A7G8XXlktUWhnnEDYSeDYnQjKsNrBWHqq6XfEA0uhMdDPD+q/7rXWlzF1CbXX/c1LiQ==", + "requires": { + "glob": "^7.1.1" + } + }, "indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", @@ -45654,7 +45827,8 @@ "jest-pnp-resolver": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==" + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "requires": {} }, "jest-regex-util": { "version": "27.5.1", @@ -48643,7 +48817,8 @@ "postcss-browser-comments": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-browser-comments/-/postcss-browser-comments-4.0.0.tgz", - "integrity": "sha512-X9X9/WN3KIvY9+hNERUqX9gncsgBA25XaeR+jshHz2j8+sYyHktHw1JdKuMjeLpGktXidqDhA7b/qm1mrBDmgg==" + "integrity": "sha512-X9X9/WN3KIvY9+hNERUqX9gncsgBA25XaeR+jshHz2j8+sYyHktHw1JdKuMjeLpGktXidqDhA7b/qm1mrBDmgg==", + "requires": {} }, "postcss-calc": { "version": "7.0.5", @@ -49137,7 +49312,8 @@ "postcss-flexbugs-fixes": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-5.0.2.tgz", - "integrity": "sha512-18f9voByak7bTktR2QgDveglpn9DTbBWPUzSOe9g0N4WR/2eSt6Vrcbf0hmspvMI6YWGywz6B9f7jzpFNJJgnQ==" + "integrity": "sha512-18f9voByak7bTktR2QgDveglpn9DTbBWPUzSOe9g0N4WR/2eSt6Vrcbf0hmspvMI6YWGywz6B9f7jzpFNJJgnQ==", + "requires": {} }, "postcss-focus-visible": { "version": "6.0.4", @@ -49158,12 +49334,14 @@ "postcss-font-variant": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-5.0.0.tgz", - "integrity": "sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==" + "integrity": "sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==", + "requires": {} }, "postcss-gap-properties": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/postcss-gap-properties/-/postcss-gap-properties-3.0.5.tgz", - "integrity": "sha512-IuE6gKSdoUNcvkGIqdtjtcMtZIFyXZhmFd5RUlg97iVEvp1BZKV5ngsAjCjrVy+14uhGBQl9tzmi1Qwq4kqVOg==" + "integrity": "sha512-IuE6gKSdoUNcvkGIqdtjtcMtZIFyXZhmFd5RUlg97iVEvp1BZKV5ngsAjCjrVy+14uhGBQl9tzmi1Qwq4kqVOg==", + "requires": {} }, "postcss-image-set-function": { "version": "4.0.7", @@ -49186,7 +49364,8 @@ "postcss-initial": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-4.0.1.tgz", - "integrity": "sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ==" + "integrity": "sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ==", + "requires": {} }, "postcss-js": { "version": "4.0.0", @@ -49302,12 +49481,14 @@ "postcss-logical": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/postcss-logical/-/postcss-logical-5.0.4.tgz", - "integrity": "sha512-RHXxplCeLh9VjinvMrZONq7im4wjWGlRJAqmAVLXyZaXwfDWP73/oq4NdIp+OZwhQUMj0zjqDfM5Fj7qby+B4g==" + "integrity": "sha512-RHXxplCeLh9VjinvMrZONq7im4wjWGlRJAqmAVLXyZaXwfDWP73/oq4NdIp+OZwhQUMj0zjqDfM5Fj7qby+B4g==", + "requires": {} }, "postcss-media-minmax": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/postcss-media-minmax/-/postcss-media-minmax-5.0.0.tgz", - "integrity": "sha512-yDUvFf9QdFZTuCUg0g0uNSHVlJ5X1lSzDZjPSFaiCWvjgsvu8vEVxtahPrLMinIDEEGnx6cBe6iqdx5YWz08wQ==" + "integrity": "sha512-yDUvFf9QdFZTuCUg0g0uNSHVlJ5X1lSzDZjPSFaiCWvjgsvu8vEVxtahPrLMinIDEEGnx6cBe6iqdx5YWz08wQ==", + "requires": {} }, "postcss-merge-longhand": { "version": "4.0.11", @@ -49579,7 +49760,8 @@ "postcss-modules-extract-imports": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==" + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "requires": {} }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -49956,7 +50138,8 @@ "postcss-opacity-percentage": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/postcss-opacity-percentage/-/postcss-opacity-percentage-1.1.3.tgz", - "integrity": "sha512-An6Ba4pHBiDtyVpSLymUUERMo2cU7s+Obz6BTrS+gxkbnSBNKSuD0AVUc+CpBMrpVPKKfoVz0WQCX+Tnst0i4A==" + "integrity": "sha512-An6Ba4pHBiDtyVpSLymUUERMo2cU7s+Obz6BTrS+gxkbnSBNKSuD0AVUc+CpBMrpVPKKfoVz0WQCX+Tnst0i4A==", + "requires": {} }, "postcss-ordered-values": { "version": "4.1.2", @@ -50005,7 +50188,8 @@ "postcss-page-break": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/postcss-page-break/-/postcss-page-break-3.0.4.tgz", - "integrity": "sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==" + "integrity": "sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==", + "requires": {} }, "postcss-place": { "version": "7.0.5", @@ -50166,7 +50350,8 @@ "postcss-replace-overflow-wrap": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz", - "integrity": "sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==" + "integrity": "sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==", + "requires": {} }, "postcss-selector-not": { "version": "6.0.1", @@ -50792,7 +50977,8 @@ "react-canvas-js": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/react-canvas-js/-/react-canvas-js-1.0.1.tgz", - "integrity": "sha512-rn+CEpdUmybItigZLPcSgecSf0kEWASa15jA3GbVsi9WJ19jngu/OW9+bUkepl5Eiioz0pkIiyny+3sJWcTcZg==" + "integrity": "sha512-rn+CEpdUmybItigZLPcSgecSf0kEWASa15jA3GbVsi9WJ19jngu/OW9+bUkepl5Eiioz0pkIiyny+3sJWcTcZg==", + "requires": {} }, "react-clock": { "version": "3.1.0", @@ -50898,7 +51084,8 @@ "react-confirm-alert": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/react-confirm-alert/-/react-confirm-alert-2.8.0.tgz", - "integrity": "sha512-qvNjJWuWUpTh+q4NecUjCMIWLNDl8IwW6JRIky5pzoiFBXsLWSA2Z1VsaDsQedwgyxEpKnMEJFETkDogBpv/kA==" + "integrity": "sha512-qvNjJWuWUpTh+q4NecUjCMIWLNDl8IwW6JRIky5pzoiFBXsLWSA2Z1VsaDsQedwgyxEpKnMEJFETkDogBpv/kA==", + "requires": {} }, "react-cookie": { "version": "4.1.1", @@ -51050,7 +51237,8 @@ "bootstrap": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz", - "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==" + "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==", + "requires": {} }, "entities": { "version": "2.2.0", @@ -51374,7 +51562,8 @@ "react-hook-form": { "version": "7.41.2", "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.41.2.tgz", - "integrity": "sha512-Uz5kNlfkEZve0sr5y2LsxPDGN3eNDjjKb1XJgand1E5Ay0S3zWo8YcJQNGu88/Zs6JaFnrJqTXbSr6B2q7wllA==" + "integrity": "sha512-Uz5kNlfkEZve0sr5y2LsxPDGN3eNDjjKb1XJgand1E5Ay0S3zWo8YcJQNGu88/Zs6JaFnrJqTXbSr6B2q7wllA==", + "requires": {} }, "react-html-parser": { "version": "2.0.2", @@ -51450,7 +51639,8 @@ "react-icons": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.10.1.tgz", - "integrity": "sha512-/ngzDP/77tlCfqthiiGNZeYFACw85fUjZtLbedmJ5DTlNDIwETxhwBzdOJ21zj4iJdvc0J3y7yOsX3PpxAJzrw==" + "integrity": "sha512-/ngzDP/77tlCfqthiiGNZeYFACw85fUjZtLbedmJ5DTlNDIwETxhwBzdOJ21zj4iJdvc0J3y7yOsX3PpxAJzrw==", + "requires": {} }, "react-input-range": { "version": "1.3.0", @@ -51533,7 +51723,8 @@ "react-meta-tags": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/react-meta-tags/-/react-meta-tags-1.0.1.tgz", - "integrity": "sha512-uylBI9UOI0QCGDsl6PlZaHnp+MxEpwslTlicPjnlcD68I8Kl2hdbuAZBRih+yU5StArSMB6T0jBrgst6rAuDYQ==" + "integrity": "sha512-uylBI9UOI0QCGDsl6PlZaHnp+MxEpwslTlicPjnlcD68I8Kl2hdbuAZBRih+yU5StArSMB6T0jBrgst6rAuDYQ==", + "requires": {} }, "react-motion": { "version": "0.5.2", @@ -51560,7 +51751,8 @@ "react-native-iphone-x-helper": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz", - "integrity": "sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg==" + "integrity": "sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg==", + "requires": {} }, "react-native-paper": { "version": "4.12.5", @@ -51605,12 +51797,14 @@ "react-onclickoutside": { "version": "6.12.2", "resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.12.2.tgz", - "integrity": "sha512-NMXGa223OnsrGVp5dJHkuKxQ4czdLmXSp5jSV9OqiCky9LOpPATn3vLldc+q5fK3gKbEHvr7J1u0yhBh/xYkpA==" + "integrity": "sha512-NMXGa223OnsrGVp5dJHkuKxQ4czdLmXSp5jSV9OqiCky9LOpPATn3vLldc+q5fK3gKbEHvr7J1u0yhBh/xYkpA==", + "requires": {} }, "react-only-when": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/react-only-when/-/react-only-when-1.0.2.tgz", - "integrity": "sha512-agE6l3L6bqaVuwNtjihTQ36M+VBfPS63KOzcNL4ZTmlwSxQPvhzIqmBWfiol0/wLYmKxCcBqgXkEJpvj5Kob8Q==" + "integrity": "sha512-agE6l3L6bqaVuwNtjihTQ36M+VBfPS63KOzcNL4ZTmlwSxQPvhzIqmBWfiol0/wLYmKxCcBqgXkEJpvj5Kob8Q==", + "requires": {} }, "react-overlays": { "version": "5.2.1", @@ -51674,7 +51868,8 @@ "react-range": { "version": "1.8.14", "resolved": "https://registry.npmjs.org/react-range/-/react-range-1.8.14.tgz", - "integrity": "sha512-v2nyD5106rHf9dwHzq+WRlhCes83h1wJRHIMFjbZsYYsO6LF4mG/mR3cH7Cf+dkeHq65DItuqIbLn/3jjYjsHg==" + "integrity": "sha512-v2nyD5106rHf9dwHzq+WRlhCes83h1wJRHIMFjbZsYYsO6LF4mG/mR3cH7Cf+dkeHq65DItuqIbLn/3jjYjsHg==", + "requires": {} }, "react-rating-stars-component": { "version": "2.2.0", @@ -51871,7 +52066,8 @@ "react-scroll-to-top": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/react-scroll-to-top/-/react-scroll-to-top-3.0.0.tgz", - "integrity": "sha512-I/k45Ujai097du59tHBbzGxN7Lyc6K8Uc3IChq6HMXaBfB8N/rrfm055T5Yv0DWfVpf6pOFaBmhD3LOfH5unGw==" + "integrity": "sha512-I/k45Ujai097du59tHBbzGxN7Lyc6K8Uc3IChq6HMXaBfB8N/rrfm055T5Yv0DWfVpf6pOFaBmhD3LOfH5unGw==", + "requires": {} }, "react-search-autocomplete": { "version": "7.2.2", @@ -51986,7 +52182,8 @@ "react-side-effect": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", - "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==" + "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", + "requires": {} }, "react-simple-modal": { "version": "1.1.5", @@ -52032,12 +52229,14 @@ "react-simple-modal-cb": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/react-simple-modal-cb/-/react-simple-modal-cb-2.0.4.tgz", - "integrity": "sha512-BhUoY0ngqcAi2DtEq6Ii5HRh+yKOI+BB8ZlIILE5+2KLNH86Oeq9plq7KXKcKAzHtLPRr+iMqHqu7Hg8qdMTEA==" + "integrity": "sha512-BhUoY0ngqcAi2DtEq6Ii5HRh+yKOI+BB8ZlIILE5+2KLNH86Oeq9plq7KXKcKAzHtLPRr+iMqHqu7Hg8qdMTEA==", + "requires": {} }, "react-simple-star-rating": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/react-simple-star-rating/-/react-simple-star-rating-4.1.1.tgz", - "integrity": "sha512-mUj1FxGPchOly1Zj00eakntIEIZKxBaiGcMW+UE5RK3/UWt6+6i8HUHnIH8ICXbjQYS+gWGi4NamwgvMZYTYzg==" + "integrity": "sha512-mUj1FxGPchOly1Zj00eakntIEIZKxBaiGcMW+UE5RK3/UWt6+6i8HUHnIH8ICXbjQYS+gWGi4NamwgvMZYTYzg==", + "requires": {} }, "react-slideshow-image": { "version": "3.7.5", @@ -52096,7 +52295,8 @@ "react-social-login-buttons": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/react-social-login-buttons/-/react-social-login-buttons-3.6.1.tgz", - "integrity": "sha512-DIz30W+C147s7wxwt8zgwjx5pE+gTJwtUzTNKpKZO3bEY06eLjcY1zvZ8h35hQd1Yjd7b4rLkeuZBwlLURYIfg==" + "integrity": "sha512-DIz30W+C147s7wxwt8zgwjx5pE+gTJwtUzTNKpKZO3bEY06eLjcY1zvZ8h35hQd1Yjd7b4rLkeuZBwlLURYIfg==", + "requires": {} }, "react-sortable-tree-patch-react-17": { "version": "2.9.0", @@ -52264,7 +52464,8 @@ "react-to-print": { "version": "2.14.13", "resolved": "https://registry.npmjs.org/react-to-print/-/react-to-print-2.14.13.tgz", - "integrity": "sha512-PqUGgTRZvkyBzWgaZHVBECWPX2nGEc3HOUy6WNXof6HT4yTFI92wtIkqQtr4jfvHbadqjwTgzgh6vgN8KXlWWw==" + "integrity": "sha512-PqUGgTRZvkyBzWgaZHVBECWPX2nGEc3HOUy6WNXof6HT4yTFI92wtIkqQtr4jfvHbadqjwTgzgh6vgN8KXlWWw==", + "requires": {} }, "react-toastify": { "version": "9.1.1", @@ -52297,12 +52498,14 @@ "react-transition-state": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/react-transition-state/-/react-transition-state-1.1.5.tgz", - "integrity": "sha512-ITY2mZqc2dWG2eitJkYNdcSFW8aKeOlkL2A/vowRrLL8GH3J6Re/SpD/BLvQzrVOTqjsP0b5S9N10vgNNzwMUQ==" + "integrity": "sha512-ITY2mZqc2dWG2eitJkYNdcSFW8aKeOlkL2A/vowRrLL8GH3J6Re/SpD/BLvQzrVOTqjsP0b5S9N10vgNNzwMUQ==", + "requires": {} }, "react-use-cookie": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/react-use-cookie/-/react-use-cookie-1.4.0.tgz", - "integrity": "sha512-e21YFkimh8OX6Ctqq89YeeiwsIL1jr2GyCeBdkBKDWY5X5o2yonbQuqfFODK4opteJS3F7ya0OuYg06lOeqvJQ==" + "integrity": "sha512-e21YFkimh8OX6Ctqq89YeeiwsIL1jr2GyCeBdkBKDWY5X5o2yonbQuqfFODK4opteJS3F7ya0OuYg06lOeqvJQ==", + "requires": {} }, "react-video-js-player": { "version": "1.1.1", @@ -52844,7 +53047,8 @@ "reactjs-popup": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/reactjs-popup/-/reactjs-popup-2.0.5.tgz", - "integrity": "sha512-b5hv9a6aGsHEHXFAgPO5s1Jw1eSkopueyUVxQewGdLgqk2eW0IVXZrPRpHR629YcgIpC2oxtX8OOZ8a7bQJbxA==" + "integrity": "sha512-b5hv9a6aGsHEHXFAgPO5s1Jw1eSkopueyUVxQewGdLgqk2eW0IVXZrPRpHR629YcgIpC2oxtX8OOZ8a7bQJbxA==", + "requires": {} }, "reactstrap": { "version": "9.1.5", @@ -53271,7 +53475,8 @@ "rifm": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/rifm/-/rifm-0.12.1.tgz", - "integrity": "sha512-OGA1Bitg/dSJtI/c4dh90svzaUPt228kzFsUkJbtA2c964IqEAwWXeL9ZJi86xWv3j5SMqRvGULl7bA6cK0Bvg==" + "integrity": "sha512-OGA1Bitg/dSJtI/c4dh90svzaUPt228kzFsUkJbtA2c964IqEAwWXeL9ZJi86xWv3j5SMqRvGULl7bA6cK0Bvg==", + "requires": {} }, "rimraf": { "version": "3.0.2", @@ -54030,7 +54235,8 @@ "bootstrap": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz", - "integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==" + "integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==", + "requires": {} } } }, @@ -54749,7 +54955,8 @@ "style-loader": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz", - "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==" + "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==", + "requires": {} }, "style-to-js": { "version": "1.1.1", @@ -54802,7 +55009,8 @@ "styled-jsx": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz", - "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==" + "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==", + "requires": {} }, "stylehacks": { "version": "4.0.3", @@ -55069,7 +55277,8 @@ "swr": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/swr/-/swr-1.3.0.tgz", - "integrity": "sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw==" + "integrity": "sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw==", + "requires": {} }, "symbol-observable": { "version": "1.2.0", @@ -55753,17 +55962,20 @@ "use-composed-ref": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.3.0.tgz", - "integrity": "sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==" + "integrity": "sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==", + "requires": {} }, "use-global-state": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/use-global-state/-/use-global-state-0.1.2.tgz", - "integrity": "sha512-zfkipI7HgwPEhYD8JTUxCrm50sHwXMbKAQ5WtAkD41LJ6XJTRZROgeMFxmAPdk58FcXPOOhOE+pUnE1HbGeTuw==" + "integrity": "sha512-zfkipI7HgwPEhYD8JTUxCrm50sHwXMbKAQ5WtAkD41LJ6XJTRZROgeMFxmAPdk58FcXPOOhOE+pUnE1HbGeTuw==", + "requires": {} }, "use-isomorphic-layout-effect": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz", - "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==" + "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==", + "requires": {} }, "use-latest": { "version": "1.2.1", @@ -55776,7 +55988,8 @@ "use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==" + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "requires": {} }, "util": { "version": "0.11.1", @@ -56868,7 +57081,8 @@ "ws": { "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==" + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "requires": {} } } }, @@ -57383,7 +57597,8 @@ "ws": { "version": "7.5.9", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==" + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "requires": {} }, "wysiwyg": { "version": "2.0.0", diff --git a/package.json b/package.json index d360407..7f2abfc 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "my-app2", + "name": "MySy Training", "version": "0.1.0", "private": true, "dependencies": { @@ -28,6 +28,7 @@ "@mui/x-date-pickers": "^5.0.0", "@mui/x-date-pickers-pro": "^5.0.0", "@nivo/bar": "^0.84.0", + "@nivo/line": "^0.84.0", "@nivo/pie": "^0.84.0", "@react-icons/all-files": "^4.1.0", "@stripe/react-stripe-js": "^1.12.0", @@ -52,6 +53,7 @@ "gatsby-plugin-cookie-gdpr-axeptio": "^1.0.2", "google-map-react": "^2.1.10", "html-react-parser": "^2.0.0", + "increase-memory-limit": "^1.0.7", "js-cookie": "^3.0.1", "js-file-download": "^0.4.12", "js-video-url-parser": "^0.5.1", @@ -146,8 +148,8 @@ "wysiwyg": "^2.0.0" }, "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", + "start": "set \"GENERATE_SOURCEMAP=false\" && react-scripts start --max-old-space-size=16384", + "build": "react-scripts build --max-old-space-size=16384", "test": "react-scripts test", "eject": "react-scripts eject", "winBuild": "set \"GENERATE_SOURCEMAP=false\" && react-scripts build" diff --git a/src/components/Dashbord_Formation.js b/src/components/Dashbord_Formation.js new file mode 100644 index 0000000..fc51762 --- /dev/null +++ b/src/components/Dashbord_Formation.js @@ -0,0 +1,431 @@ +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 "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 DatePicker from "react-datepicker"; +import "react-datepicker/dist/react-datepicker.css"; +import { format } from 'date-fns' +import moment from "moment"; +import Box from '@mui/material/Box'; +import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; +import { tokens } from "./../theme"; +import { MdOutlineAddchart, } from "react-icons/md"; + + +import { + ListItem, + ListItemText, + useTheme, +} from "@mui/material"; + +import { ResponsiveLine } from '@nivo/line' +import { TbColumns2, TbColumns1 } from "react-icons/tb"; + + +const Dashbord_Formation = (props) => { + + const history = useHistory(); + const [isLoading, setLoading] = useState(); + + const theme = useTheme(); + const colors = tokens(theme.palette.mode); + + const [isMySyDashboard, setisMySyDashboard] = useState(false); + + var date_today_90j = new Date(); + date_today_90j.setDate(date_today_90j.getDate() - 90); + + + const [p_filter_date_from, setp_filter_date_from] = useState(date_today_90j.toLocaleDateString('fr-FR')); + const [p_filter_date_to, setp_filter_date_to] = useState(new Date().toLocaleDateString('fr-FR')); + + + const [dashbord_internal_code, setdashbord_internal_code] = useState(""); + + const [Getall_Qry_Formation_Session_result_JSON, setGetall_Qry_Formation_Session_result_JSON] = useState([]); + const [Getall_Qry_Formation_Session_api, setGetall_Qry_Formation_Session_api] = useState(); + const [Getall_Qry_Formation_Session_message, setGetall_Qry_Formation_Session_message] = useState(); + const [Getall_Qry_Formation_Session_result, setGetall_Qry_Formation_Session_result] = useState([]); + function Getall_Qry_Formation_Session(event) { + + 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("filter_value", filter_value); + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Formation_By_Session_By_Periode/"; + + setLoading(true); + 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); + setGetall_Qry_Formation_Session_result_JSON(JSON.parse( res.data.message )); + + var jsonObj = JSON.parse( res.data.message ); + + console.log(" jsonObj = ", jsonObj); + + setGetall_Qry_Formation_Session_api("true"); + setGetall_Qry_Formation_Session_result(res.data.message ); + + console.log(" Getall_Qry_Formation_Session_result_JSON = ", Getall_Qry_Formation_Session_result_JSON); + + + } + else { + setGetall_Qry_Formation_Session_api("false"); + setGetall_Qry_Formation_Session_message(res.data.message); + alert(res.data.message) + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Getall_Qry_Formation_Session = ', error); + setGetall_Qry_Formation_Session_api("false"); + alert("Impossible de récuperer les données demandées") + //setmyApimyApiMessage("") + }) + } + + + useEffect(() => { + + + Getall_Qry_Formation_Session(); + + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + }, []) + + const [Add_To_User_TBD_api, setAdd_To_User_TBD_api] = useState(); + const [Add_To_User_TBD_message, setAdd_To_User_TBD_message] = useState(); + const [Add_To_User_TBD_result, setAdd_To_User_TBD_result] = useState(); + function Add_To_User_TBD(local_dashbord_internal_code) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + //console.log(" ### dashbord_internal_code = ", local_dashbord_internal_code); + + var tdb_title = "default"; + var filter_val = ""; + + + if (document.getElementsByName("tdb_title")[0]) { + tdb_title = document.getElementsByName("tdb_title")[0].value; + } + + if (document.getElementsByName("filtre11")[0]) { + filter_val = document.getElementsByName("filtre11")[0].value; + } + + // Si filter_val = "d", alors on va recuperer l'interval de date + if (String(filter_val) === "d") { + var date_from = p_filter_date_from; + var date_to = p_filter_date_to; + + + filter_val = "{'session_start_date':'" + String(date_from) + "' , 'session_end_date':'" + String(date_to) + "'}"; + } else { + filter_val = "{'periode':'" + String(filter_val) + "'}" + } + + form.append("token", stored_cookie); + form.append("dashbord_internal_code", local_dashbord_internal_code); + form.append("default_filter", filter_val); + form.append("title", tdb_title); + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_To_User_Dashbord/"; + + //console.log(" ## myurl = ", myurl); + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Add_To_User_TBD res.data.status = " + res.data.status); + //console.log(" In Add_To_User_TBD res.data.message r_class = " + res.data.message); + + setAdd_To_User_TBD_api("true"); + setAdd_To_User_TBD_result(res.data.message); + settdb_title(); + alert(res.data.message) + + + } + else { + setAdd_To_User_TBD_api("false"); + setAdd_To_User_TBD_message(res.data.message); + alert(res.data.message) + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Add_To_User_TBD = ', error); + setAdd_To_User_TBD_api("false"); + alert("Impossible d'ajouter le tableau de bord"); + //setmyApimyApiMessage("") + }) + } + + + const [filter_value, setfilter_value] = useState("d"); + const [tdb_title, settdb_title] = useState(); + + const [display_nb_column, setdisplay_nb_column] = useState("2"); + const [display_column_size, setdisplay_column_size] = useState("50%"); + + return ( +
+ {isLoading &&
+
+
} + +

Tableaux de bord des formations

+
 
+
Affichage   + + + { + setdisplay_nb_column("1"); + setdisplay_column_size("100%"); + + }} /> +     + + + { + setdisplay_nb_column("2"); + setdisplay_column_size("50%"); + + }} /> +
+ +
+
+ Filtre
+ { + setfilter_value(e.target.value); + } + } + + > + Mois en cours    + Mois précédant   + Choisir des dates   + +
+ + {filter_value && String(filter_value) === "d" &&
+
+ Date Debut + { + setp_filter_date_from(format(date, 'dd/MM/yyyy')); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + + /> + +
+ +
+ Date Fin + { + setp_filter_date_to(format(date, 'dd/MM/yyyy')); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style enable_style" + /> + +
+ +
} +
+ + +
+ + +
+
+ +
+ + + + + + + +
+ {tdb_title && String(tdb_title) === "1" && } + +   + + + + + + +
+ +
+ + +
+ ) +} + + +export default Dashbord_Formation; \ No newline at end of file diff --git a/src/components/Dashbord_Formation_Evol_Session.js b/src/components/Dashbord_Formation_Evol_Session.js new file mode 100644 index 0000000..dbe8b44 --- /dev/null +++ b/src/components/Dashbord_Formation_Evol_Session.js @@ -0,0 +1,444 @@ +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 'react-tooltip/dist/react-tooltip.css' +import { Tooltip } from 'react-tooltip' +import fileDownload from 'js-file-download' +import Popup from 'reactjs-popup'; +import 'reactjs-popup/dist/index.css'; +import "react-datepicker/dist/react-datepicker.css"; +import Box from '@mui/material/Box'; +import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; + + +import { tokens } from "../theme"; +import { MdDeleteForever } from "react-icons/md"; + + +import { + useTheme, +} from "@mui/material"; + +import { ResponsiveLine } from '@nivo/line' + +import { RiFileExcel2Line } from "react-icons/ri"; + +const Dashbord_Formation_Evol_Session = (props) => { + + const [user_dashbord_id, setuser_dashbord_id] = useState(props.user_dashbord_id); + + + const history = useHistory(); + const [isLoading, setLoading] = useState(); + + const theme = useTheme(); + const colors = tokens(theme.palette.mode); + + const [isMySyDashboard, setisMySyDashboard] = useState(false); + + var date_today_90j = new Date(); + date_today_90j.setDate(date_today_90j.getDate() - 90); + + + const [p_filter_date_from, setp_filter_date_from] = useState(date_today_90j.toLocaleDateString('fr-FR')); + const [p_filter_date_to, setp_filter_date_to] = useState(new Date().toLocaleDateString('fr-FR')); + + + + const [Remove_From_User_TBD_api, setRemove_From_User_TBD_api] = useState(); + const [Remove_From_User_TBD_message, setRemove_From_User_TBD_message] = useState(); + const [Remove_From_User_TBD_result, setRemove_From_User_TBD_result] = useState(); + function Remove_From_User_TBD() { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + + + form.append("token", stored_cookie); + form.append("user_dashbord_id", user_dashbord_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_To_User_Dashbord/"; + + //console.log(" ## myurl = ", myurl); + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Remove_From_User_TBD res.data.status = " + res.data.status); + //console.log(" In Remove_From_User_TBD res.data.message r_class = " + res.data.message); + + setRemove_From_User_TBD_api("true"); + setRemove_From_User_TBD_result(res.data.message); + Getall_Qry_Formation_Session(); + alert(res.data.message); + window.location.reload(); + + + } + else { + setRemove_From_User_TBD_api("false"); + setRemove_From_User_TBD_message(res.data.message); + alert(res.data.message) + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Remove_From_User_TBD = ', error); + setRemove_From_User_TBD_api("false"); + alert("Impossible de supprimer le tableau de bord de votre liste"); + //setmyApimyApiMessage("") + }) + } + + + + + const [Getall_Qry_Formation_Session_result_JSON, setGetall_Qry_Formation_Session_result_JSON] = useState([]); + const [Getall_Qry_Formation_Session_api, setGetall_Qry_Formation_Session_api] = useState(); + const [Getall_Qry_Formation_Session_message, setGetall_Qry_Formation_Session_message] = useState(); + const [Getall_Qry_Formation_Session_result, setGetall_Qry_Formation_Session_result] = useState([]); + function Getall_Qry_Formation_Session(event) { + + 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); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Formation_By_Session_By_Periode/"; + + + setLoading(true); + 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); + setGetall_Qry_Formation_Session_result_JSON(JSON.parse( res.data.message )); + + var jsonObj = JSON.parse( res.data.message ); + + console.log(" jsonObj = ", jsonObj); + + setGetall_Qry_Formation_Session_api("true"); + setGetall_Qry_Formation_Session_result(res.data.message ); + + console.log(" Getall_Qry_Formation_Session_result_JSON = ", Getall_Qry_Formation_Session_result_JSON); + + + } + else { + setGetall_Qry_Formation_Session_api("false"); + setGetall_Qry_Formation_Session_message(res.data.message); + alert(res.data.message) + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Getall_Qry_Formation_Session = ', error); + setGetall_Qry_Formation_Session_api("false"); + alert("Impossible de récuperer les données demandées") + //setmyApimyApiMessage("") + }) + } + + const [dashbord_internal_code, setdashbord_internal_code] = useState(""); + + useEffect(() => { + + setp_filter_date_from(props.user_dashbord_filter_start); + setp_filter_date_to(props.user_dashbord_filter_end); + + + Getall_Qry_Formation_Session(); + + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + }, []) + + + const [filter_value, setfilter_value] = useState(""); + const [tdb_title, settdb_title] = useState(); + + function Export_Dashbord_to_CSV(local_dashbord_internal_id) { + + const stored_cookie = getCookie('tokenmysypart'); + + var nom_fichier_cmd = "export_csv.csv"; + console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id); + + var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Formation_By_Session_By_Periode_Export_CSV/" + stored_cookie + "/" + local_dashbord_internal_id; + + //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url); + 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 d'exporter les données (2) "); + } else { + fileDownload(res.data, nom_fichier_cmd) + + } + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + alert(" Impossible d'exporter les données ") + + }); + + } + + return ( +
+ {isLoading &&
+
+
} + + {/*
+
+ Filtre
+ { + setfilter_value(e.target.value); + } + } + + > + Mois en cours    + Trimestre en cours   + Choisir des dates   + +
+ + {filter_value && String(filter_value) === "d" &&
+
+ Date Debut + { + setp_filter_date_from(format(date, 'dd/MM/yyyy')); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + + /> + +
+ +
+ Date Fin + { + setp_filter_date_to(format(date, 'dd/MM/yyyy')); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style enable_style" + /> + +
+ +
} +
+ + +
*/} + +
+ +
+ + + + + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, le tableau sera supprimé de votre tableau de bord global.
+ Vous pourrez le rajouter à nouveau si besoin.
+ +
+
+
+ + +
+
+ +
+
+
+ )} +
+
+ + + + + + +
+ + +   + + + + + +
+ +
+ ) +} + + +export default Dashbord_Formation_Evol_Session; \ No newline at end of file diff --git a/src/components/Dashbord_Session.js b/src/components/Dashbord_Session.js index 9dd9d0d..0da10dd 100644 --- a/src/components/Dashbord_Session.js +++ b/src/components/Dashbord_Session.js @@ -6,59 +6,20 @@ 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 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 allLocales from '@fullcalendar/core/locales-all' -import { RepeatOnRounded } from "@mui/icons-material"; -import { alignPropType } from "react-bootstrap/esm/types"; import { tokens } from "./../theme"; -import { MdOutlineAddchart, MdAssignmentAdd, MdOutlinePlaylistRemove, MdDeleteForever } from "react-icons/md"; - -import FullCalendar, { formatDate } from "@fullcalendar/react"; -import dayGridPlugin from "@fullcalendar/daygrid"; -import timeGridPlugin from "@fullcalendar/timegrid"; -import interactionPlugin from "@fullcalendar/interaction"; - - +import { MdOutlineAddchart,} from "react-icons/md"; import { - ListItem, - ListItemText, useTheme, } from "@mui/material"; @@ -69,10 +30,6 @@ import { TbColumns2, TbColumns1 } from "react-icons/tb"; const Dashbord_Session = (props) => { - const myconntected_employee_id = props.conntected_employee_id; - - const [selected_employee_id, setselected_employee_id] = useState(props.conntected_employee_id); - const history = useHistory(); const [isLoading, setLoading] = useState(); @@ -187,6 +144,7 @@ const Dashbord_Session = (props) => { form.append("token", stored_cookie); form.append("session_start_date", date_from); form.append("session_end_date", date_to); + form.append("filter_value", filter_value); @@ -247,6 +205,7 @@ const Dashbord_Session = (props) => { form.append("token", stored_cookie); form.append("session_start_date", date_from); form.append("session_end_date", date_to); + form.append("filter_value", filter_value); var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Session_By_Trainer_By_Periode/"; @@ -309,7 +268,7 @@ const Dashbord_Session = (props) => { form.append("token", stored_cookie); form.append("session_start_date", date_from); form.append("session_end_date", date_to); - + form.append("filter_value", filter_value); var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Session_Repartition_Session_By_Trainer_By_Periode/"; @@ -326,7 +285,7 @@ const Dashbord_Session = (props) => { setGetall_Qry_Session_Data_Pourcent_Trainer_api("true"); setGetall_Qry_Session_Data_Pourcent_Trainer_result(res.data.message); - // console.log("### setGetall_Qry_Session_Data_Pourcent_Trainer_result_JSON = ", Getall_Qry_Session_Data_Pourcent_Trainer_result_JSON); + //console.log("### setGetall_Qry_Session_Data_Pourcent_Trainer_result_JSON = ", Getall_Qry_Session_Data_Pourcent_Trainer_result_JSON); } else { @@ -361,7 +320,7 @@ const Dashbord_Session = (props) => { }, []) - const [filter_value, setfilter_value] = useState("m0"); + const [filter_value, setfilter_value] = useState("d"); const [tdb_title, settdb_title] = useState(); const [display_nb_column, setdisplay_nb_column] = useState("2"); @@ -381,7 +340,7 @@ const Dashbord_Session = (props) => { { setdisplay_nb_column("1"); setdisplay_column_size("100%"); - console.log(" display_column_size = ", display_column_size); + }} />     @@ -389,7 +348,7 @@ const Dashbord_Session = (props) => { { setdisplay_nb_column("2"); setdisplay_column_size("50%"); - console.log(" display_column_size = ", display_column_size); + }} /> @@ -415,7 +374,7 @@ const Dashbord_Session = (props) => { > Mois en cours    - Trimestre en cours   + Mois précédant   Choisir des dates   @@ -464,71 +423,52 @@ const Dashbord_Session = (props) => {
-
-
+ + +
+
+ {tdb_title && String(tdb_title) === "1" && } +   {
-
-
+
+ + {tdb_title && String(tdb_title) === "2" && } + +   {
-
-
+
+ + {tdb_title && String(tdb_title) === "3" && } + +   - + + {
- +
) } diff --git a/src/components/Dashbord_Session_Par_Fteur.js b/src/components/Dashbord_Session_Par_Fteur.js index 9200935..e2003ec 100644 --- a/src/components/Dashbord_Session_Par_Fteur.js +++ b/src/components/Dashbord_Session_Par_Fteur.js @@ -1,71 +1,27 @@ 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 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 allLocales from '@fullcalendar/core/locales-all' -import { RepeatOnRounded } from "@mui/icons-material"; -import { alignPropType } from "react-bootstrap/esm/types"; - import { tokens } from "../theme"; -import { MdOutlineAddchart, MdAssignmentAdd, MdOutlinePlaylistRemove, MdDeleteForever } from "react-icons/md"; - -import FullCalendar, { formatDate } from "@fullcalendar/react"; -import dayGridPlugin from "@fullcalendar/daygrid"; -import timeGridPlugin from "@fullcalendar/timegrid"; -import interactionPlugin from "@fullcalendar/interaction"; - +import { MdDeleteForever } from "react-icons/md"; import { - ListItem, - ListItemText, useTheme, } from "@mui/material"; -import { ResponsivePie } from '@nivo/pie' import { ResponsiveBar } from "@nivo/bar"; - +import { RiFileExcel2Line } from "react-icons/ri"; const Dashbord_Session_Par_Fteur = (props) => { @@ -394,8 +350,12 @@ const Dashbord_Session_Par_Fteur = (props) => { useEffect(() => { + setp_filter_date_from(props.user_dashbord_filter_start); + setp_filter_date_to(props.user_dashbord_filter_end); + Getall_Qry_Session_Data_By_Trainer(); + window.scrollTo({ top: 0, behavior: "smooth", @@ -404,9 +364,39 @@ const Dashbord_Session_Par_Fteur = (props) => { }, []) - const [filter_value, setfilter_value] = useState("m0"); + const [filter_value, setfilter_value] = useState(""); const [tdb_title, settdb_title] = useState(); + function Export_Dashbord_to_CSV(local_dashbord_internal_id) { + + const stored_cookie = getCookie('tokenmysypart'); + + var nom_fichier_cmd = "export_csv.csv"; + console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id); + + var url = process.env.REACT_APP_API_URL + "myclass/api/Export_Dashbord_To_Csv/" + stored_cookie + "/" + local_dashbord_internal_id; + + //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url); + 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 d'exporter les données (2) "); + } else { + fileDownload(res.data, nom_fichier_cmd) + + } + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + alert(" Impossible d'exporter les données ") + + }); + + } + return (
{isLoading &&
@@ -493,7 +483,7 @@ const Dashbord_Session_Par_Fteur = (props) => {
- + { )} + + + + + +
diff --git a/src/components/Dashbord_Session_Repartition_Fteur.js b/src/components/Dashbord_Session_Repartition_Fteur.js index 71a5b99..82fdada 100644 --- a/src/components/Dashbord_Session_Repartition_Fteur.js +++ b/src/components/Dashbord_Session_Repartition_Fteur.js @@ -1,71 +1,26 @@ 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 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 allLocales from '@fullcalendar/core/locales-all' -import { RepeatOnRounded } from "@mui/icons-material"; -import { alignPropType } from "react-bootstrap/esm/types"; - import { tokens } from "../theme"; -import { MdOutlineAddchart, MdAssignmentAdd, MdOutlinePlaylistRemove, MdDeleteForever } from "react-icons/md"; - -import FullCalendar, { formatDate } from "@fullcalendar/react"; -import dayGridPlugin from "@fullcalendar/daygrid"; -import timeGridPlugin from "@fullcalendar/timegrid"; -import interactionPlugin from "@fullcalendar/interaction"; - +import { MdDeleteForever } from "react-icons/md"; import { - ListItem, - ListItemText, useTheme, } from "@mui/material"; import { ResponsivePie } from '@nivo/pie' -import { ResponsiveBar } from "@nivo/bar"; - +import { RiFileExcel2Line } from "react-icons/ri"; const Dashbord_Session_Repartition_Fteur = (props) => { @@ -84,8 +39,8 @@ const Dashbord_Session_Repartition_Fteur = (props) => { date_today_90j.setDate(date_today_90j.getDate() - 90); - const [p_filter_date_from, setp_filter_date_from] = useState(date_today_90j.toLocaleDateString('fr-FR')); - const [p_filter_date_to, setp_filter_date_to] = useState(new Date().toLocaleDateString('fr-FR')); + const [p_filter_date_from, setp_filter_date_from] = useState(props.user_dashbord_filter_start); + const [p_filter_date_to, setp_filter_date_to] = useState(props.user_dashbord_filter_end); const [Add_To_User_TBD_api, setAdd_To_User_TBD_api] = useState(); const [Add_To_User_TBD_message, setAdd_To_User_TBD_message] = useState(); @@ -395,9 +350,12 @@ const Dashbord_Session_Repartition_Fteur = (props) => { useEffect(() => { - + setp_filter_date_from(props.user_dashbord_filter_start); + setp_filter_date_to(props.user_dashbord_filter_end); Getall_Qry_Session_Data_Pourcent_Trainer(); + + window.scrollTo({ top: 0, behavior: "smooth", @@ -406,9 +364,39 @@ const Dashbord_Session_Repartition_Fteur = (props) => { }, []) - const [filter_value, setfilter_value] = useState("m0"); + const [filter_value, setfilter_value] = useState(""); const [tdb_title, settdb_title] = useState(); + function Export_Dashbord_to_CSV(local_dashbord_internal_id) { + + const stored_cookie = getCookie('tokenmysypart'); + + var nom_fichier_cmd = "export_csv.csv"; + console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id); + + var url = process.env.REACT_APP_API_URL + "myclass/api/Export_Dashbord_To_Csv/" + stored_cookie + "/" + local_dashbord_internal_id; + + //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url); + 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 d'exporter les données (2) "); + } else { + fileDownload(res.data, nom_fichier_cmd) + + } + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + alert(" Impossible d'exporter les données ") + + }); + + } + return (
{isLoading &&
@@ -494,7 +482,7 @@ const Dashbord_Session_Repartition_Fteur = (props) => {
- + { )} -
+ + + + + +
  diff --git a/src/components/Dashbord_Session_Taux_Remplissage.js b/src/components/Dashbord_Session_Taux_Remplissage.js index 554c734..9518f7e 100644 --- a/src/components/Dashbord_Session_Taux_Remplissage.js +++ b/src/components/Dashbord_Session_Taux_Remplissage.js @@ -1,71 +1,28 @@ 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 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 allLocales from '@fullcalendar/core/locales-all' -import { RepeatOnRounded } from "@mui/icons-material"; -import { alignPropType } from "react-bootstrap/esm/types"; import { tokens } from "../theme"; -import { MdOutlineAddchart, MdAssignmentAdd, MdOutlinePlaylistRemove, MdDeleteForever } from "react-icons/md"; - -import FullCalendar, { formatDate } from "@fullcalendar/react"; -import dayGridPlugin from "@fullcalendar/daygrid"; -import timeGridPlugin from "@fullcalendar/timegrid"; -import interactionPlugin from "@fullcalendar/interaction"; - +import { MdDeleteForever } from "react-icons/md"; import { - ListItem, - ListItemText, useTheme, } from "@mui/material"; -import { ResponsivePie } from '@nivo/pie' import { ResponsiveBar } from "@nivo/bar"; - +import { RiFileExcel2Line } from "react-icons/ri"; const Dashbord_Session_Taux_Remplissage = (props) => { @@ -84,8 +41,8 @@ const Dashbord_Session_Taux_Remplissage = (props) => { date_today_90j.setDate(date_today_90j.getDate() - 90); - const [p_filter_date_from, setp_filter_date_from] = useState(date_today_90j.toLocaleDateString('fr-FR')); - const [p_filter_date_to, setp_filter_date_to] = useState(new Date().toLocaleDateString('fr-FR')); + const [p_filter_date_from, setp_filter_date_from] = useState(props.user_dashbord_filter_start); + const [p_filter_date_to, setp_filter_date_to] = useState(props.user_dashbord_filter_end); const [Add_To_User_TBD_api, setAdd_To_User_TBD_api] = useState(); const [Add_To_User_TBD_message, setAdd_To_User_TBD_message] = useState(); @@ -175,7 +132,7 @@ const Dashbord_Session_Taux_Remplissage = (props) => { var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_To_User_Dashbord/"; - console.log(" ## myurl = ", myurl); + //console.log(" ## myurl = ", myurl); setLoading(true); axios.post(myurl, form).then(res => { @@ -228,15 +185,15 @@ const Dashbord_Session_Taux_Remplissage = (props) => { } - form.append("token", stored_cookie); form.append("session_start_date", date_from); form.append("session_end_date", date_to); - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_List_Session_Data/"; + console.log(" ### form = ", form); + setLoading(true); axios.post(myurl, form).then(res => { setLoading(false); @@ -394,8 +351,13 @@ const Dashbord_Session_Taux_Remplissage = (props) => { useEffect(() => { + setp_filter_date_from(props.user_dashbord_filter_start); + setp_filter_date_to(props.user_dashbord_filter_end); + + Getall_Qry_Session_Data(); + window.scrollTo({ top: 0, behavior: "smooth", @@ -407,6 +369,36 @@ const Dashbord_Session_Taux_Remplissage = (props) => { const [filter_value, setfilter_value] = useState("m0"); const [tdb_title, settdb_title] = useState(); + function Export_Dashbord_to_CSV(local_dashbord_internal_id) { + + const stored_cookie = getCookie('tokenmysypart'); + + var nom_fichier_cmd = "export_csv.csv"; + console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id); + + var url = process.env.REACT_APP_API_URL + "myclass/api/Export_Dashbord_To_Csv/" + stored_cookie + "/" + local_dashbord_internal_id; + + //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url); + 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 d'exporter les données (2) "); + } else { + fileDownload(res.data, nom_fichier_cmd) + + } + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + alert(" Impossible d'exporter les données ") + + }); + + } + return (
{isLoading &&
@@ -491,7 +483,9 @@ const Dashbord_Session_Taux_Remplissage = (props) => {
- + + + @@ -544,6 +538,17 @@ const Dashbord_Session_Taux_Remplissage = (props) => { + + + + + +
diff --git a/src/components/DeleteUserAccount.js b/src/components/DeleteUserAccount.js index 7cb5a01..72d3ca2 100644 --- a/src/components/DeleteUserAccount.js +++ b/src/components/DeleteUserAccount.js @@ -1,21 +1,10 @@ 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 { Helmet } from "react-helmet"; -import FormControl from '@mui/material/FormControl'; import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css -import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; import { useParams } from 'react-router-dom' import axios from "axios"; -import Box from '@mui/material/Box'; -import InputLabel from '@mui/material/InputLabel'; -import InputAdornment from '@mui/material/InputAdornment'; -import TextField from '@mui/material/TextField'; -import OutlinedInput from '@mui/material/OutlinedInput'; -import Visibility from '@mui/icons-material/Visibility'; -import VisibilityOff from '@mui/icons-material/VisibilityOff'; -import IconButton from '@mui/material/IconButton'; + import Header from "./Header"; import Footer from "./Fotter"; import { getCookie } from 'react-use-cookie'; diff --git a/src/components/DisplayClass.js b/src/components/DisplayClass.js deleted file mode 100644 index 3f7a549..0000000 --- a/src/components/DisplayClass.js +++ /dev/null @@ -1,49 +0,0 @@ -import React, { useRef, useState, useEffect } from "react"; -import Popup from 'reactjs-popup'; -import 'reactjs-popup/dist/index.css'; -import ReactBootstrap from 'react-bootstrap' -import { Modal } from 'react-bootstrap'; -import axios from "axios"; - - - -const DisplayClass = (props) => { - - const [result, setResult] = useState(""); - const [myApiResponse, setmyApiResponse] = useState("false"); - const [myApiMessage, setmyApimyApiMessage] = useState(""); - const [trainingRef, settrainingRef] = useState(""); - - function MyDisplayClass(e) { - - var trainingind = e.target.value; - //console.log(" #################" + trainingind); - - //alert(" la formation a traiter est : " + trainingind); - } - - return ( - -
-

Affichage detaillé d'une formation

-
  • - -
      -
    • Titre : {props.formation.title}
    • -
    • Description : {props.formation.description}
    • -
    • domain : {props.formation.domain}
    • -
    • Langue : {props.formation.lang}
    • -
    • Certification : {props.formation.certif}
    • -
    • Type : {props.formation.type}
    • -
    • Support : {props.formation.support}
    • -
    • Prix : {props.formation.price}
    • - -
    - -
  • -
    - ) -} - - -export default DisplayClass; \ No newline at end of file diff --git a/src/components/DisplayPartnerStagiaires.js b/src/components/DisplayPartnerStagiaires.js index a2ef40a..bb7be44 100644 --- a/src/components/DisplayPartnerStagiaires.js +++ b/src/components/DisplayPartnerStagiaires.js @@ -48,6 +48,7 @@ import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai"; import Module_Absence from "./Module_Absence"; import { RiMoreFill } from "react-icons/ri"; import Switch from '@mui/material/Switch'; +import { FcSearch } from "react-icons/fc"; const DisplayPartnerStagiaires = (props) => { const history = useHistory(); @@ -4043,7 +4044,7 @@ const DisplayPartnerStagiaires = (props) => { form.append("tuteur1_email", p_detail_tuteur1_email); } - + if (p_detail_tuteur1_telephone) form.append("tuteur1_telephone", p_detail_tuteur1_telephone); @@ -4093,7 +4094,7 @@ const DisplayPartnerStagiaires = (props) => { else form.append("tuteur2_prenom", ""); - if (p_detail_tuteur2_email && String(p_detail_tuteur2_email).trim() !== "" ) { + if (p_detail_tuteur2_email && String(p_detail_tuteur2_email).trim() !== "") { var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; if (!p_detail_tuteur2_email.match(validRegex)) { alert("L'adresse email est invalide."); @@ -4101,7 +4102,7 @@ const DisplayPartnerStagiaires = (props) => { } form.append("tuteur2_email", p_detail_tuteur2_email); } - + if (p_detail_tuteur2_telephone) @@ -4169,6 +4170,66 @@ const DisplayPartnerStagiaires = (props) => { }) } + const [Dialog_convention_message, setDialog_convention_message] = React.useState(false); + const [Dialog_convention_open, setDialog_convention_open] = React.useState(false); + function Dialog_convention_handle_change_participant_session(message) { + setDialog_convention_message(message); + setDialog_convention_open(true); + } + + const Dialog_convention_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_convention_handleClose_buton = () => { + setDialog_convention_open(false); + }; + + + const [selected_convention_id, setselected_convention_id] = useState(); + const [selected_convention_type, setselected_convention_type] = useState("email"); + const [selected_convention_email_destinataire_prod, setselected_convention_email_destinataire_prod] = useState(""); + const [selected_convention_email_test, setselected_convention_email_test] = useState(""); + + + const [Get_List_Stagiaire_Conventions_api, setGet_List_Stagiaire_Conventions_api] = useState(); + const [Get_List_Stagiaire_Conventions_message, setGet_List_Stagiaire_Conventions_message] = useState(); + const [Get_List_Stagiaire_Conventions_result, setGet_List_Stagiaire_Conventions_result] = useState(); + function Get_List_Stagiaire_Conventions(event) { + + var form = new FormData(); + + form.append("class_internal_url", selected_internal_url); + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("inscription_id", selected_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Conventions_Stagiaire/"; + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Get_List_Stagiaire_Conventions res.data.status = " + res.data.status); + //console.log(" In Get_List_Stagiaire_Conventions res.data.message r_class = " + res.data.message); + setGet_List_Stagiaire_Conventions_api("true"); + setGet_List_Stagiaire_Conventions_result(res.data.message); + } + else { + setGet_List_Stagiaire_Conventions_api("false"); + setGet_List_Stagiaire_Conventions_message(res.data.message); + alert(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( Get_List_Stagiaire_Conventions = ', error); + setGet_List_Stagiaire_Conventions_api("false"); + alert("Impossible de récupérer les modèles de convention"); + //setmyApimyApiMessage("") + }) + } + + return (
    @@ -4485,6 +4546,197 @@ const DisplayPartnerStagiaires = (props) => { + + + MySy Information + + +
    Version convention + { + setselected_convention_id(e.target.value); + var result2 = Get_List_Stagiaire_Conventions_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(e.target.value)) + setselected_convention_type(JSON.parse(result2).type_doc); + + } + } + + > + {Get_List_Stagiaire_Conventions_result && + Get_List_Stagiaire_Conventions_result.map((myclient) => ( + + {JSON.parse(myclient).nom}  {JSON.parse(myclient).type_doc} + + + ))} + + + + +
    + + {String(selected_convention_type) === "email" &&
    Type Document
    + { + setselected_convention_type(e.target.value); + } + } + > + + Email   + PDF   + + {String(selected_convention_type) === "email" && } + +
    } + + {String(selected_convention_type) === "pdf" &&
    Type Document
    + { + setselected_convention_type(e.target.value); + } + } + > + + Email   + PDF   + + +
    } + + {String(selected_convention_type) === "email" &&
    Recevoir un pré-envoie + { + setselected_convention_email_test(e.target.value); + } + } + /> + +
    + } + + {String(selected_convention_type) === "pdf" &&
    Recevoir un pré-envoie + + +
    + } + + {String(selected_convention_type) === "email" &&
    Email destinaitaire + { + setselected_convention_email_destinataire_prod(e.target.value); + } + } + /> + +
    + } + + {String(selected_convention_type) === "pdf" &&
    Email destinaitaire + + +
    + } + + +
    + + + + +
    +
    + {String(selected_convention_type) === "email" && } + {String(selected_convention_type) === "pdf" && } +
    + +
    + +
    +
    + +
    + +

    Vos stagiaires

    @@ -5536,6 +5788,17 @@ const DisplayPartnerStagiaires = (props) => {
    + +
    +
    + +
    +
    + +
    diff --git a/src/components/ListeArticles.js b/src/components/ListeArticles.js index 4ee2738..7698671 100644 --- a/src/components/ListeArticles.js +++ b/src/components/ListeArticles.js @@ -3,26 +3,14 @@ import { useForm } from "react-hook-form"; import axios from "axios"; import Articles from "../components/Article"; import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa'; -import { BsFillXCircleFill } from "react-icons/bs"; -import { IoAddSharp } from "react-icons/io5"; -import bannerimg from "../mysy_img/MYSY_banner_compte.png"; -import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; + 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 LogoutOutlinedIcon from '@mui/icons-material/LogoutOutlined'; -import Button from '@mui/material/Button'; -import logowhite from "../mysy_img/MYSY-LOGO-WHITE.png"; -import Footer from "./Fotter"; -import Header from "./Header"; -import MenuItem from "@material-ui/core/MenuItem"; -import Menu from "@material-ui/core/Menu"; + import { confirmAlert } from 'react-confirm-alert'; // Import import { useCookies } from "react-cookie"; -import connect_white from "../mysy_img/connect_white_v2.png"; -import connect_green from "../mysy_img/connect_green.png"; + let PageSize = 5; const ListeArticles = (props) => { diff --git a/src/components/Mon_Tableau_De_Bord.js b/src/components/Mon_Tableau_De_Bord.js index 2c3e4e3..7506c36 100644 --- a/src/components/Mon_Tableau_De_Bord.js +++ b/src/components/Mon_Tableau_De_Bord.js @@ -1,59 +1,31 @@ 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 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, FcPlanner } 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, CiBoxList } 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 allLocales from '@fullcalendar/core/locales-all' -import { RepeatOnRounded, RestaurantMenu } from "@mui/icons-material"; -import { alignPropType } from "react-bootstrap/esm/types"; - -import ToggleSwitch from "./ToggleSwitch"; 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"; +import Dashbord_Formation_Evol_Session from "./Dashbord_Formation_Evol_Session"; + import { TbColumns2, TbColumns1 } from "react-icons/tb"; + const Mon_Tableau_De_Bord = (props) => { @@ -82,8 +54,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 Get_Connected_User_Dashbord res.data.status = " + res.data.status); - console.log(" In Get_Connected_User_Dashbord res.data.message r_class = " + res.data.message); + //console.log(" In Get_Connected_User_Dashbord res.data.status = " + res.data.status); + //console.log(" In Get_Connected_User_Dashbord res.data.message r_class = " + res.data.message); setGet_Connected_User_Dashbord_api("true"); setGet_Connected_User_Dashbord_result(res.data.message); @@ -117,6 +89,7 @@ const Mon_Tableau_De_Bord = (props) => { const [display_nb_column, setdisplay_nb_column] = useState("2"); + const [display_column_size, setdisplay_column_size] = useState("49%"); return ( - {display_nb_column && String(display_nb_column) == "2" &&
    + {display_nb_column &&
    {Get_Connected_User_Dashbord_result && Get_Connected_User_Dashbord_result.map((step) => ( -
    +
    {String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_01" && - + } {String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_02" && - + } {String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_03" && + + } - + {String(JSON.parse(step).dashbord_internal_code) === "tbd_code_formation_01" && + + } @@ -171,41 +162,18 @@ const Mon_Tableau_De_Bord = (props) => { ))}
    } + {!Get_Connected_User_Dashbord_result || Get_Connected_User_Dashbord_result.length <= 0 &&
    + - {display_nb_column && String(display_nb_column) == "1" &&
    - {Get_Connected_User_Dashbord_result && - Get_Connected_User_Dashbord_result.map((step) => ( +
    +

    Pour utiliser le votre tableau de bord, Merci de de configurer à partir du menu : "Configuration" == > "Tableau de bord"

    + +
    -
    - - {String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_01" && - - - } - - {String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_02" && - - - - } - - - {String(JSON.parse(step).dashbord_internal_code) === "tbd_code_session_03" && - - - - } - - -
    - - ))}
    } - -
    ) } diff --git a/src/components/Partner.js b/src/components/Partner.js index 86f49c7..ed3341e 100644 --- a/src/components/Partner.js +++ b/src/components/Partner.js @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; import axios from "axios"; -import partnerbannerimg from "../mysy_img/MYSY_banner_compte.png"; + import profileimg from "../mysy_img/MYSY-profil-2.png"; import TrainingForm from "./AddClassManual" import PartnerTranings from "./DisplayPartnerTrainingsPagination"; @@ -12,11 +12,7 @@ import { useHistory } from "react-router-dom"; import PartnerInfo from "./UpdatePartnerInfo"; import PartenairStat from "./PartenairStat"; import { Helmet } from "react-helmet"; -import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; -import logowhite from "../mysy_img/MYSY-LOGO-WHITE.png"; -import downarrow from "../mysy_img/downarrow.png"; -import uparrow from "../mysy_img/uparrow.png"; import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; import { GiTeacher } from "react-icons/gi"; import Footer from "./Fotter"; @@ -57,6 +53,7 @@ import Partner_Configuration_Session_Steps from "./Partner_Config_Session_Steps" import Partner_Configuration_Jours_Travail from "./Partner_Config_Jours_Travail"; import Dashbord_Session from "./Dashbord_Session"; import Mon_Tableau_De_Bord from "./Mon_Tableau_De_Bord"; +import Dashbord_Formation from "./Dashbord_Formation"; import Dialog from '@mui/material/Dialog'; import DialogActions from '@mui/material/DialogActions'; @@ -1579,11 +1576,19 @@ const Partner = (props) => {
    } + {String(menu) === "dashbord_formation" &&
    + + +
    + } + + + {String(menu) === "mon_tableau_de_bord" &&
    - + + -
    } diff --git a/src/components/PartnerSignIn.js b/src/components/PartnerSignIn.js index d3925da..3389e09 100644 --- a/src/components/PartnerSignIn.js +++ b/src/components/PartnerSignIn.js @@ -1,17 +1,14 @@ import React, { useState, useEffect } from "react"; import { useForm } from "react-hook-form"; import { useHistory } from "react-router-dom"; -import partnerbannerimg from "../mysy_img/MYSY_banner_compte.png"; + import { Button, FormGroup, Label, Input } from "reactstrap"; import { useCookies } from "react-cookie"; import { confirmAlert } from 'react-confirm-alert'; import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css -import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; import { Helmet } from "react-helmet"; -import logowhite from "../mysy_img/MYSY-LOGO-WHITE.png"; import Footer from "./Fotter"; -import MenuItem from "@material-ui/core/MenuItem"; -import Menu from "@material-ui/core/Menu"; + import Header from "./Header"; import { getCookie, removeCookie } from 'react-use-cookie'; diff --git a/src/components/PartnerSignInSecond.js b/src/components/PartnerSignInSecond.js index 153f30b..0d2a571 100644 --- a/src/components/PartnerSignInSecond.js +++ b/src/components/PartnerSignInSecond.js @@ -6,12 +6,9 @@ import { Button, FormGroup, Label, Input } from "reactstrap"; import { useCookies } from "react-cookie"; import { confirmAlert } from 'react-confirm-alert'; import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css -import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; + import { Helmet } from "react-helmet"; -import logowhite from "../mysy_img/MYSY-LOGO-WHITE.png"; import Footer from "./Fotter"; -import MenuItem from "@material-ui/core/MenuItem"; -import Menu from "@material-ui/core/Menu"; import Header from "./Header"; import Visibility from '@mui/icons-material/Visibility'; diff --git a/src/components/Partner_Facture.js b/src/components/Partner_Facture.js index 72dbaa5..6bf1e1d 100644 --- a/src/components/Partner_Facture.js +++ b/src/components/Partner_Facture.js @@ -32,12 +32,7 @@ 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"; diff --git a/src/components/Partner_Invoicing_Data.js b/src/components/Partner_Invoicing_Data.js index fd9431b..5aa5103 100644 --- a/src/components/Partner_Invoicing_Data.js +++ b/src/components/Partner_Invoicing_Data.js @@ -1,8 +1,7 @@ import React, { useState, useEffect } from "react"; -import UpdateUserInfo from "../components/UpdateUserInfo"; + import Button from '@mui/material/Button'; -import { AiOutlineEdit } from "react-icons/ai"; import { getCookie } from 'react-use-cookie'; import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid'; import axios from "axios"; @@ -15,24 +14,10 @@ import AccountCircle from '@mui/icons-material/AccountCircle'; import PhoneIcon from '@mui/icons-material/Phone' import EmailIcon from '@mui/icons-material/Email' import HomeIcon from '@mui/icons-material/Home' -import { Button2, Form, FormGroup, Label } from "reactstrap"; -import { faBullseye } from "@fortawesome/fontawesome-free-solid"; -import tick_ok from "../mysy_img/tick_OK.png"; -import tick_ko from "../mysy_img/tick_KO.png"; + import { useHistory } from "react-router-dom"; -import CheckOut from "./CheckOut"; -import PaymentMethod from "./PaymentMethode"; -import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5"; -import fileDownload from 'js-file-download' -import PayementComponent_Carte from "./PaymentMethode_Carte" -import img_logo_stripe from "./../mysy_img/logo-stripe-secure.png"; -import SendIcon from '@mui/icons-material/Send'; -import { confirmAlert } from 'react-confirm-alert'; // Import -import { RiAddCircleLine } from "react-icons/ri"; -import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; + import 'react-tooltip/dist/react-tooltip.css' -import { Tooltip } from 'react-tooltip' -import Popup from 'reactjs-popup'; import 'reactjs-popup/dist/index.css'; import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc"; diff --git a/src/components/Partner_Securite_Data.js b/src/components/Partner_Securite_Data.js index 95fc3da..00892c0 100644 --- a/src/components/Partner_Securite_Data.js +++ b/src/components/Partner_Securite_Data.js @@ -2,29 +2,15 @@ import React, { useState, useEffect, } from "react"; import { useForm } from "react-hook-form"; import { getCookie, setCookie } from 'react-use-cookie'; import Box from '@mui/material/Box'; -import InputLabel from '@mui/material/InputLabel'; import InputAdornment from '@mui/material/InputAdornment'; -import FormControl from '@mui/material/FormControl'; import TextField from '@mui/material/TextField'; -import AccountCircle from '@mui/icons-material/AccountCircle'; -import PhoneIcon from '@mui/icons-material/Phone' + import EmailIcon from '@mui/icons-material/Email' -import LanguageIcon from '@mui/icons-material/Language'; -import HomeIcon from '@mui/icons-material/Home' import { Button, Form, FormGroup, Label } from "reactstrap"; -import PasswordIcon from '@mui/icons-material/Password' import Visibility from '@mui/icons-material/Visibility'; import VisibilityOff from '@mui/icons-material/VisibilityOff'; import IconButton from '@mui/material/IconButton'; -import OutlinedInput from '@mui/material/OutlinedInput'; import { useHistory } from "react-router-dom"; -import TwitterIcon from '@mui/icons-material/Twitter'; -import FacebookIcon from '@mui/icons-material/Facebook'; -import LinkedInIcon from '@mui/icons-material/LinkedIn'; -import axios from "axios"; -import { ConsoleView } from "react-device-detect"; -import MenuItem from '@mui/material/MenuItem'; - diff --git a/src/components/ProduitsServices.js b/src/components/ProduitsServices.js index 9c69156..61a0792 100644 --- a/src/components/ProduitsServices.js +++ b/src/components/ProduitsServices.js @@ -5,16 +5,13 @@ 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 import tick_ok from "../mysy_img/tick_OK.png"; import tick_ko from "../mysy_img/tick_KO.png"; import Popup from 'reactjs-popup'; import 'reactjs-popup/dist/index.css'; -import axios from "axios"; -import { useParams } from 'react-router-dom' -import logowhite from "../mysy_img/MYSY-LOGO-WHITE.png"; + import Footer from "./Fotter"; import MenuItem from "@material-ui/core/MenuItem"; import Menu from "@material-ui/core/Menu"; diff --git a/src/components/ProfilObjectif.js b/src/components/ProfilObjectif.js index c39209e..c1f38ea 100644 --- a/src/components/ProfilObjectif.js +++ b/src/components/ProfilObjectif.js @@ -1,11 +1,9 @@ import React, { useState, useEffect } from "react"; -import { useForm } from "react-hook-form"; + import { useHistory } from "react-router-dom"; -import { Helmet } from "react-helmet"; + import DisplayUserGoals from "./DisplayUserGoals"; -import { IoCloseCircleOutline, IoAddCircleOutline } from "react-icons/io5"; -import { Button, Form, FormGroup, Label } from "reactstrap"; -import UpdateUserGoals from "./UpdateUserGoals"; + import UpdateUserProfil from "./UpdateUserProfil"; function ProfilObjectif() { diff --git a/src/components/Recherche.js b/src/components/Recherche.js deleted file mode 100644 index ff33692..0000000 --- a/src/components/Recherche.js +++ /dev/null @@ -1,2767 +0,0 @@ -import React, { useRef, useState, useMemo, useEffect } from "react"; -import { useForm } from "react-hook-form"; -import axios from "axios"; -import Formation from "./Formation"; -import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa'; -import { BsFillXCircleFill } from "react-icons/bs"; -import { IoAddSharp } from "react-icons/io5"; -import bannerimg from "../mysy_img/MYSY_banner_compte.png"; -import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; -import logowhite from "../mysy_img/MYSY-LOGO-WHITE.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"; - -import img_met_bureautic from "../mysy_img/met_burautic.jpg"; -import img_met_vente from "../mysy_img/met_vente.jpg"; - - -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 NosArticlesAlaUne from "./ArticlesAlaUnes"; -import Drole from "./DroleVsCherchezFormation"; -import { Android } from "@mui/icons-material"; -import AideRecherche from "./AideRecherche" -import { useParams } from 'react-router-dom' -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 { 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 "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a loader -import Carousel from 'react-elastic-carousel'; - -let PageSize = 10; -const Recherche = () => { - const { type, categorie } = useParams(); - const { NewSearchText } = useParams(); - const [v11, setv11] = useState(""); - const [userconnected, setuserconnected] = useState("0"); - const [TrainingSupport, setTrainingSupport] = useState(""); - const [TrainingType, setTrainingType] = useState(""); - const [TrainingCertif, setTrainingCertif] = useState(""); - const [TrainingLang, setTrainingLang] = useState(""); - const [TrainingPrice, setTrainingPrice] = useState(""); - const [SearchText, setSearchText] = useState(""); - const [result, setResult] = useState(""); - const [myApiResponse, setmyApiResponse] = useState("false"); - const [displayAllClasses, setdisplayAllClasses] = useState("0"); - const [showelement, setshowelement] = useState("init"); - const [country_code, setcountry_code] = useState(""); - const [country_name, setcountry_name] = useState(""); - const [city, setcity] = useState(""); - const [postal, setpostal] = useState(""); - const [latitude, setlatitude] = useState(""); - const [longitude, setlongitude] = useState(""); - const [IPv4, setIPv4] = useState(""); - const [state, setstate] = useState(""); - const [userIp, setuserIp] = useState(""); - const [currentPage, setCurrentPage] = useState(1); - const [currentPage2, setCurrentPage2] = useState(1); - const [fin, setfin] = useState(0); - const [ismobilephone, setismobilephone] = useState(); - const [TrainingDistanciel, setTrainingDistanciel] = useState(); - const textInput = useRef(null); - const scrollDiv = useRef(null); - - - const [textplaceholder, settextplaceholder] = useState(""); - const [empltysearch, setempltysearch] = useState("1"); - const [filtredistance, setfiltredistance] = useState("0"); - const continent = ['oui', 'non']; - const [selectedcontinent, setselectedcontinent] = useState(""); - const [newresult, setnewresult] = useState(); - const stored_user = getCookie('tokenmysych'); - const history = useHistory(); - const [besoinaiderecherche, setbesoinaiderecherche] = useState(""); - const [istrier, setistrier] = useState(); - const [selectmetier, setselectmetier] = useState(); - const [initAllfiter, setinitAllfiter] = useState(); - const testDivRef = useRef(null); - const [partcookie, setpartCookie, removepartCookie] = useCookies(['tokenmysypart']); - - - - - - const url = process.env.REACT_APP_API_URL + "myclass/api/add_user_account/"; - const { - register, - formState: { errors }, - handleSubmit, - watch, - } = useForm(); - const pwd = useRef({}); - pwd.current = watch("pwd", ""); - - - - const onSubmit = async (data) => { - - searchFunction(); - }; - - const [Trainingdistance, setTrainingdistance] = useState(0); - const handleInput = (e) => { - setTrainingdistance(e.target.value); - } - - const [Trainingduration, setTrainingduration] = useState(0); - const handleInputDuration = (e) => { - setTrainingduration(e.target.value); - } - - - function showdisplayfilter(event) { - - if (showelement == "true") { - setshowelement("false"); - } - else if (showelement == "false") { - setshowelement("true"); - } - - - } - - function clearsearchtext(event) { - - setSearchText(""); - setResult([]); - document.getElementById("SearchText").value = ""; - setempltysearch("1") - setbesoinaiderecherche(""); - } - - const [suggestion2, setsuggestion2] = useState([]); - function SearchTextHandle(event) { - setempltysearch("0"); - setSearchText(event.target.value); - - var val = event.target.value; - let matches = []; - if (String(val).length > 2) { - matches = suggestedwords.filter(usr => { - //alert(JSON.parse(usr).name ); - const regex = new RegExp(`${val}`, "gi"); - return JSON.parse(usr).name.match(regex); - } - - ) - - } - - //console.log("matches = " + matches); - setsuggestion2(matches); - settext(event.target.value); - - } - - - const [v1, setv1] = useState(); - const [v2, setv2] = useState(); - - /* - function TrainingSupportHandle(event) { - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - var crit_TrainingSupport = ""; - var crit_TrainingCertif = ""; - var crit_TrainingType = ""; - var crit_Trainingdistance = ""; - var crit_TrainingPrice = ""; - - - if (document.getElementById("TrainingSupport")) { - crit_TrainingSupport = document.getElementById("TrainingSupport").value; - if (crit_TrainingSupport.length > 0) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - setv11(filtre1); - } - else if (crit_TrainingSupport.length <= 0 || String(crit_TrainingSupport) === String("NA")) { - filtre1 = result; - setv11(filtre1); - } - - } - - if (document.getElementById("TrainingCertif")) { - crit_TrainingCertif = document.getElementById("TrainingCertif").value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - // recuperation du filtre du type (cours, tuto, etc) - if (document.getElementById("TrainingType")) { - crit_TrainingType = document.getElementById("TrainingType").value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - - } - - // recuperation du filtre de la distance - if (document.getElementById("TrainingPresentiel")) { - crit_Trainingdistance = document.getElementById("TrainingPresentiel").value; - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - } - // Recup du filtre de prix - if (document.getElementById("TrainingPrice")) { - crit_TrainingPrice = document.getElementById("TrainingPrice").value; - if (crit_TrainingPrice.length > 0) { - var myprices = crit_TrainingPrice.split(':'); - if (myprices[0] && myprices[1]) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(myprices[0]) && - Number(JSON.parse(maformation).price) <= Number(myprices[1]) - ); - - setv11(filtre1); - } - } - } - - setnewresult(filtre1); - - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - }*/ - function TrainingSupportHandle(event) { - setsupportchecked("1"); - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - var crit_TrainingSupport = ""; - - - - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value; - if (crit_TrainingSupport.length > 0) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - setv11(filtre1); - } - else if (crit_TrainingSupport.length <= 0 || String(crit_TrainingSupport) === String("NA")) { - filtre1 = result; - setv11(filtre1); - } - - } - - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - // recuperation du filtre du type (cours, tuto, etc) - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value; - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - } - // Recup du filtre de prix - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - if (range_price.min && range_price.max) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - - setv11(filtre1); - } - - - setnewresult(filtre1); - - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - } - - - /* // travail sur le filtre "certif" - function TrainingCertifHandle(event) { - - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - var crit_TrainingSupport = ""; - var crit_TrainingCertif = ""; - var crit_TrainingType = ""; - var crit_Trainingdistance = ""; - var crit_TrainingPrice = ""; - - - if (document.getElementById("TrainingCertif")) { - crit_TrainingCertif = document.getElementById("TrainingCertif").value; - if (crit_TrainingCertif.length > 0) { - - //console.log(result) - filtre1 = result.filter((maformation) => String(JSON.parse(maformation).certif) === String(crit_TrainingCertif)); - setv11(filtre1); - } - else if (crit_TrainingCertif.length <= 0 || String(crit_TrainingCertif) === String("NA")) { - - filtre1 = result; - setv11(filtre1); - } - - } - - // recuperation du filtre du support - if (document.getElementById("TrainingSupport")) { - crit_TrainingSupport = document.getElementById("TrainingSupport").value; - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - // recuperation du filtre du type (cours, tuto, etc) - if (document.getElementById("TrainingType")) { - crit_TrainingType = document.getElementById("TrainingType").value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - - } - - - // recuperation du filtre de la distance - if (document.getElementById("TrainingPresentiel")) { - crit_Trainingdistance = document.getElementById("TrainingPresentiel").value; - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - // Recup du filtre de prix - if (document.getElementById("TrainingPrice")) { - crit_TrainingPrice = document.getElementById("TrainingPrice").value; - if (crit_TrainingPrice.length > 0) { - var myprices = crit_TrainingPrice.split(':'); - if (myprices[0] && myprices[1]) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(myprices[0]) && - Number(JSON.parse(maformation).price) <= Number(myprices[1]) - ); - - setv11(filtre1); - } - } - } - - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - } - - */ - - function TrainingCertifHandle(event) { - - var ele = document.querySelector('input[name="TrainingCertif"]:checked').value - - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - setcertifchecked(""); - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - setcertifchecked("1"); - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value - if (crit_TrainingCertif.length > 0) { - //alert(" laa = " + crit_TrainingCertif); - //console.log(result) - filtre1 = result.filter((maformation) => String(JSON.parse(maformation).certif) === String(crit_TrainingCertif)); - setv11(filtre1); - } - - } else { - - filtre1 = result; - setv11(filtre1); - } - - - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - - // recuperation du filtre du type - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingType); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - // Recup du filtre de prix - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - if (range_price.min && range_price.max) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - - setv11(filtre1); - } - - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - - return; - } - - - /* - function TrainingTypeHandle(event) { - - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - var crit_TrainingSupport = ""; - var crit_TrainingCertif = ""; - var crit_TrainingType = ""; - var crit_Trainingdistance = ""; - var crit_TrainingPrice = ""; - - // recuperation du filtre du type (cours, tuto, etc) - if (document.getElementById("TrainingType")) { - crit_TrainingType = document.getElementById("TrainingType").value; - if (crit_TrainingType.length > 0) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - setv11(filtre1); - } - else if (crit_TrainingType.length <= 0 || String(crit_TrainingType) === String("NA")) { - filtre1 = result; - setv11(filtre1); - } - } - - - // recuperation du filtre du support - if (document.getElementById("TrainingSupport")) { - crit_TrainingSupport = document.getElementById("TrainingSupport").value; - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - if (document.getElementById("TrainingCertif")) { - crit_TrainingCertif = document.getElementById("TrainingCertif").value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - // recuperation du filtre de la distance - if (document.getElementById("TrainingPresentiel")) { - crit_Trainingdistance = document.getElementById("TrainingPresentiel").value; - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - // Recup du filtre de prix - if (document.getElementById("TrainingPrice")) { - crit_TrainingPrice = document.getElementById("TrainingPrice").value; - if (crit_TrainingPrice.length > 0) { - var myprices = crit_TrainingPrice.split(':'); - if (myprices[0] && myprices[1]) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(myprices[0]) && - Number(JSON.parse(maformation).price) <= Number(myprices[1]) - ); - - setv11(filtre1); - } - } - } - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - } - */ - function TrainingTypeHandle(event) { - - settypechecked("1"); - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - - - var crit_TrainingPrice = ""; - - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value - if (crit_TrainingType.length > 0) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - setv11(filtre1); - } - - } else { - - filtre1 = result; - setv11(filtre1); - } - - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - // recuperation du filtre du certificat - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - // Recup du filtre de prix - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - if (range_price.min && range_price.max) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - - setv11(filtre1); - } - - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - return; - - /*// recuperation du filtre du type (cours, tuto, etc) - if (document.getElementById("TrainingType")) { - crit_TrainingType = document.getElementById("TrainingType").value; - if (crit_TrainingType.length > 0) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - setv11(filtre1); - } - else if (crit_TrainingType.length <= 0 || String(crit_TrainingType) === String("NA")) { - filtre1 = result; - setv11(filtre1); - } - }*/ - - - - } - - - - - function TrainingLangHandle(event) { - setTrainingLang(event.target.value); - alert("newresult newresultnewresultnewresult = " + newresult); - } - - /* // les filtrs deu prix - function TrainingPriceHandle(event) { - setTrainingPrice(event.target.value); - var toto = ""; - var filtre1 = ""; - - - var crit_TrainingSupport = ""; - var crit_TrainingCertif = ""; - var crit_TrainingType = ""; - var crit_Trainingdistance = ""; - var crit_TrainingPrice = ""; - - if (document.getElementById("TrainingPrice")) { - crit_TrainingPrice = document.getElementById("TrainingPrice").value; - if (crit_TrainingPrice.length > 0) { - var myprices = crit_TrainingPrice.split(':'); - if (myprices[0] && myprices[1]) { - filtre1 = result.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(myprices[0]) && - Number(JSON.parse(maformation).price) <= Number(myprices[1]) - ); - //console.log(" PRICEEEEEEEEEEEEEEEE = "+filtre1); - setv11(filtre1); - } - else { - //alert(" Annulation du filtre prix"); - filtre1 = result; - setv11(filtre1); - } - - } - else if (crit_TrainingCertif.length <= 0) { - //alert(" Annulation du filtre prix 222"); - filtre1 = result; - setv11(filtre1); - } - - } - - // Recuperation des autres filtres. - // recuperation du filtre du support - if (document.getElementById("TrainingSupport")) { - crit_TrainingSupport = document.getElementById("TrainingSupport").value; - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - } - - // recuperation du filtre du certification - if (document.getElementById("TrainingCertif")) { - crit_TrainingCertif = document.getElementById("TrainingCertif").value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - } - - // recuperation du filtre du type (cours, tuto, etc) - if (document.getElementById("TrainingType")) { - crit_TrainingType = document.getElementById("TrainingType").value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - } - - // recuperation du filtre de la distance - if (document.getElementById("TrainingPresentiel")) { - crit_Trainingdistance = document.getElementById("TrainingPresentiel").value; - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - - setnewresult(filtre1); - setCurrentPage2(1); - - }*/ - function TrainingPriceHandle(event) { - - - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - setTrainingPrice(event.target.value); - var toto = ""; - var filtre1 = ""; - - - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - var myprices = crit_TrainingPrice.split(':'); - if (range_price.min && range_price.max) { - filtre1 = result.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - //console.log(" PRICEEEEEEEEEEEEEEEE = "+filtre1); - setv11(filtre1); - } - else { - //alert(" Annulation du filtre prix"); - filtre1 = result; - setv11(filtre1); - } - - - - // Recuperation des autres filtres. - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value; - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - } - - // recuperation du filtre du certification - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - } - - // recuperation du filtre du type (cours, tuto, etc) - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value; - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - - setnewresult(filtre1); - setCurrentPage2(1); - - } - - /* - // Traitement du filtre presentiel / distantiel - function TrainingDistancielHandle(event) { - - var toto = ""; - var filtre1 = ""; - - - var crit_TrainingSupport = ""; - var crit_TrainingCertif = ""; - var crit_TrainingType = ""; - var crit_Trainingdistance = ""; - - // Recuperation du filtre principale modifié dans ce event (distance) - if (document.getElementById("TrainingPresentiel")) { - crit_Trainingdistance = document.getElementById("TrainingPresentiel").value; - //alert("crit_Trainingdistance = " + crit_Trainingdistance); - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("NA")) { - - filtre1 = result; - setv11(filtre1); - } - } - else if (crit_Trainingdistance.length <= 0) { - - filtre1 = result; - setv11(filtre1); - } - } - - - /* Recuperation des autres filtre * / - // recuperation du filtre du support - if (document.getElementById("TrainingSupport")) { - crit_TrainingSupport = document.getElementById("TrainingSupport").value; - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - } - - // recuperation du filtre du certification - if (document.getElementById("TrainingCertif")) { - crit_TrainingCertif = document.getElementById("TrainingCertif").value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - } - - // recuperation du filtre du type (cours, tuto, etc) - if (document.getElementById("TrainingType")) { - crit_TrainingType = document.getElementById("TrainingType").value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - } - setnewresult(filtre1); - setCurrentPage2(1); - } - */ - - // Traitement du filtre presentiel / distantiel - function TrainingDistancielHandle(event) { - - - isonsite(); - setlieuchecked("1"); - var toto = ""; - var filtre1 = ""; - - - var crit_Trainingdistance = ""; - // Recuperation du filtre principale modifié dans ce event (distance) - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value; - //alert("crit_Trainingdistance = " + crit_Trainingdistance); - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("NA")) { - - filtre1 = result; - setv11(filtre1); - } - } - else if (crit_Trainingdistance.length <= 0) { - - filtre1 = result; - setv11(filtre1); - } - } - - - /* Recuperation des autres filtres */ - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value; - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - } - - // recuperation du filtre du certification - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - } - - // recuperation du filtre du type (cours, tuto, etc) - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - } - - // Recup du filtre de prix - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - if (range_price.min && range_price.max) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - - setv11(filtre1); - } - - - setnewresult(filtre1); - setCurrentPage2(1); - } - - - function displayAllClassesHandle(event) { - setdisplayAllClasses(event.target.checked); - if (event.target.checked == true) - document.getElementById("SearchText").disabled = true; - else - document.getElementById("SearchText").disabled = false; - } - - - const [suggestedwords, setsuggestedwords] = useState([]); - const [texte, settext] = useState(""); - - useEffect(() => { - - var ip = ""; - async function fetchData() { - const result = await axios('https://geolocation-db.com/json/',); - - setuserIp(result.data.IPv4); - setcountry_code(result.data.country_code); - setcountry_name(result.data.country_name); - setcity(result.data.city); - setpostal(result.data.postal); - setlatitude(result.data.latitude); - setlongitude(result.data.longitude); - setIPv4(result.data.IPv4); - setstate(result.data.state); - setuserIp(result.data.IPv4); - - let windowWidth = window.innerWidth; - - if (showelement === "init") { - - if (windowWidth < 601) { - setismobilephone(true); - setshowelement("false"); - settextplaceholder("Plus de 10 000 formations (gratuites, payantes...)"); - - } else if (windowWidth >= 601) { - setismobilephone(false); - setshowelement("true"); - //settextplaceholder("Ex : graphiste ...sur plus de 10 000 formations (gratuites, payantes,..)"); - settextplaceholder("Recherche par Titre, Description, Contenu video ... sur plus de 10 000 formations (gratuites, payantes,..)"); - } - } - - - if (categorie && String(categorie).length > 0) { - getClassByMetier_categorie(categorie); - } - else { - DisplayXfirstClas(result.data); - } - } - fetchData(); - async function loadSuggestedWord() { - var myurl = 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(); - const listener = event => { - if (event.code === "Enter" || event.code === "NumpadEnter") { - event.preventDefault(); - searchFunction(); - } - }; - document.addEventListener("keydown", listener); - - - if (typeof (stored_user) === "undefined" || String(stored_user) === '') { - setuserconnected("0"); - } else { - setuserconnected("1"); - } - - setinitAllfiter(); - - whosisconnected(); - - }, [initAllfiter, categorie]); - - - // Cette fonction reinitialise les filtres - function InitAllfilters() { - //document.getElementById("TrainingCertif").selectedv = 0; - const $select = document.querySelector('#TrainingCertif'); - $select.value = '' - - const $select2 = document.querySelector('#TrainingSupport'); - $select2.value = '' - - const $select3 = document.querySelector('#TrainingType'); - $select3.value = '' - - const $select4 = document.querySelector('#TrainingPresentiel'); - $select4.value = 'NA' - - const $select5 = document.querySelector('#TrainingPrice'); - $select5.value = 'NA' - - - - } - - - - const currentTableData2 = useMemo(() => { - if (newresult) { - const firstPageIndex = (currentPage2 - 1) * PageSize; - const lastPageIndex = firstPageIndex + PageSize; - setfin(1); - return newresult.slice(firstPageIndex, lastPageIndex); - } - - - if (result) { - const firstPageIndex = (currentPage2 - 1) * PageSize; - const lastPageIndex = firstPageIndex + PageSize; - setfin(1); - return result.slice(firstPageIndex, lastPageIndex); - } - else { - return []; - setfin(0); - } - }, [currentPage2]); - - function searchFunction(e) { - // Nettoyage du resultat precedent. - setResult([]); - - var crit_TrainingSupport = ""; - var crit_TrainingType = ""; - var crit_TrainingCertif = ""; - var crit_TrainingLang = ""; - var crit_TrainingPresentiel = ""; - var crit_TrainingPrice = ""; - var crit_TrainingDuration = ""; - - - - //Get Criterias - var crit_SearchText = document.getElementById("SearchText").value; - - if (document.getElementById("TrainingSupport")) - crit_TrainingSupport = document.getElementById("TrainingSupport").value; - - if (document.getElementById("TrainingType")) - crit_TrainingType = document.getElementById("TrainingType").value; - - if (document.getElementById("TrainingCertif")) - crit_TrainingCertif = document.getElementById("TrainingCertif").value; - if (crit_TrainingCertif.length == 0) - crit_TrainingCertif = "NA"; - - - if (document.getElementById("TrainingLang")) - crit_TrainingLang = document.getElementById("TrainingLang").value; - - if (document.getElementById("TrainingPresentiel")) - crit_TrainingPresentiel = document.getElementById("TrainingPresentiel").value; - - if (document.getElementById("TrainingPrice")) - crit_TrainingPrice = document.getElementById("TrainingPrice").value; - - if (document.getElementById("duration")) - crit_TrainingDuration = document.getElementById("duration").value; - - - var crit_Trainingdistance = Trainingdistance; - - /*console.log('SearchText = ' + crit_SearchText + ' - TrainingSupport = ' + crit_TrainingSupport + - ' - TrainingType = ' + crit_TrainingType + ' - TrainingCertif ' + crit_TrainingCertif + - " Langue = " + crit_TrainingLang + " TrainingPrice = " + crit_TrainingPrice + - " - Distance = " + crit_Trainingdistance + " -- Presentiel :" + crit_TrainingPresentiel + - " - Duration = " + crit_TrainingDuration + " - stored_user_cookie = " + stored_user);*/ - - - var form = new FormData(); - form.append("search_text", crit_SearchText); - form.append("token", stored_user); - form.append("certif", crit_TrainingCertif); - form.append("support", crit_TrainingSupport); - form.append("type", crit_TrainingType); - form.append("lang", crit_TrainingLang); - form.append("price", crit_TrainingPrice); - form.append("distance", crit_Trainingdistance); - form.append("duration", crit_TrainingDuration); - - - // Ajout des info IP user - form.append("user_ip", IPv4); - form.append("user_country_code", country_code); - form.append("user_country_name", country_name); - form.append("user_city", city); - form.append("user_postal", postal); - form.append("user_latitude", latitude); - form.append("user_longitude", longitude); - form.append("user_state", state); - - - var myurl = "" - if (displayAllClasses == true) { - myurl = process.env.REACT_APP_API_URL + "myclass/api/get_all_class/"; - } - else { - myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple/"; - } - - - - - //alert("myurl = "+myurl); - axios.post(myurl, form).then(res => { - if (String(res.data.status) != String("false")) { - //console.log(" In test res.data.status = " + res.data.status); - //console.log(" In test res.data.message = " + res.data.message); - setmyApiResponse("True"); - setResult(res.data.message) - - //Verification si le resutlat est vide - if (res.data.message.length <= 0) { - setbesoinaiderecherche("1"); - } - if (scrollDiv.current) { - scrollDiv.current.scrollIntoView({ behavior: "smooth" }); - } - } - else { - //console.log(" In test res.data.status = " + res.data.status); - //console.log(" In test res.data.message = " + res.data.message); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - //textInput.current.focus(); - } - - - }).catch((error) => { - // console.warn('Not good man :( mysearchtext = '); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - }) - - } - - // Cette fonction affiche les X premieres formations - function DisplayXfirstClas(ip) { - - // Nettoyage du resultat precedent. - setResult([]); - - //Get Criterias - var crit_SearchText = ""; - var myurl = ""; - - if (typeof (NewSearchText) === "undefined" || String(NewSearchText) === '') { - crit_SearchText = ""; - myurl = process.env.REACT_APP_API_URL + "myclass/api/get_all_class/"; - } else { - clearsearchtext(); - crit_SearchText = NewSearchText; - myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple/"; - } - - //alert(" crit_SearchText = " + crit_SearchText+" myurl = "+myurl); - - - - var form = new FormData(); - form.append("search_text", crit_SearchText); - form.append("token", ""); - form.append("certif", ""); - form.append("support", ""); - form.append("type", ""); - form.append("lang", ""); - form.append("price", ""); - form.append("distance", ""); - form.append("duration", ""); - - - // Ajout des info IP user - form.append("user_ip", ip.IPv4); - form.append("user_country_code", ip.country_code); - form.append("user_country_name", ip.country_name); - form.append("user_city", ip.city); - form.append("user_postal", ip.postal); - form.append("user_latitude", ip.latitude); - form.append("user_longitude", ip.longitude); - form.append("user_state", ip.state); - - - //alert("myurl = "+myurl); - axios.post(myurl, form).then(res => { - if (String(res.data.status) != String("false")) { - //console.log(" In test res.data.status = " + res.data.status); - //console.log(" In test res.data.message = " + res.data.message); - setmyApiResponse("True"); - setResult(res.data.message) - // textInput.current.focus(); - setbesoinaiderecherche(""); - - //setmyApimyApiMessage("OK") - //console.log("taille = "+res.data.message.length); - } - else { - //console.log(" In test res.data.status = " + res.data.status); - //console.log(" In test res.data.message = " + res.data.message); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - //textInput.current.focus(); - } - - - }).catch((error) => { - // console.warn('Not good man :( mysearchtext = '); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - }) - - - } - - function trier(e) { - - setistrier(); - var trierpar = "" - if (document.getElementById("trierpar")) - trierpar = document.getElementById("trierpar").value; - - if (String(trierpar) === String("duration")) { - setCurrentPage2(1); - setCurrentPage(1); - - if (typeof (newresult) === "undefined" || String(newresult) === '') { - - //console.log(" AVANT TRIE : [0].duration = " + JSON.parse(result[0]).duration + " - [1].duration = " + JSON.parse(result[1]).duration) - result.sort(function (a, b) { - return JSON.parse(a).duration - JSON.parse(b).duration; - }); - - //console.log("APRES TRIE : [0].duration = " + JSON.parse(result[0]).duration + " - [1].duration = " + JSON.parse(result[1]).duration) - setistrier("1"); - } - else if (typeof (newresult) !== "undefined" || newresult.length > 0) { - newresult.sort(function (a, b) { - return JSON.parse(a).duration - JSON.parse(b).duration; - }); - } - } - - else if (String(trierpar) === String("price")) { - setCurrentPage2(1); - - if (typeof (newresult) === "undefined" || String(newresult) === '') { - //console.log(" AVANT TRIE : [0].price = " + JSON.parse(result[0]).price + " - [1].price = " + JSON.parse(result[1]).price); - result.sort(function (a, b) { - return JSON.parse(a).price - JSON.parse(b).price; - }); - //console.log("APRES TRIE : [0].price = " + JSON.parse(result[0]).price + " - [1].price = " + JSON.parse(result[1]).price); - setistrier("2"); - } - else if (typeof (newresult) !== "undefined" || newresult.length > 0) { - newresult.sort(function (a, b) { - return JSON.parse(a).price - JSON.parse(b).price; - }); - } - } - - } - - - function getClassByMetier_categorie(mycate) { - - var mymetier = mycate; - /* - InitAllfilters(); - - if (String(mymetier) === String(selectmetier)) { - //alert(" il faut faire un desactivation"); - document.getElementById(mymetier).style.opacity = "1"; - document.getElementById(mymetier).style.boxShadow = "0 4px 8px 0 rgba(0, 0, 0, 0.2),0 6px 20px 0 rgba(0, 0, 0, 0.19)"; - setinitAllfiter("1"); - return; - } - - - if (selectmetier && selectmetier !== "tout") { - document.getElementById(selectmetier).style.opacity = "1"; - document.getElementById(selectmetier).style.boxShadow = "0 4px 8px 0 rgba(0, 0, 0, 0.2),0 6px 20px 0 rgba(0, 0, 0, 0.19)"; - } - - - setselectmetier(mymetier); - - - if (mymetier && mymetier !== "tout") { - document.getElementById(mymetier).style.opacity = "0.5"; - document.getElementById(mymetier).style.boxShadow = "10px 20px 30px blue"; - - } - */ - - // Nettoyage du resultat precedent. - setResult([]); - var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class_by_metier/"; - - /*if (mymetier === "tout") { - //alert(" tout et sortir"); - setinitAllfiter("1"); - return; - - }*/ - - var form = new FormData(); - form.append("metier", mymetier); - form.append("token", ""); - - // Ajout des info IP user - /* form.append("user_ip", ip.IPv4); - form.append("user_country_code", ip.country_code); - form.append("user_country_name", ip.country_name); - form.append("user_city", ip.city); - form.append("user_postal", ip.postal); - form.append("user_latitude", ip.latitude); - form.append("user_longitude", ip.longitude); - form.append("user_state", ip.state); - */ - //alert("myurl = "+myurl); - axios.post(myurl, form).then(res => { - if (String(res.data.status) != String("false")) { - - setmyApiResponse("True"); - setResult(res.data.message) - //textInput.current.focus(); - setbesoinaiderecherche(""); - setnewresult(""); - //console.log(" In getClassByMetier res.data.status = " + res.data.status); - //console.log(" In getClassByMetier res.data.message = " + res.data.message); - //setnewresult(res.data.message); - setCurrentPage2(1); - if (scrollDiv.current) { - scrollDiv.current.scrollIntoView({ behavior: "smooth" }); - } - - // reinitialisation de tous les filtre - - //setmyApimyApiMessage("OK") - //console.log("taille = "+res.data.message.length); - } - else { - //console.log(" In getClassByMetier res.data.status = " + res.data.status); - //console.log(" In getClassByMetier res.data.message = " + res.data.message); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - //textInput.current.focus(); - } - - - }).catch((error) => { - console.warn(' getClassByMetier : Not good man :( mysearchtext = '); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - }) - - } - - - - function getClassByMetier(e) { - - var mymetier = ""; - mymetier = e.target.id - /* - InitAllfilters(); - - if (String(mymetier) === String(selectmetier)) { - //alert(" il faut faire un desactivation"); - document.getElementById(mymetier).style.opacity = "1"; - document.getElementById(mymetier).style.boxShadow = "0 4px 8px 0 rgba(0, 0, 0, 0.2),0 6px 20px 0 rgba(0, 0, 0, 0.19)"; - setinitAllfiter("1"); - return; - } - - - if (selectmetier && selectmetier !== "tout") { - document.getElementById(selectmetier).style.opacity = "1"; - document.getElementById(selectmetier).style.boxShadow = "0 4px 8px 0 rgba(0, 0, 0, 0.2),0 6px 20px 0 rgba(0, 0, 0, 0.19)"; - } - - - setselectmetier(mymetier); - - - if (mymetier && mymetier !== "tout") { - document.getElementById(mymetier).style.opacity = "0.5"; - document.getElementById(mymetier).style.boxShadow = "10px 20px 30px blue"; - - } - */ - - // Nettoyage du resultat precedent. - setResult([]); - var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class_by_metier/"; - - /*if (mymetier === "tout") { - //alert(" tout et sortir"); - setinitAllfiter("1"); - return; - - }*/ - - var form = new FormData(); - form.append("metier", mymetier); - form.append("token", ""); - - // Ajout des info IP user - /* form.append("user_ip", ip.IPv4); - form.append("user_country_code", ip.country_code); - form.append("user_country_name", ip.country_name); - form.append("user_city", ip.city); - form.append("user_postal", ip.postal); - form.append("user_latitude", ip.latitude); - form.append("user_longitude", ip.longitude); - form.append("user_state", ip.state); - */ - //alert("myurl = "+myurl); - axios.post(myurl, form).then(res => { - if (String(res.data.status) != String("false")) { - - setmyApiResponse("True"); - setResult(res.data.message) - //textInput.current.focus(); - setbesoinaiderecherche(""); - setnewresult(""); - //console.log(" In getClassByMetier res.data.status = " + res.data.status); - //console.log(" In getClassByMetier res.data.message = " + res.data.message); - //setnewresult(res.data.message); - setCurrentPage2(1); - if (scrollDiv.current) { - scrollDiv.current.scrollIntoView({ behavior: "smooth" }); - } - - // reinitialisation de tous les filtre - - //setmyApimyApiMessage("OK") - //console.log("taille = "+res.data.message.length); - } - else { - //console.log(" In getClassByMetier res.data.status = " + res.data.status); - //console.log(" In getClassByMetier res.data.message = " + res.data.message); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - //textInput.current.focus(); - } - - - }).catch((error) => { - console.warn(' getClassByMetier : Not good man :( mysearchtext = '); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - }) - - } - - - const [PartnerMenu, setPartnerMenu] = React.useState(null); - const [AccountMenu, setAccountMenu] = React.useState(null); - const [ProduitMenu, setproduitMenu] = React.useState(null); - const [AvisMenu, setavisMenu] = React.useState(null); - - - - const PartnerMenu_Close = () => { - setPartnerMenu(null); - }; - - const AccountMenu_Close = () => { - setAccountMenu(null); - }; - - - const ProduitMenu_Close = () => { - setproduitMenu(null); - }; - - const handlePartnerMenu = (event) => { - setPartnerMenu(event.currentTarget); - }; - - const handleAccountMenu = (event) => { - setAccountMenu(event.currentTarget); - }; - - - const handleProduitMenu = (event) => { - setproduitMenu(event.currentTarget); - }; - - - const handleClose_Account = () => { - alert(" my account"); - setAccountMenu(null); - }; - - const handleAccountConnexion = () => { - setAccountMenu(null); - history.push("/Connexion") - }; - - const handleMyAccount = () => { - setAccountMenu(null); - history.push("/mysy-user-account") - }; - - - const handleMyPartnerAccount = () => { - setAccountMenu(null); - history.push("/Partner") - }; - - - const handleAccountCreation = () => { - setAccountMenu(null); - history.push("/create_account") - }; - - const handlePartnerConnexion = () => { - setAccountMenu(null); - history.push("/PartnerLogin") - }; - - - const handleProduitService = () => { - setproduitMenu(null); - history.push("/Produits-Services/") - }; - - const handleAvis = () => { - setavisMenu(null); - history.push("/Recherche-Article-formation") - }; - - function test() { - alert(" coucou"); - } - - - const [someoneconnected, setsomeoneconnected] = useState("0"); - const [partnerconnected, setpartnerconnected] = useState("0"); - const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']); - - const stored_part = getCookie('tokenmysypart'); - - function whosisconnected() { - 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"); - } - } - - function handleAccountLogout() { - - if (String(userconnected) === String("1")) { - user_logout(); - } - else if (String(partnerconnected) === String("1")) { - part_logout(); - } - } - - function user_logout_confirmation() { - /* si c'est une connexion partner qui est active */ - if (typeof (stored_user) != "undefined") { - setCookie("tokenmysych", ""); - } - history.push("/recherche-formation"); - } - - function user_logout() { - confirmAlert({ - title: '', - message: 'Confirmez la deconnexion (user)', - buttons: [ - { - label: 'Oui', - onClick: () => user_logout_confirmation() - }, - { - label: 'Non', - onClick: () => { return } - } - ] - }); - } - - - - - function handleAccountConnexion_v2() { - - if (String(userconnected) === String("1")) { - handleMyAccount(); - } - else if (String(partnerconnected) === String("1")) { - handleMyPartnerAccount(); - } - } - - - function part_logout_confirmation() { - /* si c'est une connexion partner qui est active */ - if (typeof (stored_part) != "undefined") { - setpartCookie("tokenmysypart", "", { path: '/' }); - } - history.push("/recherche-formation"); - } - - function part_logout() { - confirmAlert({ - title: '', - message: 'Confirmez la deconnexion (pro)', - buttons: [ - { - label: 'Oui', - onClick: () => part_logout_confirmation() - }, - { - label: 'Non', - onClick: () => { return } - } - ] - }); - } - - const [range_price, setrange_price] = useState({ min: 0, max: 9999, }); - function rangevalue() { - alert(range_price.max + " - " + range_price.min); - //console.log(" range = " + range_price); - } - - const [trainingonsite, settrainingonsite] = useState() - function isonsite() { - settrainingonsite(document.querySelector('input[name="TrainingPresentiel"]:checked').value) - - } - - const [certifchecked, setcertifchecked] = useState(); - function annulefiltrecertif() { - var radio = document.querySelector('input[name="TrainingCertif"]:checked'); - radio.checked = false; - setcertifchecked(""); - - var toto = ""; - var filtre1 = ""; - - - // Reinitialisation - filtre1 = result; - setv11(filtre1); - - - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - - // recuperation du filtre du type - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingType); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - - return; - - - } - - - const [supportchecked, setsupportchecked] = useState(); - function annulefiltresupportchecked() { - var radio = document.querySelector('input[name="TrainingSupport"]:checked'); - radio.checked = false; - setsupportchecked(""); - var crit_TrainingSupport = ""; - var toto = ""; - var filtre1 = ""; - - - - // Reinitialisation - filtre1 = result; - setv11(filtre1); - - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - // recuperation du filtre du type (cours, tuto, etc) - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value; - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - } - // Recup du filtre de prix - var crit_TrainingPrice = ""; - - setnewresult(filtre1); - - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - } - - - const [typechecked, settypechecked] = useState(); - function annulefiltretypechecked() { - var radio = document.querySelector('input[name="TrainingType"]:checked'); - radio.checked = false; - settypechecked(""); - - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - - - // Reinitialisation - filtre1 = result; - setv11(filtre1); - //alert("rinitialisation") - ; - - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - // recuperation du filtre du certificat - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - return; - - } - - - const [lieuchecked, setlieuchecked] = useState(); - function annulefiltrelieuchecked() { - var radio = document.querySelector('input[name="TrainingPresentiel"]:checked'); - radio.checked = false; - setlieuchecked(""); - var toto = ""; - var filtre1 = ""; - settrainingonsite(''); - - - - //reinitialisation des filtres - filtre1 = result; - setv11(filtre1); - - - /* Recuperation des autres filtres */ - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value; - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - } - - // recuperation du filtre du certification - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - } - - // recuperation du filtre du type (cours, tuto, etc) - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - } - setnewresult(filtre1); - setCurrentPage2(1); - } - - function OnblurHandle(e) { - setTimeout(() => { - setsuggestion2([]) - }, 100) - } - - - function OnSuggestionHandler(text) { - var val = text; - settext(val); - } - - const responsive = { - desktop: { - breakpoint: { max: 3000, min: 1024 }, - items: 3, - slidesToSlide: 3 // optional, default to 1. - }, - tablet: { - breakpoint: { max: 1024, min: 464 }, - items: 2, - slidesToSlide: 2 // optional, default to 1. - }, - mobile: { - breakpoint: { max: 464, min: 0 }, - items: 1, - slidesToSlide: 1 // optional, default to 1. - } - }; - - const itemsPerPage = 2; - const carouselRef = useRef(null); - const totalPages = 3; - let resetTimeout; - - const items = [ - { id: 1, title: 'item #1', img: "http://88.170.110.220/img/MYSY-LOGO-BLUE.png" }, - { id: 2, title: 'item #2', img: "../mysy_img/connect_green.png" }, - { id: 3, title: 'item #3', img: "../mysy_img/connect_green.png" }, - { id: 4, title: 'item #4', img: "../mysy_img/connect_green.png" }, - { id: 5, title: 'item #5', img: "../mysy_img/connect_green.png" } - ] - - return ( -
    - - Formation & Tutoriel Gratuit ou payant Excellente qualité - - - - - - - - Mon Compte - Deconnexion - - - - - Mon Compte - Connexion - - S'inscrire - Deconnexion - - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    -

    Recherche Formations Tutoriels

    - -
    -
    - {String(someoneconnected) !== String("1") && } - {String(someoneconnected) === String("1") && } -
    -
    - - - {String(someoneconnected) === String("1") &&
    - Mon Compte -
    } - - {String(someoneconnected) !== String("1") &&
    - S'inscrire -
    } - -
    - Nos Services -
    - -
    - - -
    - - -
    -
    -
    - -
    Bienvenue sur MySy
    - Recherche de Formations & Tutoriels - -
    -
    -
    - - - - - {SearchText.length > 2 && }   - {suggestion2 && suggestion2.slice(0, 5).map((suggestion, id) => -
    OnSuggestionHandler(JSON.parse(suggestion).name)}> {JSON.parse(suggestion).name}
    - )} - -
    -
    -
    - - - - - - - - - -
    - - -
    - - - - - - - - - - - - -
    - - -
    -
    -
    - -
    - - { - clearTimeout(resetTimeout) - if (index + 1 === totalPages) { - resetTimeout = setTimeout(() => { - //console.log(" ici"); - carouselRef.current.goTo(0); - }, 2500) // same time - } - }} - itemsToShow={itemsPerPage} - - > - {items.map(item =>
    -
    - Formation XXXX {item.id}
    - {item.title} - - - -
    )} -
    - -
    -
    -
    - {showelement === "true" &&
    - -
    Masquer les Métiers & Filtres
    -
    - -
    - } - - {showelement === "false" &&
    -
    Afficher les Métiers & Filtres
    -
    - -
    - } - - {showelement === "true" &&
    -
    Les filtres
    -
    -
    -
    Certification -
    - -
    Oui    -
    - -
    Non   -
    - {String(certifchecked) === String("1") &&
    KO
    } - {String(certifchecked) !== String("1") &&
     
    } -
    - -
    -
    Type -
    - -
    Cours -
    - -
    Tuto -
    - - {String(typechecked) === String("1") &&
    KO
    } - {String(typechecked) !== String("1") &&
     
    } -
    - -
    -
    Support -
    - -
    Video -
    - -
    Document -
    - {String(supportchecked) === String("1") &&
    KO
    } - {String(supportchecked) !== String("1") &&
     
    } -
    - -
    -
    Lieu -
    - -
    Site   -
    - -
    A Distance -
    - {String(lieuchecked) === String("1") &&
    KO
    } - {String(lieuchecked) !== String("1") &&
     
    } -
    - - - {trainingonsite && String(trainingonsite) === String("0") &&
    -
    ville -
    - -
    -
    - - -
     
    -
    } - - {trainingonsite && String(trainingonsite) === String("0") &&
    -
    Code postale -
    - -
    -
    - - -
     
    -
    } -
    -
    Prix -
    - -
    - `${value} €`} - value={range_price} - step={500} - name="toto" - - onChange={value => setrange_price(value)} - //onChange={TrainingPriceHandle} - onChangeComplete={value => console.log(value)} - /> -
    - - -
     
    -
    -
    - - -
    Les Métiers
    - - -
    -
    - Formation Programmation -
    -

    Informatique

    -
    -
    -
    - - -
    -
    - Formation graphisme -
    -

    Graphisme

    -
    -
    - - - -
    - - - - -
    -
    - Formation gestion projets -
    -

    Projets

    -
    -
    -
    - - -
    -
    - Formation Management -
    -

    Management

    -
    -
    -
    - - - -
    -
    - Formation Digitale -
    -

    Digital

    -
    -
    -
    - - -
    -
    - Ressources Humaines -
    -

    RH

    -
    -
    -
    - - - -
    -
    - Marketting -
    -

    Marketting

    -
    -
    -
    - - -
    -
    - Autres -
    -

    Bureautique

    -
    -
    - -
    - - -
    -
    - Commerce -
    -

    Commerce

    -
    -
    -
    - - -
    -
    - Autres -
    -

    Dev. Personnel

    -
    -
    -
    - - - {/*
    -
    -
    -
    -

    Tous les Métiers

    -
    -
    -
    -
    */} - - - - -
    - } - -
    - - {String(userconnected) === String("1") &&
    - -
    - } - - {myApiResponse == "False" &&
    - - Impossible de contacter l'hote distant -
    } - - {myApiResponse == "True" && String(besoinaiderecherche) === String("1") &&
    - - Le resultat est vide, besoin d'aide ? - - -
    } - - - {result && myApiResponse === "True" && !newresult && -
    -
    -
    - setCurrentPage2(page)} - /> -
    -
    -
    - Trier par - - -
    -
    - - -
    - - -
    } - - {result && myApiResponse === "True" && newresult && -
    - setCurrentPage2(page)} - /> - - -
    } - - - - {result && myApiResponse == "True" && fin == 0 && !newresult && - result.slice(0, PageSize).map((formation) => ( -
    - - -
    - - ))} - - {result && myApiResponse == "True" && fin == 0 && newresult && - newresult.slice(0, PageSize).map((formation) => ( -
    - - -
    - - ))} - - - - {result && myApiResponse === "True" && fin === 1 && !newresult - && currentTableData2 - && currentTableData2.map((formation) => ( -
    - - -
    - - ))} - - {result && myApiResponse === "True" && fin === 1 && newresult - && currentTableData2 - && currentTableData2.map((formation) => ( -
    - - -
    - - ))} - - - {result && !newresult &&
    - - {String(userconnected) === String("1") && } - setCurrentPage2(page)} - /> -
    - } - - {result && newresult &&
    - - {String(userconnected) === String("1") && } - setCurrentPage2(page)} - /> -
    - } -
    - - -
    - {/*
    - Le blog -
    */} -
    - - -
    - -
    - -
    -
    -
    - -
    - -
    - -
    - - -
    - - ); -} - - -export default Recherche; \ No newline at end of file diff --git a/src/components/RechercheArticles.js b/src/components/RechercheArticles.js index 632e318..a011d08 100644 --- a/src/components/RechercheArticles.js +++ b/src/components/RechercheArticles.js @@ -3,10 +3,7 @@ import { useForm } from "react-hook-form"; import axios from "axios"; import Articles from "../components/Article"; import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa'; -import { BsFillXCircleFill } from "react-icons/bs"; -import { IoAddSharp } from "react-icons/io5"; -import bannerimg from "../mysy_img/MYSY_banner_compte.png"; -import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; + import Pagination from "./TestPagination"; import data from "./data/mock-data.json"; import { useHistory } from "react-router-dom"; diff --git a/src/components/Recherche_formation_com.js b/src/components/Recherche_formation_com.js index 58cfc02..1656962 100644 --- a/src/components/Recherche_formation_com.js +++ b/src/components/Recherche_formation_com.js @@ -4,23 +4,9 @@ import axios from "axios"; import Formation from "./Formation_Cartouche_Com"; import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa'; import { BsFillXCircleFill } from "react-icons/bs"; -import { IoAddSharp } from "react-icons/io5"; -import bannerimg from "../mysy_img/MYSY_banner_compte.png"; -import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; + import logowhite from "../mysy_img/MYSY-LOGO-WHITE.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"; import img_met_bureautic from "../mysy_img/met_burautic.jpg"; import img_met_vente from "../mysy_img/met_vente.jpg"; @@ -31,14 +17,11 @@ 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 NosArticlesAlaUne from "./ArticlesAlaUnes"; -import Drole from "./DroleVsCherchezFormation"; -import { Android } from "@mui/icons-material"; + import AideRecherche from "./AideRecherche" import { useParams } from 'react-router-dom' 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"; diff --git a/src/components/Recherche_new.js b/src/components/Recherche_new.js deleted file mode 100644 index 526a9ae..0000000 --- a/src/components/Recherche_new.js +++ /dev/null @@ -1,2799 +0,0 @@ -import React, { useRef, useState, useMemo, useEffect } from "react"; -import { useForm } from "react-hook-form"; -import axios from "axios"; -import Formation from "./Formation"; -import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa'; -import { BsFillXCircleFill } from "react-icons/bs"; -import { IoAddSharp } from "react-icons/io5"; -import bannerimg from "../mysy_img/MYSY_banner_compte.png"; -import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; -import logowhite from "../mysy_img/MYSY-LOGO-WHITE.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"; - -import img_met_bureautic from "../mysy_img/met_burautic.jpg"; -import img_met_vente from "../mysy_img/met_vente.jpg"; - - -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 NosArticlesAlaUne from "./ArticlesAlaUnes"; -import Drole from "./DroleVsCherchezFormation"; -import { Android } from "@mui/icons-material"; -import AideRecherche from "./AideRecherche" -import { useParams } from 'react-router-dom' -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 { 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"; - - -let PageSize = 10; -const Recherche_new = () => { - const { type, categorie } = useParams(); - const { NewSearchText } = useParams(); - const [v11, setv11] = useState(""); - const [userconnected, setuserconnected] = useState("0"); - const [TrainingSupport, setTrainingSupport] = useState(""); - const [TrainingType, setTrainingType] = useState(""); - const [TrainingCertif, setTrainingCertif] = useState(""); - const [TrainingCPF, setTrainingCPF] = useState(""); - const [TrainingLang, setTrainingLang] = useState(""); - const [TrainingPrice, setTrainingPrice] = useState(""); - const [SearchText, setSearchText] = useState(""); - const [SearchcitiesText, setSearchcitiesText] = useState(""); - const [result, setResult] = useState(""); - const [myApiResponse, setmyApiResponse] = useState("false"); - const [displayAllClasses, setdisplayAllClasses] = useState("0"); - const [showelement, setshowelement] = useState("init"); - const [country_code, setcountry_code] = useState(""); - const [country_name, setcountry_name] = useState(""); - const [city, setcity] = useState(""); - const [postal, setpostal] = useState(""); - const [latitude, setlatitude] = useState(""); - const [longitude, setlongitude] = useState(""); - const [IPv4, setIPv4] = useState(""); - const [state, setstate] = useState(""); - const [userIp, setuserIp] = useState(""); - const [currentPage, setCurrentPage] = useState(1); - const [currentPage2, setCurrentPage2] = useState(1); - const [fin, setfin] = useState(0); - const [ismobilephone, setismobilephone] = useState(); - const [TrainingDistanciel, setTrainingDistanciel] = useState(); - const textInput = useRef(null); - const scrollDiv = useRef(null); - - - const [textplaceholder, settextplaceholder] = useState(""); - const [empltysearch, setempltysearch] = useState("1"); - const [empltycitiessearch, setempltycitiessearch] = useState("1"); - - const [filtredistance, setfiltredistance] = useState("0"); - const continent = ['oui', 'non']; - const [selectedcontinent, setselectedcontinent] = useState(""); - const [newresult, setnewresult] = useState(); - const stored_user = getCookie('tokenmysych'); - const history = useHistory(); - const [besoinaiderecherche, setbesoinaiderecherche] = useState(""); - const [istrier, setistrier] = useState(); - const [selectmetier, setselectmetier] = useState(); - const [initAllfiter, setinitAllfiter] = useState(); - const testDivRef = useRef(null); - const [partcookie, setpartCookie, removepartCookie] = useCookies(['tokenmysypart']); - - - - - - const url = process.env.REACT_APP_API_URL + "myclass/api/add_user_account/"; - const { - register, - formState: { errors }, - handleSubmit, - watch, - } = useForm(); - const pwd = useRef({}); - pwd.current = watch("pwd", ""); - - - - const onSubmit = async (data) => { - - searchFunction(); - }; - - const [Trainingdistance, setTrainingdistance] = useState(0); - const handleInput = (e) => { - setTrainingdistance(e.target.value); - } - - const [Trainingduration, setTrainingduration] = useState(0); - const handleInputDuration = (e) => { - setTrainingduration(e.target.value); - } - - - function showdisplayfilter(event) { - - if (showelement == "true") { - setshowelement("false"); - } - else if (showelement == "false") { - setshowelement("true"); - } - - - } - - function clearsearchtext(event) { - setSearchText(""); - setResult([]); - document.getElementById("SearchText").value = ""; - setempltysearch("1") - setbesoinaiderecherche(""); - } - - const [suggestion2, setsuggestion2] = useState([]); - const [suggestioncities, setsuggestioncities] = useState([]); - - function SearchTextHandle(event) { - setempltysearch("0"); - setSearchText(event.target.value); - - var val = String(event.target.value).toLocaleLowerCase(); - let matches = []; - if (String(val).length > 2) { - matches = suggestedwords.filter(usr => { - //alert(JSON.parse(usr).name ); - const regex = new RegExp(`${val}`, "gi"); - return JSON.parse(usr).name.match(regex); - } - - ) - - } - - //console.log("matches = " + matches); - setsuggestion2(matches); - settext(event.target.value); - - } - - function SearchcitiesHandle(event) { - setempltycitiessearch("0"); - setSearchcitiesText(event.target.value); - - var val = String(event.target.value).toLocaleLowerCase().trimStart(); - const regex = new RegExp(`^${val}`, "gi"); - - let matches = []; - - if (String(val).length > 2) { - matches = suggestedcities.filter(usr => { - return JSON.parse(usr).ville.match(regex); - }) - } - - //console.log("matches = " + matches); - setsuggestioncities(matches); - setcities(event.target.value); - - } - - - const [v1, setv1] = useState(); - const [v2, setv2] = useState(); - - - function TrainingSupportHandle(event) { - setsupportchecked("1"); - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - var crit_TrainingSupport = ""; - - - - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value; - if (crit_TrainingSupport.length > 0) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - setv11(filtre1); - } - else if (crit_TrainingSupport.length <= 0 || String(crit_TrainingSupport) === String("NA")) { - filtre1 = result; - setv11(filtre1); - } - - } - - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - // recuperation du filtre du type (cours, tuto, etc) - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value; - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - } - // Recup du filtre de prix - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - if (range_price.min && range_price.max) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - - setv11(filtre1); - } - - - setnewresult(filtre1); - - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - } - - - - function TrainingCertifHandle(event) { - - var ele = document.querySelector('input[name="TrainingCertif"]:checked').value - - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - setcertifchecked(""); - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - setcertifchecked("1"); - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value - if (crit_TrainingCertif.length > 0) { - //alert(" laa = " + crit_TrainingCertif); - //console.log(result) - filtre1 = result.filter((maformation) => String(JSON.parse(maformation).certif) === String(crit_TrainingCertif)); - setv11(filtre1); - } - - } else { - - filtre1 = result; - setv11(filtre1); - } - - - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - - // recuperation du filtre du CPF - var crit_TrainingCPF = ""; - if (document.querySelector('input[name="TrainingCPF"]:checked')) { - crit_TrainingCPF = document.querySelector('input[name="TrainingCPF"]:checked').value - if (crit_TrainingCPF.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).cpf === crit_TrainingCPF); - - } - - - // recuperation du filtre du type - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingType); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - // Recup du filtre de prix - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - if (range_price.min && range_price.max) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - - setv11(filtre1); - } - - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - - return; - } - - - - // Pour le CPF - const [cpfchecked, setcpfchecked] = useState(); - function TrainingCPFHandle(event) { - - var ele = document.querySelector('input[name="TrainingCPF"]:checked').value - - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - setcpfchecked(""); - var crit_TrainingCPF = ""; - if (document.querySelector('input[name="TrainingCPF"]:checked')) { - setcpfchecked("1"); - crit_TrainingCPF = document.querySelector('input[name="TrainingCPF"]:checked').value - if (crit_TrainingCPF.length > 0) { - //alert(" crit_TrainingCPF = " + crit_TrainingCPF); - - filtre1 = result.filter((maformation) => String(JSON.parse(maformation).cpf) === String(crit_TrainingCPF)); - setv11(filtre1); - //console.log(" #### ",filtre1); - } - - } else { - - filtre1 = result; - setv11(filtre1); - } - - // recuperation du filtre du certificat - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - - // recuperation du filtre du type - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingType); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - // Recup du filtre de prix - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - if (range_price.min && range_price.max) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - - setv11(filtre1); - } - - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - - return; - } - - - // END PR CPF - function TrainingTypeHandle(event) { - - settypechecked("1"); - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - - - var crit_TrainingPrice = ""; - - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value - if (crit_TrainingType.length > 0) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - setv11(filtre1); - } - - } else { - - filtre1 = result; - setv11(filtre1); - } - - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - - // recuperation du filtre du CPF - var crit_TrainingCPF = ""; - if (document.querySelector('input[name="TrainingCPF"]:checked')) { - crit_TrainingCPF = document.querySelector('input[name="TrainingCPF"]:checked').value - if (crit_TrainingCPF.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).cpf === crit_TrainingCPF); - - } - - // recuperation du filtre du certificat - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - // Recup du filtre de prix - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - if (range_price.min && range_price.max) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - - setv11(filtre1); - } - - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - return; - - /*// recuperation du filtre du type (cours, tuto, etc) - if (document.getElementById("TrainingType")) { - crit_TrainingType = document.getElementById("TrainingType").value; - if (crit_TrainingType.length > 0) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - setv11(filtre1); - } - else if (crit_TrainingType.length <= 0 || String(crit_TrainingType) === String("NA")) { - filtre1 = result; - setv11(filtre1); - } - }*/ - - - - } - - - function TrainingLangHandle(event) { - setTrainingLang(event.target.value); - alert("newresult newresultnewresultnewresult = " + newresult); - } - - - function TrainingPriceHandle(event) { - - - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - setTrainingPrice(event.target.value); - var toto = ""; - var filtre1 = ""; - - - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - var myprices = crit_TrainingPrice.split(':'); - if (range_price.min && range_price.max) { - filtre1 = result.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - //console.log(" PRICEEEEEEEEEEEEEEEE = "+filtre1); - setv11(filtre1); - } - else { - //alert(" Annulation du filtre prix"); - filtre1 = result; - setv11(filtre1); - } - - - - // Recuperation des autres filtres. - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value; - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - } - - // recuperation du filtre du CPF - var crit_TrainingCPF = ""; - if (document.querySelector('input[name="TrainingCPF"]:checked')) { - crit_TrainingCPF = document.querySelector('input[name="TrainingCPF"]:checked').value - if (crit_TrainingCPF.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).cpf === crit_TrainingCPF); - - } - - - // recuperation du filtre du certification - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - } - - // recuperation du filtre du type (cours, tuto, etc) - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value; - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - - setnewresult(filtre1); - setCurrentPage2(1); - - } - - - // Traitement du filtre presentiel / distantiel - function TrainingDistancielHandle(event) { - - - isonsite(); - setlieuchecked("1"); - var toto = ""; - var filtre1 = ""; - var filtre0 = []; - var filtre01 = []; - var my_ville = ""; - var my_cp = ""; - - if (document.getElementById("ville")) { - my_ville = crit_TrainingSupport = document.getElementById("ville").value; - my_ville = my_ville.trim(); - - } - - if (document.getElementById("zip_code")) { - my_cp = crit_TrainingSupport = document.getElementById("zip_code").value; - my_cp = my_cp.trim(); - - } - - var crit_Trainingdistance = ""; - // Recuperation du filtre principale modifié dans ce event (distance) - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value; - //alert("crit_Trainingdistance = " + crit_Trainingdistance); - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - - if (String(crit_Trainingdistance) === String("1")) { - - filtre1 = result.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = result.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - - // Traitement du nom de la ville - if (my_ville.length > 3) { - - var filtre2 = filtre1.map(obj => { - - if (JSON.parse(obj).datelieu) { - - var tmp = JSON.parse(obj).datelieu.length - var i = 0; - while (i < tmp) { - //console.log(JSON.parse(obj).datelieu[i]); - //console.log(" ville =" + JSON.parse(obj).datelieu[i].ville) - if (JSON.parse(obj).datelieu[i].ville === my_ville) { - return obj - } - i++; - } - } - - }); - - var filtre3 = filtre2.filter(function (element) { - return element !== undefined; - }); - - - filtre1 = filtre3; - } - - // Traitement du zip code - if (my_cp.length > 2) { - - var filtre2 = filtre1.map(obj => { - - if (JSON.parse(obj).datelieu) { - - var tmp = JSON.parse(obj).datelieu.length - var i = 0; - while (i < tmp) { - //console.log(JSON.parse(obj).datelieu[i]); - //console.log(" ville =" + JSON.parse(obj).datelieu[i].ville) - if (JSON.parse(obj).datelieu[i].code_postal.startsWith(my_cp)) { - return obj - } - i++; - } - } - - }); - - var filtre3 = filtre2.filter(function (element) { - return element !== undefined; - }); - - - filtre1 = filtre3; - } - - setv11(filtre1); - - - } - else if (String(crit_Trainingdistance) === String("NA")) { - - filtre1 = result; - setv11(filtre1); - } - } - else if (crit_Trainingdistance.length <= 0) { - - filtre1 = result; - setv11(filtre1); - } - } - - - /* Recuperation des autres filtres */ - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value; - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - } - - // recuperation du filtre du certification - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - } - - // recuperation du filtre du CPF - var crit_TrainingCPF = ""; - if (document.querySelector('input[name="TrainingCPF"]:checked')) { - crit_TrainingCPF = document.querySelector('input[name="TrainingCPF"]:checked').value - if (crit_TrainingCPF.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).cpf === crit_TrainingCPF); - - } - - - // recuperation du filtre du type (cours, tuto, etc) - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - } - - // Recup du filtre de prix - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - if (range_price.min && range_price.max) { - filtre1 = filtre1.filter((maformation) => Number(JSON.parse(maformation).price) >= Number(range_price.min) && - Number(JSON.parse(maformation).price) <= Number(range_price.max) - ); - - setv11(filtre1); - } - - - setnewresult(filtre1); - setCurrentPage2(1); - } - - - function displayAllClassesHandle(event) { - setdisplayAllClasses(event.target.checked); - if (event.target.checked == true) - document.getElementById("SearchText").disabled = true; - else - document.getElementById("SearchText").disabled = false; - } - - - const [suggestedwords, setsuggestedwords] = useState([]); - const [texte, settext] = useState(""); - - const [cities, setcities] = useState(""); - - const [suggestedcities, setsuggestedcities] = useState([]); - - useEffect(() => { - - var ip = ""; - async function fetchData() { - const result = await axios('https://geolocation-db.com/json/',); - - setuserIp(result.data.IPv4); - setcountry_code(result.data.country_code); - setcountry_name(result.data.country_name); - setcity(result.data.city); - setpostal(result.data.postal); - setlatitude(result.data.latitude); - setlongitude(result.data.longitude); - setIPv4(result.data.IPv4); - setstate(result.data.state); - setuserIp(result.data.IPv4); - - let windowWidth = window.innerWidth; - - if (showelement === "init") { - - if (windowWidth < 601) { - setismobilephone(true); - setshowelement("false"); - settextplaceholder("Plus de 10 000 formations (gratuites, payantes...)"); - - } else if (windowWidth >= 601) { - setismobilephone(false); - setshowelement("true"); - //settextplaceholder("Ex : graphiste ...sur plus de 10 000 formations (gratuites, payantes,..)"); - settextplaceholder("Recherche par Titre, Description, Contenu video ... sur plus de 10 000 formations (gratuites, payantes,..)"); - } - } - - - if (categorie && String(categorie).length > 0) { - getClassByMetier_categorie(categorie); - } - else { - 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(); - - - const listener = event => { - if (event.code === "Enter" || event.code === "NumpadEnter") { - event.preventDefault(); - searchFunction(); - } - }; - document.addEventListener("keydown", listener); - - - if (typeof (stored_user) === "undefined" || String(stored_user) === '') { - setuserconnected("0"); - } else { - setuserconnected("1"); - } - - setinitAllfiter(); - - whosisconnected(); - - }, [initAllfiter, categorie]); - - - // Cette fonction reinitialise les filtres - function InitAllfilters() { - //document.getElementById("TrainingCertif").selectedv = 0; - const $select = document.querySelector('#TrainingCertif'); - $select.value = '' - - const $select2 = document.querySelector('#TrainingSupport'); - $select2.value = '' - - const $select3 = document.querySelector('#TrainingType'); - $select3.value = '' - - const $select4 = document.querySelector('#TrainingPresentiel'); - $select4.value = 'NA' - - const $select5 = document.querySelector('#TrainingPrice'); - $select5.value = 'NA' - - - - } - - - - const currentTableData2 = useMemo(() => { - if (newresult) { - const firstPageIndex = (currentPage2 - 1) * PageSize; - const lastPageIndex = firstPageIndex + PageSize; - setfin(1); - return newresult.slice(firstPageIndex, lastPageIndex); - } - - - if (result) { - const firstPageIndex = (currentPage2 - 1) * PageSize; - const lastPageIndex = firstPageIndex + PageSize; - setfin(1); - return result.slice(firstPageIndex, lastPageIndex); - } - else { - return []; - setfin(0); - } - }, [currentPage2]); - - function searchFunction(e) { - // Nettoyage du resultat precedent. - setResult([]); - - var crit_TrainingSupport = ""; - var crit_TrainingType = ""; - var crit_TrainingCertif = ""; - var crit_TrainingLang = ""; - var crit_TrainingPresentiel = ""; - var crit_TrainingPrice = ""; - var crit_TrainingDuration = ""; - var my_ville = ""; - - var my_cp = "" - - - - - - - //Get Criterias - var crit_SearchText = document.getElementById("SearchText").value; - - if (document.getElementById("TrainingSupport")) - crit_TrainingSupport = document.getElementById("TrainingSupport").value; - - if (document.getElementById("TrainingType")) - crit_TrainingType = document.getElementById("TrainingType").value; - - if (document.getElementById("TrainingCertif")) - crit_TrainingCertif = document.getElementById("TrainingCertif").value; - if (crit_TrainingCertif.length == 0) - crit_TrainingCertif = "NA"; - - - if (document.getElementById("TrainingLang")) - crit_TrainingLang = document.getElementById("TrainingLang").value; - - if (document.getElementById("TrainingPresentiel")) - crit_TrainingPresentiel = document.getElementById("TrainingPresentiel").value; - - if (document.getElementById("TrainingPrice")) - crit_TrainingPrice = document.getElementById("TrainingPrice").value; - - if (document.getElementById("duration")) - crit_TrainingDuration = document.getElementById("duration").value; - - - if (document.getElementById("ville")) { - my_ville = crit_TrainingSupport = document.getElementById("ville").value; - - } - - if (document.getElementById("zip_code")) { - my_cp = crit_TrainingSupport = document.getElementById("zip_code").value; - - } - - - var crit_Trainingdistance = Trainingdistance; - - /*console.log('SearchText = ' + crit_SearchText + ' - TrainingSupport = ' + crit_TrainingSupport + - ' - TrainingType = ' + crit_TrainingType + ' - TrainingCertif ' + crit_TrainingCertif + - " Langue = " + crit_TrainingLang + " TrainingPrice = " + crit_TrainingPrice + - " - Distance = " + crit_Trainingdistance + " -- Presentiel :" + crit_TrainingPresentiel + - " - Duration = " + crit_TrainingDuration + " - stored_user_cookie = " + stored_user);*/ - - - var form = new FormData(); - form.append("search_text", crit_SearchText); - form.append("token", stored_user); - form.append("certif", crit_TrainingCertif); - form.append("support", crit_TrainingSupport); - form.append("type", crit_TrainingType); - form.append("lang", crit_TrainingLang); - form.append("price", crit_TrainingPrice); - form.append("distance", crit_Trainingdistance); - form.append("duration", crit_TrainingDuration); - - - // Ajout des info IP user - form.append("user_ip", IPv4); - form.append("user_country_code", country_code); - form.append("user_country_name", country_name); - form.append("user_city", city); - form.append("user_postal", postal); - form.append("user_latitude", latitude); - form.append("user_longitude", longitude); - form.append("user_state", state); - - - var myurl = "" - if (displayAllClasses == true) { - myurl = process.env.REACT_APP_API_URL + "myclass/api/get_all_class/"; - } - else { - myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple/"; - } - - - - - //alert("myurl = "+myurl); - axios.post(myurl, form).then(res => { - if (String(res.data.status) != String("false")) { - //console.log(" In test res.data.status = " + res.data.status); - //console.log(" In test res.data.message = " + res.data.message); - setmyApiResponse("True"); - setResult(res.data.message) - - //Verification si le resutlat est vide - if (res.data.message.length <= 0) { - setbesoinaiderecherche("1"); - } - if (scrollDiv.current) { - scrollDiv.current.scrollIntoView({ behavior: "smooth" }); - } - } - else { - //console.log(" In test res.data.status = " + res.data.status); - //console.log(" In test res.data.message = " + res.data.message); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - //textInput.current.focus(); - } - - - }).catch((error) => { - // console.warn('Not good man :( mysearchtext = '); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - }) - - } - - // Cette fonction affiche les X premieres formations - function DisplayXfirstClas(ip) { - - // Nettoyage du resultat precedent. - setResult([]); - - //Get Criterias - var crit_SearchText = ""; - var myurl = ""; - - if (typeof (NewSearchText) === "undefined" || String(NewSearchText) === '') { - crit_SearchText = ""; - myurl = process.env.REACT_APP_API_URL + "myclass/api/get_all_class/"; - } else { - clearsearchtext(); - crit_SearchText = NewSearchText; - myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple/"; - } - - //alert(" crit_SearchText = " + crit_SearchText+" myurl = "+myurl); - - - - var form = new FormData(); - form.append("search_text", crit_SearchText); - form.append("token", ""); - form.append("certif", ""); - form.append("support", ""); - form.append("type", ""); - form.append("lang", ""); - form.append("price", ""); - form.append("distance", ""); - form.append("duration", ""); - form.append("cpf", ""); - - - // Ajout des info IP user - form.append("user_ip", ip.IPv4); - form.append("user_country_code", ip.country_code); - form.append("user_country_name", ip.country_name); - form.append("user_city", ip.city); - form.append("user_postal", ip.postal); - form.append("user_latitude", ip.latitude); - form.append("user_longitude", ip.longitude); - form.append("user_state", ip.state); - - - //alert("myurl = "+myurl); - axios.post(myurl, form).then(res => { - if (String(res.data.status) != String("false")) { - //console.log(" In test res.data.status = " + res.data.status); - //console.log(" In DisplayXfirstClas res.data.message = " + res.data.message); - setmyApiResponse("True"); - setResult(res.data.message) - // textInput.current.focus(); - setbesoinaiderecherche(""); - - } - else { - //console.log(" In test res.data.status = " + res.data.status); - //console.log(" In test res.data.message = " + res.data.message); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - //textInput.current.focus(); - } - - - }).catch((error) => { - // console.warn('Not good man :( mysearchtext = '); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - }) - - - } - - function trier(e) { - - setistrier(); - var trierpar = "" - if (document.getElementById("trierpar")) - trierpar = document.getElementById("trierpar").value; - - if (String(trierpar) === String("duration")) { - setCurrentPage2(1); - setCurrentPage(1); - - if (typeof (newresult) === "undefined" || String(newresult) === '') { - - //console.log(" AVANT TRIE : [0].duration = " + JSON.parse(result[0]).duration + " - [1].duration = " + JSON.parse(result[1]).duration) - result.sort(function (a, b) { - return JSON.parse(a).duration - JSON.parse(b).duration; - }); - - //console.log("APRES TRIE : [0].duration = " + JSON.parse(result[0]).duration + " - [1].duration = " + JSON.parse(result[1]).duration) - setistrier("1"); - } - else if (typeof (newresult) !== "undefined" || newresult.length > 0) { - newresult.sort(function (a, b) { - return JSON.parse(a).duration - JSON.parse(b).duration; - }); - } - } - - else if (String(trierpar) === String("price")) { - setCurrentPage2(1); - - if (typeof (newresult) === "undefined" || String(newresult) === '') { - //console.log(" AVANT TRIE : [0].price = " + JSON.parse(result[0]).price + " - [1].price = " + JSON.parse(result[1]).price); - result.sort(function (a, b) { - return JSON.parse(a).price - JSON.parse(b).price; - }); - //console.log("APRES TRIE : [0].price = " + JSON.parse(result[0]).price + " - [1].price = " + JSON.parse(result[1]).price); - setistrier("2"); - } - else if (typeof (newresult) !== "undefined" || newresult.length > 0) { - newresult.sort(function (a, b) { - return JSON.parse(a).price - JSON.parse(b).price; - }); - } - } - - else if (String(trierpar) === String("note")) { - setCurrentPage2(1); - - if (typeof (newresult) === "undefined" || String(newresult) === '') { - //console.log(" AVANT TRIE : [0].price = " + JSON.parse(result[0]).price + " - [1].price = " + JSON.parse(result[1]).price); - result.sort(function (a, b) { - return JSON.parse(b).note - JSON.parse(a).note; - }); - //console.log("APRES TRIE : [0].price = " + JSON.parse(result[0]).price + " - [1].price = " + JSON.parse(result[1]).price); - setistrier("2"); - } - else if (typeof (newresult) !== "undefined" || newresult.length > 0) { - newresult.sort(function (a, b) { - return JSON.parse(b).note - JSON.parse(a).note; - }); - } - } - - } - - - function getClassByMetier_categorie(mycate) { - - var mymetier = mycate; - /* - InitAllfilters(); - - if (String(mymetier) === String(selectmetier)) { - //alert(" il faut faire un desactivation"); - document.getElementById(mymetier).style.opacity = "1"; - document.getElementById(mymetier).style.boxShadow = "0 4px 8px 0 rgba(0, 0, 0, 0.2),0 6px 20px 0 rgba(0, 0, 0, 0.19)"; - setinitAllfiter("1"); - return; - } - - - if (selectmetier && selectmetier !== "tout") { - document.getElementById(selectmetier).style.opacity = "1"; - document.getElementById(selectmetier).style.boxShadow = "0 4px 8px 0 rgba(0, 0, 0, 0.2),0 6px 20px 0 rgba(0, 0, 0, 0.19)"; - } - - - setselectmetier(mymetier); - - - if (mymetier && mymetier !== "tout") { - document.getElementById(mymetier).style.opacity = "0.5"; - document.getElementById(mymetier).style.boxShadow = "10px 20px 30px blue"; - - } - */ - - // Nettoyage du resultat precedent. - setResult([]); - var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class_by_metier/"; - - /*if (mymetier === "tout") { - //alert(" tout et sortir"); - setinitAllfiter("1"); - return; - - }*/ - - var form = new FormData(); - form.append("metier", mymetier); - form.append("token", ""); - - // Ajout des info IP user - /* form.append("user_ip", ip.IPv4); - form.append("user_country_code", ip.country_code); - form.append("user_country_name", ip.country_name); - form.append("user_city", ip.city); - form.append("user_postal", ip.postal); - form.append("user_latitude", ip.latitude); - form.append("user_longitude", ip.longitude); - form.append("user_state", ip.state); - */ - //alert("myurl = "+myurl); - axios.post(myurl, form).then(res => { - if (String(res.data.status) != String("false")) { - - setmyApiResponse("True"); - setResult(res.data.message) - //textInput.current.focus(); - setbesoinaiderecherche(""); - setnewresult(""); - //console.log(" In getClassByMetier res.data.status = " + res.data.status); - //console.log(" In getClassByMetier res.data.message = " + res.data.message); - //setnewresult(res.data.message); - setCurrentPage2(1); - if (scrollDiv.current) { - scrollDiv.current.scrollIntoView({ behavior: "smooth" }); - } - - // reinitialisation de tous les filtre - - //setmyApimyApiMessage("OK") - //console.log("taille = "+res.data.message.length); - } - else { - //console.log(" In getClassByMetier res.data.status = " + res.data.status); - //console.log(" In getClassByMetier res.data.message = " + res.data.message); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - //textInput.current.focus(); - } - - - }).catch((error) => { - console.warn(' getClassByMetier : Not good man :( mysearchtext = '); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - }) - - } - - - - function getClassByMetier(e) { - - var mymetier = ""; - mymetier = e.target.id - /* - InitAllfilters(); - - if (String(mymetier) === String(selectmetier)) { - //alert(" il faut faire un desactivation"); - document.getElementById(mymetier).style.opacity = "1"; - document.getElementById(mymetier).style.boxShadow = "0 4px 8px 0 rgba(0, 0, 0, 0.2),0 6px 20px 0 rgba(0, 0, 0, 0.19)"; - setinitAllfiter("1"); - return; - } - - - if (selectmetier && selectmetier !== "tout") { - document.getElementById(selectmetier).style.opacity = "1"; - document.getElementById(selectmetier).style.boxShadow = "0 4px 8px 0 rgba(0, 0, 0, 0.2),0 6px 20px 0 rgba(0, 0, 0, 0.19)"; - } - - - setselectmetier(mymetier); - - - if (mymetier && mymetier !== "tout") { - document.getElementById(mymetier).style.opacity = "0.5"; - document.getElementById(mymetier).style.boxShadow = "10px 20px 30px blue"; - - } - */ - - // Nettoyage du resultat precedent. - setResult([]); - var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_class_by_metier/"; - - /*if (mymetier === "tout") { - //alert(" tout et sortir"); - setinitAllfiter("1"); - return; - - }*/ - - var form = new FormData(); - form.append("metier", mymetier); - form.append("token", ""); - - // Ajout des info IP user - /* form.append("user_ip", ip.IPv4); - form.append("user_country_code", ip.country_code); - form.append("user_country_name", ip.country_name); - form.append("user_city", ip.city); - form.append("user_postal", ip.postal); - form.append("user_latitude", ip.latitude); - form.append("user_longitude", ip.longitude); - form.append("user_state", ip.state); - */ - //alert("myurl = "+myurl); - axios.post(myurl, form).then(res => { - if (String(res.data.status) != String("false")) { - - setmyApiResponse("True"); - setResult(res.data.message) - //textInput.current.focus(); - setbesoinaiderecherche(""); - setnewresult(""); - //console.log(" In getClassByMetier res.data.status = " + res.data.status); - //console.log(" In getClassByMetier res.data.message = " + res.data.message); - //setnewresult(res.data.message); - setCurrentPage2(1); - if (scrollDiv.current) { - scrollDiv.current.scrollIntoView({ behavior: "smooth" }); - } - - // reinitialisation de tous les filtre - - //setmyApimyApiMessage("OK") - //console.log("taille = "+res.data.message.length); - } - else { - //console.log(" In getClassByMetier res.data.status = " + res.data.status); - //console.log(" In getClassByMetier res.data.message = " + res.data.message); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - //textInput.current.focus(); - } - - - }).catch((error) => { - console.warn(' getClassByMetier : Not good man :( mysearchtext = '); - setmyApiResponse("False"); - //setmyApimyApiMessage("") - }) - - } - - - const [PartnerMenu, setPartnerMenu] = React.useState(null); - const [AccountMenu, setAccountMenu] = React.useState(null); - const [ProduitMenu, setproduitMenu] = React.useState(null); - const [AvisMenu, setavisMenu] = React.useState(null); - - - - const PartnerMenu_Close = () => { - setPartnerMenu(null); - }; - - const AccountMenu_Close = () => { - setAccountMenu(null); - }; - - - const ProduitMenu_Close = () => { - setproduitMenu(null); - }; - - const handlePartnerMenu = (event) => { - setPartnerMenu(event.currentTarget); - }; - - const handleAccountMenu = (event) => { - setAccountMenu(event.currentTarget); - }; - - - const handleProduitMenu = (event) => { - setproduitMenu(event.currentTarget); - }; - - - - - const handleClose_Account = () => { - //alert(" my account"); - setAccountMenu(null); - }; - - const handleBlogMenu = (event) => { - setproduitMenu(event.currentTarget); - history.push("/Recherche-Article-formation") - }; - - const handleAccountConnexion = () => { - setAccountMenu(null); - history.push("/Connexion") - }; - - const handleMyAccount = () => { - setAccountMenu(null); - history.push("/mysy-user-account") - }; - - - const handleMyPartnerAccount = () => { - setAccountMenu(null); - history.push("/Partner") - }; - - - const handleAccountCreation = () => { - setAccountMenu(null); - history.push("/create_account") - }; - - const handlePartnerConnexion = () => { - setAccountMenu(null); - history.push("/PartnerLogin") - }; - - - const handleProduitService = () => { - setproduitMenu(null); - history.push("/Produits-Services/") - }; - - const handleAvis = () => { - setavisMenu(null); - history.push("/Recherche-Article-formation") - }; - - function test() { - alert(" coucou"); - } - - - const [someoneconnected, setsomeoneconnected] = useState("0"); - const [partnerconnected, setpartnerconnected] = useState("0"); - const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']); - - const stored_part = getCookie('tokenmysypart'); - - function whosisconnected() { - 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"); - } - } - - function handleAccountLogout() { - - if (String(userconnected) === String("1")) { - user_logout(); - } - else if (String(partnerconnected) === String("1")) { - part_logout(); - } - } - - function user_logout_confirmation() { - /* si c'est une connexion partner qui est active */ - if (typeof (stored_user) != "undefined") { - setCookie("tokenmysych", ""); - } - history.push("/recherche-formation"); - } - - function user_logout() { - confirmAlert({ - title: '', - message: 'Confirmez la deconnexion (user)', - buttons: [ - { - label: 'Oui', - onClick: () => user_logout_confirmation() - }, - { - label: 'Non', - onClick: () => { return } - } - ] - }); - } - - - - - function handleAccountConnexion_v2() { - - if (String(userconnected) === String("1")) { - handleMyAccount(); - } - else if (String(partnerconnected) === String("1")) { - handleMyPartnerAccount(); - } - } - - - function part_logout_confirmation() { - /* si c'est une connexion partner qui est active */ - if (typeof (stored_part) != "undefined") { - setpartCookie("tokenmysypart", "", { path: '/' }); - } - history.push("/recherche-formation"); - } - - function part_logout() { - confirmAlert({ - title: '', - message: 'Confirmez la deconnexion (pro)', - buttons: [ - { - label: 'Oui', - onClick: () => part_logout_confirmation() - }, - { - label: 'Non', - onClick: () => { return } - } - ] - }); - } - - const [range_price, setrange_price] = useState({ min: 0, max: 9999, }); - function rangevalue() { - alert(range_price.max + " - " + range_price.min); - //console.log(" range = " + range_price); - } - - const [trainingonsite, settrainingonsite] = useState() - function isonsite() { - settrainingonsite(document.querySelector('input[name="TrainingPresentiel"]:checked').value) - - } - - const [certifchecked, setcertifchecked] = useState(); - function annulefiltrecertif() { - var radio = document.querySelector('input[name="TrainingCertif"]:checked'); - radio.checked = false; - setcertifchecked(""); - - var toto = ""; - var filtre1 = ""; - - - // Reinitialisation - filtre1 = result; - setv11(filtre1); - - - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - // recuperation du filtre du CPF - var crit_TrainingCPF = ""; - if (document.querySelector('input[name="TrainingCPF"]:checked')) { - crit_TrainingCPF = document.querySelector('input[name="TrainingCPF"]:checked').value; - if (crit_TrainingCPF.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).cpf === crit_TrainingCPF); - - } - - // recuperation du filtre du type - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingType); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - - return; - - - } - - - function annulefiltrecpf() { - var radio = document.querySelector('input[name="TrainingCPF"]:checked'); - radio.checked = false; - setcpfchecked(""); - - var toto = ""; - var filtre1 = ""; - - - // Reinitialisation - filtre1 = result; - setv11(filtre1); - - // recuperation du filtre de la certification - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - - // recuperation du filtre du type - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingType); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - var crit_TrainingPrice = range_price.min + ":" + range_price.max; - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - - return; - - - } - - const [supportchecked, setsupportchecked] = useState(); - function annulefiltresupportchecked() { - var radio = document.querySelector('input[name="TrainingSupport"]:checked'); - radio.checked = false; - setsupportchecked(""); - var crit_TrainingSupport = ""; - var toto = ""; - var filtre1 = ""; - - - - // Reinitialisation - filtre1 = result; - setv11(filtre1); - - // recuperation du filtre de la certification - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - - // recuperation du filtre du CPF - var crit_TrainingCPF = ""; - if (document.querySelector('input[name="TrainingCPF"]:checked')) { - crit_TrainingCPF = document.querySelector('input[name="TrainingCPF"]:checked').value; - if (crit_TrainingCPF.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).cpf === crit_TrainingCPF); - - } - - - // recuperation du filtre du type (cours, tuto, etc) - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - - } - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value; - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - } - // Recup du filtre de prix - var crit_TrainingPrice = ""; - - setnewresult(filtre1); - - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - } - - - const [typechecked, settypechecked] = useState(); - function annulefiltretypechecked() { - var radio = document.querySelector('input[name="TrainingType"]:checked'); - radio.checked = false; - settypechecked(""); - - var toto = ""; - var filtre1 = ""; - var filtre2 = ""; - var filtre3 = ""; - - - - // Reinitialisation - filtre1 = result; - setv11(filtre1); - //alert("rinitialisation") - ; - - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - - } - - // recuperation du filtre du certificat - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - - } - - // recuperation du filtre du CPF - var crit_TrainingCPF = ""; - if (document.querySelector('input[name="TrainingCPF"]:checked')) { - crit_TrainingCPF = document.querySelector('input[name="TrainingCPF"]:checked').value; - if (crit_TrainingCPF.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).cpf === crit_TrainingCPF); - - } - - - // recuperation du filtre de la distance - var crit_Trainingdistance = ""; - if (document.querySelector('input[name="TrainingPresentiel"]:checked')) { - crit_Trainingdistance = document.querySelector('input[name="TrainingPresentiel"]:checked').value - if (crit_Trainingdistance.length > 0) { - // filtre presentiel = 1 - if (String(crit_Trainingdistance) === String("1")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.distantiel === "1"); - setv11(filtre1); - - } - else if (String(crit_Trainingdistance) === String("0")) { - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).presentiel.presentiel === "1"); - setv11(filtre1); - } - } - - } - - - setnewresult(filtre1); - //alert("crit_TrainingCertif = " + crit_TrainingCertif + " ET crit_TrainingSupport = " + crit_TrainingSupport + " ET crit_TrainingType = " + crit_TrainingType); - //console.log("############################ filtre1 = " + filtre1); - setCurrentPage2(1); - //console.log(" ????????????????????????????filtre2 = "+filtre2); - - return; - - } - - - const [lieuchecked, setlieuchecked] = useState(); - function annulefiltrelieuchecked() { - var radio = document.querySelector('input[name="TrainingPresentiel"]:checked'); - radio.checked = false; - setlieuchecked(""); - var toto = ""; - var filtre1 = ""; - settrainingonsite(''); - - - - //reinitialisation des filtres - filtre1 = result; - setv11(filtre1); - - // Annulation de la suggestion de villes - setsuggestioncities([]); - - - /* Recuperation des autres filtres */ - // recuperation du filtre du support - var crit_TrainingSupport = ""; - if (document.querySelector('input[name="TrainingSupport"]:checked')) { - crit_TrainingSupport = document.querySelector('input[name="TrainingSupport"]:checked').value; - if (crit_TrainingSupport.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).support === crit_TrainingSupport); - } - - // recuperation du filtre du certification - var crit_TrainingCertif = ""; - if (document.querySelector('input[name="TrainingCertif"]:checked')) { - crit_TrainingCertif = document.querySelector('input[name="TrainingCertif"]:checked').value; - if (crit_TrainingCertif.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).certif === crit_TrainingCertif); - } - - // recuperation du filtre du CPF - var crit_TrainingCPF = ""; - if (document.querySelector('input[name="TrainingCPF"]:checked')) { - crit_TrainingCPF = document.querySelector('input[name="TrainingCPF"]:checked').value; - if (crit_TrainingCPF.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).cpf === crit_TrainingCPF); - - } - - // recuperation du filtre du type (cours, tuto, etc) - var crit_TrainingType = ""; - if (document.querySelector('input[name="TrainingType"]:checked')) { - crit_TrainingType = document.querySelector('input[name="TrainingType"]:checked').value; - if (crit_TrainingType.length > 0) - filtre1 = filtre1.filter((maformation) => JSON.parse(maformation).type === crit_TrainingType); - } - setnewresult(filtre1); - setCurrentPage2(1); - } - - function OnblurHandle(e) { - setTimeout(() => { - setsuggestion2([]) - }, 100) - } - - - function OnSuggestionHandler(text) { - var val = text; - settext(val); - } - - function OnCitiesSuggestionHandler(text) { - var val = text; - setcities(val); - document.getElementById("ville").value = val; - LeaveCity(); - // Annulation de la suggestion de villes - setsuggestioncities([]); - } - - function publiecatalogue() { - - history.push("/Partner", { mysy_arg: 'partner' }); - } - - function LeaveCity() { - TrainingDistancielHandle(); - } - - function LeaveZipCode() { - TrainingDistancielHandle(); - } - - return ( -
    - - Formation & Tutoriel Gratuit ou payant Excellente qualité - - - - - - - - Mon Compte - Deconnexion - - - - - Mon Compte - Connexion - - S'inscrire - Deconnexion - - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    -

    Recherche Formations Tutoriels

    - -
    -
    - {String(someoneconnected) !== String("1") && } - {String(someoneconnected) === String("1") && } -
    -
    - - - {String(someoneconnected) === String("1") &&
    - Mon Compte -
    } - - {String(someoneconnected) !== String("1") &&
    - S'inscrire -
    } - -
    - Nos Services -
    - - {/*
    - Le blog -
    */} - -
    - publier mes formations -
    - -
    - - -
    - - -
    -
    -
    - -
    Bienvenue sur MySy
    - Recherche de Formations & Tutoriels - -
    -
    -
    - - - - - {SearchText.length > 2 && }   - {suggestion2 && suggestion2.slice(0, 5).map((suggestion, id) => -
    OnSuggestionHandler(JSON.parse(suggestion).name)}> {JSON.parse(suggestion).name}
    - )} - -
    -
    -
    - - - - - - - - - -
    - - -
    - - - - - - - - - - - - -
    - - -
    -
    -
    - - -
    -
    - {showelement === "true" &&
    - -
    Masquer les Métiers & Filtres
    -
    - -
    - } - - {showelement === "false" &&
    -
    Afficher les Métiers & Filtres
    -
    - -
    - } - - {showelement === "true" &&
    -
    Les filtres
    -
    - - -
    -
    Eligible CPF -
    - -
    Oui    -
    - -
    Non   -
    - {String(cpfchecked) === String("1") &&
    KO
    } - {String(cpfchecked) !== String("1") &&
     
    } -
    - - -
    -
    Certification -
    - -
    Oui    -
    - -
    Non   -
    - {String(certifchecked) === String("1") &&
    KO
    } - {String(certifchecked) !== String("1") &&
     
    } -
    - -
    -
    Type -
    - -
    Cours -
    - -
    Tuto -
    - - {String(typechecked) === String("1") &&
    KO
    } - {String(typechecked) !== String("1") &&
     
    } -
    - -
    -
    Support -
    - -
    Video -
    - -
    Document -
    - {String(supportchecked) === String("1") &&
    KO
    } - {String(supportchecked) !== String("1") &&
     
    } -
    - -
    -
    Lieu -
    - -
    Site   -
    - -
    Distance -
    - {String(lieuchecked) === String("1") &&
    KO
    } - {String(lieuchecked) !== String("1") &&
     
    } -
    - - - {trainingonsite && String(trainingonsite) === String("0") &&
    -
    ville -
    - -
    - - {suggestioncities && suggestioncities.slice(0, 3).map((suggestion, id) => -
    OnCitiesSuggestionHandler(JSON.parse(suggestion).ville)}> {JSON.parse(suggestion).ville}
    - )} - -
    - - -
     
    -
    } - - {trainingonsite && String(trainingonsite) === String("0") &&
    -
    Code postale -
    - -
    - -
    - - -
     
    -
    } -
    -
    Prix -
    - -
    - `${value} €`} - value={range_price} - step={500} - name="toto" - - onChange={value => setrange_price(value)} - //onChange={TrainingPriceHandle} - onChangeComplete={value => console.log(value)} - /> -
    - - -
     
    -
    -
    - - - -
    Les Métiers
    - -
    -
    -
    - Formation Programmation -
    -

    Informatique

    -
    -
    -
    - - -
    -
    - Formation graphisme -
    -

    Graphisme

    -
    -
    -
    - - -
    -
    - Formation gestion projets -
    -

    Projets

    -
    -
    -
    - -
     
    - -
    -
    - Formation Management -
    -

    Management

    -
    -
    - - - -
    - -
    -
    - Formation Digitale -
    -

    Digital

    -
    -
    -
    - -
    -
    - Ressources Humaines -
    -

    RH

    -
    -
    - - - -
    -
     
    -
    -
    - Marketing -
    -

    Marketing

    -
    -
    -
    - -
    -
    - Autres -
    -

    Bureautique

    -
    -
    - -
    - - -
    -
    - Commerce -
    -

    Commerce

    -
    -
    -
    -
     
    - -
    -
    - Autres -
    -

    Dev. Personnel

    -
    -
    - - -
    -
     
    -
    - - {/*
    -
    -
    -
    -

    Tous les Métiers

    -
    -
    -
    -
    */} - - - - -
    - } - -
    - - {String(userconnected) === String("1") &&
    - -
    - } - - {myApiResponse == "False" &&
    - - Impossible de contacter l'hote distant -
    } - - {myApiResponse == "True" && String(besoinaiderecherche) === String("1") &&
    - - Le resultat est vide, besoin d'aide ? - - -
    } - - - {result && myApiResponse === "True" && !newresult && -
    -
    -
    - setCurrentPage2(page)} - /> -
    -
    -
    - Trier par - - -
    -
    - - -
    - - -
    } - - {result && myApiResponse === "True" && newresult && -
    - setCurrentPage2(page)} - /> - - -
    } - - - - {result && myApiResponse == "True" && fin == 0 && !newresult && - result.slice(0, PageSize).map((formation) => ( -
    - - -
    - - ))} - - {result && myApiResponse == "True" && fin == 0 && newresult && - newresult.slice(0, PageSize).map((formation) => ( -
    - - -
    - - ))} - - - - {result && myApiResponse === "True" && fin === 1 && !newresult - && currentTableData2 - && currentTableData2.map((formation) => ( -
    - - -
    - - ))} - - {result && myApiResponse === "True" && fin === 1 && newresult - && currentTableData2 - && currentTableData2.map((formation) => ( -
    - - -
    - - ))} - - - {result && !newresult &&
    - - {String(userconnected) === String("1") && } - setCurrentPage2(page)} - /> -
    - } - - {result && newresult &&
    - - {String(userconnected) === String("1") && } - setCurrentPage2(page)} - /> -
    - } -
    - - -
    - {/*
    - Le blog -
    */} -
    - {/* */} - -
    - -
    - -
    -
    -
    - -
    - -
    - -
    - - -
    - - ); -} - - -export default Recherche_new; \ No newline at end of file diff --git a/src/components/Recherche_new_v2.js b/src/components/Recherche_new_v2.js index 06c9e12..a455fb6 100644 --- a/src/components/Recherche_new_v2.js +++ b/src/components/Recherche_new_v2.js @@ -4,26 +4,8 @@ import axios from "axios"; import Formation from "./Formation"; import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa'; import { BsFillXCircleFill } from "react-icons/bs"; -import { IoAddSharp, IoAtCircle } from "react-icons/io5"; -import bannerimg from "../mysy_img/MYSY_banner_compte.png"; -import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png"; -import logowhite from "../mysy_img/MYSY-LOGO-WHITE.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"; - -import img_met_bureautic from "../mysy_img/met_burautic.jpg"; -import img_met_vente from "../mysy_img/met_vente.jpg"; import Pagination from "./TestPagination"; @@ -31,9 +13,7 @@ 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 NosArticlesAlaUne from "./ArticlesAlaUnes"; -import Drole from "./DroleVsCherchezFormation"; -import { Android, NoEncryption } from "@mui/icons-material"; + import AideRecherche from "./AideRecherche" import { useParams } from 'react-router-dom' import Footer_v2 from "./Fotter_v2"; diff --git a/src/components/UpdatePartnerInfo.js b/src/components/UpdatePartnerInfo.js index 9d10fd5..ed2b45c 100644 --- a/src/components/UpdatePartnerInfo.js +++ b/src/components/UpdatePartnerInfo.js @@ -12,11 +12,7 @@ import EmailIcon from '@mui/icons-material/Email' import LanguageIcon from '@mui/icons-material/Language'; import HomeIcon from '@mui/icons-material/Home' import { Button, Form, FormGroup, Label } from "reactstrap"; -import PasswordIcon from '@mui/icons-material/Password' -import Visibility from '@mui/icons-material/Visibility'; -import VisibilityOff from '@mui/icons-material/VisibilityOff'; -import IconButton from '@mui/material/IconButton'; -import OutlinedInput from '@mui/material/OutlinedInput'; + import { useHistory } from "react-router-dom"; import TwitterIcon from '@mui/icons-material/Twitter'; import FacebookIcon from '@mui/icons-material/Facebook'; diff --git a/src/pages/recherche.js b/src/pages/recherche.js index ee9baec..31706b0 100644 --- a/src/pages/recherche.js +++ b/src/pages/recherche.js @@ -1,4 +1,4 @@ -import Recherche from "../components/Recherche.js"; + import Navigation from "../components/Navigation"; import Footer from "./footer"; @@ -9,7 +9,7 @@ const recherche = () => {
    - +
    diff --git a/src/pages/recherche_new.js b/src/pages/recherche_new.js index 8a69c48..9012790 100644 --- a/src/pages/recherche_new.js +++ b/src/pages/recherche_new.js @@ -1,4 +1,4 @@ -import Recherche_new from "../components/Recherche_new"; + import Navigation from "../components/Navigation"; import Footer from "./footer"; @@ -9,7 +9,7 @@ const recherche = () => {
    - +
    diff --git a/src/styles/components/_dashbord_formation.scss b/src/styles/components/_dashbord_formation.scss new file mode 100644 index 0000000..6e0c5df --- /dev/null +++ b/src/styles/components/_dashbord_formation.scss @@ -0,0 +1,2638 @@ +.dashbord_formation { + + body{ + background-color: rgb(20, 27, 45) !important + } + + .loader-container { + width: 100%; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; + position: fixed; + background: white; + background-color: transparent; + z-index: 1; + top: 0px; + opacity: 80%; + } + + .spinner { + width: 20rem; + height: 10rem; + border: 8px solid; + border-color: #3d5af1 transparent #3d5af1 transparent; + border-radius: 50%; + animation: spin-anim 1.2s linear infinite; + background-color: red; + color: black; + } + + .mysy_spinner { + border-radius: 5px; + border: 1px solid black; + opacity: 100%; + } + + + + .Mui-disabled { + font-size: small !important; + padding: 0px !important; + padding-left: 5px !important; + } + + + + @media screen and (max-width: 600px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .div_row { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_dialog { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_gauche { + + width: 100%; + border-radius: 10rem !important; + text-align: left; + + margin: 0px !important; + margin-bottom: 0.5rem !important; + margin-top: 0.5rem !important; + } + + .div_row_droite { + width: 100%; + border-radius: 10rem !important; + text-align: left; + + margin: 0px !important; + margin-bottom: 0.5rem !important; + margin-top: 0.5rem !important; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + width: 10.5rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + letter-spacing: 0.1rem; + font-weight: normal; + width: 100%; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #104277; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #104277; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + + .training_caract { + width: 100%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .selectsession { + width: 100%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + } + + .session_caract { + width: 100%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .css-1x5jdm { + padding: 5px; + } + + .css-1x5jdmq { + padding: 6px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + .preview_certif { + display: block; + width: 100%; + height: 180px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .hr_break { + border: 2px solid grey; + } + + .icon_plus { + width: 6%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 100%; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 100% !important; + } + + .div_row_gauche_etendu { + width: 100%; + } + + .icon_excel { + width: 6%; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 100%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 100%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: smaller; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + padding-right: 10px; + } + + .img_class_logo { + display: block; + width: 128px; + height: 128px; + border-radius: 10px !important; + border: 1px solid black; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 10rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 10rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 100% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 100% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 40% !important; + font-size: xx-large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + } + + + .div_row { + float: left; + border-width: 0.01rem; + width: 100%; + + border-radius: 1rem; + } + + .div_row_dialog { + float: left; + border-width: 0.01rem; + width: 100%; + margin-bottom: 0.5rem; + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + width: 100%; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite { + float: left; + width: 100%; + border-radius: 1rem; + text-align: left; + + } + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 100%; + margin-left: 10px; + margin-right: 10px; + margin-bottom: 1rem !important; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 100%; + color: white; + margin-bottom: 1rem !important; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: white; + margin-bottom: 1rem !important; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: black; + margin-bottom: 1rem !important; + } + + + .css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset { + border-color: transparent !important; + border-radius: 20px !important; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 3.5rem !important; + + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + + } + + .training_caract { + width: 100%; + + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + + .block_detail_inscrit { + border: none; + background: #F8F9F9; + padding: 5px; + margin-top: 11rem; + + } + + .div_row_list_pj { + width: 100%; + border-left: 3mm ridge rgba(211, 220, 50, .6); + float: left; + } + + .block_en_mass { + width: 100%; + float: left; + margin-bottom: 1rem; + margin-left: 15px; + } + + .block_en_mass_select { + width: 100%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_bton_action { + width: 100%; + float: left; + margin-bottom: 1rem; + padding-top: 0.5rem !important; + } + + + .bton_enreg_dialog { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 100%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + + .bton_annule_dialog { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + + .bton_supprime_dialog { + border-radius: 5rem; + font-size: small; + background: rgb(224, 89, 89) !important; + text-align: right; + height: 2.5rem; + width: auto; + color: white; + margin-left: 10px; + margin-right: 10px; + padding-right: 5px; + padding-left: 5px; + } + + .DialogContent_width { + width: 200px !important; + } + + .titre1 { + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + float: left; + width: 100%; + } + + } + + @media only screen and (min-width: 601px) and (max-width: 991px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + width: 11rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + letter-spacing: 0.1rem; + font-weight: normal; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #104277; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #104277; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 90% !important; + height: 3.5rem !important; + margin: 5px !important; + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + } + + .training_caract { + width: 48%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + + } + + .session_caract { + width: 50%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .css-1x5jdm { + padding: 5px; + } + + + .css-1x5jdmq { + padding: 6px !important; + padding-bottom: 0px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + .preview_certif { + display: block; + width: 90%; + height: 200px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .preview_certif:hover { + transform: scale(1.3); + margin-left: 5rem; + } + + .hr_break { + border: 3px solid grey; + } + + .icon_plus { + width: 6%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 50%; + } + + + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 65% !important; + } + + .div_row_gauche_etendu { + width: 80% !important; + } + + .icon_excel { + width: 6%; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 80%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: small; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + } + + .img_class_logo { + display: block; + width: 168px; + height: 168px; + border-radius: 10px !important; + border: 1px solid black; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 15rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 15rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 5% !important; + font-size: large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + margin-top: 1rem !important; + } + + .div_row { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + //margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_dialog { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + margin-bottom: 0.5rem; + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + // border:1px solid black; + // border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite { + float: right; + //border:1px solid black; + //border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: right; + } + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 40%; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: black; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + + .css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset { + border-color: transparent !important; + border-radius: 20px !important; + } + + + .training_caract { + width: 30%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .block_detail_inscrit { + border: none; + background: #F8F9F9; + padding: 5px; + margin-top: 11rem; + + } + + .div_row_list_pj { + width: 50%; + border-left: 3mm ridge rgba(211, 220, 50, .6); + float: left; + } + + .block_en_mass { + width: 50%; + float: left; + margin-bottom: 1rem; + margin-left: 15px; + } + + .block_en_mass_select { + width: 45%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_bton_action { + width: 45%; + float: left; + margin-bottom: 1rem; + padding-top: 0.5rem !important; + } + + + .bton_enreg_dialog { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + + .bton_annule_dialog { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + + .bton_supprime_dialog { + border-radius: 5rem; + font-size: small; + background: rgb(224, 89, 89) !important; + text-align: right; + height: 2.5rem; + width: auto; + color: white; + margin-left: 10px; + margin-right: 10px; + padding-right: 5px; + padding-left: 5px; + } + + .DialogContent_width { + width: 500px !important; + } + + .titre1 { + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + float: left; + width: 100%; + } + + } + + @media only screen and (min-width: 992px) and (max-width: 1199px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .div_row { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + margin-bottom: 1rem; + border-radius: 1rem; + } + + + .div_row_dialog { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + // border:1px solid black; + // border-width:0.01rem; + width: 45%; + border-radius: 1rem; + } + + .div_row_droite { + float: right; + //border:1px solid black; + //border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: right; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + width: 11rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + letter-spacing: 0.1rem; + font-weight: normal; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #104277; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #104277; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 90% !important; + height: 3.5rem !important; + margin: 5px !important; + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + } + + .training_caract { + width: 30%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5x !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + } + + .session_caract { + width: 33%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .css-1x5jdm { + padding: 5px; + } + + .css-1x5jdmq { + padding: 6px !important; + padding-bottom: 0px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + .preview_certif { + display: block; + width: 90%; + height: 180px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .preview_certif:hover { + transform: scale(1.3); + margin-left: 5rem; + } + + .hr_break { + border: 3px solid grey; + } + + .icon_plus { + width: 8%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 40%; + } + .bton_add_session_create_automatic { + background: #c8cfd5; + color: black; + width:60% !important; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 50% !important; + } + + .div_row_gauche_etendu { + width: 80%; + } + + .icon_excel { + width: 6%; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 65%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 65%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 65%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 65%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: small; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + } + + .img_class_logo { + display: block; + width: 168px; + height: 168px; + border-radius: 10px !important; + border: 1px solid black; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 15rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 15rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 5% !important; + font-size: xx-large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + } + + + .titre1 { + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + float: left; + width: 100%; + } + + .block_detail_inscrit { + border: none; + background: #F8F9F9; + padding: 5px; + margin-top: 6rem; + + } + + .div_row_list_pj { + width: 30%; + border-left: 3mm ridge rgba(211, 220, 50, .6); + float: left; + } + + .block_en_mass { + width: 50%; + float: left; + margin-bottom: 1rem; + margin-left: 15px; + } + + .block_en_mass_select { + width: 45%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_bton_action { + width: 45%; + float: left; + margin-bottom: 1rem; + padding-top: 0.5rem !important; + } + + + .bton_enreg_dialog { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + + .bton_annule_dialog { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + + .bton_supprime_dialog { + border-radius: 5rem; + font-size: small; + background: rgb(224, 89, 89) !important; + text-align: right; + height: 2.5rem; + width: auto; + color: white; + margin-left: 10px; + margin-right: 10px; + padding-right: 5px; + padding-left: 5px; + } + + .DialogContent_width { + width: 500px !important; + } + + } + + @media only screen and (min-width: 1200px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .div_row { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + //margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_dialog { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + margin-bottom: 0.5rem; + border-radius: 2rem; + } + + .div_row_gauche { + float: left; + // border:1px solid black; + // border-width:0.01rem; + width: 45%; + border-radius: 1rem; + } + + .div_row_droite { + float: right; + //border:1px solid black; + //border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: right; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + min-width: 12rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + letter-spacing: 0.1rem; + font-weight: normal; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #104277; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #104277; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 90% !important; + height: 3.5rem !important; + margin: 5px !important; + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + } + + .training_caract { + width: 30%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + } + + .session_caract { + width: 33%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .preview_certif { + display: block; + width: 90%; + height: 200px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .preview_certif:hover { + transform: scale(1.4); + margin-left: 10rem; + } + + + .action_mass { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 40%; + background: #81BC3A; + height: 2.5rem; + } + + + .session_open_close { + cursor: pointer; + text-align: right; + font-size: small; + margin-right: 10px; + } + + .hr_break { + border: 5px solid grey; + } + + .icon_plus { + width: 8%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 20% !important; + } + + .bton_add_session_create_automatic { + background: #c8cfd5; + color: black; + width: 40% !important; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 40% !important; + } + + .div_row_gauche_etendu { + width: 80%; + } + + .icon_excel { + width: 4%; + } + + .bton_envoyer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 60%; + background: #81BC3A; + } + + + .bton_traiter_en_mass { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 40%; + background: #81BC3A; + margin-left: 5%; + height: 2.5rem; + color: white; + + } + + .bton_fermer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 60%; + background-color: white; + color: #104277 !important; + } + + + .enable_style { + background-color: #FFFFFF; + } + + + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input:invalid { + padding-top: 5px !important; + padding-bottom: 5px !important; + padding-left: 5px !important; + } + + .css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset { + border-color: transparent !important; + border-radius: 20px !important; + } + + .bton_emarge { + border-radius: 5rem; + font-size: small; + padding: 0.5rem; + background: rgb(129, 188, 58); + margin-left: 5px; + margin-right: 5px; + } + + .css-1x5jdm { + padding: 5px; + } + + + .css-1x5jdmq { + padding: 6px !important; + height: 3rem ! important; + padding-bottom: 0px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 40%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: small; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + } + + .img_class_logo { + display: block; + width: 170px; + height: 168px; + border-radius: 10px !important; + border: 1px solid black; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 15rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 15rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 5% !important; + font-size: xx-large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + } + + + .titre1 { + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + float: left; + width: 100%; + } + + .file_ariane { + font-size: large; + font-weight: 600; + width: 100%; + text-align: center; + } + + + + .block_detail_inscrit { + border: none; + background: #F8F9F9; + padding: 5px; + margin-top: 6rem; + + } + + .div_row_list_pj { + width: 30%; + border-left: 3mm ridge rgba(211, 220, 50, .6); + float: left; + } + + .block_en_mass { + width: 50%; + float: left; + margin-bottom: 1rem; + margin-left: 15px; + } + + .block_en_mass_select { + width: 45%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_bton_action { + width: 45%; + float: left; + margin-bottom: 1rem; + padding-top: 0.5rem !important; + } + + .bton_enreg_dialog { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + + .bton_annule_dialog { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + + .bton_supprime_dialog { + border-radius: 5rem; + font-size: small; + background: rgb(224, 89, 89) !important; + text-align: right; + height: 2.5rem; + width: auto; + color: white; + margin-left: 10px; + margin-right: 10px; + padding-right: 5px; + padding-left: 5px; + } + + + .DialogContent_width { + width: 600px !important; + } + + .DialogContent_width_session { + width: 600px !important; + } + + + .div_row_gauche_dialog_session { + width: 30%; + float: left; + font-weight: 700; + } + + .div_row_droite_dialog_session { + width: 69%; + float: right; + } + + .mysy_hr_text { + border: none; + border-top: 3px double #333; + color: #333; + overflow: visible; + text-align: center; + height: 5px; + } + + .mysy_hr_text:after { + background: #fff; + content: 'Détails'; + padding: 0 4px; + position: relative; + top: -13px; + } + + } + + // end media + + .css-md26zr-MuiInputBase-root-MuiOutlinedInput-root{ + height: 3rem !important; + } + + .session_caract_Dialog { + width: 100%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + margin-bottom: 1rem !important; + } + + .session_caract_Dialog_comment_2_lines { + + width: 100%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + margin-bottom: 1rem !important; + } + + + .session_caract_Dialog_DatePicker { + + width: 99% !important; + background-color: #FFFFFF; + } + + + + .css-1v4ccyo { + height: 3.5rem !important; + font-size: small; + } + + option { + font-weight: normal; + display: block; + white-space-collapse: collapse; + text-wrap: nowrap; + padding: 0px !important; + } + + .mysy_hr_text { + border: none; + border-top: 3px double #333; + color: #333; + overflow: visible; + text-align: center; + height: 5px; + } + + .mysy_hr_text:after { + background: #fff; + content: 'Détails'; + padding: 0 4px; + position: relative; + top: -13px; + } + + .MuiMenu-paper { + max-width: 30% !important; + } + + +} + +.MuiMenu-paper { + max-width: 30% !important; +} + +.tox-statusbar { + display: none !important; +} + + + + +.css-1x5jdmq { + height: 3rem !important; + font-size: small; +} + +.select_option_css { + border-radius: 0px !important; +} + +.css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { + height: 3.5rem !important; +} + + + +.react-datepicker__input-container { + width: 110%; +} + +.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + padding-left: 5px !important; +} \ No newline at end of file diff --git a/src/styles/components/_mon_tableau_de_bord.scss b/src/styles/components/_mon_tableau_de_bord.scss index 5d3c3f3..effc735 100644 --- a/src/styles/components/_mon_tableau_de_bord.scss +++ b/src/styles/components/_mon_tableau_de_bord.scss @@ -2565,6 +2565,17 @@ } + .text_tbd_vide { + + color: #34495E; + padding: 1.5rem; + font-size: 2rem; + display: inline-block; + margin-top: 5rem !important; + text-align: center; + } + + } .MuiMenu-paper { diff --git a/src/styles/index.scss b/src/styles/index.scss index f4554e2..bfd7a1e 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -89,4 +89,5 @@ @import "./components/partner_configuration_jours_travail"; @import "./components/dashbord_session"; @import "./components/mon_tableau_de_bord"; +@import "./components/dashbord_formation";