@@ -1055,7 +1184,7 @@ function Pricing() {
date_debut: JSON.parse(item).date_du,
date_fin: JSON.parse(item).date_au,
price_line_id: JSON.parse(item)._id,
-
+ formation: JSON.parse(item).class,
}
))}
diff --git a/src/components/Recherche_new_v2.js b/src/components/Recherche_new_v2.js
index c090f1b..fbcc2ae 100644
--- a/src/components/Recherche_new_v2.js
+++ b/src/components/Recherche_new_v2.js
@@ -948,8 +948,11 @@ const Recherche_new_v2 = () => {
const [suggestedcities, setsuggestedcities] = useState([]);
+
+
useEffect(() => {
+
var ip = "";
async function fetchData() {
const result = await axios('https://geolocation-db.com/json/',);
@@ -984,10 +987,14 @@ const Recherche_new_v2 = () => {
if (categorie && String(categorie).length > 0) {
+
getClassByMetier_categorie(categorie);
+
}
else {
+
DisplayXfirstClas(result.data);
+
}
}
fetchData();
@@ -1126,10 +1133,12 @@ const Recherche_new_v2 = () => {
setuserconnected("1");
}
+
setinitAllfiter();
whosisconnected();
+
}, [initAllfiter, categorie]);
@@ -1348,7 +1357,36 @@ const Recherche_new_v2 = () => {
var form = new FormData();
form.append("search_text", crit_SearchText);
- form.append("token", stored_user);
+
+
+ var my_local_user_connect;
+ var my_local_part_connect;
+ if (typeof (stored_user) === "undefined" || String(stored_user) === '') {
+ my_local_user_connect = 0;
+ } else {
+ my_local_user_connect = 1;
+ }
+
+ if (typeof (stored_part) === "undefined" || String(stored_part) === '') {
+ my_local_part_connect = 0;
+ } else {
+ my_local_part_connect = 1;
+ }
+
+
+
+ if( String(my_local_user_connect) === "1"){
+ form.append("token", stored_user);
+ form.append("connection_type", "user");
+ }
+ else if ( String(my_local_part_connect) === "1"){
+ form.append("token", stored_part);
+ form.append("connection_type", "partner");
+ }
+ else{
+ form.append("token", "");
+ form.append("connection_type", "");
+ }
form.append("certif", crit_TrainingCertif);
form.append("support", crit_TrainingSupport);
form.append("type", crit_TrainingType);
@@ -1378,9 +1416,6 @@ const Recherche_new_v2 = () => {
}
-
-
-
//alert("myurl = "+myurl);
axios.post(myurl, form).then(res => {
if (String(res.data.status) != String("false")) {
@@ -1437,6 +1472,7 @@ const Recherche_new_v2 = () => {
// Nettoyage du resultat precedent.
setResult([]);
+
//Get Criterias
var crit_SearchText = "";
var myurl = "";
@@ -1447,7 +1483,6 @@ const Recherche_new_v2 = () => {
} else {
- clearsearchtext();
crit_SearchText = NewSearchText;
myurl = process.env.REACT_APP_API_URL + "myclass/api/recherche_text_simple/";
@@ -1457,7 +1492,36 @@ const Recherche_new_v2 = () => {
var form = new FormData();
form.append("search_text", crit_SearchText);
- form.append("token", "");
+
+
+ var my_local_user_connect;
+ var my_local_part_connect;
+
+ if (typeof (stored_user) === "undefined" || String(stored_user) === '') {
+ my_local_user_connect = 0;
+ } else {
+ my_local_user_connect = 1;
+ }
+
+ if (typeof (stored_part) === "undefined" || String(stored_part) === '') {
+ my_local_part_connect = 0;
+ } else {
+ my_local_part_connect = 1;
+ }
+
+ if( String(my_local_user_connect) === "1"){
+ form.append("token", stored_user);
+ form.append("connection_type", "user");
+ }
+ else if ( String(my_local_part_connect) === "1"){
+ form.append("token", stored_part);
+ form.append("connection_type", "partner");
+ }
+ else{
+ form.append("token", "");
+ form.append("connection_type", "");
+ }
+
form.append("certif", "");
form.append("support", "");
form.append("type", "");
@@ -1498,7 +1562,7 @@ const Recherche_new_v2 = () => {
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);
+ //console.log(" In DisplayXfirstClas res.data.message = " + res.data.message);
setmyApiResponse("True");
setResult(res.data.message)
@@ -1902,6 +1966,8 @@ const Recherche_new_v2 = () => {
const stored_part = getCookie('tokenmysypart');
+
+
function whosisconnected() {
var local_user_connect = 0;
var local_part_connect = 0;
@@ -1923,7 +1989,7 @@ const Recherche_new_v2 = () => {
setpartnerconnected("1");
setsomeoneconnected("1");
local_part_connect = 1;
- // alert(" partner connected OK");
+ //alert(" partner connected OK");
}
}
diff --git a/src/styles/components/_displaydetailclass_new_v2.scss b/src/styles/components/_displaydetailclass_new_v2.scss
index 14a4577..84a103e 100644
--- a/src/styles/components/_displaydetailclass_new_v2.scss
+++ b/src/styles/components/_displaydetailclass_new_v2.scss
@@ -7605,6 +7605,26 @@
border-radius: 15px;
}
+ .discounted_price {
+ font-weight: 600;
+ font-size: 20px;
+ color: #ff8c00;
+ }
+
+ .training_price_barre {
+ font-weight: 500;
+ font-size: 18px;
+ color: #647585;
+ text-decoration: line-through;
+ margin-left: 2rem;
+ }
+
+ .discount_block {
+ font-weight: 400;
+ margin-left: 1rem;
+ color: red;
+ font-size: medium;
+ }
}
diff --git a/src/styles/components/_formation.scss b/src/styles/components/_formation.scss
index 5d11b5d..64663dc 100644
--- a/src/styles/components/_formation.scss
+++ b/src/styles/components/_formation.scss
@@ -412,7 +412,7 @@
.ftion_tab_gauche {
width: 50%;
}
-
+
.ftion_tab_droite {
width: 50%;
}
@@ -426,47 +426,47 @@
float: left;
text-align: left;
font-weight: bold;
-
-
+
+
font-family: 'Albert Sans';
font-style: normal;
font-weight: 700;
font-size: 16px;
line-height: 19px;
font-feature-settings: 'liga' off;
-
+
/* Deep Blue */
-
+
color: #0A043C;
-
-
+
+
/* Inside auto layout */
-
+
flex: none;
order: 0;
flex-grow: 0;
}
-
+
.ftion_tab_droite {
width: 50%;
float: left;
text-align: center;
-
-
+
+
font-family: 'Albert Sans';
font-style: normal;
font-weight: 400;
font-size: 16px;
line-height: 19px;
font-feature-settings: 'liga' off;
-
+
/* Deep Blue */
-
+
color: #0A043C;
-
-
+
+
/* Inside auto layout */
-
+
flex: none;
order: 1;
flex-grow: 0;
@@ -567,7 +567,7 @@
width: 24%;
padding: 0.3rem;
font-size: 11px;
- text-align: left;
+ text-align: center;
color: rgb(10, 42, 77);
margin-top: 1px;
cursor: pointer;
@@ -767,7 +767,7 @@
margin-top: 15px;
}
-
+
.bton_se_renseinger {
border-radius: 15px;
font-size: small;
@@ -807,11 +807,11 @@
}
- .row_formation_desc{
+ .row_formation_desc {
min-height: 5rem !important;
}
- .row_formation_title{
+ .row_formation_title {
min-height: 3rem !important;
}
@@ -915,7 +915,7 @@
width: 24%;
padding: 0.3rem;
font-size: 11px;
- text-align: left;
+ text-align: center;
color: rgb(10, 42, 77);
margin-top: 1px;
cursor: pointer;
@@ -1113,7 +1113,7 @@
margin-top: 5px;
}
-
+
.bton_se_renseinger {
border-radius: 15px;
font-size: small;
@@ -1156,16 +1156,16 @@
.ftion_tab_gauche {
width: 70%;
}
-
+
.ftion_tab_droite {
width: 30%;
}
- .row_formation_desc{
+ .row_formation_desc {
min-height: 5rem !important;
}
- .row_formation_title{
+ .row_formation_title {
min-height: 3rem !important;
}
@@ -1273,7 +1273,7 @@
width: 20%;
padding: 0.3rem;
font-size: 11px;
- text-align: left;
+ text-align: center;
color: rgb(10, 42, 77);
margin-top: 1px;
cursor: pointer;
@@ -1306,7 +1306,7 @@
font-weight: 700;
font-size: 20px;
line-height: 25px;
- /* identical to box height */
+ /* identical to box height */
font-feature-settings: 'liga' off;
@@ -1404,15 +1404,15 @@
font-weight: 600;
font-size: 20px;
color: #ff8c00;
- }
+ }
- .training_price_barre {
- font-weight: 500;
- font-size: 18px;
- color: #647585;
- text-decoration: line-through;
- margin-left: 2rem;
-}
+ .training_price_barre {
+ font-weight: 500;
+ font-size: 18px;
+ color: #647585;
+ text-decoration: line-through;
+ margin-left: 2rem;
+ }
.bton_inscris {
position: relative;
@@ -1566,11 +1566,11 @@
}
- .row_formation_desc{
+ .row_formation_desc {
min-height: 5rem !important;
}
- .row_formation_title{
+ .row_formation_title {
min-height: 3rem !important;
}
@@ -1578,10 +1578,10 @@
min-height: 10rem !important;
}
- .discount_block{
+ .discount_block {
font-weight: 400;
margin-left: 1rem;
-color: red;
+ color: red;
}
}