From 73838bdad90781dfdc22a9464f086f9396829197 Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 29 Sep 2020 10:45:30 -0400 Subject: [PATCH] fix: sign up and payment check stuff --- src/_pages/Layout.vue | 11 +++++++- src/_pages/main/Layout.vue | 39 ++++------------------------- src/_pages/main/bubble/Networks.vue | 4 +-- src/_router/index.js | 31 ----------------------- src/_store/account.module.js | 34 ++++++++++++++++++------- 5 files changed, 41 insertions(+), 78 deletions(-) diff --git a/src/_pages/Layout.vue b/src/_pages/Layout.vue index 0b472f0..6080b01 100644 --- a/src/_pages/Layout.vue +++ b/src/_pages/Layout.vue @@ -33,6 +33,7 @@ export default { sendMetrics: true, }, payMethods: null, + hasPaymentMethod: false, }), computed: { @@ -42,7 +43,14 @@ export default { isPageAvailable() { return ( - !this.currentUser || (this.verifiedContacts || this.currentUser.admin) + !this.currentUser || + ((this.verifiedContacts || + this.currentUser.admin || + this.$route.path === '/verifyEmail' || + this.$route.path === '/me/action') && + (!this.configs.paymentsEnabled || + this.hasPaymentMethod === true || + this.$route.path === '/payment')) ); }, }, @@ -162,6 +170,7 @@ export default { this.accountPlan.paymentMethodObject.uuid === null && payMethods.length > 0 ) { + this.hasPaymentMethod = true; this.navigateToDashboard(); } else { this.navigateToPaymentPage(); diff --git a/src/_pages/main/Layout.vue b/src/_pages/main/Layout.vue index 35a941a..6492fef 100644 --- a/src/_pages/main/Layout.vue +++ b/src/_pages/main/Layout.vue @@ -1,13 +1,13 @@