diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index 9b743da..cb2f381 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -871,7 +871,7 @@ const AddClassManual = (props) => { //alert("4"); } }).catch((error) => { - console.warn('getClassImage : Not good man :( getClassImage = '); + console.warn('getClassImage ee: Not good man :( getClassImage = '); setisclassimage("False"); setuserimgclassprofil(""); }) diff --git a/src/components/DisplayDetailClass_new_v2.js b/src/components/DisplayDetailClass_new_v2.js index 7fdf9f2..c83e080 100644 --- a/src/components/DisplayDetailClass_new_v2.js +++ b/src/components/DisplayDetailClass_new_v2.js @@ -289,33 +289,33 @@ const DisplayDetailClass_new_v2 = (props) => { form.append("internal_url", classId); 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; - } + 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_partner) === "undefined" || String(stored_partner) === '') { - my_local_part_connect = 0; - } else { - my_local_part_connect = 1; - } + if (typeof (stored_partner) === "undefined" || String(stored_partner) === '') { + 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_partner); - form.append("connection_type", "partner"); - } - else{ - form.append("token", ""); - form.append("connection_type", ""); - } + 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_partner); + form.append("connection_type", "partner"); + } + else { + form.append("token", ""); + form.append("connection_type", ""); + } // Ajout des info IP user form.append("user_ip", IPv4); @@ -1167,21 +1167,25 @@ const DisplayDetailClass_new_v2 = (props) => { "NON Éligible au CPF"} - - - - - - + {DetailTraining["price"] && (!DetailTraining.business_prices || Object.keys(DetailTraining.business_prices).length <= 0) + && +
+ {String(DetailTraining["price"])} € HT +
} + + {DetailTraining["price"] && DetailTraining.business_prices && Object.keys(DetailTraining.business_prices).length > 0 + &&
+ + + + +
} -
- {String(DetailTraining["price"])} HT -
{String(action).toLowerCase() !== "information" && String(action).toLowerCase() !== "inscription" && @@ -2003,12 +2007,12 @@ const DisplayDetailClass_new_v2 = (props) => { {DetailTraining["price"] && (!DetailTraining.business_prices || Object.keys(DetailTraining.business_prices).length <= 0) &&
{String(DetailTraining["price"])} HT
} - {DetailTraining["price"] && DetailTraining.business_prices && Object.keys(DetailTraining.business_prices).length > 0 - &&
- + {DetailTraining["price"] && DetailTraining.business_prices && Object.keys(DetailTraining.business_prices).length > 0 + &&
+ - - + +
} diff --git a/src/components/Formation - Copie.js b/src/components/Formation - Copie.js index 8423bbe..4a0932a 100644 --- a/src/components/Formation - Copie.js +++ b/src/components/Formation - Copie.js @@ -129,7 +129,7 @@ const Formation_copie = (props) => { //alert("4"); } }).catch((error) => { - console.warn('getClassImage : Not good man :( getClassImage = '); + console.warn('getClassImage ii : Not good man :( getClassImage = '); setisclassimage("False"); setuserimgclassprofil(profileimg); }) diff --git a/src/components/Formation.js b/src/components/Formation.js index da22341..063a08d 100644 --- a/src/components/Formation.js +++ b/src/components/Formation.js @@ -100,14 +100,13 @@ const Formation = (props) => { var form = new FormData(); form.append("class_external_code", class_external_code); - axios.post(myurl, form).then(res => { if (res.data.status != "False") { //console.log(" getClassImage : In test res.data.status = " + res.data.status); //console.log(" getClassImage: res.data.message.img = " + res.data.message); - if (res.data.message.img.length > 0) { + if (res.data.message.img && res.data.message.img.length > 0) { setisclassimage("True"); //console.log(" getClassImage : In test res.data.status = " + res.data.status); //console.log(" getClassImage: res.data.message.img = " + res.data.message); @@ -115,7 +114,7 @@ const Formation = (props) => { var ch_img = "data:image/png;base64," + res.data.message.img; setuserimgclassprofil(ch_img); //console.log("ch_img = "+ch_img); - } + } else { setisclassimage("False"); } @@ -129,7 +128,7 @@ const Formation = (props) => { //alert("4"); } }).catch((error) => { - console.warn('getClassImage : Not good man :( getClassImage = '); + console.warn('getClassImageee : Not good man :( getClassImage = ', error); setisclassimage("False"); setuserimgclassprofil(profileimg); }) @@ -291,10 +290,10 @@ const Formation = (props) => { {props.formation.note && String(props.formation.note).length === 1 && parseInt(String(props.formation.note)) <= 5 && - - + + } - +
@@ -342,23 +341,23 @@ const Formation = (props) => {
} - {String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && ( !props.formation.business_prices || - Object.keys(props.formation.business_prices).length <= 0) && + {String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && (!props.formation.business_prices || + Object.keys(props.formation.business_prices).length <= 0) &&
{props.formation.price} € HT  - +
} {String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && - props.formation.business_prices && Object.keys(props.formation.business_prices).length > 0 && + props.formation.business_prices && Object.keys(props.formation.business_prices).length > 0 &&
- - - - + + + +
} diff --git a/src/components/Formation_Cartouche_Com.js b/src/components/Formation_Cartouche_Com.js index 1092dae..d85dfb9 100644 --- a/src/components/Formation_Cartouche_Com.js +++ b/src/components/Formation_Cartouche_Com.js @@ -131,7 +131,7 @@ const Formation_Cartouche_Com = (props) => { //alert("4"); } }).catch((error) => { - console.warn('getClassImage : Not good man :( getClassImage = '); + console.warn('getClassImage grrr : Not good man :( getClassImage = '); setisclassimage("False"); setuserimgclassprofil(profileimg); }) diff --git a/src/components/Pricing.js b/src/components/Pricing.js index 8fa22c2..b88a63f 100644 --- a/src/components/Pricing.js +++ b/src/components/Pricing.js @@ -50,7 +50,6 @@ function Pricing() { { field: 'price_line_id', headerName: '_id', hide: true }, { field: 'client', headerName: 'Client', width: 150, flex: 1 }, { field: 'client_recid', headerName: 'Client Id', width: 150, hide: true }, - { field: 'formation', headerName: 'Formation', width: 150, flex: 1 }, { field: 'discount', headerName: 'Réduction (%)', width: 100, hideable: false, flex: 1 }, { field: 'date_debut', headerName: 'Date début', width: 150, flex: 1 }, { field: 'date_fin', headerName: 'Date Fin', width: 150, flex: 1 }, @@ -199,12 +198,10 @@ function Pricing() { const [selectedlinked_client, setselectedlinked_client] = useState(); - const [selectedformation_client, setselectedformation_client] = useState() - function changeselectedclient(event) { setselectedlinked_client(event.target.value); - if (String(event.target.value).trim() !== "") { + if (String(event.target.value).trim() !== "na") { Enable_new_prices_fields(); } else { @@ -213,10 +210,6 @@ function Pricing() { }; - function changeselectedformation(event) { - setselectedformation_client(event.target.value); - - }; const [GetClient_Class_api, setGetClient_Class_api] = useState() const [GetClient_Class_result, setGetClient_Class_result] = useState([]); const [GetClient_Class_message, setGetClient_Class_message] = useState() @@ -342,13 +335,6 @@ function Pricing() { document.getElementById("new_sessiondatefin").disabled = true; document.getElementById("new_sessiondatefin").style.backgroundColor = "#ECEFF1"; } - - if (document.getElementById("new_selectedclass_client")) { - document.getElementById("new_selectedclass_client").disabled = true; - document.getElementById("new_selectedclass_client").style.backgroundColor = "#ECEFF1"; - } - - } @@ -373,12 +359,6 @@ function Pricing() { setNew_SessionendDate(""); } - if (document.getElementsByName("new_selectedclass_client") && document.getElementsByName("selectedclass_client")[0]) { - document.getElementsByName("new_selectedclass_client")[0].disabled = true; - document.getElementsByName("new_selectedclass_client")[0].style.backgroundColor = "#ECEFF1"; - setselectedformation_client(""); - } - } function Clean_prices_fields() { @@ -401,13 +381,6 @@ function Pricing() { document.getElementsByName("sessiondatefin")[0].style.backgroundColor = "#ECEFF1"; setNew_SessionendDate(""); } - - if (document.getElementsByName("selectedclass_client") && document.getElementsByName("selectedclass_client")[0]) { - document.getElementsByName("selectedclass_client")[0].disabled = true; - document.getElementsByName("selectedclass_client")[0].style.backgroundColor = "#ECEFF1"; - setselectedformation_client(""); - } - } function DataUpdated() { @@ -485,7 +458,7 @@ function Pricing() { const formData = new FormData(); const url = process.env.REACT_APP_API_URL + "myclass/api/add_business_price/"; - if (String(selectedlinked_client).trim() === "") { + if (String(selectedlinked_client).trim() === "na") { alert(" Le client n'est pas identifié"); return; } @@ -518,7 +491,6 @@ function Pricing() { formData.append("token", stored_cookie); formData.append('client_recid', selectedlinked_client); formData.append('discount', new_discount_val); - formData.append('class', selectedformation_client); formData.append('date_du', local_date_debut); formData.append('date_au', local_date_fin); @@ -565,7 +537,6 @@ function Pricing() { setRecord_new_Price_message(""); setDelete_Price_api(""); setUpdate_Price_api(""); - setselectedformation_client(); } @@ -606,7 +577,6 @@ function Pricing() { formData.append('discount', discount_val); formData.append('date_du', local_date_debut); formData.append('date_au', local_date_fin); - formData.append('class', selectedformation_client); fetch( url, @@ -753,11 +723,6 @@ function Pricing() { if (mylocalprice.discount) { setdiscount_val(mylocalprice.discount); - } - - if (mylocalprice.class) { - setselectedformation_client(mylocalprice.class); - } Desable_exist_prices_fields(); } @@ -801,12 +766,6 @@ function Pricing() { document.getElementsByName("sessiondatefin")[0].disabled = false; document.getElementsByName("sessiondatefin")[0].style.backgroundColor = "#FFFFFF"; } - - if (document.getElementsByName("selectedclass_client") && document.getElementsByName("selectedclass_client")[0]) { - document.getElementsByName("selectedclass_client")[0].disabled = false; - document.getElementsByName("selectedclass_client")[0].style.backgroundColor = "#FFFFFF"; - } - } function Desable_exist_prices_fields() { @@ -827,10 +786,6 @@ function Pricing() { document.getElementsByName("sessiondatefin")[0].style.backgroundColor = "#ECEFF1"; } - if (document.getElementsByName("selectedclass_client") && document.getElementsByName("selectedclass_client")[0]) { - document.getElementsByName("selectedclass_client")[0].disabled = true; - document.getElementsByName("selectedclass_client")[0].style.backgroundColor = "#ECEFF1"; - } } @@ -907,27 +862,7 @@ function Pricing() { variant="standard" /> -
-
- - {GetClient_Class_result &&
- -
} -
- -
+
@@ -1026,10 +961,11 @@ function Pricing() { "width": "90%", "height": "3rem" }}> - + {GetClient_Linked_result.map((option) => ( ))} +
}
@@ -1057,27 +993,7 @@ function Pricing() {
-
-
- - {GetClient_Class_result &&
- -
} -
- -
+
diff --git a/src/styles/components/_displaydetailclass_new_v2.scss b/src/styles/components/_displaydetailclass_new_v2.scss index 84a103e..58d14c3 100644 --- a/src/styles/components/_displaydetailclass_new_v2.scss +++ b/src/styles/components/_displaydetailclass_new_v2.scss @@ -441,20 +441,20 @@ width: 327px; height: 116px; left: 20px; - top: 210px; + top: 200px; } .mob_block_content_rating { /* Auto layout */ - display: flex; - flex-direction: row; - align-items: flex-start; + //display: flex; + //flex-direction: row; + //align-items: flex-start; padding: 0px; gap: 7.76px; - width: 147.53px; + width: 50%; height: 22px; @@ -463,6 +463,8 @@ flex: none; order: 0; flex-grow: 0; + margin-left: auto; + margin-right: auto; } .mob_block_content_title { @@ -472,7 +474,7 @@ font-family: 'Albert Sans'; font-style: normal; font-weight: 700; - font-size: 20px; + font-size: 18px; line-height: 22px; /* Deep Blue */ @@ -524,7 +526,7 @@ //width: 80%; height: 37px; //right: 213px; - top: 80px; + top: 85px; /* Beige */ @@ -1467,11 +1469,15 @@ align-items: flex-start; padding: 0px; position: absolute; - width: 99%; + //width: 99%; display: flex; flex-direction: column; align-items: flex-start; top: 1300px; + text-align: center; + max-width: 80%; + width: 60%; + margin-left: 20%; } @@ -1490,6 +1496,26 @@ height: 100px; 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; + } } @media only screen and (min-width: 601px) and (max-width: 991px) { @@ -3507,6 +3533,7 @@ flex-direction: column; align-items: flex-start; top: 750px; + gap: 1rem; } @@ -3523,6 +3550,27 @@ 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; + } + } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -5537,6 +5585,7 @@ flex-direction: column; align-items: flex-start; top: 750px; + gap: 1rem; } @@ -5553,6 +5602,27 @@ 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; + } + } @media only screen and (min-width: 1200px) { @@ -7589,6 +7659,7 @@ flex-direction: column; align-items: flex-start; top: 750px; + gap: 1rem; } diff --git a/src/styles/components/_formation.scss b/src/styles/components/_formation.scss index 64663dc..edad101 100644 --- a/src/styles/components/_formation.scss +++ b/src/styles/components/_formation.scss @@ -417,6 +417,28 @@ width: 50%; } + .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; + } + + + } @media only screen and (min-width: 601px) and (max-width: 991px) { @@ -818,6 +840,29 @@ .row_formation_crit { min-height: 10rem !important; } + + .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; + } + + + } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -1173,6 +1218,28 @@ min-height: 10rem !important; } + .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; + } + + + } @media only screen and (min-width: 1200px) { diff --git a/src/styles/components/_pricing.scss b/src/styles/components/_pricing.scss index 16326a9..2971862 100644 --- a/src/styles/components/_pricing.scss +++ b/src/styles/components/_pricing.scss @@ -25,16 +25,57 @@ float: left; //border:0px solid black; border-width: 0.01rem; - width: 48%; + width: 100%; border-radius: 1rem; + margin-bottom: 0.5rem; } .div_row_droite { float: right; //border:0px solid black; border-width: 0.01rem; - width: 48%; + width: 100%; border-radius: 1rem; + margin-bottom: 0.5rem; + } + + + .btn_editer { + width: 100%; + background-color: #212121 !important; + color: white; + border-radius: 10rem; + } + + .btn_enreg { + width: 100%; + background-color: green !important; + color: white; + border-radius: 10rem; + } + + .my_label { + color: rgba(0, 0, 0, 0.6); + font-family: "Roboto", "Helvetica", "Arial", sans-serif; + font-weight: 400; + font-size: small; + line-height: 1.4375em; + letter-spacing: 0.00938em; + } + + .div_row_droite_adapt_date{ + float: left; + } + + .buton_add_price { + border-radius: 10rem; + padding: 0.3rem; + width: 90%; + background: #81BC3A; + float: right; + margin-right: 10px; + border: none; + margin-bottom: 1rem; } } @@ -80,6 +121,45 @@ border-radius: 1rem; } + + .btn_editer { + width: 15rem; + background-color: #212121 !important; + color: white; + border-radius: 10rem; + } + + .btn_enreg { + width: 15rem; + background-color: green !important; + color: white; + border-radius: 10rem; + } + + .my_label { + color: rgba(0, 0, 0, 0.6); + font-family: "Roboto", "Helvetica", "Arial", sans-serif; + font-weight: 400; + font-size: small; + line-height: 1.4375em; + letter-spacing: 0.00938em; + } + + .div_row_droite_adapt_date{ + padding-left: 1rem; + float: left; + } + + .buton_add_price { + border-radius: 10rem; + padding: 0.3rem; + width: 40%; + background: #81BC3A; + float: right; + margin-right: 10px; + border: none; + } + } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -120,6 +200,45 @@ border-radius: 1rem; } + + .btn_editer { + width: 15rem; + background-color: #212121 !important; + color: white; + border-radius: 10rem; + } + + .btn_enreg { + width: 15rem; + background-color: green !important; + color: white; + border-radius: 10rem; + } + + .my_label { + color: rgba(0, 0, 0, 0.6); + font-family: "Roboto", "Helvetica", "Arial", sans-serif; + font-weight: 400; + font-size: small; + line-height: 1.4375em; + letter-spacing: 0.00938em; + } + + .div_row_droite_adapt_date{ + padding-left: 1rem; + float: left; + } + + .buton_add_price { + border-radius: 10rem; + padding: 0.3rem; + width: 30%; + background: #81BC3A; + float: right; + margin-right: 10px; + border: none; + } + } @@ -170,7 +289,6 @@ float: right; margin-right: 10px; border: none; - } .texte_area { diff --git a/src/styles/components/_reherche_new_v2.scss b/src/styles/components/_reherche_new_v2.scss index fa43281..b49cbe4 100644 --- a/src/styles/components/_reherche_new_v2.scss +++ b/src/styles/components/_reherche_new_v2.scss @@ -6051,9 +6051,9 @@ isolation: isolate; position: absolute; - width: 100%; + width: 95%; height: 367px; - left: 72px; + left: 5%; top: 156px; } @@ -8938,9 +8938,9 @@ isolation: isolate; position: absolute; - width: 100%; + width: 95%; height: 367px; - left: 72px; + left: 5%; top: 156px; } @@ -9179,7 +9179,7 @@ width: 500px; height: 400px; //left: 596px; - right: 8rem; + right: 5%; top: 0px; background: url("../../mysy_img2/img_header.png") no-repeat; @@ -11839,9 +11839,9 @@ isolation: isolate; position: absolute; - width: 100%; + width: 95%; height: 367px; - left: 72px; + left: 5%; top: 156px; }