refactor: Phase 7-3 - Clients + TaxFilings API-First (WIP)
TaxBaik CI/CD / build-and-deploy (push) Successful in 54s

**Clients Migration Complete:**
- ClientController: GET /api/client (paged), POST/PUT/DELETE
- ClientBrowserClient: IClientBrowserClient interface + implementation
- ClientList.razor: Service → API client
- ClientEdit.razor: Service → API client (Create/Update)

**TaxFilings API Framework Ready:**
- TaxFilingController: GET upcoming, GET by client, POST/PUT/DELETE
- TaxFilingBrowserClient: ITaxFilingBrowserClient interface + impl
- Registered in Program.cs with TokenRefreshHandler

**SOLID Applied:**
✓ Separation of concerns (Controller → Service → Repository)
✓ Dependency inversion (Blazor → Browser clients, not services)
✓ Interface segregation (Specialized clients per domain)

**Status:**
- Clients Blazor:  ClientList + ClientEdit refactored
- TaxFilings Blazor:  Pending refactor (pages exist)
- Faqs:  API + Blazor pending
- Announcements:  API + Blazor pending
- Phase 6 SignalR:  Deferred

Next: Refactor TaxFilings Blazor pages, then Faqs & Announcements
Build:  Success (0 errors, 2 warnings in Dashboard)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 11:08:43 +09:00
parent 160afb7c7e
commit fbdbbc7a1f
7 changed files with 503 additions and 32 deletions
@@ -1,8 +1,8 @@
@page "/admin/clients"
@attribute [Authorize]
@using TaxBaik.Application.Services
@using TaxBaik.Web.Services
@using TaxBaik.Domain.Entities
@inject ClientService ClientService
@inject IClientBrowserClient ClientClient
@inject NavigationManager Navigation
@inject IDialogService DialogService
@inject ISnackbar Snackbar
@@ -141,14 +141,24 @@
private async Task LoadAsync()
{
var (items, total) = await ClientService.GetPagedAsync(
currentPage, PageSize,
string.IsNullOrEmpty(statusFilter) ? null : statusFilter,
string.IsNullOrEmpty(searchText) ? null : searchText);
try
{
var (items, total) = await ClientClient.GetPagedAsync(
currentPage, PageSize,
string.IsNullOrEmpty(statusFilter) ? null : statusFilter,
string.IsNullOrEmpty(searchText) ? null : searchText);
clients = items.ToList();
totalCount = total;
totalPages = (int)Math.Ceiling((double)total / PageSize);
clients = items.ToList();
totalCount = total;
totalPages = (int)Math.Ceiling((double)total / PageSize);
}
catch (Exception ex)
{
Snackbar.Add($"오류: {ex.Message}", Severity.Error);
clients = [];
totalCount = 0;
totalPages = 0;
}
}
private async Task SearchAsync()
@@ -185,8 +195,23 @@
if (confirmed != true) return;
await ClientService.DeleteAsync(client.Id);
Snackbar.Add($"{client.Name} 고객이 삭제되었습니다.", Severity.Success);
try
{
var success = await ClientClient.DeleteAsync(client.Id);
if (success)
{
Snackbar.Add($"{client.Name} 고객이 삭제되었습니다.", Severity.Success);
await LoadAsync();
}
else
{
Snackbar.Add("삭제에 실패했습니다.", Severity.Error);
}
}
catch (Exception ex)
{
Snackbar.Add($"오류: {ex.Message}", Severity.Error);
}
await LoadAsync();
}
}