From 2b8b0ec96f45efa20da022892d9ef492689c4c7c Mon Sep 17 00:00:00 2001 From: cherif Date: Wed, 22 Mar 2023 16:10:48 +0100 Subject: [PATCH] 22/03/23 - 16h --- src/components/Abonnement.js | 8 +- src/components/CheckOut.js | 80 ++++++++-- src/components/Partner.js | 4 +- src/components/PartnerSignIn.js | 6 - src/styles/components/_abonnement.scss | 195 ++++++++++++++++++++++++- src/styles/components/_partner.scss | 15 +- 6 files changed, 270 insertions(+), 38 deletions(-) diff --git a/src/components/Abonnement.js b/src/components/Abonnement.js index 1aa0b8d..b952945 100644 --- a/src/components/Abonnement.js +++ b/src/components/Abonnement.js @@ -979,7 +979,7 @@ function Abonnement(props) { Vous êtes actuellement sur un plan : {String(currentpack2).toUpperCase()}

-
+
Nombre de formations : {String(parnternbformation)}   {result && !(JSON.parse(result).end_date_abonnement) && !changepartnb_ftion && @@ -995,7 +995,7 @@ function Abonnement(props) {
} - {changepartnb_ftion &&
+ {changepartnb_ftion &&
@@ -1053,11 +1053,11 @@ function Abonnement(props) {
-
+
-
+
diff --git a/src/components/CheckOut.js b/src/components/CheckOut.js index 4faba19..7f84848 100644 --- a/src/components/CheckOut.js +++ b/src/components/CheckOut.js @@ -28,6 +28,7 @@ import { import { Elements } from '@stripe/react-stripe-js'; import { loadStripe } from '@stripe/stripe-js'; import { PaymentElement } from '@stripe/react-stripe-js'; +import Popup from 'reactjs-popup'; const stripePromise = loadStripe('pk_test_51LUUfAAbmaEugrFTI25uZBD3IFjbtaL6jUfRV83diDf7nco8worna4NGKhMHbPP71WCwT5EHFRdDNatxPrJWwgZ300kgH5EO4p'); //const stripePromise_PROD = loadStripe('pk_live_51LUUfAAbmaEugrFTyfNe4Dj0vbxc5qXQqNs0rztjAKy8oSlc5EEQyJGjA8Z5kXmP2gvUMcYLUBYCIyWWzLCw59RY00PtGInkVf'); @@ -466,11 +467,10 @@ function CheckOut(props) { document.getElementById('div_nb_formation').style.color = "red"; document.getElementById('div_ttc').style.color = "red"; - return; } - console.log(" ### stripe_existing_souscription_id = ", stripe_existing_souscription_id); + //console.log(" ### stripe_existing_souscription_id = ", stripe_existing_souscription_id); //initpayement_front(); @@ -643,29 +643,20 @@ function CheckOut(props) { MySy_LMS_Account_Management(); window.location.reload(); } - }else{ + } else { console.log(" laaaaa ") if (String(props.packs).toLowerCase() === String("decouverte")) { MySy_LMS_Account_Management(); alert(" La mise à jour de votre abonnement a été correctement traitée. Vous allez recevoir par email les details de la commande et la facture.") window.location.reload(); - }else{ + } else { MySy_LMS_Account_Management(); alert(" La mise à jour de votre abonnement a été correctement traitée. Vous allez recevoir par email les details de la commande et la facture.") - + window.location.reload(); } - /* -JE suis ici. -la mise à jour du pack semble fonctionner. -a faire : - tester à fond. - si changement de forfait. desactivier toutes les formations avant (dans mysy et le lms) - -pb : coté backoffice. la gestion du : #salt = salt.decode('UTF-8') - - */ + } @@ -1908,7 +1899,64 @@ pb : coté backoffice. la gestion du : #salt = salt.decode('UTF-8') {(String(okcommande) !== String("ko") || (String(props.packs).toLowerCase() === String("decouverte"))) && String(payment_in_process) !== "1" - && } + && !stripe_existing_souscription_id + && + + } + + {(String(okcommande) !== String("ko") || + (String(props.packs).toLowerCase() === String("decouverte"))) && + String(payment_in_process) !== "1" + && stripe_existing_souscription_id && + + + Mettre à jour mon abonnement + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + Important :
+ La modification de votre abonnement va entrainer la désactivation de vos formations en cours. Mais vous pourrez les réactiver selon les conditions de votre nouvel abonnement.
+
+
+ + +
+
+ +
+
+
+ )} +
+ + } + + {String(okcommande) === String("ko") && (String(props.packs).toLowerCase() !== String("decouverte")) && String(payment_in_process) !== "1" && } diff --git a/src/components/Partner.js b/src/components/Partner.js index a4cebb7..3bdd8e5 100644 --- a/src/components/Partner.js +++ b/src/components/Partner.js @@ -564,8 +564,8 @@ const Partner = (props) => {
- {String(menu) !== "abonnement" &&
MES PRIX
} - {String(menu) === "abonnement" &&
MES PRIX
} + {String(menu) !== "pricing" &&
MES PRIX
} + {String(menu) === "pricing" &&
MES PRIX
}
diff --git a/src/components/PartnerSignIn.js b/src/components/PartnerSignIn.js index af0c12f..93a421a 100644 --- a/src/components/PartnerSignIn.js +++ b/src/components/PartnerSignIn.js @@ -254,12 +254,6 @@ function PartnerSignIn() { - - - - - -
diff --git a/src/styles/components/_abonnement.scss b/src/styles/components/_abonnement.scss index 05f8840..b205820 100644 --- a/src/styles/components/_abonnement.scss +++ b/src/styles/components/_abonnement.scss @@ -180,6 +180,59 @@ padding-right: 5px; } + .btn_modif_nb_ftion { + width: 10rem; + background-color: green !important; + color: white; + border-radius: 5rem; + font-size: small; + } + + .nb_ftion { + text-align: center; + width: 50%; + } + + .btn_enreg_new_nb_ftion { + width: 95%; + background-color: green !important; + color: white; + border-radius: 5rem; + font-size: small; + } + + + .btn_annule_new_nb_ftion { + width: 95%; + background-color: black !important; + color: white; + border-radius: 5rem; + font-size: small; + } + + .pave_nb_ftion {} + + + .pave_change_ftion { + text-align: right; + border-left: 2px solid; + padding-left: 5px; + } + + .pave_btn_enreg_new_nb_ftion { + text-align: left; + width: 50%; + float: left; + + } + + .pave_btn_annule_new_nb_ftion { + text-align: left; + width: 50%; + float: left; + } + + } @media only screen and (min-width: 601px) and (max-width: 991px) { @@ -276,6 +329,7 @@ border-width: 0.01rem; width: 100%; margin-bottom: 1rem; + font-size: small; } .div_row_gauche { @@ -339,6 +393,63 @@ padding-left: 5px; padding-right: 5px; } + + .btn_modif_nb_ftion { + width: 10rem; + background-color: green !important; + color: white; + border-radius: 5rem; + font-size: small; + } + + .nb_ftion { + text-align: center; + width: 80%; + } + + .btn_enreg_new_nb_ftion { + width: 95%; + background-color: green !important; + color: white; + border-radius: 5rem; + font-size: small; + } + + + .btn_annule_new_nb_ftion { + width: 95%; + background-color: black !important; + color: white; + border-radius: 5rem; + font-size: small; + } + + + .pave_nb_ftion {} + + + .pave_change_ftion { + text-align: right; + border-left: 2px solid; + padding-left: 5px; + width: 50%; + } + + .pave_btn_enreg_new_nb_ftion { + text-align: left; + width: 100%; + float: left; + margin-bottom: 0.3rem; + + } + + .pave_btn_annule_new_nb_ftion { + text-align: left; + width: 100%; + float: left; + } + + } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -433,6 +544,7 @@ border-width: 0.01rem; width: 100%; margin-bottom: 1rem; + font-size: small; } .div_row_gauche { @@ -497,6 +609,63 @@ padding-left: 5px; padding-right: 5px; } + + .btn_modif_nb_ftion { + width: 10rem; + background-color: green !important; + color: white; + border-radius: 5rem; + font-size: small; + } + + .nb_ftion { + text-align: center; + width: 80%; + } + + .btn_enreg_new_nb_ftion { + width: 95%; + background-color: green !important; + color: white; + border-radius: 5rem; + font-size: small; + } + + + .btn_annule_new_nb_ftion { + width: 95%; + background-color: black !important; + color: white; + border-radius: 5rem; + font-size: small; + } + + + .pave_nb_ftion {} + + + .pave_change_ftion { + text-align: right; + border-left: 2px solid; + padding-left: 5px; + width: 50%; + } + + .pave_btn_enreg_new_nb_ftion { + text-align: left; + width: 100%; + float: left; + margin-bottom: 0.3rem; + + } + + .pave_btn_annule_new_nb_ftion { + text-align: left; + width: 100%; + float: left; + } + + } @media only screen and (min-width: 1200px) { @@ -658,7 +827,7 @@ .list_produits_service { font-size: small; - } + } .btn_retour_ps { background-color: rgb(228, 236, 228) !important; @@ -674,7 +843,7 @@ font-size: small; } - .nb_ftion{ + .nb_ftion { text-align: center; width: 50%; } @@ -696,6 +865,28 @@ font-size: small; } + .pave_nb_ftion {} + + + .pave_change_ftion { + text-align: right; + border-left: 2px solid; + padding-left: 5px; + } + + .pave_btn_enreg_new_nb_ftion { + text-align: left; + width: 50%; + float: left; + + } + + .pave_btn_annule_new_nb_ftion { + text-align: left; + width: 50%; + float: left; + } + } diff --git a/src/styles/components/_partner.scss b/src/styles/components/_partner.scss index d072cee..d722089 100644 --- a/src/styles/components/_partner.scss +++ b/src/styles/components/_partner.scss @@ -78,7 +78,6 @@ font-size: small; text-align: center; margin-bottom: 0.8rem; - color: #ffffff; cursor: pointer; letter-spacing: 1px; font-weight: bold; @@ -489,13 +488,13 @@ } .div_droite { - float: right; + float: left; //border: 1px solid black; border-width: 0.01rem; - width: 79%; + width: 80%; height: auto; margin: auto; - padding: 10px; + padding: 1px; border-radius: 1rem; text-align: left; color: rgb(10, 42, 77); @@ -571,18 +570,18 @@ .div_gauche { float: left; - border: 1px solid black; + border: 0px solid black; border-width: 0.01rem; width: 19%; height: auto; margin: auto; - padding: 10px; + padding: 1px; border-radius: 1rem; - margin-right: 5px; + margin-right: 1px; background-color: #104277; text-align: left; color: white; - margin-left: 5px; + margin-left: 1px; } .containerBox {