From 397afe06528012e85d50ad4e05e1decec1220d3b Mon Sep 17 00:00:00 2001 From: cherif Date: Sun, 21 May 2023 22:02:06 +0200 Subject: [PATCH] 21/05/23 - 22h --- src/App.js | 4 ++- src/components/DisplayDetailClass_new_v2.js | 11 +++--- src/components/HebergementLms.js | 12 +++---- src/pages/NotFound.js | 2 +- src/pages/Traning_Inactif_Or_Not_Exist.js | 39 +++++++++++++++++++++ 5 files changed, 55 insertions(+), 13 deletions(-) create mode 100644 src/pages/Traning_Inactif_Or_Not_Exist.js diff --git a/src/App.js b/src/App.js index 5406c52..fce20b7 100644 --- a/src/App.js +++ b/src/App.js @@ -38,6 +38,7 @@ import Emargement from "./pages/emargementOk"; import Formation_Cartouche_Com from "./pages/recherche_cartouche_com"; import SeDesabonner from './pages/sedesabonner'; import OrderConfirmation_3DS from "./pages/orderconfirmation_3DS"; +import Training_Inactive_Or_Not_Found from "./pages/Traning_Inactif_Or_Not_Exist" function App() { @@ -99,7 +100,8 @@ function App() { - + + diff --git a/src/components/DisplayDetailClass_new_v2.js b/src/components/DisplayDetailClass_new_v2.js index d6f8fc3..dbb99ea 100644 --- a/src/components/DisplayDetailClass_new_v2.js +++ b/src/components/DisplayDetailClass_new_v2.js @@ -331,9 +331,10 @@ const DisplayDetailClass_new_v2 = (props) => { //alert("myurl = "+myurl); axios.post(myurl, form).then(res => { - if (String(res.data.status) !== String("false")) { - //console.log(" In Display res.data.status = " + res.data.status); + console.log(" In Display res.data.status = " + res.data.status); //console.log(" In Display res.data.message = " + res.data.message); + if (String(res.data.status) === String("true")) { + if (res.data.message.length > 0) { setmyApiResponse("True"); @@ -603,8 +604,8 @@ const DisplayDetailClass_new_v2 = (props) => { else { //console.log(" In Erreur res.data.status = " + res.data.status); //console.log(" In Erreur res.data.message = " + res.data.message); - setmyApiResponse("False"); - + setmyApiResponse("false"); + history.push("/formation-inconnue/"); } @@ -612,7 +613,7 @@ const DisplayDetailClass_new_v2 = (props) => { }).catch((error) => { console.warn('Not good man :( Display = '); //console.log(error); - setmyApiResponse("False"); + setmyApiResponse("false"); }) diff --git a/src/components/HebergementLms.js b/src/components/HebergementLms.js index ca3d722..2868372 100644 --- a/src/components/HebergementLms.js +++ b/src/components/HebergementLms.js @@ -212,8 +212,8 @@ function HebergementLms(props) { _URL.revokeObjectURL(objectUrl); console.log(" img_width = ", img_width, " img_height = ", img_height) - if (parseFloat(img_width) > 150 && parseFloat(img_width) < 280 && - parseFloat(img_height) > 60 && parseFloat(img_height) < 90) { + if (parseFloat(img_width) > 140 && parseFloat(img_width) < 250 && + parseFloat(img_height) > 60 && parseFloat(img_height) < 150) { //console.log(" img_height est = ", img_height, " < à 1500 "); // Verification que le nom du fichier est alpha numerique @@ -341,8 +341,8 @@ function HebergementLms(props) { img_width = this.width; console.log(" img_width = ", img_width); _URL.revokeObjectURL(objectUrl); - if (parseFloat(img_width) > 1500 && parseFloat(img_width) < 1950 && - parseFloat(img_height) > 170 && parseFloat(img_height) < 200) { + if (parseFloat(img_width) > 1500 && parseFloat(img_width) < 1930 && + parseFloat(img_height) > 150 && parseFloat(img_height) < 195) { //console.log(" img_height est = ", img_height, " < à 1500 "); // Verification que le nom du fichier est alpha numerique @@ -561,7 +561,7 @@ function HebergementLms(props) { id='menu_import_formation' name='menu_import_formation'>Choisir une image  

-