From 832aa49e96d894a388f6795c4d541a81153d039f Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sat, 27 Jun 2026 16:30:23 +0900 Subject: [PATCH] feat: improve inquiry list and telegram ids --- TaxBaik.Web/Components/Admin/InquiryTable.razor | 13 +++++++++++-- .../Services/TelegramInquiryNotificationService.cs | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/TaxBaik.Web/Components/Admin/InquiryTable.razor b/TaxBaik.Web/Components/Admin/InquiryTable.razor index 0fdabb2..4492563 100644 --- a/TaxBaik.Web/Components/Admin/InquiryTable.razor +++ b/TaxBaik.Web/Components/Admin/InquiryTable.razor @@ -19,11 +19,11 @@ @inquiry.Name @inquiry.Phone @inquiry.ServiceType - @inquiry.Message.Substring(0, Math.Min(30, inquiry.Message.Length))... + @GetPreview(inquiry.Message) @inquiry.CreatedAt.ToString("yyyy-MM-dd") 보기 + Href="@($"/taxbaik/admin/inquiries/{inquiry.Id}")">상세 } @@ -51,6 +51,15 @@ : inquiries.Where(x => x.Status == Status).ToList(); } + private static string GetPreview(string message) + { + if (string.IsNullOrWhiteSpace(message)) + return "-"; + + var trimmed = message.Trim(); + return trimmed.Length <= 30 ? trimmed : $"{trimmed[..30]}..."; + } + protected override async Task OnParametersSetAsync() { FilterInquiries(); diff --git a/TaxBaik.Web/Services/TelegramInquiryNotificationService.cs b/TaxBaik.Web/Services/TelegramInquiryNotificationService.cs index f6a5a9a..54245ac 100644 --- a/TaxBaik.Web/Services/TelegramInquiryNotificationService.cs +++ b/TaxBaik.Web/Services/TelegramInquiryNotificationService.cs @@ -32,6 +32,7 @@ public class TelegramInquiryNotificationService : IInquiryNotificationService var text = new StringBuilder() .AppendLine("🆕 새 문의가 접수되었습니다.") .AppendLine() + .AppendLine($"문의 번호: #{inquiryId}") .AppendLine($"제목: {serviceType}") .AppendLine($"이름: {name}") .AppendLine($"연락처: {phone}") @@ -76,6 +77,7 @@ public class TelegramInquiryNotificationService : IInquiryNotificationService var text = new StringBuilder() .AppendLine("✏️ 문의 상태가 변경되었습니다.") .AppendLine() + .AppendLine($"문의 번호: #{inquiryId}") .AppendLine($"제목: {serviceType}") .AppendLine($"이름: {name}") .AppendLine($"연락처: {phone}")