You've already forked AstralRinth
forked from didirus/AstralRinth
fix: default subscription interval in servers upgrade modal wrapper (#4585)
This commit is contained in:
@@ -158,6 +158,15 @@ const currentPlanFromSubscription = computed<ServerPlan | undefined>(() => {
|
||||
: undefined
|
||||
})
|
||||
|
||||
const currentInterval = computed(() => {
|
||||
const interval = subscription.value?.interval
|
||||
|
||||
if (interval === 'monthly' || interval === 'quarterly') {
|
||||
return interval
|
||||
}
|
||||
return 'monthly'
|
||||
})
|
||||
|
||||
async function initiatePayment(body: any): Promise<any> {
|
||||
if (subscription.value) {
|
||||
const transformedBody = {
|
||||
@@ -247,7 +256,7 @@ async function open(id?: string) {
|
||||
subscription.value = null
|
||||
}
|
||||
|
||||
purchaseModal.value?.show('quarterly')
|
||||
purchaseModal.value?.show(currentInterval.value)
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
||||
Reference in New Issue
Block a user