feat(cms): improve catalog, editorial recovery and operations
This commit is contained in:
1 parent
2fead134e6
commit
c389c3893d
122 files changed
+8137
-703
No files matched your search
@@ -0,0 +1,8 @@
|
||||
export function getDashboardEventPhase(
|
||||
event: { status: string; startsAt: Date; endsAt: Date | null },
|
||||
now: Date,
|
||||
): "upcoming" | "ongoing" | null {
|
||||
if (event.status !== "published") return null;
|
||||
if (event.startsAt > now) return "upcoming";
|
||||
return event.endsAt && event.endsAt > now ? "ongoing" : null;
|
||||
}
|
||||
Reference in new issue
Block a user