From 62494eba30fa7ac3623dac192ebe3e194827ff94 Mon Sep 17 00:00:00 2001 From: ljpark Date: Fri, 8 May 2026 18:19:39 +0900 Subject: [PATCH] =?UTF-8?q?wr:=20=ED=91=9C=EC=A4=80=EA=B3=B5=EC=82=AC?= =?UTF-8?q?=EB=B9=84=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/(popUp-layout)/constCostSimulation/page.tsx | 10 +++++++++- .../(with-layout)/matMng/coMat/coMatRvw/page.tsx | 13 ++++++++----- .../ui/form/coMat/conCostForm/conCostForm.tsx | 9 ++++++++- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/apps/wr/app/(popUp-layout)/constCostSimulation/page.tsx b/apps/wr/app/(popUp-layout)/constCostSimulation/page.tsx index 870f54b1f..c76e3d597 100644 --- a/apps/wr/app/(popUp-layout)/constCostSimulation/page.tsx +++ b/apps/wr/app/(popUp-layout)/constCostSimulation/page.tsx @@ -6,6 +6,7 @@ import { useForm } from "react-hook-form"; import ConCostForm from "@/components/ui/form/coMat/conCostForm/conCostForm"; import type { DmdCoReqType } from "@/app/store/matDmd/coMatRvw/type"; +import ListDiv from "@common/business_components/ui/list_div"; export default function ConstCostSimulationPage() { const form = useForm({ @@ -16,5 +17,12 @@ export default function ConstCostSimulationPage() { } as any }); - return ; + return ( + +
+

표준공사비 산정

+
+ +
+ ) } diff --git a/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx b/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx index e2e80f745..d74d74a1f 100644 --- a/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx +++ b/apps/wr/app/(with-layout)/matMng/coMat/coMatRvw/page.tsx @@ -52,6 +52,7 @@ export default function CoMatRvw() { const { auth, code, coRvw, coMatRvwInit, coMatRvwSearch, coMatRvwInqua } = useWrStore((state) => state); const { coMatRvwRes, coMatRvwCount } = coRvw; + const [mounted, setMounted] = useState(false); const { regAuthrtYn } = auth; const alert = useAlertStore((state) => state.setMessage); @@ -185,6 +186,7 @@ export default function CoMatRvw() { useEffect(() => { if (!initRef.current) { coMatRvwInit(1, 13, fromDate, toDate); + setMounted(true); initRef.current = true; } }, [coMatRvwInit, initRef, fromDate, toDate]); @@ -208,9 +210,9 @@ export default function CoMatRvw() { */ const constCostSimulation = () => { const url = `/constCostSimulation`; - const width = window.screen.availWidth; - const height = 600; - const left = 0; + const width = Math.floor(window.screen.availWidth * 0.6); + const height = 500; + const left = Math.floor((window.screen.availWidth - width) / 2); const top = 0; const popupOptions = `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes`; window.open(url, "candidatePopup", popupOptions); @@ -357,10 +359,11 @@ export default function CoMatRvw() { onChange={(e) => { field.onChange(String(e.target.value)); }} - value={ - moment(field.value).format("YYYY-MM-DD") ?? "" + value={ // 값이 있을 때만 moment 실행, 없으면 빈 문자열 + field.value ? moment(field.value).format("YYYY-MM-DD") : "" } readOnly + suppressHydrationWarning // 시간 차이로 인한 경고 무시 className={readOnlyInputClass} /> diff --git a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx index 40dd1c215..9d18fe213 100644 --- a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx +++ b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx @@ -47,6 +47,11 @@ export default function ConCostForm({ selectionVersion?: number; readonly?: boolean; }) { + const [mounted, setMounted] = useState(false); + useEffect(() => { + setMounted(true); + }, []); + // 시뮬레이션 모드를 위한 로컬 폼 생성 const localForm = useForm({ defaultValues: { @@ -344,6 +349,8 @@ export default function ConCostForm({ window.open(url, "candidatePopup", popupOptions); }; + if (!mounted) return null; // 서버 사이드 렌더링 시에는 아무것도 그리지 않음 (선택 사항) + return ( <> @@ -634,7 +641,7 @@ export default function ConCostForm({ )} /> - {form && ( + {!isSim && (