diff --git a/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx b/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx
index 91d1361c9..edeb9e87b 100644
--- a/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx
+++ b/apps/sn/app/(with-base-layout)/ii/irsetting/page.tsx
@@ -137,6 +137,23 @@ const IrSetting = () => {
// 침입수 분석 실행 버튼 클릭 핸들러
const handleAnalysisClick = async () => {
setIsLoadingResult(true); // 로딩 상태 시작
+
+ // 오수전환율 값 0 ~ 1 사이인지 검증
+ if (input1 === '' || input1 === null || input1 === undefined) {
+ setIsLoadingResult(false);
+ console.error('오수전환율은 0에서 1 사이의 값으로 입력해야 합니다.');
+ alert('오수전환율을 입력해주세요.');
+ return;
+ }
+
+ const numericInput1 = parseFloat(input1);
+ if (isNaN(numericInput1) || numericInput1 < 0 || numericInput1 > 1) {
+ setIsLoadingResult(false);
+ console.error('오수전환율은 0에서 1 사이의 값으로 입력해야 합니다.');
+ alert('오수전환율은 0에서 1 사이의 값으로 입력해야 합니다.');
+ return;
+ }
+
console.log(uploadedFilesData);
const file1 = uploadedFilesData[0]; // 오수관망도
const file2 = uploadedFilesData[1]; // 수용가-맨홀 매칭결과
@@ -275,7 +292,7 @@ const IrSetting = () => {
onFileSelect={(file, cd, id) => handleFileSelection(0, file, cd, id)}
showButton={false}
showPreview={true}
- accept={""}
+ accept={".inp"}
fileIdx={0} />
diff --git a/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx b/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx
index 705b243c8..3269f31b5 100644
--- a/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx
+++ b/apps/sn/app/(with-base-layout)/ii/rdii/page.tsx
@@ -163,6 +163,24 @@ export default function RTKForm() {
// 침입수 분석 실행 버튼 클릭 핸들러
const handleAnalysisClick = async () => {
setIsLoadingResult(true); // 로딩 상태 시작
+
+ // 오수전환율 값 0 ~ 1 사이인지 검증
+ const rateValue = form.getValues().rate;
+ if (rateValue === '' || rateValue === null || rateValue === undefined) {
+ setIsLoadingResult(false);
+ console.error('오수전환율은 0에서 1 사이의 값으로 입력해야 합니다.');
+ alert('오수전환율을 입력해주세요.');
+ return;
+ }
+
+ const numericInput1 = parseFloat(rateValue);
+ if (isNaN(numericInput1) || numericInput1 < 0 || numericInput1 > 1) {
+ setIsLoadingResult(false);
+ console.error('오수전환율은 0에서 1 사이의 값으로 입력해야 합니다.');
+ alert('오수전환율은 0에서 1 사이의 값으로 입력해야 합니다.');
+ return;
+ }
+
const formData = form.getValues();
console.log(uploadedFilesData);
const file1 = uploadedFilesData[0]; // 오수관망도
@@ -378,7 +396,7 @@ export default function RTKForm() {
onFileSelect={(file, cd, id) => handleFileSelection(0, file, cd, id)}
showButton={false}
showPreview={true}
- accept={""}
+ accept={".inp"}
fileIdx={0} />