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?<>