Compare commits

..

2 Commits

Author SHA1 Message Date
Henry
aa6338872e feat(cloud): update active subscription statuses 2025-10-12 21:35:28 +01:00
Henry
a7a27e7054 feat: custom board templates (#98) (#209)
* feat: add type and sourceId columns to board schema

* chore: update _journal and add snapshot

* feat: scaffold templates page

* feat: add template pages

* feat: add template card page

* feat: add template view indicator

* fix: ensure checklists default to empty array in board view

* feat: create template from board

* feat: show custom templates in new board form

* feat: create card activity from snapshot creation

* chore: update readme and features

* chore: add translations
2025-10-10 20:19:42 +01:00

View File

@@ -21,13 +21,13 @@ export interface Subscription {
updatedAt: Date;
}
const ACTIVE_STATUSES = ["active", "trialing", "past_due"];
export const getActiveSubscriptions = (
subscriptions: Subscription[] | undefined,
) => {
if (!subscriptions) return [];
return subscriptions.filter(
(sub) => sub.status === "active" || sub.status === "trialing",
);
return subscriptions.filter((sub) => ACTIVE_STATUSES.includes(sub.status));
};
export const getSubscriptionByPlan = (
@@ -36,9 +36,7 @@ export const getSubscriptionByPlan = (
) => {
if (!subscriptions) return undefined;
return subscriptions.find(
(sub) =>
sub.plan === plan &&
(sub.status === "active" || sub.status === "trialing"),
(sub) => sub.plan === plan && ACTIVE_STATUSES.includes(sub.status),
);
};