Compare commits

..

12 Commits

Author SHA1 Message Date
Henry
2edef84ea7 chore: add translations 2025-10-10 13:51:30 +01:00
Henry
b651158494 chore: update readme and features 2025-10-10 13:47:06 +01:00
Henry
a41fe6ea3d feat: create card activity from snapshot creation 2025-10-10 13:45:01 +01:00
Henry
8ba991a0d3 feat: show custom templates in new board form 2025-10-09 21:59:55 +01:00
Henry
a5757b206a feat: create template from board 2025-10-09 21:30:14 +01:00
Henry
e2e489114b fix: ensure checklists default to empty array in board view 2025-10-09 20:37:46 +01:00
Henry
17f406451e feat: add template view indicator 2025-10-08 22:14:58 +01:00
Henry
4220b2bff9 feat: add template card page 2025-10-08 22:04:52 +01:00
Henry
18e85ef6be feat: add template pages 2025-10-08 21:29:24 +01:00
Henry
734e0bbfc5 feat: scaffold templates page 2025-10-07 22:01:34 +01:00
Henry
840c103e20 chore: update _journal and add snapshot 2025-10-07 21:43:34 +01:00
Henry
036fe25e55 feat: add type and sourceId columns to board schema 2025-10-07 21:42:40 +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) => ACTIVE_STATUSES.includes(sub.status));
return subscriptions.filter(
(sub) => sub.status === "active" || sub.status === "trialing",
);
};
export const getSubscriptionByPlan = (
@@ -36,7 +36,9 @@ export const getSubscriptionByPlan = (
) => {
if (!subscriptions) return undefined;
return subscriptions.find(
(sub) => sub.plan === plan && ACTIVE_STATUSES.includes(sub.status),
(sub) =>
sub.plan === plan &&
(sub.status === "active" || sub.status === "trialing"),
);
};