This commit is contained in:
Kenneth Jannette
2024-02-01 16:51:13 -06:00
parent c29913b128
commit 01fa0316d0
2 changed files with 23 additions and 4 deletions

View File

@@ -18,8 +18,10 @@ import {
isFormDataHasErrors, isFormDataHasErrors,
} from "../../Utils/Form"; } from "../../Utils/Form";
import { objectMap } from "../../Utils/Object"; import { objectMap } from "../../Utils/Object";
import { determinePlan } from "../../Utils/Miscutils"; import {
import { signupFields } from "../../Constants/Fields/SignupFields"; signupFields,
stateDataValues,
} from "../../Constants/Fields/SignupFields";
import { paymentfields } from "../../Constants/Fields/PaymentFields"; import { paymentfields } from "../../Constants/Fields/PaymentFields";
import { signupRadioFields } from "../../Constants/Fields/RadioFields"; import { signupRadioFields } from "../../Constants/Fields/RadioFields";
import PaymentModal from "../Modals/PaymentModal"; import PaymentModal from "../Modals/PaymentModal";
@@ -152,8 +154,15 @@ const SignupPage = () => {
const fbAuthUid = authId; const fbAuthUid = authId;
const plan = selectedPlan; const plan = selectedPlan;
const docsAllowed = const docsAllowed =
plan === "associate" ? 1 : plan === "partner" ? 3 : "unlimited"; plan === "associate"
? 1
: plan === "partner"
? 3
: plan === "unlimited"
? 4000
: 0;
const docsGenerated = 0; const docsGenerated = 0;
const { const {
firstName, firstName,
lastName, lastName,
@@ -168,6 +177,10 @@ const SignupPage = () => {
email, email,
} = dataValues; } = dataValues;
const userState = stateDataValues.filter((value) => {
if (value.name === state) return value;
});
const userData = { const userData = {
docsAllowed, docsAllowed,
docsGenerated, docsGenerated,
@@ -180,7 +193,7 @@ const SignupPage = () => {
telephone, telephone,
streetAddress, streetAddress,
city, city,
state, state: userState,
zipCode, zipCode,
barNumber, barNumber,
practiceArea, practiceArea,

View File

@@ -52,3 +52,9 @@ export const signupFields = {
type: "confirmPassword", type: "confirmPassword",
}, },
}; };
export const stateDataValues = [
{ name: "Florida", value: "florida", code: "fl" },
{ name: "New York", value: "newYork", code: "ny" },
{ name: "New Jersey", value: "newJersey", code: "nj" },
];