From 41b90bd7b5416c4d76dcc14d288dae81caab6bf7 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 17 Sep 2025 18:03:20 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=9A=94=EC=B2=98=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=ED=8C=8C?= =?UTF-8?q?=EB=9D=BC=EB=AF=B8=ED=84=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/sdmInsertForm/form.tsx | 36 ++++++++++--------- .../src/ui/sdmInsertForm/index.tsx | 8 +++-- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/packages/common/business_components/src/ui/sdmInsertForm/form.tsx b/packages/common/business_components/src/ui/sdmInsertForm/form.tsx index d4e4b7a2e..21e1a27bb 100644 --- a/packages/common/business_components/src/ui/sdmInsertForm/form.tsx +++ b/packages/common/business_components/src/ui/sdmInsertForm/form.tsx @@ -68,6 +68,7 @@ interface SdmRegFormProps { setIsDuplicate: (value: boolean) => void; updateList?: DemandCompType; readOnly?: boolean; + openNetwork?: boolean; } type FieldComponent = ( @@ -84,6 +85,7 @@ export function SdmRegForm({ setIsDuplicate, updateList, readOnly, + openNetwork, }: SdmRegFormProps) { const [sidoValue, setSidoValue] = useState(""); const [sigunValue, setSigunValue] = useState(""); @@ -403,22 +405,24 @@ export function SdmRegForm({ { name: "daddr", label: "사업자주소", - component: (field) => ( - // - { - field.onChange(rtnData.roadAddrPart1); - }} - /> - ), + component: (field) => + openNetwork ? ( + { + field.onChange(rtnData.roadAddrPart1); + }} + /> + ) : ( + + ), }, { name: "telno", diff --git a/packages/common/business_components/src/ui/sdmInsertForm/index.tsx b/packages/common/business_components/src/ui/sdmInsertForm/index.tsx index 051bdbdce..6dbefef4f 100644 --- a/packages/common/business_components/src/ui/sdmInsertForm/index.tsx +++ b/packages/common/business_components/src/ui/sdmInsertForm/index.tsx @@ -16,8 +16,9 @@ type thisProps = { rtnValue: (searchText: string, pageCnt: number) => void; rtnInputData: (data: DemandCompType) => void; bodyClassNm?: string; - updateList?:DemandCompType - readOnly?:boolean + updateList?:DemandCompType; + readOnly?:boolean; + openNetwork:boolean } const createFormSchema = (isBznmTotNoDisabled: boolean, isDuplicate: boolean ,updateList?:DemandCompType) => z.object({ @@ -88,7 +89,7 @@ const defaultValues: FormSchema = { * @returns */ -export default function SdmInsertForm({selectSidoData, selectSigunData, dataList, rtnValue, rtnInputData,bodyClassNm, updateList,readOnly}: thisProps) { +export default function SdmInsertForm({selectSidoData, selectSigunData, dataList, rtnValue, rtnInputData,bodyClassNm, updateList,readOnly,openNetwork}: thisProps) { const [isBznmTotNoDisabled, setIsBznmTotNoDisabled] = useState(false); const [isDuplicate, setIsDuplicate] = useState(false); @@ -165,6 +166,7 @@ export default function SdmInsertForm({selectSidoData, selectSigunData, dataList setIsDuplicate={setIsDuplicate} updateList={updateList} readOnly={readOnly} + openNetwork={openNetwork} />
{readOnly==true?<>