From f357275fd3a650c3931c49fe671b9036bb20e0d3 Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Tue, 25 Feb 2025 10:07:59 -0800 Subject: [PATCH] Fix upgrades being allowed when out of stock (#3307) --- packages/ui/src/components/billing/PurchaseModal.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/ui/src/components/billing/PurchaseModal.vue b/packages/ui/src/components/billing/PurchaseModal.vue index 9f986ddc..8878d76d 100644 --- a/packages/ui/src/components/billing/PurchaseModal.vue +++ b/packages/ui/src/components/billing/PurchaseModal.vue @@ -709,7 +709,7 @@ const customNotAllowedToContinue = computed( (!customMatchingProduct.value || customLoading.value || customOutOfStock.value), ) const upgradeNotAllowedToContinue = computed( - () => props.existingSubscription && (!hasUpgradeCapacityForConfig.value || customLoading.value), + () => props.existingSubscription && (customOutOfStock.value || customLoading.value), ) const customServerConfig = reactive({ @@ -1009,11 +1009,6 @@ async function submitPayment() { paymentLoading.value = false } -const hasUpgradeCapacityForConfig = computed(() => { - // TODO: Check for upgrade capacity here when Pyro provides route - return props.existingPlan -}) - defineExpose({ show: () => { if (props.customServer) {