|
|
|
@@ -24,7 +24,7 @@ import {SaveTemplateRequest, Template} from "@/types/notification";
|
|
|
|
import {UserCompact} from "@/types/gwcf";
|
|
|
|
import {UserCompact} from "@/types/gwcf";
|
|
|
|
import {getDetailValue} from "@/lib/gwcf/view";
|
|
|
|
import {getDetailValue} from "@/lib/gwcf/view";
|
|
|
|
import {useAuth} from "@/hooks/useAuth";
|
|
|
|
import {useAuth} from "@/hooks/useAuth";
|
|
|
|
import {buildTemplatePreviewBody, buildUserMsgParam, getSmsByteLength, isPhoneVerificationSupported} from "@/lib/gwcf/notification";
|
|
|
|
import { buildUserMsgParam, isPhoneVerificationSupported} from "@/lib/gwcf/notification";
|
|
|
|
import {getSmsParamLabel} from "@/lib/gwcf/field-labels";
|
|
|
|
import {getSmsParamLabel} from "@/lib/gwcf/field-labels";
|
|
|
|
import {TMPLAT_PURPOSE} from "@/types/notification";
|
|
|
|
import {TMPLAT_PURPOSE} from "@/types/notification";
|
|
|
|
|
|
|
|
|
|
|
|
@@ -209,7 +209,6 @@ export function SmsSendDialog({
|
|
|
|
setDraft(null);
|
|
|
|
setDraft(null);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const previewBody = draft ? buildTemplatePreviewBody(draft) : "";
|
|
|
|
|
|
|
|
const isSmsOrLms = draft ? isPhoneVerificationSupported(draft) : false;
|
|
|
|
const isSmsOrLms = draft ? isPhoneVerificationSupported(draft) : false;
|
|
|
|
|
|
|
|
|
|
|
|
const send = async () => {
|
|
|
|
const send = async () => {
|
|
|
|
@@ -356,11 +355,6 @@ export function SmsSendDialog({
|
|
|
|
className="min-h-80 w-full rounded-md border border-input bg-background p-3 text-sm disabled:cursor-not-allowed disabled:opacity-70"
|
|
|
|
className="min-h-80 w-full rounded-md border border-input bg-background p-3 text-sm disabled:cursor-not-allowed disabled:opacity-70"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</label>
|
|
|
|
<div className="space-y-1 rounded-md border bg-muted/20 p-3 text-sm">
|
|
|
|
|
|
|
|
<div className="font-medium">미리보기</div>
|
|
|
|
|
|
|
|
<div className="whitespace-pre-wrap text-muted-foreground">{previewBody}</div>
|
|
|
|
|
|
|
|
{isSmsOrLms && <div className="text-xs text-muted-foreground">{getSmsByteLength(previewBody)} bytes</div>}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{msgParamKeys.length > 0 && (
|
|
|
|
{msgParamKeys.length > 0 && (
|
|
|
|
<div className="space-y-1 text-sm">
|
|
|
|
<div className="space-y-1 text-sm">
|
|
|
|
<div className="font-medium text-muted-foreground">사용 가능 변수값</div>
|
|
|
|
<div className="font-medium text-muted-foreground">사용 가능 변수값</div>
|
|
|
|
|