Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/sdk/billing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Client, Models, Query } from '@appwrite.io/console';
import type { Client, Models } from '@appwrite.io/console';
import type { Organization } from '../stores/organization';
import type { PaymentMethod } from '@stripe/stripe-js';
import type { Tier } from '$lib/stores/billing';
Expand Down Expand Up @@ -849,7 +849,7 @@ export class Billing {
);
}

async listAddresses(queries: Query[] = []): Promise<AddressesList> {
async listAddresses(queries: string[] = []): Promise<AddressesList> {
const path = `/account/billing-addresses`;
const params = {
queries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
},
...permanentTabSettings
]
: permanentTabs;
: [...permanentTabs, ...permanentTabSettings];
</script>

{#if $organization?.$id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,6 @@
{/if}
</Container>

<Delete bind:showDelete invoices={data.invoices} />
{#if isCloud && data.invoices}
<Delete bind:showDelete invoices={data.invoices} />
{/if}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import type { PageLoad } from './$types';
import { Dependencies } from '$lib/constants';
import { sdk } from '$lib/stores/sdk';
import { Query } from '@appwrite.io/console';
import { isCloud } from '$lib/system';

export const load: PageLoad = async ({ depends, parent }) => {
const { organization } = await parent();
depends(Dependencies.ORGANIZATION);

return {
projects: await sdk.forConsole.projects.list([Query.equal('teamId', organization.$id)]),
invoices: await sdk.forConsole.billing.listInvoices(organization.$id)
invoices: isCloud ? await sdk.forConsole.billing.listInvoices(organization.$id) : undefined
};
};