엑셀 중수도 지도점검 데이터 확인

This commit is contained in:
leedj312
2025-07-16 19:27:24 +09:00
parent ea7536bea3
commit bd6dfd31fd
4 changed files with 309 additions and 143 deletions
+17
View File
@@ -0,0 +1,17 @@
// ✨ 오류 검사 - 가공된 데이터 기준
export const isInvalidNumber = (val: any) => {
return val !== undefined && val !== null && val !== "" && isNaN(Number(val));
};
export const isInvalidDate = (val: any) => {
//yyyymmdd 즉 20201212 이런형식만 허용
return !(typeof val === "string" && /^\d{8}$/.test(val.trim()));
};
export const parseRawValue = (val: any): number | string => {
if (val === "" || val === undefined || val === null) return 0;
if (typeof val === "string" && ["보류", "N/A"].includes(val.trim()))
return val;
return !isNaN(val) && val !== " " ? Number(val) : val;
};