From ece81306fb67958945d33ea9cf2e2c2327fee61d Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Wed, 8 Jul 2026 00:32:07 +0900 Subject: [PATCH] Replace admin MudBlazor shell with plain HTML --- .../Admin/Pages/DashboardOverview.razor | 244 +----------------- .../Components/Admin/Shared/AdminShell.razor | 10 +- .../Admin/Shared/AdminSidebar.razor | 40 ++- 3 files changed, 26 insertions(+), 268 deletions(-) diff --git a/src/TaxBaik.Web.Client/Components/Admin/Pages/DashboardOverview.razor b/src/TaxBaik.Web.Client/Components/Admin/Pages/DashboardOverview.razor index cd58745..74773d2 100644 --- a/src/TaxBaik.Web.Client/Components/Admin/Pages/DashboardOverview.razor +++ b/src/TaxBaik.Web.Client/Components/Admin/Pages/DashboardOverview.razor @@ -1,240 +1,10 @@ -@inject TaxBaik.Web.Client.Components.Admin.Services.IAdminDashboardClient DashboardClient -@inject NavigationManager Navigation - 대시보드 - - - 새로고침 - - + - - @if (loading) - { - - - - } - else - { - - - - - - - - - - - - - - - - - - @foreach (var action in QuickActions) - { - - @action.Label - - } - - - - - - - - @if (summary?.RecentInquiries is null || !summary.RecentInquiries.Any()) - { - - } - else - { - - - - 제목 - 상태 - 접수일 - - - - @foreach (var inquiry in summary.RecentInquiries) - { - - @inquiry.Name - @inquiry.Status - @inquiry.CreatedAt.ToString("yyyy-MM-dd") - - } - - - } - - - - - - - @if (monthlyStats is not null) - { -
-
- 총 문의 - @monthlyStats.TotalInquiries -
-
- 상담 중 - @monthlyStats.ConsultingCount -
-
- 완료 - @monthlyStats.CompletedCount -
-
- 완료율 - @monthlyStats.CompletionRate.ToString("0.#")% -
-
-
-
- 최근 6개월 문의 추세 - @monthlyStats.Month -
-
- @foreach (var point in trendPoints) - { -
- @point.Label -
-
-
- @point.Total -
- } -
-
- } -
-
- - - - -
- @foreach (var action in QuickActions) - { - - - @action.Label - - } -
-
-
- - - - -
-
대시보드와 메뉴가 역할 기반으로 필터링됩니다.
-
공통 CRUD 화면은 `AdminPageHeader`/`AdminCrudPageShell` 슬롯 패턴을 따릅니다.
-
월간 통계는 문의 전환 흐름을 빠르게 보는 용도입니다.
-
-
-
- - - - - - - @(summary is not null && summary.NewInquiries > 0 - ? $"처리 대기 중인 신규 문의가 {summary.NewInquiries}건 있습니다." - : "현재 신규 문의가 없습니다.") - - - @(summary is not null && summary.PublishedPosts < summary.TotalPosts - ? "비공개 중인 게시글이 있어 발행 상태 확인이 필요합니다." - : "게시글 발행 상태가 안정적입니다.") - - - - - } -
- -@code { - private bool loading = true; - private bool statsLoading = true; - private AdminDashboardSummary? summary; - private TaxBaik.Web.Client.Components.Admin.Services.MonthlyStatsDto? monthlyStats; - private readonly List<(string Label, int Total)> trendPoints = []; - - private static readonly (string Label, string Href, string Icon)[] QuickActions = - [ - ("공지 등록", "/taxbaik/admin/announcements/create", Icons.Material.Filled.Campaign), - ("고객사 등록", "/taxbaik/admin/companies/create", Icons.Material.Filled.Business), - ("문의 관리", "/taxbaik/admin/inquiries", Icons.Material.Filled.Inbox), - ("설정 열기", "/taxbaik/admin/settings", Icons.Material.Filled.Settings), - ]; - - protected override async Task OnInitializedAsync() - { - await LoadAsync(); - await LoadStatsAsync(); - await LoadTrendAsync(); - } - - private async Task ReloadAsync() - { - await LoadAsync(); - } - - private async Task LoadAsync() - { - loading = true; - try - { - summary = await DashboardClient.GetSummaryAsync(); - } - finally - { - loading = false; - } - } - - private async Task LoadStatsAsync() - { - statsLoading = true; - try - { - monthlyStats = await DashboardClient.GetMonthlyStatsAsync(); - } - finally - { - statsLoading = false; - } - } - - private async Task LoadTrendAsync() - { - trendPoints.Clear(); - var today = DateTime.Today; - for (var i = 5; i >= 0; i--) - { - var month = today.AddMonths(-i); - var monthly = await DashboardClient.GetMonthlyStatsAsync(month.ToString("yyyy-MM")); - trendPoints.Add(($"{month:MM}", monthly.TotalInquiries)); - } - } - - private static string BarWidth(int value, int total) - => total <= 0 ? "0%" : $"{Math.Max(6, (int)Math.Round(value * 100.0 / total))}%"; - - private int trendMax => Math.Max(1, trendPoints.Count == 0 ? 1 : trendPoints.Max(x => x.Total)); -} + +
+
대시보드 본문을 단계적으로 복원하며 `get` interop 오류를 추적합니다.
+
현재 화면은 JS 호출 없이 렌더만 수행합니다.
+
+
diff --git a/src/TaxBaik.Web.Client/Components/Admin/Shared/AdminShell.razor b/src/TaxBaik.Web.Client/Components/Admin/Shared/AdminShell.razor index 13291ee..07c7b2e 100644 --- a/src/TaxBaik.Web.Client/Components/Admin/Shared/AdminShell.razor +++ b/src/TaxBaik.Web.Client/Components/Admin/Shared/AdminShell.razor @@ -9,12 +9,8 @@
세무회계 관리 대시보드
- - 공개 사이트 - - - 로그아웃 - + 공개 사이트 + 로그아웃
@@ -45,6 +41,8 @@ private void OnLocationChanged(object? sender, LocationChangedEventArgs args) { + drawerOpen = true; + InvokeAsync(StateHasChanged); } private void ToggleDrawer() diff --git a/src/TaxBaik.Web.Client/Components/Admin/Shared/AdminSidebar.razor b/src/TaxBaik.Web.Client/Components/Admin/Shared/AdminSidebar.razor index cf9a51d..9a92bfe 100644 --- a/src/TaxBaik.Web.Client/Components/Admin/Shared/AdminSidebar.razor +++ b/src/TaxBaik.Web.Client/Components/Admin/Shared/AdminSidebar.razor @@ -11,36 +11,26 @@