260810_04_ENH: 컨택 화면 ui 변경 및 개별 발송시 미리보기에 치환 문자열 치환 돼서 보여지도록 수정

This commit is contained in:
2026-08-10 11:57:44 +09:00
parent ef748142f8
commit 9b93d45ed0
7 changed files with 64 additions and 30 deletions

View File

@@ -22,22 +22,9 @@ import { useCtiLastCallHistId } from '@/hooks/useCtiLastCallHistId'
import { getCurrentPositionMeta } from '@kri/common/browser'
import type { listHeader, ListSearchWithFullResult } from '@/types/list'
import { buildListContactVariableValues } from '@/components/list-contact/listContactVariables'
import { substituteVariables } from '@/lib/surveyUrl'
import { escapeHtml, substituteVariables } from '@/lib/variableSubstitution'
import { sanitizeHtml } from '@/components/kri-editor/utils/sanitizeHtml'
const escapeHtml = (value: string) =>
value.replace(
/[&<>"']/g,
(character) =>
({
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;',
})[character] ?? character,
)
const RefreshIconButton = ({ onRefresh, isFetching }: { onRefresh: () => void; isFetching: boolean }) => (
<Button
type="button"
@@ -203,6 +190,7 @@ const ContactEventSection = ({
<CollapsibleHistorySection
title={`${title}(최근순)`}
defaultOpen
showDivider={showInput}
headerExtra={<RefreshIconButton onRefresh={() => historyQuery.refetch()} isFetching={historyQuery.isFetching} />}
>
@@ -261,6 +249,7 @@ const SendResultHistory = ({ sid, prjctCd }: { sid: string; prjctCd: string }) =
<div className="space-y-2 rounded-lg border bg-white p-4">
<CollapsibleHistorySection
title="발송 현황(최근순)"
defaultOpen
showDivider={false}
headerExtra={
<div className="flex items-center gap-1">