From 216cec8cc7674c7234a4951cad8b091d6721f5b5 Mon Sep 17 00:00:00 2001 From: bicochan Date: Wed, 29 Apr 2026 14:47:49 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[cs]=20chore:=20=ED=95=98=EC=9C=84=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=8A=A4=ED=82=A4=EB=A7=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/cs/src/entities/code/model/lwpocode-interface.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/cs/src/entities/code/model/lwpocode-interface.ts b/apps/cs/src/entities/code/model/lwpocode-interface.ts index d44a89ef2..ddf1d54c6 100644 --- a/apps/cs/src/entities/code/model/lwpocode-interface.ts +++ b/apps/cs/src/entities/code/model/lwpocode-interface.ts @@ -1,5 +1,6 @@ import { z } from "zod"; -import type { PageableParams, PageableList } from "@/shared/model"; + +import type { PageableList, PageableParams } from "@/shared/model"; export interface LwpoCodeParams extends PageableParams { upCd?: string; @@ -40,7 +41,7 @@ export const LwpoCodeFormSchema = z.object({ upCd: z.string().max(10).nonempty(), lwpoCdNm: z.string().max(100).nonempty(), lwpoCdExpln: z.string().max(1000).nullish(), - unit: z.string().max(20).nullish(), + unit: z.string().max(30).nullish(), prntLwpoCd: z.string().max(10).nullish(), useYn: z.string(), sortSeq: z.number(), From 6d5ebdc739b733c93253e1581e9c86d1822a4329 Mon Sep 17 00:00:00 2001 From: bicochan Date: Wed, 29 Apr 2026 17:09:54 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[cs]=20feat:=20=EC=95=8C=EB=A6=BC=ED=86=A1?= =?UTF-8?q?=20=ED=85=9C=ED=94=8C=EB=A6=BF=20=EB=93=B1=EB=A1=9D=20=EC=9D=B8?= =?UTF-8?q?=ED=84=B0=ED=8E=98=EC=9D=B4=EC=8A=A4=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=B0=8F=20=EC=8A=A4=ED=8E=99=20=EB=AC=B8=EC=84=9C=20=EB=B3=B4?= =?UTF-8?q?=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/cs/docs/spec/ntftalk/temp/SPEC.md | 76 +++++++++++++++++++ .../ntftalk/model/ntftalk-temp-interface.ts | 3 + 2 files changed, 79 insertions(+) diff --git a/apps/cs/docs/spec/ntftalk/temp/SPEC.md b/apps/cs/docs/spec/ntftalk/temp/SPEC.md index 0b84ace4a..81f361925 100644 --- a/apps/cs/docs/spec/ntftalk/temp/SPEC.md +++ b/apps/cs/docs/spec/ntftalk/temp/SPEC.md @@ -260,3 +260,79 @@ BEGIN END ``` + +--- + +## 9. 템플릿 등록 다이얼로그 + +대상 UI: `NtftalkTempRegistDialog` (`apps/cs/src/pages/ntftalk-temp/ui/ntftalk-temp-regist-dialog.tsx`) + +### 9-1. 목적/오픈 조건 + +- 목적: 신규 알림톡 템플릿 1건을 등록한다. +- 오픈 조건: 영역 B 툴바의 `템플릿등록` 클릭 시 모달 오픈. +- 저장 성공 시: 목록 캐시 무효화 후 영역 B 재조회 상태로 복귀(모달 닫힘). + +### 9-2. 다이얼로그 레이아웃 + +``` +┌──────────────────────────────────────────────────────────────────────┐ +│ 알림 템플릿 등록 │ +├──────────────────────────────────────────────────────────────────────┤ +│ 메시지 유형 [기본형(고정)] │ +│ 채널 [Select(senderKey)] │ +│ 템플릿코드 [Input] │ +│ 템플릿명 [Input] │ +│ 보안템플릿여부 ( )설정 ( )미설정 │ +│ 템플릿내용 [+ 변수추가] │ +│ [Textarea] │ +│ 버튼 Table(버튼타입|버튼명|버튼링크) │ +│ [CodeSelect(upCd: NTFBUTTONTYPE) | Input | Input] │ +│ 바로연결 Table(바로연결타입|바로연결명|바로연결링크) │ +│ [CodeSelect(upCd: NTFQRTYPE) | Input | Input] │ +├──────────────────────────────────────────────────────────────────────┤ +│ [저장] [취소] │ +└──────────────────────────────────────────────────────────────────────┘ +``` + +### 9-3. 필드 상세 + +| 표시명 | Form Key | 입력 유형 | 필수 | 기본값 | 검증/제약 | 저장 Payload 매핑 | +| -------------- | ----------------------- | ----------- | ---- | ------------------------------------- | -------------------- | --------------------- | +| 메시지 유형 | `templateMessageType` | 고정 텍스트 | Y | `BA` | UI에서 `기본형` 고정 | `templateMessageType` | +| 채널 | `senderKey` | Select | Y | `senderQuery.data.senderKey` 자동세팅 | 미선택 불가 | `senderKey` | +| 발신키 유형 | `senderKeyType` | hidden 상수 | Y | `S` | submit 시 강제 `S` | `senderKeyType` | +| 템플릿코드 | `templateCode` | Input | Y | `""` | 1자 이상 | `templateCode` | +| 템플릿명 | `templateName` | Input | Y | `""` | 1자 이상 | `templateName` | +| 보안템플릿여부 | `templateEmphasizeType` | Radio | N | `false` | `true` / `false` | `pcflag` | +| 템플릿내용 | `templateContent` | Textarea | Y | `""` | 1자 이상 | `templateContent` | +| 버튼 | `buttons` | Table | N | `[]` | 빈 배열 | `buttons` | +| 바로연결 | `quickReplies` | Table | N | `[]` | 빈 배열 | `quickReplies` | + +### 9-4. 버튼/이벤트 상세 + +| 트리거 | 처리 로직 | 비고 | +| ---------------- | ----------------------------------------------- | ------------------------------------ | +| 템플릿등록(외부) | 다이얼로그 open = true, form reset | 진입 시 초기화 | +| 저장 | zod 검증 통과 후 `saveNtftalkTemp` 호출 | 성공 시 `등록되었습니다.` 알림 | +| 저장 성공 | `invalidateQueries([NTFTALK_TEMP])` → 모달 닫기 | 목록 최신화 | +| 저장 실패 | 공통 mutation error 처리 | 에러 메시지 표시 정책 공통 모듈 따름 | +| + 변수추가 | 변수 선택 팝업 open | 9-5 참조 | + +### 9-5. 변수추가 팝업 상세 + +| 항목 | 내용 | +| ----------- | -------------------------------------------------------------------- | +| 팝업명 | 변수 목록 | +| 데이터 소스 | `NtftalkVarApi.getNtftalkVarPage` | +| 조회 조건 | `sort=regDt,desc`, 페이지네이션(`pageIndex/pageSize`) | +| 선택 방식 | 다중 선택 (`RowSelectionState`) | +| [추가] 동작 | 선택된 `varCd`를 줄바꿈(`\n`)으로 `templateContent` 하단에 append | +| 유효성 체크 | 선택 0건: "추가할 변수를 선택해 주세요." / `varCd` 공백 포함 시 에러 | +| [취소] 동작 | 팝업 닫기(선택값 유지 안 함) | + +### 9-6. API 명세 + +| 기능 | Method | URL | Request DTO | Response DTO | 클라이언트 API | +| ----------- | ------ | --------------- | ------------------------ | ------------- | -------------------------------- | +| 템플릿 등록 | POST | `/ntftalk-temp` | `NtftalkTempSavePayload` | `NtftalkTemp` | `NtftalkTempApi.saveNtftalkTemp` | diff --git a/apps/cs/src/entities/ntftalk/model/ntftalk-temp-interface.ts b/apps/cs/src/entities/ntftalk/model/ntftalk-temp-interface.ts index 34ed20803..5149ad230 100644 --- a/apps/cs/src/entities/ntftalk/model/ntftalk-temp-interface.ts +++ b/apps/cs/src/entities/ntftalk/model/ntftalk-temp-interface.ts @@ -46,6 +46,7 @@ export interface NtftalkTemp { templateImageUrl: string; inspectionStatus: string; inspectionStatusNm: string; + pcflag: string; status: string; statusNm: string; createdAt: string; @@ -85,6 +86,7 @@ export interface NtftalkTempSavePayload { templateEmphasizeType: string; templateImageUrl?: string; inspectionStatus?: string; + pcflag?: string; buttons?: NtftalkBtnTempSavePayload[]; quickReplies?: NtftalkQuickTempSavePayload[]; } @@ -94,6 +96,7 @@ export interface NtftalkTempUpdatePayload { templateContent: string; inspectionStatus?: string; status?: string; + pcflag?: string; buttons?: NtftalkBtnTempSavePayload[]; quickReplies?: NtftalkQuickTempSavePayload[]; }