e5981769b9
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m11s
- Admin: replace the global @rendermode on <Routes>/<Router> with per-page render mode. Login.razor now prerenders (form visible before WASM loads); every other [Authorize] page stays prerender: false to avoid the AuthorizeRouteView blank-render regression from earlier attempts. Adds a "준비 중" -> "로그인" splash tied to WASM boot completion, and lets the authenticated-shell loading overlay stay up until AdminShell actually renders. - Contact.cshtml: fix the "Agree" checkbox missing value="true" - a checked box sent the browser-default "on", which bool model binding can't parse, so ModelState.IsValid silently went false and OnPostAsync returned a blank form with no visible error on every submission. Validation summary widened from ModelOnly to All so this class of failure isn't silent again. - TelegramInquiryNotificationService: read Telegram:InquiryChatId (falling back to ChatId) instead of only ChatId, matching the channel routing CLAUDE.md documents and deploy.yml already provisions as separate secrets. - Reconcile CLAUDE.md's self-contradicting Phase 8 prerender notes (Phase 9), rewrite validate_admin_render.sh for the per-page design, and add a SmartAdmin 5.5 design reference section to DOUZONE_UX_GUIDE.md for future admin screens (existing screens unchanged, tracked as WBS P4-03). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
61 lines
1.9 KiB
Plaintext
61 lines
1.9 KiB
Plaintext
@page "/admin/inquiries/create"
|
|
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
|
@attribute [Authorize]
|
|
@using TaxBaik.Application.DTOs
|
|
@using TaxBaik.WasmClient.Components.Admin.Forms
|
|
@inject IInquiryBrowserClient InquiryClient
|
|
@inject NavigationManager Navigation
|
|
@inject ISnackbar Snackbar
|
|
|
|
<PageTitle>문의 등록</PageTitle>
|
|
|
|
<AdminCrudPageShell Title="새 문의 등록"
|
|
Eyebrow="Customer Relations"
|
|
Subtitle="고객 문의를 등록합니다. (전화, 오프라인 등)"
|
|
Loading="@false"
|
|
OnCancel="@GoBack">
|
|
<MudPaper Class="pa-4 mt-4" Elevation="1">
|
|
<InquiryForm ButtonText="등록" OnSubmit="HandleCreate" OnCancel="GoBack" />
|
|
</MudPaper>
|
|
</AdminCrudPageShell>
|
|
|
|
@code {
|
|
private void GoBack()
|
|
{
|
|
Navigation.NavigateTo("/taxbaik/admin/inquiries");
|
|
}
|
|
|
|
private async Task HandleCreate(InquiryForm.InquiryFormModel model)
|
|
{
|
|
try
|
|
{
|
|
var result = await InquiryClient.CreateAsync(new SubmitInquiryDto
|
|
{
|
|
Name = model.Name,
|
|
Phone = model.Phone,
|
|
Email = model.Email,
|
|
ServiceType = model.ServiceType,
|
|
Message = model.Message,
|
|
SuppressNotification = true
|
|
});
|
|
|
|
if (result == null)
|
|
{
|
|
Snackbar.Add("문의가 등록되지 않았습니다.", Severity.Error);
|
|
return;
|
|
}
|
|
|
|
Snackbar.Add("문의가 등록되었습니다.", Severity.Success);
|
|
Navigation.NavigateTo("/taxbaik/admin/inquiries");
|
|
}
|
|
catch (ValidationException ex)
|
|
{
|
|
Snackbar.Add(ex.Message, Severity.Error);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Snackbar.Add($"등록 실패: {ex.Message}", Severity.Error);
|
|
}
|
|
}
|
|
}
|