mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
update: filtering.
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ai-sdk/svelte": "^1.1.24",
|
||||
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@acef319",
|
||||
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@406d8be",
|
||||
"@appwrite.io/pink-icons": "0.25.0",
|
||||
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@6916470",
|
||||
"@appwrite.io/pink-legacy": "^1.0.3",
|
||||
|
||||
Generated
+5
-5
@@ -12,8 +12,8 @@ importers:
|
||||
specifier: ^1.1.24
|
||||
version: 1.1.24(svelte@5.25.3)(zod@3.24.3)
|
||||
'@appwrite.io/console':
|
||||
specifier: https://pkg.vc/-/@appwrite/@appwrite.io/console@acef319
|
||||
version: https://pkg.vc/-/@appwrite/@appwrite.io/console@acef319
|
||||
specifier: https://pkg.vc/-/@appwrite/@appwrite.io/console@406d8be
|
||||
version: https://pkg.vc/-/@appwrite/@appwrite.io/console@406d8be
|
||||
'@appwrite.io/pink-icons':
|
||||
specifier: 0.25.0
|
||||
version: 0.25.0
|
||||
@@ -260,8 +260,8 @@ packages:
|
||||
'@analytics/type-utils@0.6.2':
|
||||
resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==}
|
||||
|
||||
'@appwrite.io/console@https://pkg.vc/-/@appwrite/@appwrite.io/console@acef319':
|
||||
resolution: {tarball: https://pkg.vc/-/@appwrite/@appwrite.io/console@acef319}
|
||||
'@appwrite.io/console@https://pkg.vc/-/@appwrite/@appwrite.io/console@406d8be':
|
||||
resolution: {tarball: https://pkg.vc/-/@appwrite/@appwrite.io/console@406d8be}
|
||||
version: 1.10.0
|
||||
|
||||
'@appwrite.io/pink-icons-svelte@2.0.0-RC.1':
|
||||
@@ -3703,7 +3703,7 @@ snapshots:
|
||||
|
||||
'@analytics/type-utils@0.6.2': {}
|
||||
|
||||
'@appwrite.io/console@https://pkg.vc/-/@appwrite/@appwrite.io/console@acef319': {}
|
||||
'@appwrite.io/console@https://pkg.vc/-/@appwrite/@appwrite.io/console@406d8be': {}
|
||||
|
||||
'@appwrite.io/pink-icons-svelte@2.0.0-RC.1(svelte@5.25.3)':
|
||||
dependencies:
|
||||
|
||||
@@ -24,7 +24,7 @@ import type {
|
||||
} from '$lib/sdk/billing';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { activeHeaderAlert, orgMissingPaymentMethod } from '$routes/(console)/store';
|
||||
import { AppwriteException, Query } from '@appwrite.io/console';
|
||||
import { AppwriteException, Query, Platform } from '@appwrite.io/console';
|
||||
import { derived, get, writable } from 'svelte/store';
|
||||
import { headerAlert } from './headerAlert';
|
||||
import { addNotification, notifications } from './notifications';
|
||||
@@ -558,7 +558,7 @@ export async function checkForMissingPaymentMethod() {
|
||||
Query.notEqual('billingPlan', BillingPlan.FREE),
|
||||
Query.isNull('paymentMethodId'),
|
||||
Query.isNull('backupPaymentMethodId'),
|
||||
Query.equal('platform', 'appwrite')
|
||||
Query.equal('platform', Platform.Appwrite)
|
||||
]);
|
||||
if (orgs?.total) {
|
||||
orgMissingPaymentMethod.set(orgs.teams[0]);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Query } from '@appwrite.io/console';
|
||||
import { Query, Platform } from '@appwrite.io/console';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { getLimit, getPage, pageToOffset } from '$lib/helpers/load';
|
||||
import { CARD_LIMIT } from '$lib/constants';
|
||||
@@ -14,7 +14,7 @@ export const load: PageLoad = async ({ url, route }) => {
|
||||
Query.offset(offset),
|
||||
Query.limit(limit),
|
||||
Query.orderDesc(''),
|
||||
Query.equal('platform', 'appwrite')
|
||||
Query.equal('platform', Platform.Appwrite)
|
||||
];
|
||||
|
||||
const organizations = !isCloud
|
||||
|
||||
+4
-2
@@ -1,14 +1,16 @@
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { Query } from '@appwrite.io/console';
|
||||
import { Query, Platform } from '@appwrite.io/console';
|
||||
|
||||
export const load = async ({ parent, depends }) => {
|
||||
depends(Dependencies.DOMAINS);
|
||||
|
||||
const organizations = !isCloud
|
||||
? await sdk.forConsole.teams.list()
|
||||
: await sdk.forConsole.billing.listOrganization([Query.equal('platform', 'appwrite')]);
|
||||
: await sdk.forConsole.billing.listOrganization([
|
||||
Query.equal('platform', Platform.Appwrite)
|
||||
]);
|
||||
|
||||
const { domain } = await parent();
|
||||
return {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { redirect } from '@sveltejs/kit';
|
||||
import { base } from '$app/paths';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { ID, type Models, Query } from '@appwrite.io/console';
|
||||
import { ID, type Models, Query, Platform } from '@appwrite.io/console';
|
||||
import type { OrganizationList } from '$lib/stores/organization';
|
||||
import { redirectTo } from '$routes/store';
|
||||
import type { PageLoad } from './$types';
|
||||
@@ -67,7 +67,7 @@ export const load: PageLoad = async ({ parent, url }) => {
|
||||
let organizations: Models.TeamList<Record<string, unknown>> | OrganizationList | undefined;
|
||||
if (isCloud) {
|
||||
organizations = await sdk.forConsole.billing.listOrganization([
|
||||
Query.equal('platform', 'appwrite')
|
||||
Query.equal('platform', Platform.Appwrite)
|
||||
]);
|
||||
} else {
|
||||
organizations = await sdk.forConsole.teams.list();
|
||||
@@ -91,7 +91,7 @@ export const load: PageLoad = async ({ parent, url }) => {
|
||||
|
||||
if (isCloud) {
|
||||
organizations = await sdk.forConsole.billing.listOrganization([
|
||||
Query.equal('platform', 'appwrite')
|
||||
Query.equal('platform', Platform.Appwrite)
|
||||
]);
|
||||
} else {
|
||||
organizations = await sdk.forConsole.teams.list();
|
||||
|
||||
@@ -3,7 +3,7 @@ import { redirect, error } from '@sveltejs/kit';
|
||||
import { base } from '$app/paths';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { ID, type Models, Query } from '@appwrite.io/console';
|
||||
import { ID, type Models, Query, Platform } from '@appwrite.io/console';
|
||||
import type { OrganizationList } from '$lib/stores/organization';
|
||||
import { redirectTo } from '$routes/store';
|
||||
import type { PageLoad } from './$types';
|
||||
@@ -84,7 +84,7 @@ export const load: PageLoad = async ({ parent, url }) => {
|
||||
|
||||
if (isCloud) {
|
||||
organizations = await sdk.forConsole.billing.listOrganization([
|
||||
Query.equal('platform', 'appwrite')
|
||||
Query.equal('platform', Platform.Appwrite)
|
||||
]);
|
||||
} else {
|
||||
organizations = await sdk.forConsole.teams.list();
|
||||
@@ -109,7 +109,7 @@ export const load: PageLoad = async ({ parent, url }) => {
|
||||
// Refetch organizations after creation
|
||||
if (isCloud) {
|
||||
organizations = await sdk.forConsole.billing.listOrganization([
|
||||
Query.equal('platform', 'appwrite')
|
||||
Query.equal('platform', Platform.Appwrite)
|
||||
]);
|
||||
} else {
|
||||
organizations = await sdk.forConsole.teams.list();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BillingPlan } from '$lib/constants.js';
|
||||
import { sdk } from '$lib/stores/sdk.js';
|
||||
import { ID, type Models, Query } from '@appwrite.io/console';
|
||||
import { ID, type Models, Query, Platform } from '@appwrite.io/console';
|
||||
import { isCloud } from '$lib/system.js';
|
||||
import { error, redirect } from '@sveltejs/kit';
|
||||
import type { OrganizationList } from '$lib/stores/organization.js';
|
||||
@@ -40,7 +40,9 @@ export const load = async ({ parent, url, params }) => {
|
||||
let organizations: Models.TeamList<Record<string, unknown>> | OrganizationList | undefined;
|
||||
if (isCloud) {
|
||||
organizations = account?.$id
|
||||
? await sdk.forConsole.billing.listOrganization([Query.equal('platform', 'appwrite')])
|
||||
? await sdk.forConsole.billing.listOrganization([
|
||||
Query.equal('platform', Platform.Appwrite)
|
||||
])
|
||||
: undefined;
|
||||
} else {
|
||||
organizations = account?.$id ? await sdk.forConsole.teams.list() : undefined;
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { LayoutLoad } from './$types';
|
||||
import { redirectTo } from './store';
|
||||
import { base, resolve } from '$app/paths';
|
||||
import type { Account } from '$lib/stores/user';
|
||||
import { type AppwriteException, Query } from '@appwrite.io/console';
|
||||
import { type AppwriteException, Query, Platform } from '@appwrite.io/console';
|
||||
import { isCloud, VARS } from '$lib/system';
|
||||
import { checkPricingRefAndRedirect } from '$lib/helpers/pricingRedirect';
|
||||
|
||||
@@ -43,7 +43,7 @@ export const load: LayoutLoad = async ({ depends, url, route }) => {
|
||||
organizations: !isCloud
|
||||
? await sdk.forConsole.teams.list()
|
||||
: await sdk.forConsole.billing.listOrganization([
|
||||
Query.equal('platform', 'appwrite')
|
||||
Query.equal('platform', Platform.Appwrite)
|
||||
])
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user