diff options
Diffstat (limited to 'lib/forms')
| -rw-r--r-- | lib/forms/services.ts | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/forms/services.ts b/lib/forms/services.ts index fd521132..8f40162c 100644 --- a/lib/forms/services.ts +++ b/lib/forms/services.ts @@ -223,7 +223,13 @@ export async function getFormData(formCode: string, contractItemId: number) { const entry = entryRows[0] ?? null; // columns: DB에 저장된 JSON (DataTableColumnJSON[]) - const columns = meta.columns as DataTableColumnJSON[]; + let columns = meta.columns as DataTableColumnJSON[]; + + // 제외할 key들 정의 + const excludeKeys = ['CLS_ID', 'BF_TAG_NO', 'TAG_TYPE_ID', 'PIC_NO']; + + // 제외할 key들을 가진 컬럼들을 필터링해서 제거 + columns = columns.filter(col => !excludeKeys.includes(col.key)); columns.forEach((col) => { // 이미 displayLabel이 있으면 그대로 두고, @@ -322,7 +328,13 @@ export async function getFormData(formCode: string, contractItemId: number) { const entry = entryRows[0] ?? null; - const columns = meta.columns as DataTableColumnJSON[]; + let columns = meta.columns as DataTableColumnJSON[]; + + // 제외할 key들 정의 + const excludeKeys = ['CLS_ID', 'BF_TAG_NO', 'TAG_TYPE_ID', 'PIC_NO']; + + // 제외할 key들을 가진 컬럼들을 필터링해서 제거 + columns = columns.filter(col => !excludeKeys.includes(col.key)); columns.forEach((col) => { // 이미 displayLabel이 있으면 그대로 두고, |
