Skip to content

Commit e5d5afb

Browse files
committed
Finalize date
1 parent 6fb921b commit e5d5afb

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/lib/components/billing/alerts/projectsLimit.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import { currentPlan } from '$lib/stores/organization';
1212
import { onMount } from 'svelte';
1313
import SelectProjectCloud from './selectProjectCloud.svelte';
14+
import { toLocaleDate } from '$lib/helpers/date';
1415
let showSelectProject: boolean = $state(false);
1516
let selectedProjects: string[] = $state([]);
1617
onMount(() => {
@@ -25,8 +26,8 @@
2526
type="warning"
2627
title="Action required: You have more than {$currentPlan.projects} projects.">
2728
<svelte:fragment>
28-
Choose which projects to keep before {billingProjectsLimitDate} or upgrade to Pro. Projects
29-
over the limit will be blocked after this date.
29+
Choose which projects to keep before {toLocaleDate(billingProjectsLimitDate)} or upgrade
30+
to Pro. Projects over the limit will be blocked after this date.
3031
</svelte:fragment>
3132
<svelte:fragment slot="buttons">
3233
<Button

src/lib/components/billing/alerts/selectProjectCloud.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { Dependencies } from '$lib/constants';
1010
import { billingProjectsLimitDate } from '$lib/stores/billing';
1111
import { page } from '$app/state';
12-
import { toLocaleDateTime } from '$lib/helpers/date';
12+
import { toLocaleDate, toLocaleDateTime } from '$lib/helpers/date';
1313
import { currentPlan } from '$lib/stores/organization';
1414
1515
let {
@@ -101,7 +101,7 @@
101101
{#if selectedProjects.length === $currentPlan?.projects}
102102
<Alert.Inline
103103
status="warning"
104-
title={`${projects.length - selectedProjects.length} projects will be archived on ${billingProjectsLimitDate}`}>
104+
title={`${projects.length - selectedProjects.length} projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`}>
105105
<span>
106106
{@html formatProjectsToArchive()}
107107
will be archived.

src/lib/stores/billing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const roles = [
6969

7070
export const teamStatusReadonly = 'readonly';
7171
export const billingLimitOutstandingInvoice = 'outstanding_invoice';
72-
export const billingProjectsLimitDate = '[date]';
72+
export const billingProjectsLimitDate = '2024-09-01';
7373

7474
export const paymentMethods = derived(page, ($page) => $page.data.paymentMethods as PaymentList);
7575
export const addressList = derived(page, ($page) => $page.data.addressList as AddressesList);

src/routes/(console)/organization-[organization]/+page.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import CreateProjectCloud from './createProjectCloud.svelte';
4040
import { currentPlan, regions as regionsStore } from '$lib/stores/organization';
4141
import SelectProjectCloud from '$lib/components/billing/alerts/selectProjectCloud.svelte';
42+
import { toLocaleDate } from '$lib/helpers/date';
4243
4344
export let data;
4445
@@ -165,7 +166,7 @@
165166

166167
{#if isCloud && $currentPlan?.projects && $currentPlan?.projects > 0 && data.organization.projects.length > 0 && $canWriteProjects}
167168
<Alert.Inline
168-
title={`${data.projects.total - data.organization.projects.length} projects will be archived on ${billingProjectsLimitDate}`}>
169+
title={`${data.projects.total - data.organization.projects.length} projects will be archived on ${toLocaleDate(billingProjectsLimitDate)}`}>
169170
<Typography.Text>
170171
{#each projectsToArchive as project, index}{@const text = `<b>${project.name}</b>`}
171172
{@html text}{index == projectsToArchive.length - 2

0 commit comments

Comments
 (0)