-
+
{{ user.data.meta.usages.costEstimate }}
diff --git a/resources/js/components/Subscription/SelectPlanSubscriptionPopup.vue b/resources/js/components/Subscription/SelectPlanSubscriptionPopup.vue
index 54f20176..df2051c4 100644
--- a/resources/js/components/Subscription/SelectPlanSubscriptionPopup.vue
+++ b/resources/js/components/Subscription/SelectPlanSubscriptionPopup.vue
@@ -114,9 +114,8 @@
v-for="(plan, i) in plans.data"
:plan="plan"
:key="plan.data.id"
- v-if="
- plan.data.attributes.interval === intervalPlanType && userSubscribedPlanId !== plan.data.id
- "
+ v-if="plan.data.attributes.interval === intervalPlanType"
+ :class="{'opacity-50 pointer-events-none': userSubscribedPlanId === plan.data.id}"
:is-selected="selectedPlan && selectedPlan.data.id === plan.data.id"
@click.native="selectPlan(plan)"
/>
@@ -281,6 +280,9 @@ export default {
type: 'success',
message: this.$t('Your payment was successfully received.'),
})
+
+ // todo: temporary reload function
+ setTimeout(() => document.location.reload(), 1000)
},
paystackClosed() {
// ...
diff --git a/resources/js/components/Subscription/UserEditSubscription.vue b/resources/js/components/Subscription/UserEditSubscription.vue
index 1de647aa..39fcd49c 100644
--- a/resources/js/components/Subscription/UserEditSubscription.vue
+++ b/resources/js/components/Subscription/UserEditSubscription.vue
@@ -90,9 +90,7 @@ export default {
.post('/api/subscriptions/cancel')
.then(() => {
// Update user data
- this.$store.dispatch('getAppData').then(() => {
- this.fetchSubscriptionDetail()
- })
+ this.$store.dispatch('getAppData')
events.$emit('toaster', {
type: 'success',
diff --git a/resources/js/store/modules/userAuth.js b/resources/js/store/modules/userAuth.js
index b9604ae6..27468cfc 100644
--- a/resources/js/store/modules/userAuth.js
+++ b/resources/js/store/modules/userAuth.js
@@ -37,13 +37,26 @@ const actions = {
})
}, 300)
- axios.post('/logout').then(() => {
- clearTimeout(popup)
- commit('DESTROY_DATA')
- commit('SET_AUTHORIZED', false)
+ axios
+ .post('/logout')
+ .then(() => {
+ clearTimeout(popup)
- router.push({ name: 'Homepage' })
- })
+ commit('DESTROY_DATA')
+ commit('SET_AUTHORIZED', false)
+
+ router.push({name: 'Homepage'})
+ })
+ .catch((error) => {
+ if (error.response.status === 419) {
+ clearTimeout(popup)
+
+ commit('DESTROY_DATA')
+ commit('SET_AUTHORIZED', false)
+
+ router.push({name: 'Homepage'})
+ }
+ })
},
socialiteRedirect: ({ commit }, provider) => {
axios
diff --git a/resources/js/views/Admin/PaymentSettings/PaymentSettingsTab/Payments.vue b/resources/js/views/Admin/PaymentSettings/PaymentSettingsTab/Payments.vue
index 7ed01470..c7bacc23 100644
--- a/resources/js/views/Admin/PaymentSettings/PaymentSettingsTab/Payments.vue
+++ b/resources/js/views/Admin/PaymentSettings/PaymentSettingsTab/Payments.vue
@@ -650,7 +650,7 @@ export default {
})
},
getWebhookEndpoint(service) {
- return `${this.config.host}/api/subscriptions/${service}/webhook`
+ return `${this.config.host}/api/subscriptions/${service}/webhooks`
},
},
created() {