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