more
This commit is contained in:
@@ -8,12 +8,10 @@ import Row from "react-bootstrap/Row";
|
||||
import "../../styles/modals.scss";
|
||||
|
||||
const PaymentModal = ({
|
||||
buttonLabelText,
|
||||
isBusy,
|
||||
paymentData,
|
||||
paymentfields,
|
||||
handleChangePaymentInput,
|
||||
orderSummary,
|
||||
handleSignUp,
|
||||
setShowPaymentModal,
|
||||
handleSignup,
|
||||
@@ -22,14 +20,16 @@ const PaymentModal = ({
|
||||
fieldsChunkSize,
|
||||
numberOfAccountsToAdd,
|
||||
}) => {
|
||||
console.timeLog();
|
||||
const monthlyAddAccountPrice = selectedPlan[0].pricing[2].amount;
|
||||
|
||||
const monthlySubscriptionPriceToday = selectedPlan[0].pricing[0].amount;
|
||||
const annualSubscriptionPriceToday = selectedPlan[0].pricing[1].amount * 12;
|
||||
console.log("monthlySubscriptionPriceToday", monthlySubscriptionPriceToday);
|
||||
|
||||
const monthlyAddAccountPrice = selectedPlan[0].pricing[2].amount;
|
||||
const annualAddAccountPrice = monthlyAddAccountPrice * 12;
|
||||
const additionalAccountsMonthlyPriceToday =
|
||||
selectedPlan[0].pricing[2].amount * numberOfAccountsToAdd;
|
||||
|
||||
const additionalAccountsAnnualPriceToday =
|
||||
additionalAccountsMonthlyPriceToday * 12;
|
||||
|
||||
const showAdditionaLAccountsView =
|
||||
(selectedPlan[0]?.value === "partner" && numberOfAccountsToAdd > 0) ||
|
||||
@@ -62,8 +62,18 @@ const PaymentModal = ({
|
||||
{billingPeriod} - ${amountToday}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="payment-modal-text-wrapper">
|
||||
<div className="paymodal-summary-right">Addiitonal accounts:</div>
|
||||
<div className="paymodal-summary-left">
|
||||
{isAnnual
|
||||
? additionalAccountsAnnualPriceToday
|
||||
: additionalAccountsMonthlyPriceToday}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="payment-modal-text-wrapper">
|
||||
<div className="paymodal-summary-right">Total today:</div>
|
||||
<div className="paymodal-summary-left"></div>
|
||||
</div>
|
||||
{isAnnual ? (
|
||||
@@ -82,6 +92,11 @@ const PaymentModal = ({
|
||||
<div className="paymodal-summary-right">
|
||||
Additional Accounts:
|
||||
</div>
|
||||
<div className="paymodal-summary-left">
|
||||
{isAnnual
|
||||
? additionalAccountsAnnualPriceToday
|
||||
: additionalAccountsMonthlyPriceToday}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<></>
|
||||
|
||||
@@ -58,11 +58,12 @@ const SignupPage = () => {
|
||||
};
|
||||
|
||||
const handleChangeAccountSelect = (e, name) => {
|
||||
console.log("e, name", e, name);
|
||||
console.log("~~~~~~~~~~~~~~e.target.value, name", e.target.value, name);
|
||||
const num = e.target.value;
|
||||
setNumberOfAccountsToAdd(num);
|
||||
const temp = Number(num);
|
||||
setNumberOfAccountsToAdd(temp);
|
||||
};
|
||||
|
||||
console.log("numberOfAccountsToAdd", numberOfAccountsToAdd);
|
||||
const handleChangePaymentInput = (e, name) => {
|
||||
const newPaymentData = handleFormDataChange(
|
||||
e,
|
||||
|
||||
Reference in New Issue
Block a user