From 083b5910606ca216011933fa0753ebbe4bf2fa22 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Thu, 1 Feb 2024 23:21:02 -0600 Subject: [PATCH 1/4] more --- src/Components/Account/AccountPage.js | 12 +++++++----- src/styles/buttons.scss | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Components/Account/AccountPage.js b/src/Components/Account/AccountPage.js index d88f85e..c4c95a2 100644 --- a/src/Components/Account/AccountPage.js +++ b/src/Components/Account/AccountPage.js @@ -13,8 +13,9 @@ const AccountPage = () => { const { currentUserCreatedAt } = useContext(AuthContext); const { appState } = useContext(AppContext); const { group } = appState; + console.log("group", group); const [docsGenerated, setDocsGenerated] = useState(null); - const [docsAllowed, setDocsAllowed] = useState(10); + const [docsAllowed, setDocsAllowed] = useState(group?.docsAllowed); const appUserId = group ? group.appUserId : null; const [showModal, setShowModal] = useState(false); @@ -47,19 +48,20 @@ const AccountPage = () => { setShowModal(true); try { let response = await fetch(`${apiUrl}/cancel-subscription`, { - method: 'POST', + method: "POST", headers: { - 'Content-Type': 'application/json', + "Content-Type": "application/json", }, body: JSON.stringify({ appUserId: appUserId, }), - }) + }); } catch (err) { console.log(err); } setShowModal(false); }; + const handleSupport = () => { const supReq = "5ac45d12"; navigate(`/requestpage/${supReq}`); @@ -98,7 +100,7 @@ const AccountPage = () => {
diff --git a/src/styles/buttons.scss b/src/styles/buttons.scss index e371416..a20e1d4 100644 --- a/src/styles/buttons.scss +++ b/src/styles/buttons.scss @@ -27,6 +27,10 @@ $button-padding: 0 5px; } } +.upgrade-account { + width: 190px; +} + .secondary-button { height: $button-height; padding: $button-padding; From 0a8a5450f0244e515f2fc8adf7a30e5cbec4be19 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Thu, 1 Feb 2024 23:22:35 -0600 Subject: [PATCH 2/4] more --- src/Components/Account/AccountPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Account/AccountPage.js b/src/Components/Account/AccountPage.js index c4c95a2..d8f8f62 100644 --- a/src/Components/Account/AccountPage.js +++ b/src/Components/Account/AccountPage.js @@ -221,7 +221,7 @@ const AccountPage = () => {
{group.email}
-
{telNumberFormat(group.telephone)}
+
{group.telephone}
{showModal ? ( From fcb72078bf4ccd789fb2e0716889462888693ad9 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Thu, 1 Feb 2024 23:25:21 -0600 Subject: [PATCH 3/4] more --- src/Components/Account/AccountPage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Components/Account/AccountPage.js b/src/Components/Account/AccountPage.js index d8f8f62..a6b4f6f 100644 --- a/src/Components/Account/AccountPage.js +++ b/src/Components/Account/AccountPage.js @@ -189,11 +189,11 @@ const AccountPage = () => {
Active Subscriptions
- 30 day free trial - 1 allowed document + {group.subscriptionPlan.toUpperCase()}
-
Amount:
-
Free!
+
+
{typeof currentUserCreatedAt !== "undefined" ? (
From 7d57a8990c11c7e669e2926ca217a7d6189e90b4 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Thu, 1 Feb 2024 23:26:56 -0600 Subject: [PATCH 4/4] more --- src/Components/Account/AccountPage.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Components/Account/AccountPage.js b/src/Components/Account/AccountPage.js index a6b4f6f..b461669 100644 --- a/src/Components/Account/AccountPage.js +++ b/src/Components/Account/AccountPage.js @@ -24,6 +24,12 @@ const AccountPage = () => { ? process.env.REACT_APP_API_DEV : process.env.REACT_APP_API_PROD; + const handleConfirmUpgrade = () => { + const isUpgrade = true; + const currentPlan = group?.subscriptionPlan; + navigate(`/signup/${isUpgrade}/${currentPlan}`); + }; + function getDocumentsCount() { if (!appUserId) { return; @@ -102,6 +108,7 @@ const AccountPage = () => {