diff --git a/src/app/(frontend)/intelligence/missions/calendar/page.tsx b/src/app/(frontend)/intelligence/missions/calendar/page.tsx index 0d434a8..f23cb30 100644 --- a/src/app/(frontend)/intelligence/missions/calendar/page.tsx +++ b/src/app/(frontend)/intelligence/missions/calendar/page.tsx @@ -78,6 +78,10 @@ export default async function FridayCalendarPage() { .map((m) => { const map = m.classification.map; const createdBy = m.createdBy; + const creator = + typeof createdBy === "object" && createdBy !== null + ? (createdBy as { displayName?: string | null; username?: string | null }) + : null; return { id: m.id, name: m.name, @@ -86,6 +90,10 @@ export default async function FridayCalendarPage() { startDateTime: m.classification.startDateTime, operationType: m.operationType, mapName: typeof map === "object" && map !== null ? map.name : null, + hostName: + creator != null + ? (creator.displayName ?? creator.username ?? null) + : null, isOwn: user != null && (typeof createdBy === "object" ? createdBy?.id : createdBy) === user.id, diff --git a/src/components/frontend/intelligence/FridayCalendar.tsx b/src/components/frontend/intelligence/FridayCalendar.tsx index 8366522..d72cf5e 100644 --- a/src/components/frontend/intelligence/FridayCalendar.tsx +++ b/src/components/frontend/intelligence/FridayCalendar.tsx @@ -17,6 +17,7 @@ export interface FridayCalendarMission { startDateTime: string; operationType: string; mapName: string | null; + hostName: string | null; isOwn: boolean; } @@ -122,7 +123,7 @@ export function FridayCalendar({ {fridayTaken ? "Taken" : "Schedule"} - + {entry.missions.length === 0 ? (

Nothing scheduled yet. Claim this Friday. @@ -133,7 +134,7 @@ export function FridayCalendar({ {formatTime(m.startDateTime)} @@ -145,7 +146,7 @@ export function FridayCalendar({ {m.codeName} {m.mapName ? ` · ${m.mapName}` : ""} - {m.isOwn ? " · yours" : ""} + {m.isOwn ? " · yours" : m.hostName ? ` · hosted by ${m.hostName}` : ""}