@@ -13,6 +13,7 @@ import { v4 as uuidv4 } from "uuid";
|
|||||||
import { collection, setDoc, doc } from "firebase/firestore";
|
import { collection, setDoc, doc } from "firebase/firestore";
|
||||||
import LoadingSpinner from "../../pageElements/LoadingSpinner";
|
import LoadingSpinner from "../../pageElements/LoadingSpinner";
|
||||||
import { splitEvery } from "../../Utils/Array";
|
import { splitEvery } from "../../Utils/Array";
|
||||||
|
import { ArrowLeftSquare, ArrowRightSquare } from "react-bootstrap-icons";
|
||||||
import {
|
import {
|
||||||
getFormDataDefaults,
|
getFormDataDefaults,
|
||||||
getValidatedFormData,
|
getValidatedFormData,
|
||||||
@@ -62,6 +63,8 @@ const SignupPage = () => {
|
|||||||
const [showPromoModal, setShowPromoModal] = useState(false);
|
const [showPromoModal, setShowPromoModal] = useState(false);
|
||||||
const [issueText, setIssueText] = useState("");
|
const [issueText, setIssueText] = useState("");
|
||||||
const [isAnnual, setIsAnnual] = useState(1);
|
const [isAnnual, setIsAnnual] = useState(1);
|
||||||
|
const [valX, setValX] = useState(1);
|
||||||
|
const [valY, setValY] = useState(4);
|
||||||
|
|
||||||
const handleChangeInput = (e, name) => {
|
const handleChangeInput = (e, name) => {
|
||||||
const newData = handleFormDataChange(e, name, data, signupFields);
|
const newData = handleFormDataChange(e, name, data, signupFields);
|
||||||
@@ -105,6 +108,28 @@ const SignupPage = () => {
|
|||||||
setActiveRadioOption(tempPlan[0].value);
|
setActiveRadioOption(tempPlan[0].value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleLeftArrowClick = () => {
|
||||||
|
if (valX == 0) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
const tempx = valX - 1;
|
||||||
|
const tempy = valY - 1;
|
||||||
|
setValX(tempx);
|
||||||
|
setValY(tempy);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleRightArrowClick = () => {
|
||||||
|
if (valX == 1) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
const tempx = valX + 1;
|
||||||
|
const tempy = valY + 1;
|
||||||
|
setValX(tempx);
|
||||||
|
setValY(tempy);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const vals = [
|
const vals = [
|
||||||
[1, 2, 3, 4, 5, 6, 7, 8],
|
[1, 2, 3, 4, 5, 6, 7, 8],
|
||||||
[1, 2],
|
[1, 2],
|
||||||
@@ -287,7 +312,7 @@ const SignupPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleToggle = (val) => setIsAnnual(val);
|
const handleToggle = (val) => setIsAnnual(val);
|
||||||
console.log("isAnnual", isAnnual);
|
|
||||||
const handleAddAccounts = () => {
|
const handleAddAccounts = () => {
|
||||||
setShowAddAccount(!showAddAccount);
|
setShowAddAccount(!showAddAccount);
|
||||||
};
|
};
|
||||||
@@ -439,7 +464,7 @@ const SignupPage = () => {
|
|||||||
const today = new Date();
|
const today = new Date();
|
||||||
const subscriptionCreated = today;
|
const subscriptionCreated = today;
|
||||||
const subscriptionPeriodStart = today;
|
const subscriptionPeriodStart = today;
|
||||||
const subscriptionPeriodEnd = "it edns whatever"; //today.setDate(today.getDate() + 30);
|
const subscriptionPeriodEnd = "it ends whatever"; //today.setDate(today.getDate() + 30);
|
||||||
const subscriptionId = uuidv4();
|
const subscriptionId = uuidv4();
|
||||||
|
|
||||||
const userCredential = await createUserWithEmailAndPassword(
|
const userCredential = await createUserWithEmailAndPassword(
|
||||||
@@ -609,8 +634,19 @@ const SignupPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="radio-group-super">
|
||||||
|
<div className="toggle-arrow-box">
|
||||||
|
<ArrowLeftSquare
|
||||||
|
className="arrow-left-toggle"
|
||||||
|
color="#f7c697"
|
||||||
|
size="30px"
|
||||||
|
onClick={handleLeftArrowClick}
|
||||||
|
style={{ marginTop: "-25px" }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div className="radio-group-box">
|
<div className="radio-group-box">
|
||||||
{signupRadioFields?.map((option, index) => (
|
{signupRadioFields?.slice(valX, valY).map((option, index) => (
|
||||||
<div className="signup-radio-container">
|
<div className="signup-radio-container">
|
||||||
<Radio
|
<Radio
|
||||||
onClick={handleChangeRadioInput}
|
onClick={handleChangeRadioInput}
|
||||||
@@ -629,6 +665,16 @@ const SignupPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
<div className="toggle-arrow-box">
|
||||||
|
<ArrowRightSquare
|
||||||
|
className="arrow-left-toggle"
|
||||||
|
color="#f7c697"
|
||||||
|
size="30px"
|
||||||
|
onClick={handleRightArrowClick}
|
||||||
|
style={{ marginTop: "-25px" }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{showAddAccount && !isBusy ? (
|
{showAddAccount && !isBusy ? (
|
||||||
<div className="show-addaccount-wrapper">
|
<div className="show-addaccount-wrapper">
|
||||||
<div className="show-addaccount-container">
|
<div className="show-addaccount-container">
|
||||||
@@ -758,24 +804,3 @@ const SignupPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default SignupPage;
|
export default SignupPage;
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
|
|
||||||
const userDataValues = {
|
|
||||||
barNumber: "232323",
|
|
||||||
city: "broolyn",
|
|
||||||
email: "j@s.com",
|
|
||||||
firm: "asdf",
|
|
||||||
firstName: "ghghg",
|
|
||||||
lastName: "hhhhh",
|
|
||||||
password: "123344556",
|
|
||||||
practiceArea: "dfdfdf",
|
|
||||||
state: "New York",
|
|
||||||
streetAddress: "123 Main",
|
|
||||||
telephone: "(313) 555-5555",
|
|
||||||
zipCode: "12345",
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -1,4 +1,21 @@
|
|||||||
export const signupRadioFields = [
|
export const signupRadioFields = [
|
||||||
|
{
|
||||||
|
name: "Of Counsel",
|
||||||
|
label: "Of Counsel",
|
||||||
|
value: "ofCounsel",
|
||||||
|
description: [
|
||||||
|
"One document/one-time fee",
|
||||||
|
"Documents conform with state rules",
|
||||||
|
"Intellidraft AI - downloadable document in minutes",
|
||||||
|
"24/7 support",
|
||||||
|
],
|
||||||
|
details: "",
|
||||||
|
docsAllowedPerMonth: 1,
|
||||||
|
pricing: [
|
||||||
|
{ type: "monthly", amount: 59 },
|
||||||
|
{ type: "annDiscount", amount: 59 },
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Associate",
|
name: "Associate",
|
||||||
label: "Associate",
|
label: "Associate",
|
||||||
@@ -6,9 +23,10 @@ export const signupRadioFields = [
|
|||||||
description: [
|
description: [
|
||||||
"1 document per month",
|
"1 document per month",
|
||||||
"Carryover 1 unused document each subscription period",
|
"Carryover 1 unused document each subscription period",
|
||||||
"Documents conforming with state rules",
|
"Documents conform with state rules",
|
||||||
|
"Intellidraft AI - downloadable document in minutes",
|
||||||
"24/7 support",
|
"24/7 support",
|
||||||
"First month free!",
|
"First month is free!",
|
||||||
],
|
],
|
||||||
details: "",
|
details: "",
|
||||||
docsAllowedPerMonth: 1,
|
docsAllowedPerMonth: 1,
|
||||||
@@ -25,7 +43,8 @@ export const signupRadioFields = [
|
|||||||
description: [
|
description: [
|
||||||
"3 documents per month",
|
"3 documents per month",
|
||||||
"Carryover 1 unused document per month",
|
"Carryover 1 unused document per month",
|
||||||
"Documents conforming with state rules",
|
"Documents conform with state rules",
|
||||||
|
"Intellidraft AI - downloadable document in minutes",
|
||||||
"Up to 2 additional accounts: $49/each",
|
"Up to 2 additional accounts: $49/each",
|
||||||
"24/7 support",
|
"24/7 support",
|
||||||
],
|
],
|
||||||
@@ -43,7 +62,8 @@ export const signupRadioFields = [
|
|||||||
value: "seniorPartner",
|
value: "seniorPartner",
|
||||||
description: [
|
description: [
|
||||||
"Unlimited documents.",
|
"Unlimited documents.",
|
||||||
"Documents conforming with state rules",
|
"Documents conform with state rules",
|
||||||
|
"Intellidraft AI - downloadable document in minutes",
|
||||||
"24/7 Triage-level support response",
|
"24/7 Triage-level support response",
|
||||||
"Up to 8 additional accounts at $39/each",
|
"Up to 8 additional accounts at $39/each",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -34,16 +34,16 @@ const Radio = (props) => {
|
|||||||
>
|
>
|
||||||
{value == activeRadioOption && !isUpgrade ? (
|
{value == activeRadioOption && !isUpgrade ? (
|
||||||
<div className="radio-circle-box">
|
<div className="radio-circle-box">
|
||||||
<CircleFill color="#1a76c7" size="20px" />
|
<CircleFill color="#1a76c7" size="14px" />
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="radio-circle-box">
|
<div className="radio-circle-box">
|
||||||
<Circle color="#1a76c7" size="20px" />
|
<Circle color="#1a76c7" size="14px" />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="radio-name-box"> {`${name}`} </div>
|
<div className="radio-name-box"> {`${name}`} </div>
|
||||||
<div className="radio-price-box">
|
<div className="radio-price-box">
|
||||||
{parentIndex > 2 ? (
|
{value === "ofCounsel" ? (
|
||||||
<div className="radio-price">
|
<div className="radio-price">
|
||||||
{`$${price[index]["amount"]}/doc`}
|
{`$${price[index]["amount"]}/doc`}
|
||||||
</div>
|
</div>
|
||||||
@@ -58,7 +58,7 @@ const Radio = (props) => {
|
|||||||
<div className="radio-description-box">
|
<div className="radio-description-box">
|
||||||
{description.map((item, i) => {
|
{description.map((item, i) => {
|
||||||
const el =
|
const el =
|
||||||
item == "First month free!" && !isUpgrade ? (
|
item == "First month is free!" && !isUpgrade ? (
|
||||||
<div className="offer-div">
|
<div className="offer-div">
|
||||||
<p className="signup-feat-item-bold">{item}</p>
|
<p className="signup-feat-item-bold">{item}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,31 +1,37 @@
|
|||||||
.radio-circle-container {
|
.radio-circle-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
&.upgrade {
|
&.upgrade {
|
||||||
background-color: rgb(149, 149, 149);
|
background-color: rgb(149, 149, 149);
|
||||||
}
|
}
|
||||||
&.not-upgrade {
|
&.not-upgrade {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
height: 290px;
|
height: 345px;
|
||||||
margin: 10px 8px 0px 8px;
|
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: 1px solid #d4d4d4;
|
border: 1px solid #d4d4d4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-circle-top {
|
.radio-circle-top {
|
||||||
|
width: 248px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
margin-top: 12px;
|
margin-top: 18px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
|
border: 1px solid var(--accent-orange-light);
|
||||||
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-circle-lower {
|
.radio-circle-lower {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-left: 12px;
|
justify-content: center;
|
||||||
padding-left: 12px;
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-circle-box {
|
.radio-circle-box {
|
||||||
|
|||||||
@@ -58,22 +58,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.signup-button-box {
|
.signup-button-box {
|
||||||
width: 100%;
|
width: 830px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding-right: 14px;
|
padding-right: 24px;
|
||||||
margin-top: 28px;
|
margin-top: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.signup-freebie-box {
|
.signup-freebie-box {
|
||||||
width: 100%;
|
width: 830px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding-right: 22px;
|
padding-right: 20px;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
margin-right: 16px;
|
||||||
font-size: 1.15rem;
|
font-size: 1.15rem;
|
||||||
color: #2759ff;
|
color: #2759ff;
|
||||||
}
|
}
|
||||||
@@ -86,7 +87,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
height: 55px;
|
height: 55px;
|
||||||
width: 900px;
|
width: 830px;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plan-header-right {
|
.plan-header-right {
|
||||||
@@ -115,9 +117,13 @@
|
|||||||
.select-plan-container {
|
.select-plan-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
width: 920px;
|
width: 920px;
|
||||||
min-height: 510px;
|
min-height: 540px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: rgb(240, 247, 250);
|
background-color: rgb(240, 247, 250);
|
||||||
border: 1px solid #e9e9e9;
|
border: 1px solid #e9e9e9;
|
||||||
@@ -164,13 +170,28 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.radio-group-super {
|
||||||
|
width: 912px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
.radio-group-box {
|
.radio-group-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
justify-content: center;
|
||||||
justify-content: flex-end;
|
padding: 2px;
|
||||||
padding: 6px;
|
width: 815px;
|
||||||
width: 100%;
|
}
|
||||||
|
|
||||||
|
.toggle-arrow-box {
|
||||||
|
width: 30px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-plan-summary-box {
|
.select-plan-summary-box {
|
||||||
@@ -197,8 +218,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.signup-radio-container {
|
.signup-radio-container {
|
||||||
width: 300px;
|
width: 270px;
|
||||||
height: 100%;
|
margin: 0px 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.signup-feat-item {
|
.signup-feat-item {
|
||||||
@@ -217,11 +238,13 @@
|
|||||||
.offer-div {
|
.offer-div {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
|
||||||
height: 30px;
|
height: 30px;
|
||||||
border: 1px solid #fdbe72;
|
border: 1px solid #fdbe72;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
width: 220px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.show-addaccount-wrapper {
|
.show-addaccount-wrapper {
|
||||||
|
|||||||
Reference in New Issue
Block a user