[ST] - fix: 입력 저장&제출시 빈값 null처리

This commit is contained in:
2026-08-21 14:56:34 +09:00
parent 8e757ab9db
commit c87ccf8788
26 changed files with 641 additions and 424 deletions
@@ -0,0 +1,8 @@
/** 그리드/폼 문자열 → API 전송용. 빈값·공백만이면 null */
export function nullableTrimmedString(
value: string | number | null | undefined | unknown,
): string | null {
if (value === null || value === undefined) return null;
const s = typeof value === "string" ? value.trim() : String(value).trim();
return s === "" ? null : s;
}