1
0
Fork 0
polaris-task-force/src/app/(frontend)/operations/ledger/page.tsx
Z8MB1E c149f07347 fix(ui): unify remaining page caps to 96rem and repair story xl cap
Raise the centered operations, supply-boxes, campaigns, factions and
missions wrappers from max-w-7xl to the same max-w-[96rem] used by the
logistics detail pages so all capped pages share one width.

The story page used xl:max-w-screen-2xl, a utility Tailwind v4 removed,
so that override silently did nothing; swap it for xl:max-w-[96rem],
which restores the intended wider gutter layout on xl screens.
2026-10-19 10:52:04 -04:00

69 lines
2.1 KiB
TypeScript

import config from "@payload-config";
import { getPayload } from "payload";
import { headers as nextHeaders } from "next/headers";
import { isPayloadUser } from "@/utils/access-control/isPayloadUser";
import { getOperationLedger } from "@/lib/operations/surfaceQuery";
import {
LedgerTable,
OperationsRealtimeRefresher,
OperationsStrip,
PageShell,
} from "@/components/frontend/operations";
import type { LedgerTableFilters } from "@/components/frontend/operations";
export const metadata = {
title: "Operations Ledger: Polaris Task Force",
};
interface LedgerSearchParams {
operationId?: string;
status?: string;
type?: string;
page?: string;
}
export default async function OperationsLedgerPage({
searchParams,
}: {
searchParams: Promise<LedgerSearchParams>;
}) {
const params = await searchParams;
const payload = await getPayload({ config });
const { user: authUser } = await payload.auth({
headers: await nextHeaders(),
canSetHeaders: false,
});
const user = isPayloadUser(authUser) ? authUser : null;
const surfaceUser = user ? { id: user.id } : null;
const page = Number.parseInt(params.page ?? "1", 10);
const filters: LedgerTableFilters = {
operationId: params.operationId || undefined,
status: params.status || undefined,
type: params.type || undefined,
};
const result = await getOperationLedger(
payload,
surfaceUser,
filters,
Number.isNaN(page) ? 1 : page,
);
return (
<div className="mx-auto flex w-full max-w-[96rem] flex-col gap-6 px-4 py-6">
<OperationsRealtimeRefresher />
<PageShell
title="Operations ledger"
meta="SOURCE EVENTS // EFFECT LEDGER"
dataTour="page-header"
>
<p className="max-w-2xl text-sm text-white/70">
Every validated, rejected, and dead-lettered operation event with its derived effects.
Rejected and dead-lettered entries are retained as evidence and never applied.
</p>
</PageShell>
<LedgerTable result={result} filters={filters} />
<OperationsStrip left="OPERATIONS LEDGER // UNIT COMMAND" />
</div>
);
}