diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-05-23 02:56:58 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-05-23 02:56:58 +0000 |
| commit | 37c618b94902603701e1fe3df7f76d238285f066 (patch) | |
| tree | 9c2cbf955ad8073cc22cea1ad60e1da2c86fffac /lib/forms/services.ts | |
| parent | 33dccde38b365206cb14e1a0cb134e07dd8fe939 (diff) | |
(최겸)0519, 0523 옥창명 프로 요구사항 반영(특정 컬럼 제외)
Diffstat (limited to 'lib/forms/services.ts')
| -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이 있으면 그대로 두고, |
