Adds the full Next.js app (app/, components/, lib/, scripts/, assets/, docs/, Dockerfile, compose, configs) to version control. Security: - CIPC BizPortal customer-code logins (Login 1 + Login 3) now read CIPC_LOGIN1_CODE / CIPC_LOGIN1_PASSWORD / CIPC_LOGIN3_CODE / CIPC_LOGIN3_PASSWORD from .env.local instead of source. - BizPortal personal login in apply-bizportal route reads BIZPORTAL_ID_NO / BIZPORTAL_PASSWORD. - Added .env.example as the committed template. .gitignore excludes .env*, node_modules, .next, logs, sqlite, Playwright storage_state.json (live CIPC cookies), scratch dirs, client PDFs and debug screenshots.
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
// app/resolutions/page.tsx
|
|
// Server component. Loads resolutions from PocketBase and hands off to
|
|
// ResolutionExplorer for tab-based browsing.
|
|
|
|
import { fetchCollection } from "@/lib/pb";
|
|
import type { PBList, YsterbaardResolution } from "@/lib/types";
|
|
import PageHeader from "@/components/PageHeader";
|
|
import ResolutionExplorer from "@/components/ResolutionExplorer";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
interface Props {
|
|
searchParams: { tab?: string };
|
|
}
|
|
|
|
async function loadResolutions(): Promise<PBList<YsterbaardResolution>> {
|
|
return fetchCollection<YsterbaardResolution>(
|
|
"ysterbaard_resolutions",
|
|
{
|
|
page: 1,
|
|
perPage: 200,
|
|
fields:
|
|
"id,type,status,title,client_name,client_id_no,client_email,resolution_date,notes,created",
|
|
}
|
|
);
|
|
}
|
|
|
|
export default async function ResolutionsPage({ searchParams }: Props) {
|
|
const data = await loadResolutions();
|
|
|
|
return (
|
|
<>
|
|
<PageHeader
|
|
eyebrow="Workflow"
|
|
title="Resolutions"
|
|
subtitle="Track and complete all company resolutions — from new client onboarding through director appointments and resignations."
|
|
/>
|
|
<ResolutionExplorer resolutions={data} tab={searchParams.tab} />
|
|
</>
|
|
);
|
|
}
|