more
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
isFormDataHasErrors,
|
||||
} from "../../Utils/Form";
|
||||
import { objectMap } from "../../Utils/Object";
|
||||
import { determinePlan } from "../../Utils/Miscutils";
|
||||
import { signupFields } from "../../Constants/Fields/SignupFields";
|
||||
import { paymentfields } from "../../Constants/Fields/PaymentFields";
|
||||
import { signupRadioFields } from "../../Constants/Fields/RadioFields";
|
||||
@@ -141,7 +142,7 @@ const SignupPage = () => {
|
||||
console.log(`Error saving new user to db: ${error}`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log("activeRadioOption", activeRadioOption);
|
||||
const handleProceedToPayment = (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -258,6 +259,7 @@ const SignupPage = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const planType = determinePlan(isAnnual, activeRadioOption);
|
||||
setIsBusy(true);
|
||||
|
||||
if (paymentDataValues && dataValues) {
|
||||
|
||||
33
src/Utils/Miscutils.js
Normal file
33
src/Utils/Miscutils.js
Normal file
@@ -0,0 +1,33 @@
|
||||
export const determinePlan = (isAnnual, activeRadioOption) => {
|
||||
if (isAnnual === true && activeRadioOption === "Associate") {
|
||||
return {
|
||||
planType: "Annual Assoc",
|
||||
planId: "8a7b889e-8626-4d3e-a37d-ef2a8b762419",
|
||||
};
|
||||
} else if (isAnnual === false && activeRadioOption === "Associate") {
|
||||
return {
|
||||
planType: "Monthly Assoc",
|
||||
planId: "4e177c87-d074-4409-9f5e-6358adff5017",
|
||||
};
|
||||
} else if (isAnnual === true && activeRadioOption === "Partner") {
|
||||
return {
|
||||
planType: "Annual Partner",
|
||||
planId: "45b567bc-c1fb-47dd-bfb1-c180380141bc",
|
||||
};
|
||||
} else if (isAnnual === false && activeRadioOption === "Partner") {
|
||||
return {
|
||||
planType: "Monthly Partner",
|
||||
planId: "c70bc329-9c17-4997-a7d3-fe8f62db49b0",
|
||||
};
|
||||
} else if (isAnnual === true && activeRadioOption === "Senior Partner") {
|
||||
return {
|
||||
planType: "Annual Senior Partner",
|
||||
planId: "35b3109c-5fe3-46e3-a64c-1f43fe7136c4",
|
||||
};
|
||||
} else if (isAnnual === false && activeRadioOption === "Senior Partner") {
|
||||
return {
|
||||
planType: "Monthly Senior Partner",
|
||||
planId: "a88ce618-cee2-42ae-ab4c-e404b2a5422d",
|
||||
};
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user