46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
"use client";
|
|
|
|
import dynamic from "next/dynamic";
|
|
|
|
import { StandardPopupLayout } from "@common/business_components";
|
|
import { windowPopupDefinitions } from "../model/popupDefinitions";
|
|
import type { WindowPopupContentProps } from "../model/types";
|
|
import PopupMissingParams from "./PopupMissingParams";
|
|
import { getPopupParamValue } from "./popupContentUtils";
|
|
|
|
// 엑셀 파서는 브라우저 전용 의존성을 포함한다. 다른 WindowPopup까지 SSR 단계에서
|
|
// 함께 실패하지 않도록 해당 상세 팝업을 실제로 열 때만 클라이언트에서 불러온다.
|
|
const TableModal = dynamic(
|
|
() => import("@/app/(with-base-layout)/oper/oldPp/tableModal"),
|
|
{ ssr: false },
|
|
);
|
|
|
|
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 (
|
|
<StandardPopupLayout
|
|
title={windowPopupDefinitions.oldPpTable.title}
|
|
bodyClassName="overflow-hidden"
|
|
>
|
|
<TableModal fileNm={fileNm} atflId={atflId} />
|
|
</StandardPopupLayout>
|
|
);
|
|
}
|