fix: only archived shows, and new project goes to archive automatically.

This commit is contained in:
Harsh Mahajan committed 2025-08-27 14:06:50 +05:30
1 parent 7e11182093
commit 7270f41b0b
2 files changed
+13 -28

No files matched your search

-9
View File
@@ -260,13 +260,8 @@ packages:
'@analytics/type-utils@0.6.2':
resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==}
<<<<<<< HEAD
'@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@ef43e68':
resolution: {tarball: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@ef43e68}
=======
'@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@c0da899':
resolution: {tarball: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@c0da899}
>>>>>>> 339abe7ac676d56c9a5f84c46b696c71f563fb9a
version: 1.10.0
'@appwrite.io/pink-icons-svelte@2.0.0-RC.1':
@@ -3701,11 +3696,7 @@ snapshots:
'@analytics/type-utils@0.6.2': {}
<<<<<<< HEAD
'@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@ef43e68': {}
=======
'@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@c0da899': {}
>>>>>>> 339abe7ac676d56c9a5f84c46b696c71f563fb9a
'@appwrite.io/pink-icons-svelte@2.0.0-RC.1(svelte@5.25.3)':
dependencies:
@@ -135,13 +135,16 @@
return name ? (name.length > actualLimit ? `${name.slice(0, actualLimit)}...` : name) : '-';
}
$: projectsToArchive = data.projects.projects.filter(
(project) => !data.organization.projects?.includes(project.$id)
);
$: selectedProjects = data.organization.projects ?? [];
$: hasSelection = Array.isArray(selectedProjects) && selectedProjects.length > 0;
$: activeProjects = data.projects.projects.filter((project) =>
data.organization.projects?.includes(project.$id)
);
$: projectsToArchive = hasSelection
? data.projects.projects.filter((project) => !selectedProjects.includes(project.$id))
: [];
$: activeProjects = hasSelection
? data.projects.projects.filter((project) => selectedProjects.includes(project.$id))
: data.projects.projects;
</script>
<SelectProjectCloud
@@ -174,18 +177,11 @@
</DropList>
</div>
{#if isCloud
&& $currentPlan?.projects
&& $currentPlan?.projects > 0
&& data.organization.projects.length > 0
&& $canWriteProjects
&& (projectsToArchive.length > 0 || data.projects.total > $currentPlan.projects)}
{#if isCloud && $currentPlan?.projects && $currentPlan?.projects > 0 && data.organization.projects.length > 0 && $canWriteProjects && (projectsToArchive.length > 0 || data.projects.total > $currentPlan.projects)}
<Alert.Inline
title={
projectsToArchive.length > 0
? `${projectsToArchive.length} projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`
: `Your organization has exceeded the project limit. Projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`
}>
title={projectsToArchive.length > 0
? `${projectsToArchive.length} projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`
: `Your organization has exceeded the project limit. Projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`}>
<Typography.Text>
{#if projectsToArchive.length > 0}
{#each projectsToArchive as project, index}{@const text = `<b>${project.name}</b>`}
@@ -314,5 +310,3 @@
bind:showCreateProjectCloud
regions={$regionsStore.regions}
teamId={page.params.organization} />