임동욱 임동욱 08-21
feat: 포인트 이벤트를 공통코드 COM_EVENT_CD로 확정하고 코드명으로 표기
잠정값으로 두었던 `CODE_GROUP.pointEvent`를 `COM_EVENT_CD`로 확정한다(사용자 확인).

같은 김에 표기도 다른 코드 항목들과 맞춘다 — 목록의 「이벤트/구분」과 수정 팝업의 읽기 전용
칸이 코드값 대신 상세코드명을 보여준다(1:1문의 진행상태·FAQ 유형과 같은 방식). 표에 없는
코드는 지어내지 않고 코드 그대로 노출한다.

**보이는 것과 저장되는 것을 갈랐다.** 화면은 코드명이고 hidden 필드와 전송 payload는 코드값
그대로다 — 수정 시 `EVENT_CD`가 코드명으로 덮이면 안 된다.

확인: 코드명이 다른 표(EVENT-3 → "과정 이수")로 목록이 「과정 이수」를 그리고, 표에 없는
ZZZ-9는 코드 그대로 나오며, 수정 팝업의 읽기 전용 칸은 「과정 이수」인데 hidden은 EVENT-3다.

Co-Authored-By: Claude Opus 5 
@97da26219ff8f26344a45cb615fc3869d6d6ea95
app/(protected)/(basic)/points/standards/_components/point-standard-form-modal.tsx
--- 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 @@
   INITIAL_POINT_STANDARD_FORM_STATE,
 } from '@/lib/domain/point-standard-form';
 import type { PointStandard } from '@/lib/domain/point-standard';
-import type { CommonCode } from '@/lib/domain/common-code';
+import { formatCommonCode, type CommonCode } from '@/lib/domain/common-code';
 import {
   createPointStandardAction,
   updatePointStandardAction,
@@ -113,12 +113,13 @@
               hint={errors.eventCode}
             />
           ) : (
-            // 기획 ① 이벤트행은 수정불가(Read Only).
+            // 기획 ① 이벤트행은 수정불가(Read Only). 보이는 것은 코드명이고 저장되는 값은
+            // 위 hidden의 코드값이다.
             <FoxInput
               size="md"
               label="이벤트"
               requirement="required"
-              value={eventCode}
+              value={formatCommonCode(eventCodes, eventCode)}
               readOnly
               state="view"
             />
app/(protected)/(basic)/points/standards/_components/point-standard-list.tsx
--- app/(protected)/(basic)/points/standards/_components/point-standard-list.tsx
+++ app/(protected)/(basic)/points/standards/_components/point-standard-list.tsx
@@ -19,7 +19,7 @@
   formatPoint,
   type PointStandard,
 } from '@/lib/domain/point-standard';
-import type { CommonCode } from '@/lib/domain/common-code';
+import { formatCommonCode, type CommonCode } from '@/lib/domain/common-code';
 import {
   POINT_STANDARDS_PATH,
   POINT_STANDARD_PAGE_SIZE_OPTIONS,
@@ -62,7 +62,14 @@
       width: 80,
       render: (_row, index) => (currentPage - 1) * query.pageSize + index + 1,
     },
-    { key: 'eventCode', header: '이벤트/구분', width: 140, emphasis: true },
+    {
+      key: 'eventCode',
+      header: '이벤트/구분',
+      width: 140,
+      emphasis: true,
+      // 표에 없는 코드는 지어내지 않고 코드 그대로 보여준다(formatCommonCode 규칙).
+      render: (row) => formatCommonCode(eventCodes, row.eventCode),
+    },
     {
       key: 'point',
       header: '포인트',
lib/domain/common-code.ts
--- lib/domain/common-code.ts
+++ lib/domain/common-code.ts
@@ -25,9 +25,8 @@
   inquiryAnswerStatus: 'BBS_ANS_CD',
   /** FAQ 유형. */
   faqType: 'BBS_FAQ_CD',
-  // TODO: 포인트 지급기준의 「이벤트」 — 기획이 "등록된 코드중에서 선택"이라 코드관리와 엮인다.
-  // 실제 그룹ID를 받지 못해 잠정값이다. 모르는 그룹은 빈 목록으로 와서 선택지가 비어 보인다.
-  pointEvent: 'EVENT_CD',
+  /** 포인트 지급기준의 「이벤트」 — 기획 "등록된 코드중에서 선택"(사용자 확정). */
+  pointEvent: 'COM_EVENT_CD',
   /** 학교(학교급). */
   school: 'COM_SCHUL_CD',
   /** 학년. 학교마다 다르므로 `atrbNm`에 학교 코드를 넣어 조회한다. */
Add a comment
List