Merge pull request #54 from kjannette/moInt2

Mo int2
This commit is contained in:
S Jannette
2024-01-28 17:47:51 -06:00
committed by GitHub
4 changed files with 74 additions and 66 deletions

View File

@@ -25,8 +25,8 @@ const PaymentModal = ({
const monthlyAddAccountPrice = selectedPlan[0].pricing[2].amount; const monthlyAddAccountPrice = selectedPlan[0].pricing[2].amount;
const annualAddAccountPrice = monthlyAddAccountPrice * 12; const annualAddAccountPrice = monthlyAddAccountPrice * 12;
const showAdditionaLAccountsView = const showAdditionaLAccountsView =
selectedPlan[0]?.value === "partner" || (selectedPlan[0]?.value === "partner" && numberOfAccountsToAdd > 0) ||
selectedPlan[0]?.value === "seniorPartner"; (selectedPlan[0]?.value === "seniorPartner" && numberOfAccountsToAdd > 0);
const planName = selectedPlan[0].name ? selectedPlan[0].name : null; const planName = selectedPlan[0].name ? selectedPlan[0].name : null;
const billingPeriod = isAnnual ? "Annually" : "Monthly"; const billingPeriod = isAnnual ? "Annually" : "Monthly";
const amountToday = isAnnual const amountToday = isAnnual
@@ -34,6 +34,7 @@ const PaymentModal = ({
: selectedPlan[0]?.pricing[1]?.amount; : selectedPlan[0]?.pricing[1]?.amount;
console.log("annualAddAccountPrice", annualAddAccountPrice); console.log("annualAddAccountPrice", annualAddAccountPrice);
console.log("isAnnual", isAnnual); console.log("isAnnual", isAnnual);
console.log("numberOfAccountsToAdd", numberOfAccountsToAdd);
return ( return (
<Modal show="true" size="lg"> <Modal show="true" size="lg">
<Modal.Header className="payment-modal-header" closeButton> <Modal.Header className="payment-modal-header" closeButton>
@@ -65,7 +66,7 @@ const PaymentModal = ({
{isAnnual ? ( {isAnnual ? (
<p> <p>
{" "} {" "}
{numberOfAccountsToAdd}/per year = $ {numberOfAccountsToAdd}/ x 12 months = $
{annualAddAccountPrice} {annualAddAccountPrice}
</p> </p>
) : ( ) : (

View File

@@ -206,6 +206,12 @@ const SignupPage = () => {
setShowPaymentModal(true); setShowPaymentModal(true);
}; };
const handleAdd = () => {
//add accounts, close section
setShowAddAccount(!showAddAccount);
setShowPaymentModal(true);
};
const handleOpenSelectPlan = (e) => { const handleOpenSelectPlan = (e) => {
e.preventDefault(); e.preventDefault();
if (isBusy) { if (isBusy) {
@@ -249,11 +255,6 @@ const SignupPage = () => {
setShowAddAccount(!showAddAccount); setShowAddAccount(!showAddAccount);
}; };
const handleAdd = () => {
//add accounts, close sectin
setShowAddAccount(!showAddAccount);
};
// ******************** STRIPE PAY API CALL ******************** // // ******************** STRIPE PAY API CALL ******************** //
async function handleStripeAuthorization( async function handleStripeAuthorization(
user, user,
@@ -374,8 +375,8 @@ const SignupPage = () => {
const showNoticeOnPage = "" !== notice && !showPaymentModal; const showNoticeOnPage = "" !== notice && !showPaymentModal;
const addAccountCopy = const addAccountCopy =
selectedPlan[0]?.value === "seniorPartner" selectedPlan[0]?.value === "seniorPartner"
? "Add up to eight additional accounts to your subscripton" ? "Add up to eight"
: "Add up to two additional accounts to your subscripton"; : "Add up to two";
const showAddAccountBtn = const showAddAccountBtn =
selectedPlan[0].value === "seniorPartner" || selectedPlan[0].value === "seniorPartner" ||
selectedPlan[0].value === "partner"; selectedPlan[0].value === "partner";
@@ -506,20 +507,17 @@ const SignupPage = () => {
))} ))}
</div> </div>
{showAddAccount ? ( {showAddAccount ? (
<div className="show-addaccount-wrapper">
<div className="show-addaccount-container"> <div className="show-addaccount-container">
{" "}
<div className="plan-header-right-lower"> <div className="plan-header-right-lower">
<h5 className="signup-button-wrapper-text"> <h5 className="signup-button-wrapper-text">
Add additional accounts Add additional accounts
</h5> </h5>
<p className="signup-accounts-info"> <p className="signup-accounts-info">
account username(s) and access will be setup later User profiles will be setup later
</p> </p>
</div> </div>
<div className="signup-select-wrapper"> <div className="signup-select-wrapper">
<div className="add-account-copy-wrapper">
<div className="add-acctwrapz">{addAccountCopy}</div>
</div>
<div className="signup-select-box"> <div className="signup-select-box">
<select <select
id="accountNo" id="accountNo"
@@ -562,6 +560,7 @@ const SignupPage = () => {
</div> </div>
</div> </div>
</div> </div>
</div>
) : ( ) : (
<></> <></>
)} )}

View File

@@ -110,5 +110,5 @@
.payment-summary-header { .payment-summary-header {
border-bottom: 1px solid #cecece; border-bottom: 1px solid #cecece;
margin-bottom: 12px; margin-bottom: 4px;
} }

View File

@@ -84,11 +84,12 @@
width: 50%; width: 50%;
} }
.plan-header-right-low { .plan-header-right-lower {
display: flex; display: flex;
flex-direction: row; flex-direction: column;
padding: 12px 14px; justify-content: center;
width: 100%; margin-left: auto;
margin-right: auto;
} }
.plan-header-left { .plan-header-left {
@@ -207,11 +208,19 @@
margin-top: 25px; margin-top: 25px;
} }
.show-addaccount-wrapper {
display: flex;
flex-direction: row;
justify-content: flex-end;
width: 100%;
}
.show-addaccount-container { .show-addaccount-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 880px; width: 578px;
min-height: 200px; min-height: 200px;
margin-right: 14px;
padding: 12px; padding: 12px;
border-radius: 10px; border-radius: 10px;
background-color: #fff; background-color: #fff;
@@ -221,8 +230,8 @@
.signup-accounts-info { .signup-accounts-info {
font-weight: 300; font-weight: 300;
font-size: 0.93rem; font-size: 0.93rem;
margin-top: 0px; margin-left: auto;
margin-left: 5px; margin-right: auto;
} }
.signup-select-wrapper { .signup-select-wrapper {
@@ -234,7 +243,7 @@
} }
.signup-select-box { .signup-select-box {
width: 90px; width: 230px;
margin-left: auto; margin-left: auto;
margin-top: 12px; margin-top: 12px;
margin-bottom: 12px; margin-bottom: 12px;
@@ -247,7 +256,6 @@
.add-account-copy-wrapper { .add-account-copy-wrapper {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
width: 800px;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
margin-right: 12px; margin-right: 12px;