@@ -41,8 +41,6 @@ const Dashboard = () => {
|
|||||||
const appUserId = group ? group.appUserId : null;
|
const appUserId = group ? group.appUserId : null;
|
||||||
const _fbAuthUid = group ? group.fbAuthUid : null;
|
const _fbAuthUid = group ? group.fbAuthUid : null;
|
||||||
const isDashboard = true;
|
const isDashboard = true;
|
||||||
console.log("group on dashbaord page", group);
|
|
||||||
console.log("auth in dashoabrd page", auth);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (count.current == null) {
|
if (count.current == null) {
|
||||||
@@ -211,23 +209,18 @@ const Dashboard = () => {
|
|||||||
<div className="dash-promo-first-wrap">
|
<div className="dash-promo-first-wrap">
|
||||||
<div className="dash-promo-first-textwrap">
|
<div className="dash-promo-first-textwrap">
|
||||||
<div className="dash-promo-first-text">
|
<div className="dash-promo-first-text">
|
||||||
<p>
|
<p className="dash-welcome-text">
|
||||||
Welcome to Novodraft, attorney {group.lastName}. We are
|
Welcome to Novodraft, attorney {group.lastName}. We are
|
||||||
excited to introduce you to our application. Review the
|
excited to introduce you to our AI application. Review the
|
||||||
step-by-step user guide by clicking "How-to" in the
|
step-by-step user guide by clicking "How-to" in the above
|
||||||
navigation bar.
|
navigation bar.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p className="dash-welcome-text">
|
||||||
{" "}
|
Your login is username: <strong>{group.email}</strong> with
|
||||||
<div>
|
a temporary password: <strong>{group.tpe}</strong>. You
|
||||||
Your login is{" "}
|
should change your password now by{" "}
|
||||||
{`username: ${group.email} - with a temporary password: ${group.tpe}.`}
|
|
||||||
</div>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
You should change your password now by{" "}
|
|
||||||
<span onClick={handleClick} className="dash-clicknow-span">
|
<span onClick={handleClick} className="dash-clicknow-span">
|
||||||
clicking here
|
clicking here.
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ const HomePage = () => {
|
|||||||
if (value.name === state) return value;
|
if (value.name === state) return value;
|
||||||
});
|
});
|
||||||
|
|
||||||
const userData = {
|
const tempData = {
|
||||||
docsAllowedPerMonth,
|
docsAllowedPerMonth,
|
||||||
docsGenerated,
|
docsGenerated,
|
||||||
appUserId,
|
appUserId,
|
||||||
@@ -96,6 +96,18 @@ const HomePage = () => {
|
|||||||
subscriptionPeriodEnd: subscriptionPeriodEnd,
|
subscriptionPeriodEnd: subscriptionPeriodEnd,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function scrubUndef(obj) {
|
||||||
|
Object.keys(obj).forEach(function (key) {
|
||||||
|
if (obj[key] === undefined) {
|
||||||
|
obj[key] = "---";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log("new object", obj);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
const userData = scrubUndef(tempData);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const usersRef = collection(db, "users");
|
const usersRef = collection(db, "users");
|
||||||
const res = await setDoc(doc(usersRef, fbAuthUid), userData);
|
const res = await setDoc(doc(usersRef, fbAuthUid), userData);
|
||||||
@@ -129,10 +141,12 @@ const HomePage = () => {
|
|||||||
const userData = await getFocusData(code);
|
const userData = await getFocusData(code);
|
||||||
console.log("userData in returned from getFocusData", userData);
|
console.log("userData in returned from getFocusData", userData);
|
||||||
const email = userData[0].email;
|
const email = userData[0].email;
|
||||||
const password = userData[0].password;
|
const password = userData[0].mspall;
|
||||||
if (email && password) {
|
if (email && password) {
|
||||||
console.log("123 email, password", email, password);
|
|
||||||
handlePromoSignup(userData, email, password);
|
handlePromoSignup(userData, email, password);
|
||||||
|
} else {
|
||||||
|
setIsBusy(false);
|
||||||
|
setShowPromoModal(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +160,6 @@ const HomePage = () => {
|
|||||||
const today = new Date();
|
const today = new Date();
|
||||||
const subscriptionCreated = today;
|
const subscriptionCreated = today;
|
||||||
const subscriptionPeriodStart = today;
|
const subscriptionPeriodStart = today;
|
||||||
console.log("subscriptionPeriodStart", subscriptionPeriodStart);
|
|
||||||
const subscriptionPeriodEnd = today;
|
const subscriptionPeriodEnd = today;
|
||||||
const subscriptionId = uuidv4();
|
const subscriptionId = uuidv4();
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dash-promo-first-box {
|
.dash-promo-first-box {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-self: center;
|
||||||
|
align-items: center;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
padding: 8px 48px;
|
padding: 8px 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-name-span {
|
.user-name-span {
|
||||||
@@ -31,13 +35,20 @@
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dash-welcome-text {
|
||||||
|
line-height: 1.5;
|
||||||
|
font-family: Roboto;
|
||||||
|
font-weight: 300;
|
||||||
|
margin-top: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.dash-promo-first-text {
|
.dash-promo-first-text {
|
||||||
font-size: 0.94rem;
|
font-size: 0.94rem;
|
||||||
letter-spacing: 0.03rem;
|
letter-spacing: 0.03rem;
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
margin-left: 16px;
|
padding: 0px 12px;
|
||||||
width: 680px;
|
width: 680px;
|
||||||
color: #3b3b3b;
|
color: #3b3b3b;
|
||||||
&.inline-text {
|
&.inline-text {
|
||||||
|
|||||||
Reference in New Issue
Block a user