37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import TableModal from "@/app/(with-base-layout)/oper/oldPp/tableModal";
|
|
import { windowPopupDefinitions } from "../model/popupDefinitions";
|
|
import type { WindowPopupContentProps } from "../model/types";
|
|
import PopupMissingParams from "./PopupMissingParams";
|
|
import { getPopupParamValue } from "./popupContentUtils";
|
|
|
|
export default function OldPpTablePopupContent({
|
|
searchParams,
|
|
}: WindowPopupContentProps) {
|
|
const fileNm = getPopupParamValue(searchParams.fileNm);
|
|
const atflId = getPopupParamValue(searchParams.atflId);
|
|
const missingParams = [
|
|
!fileNm ? "fileNm" : "",
|
|
!atflId ? "atflId" : "",
|
|
].filter(Boolean);
|
|
|
|
if (missingParams.length > 0) {
|
|
return (
|
|
<PopupMissingParams
|
|
title={windowPopupDefinitions.oldPpTable.title}
|
|
missingParams={missingParams}
|
|
/>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<div className="flex h-dvh flex-col overflow-hidden bg-white p-4">
|
|
<h1 className="mb-3 shrink-0 text-2xl font-semibold">
|
|
{windowPopupDefinitions.oldPpTable.title}
|
|
</h1>
|
|
<div className="min-h-0 flex-1 overflow-hidden">
|
|
<TableModal fileNm={fileNm} atflId={atflId} />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|