@page "/admin/inquiries" @attribute [Authorize] @using TaxBaik.Web.Services @inject IInquiryBrowserClient InquiryClient 문의 관리
Customer Requests 문의 관리 상담 요청을 상태별로 확인하고 후속 조치를 기록합니다.
새 문의 등록
@if (isLoading) { } else { } @code { [CascadingParameter] private Task? AuthStateTask { get; set; } private bool isLoading = true; private IReadOnlyList allInquiries = []; protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { if (AuthStateTask != null) { var authState = await AuthStateTask; if (authState.User.Identity?.IsAuthenticated == true) { await LoadData(); StateHasChanged(); } } } } private async Task LoadData() { isLoading = true; try { var (items, _) = await InquiryClient.GetPagedAsync(1, 200); allInquiries = items.ToList(); } catch { allInquiries = []; } finally { isLoading = false; } } }