diff --git a/apps/wr/app/store/ruseFcltMng/fcltReg/rswtReg/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltReg/rswtReg/index.tsx
index 8c3579a5d..e969c7405 100644
--- a/apps/wr/app/store/ruseFcltMng/fcltReg/rswtReg/index.tsx
+++ b/apps/wr/app/store/ruseFcltMng/fcltReg/rswtReg/index.tsx
@@ -30,8 +30,8 @@ import toast from "react-hot-toast";
export const rswtZod = z.object({
bdstInfoPk: z.number().nullish(),
- ctpvCd: z.number(),
- sggCd: z.number(),
+ ctpvCd: z.number({ required_error: '시도를 선택하세요.' }),
+ sggCd: z.number({ required_error: '시군구를 선택하세요.' }),
daddr: z.string().default(""),
bdstNm: z.string().default(""),
frstArchPrmsnDt: z.date().default(() => new Date()),
@@ -182,7 +182,7 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = (
const chData = await makeRstr(data);
const res = await postFectch("/reuseFc/waterreuseFc", chData);
if (res.status===200) {
- if(data.chgBuilding ){
+ if(data.chgBuilding.length>0 ){
const chPK = res?.data?.bdstInfoPk
const makeCh= res.data.chgBuilding.map((item: chgBuilding) =>
@@ -194,7 +194,9 @@ export const rswtFacActionsExport: (set: any) => rswtFacSActions = (
const chch= await postFectch("/reuseFc/chgBuilding", makeCh);
if(chch.status ===200) {
- toast.success("건축물 등록이 완료되었습니다.");
+
+ console.log('chch.status' , chch.status)
+ toast.success("건축물 및 증축/개축/중축 등록이 완료되었습니다.");
}else{
toast.error("건축물 증축/개축/중축 오류입니다.");
}
diff --git a/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx b/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx
index 6462231b9..188b1380a 100644
--- a/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx
+++ b/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx
@@ -183,7 +183,7 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
onChange={(e) => {
field.onChange(e.target.value)
}}
- value={field.value}
+ value={field.value||''}
/>
)}
@@ -199,7 +199,10 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
className={selectClass}
placeholder="위치를 입력해주세요"
type="search"
- {...field}
+ onChange={(e) => {
+ field.onChange(e.target.value)
+ }}
+ value={field.value||''}
/>
)}
@@ -266,7 +269,7 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
onChange={(e) => {
field.onChange(e.target.value)
}}
- value={field.value}
+ value={field.value||''}
/>
)}
@@ -364,7 +367,7 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
placeholder="-"
type="text"
onChange={(e) => f.onChange}
- value={f.value}
+ value={f.value||''}
className={selectClass}
/>
diff --git a/apps/wr/components/ui/form/fcltReg/rswtrReg/rswtrRegForm.tsx b/apps/wr/components/ui/form/fcltReg/rswtrReg/rswtrRegForm.tsx
index f70f4548c..d37049445 100644
--- a/apps/wr/components/ui/form/fcltReg/rswtrReg/rswtrRegForm.tsx
+++ b/apps/wr/components/ui/form/fcltReg/rswtrReg/rswtrRegForm.tsx
@@ -80,7 +80,7 @@ export default function RswtrRegForm({
instlCmptnDt: item?.instlCmptnDt
? new Date(item.instlCmptnDt)
: new Date(), // item?.instlCmptnDt가 유효하지 않으면 현재 날짜로 초기화
- operMngCd: item?.operMngCd ?? "", // null → ""
+ operMngCd: item?.operMngCd || "", // null → ""
instlCstSprtYn: item?.instlCstSprtYn || code.yn[0]?.val, // null → "Y"
grntchBdstCertYn: item?.grntchBdstCertYn || code.yn[0]?.val,
rswtrObj: {
@@ -192,7 +192,7 @@ export default function RswtrRegForm({
const value = field.value;
const isUnknown = value === null || value === -1; // 또는 Number(value) === -1
return (
-