This commit is contained in:
Kenneth Jannette
2024-03-25 20:41:40 -05:00
parent b10811e3a7
commit 39d3fdfada
3 changed files with 36 additions and 19 deletions

View File

@@ -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>

View File

@@ -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();