1
0
Fork 0

fix(intelligence): contain friday ops rows on mobile and credit side op hosts

This commit is contained in:
Jason Fraley 2026-09-08 01:31:01 -04:00
parent de3db4bd09
commit b64f4b26f4
2 changed files with 12 additions and 3 deletions

View file

@ -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,

View file

@ -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"}
</Button>
</ItemHeader>
<ItemContent>
<ItemContent className="min-w-0">
{entry.missions.length === 0 ? (
<p className="text-sm text-muted-foreground">
Nothing scheduled yet. Claim this Friday.
@ -133,7 +134,7 @@ export function FridayCalendar({
<Link
key={m.id}
href={`/intelligence/missions/${m.id}`}
className="group flex items-center gap-3 rounded-md p-1.5 transition-colors hover:bg-muted/50"
className="group flex min-w-0 flex-1 items-center gap-3 rounded-md p-1.5 transition-colors hover:bg-muted/50"
>
<span className="w-14 shrink-0 font-mono text-xs text-muted-foreground">
{formatTime(m.startDateTime)}
@ -145,7 +146,7 @@ export function FridayCalendar({
<span className="truncate font-mono text-[10px] text-muted-foreground">
{m.codeName}
{m.mapName ? ` · ${m.mapName}` : ""}
{m.isOwn ? " · yours" : ""}
{m.isOwn ? " · yours" : m.hostName ? ` · hosted by ${m.hostName}` : ""}
</span>
</div>
<span