22/03/23 - 16h

recette2
cherif 2023-03-22 16:10:48 +01:00
parent 25cbdd88eb
commit 2b8b0ec96f
6 changed files with 270 additions and 38 deletions

View File

@ -979,7 +979,7 @@ function Abonnement(props) {
Vous êtes actuellement sur un plan : {String(currentpack2).toUpperCase()} <br /><br />
<div className="div_row">
<div className="div_row_gauche">
<div className="div_row_gauche pave_nb_ftion">
Nombre de formations : {String(parnternbformation)} &nbsp;
{result && !(JSON.parse(result).end_date_abonnement) && !changepartnb_ftion &&
<Button className="btn_modif_nb_ftion" onClick={Change_Partne_Nb_Ftion} >Modifier &nbsp; <RiAddCircleLine /> </Button>
@ -995,7 +995,7 @@ function Abonnement(props) {
</div>
}
{changepartnb_ftion && <div className="div_row_gauche" style={{ "textAlign": "right", "borderLeft": "5px solid", "paddingLeft": "2px" }}>
{changepartnb_ftion && <div className="div_row_gauche pave_change_ftion" >
<div style={{ "width": "100%" }} >
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }}>
@ -1053,11 +1053,11 @@ function Abonnement(props) {
</div>
<div style={{ "width": "100%" }} id="div_nb_formation" className="mob_heigh">
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }}>
<div className = "pave_btn_enreg_new_nb_ftion" >
<Button className="btn_enreg_new_nb_ftion" onClick={make_new_abonnement} >Enregistrer </Button>
</div>
<div style={{ "textAlign": "right", "width": "50%", "float": "left" }}>
<div className = "pave_btn_annule_new_nb_ftion">
<Button className="btn_annule_new_nb_ftion" onClick={annule_enreg_new_ftion} >Annuler </Button>
</div>
</div>

View File

@ -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"
&& <Button variant="contained" color="success" className="div_row22 btn_enreg_cmd " onClick={Ordervalidation}>Confirmer la commande</Button>}
&& !stripe_existing_souscription_id
&&
<Button variant="contained" color="success" className="div_row22 btn_enreg_cmd " onClick={Ordervalidation}>Confirmer la commande</Button>}
{(String(okcommande) !== String("ko") ||
(String(props.packs).toLowerCase() === String("decouverte"))) &&
String(payment_in_process) !== "1"
&& stripe_existing_souscription_id &&
<Popup
trigger={<Button variant="contained" color="success" className="div_row22 btn_enreg_cmd "
>
Mettre à jour mon abonnement
</Button>}
modal
nested
position="center center"
>
{close => (
<div>
<button className="gest_close" onClick={close}>
&times;
</button>
<div className="gest_header"> MySy Information </div>
<div className="gest_content">
{' '}
<b>Important :</b> <br/>
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.</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
<button className="gest_bton_popup" onClick={(event) => {
Ordervalidation();
close();
}}> Valider </button>
</div>
<div style={{ "width": "45%", "float": "right" }}>
<button
className="gest_bton_popup"
onClick={() => {
close();
}}
>
Annuler
</button>
</div>
</div>
</div>
)}
</Popup>
}
{String(okcommande) === String("ko") && (String(props.packs).toLowerCase() !== String("decouverte")) &&
String(payment_in_process) !== "1"
&& <Button variant="contained" disabled className="div_row22 btn_enreg_cmd " onClick={""}>Confirmer la commande</Button>}

View File

@ -564,8 +564,8 @@ const Partner = (props) => {
<hr className="my_hr" />
{String(menu) !== "abonnement" && <div className="sousmenu" onClick={pricing_func} > MES PRIX </div>}
{String(menu) === "abonnement" && <div className="sousmenu_selected" onClick={pricing_func} > MES PRIX </div>}
{String(menu) !== "pricing" && <div className="sousmenu" onClick={pricing_func} > MES PRIX </div>}
{String(menu) === "pricing" && <div className="sousmenu_selected" onClick={pricing_func} > MES PRIX </div>}
<hr className="my_hr" />

View File

@ -254,12 +254,6 @@ function PartnerSignIn() {
<Input type="password" placeholder="Password" name="pwd_partner" />
</FormGroup>
<FormGroup >
<Label className="erreurconnexion" >Clé Secrete</Label>
<Input type="password" placeholder="Secret Secret" name="secret_partner" />
</FormGroup>
<div className="div_row22">
<Button variant="contained" color="success" className="div_row22 btn_login button" onClick={onSubmit}>Connectez-Vous</Button>

View File

@ -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;
}
}

View File

@ -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 {