fix: default subscription interval in servers upgrade modal wrapper (#4585)

This commit is contained in:
Calum H.
2025-10-20 00:16:13 +01:00
committed by GitHub
parent 7796273529
commit 12940fc207
2 changed files with 26 additions and 2 deletions

17
.vscode/settings.json vendored
View File

@@ -11,5 +11,20 @@
"source.fixAll.eslint": "explicit", "source.fixAll.eslint": "explicit",
"source.organizeImports": "always" "source.organizeImports": "always"
}, },
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode",
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
} }

View File

@@ -158,6 +158,15 @@ const currentPlanFromSubscription = computed<ServerPlan | undefined>(() => {
: 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> { async function initiatePayment(body: any): Promise<any> {
if (subscription.value) { if (subscription.value) {
const transformedBody = { const transformedBody = {
@@ -247,7 +256,7 @@ async function open(id?: string) {
subscription.value = null subscription.value = null
} }
purchaseModal.value?.show('quarterly') purchaseModal.value?.show(currentInterval.value)
} }
defineExpose({ defineExpose({