c65742a0c7
TaxBaik CI/CD / build-and-deploy (push) Successful in 48s
Core Components: - Create reusable InquiryForm.razor component following SOLID principles - Implement InquiryCreate.razor for registering new inquiries (offline, phone) - Implement InquiryEdit.razor for modifying existing inquiries with delete - Add DeleteAsync method to InquiryRepository and InquiryService - Update InquiryList with 'Create' button and Edit link in table Architecture: - InquiryForm: Encapsulates form logic, can be reused for create/edit - Service Layer: All operations go through InquiryService for cache invalidation - Repository Pattern: Database operations isolated in InquiryRepository - UI Consistency: Both pages follow admin-page-hero pattern Features: - Admin can create inquiries from phone/offline consultations - Admin can modify inquiry details (name, phone, email, message, status, memo) - Admin can delete inquiries with confirmation dialog - All operations update dashboard cache - Status validation and error handling throughout Testing: - Updated FakeInquiryRepository in tests to implement DeleteAsync
69 lines
2.1 KiB
Plaintext
69 lines
2.1 KiB
Plaintext
@page "/admin/inquiries"
|
|
@attribute [Authorize]
|
|
@using TaxBaik.Web.Services
|
|
@inject IInquiryBrowserClient InquiryClient
|
|
|
|
<PageTitle>문의 관리</PageTitle>
|
|
|
|
<section class="admin-page-hero">
|
|
<div>
|
|
<MudText Typo="Typo.caption" Class="admin-eyebrow">Customer Requests</MudText>
|
|
<MudText Typo="Typo.h4" Class="admin-page-title">문의 관리</MudText>
|
|
<MudText Typo="Typo.body2" Class="admin-page-subtitle">상담 요청을 상태별로 확인하고 후속 조치를 기록합니다.</MudText>
|
|
</div>
|
|
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Add"
|
|
Href="/taxbaik/admin/inquiries/create">새 문의 등록</MudButton>
|
|
</section>
|
|
|
|
<MudPaper Class="admin-surface" Elevation="0">
|
|
@if (isLoading)
|
|
{
|
|
<MudProgressCircular Indeterminate="true" Class="ma-4" />
|
|
}
|
|
else
|
|
{
|
|
<MudTabs Rounded="true" Elevation="0" Class="admin-tabs">
|
|
<MudTabPanel Text="전체">
|
|
<InquiryTable Inquiries="allInquiries" Status="" />
|
|
</MudTabPanel>
|
|
<MudTabPanel Text="신규">
|
|
<InquiryTable Inquiries="allInquiries" Status="new" />
|
|
</MudTabPanel>
|
|
<MudTabPanel Text="상담중">
|
|
<InquiryTable Inquiries="allInquiries" Status="consulting" />
|
|
</MudTabPanel>
|
|
<MudTabPanel Text="계약완료">
|
|
<InquiryTable Inquiries="allInquiries" Status="contracted" />
|
|
</MudTabPanel>
|
|
<MudTabPanel Text="거절">
|
|
<InquiryTable Inquiries="allInquiries" Status="rejected" />
|
|
</MudTabPanel>
|
|
<MudTabPanel Text="종결">
|
|
<InquiryTable Inquiries="allInquiries" Status="closed" />
|
|
</MudTabPanel>
|
|
</MudTabs>
|
|
}
|
|
</MudPaper>
|
|
|
|
@code {
|
|
private bool isLoading = true;
|
|
private IReadOnlyList<Domain.Entities.Inquiry> allInquiries = [];
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
try
|
|
{
|
|
var (items, _) = await InquiryClient.GetPagedAsync(1, 200);
|
|
allInquiries = items.ToList();
|
|
}
|
|
catch
|
|
{
|
|
allInquiries = [];
|
|
}
|
|
finally
|
|
{
|
|
isLoading = false;
|
|
}
|
|
}
|
|
}
|