diff --git a/apps/as/src/entities/instl-sncn/model/instl-sncn-interface.ts b/apps/as/src/entities/instl-sncn/model/instl-sncn-interface.ts index 7593d5f8e..6a3d07ff9 100644 --- a/apps/as/src/entities/instl-sncn/model/instl-sncn-interface.ts +++ b/apps/as/src/entities/instl-sncn/model/instl-sncn-interface.ts @@ -29,6 +29,7 @@ export interface InstlSncnMng { chrgrNm?: string; instNm?: string; envoSeComCd: string; + sncnSeComCd: string; envoSeCdNm: string; taskSeComCd: string; taskSeCdNm: string; diff --git a/apps/as/src/pages/instl-sncn/ui/cnfm-regist-page.tsx b/apps/as/src/pages/instl-sncn/ui/cnfm-regist-page.tsx index c5140496b..e144f7d17 100644 --- a/apps/as/src/pages/instl-sncn/ui/cnfm-regist-page.tsx +++ b/apps/as/src/pages/instl-sncn/ui/cnfm-regist-page.tsx @@ -9,8 +9,8 @@ import axios from "axios"; import { type HttpResponse, Upload } from "tus-js-client"; import { AUTH_USER_ID, CLAIM_NAME, ENDPOINT, PROXY_HOST } from "@/shared/config"; -import { deleteAttachment } from "@/shared/lib/attach"; import { getCookie, setCookie, useAlertStore, useUserStore } from "@/shared/lib"; +import { deleteAttachment } from "@/shared/lib/attach"; import { formatFileSize } from "@/shared/lib/file-utils"; import type { AcntgSeMngTreeDto } from "@/entities/acntg"; import { acntgService } from "@/entities/acntg"; @@ -30,7 +30,7 @@ import { type InstlSncnBzScaleSaveDto, type InstlSncnMng, } from "@/entities/instl-sncn"; - +import { EtcAttachments,NumCell, PrivacyConsent, ReadCell } from "@/widgets/cnfm"; import { Button, Input } from "@common/components"; import "./cnfm-page.css"; @@ -68,12 +68,8 @@ const emptyAmt = (): BzAmtRow => ({ bscPl: "", budgetReflct: "", thtiDsgn: "" }) const num = (v: string) => parseFloat(v.replace(/,/g, "") || "0"); const fmt = (v: number) => (isNaN(v) ? "" : v.toLocaleString()); -const DEFAULT_RVW_STP_COM_CD = "LOCAL"; // LOCAL.지자체,ENV.환경청,KECO.환경공단 (검토단계공통코드:RVWSTP 참조) - -/* ------------------------------------------------------------------ */ -/* 공통 셀 컴포넌트 분리: widgets/cnfm/ui/cells.tsx에서 import */ -/* ------------------------------------------------------------------ */ -import { NumCell, ReadCell, PrivacyConsent, EtcAttachments } from '@/widgets/cnfm'; +const DEFAULT_RVW_STP_COM_CD = "LOCAL"; //검토단계공통코드: RVWSTP ( 상세 코드 : LOCAL.지자체,ENV.환경청,KECO.환경공단) +const DEFAULT_SNCN_SE_COM_CD = "CNFM"; /* ------------------------------------------------------------------ */ /* 메인 컴포넌트 */ @@ -88,7 +84,7 @@ import { NumCell, ReadCell, PrivacyConsent, EtcAttachments } from '@/widgets/cnf * * - 주요 detFields (det 또는 detDto 내부): * - bizNm, bizBgngYr, bizEndYr, bizCn - * - envoSeComCd or envoSeCd (설치구분) + * - sncnSeComCd or envoSeComCd or envoSeCd (설치구분) * - dsgnrNm, dsgnrOgdpNm (소속), dsgnrTelno, dsgnrEmlAddr * - privacyAgree ("Y" | "N") * - aplcntNm, aplcntMblTelno, aplcntOgdpNm, aplcntEmlAddr @@ -109,11 +105,11 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) { const userInfo = useUserStore((state) => state.userInfo); const alert = useAlertStore((state) => state.setMessage); const qc = useQueryClient(); + const currentDet = useMemo(() => initialData?.detDto ?? initialData, [initialData]); const docId = useMemo(() => { - const det = initialData?.detDto ?? initialData; - return det?.instlSncnDocNo ?? det?.instlSncnDocNo ?? ""; - }, [initialData]); + return currentDet?.instlSncnDocNo ?? ""; + }, [currentDet]); const [docSeComCd] = useState("INSTL"); const [taskSeComCdNm, setTaskSeComCdNm] = useState("재이용수"); @@ -138,7 +134,7 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) { const [bzBgngYr, setBzBgngYr] = useState(""); const [bzEndYr, setBzEndYr] = useState(""); const [bzCn, setBzCn] = useState(""); - const [instlCnfmApr, setInstlCnfmApr] = useState("CNFM"); + const [sncnSeComCd, setSncnSeComCd] = useState("CNFM"); /* ── 설계자 정보 ── */ const [dsgnrNm, setDsgnrNm] = useState(""); @@ -269,7 +265,7 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) { if (initialMappedRef.current) return; try { - const det = (initialData.detDto ?? initialData) as any; + const det = (currentDet ?? {}) as any; const bizSclList = initialData.bizSclList ?? []; const bizCstList = initialData.bizCstList ?? []; @@ -283,7 +279,7 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) { setBzBgngYr(det.bizBgngYr ?? ""); setBzEndYr(det.bizEndYr ?? ""); setBzCn(det.bizCn ?? ""); - setInstlCnfmApr(det.envoSeComCd ?? det.envoSeCd ?? "CNFM"); + setSncnSeComCd(det.sncnSeComCd ?? det.envoSeComCd ?? det.envoSeCd ?? DEFAULT_SNCN_SE_COM_CD); // 설계자 setDsgnrNm(det.dsgnrNm ?? ""); @@ -862,7 +858,8 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) { sggNm: "", chrgrNm: "", instNm: "", - envoSeComCd: instlCnfmApr, + envoSeComCd: currentDet?.envoSeComCd ?? "", + sncnSeComCd: sncnSeComCd || DEFAULT_SNCN_SE_COM_CD, envoSeCdNm: "", taskSeComCd, taskSeCdNm: taskSeComCdNm, @@ -1037,10 +1034,10 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) { diff --git a/apps/as/src/pages/instl-sncn/ui/cnfm-view-page.tsx b/apps/as/src/pages/instl-sncn/ui/cnfm-view-page.tsx index 0e56805f3..20b289293 100644 --- a/apps/as/src/pages/instl-sncn/ui/cnfm-view-page.tsx +++ b/apps/as/src/pages/instl-sncn/ui/cnfm-view-page.tsx @@ -75,7 +75,11 @@ function CnfmViewPage({ id }: { id: string }) { 업무구분 {det.taskSeCdNm || det.taskSeComCd || "-"} 행정동ID - {det.dongId || "-"} + {det.admdstCd || "-"} + + + 사업구분(인가구분) + {det.sncnSeComCd || "-"} 진행상태