"use client" /** * Admin overview — is this workspace set up, and did the data land? * * A card stack on `PrimaryPageTemplate` rather than a hub, because there is no * list here to sort or filter; it is a status read that ends in a link to the * object that needs attention. Same shape as organization settings, which is * its neighbour in the user's head. * * The one thing it must not do is invent a health score. Counts and dates are * verifiable; a green tick that means nothing is worse than no tick. */ import * as React from "react" import { Link, useNavigate, useSearchParams } from "react-router" import { PageHeader } from "@/components/page-header" import { PrimaryPageTemplate } from "@/components/templates/primary-page-template" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { LocalBanner } from "@/components/ui/banner" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { useProduct } from "@/contexts/product-context" import { adminImportsForObjects, adminObjectsForApp, adminObjectSummaries, type AdminObjectSummary, } from "@/lib/mock/admin-directory" import { ADMIN_APP_PARAM, buildProductHomeInventory, type ProductHomeCard, } from "@/lib/product-home" function formatDay(iso: string) { return new Date(`${iso}T00:00:00`).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric", }) } /** * What a section says when the app filter leaves it with nothing. * * A dashed box rather than a hidden section: a heading with nothing under it * reads as a page that failed to load, and dropping the heading would make the * console change shape depending on which app it is pointed at. */ function EmptyLine({ children }: { children: React.ReactNode }) { return (
{children}
) } function ObjectCard({ summary }: { summary: AdminObjectSummary }) { return ({summary.scope}
Kept current by {summary.source}.
Every landing, whether it came from a feed overnight or from someone uploading a file.
{imports.length === 0 ? ({event.object} {event.source}
{formatDay(event.landedOn)} by {event.actor}
These already have a home. Administrator links to them rather than keeping a second copy of the controls.
Which products this workspace uses, and the colour and wordmark for any product you have built yourself.
Who can administer this workspace, and what a program admin sees compared with a tenant admin. Not built yet, so access still follows the defaults.