Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into lhj
; Conflicts: ; frontend/lib/utils/buttonActions.ts
This commit is contained in:
@@ -380,6 +380,16 @@ export function UniversalFormModalComponent({
|
||||
const handleBeforeFormSave = (event: Event) => {
|
||||
if (!(event instanceof CustomEvent) || !event.detail?.formData) return;
|
||||
|
||||
// 필수값 검증 실행
|
||||
const validation = validateRequiredFields();
|
||||
if (!validation.valid) {
|
||||
event.detail.validationFailed = true;
|
||||
event.detail.validationErrors = validation.missingFields;
|
||||
toast.error(`필수 항목을 입력해주세요: ${validation.missingFields.join(", ")}`);
|
||||
console.log("[UniversalFormModal] 필수값 검증 실패:", validation.missingFields);
|
||||
return; // 검증 실패 시 데이터 병합 중단
|
||||
}
|
||||
|
||||
// 설정에 정의된 필드 columnName 목록 수집
|
||||
const configuredFields = new Set<string>();
|
||||
config.sections.forEach((section) => {
|
||||
|
||||
Reference in New Issue
Block a user