mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Finalize date
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
import { currentPlan } from '$lib/stores/organization';
|
||||
import { onMount } from 'svelte';
|
||||
import SelectProjectCloud from './selectProjectCloud.svelte';
|
||||
import { toLocaleDate } from '$lib/helpers/date';
|
||||
let showSelectProject: boolean = $state(false);
|
||||
let selectedProjects: string[] = $state([]);
|
||||
onMount(() => {
|
||||
@@ -25,8 +26,8 @@
|
||||
type="warning"
|
||||
title="Action required: You have more than {$currentPlan.projects} projects.">
|
||||
<svelte:fragment>
|
||||
Choose which projects to keep before {billingProjectsLimitDate} or upgrade to Pro. Projects
|
||||
over the limit will be blocked after this date.
|
||||
Choose which projects to keep before {toLocaleDate(billingProjectsLimitDate)} or upgrade
|
||||
to Pro. Projects over the limit will be blocked after this date.
|
||||
</svelte:fragment>
|
||||
<svelte:fragment slot="buttons">
|
||||
<Button
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { billingProjectsLimitDate } from '$lib/stores/billing';
|
||||
import { page } from '$app/state';
|
||||
import { toLocaleDateTime } from '$lib/helpers/date';
|
||||
import { toLocaleDate, toLocaleDateTime } from '$lib/helpers/date';
|
||||
import { currentPlan } from '$lib/stores/organization';
|
||||
|
||||
let {
|
||||
@@ -101,7 +101,7 @@
|
||||
{#if selectedProjects.length === $currentPlan?.projects}
|
||||
<Alert.Inline
|
||||
status="warning"
|
||||
title={`${projects.length - selectedProjects.length} projects will be archived on ${billingProjectsLimitDate}`}>
|
||||
title={`${projects.length - selectedProjects.length} projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`}>
|
||||
<span>
|
||||
{@html formatProjectsToArchive()}
|
||||
will be archived.
|
||||
|
||||
@@ -69,7 +69,7 @@ export const roles = [
|
||||
|
||||
export const teamStatusReadonly = 'readonly';
|
||||
export const billingLimitOutstandingInvoice = 'outstanding_invoice';
|
||||
export const billingProjectsLimitDate = '[date]';
|
||||
export const billingProjectsLimitDate = '2024-09-01';
|
||||
|
||||
export const paymentMethods = derived(page, ($page) => $page.data.paymentMethods as PaymentList);
|
||||
export const addressList = derived(page, ($page) => $page.data.addressList as AddressesList);
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
import CreateProjectCloud from './createProjectCloud.svelte';
|
||||
import { currentPlan, regions as regionsStore } from '$lib/stores/organization';
|
||||
import SelectProjectCloud from '$lib/components/billing/alerts/selectProjectCloud.svelte';
|
||||
import { toLocaleDate } from '$lib/helpers/date';
|
||||
|
||||
export let data;
|
||||
|
||||
@@ -165,7 +166,7 @@
|
||||
|
||||
{#if isCloud && $currentPlan?.projects && $currentPlan?.projects > 0 && data.organization.projects.length > 0 && $canWriteProjects}
|
||||
<Alert.Inline
|
||||
title={`${data.projects.total - data.organization.projects.length} projects will be archived on ${billingProjectsLimitDate}`}>
|
||||
title={`${data.projects.total - data.organization.projects.length} projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`}>
|
||||
<Typography.Text>
|
||||
{#each projectsToArchive as project, index}{@const text = `<b>${project.name}</b>`}
|
||||
{@html text}{index == projectsToArchive.length - 2
|
||||
|
||||
Reference in New Issue
Block a user