From 37c618b94902603701e1fe3df7f76d238285f066 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 23 May 2025 02:56:58 +0000 Subject: (최겸)0519, 0523 옥창명 프로 요구사항 반영(특정 컬럼 제외) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/forms/services.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'lib/forms') 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이 있으면 그대로 두고, -- cgit v1.2.3