[as] feat: 결재선 검증 로직 수정

This commit is contained in:
2026-08-06 16:17:44 +09:00
parent 6e2ebe9025
commit 999fd610af
4 changed files with 48 additions and 7 deletions
@@ -16,7 +16,7 @@ export function validateAtrzOrder(rows: AtrzOrderValidateRow[]): string | null {
const visibleRows = rows.filter((row) => !row.isDeleted);
const finalCount = visibleRows.filter((row) => row.atrzSeComCd === ATRZ_FINAL_CD).length;
if (finalCount === 0) {
if (visibleRows.length > 0 && finalCount === 0) {
return "최종승인자는 반드시 등록해야 합니다.";
}
if (finalCount > 1) {
@@ -52,7 +52,8 @@ export function validateAllRowsForSave(
}
const visibleRows = getVisibleRows(rows);
if (visibleRows.length === 0) {
const hasDeletedDirtyRows = rows.some((row) => row.isDeleted && row.isDirty);
if (visibleRows.length === 0 && !hasDeletedDirtyRows) {
return "저장할 결재선이 없습니다.";
}