--- app/(protected)/(basic)/points/standards/_components/point-standard-form-modal.tsx
+++ app/(protected)/(basic)/points/standards/_components/point-standard-form-modal.tsx
... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 |
INITIAL_POINT_STANDARD_FORM_STATE, |
| 18 | 18 |
} from '@/lib/domain/point-standard-form'; |
| 19 | 19 |
import type { PointStandard } from '@/lib/domain/point-standard';
|
| 20 |
-import type { CommonCode } from '@/lib/domain/common-code';
|
|
| 20 |
+import { formatCommonCode, type CommonCode } from '@/lib/domain/common-code';
|
|
| 21 | 21 |
import {
|
| 22 | 22 |
createPointStandardAction, |
| 23 | 23 |
updatePointStandardAction, |
... | ... | @@ -113,12 +113,13 @@ |
| 113 | 113 |
hint={errors.eventCode}
|
| 114 | 114 |
/> |
| 115 | 115 |
) : ( |
| 116 |
- // 기획 ① 이벤트행은 수정불가(Read Only). |
|
| 116 |
+ // 기획 ① 이벤트행은 수정불가(Read Only). 보이는 것은 코드명이고 저장되는 값은 |
|
| 117 |
+ // 위 hidden의 코드값이다. |
|
| 117 | 118 |
<FoxInput |
| 118 | 119 |
size="md" |
| 119 | 120 |
label="이벤트" |
| 120 | 121 |
requirement="required" |
| 121 |
- value={eventCode}
|
|
| 122 |
+ value={formatCommonCode(eventCodes, eventCode)}
|
|
| 122 | 123 |
readOnly |
| 123 | 124 |
state="view" |
| 124 | 125 |
/> |
--- app/(protected)/(basic)/points/standards/_components/point-standard-list.tsx
+++ app/(protected)/(basic)/points/standards/_components/point-standard-list.tsx
... | ... | @@ -19,7 +19,7 @@ |
| 19 | 19 |
formatPoint, |
| 20 | 20 |
type PointStandard, |
| 21 | 21 |
} from '@/lib/domain/point-standard'; |
| 22 |
-import type { CommonCode } from '@/lib/domain/common-code';
|
|
| 22 |
+import { formatCommonCode, type CommonCode } from '@/lib/domain/common-code';
|
|
| 23 | 23 |
import {
|
| 24 | 24 |
POINT_STANDARDS_PATH, |
| 25 | 25 |
POINT_STANDARD_PAGE_SIZE_OPTIONS, |
... | ... | @@ -62,7 +62,14 @@ |
| 62 | 62 |
width: 80, |
| 63 | 63 |
render: (_row, index) => (currentPage - 1) * query.pageSize + index + 1, |
| 64 | 64 |
}, |
| 65 |
- { key: 'eventCode', header: '이벤트/구분', width: 140, emphasis: true },
|
|
| 65 |
+ {
|
|
| 66 |
+ key: 'eventCode', |
|
| 67 |
+ header: '이벤트/구분', |
|
| 68 |
+ width: 140, |
|
| 69 |
+ emphasis: true, |
|
| 70 |
+ // 표에 없는 코드는 지어내지 않고 코드 그대로 보여준다(formatCommonCode 규칙). |
|
| 71 |
+ render: (row) => formatCommonCode(eventCodes, row.eventCode), |
|
| 72 |
+ }, |
|
| 66 | 73 |
{
|
| 67 | 74 |
key: 'point', |
| 68 | 75 |
header: '포인트', |
--- lib/domain/common-code.ts
+++ lib/domain/common-code.ts
... | ... | @@ -25,9 +25,8 @@ |
| 25 | 25 |
inquiryAnswerStatus: 'BBS_ANS_CD', |
| 26 | 26 |
/** FAQ 유형. */ |
| 27 | 27 |
faqType: 'BBS_FAQ_CD', |
| 28 |
- // TODO: 포인트 지급기준의 「이벤트」 — 기획이 "등록된 코드중에서 선택"이라 코드관리와 엮인다. |
|
| 29 |
- // 실제 그룹ID를 받지 못해 잠정값이다. 모르는 그룹은 빈 목록으로 와서 선택지가 비어 보인다. |
|
| 30 |
- pointEvent: 'EVENT_CD', |
|
| 28 |
+ /** 포인트 지급기준의 「이벤트」 — 기획 "등록된 코드중에서 선택"(사용자 확정). */ |
|
| 29 |
+ pointEvent: 'COM_EVENT_CD', |
|
| 31 | 30 |
/** 학교(학교급). */ |
| 32 | 31 |
school: 'COM_SCHUL_CD', |
| 33 | 32 |
/** 학년. 학교마다 다르므로 `atrbNm`에 학교 코드를 넣어 조회한다. */ |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?