mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: logic breaking on self-hosted instances.
This commit is contained in:
@@ -253,7 +253,7 @@
|
||||
|
||||
let badgeType: 'success' | undefined;
|
||||
$: badgeType =
|
||||
$organization && $organization.billingPlanDetails.group !== BillingPlanGroup.Starter
|
||||
$organization && $organization?.billingPlanDetails?.group !== BillingPlanGroup.Starter
|
||||
? 'success'
|
||||
: undefined;
|
||||
</script>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+4
-4
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user