From 48e5ee02629c0adba3f76f27a4a36cdd6f3154dc Mon Sep 17 00:00:00 2001 From: cherif Date: Mon, 30 Jan 2023 22:29:51 +0100 Subject: [PATCH] 30/01/23 - 22h --- src/components/DisplayDetailClass_new_v2.js | 30 +++++++++-- src/components/Formation.js | 56 +++++++++++++++------ src/components/GestionAdministrative.js | 20 +++++--- 3 files changed, 79 insertions(+), 27 deletions(-) diff --git a/src/components/DisplayDetailClass_new_v2.js b/src/components/DisplayDetailClass_new_v2.js index a11f45e..e1039bc 100644 --- a/src/components/DisplayDetailClass_new_v2.js +++ b/src/components/DisplayDetailClass_new_v2.js @@ -1456,12 +1456,14 @@ const DisplayDetailClass_new_v2 = (props) => {
+ { JSON.parse(formation).note && String(JSON.parse(formation).note).length === 1 && + parseInt(String(JSON.parse(formation).note)) <=5 && + />}
@@ -1626,11 +1628,13 @@ const DisplayDetailClass_new_v2 = (props) => {
- + />}
@@ -1815,6 +1819,18 @@ const DisplayDetailClass_new_v2 = (props) => { }
} + {DetailTraining["plus_produit"] &&
+
+ Points forts +
+ {DetailTraining["pourqui"] &&
+ {parse(String(DetailTraining["plus_produit"]))} + + +
+ } +
} +
@@ -2126,11 +2142,15 @@ const DisplayDetailClass_new_v2 = (props) => {
- + />}
{parse(String(JSON.parse(formation).title)).substring(0, 50)} diff --git a/src/components/Formation.js b/src/components/Formation.js index f06e0a2..c841b20 100644 --- a/src/components/Formation.js +++ b/src/components/Formation.js @@ -271,24 +271,34 @@ const Formation = (props) => {
{ e.preventDefault(); + if (props.formation.url && props.formation.url.length > 5) { - window.open( - "/Display-Detail-formation/" + props.formation.internal_url, - '_blank' - ); - + window.open( + props.formation.url, + '_blank' + ); + } else { + window.open( + "/Display-Detail-formation/" + props.formation.internal_url, + '_blank' + ); + } }}>
+ { props.formation.note && String(props.formation.note).length === 1 && + parseInt(String(props.formation.note)) <=5 && + + }
- + {props.formation.cpf && String(props.formation.cpf) === String("1") &&
OUI Éligible au CPF   @@ -618,16 +628,24 @@ const Formation = (props) => { onClick={(e) => { e.preventDefault(); + if (props.formation.url && props.formation.url.length > 5) { - window.open( - "/Display-Detail-formation/" + props.formation.internal_url + "/Information", - '_blank' - ); + window.open( + props.formation.url, + '_blank' + ); + } else { + + window.open( + "/Display-Detail-formation/" + props.formation.internal_url + "/Information", + '_blank' + ); + } }} - >Se renseigner + >Se renseigner diff --git a/src/components/GestionAdministrative.js b/src/components/GestionAdministrative.js index a603212..46d9fe9 100644 --- a/src/components/GestionAdministrative.js +++ b/src/components/GestionAdministrative.js @@ -1955,7 +1955,7 @@ function GestionAdministrative(props) { axios.post(myurl, form).then(res => { - if (res.data.status != "false") { + if (String(res.data.status) === "true") { //console.log(" In GetAttendee res.data.status = " + res.data.status); console.log(" In GetAttendee res.data.message r_class = " + res.data.message); setGetAttendee_api("true"); @@ -2376,10 +2376,10 @@ function GestionAdministrative(props) { {(JSON.parse(session).date_debut).substring(0, 10)} au {(JSON.parse(session).date_fin).substring(0, 10)} - {(JSON.parse(session).distantiel) === "1" && " A Distance - "} {(JSON.parse(session).presentiel) === "1" && (JSON.parse(session).adresse) && " En Présentiel - " + (JSON.parse(session).adresse)} - {(JSON.parse(session).presentiel) === "1" && (!JSON.parse(session).adresse) && " En Présentiel - " } - {(JSON.parse(session).code_postal) && " "+(JSON.parse(session).code_postal) } - - + {(JSON.parse(session).presentiel) === "1" && (!JSON.parse(session).adresse) && " En Présentiel - "} + {(JSON.parse(session).code_postal) && " " + (JSON.parse(session).code_postal)} + + @@ -3005,7 +3005,7 @@ function GestionAdministrative(props) { {String(display_detail_insc) === "1" && mysession &&
Detail inscription -
+ {String(GetAttendee_api) === "true" &&
@@ -3366,7 +3366,13 @@ function GestionAdministrative(props) {
-
+
} + + {String(GetAttendee_api) === "false" &&
+ {GetAttendee_message} +
} + +
}