feat: improve inquiry list and telegram ids
This commit is contained in:
@@ -19,11 +19,11 @@
|
||||
<td>@inquiry.Name</td>
|
||||
<td>@inquiry.Phone</td>
|
||||
<td>@inquiry.ServiceType</td>
|
||||
<td>@inquiry.Message.Substring(0, Math.Min(30, inquiry.Message.Length))...</td>
|
||||
<td>@GetPreview(inquiry.Message)</td>
|
||||
<td>@inquiry.CreatedAt.ToString("yyyy-MM-dd")</td>
|
||||
<td>
|
||||
<MudButton Size="Size.Small" Variant="Variant.Text"
|
||||
Href="@($"/taxbaik/admin/inquiries/{inquiry.Id}")">보기</MudButton>
|
||||
Href="@($"/taxbaik/admin/inquiries/{inquiry.Id}")">상세</MudButton>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user