260826_01_ENH: notihub 수정으로 인한 후속 조치

This commit is contained in:
2026-08-26 12:46:26 +09:00
parent be67eed7e4
commit a603f6ad6f
11 changed files with 173 additions and 51 deletions

View File

@@ -15,7 +15,7 @@ import {
useTemplateListQuery,
useTemplateQuery,
} from '@/query/message'
import { ChannelType, TemplateSms, type TemplateSummary } from '@kri/common/noti-hub'
import { ChannelType, TemplateSms } from '@kri/common/noti-hub'
import { sanitizeHtmlForPreview } from '@/components/kri-editor/utils/sanitizeHtml'
import { cn } from '@/lib/utils'
import { getNearestFutureDateTime } from '@/lib/datetime'
@@ -28,7 +28,8 @@ import { KriEditor } from '@/components/kri-editor'
import { normalizeQrCodeForEditor, QR_CODE_ALLOWED_HTML, renderQrCodePreviewHtml } from '@/components/message-template/qrcode'
import { applyLinkPreviewClass } from '@/components/kri-editor/utils/linkPreview'
import TemplateAttachmentList from '@/components/message-template/TemplateAttachmentList'
import type { TemplateEmailWithAttachments } from '@/types/message'
import type { TemplateEmailWithAttachments, TemplateSummaryWithPurpose } from '@/types/message'
import { TEMPLATE_PURPOSE } from '@/const/messageTemplateConst'
export type MessageSendMode = 'email' | 'sms'
@@ -79,7 +80,10 @@ const MessageSendDialog = ({
const enabled = resolvedOpen && !!selectedProject && prjctIdx > 0
const templateListQuery = useTemplateListQuery(chnnlTy, itrntPrjctCd, enabled)
const templateList: TemplateSummary[] = templateListQuery.data ?? []
// 대량 발송 및 bulk key 생성 경로에서는 휴대전화번호 인증 템플릿(tmplatPurpose === 1)을 선택할 수 없다.
const templateList: TemplateSummaryWithPurpose[] = (templateListQuery.data ?? []).filter(
(t) => t.tmplatPurpose !== TEMPLATE_PURPOSE.PHONE_VERIFICATION,
)
const templateDetailQuery = useTemplateQuery(templateIdx ?? 0, enabled && !!templateIdx)
const selectedTemplate = templateDetailQuery.data ?? null
const mainTemplateQuery = useMainTemplateIdxQuery(prjctIdx, chnnlTy, enabled)