mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: deletion
This commit is contained in:
@@ -84,7 +84,10 @@
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="actions">
|
||||
<Button secondary on:click={() => (showDelete = true)}>Delete</Button>
|
||||
<Button
|
||||
disabled={$organization?.markedForDeletion}
|
||||
secondary
|
||||
on:click={() => (showDelete = true)}>Delete</Button>
|
||||
</svelte:fragment>
|
||||
</CardGrid>
|
||||
{/if}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
}
|
||||
addNotification({
|
||||
type: 'success',
|
||||
message: `${$organization.name} has been deleted`
|
||||
message: `${$organization.name} has been flagged for deletion`
|
||||
});
|
||||
await invalidate(Dependencies.ACCOUNT);
|
||||
await invalidate(Dependencies.ORGANIZATION);
|
||||
|
||||
@@ -26,12 +26,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function handleBefore() {
|
||||
if (!$createOrganization.billingPlan) {
|
||||
throw new Error('Please select a plan.');
|
||||
}
|
||||
if ($createOrganization.billingPlan === 'tier-0') {
|
||||
$createOrganization.collaborators = [];
|
||||
}
|
||||
}
|
||||
|
||||
$: if ($createOrganization.billingPlan === 'tier-0') {
|
||||
$createOrganizationFinalAction = 'Create organization';
|
||||
}
|
||||
</script>
|
||||
|
||||
<WizardStep>
|
||||
<WizardStep beforeSubmit={handleBefore}>
|
||||
<svelte:fragment slot="title">Confirm your details</svelte:fragment>
|
||||
<svelte:fragment slot="subtitle">
|
||||
Confirm the details of your new organization and start your free trial.
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
function addCollaborator() {
|
||||
if (!email) return;
|
||||
if ($createOrganization.collaborators.includes(email)) return;
|
||||
$createOrganization.collaborators.push(email);
|
||||
$createOrganization = $createOrganization;
|
||||
email = '';
|
||||
|
||||
@@ -87,12 +87,21 @@
|
||||
}
|
||||
});
|
||||
|
||||
async function handleBefore() {
|
||||
if (!$changeOrganizationTier.billingPlan) {
|
||||
throw new Error('Please select a plan.');
|
||||
}
|
||||
if ($changeOrganizationTier.billingPlan === 'tier-0') {
|
||||
$changeOrganizationTier.collaborators = [];
|
||||
}
|
||||
}
|
||||
|
||||
$: freePlan = $plansInfo.plans.find((p) => p.$id === 'tier-0');
|
||||
$: proPlan = $plansInfo.plans.find((p) => p.$id === 'tier-1');
|
||||
$: scalePlan = $plansInfo.plans.find((p) => p.$id === 'tier-2');
|
||||
</script>
|
||||
|
||||
<WizardStep>
|
||||
<WizardStep beforeSubmit={handleBefore}>
|
||||
<svelte:fragment slot="title">Choose a plan</svelte:fragment>
|
||||
|
||||
<p class="body-text-1 u-bold common-section">Plan</p>
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
function addCollaborator() {
|
||||
if (!email) return;
|
||||
if ($changeOrganizationTier.collaborators.includes(email)) return;
|
||||
|
||||
$changeOrganizationTier.collaborators.push(email);
|
||||
$changeOrganizationTier = $changeOrganizationTier;
|
||||
email = '';
|
||||
|
||||
Reference in New Issue
Block a user