Fix QA issues

This commit is contained in:
Prospector 2025-06-03 11:09:22 -07:00
parent 63b15ded60
commit 6ca8a4e5fd
3 changed files with 16 additions and 6 deletions

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, computed, useTemplateRef, nextTick } from 'vue'
import { ref, computed, useTemplateRef, nextTick, watch } from 'vue'
import NewModal from '../modal/NewModal.vue'
import { type MessageDescriptor, useVIntl, defineMessage } from '@vintl/vintl'
import {
@ -194,6 +194,10 @@ async function setStep(step: Step | undefined, skipValidation = false) {
}
}
watch(selectedPlan, () => {
console.log(selectedPlan.value)
})
function begin(interval: ServerBillingInterval, plan?: ServerPlan) {
loading.value = false
selectedPlan.value = plan

View File

@ -82,11 +82,15 @@ function updateRamStock(regionToCheck: string, newRam: number) {
}
watch(selectedRam, (newRam: number) => {
updateRamStock(selectedRegion.value, newRam)
if (props.custom && selectedRegion.value) {
updateRamStock(selectedRegion.value, newRam)
}
})
watch(selectedRegion, (newRegion: number) => {
updateRamStock(newRegion, selectedRam.value)
watch(selectedRegion, (newRegion: string | undefined) => {
if (props.custom && newRegion) {
updateRamStock(newRegion, selectedRam.value)
}
})
const currentStock = ref<{ [region: string]: number }>({})
@ -154,7 +158,9 @@ onMounted(() => {
: firstWithStock?.shortcode
}
selectedRegion.value = stockedRegion
updateRamStock(stockedRegion, minRam.value)
if (props.custom && stockedRegion) {
updateRamStock(stockedRegion, minRam.value)
}
loading.value = false
})
})

View File

@ -186,7 +186,7 @@ function setInterval(newInterval: ServerBillingInterval) {
>{{
formatPrice(
locale,
prices?.prices?.intervals?.['quarterly'] ?? 0 / monthsInInterval['quarterly'],
(prices?.prices?.intervals?.['quarterly'] ?? 0) / monthsInInterval['quarterly'],
currency,
true,
)