fix: logic breaking on self-hosted instances.

This commit is contained in:
Darshan
2026-01-27 13:20:44 +05:30
parent 067d10ba2b
commit a8ea4150b9
4 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -253,7 +253,7 @@
let badgeType: 'success' | undefined;
$: badgeType =
$organization && $organization.billingPlanDetails.group !== BillingPlanGroup.Starter
$organization && $organization?.billingPlanDetails?.group !== BillingPlanGroup.Starter
? 'success'
: undefined;
</script>
+1
View File
@@ -302,6 +302,7 @@ export function checkForProjectLimitation(plan: string, id: PlanServices) {
export function isServiceLimited(serviceId: PlanServices, plan: string, total: number) {
if (!total) return false;
if (!plan) return false;
const limit = getServiceLimit(serviceId) || Infinity;
const isLimited = limit !== 0 && limit < Infinity;
const hasUsageFees = checkForUsageFees(plan, serviceId);
@@ -44,7 +44,7 @@
// Calculate if button should be disabled and tooltip should show
$: memberCount = data.organizationMembers?.total ?? 0;
$: supportsMembers = $organization?.billingPlanDetails.addons.seats;
$: supportsMembers = $organization?.billingPlanDetails?.addons?.seats;
$: isFreeWithMembers = !supportsMembers && memberCount >= 1;
$: isButtonDisabled = isCloud ? isFreeWithMembers : false;
@@ -23,7 +23,7 @@
title="Policies"
buttonText="Create policy"
buttonType="secondary"
buttonDisabled={true} />
buttonDisabled />
<img
src={$app.themeInUse === 'dark'
@@ -41,7 +41,7 @@
title="Policies"
buttonText="Create policy"
buttonType="secondary"
buttonDisabled={true} />
buttonDisabled />
<img
src={$app.themeInUse === 'dark'
@@ -60,7 +60,7 @@
title="Policies"
buttonText="Create policy"
buttonType="secondary"
buttonDisabled={true} />
buttonDisabled />
</div>
<div style="width: 69%; padding-inline-start: 1.5rem;">
@@ -68,7 +68,7 @@
title="Backups"
buttonText="Manual backup"
buttonType="secondary"
buttonDisabled={true} />
buttonDisabled />
</div>
</div>