Files
taxbaik/TaxBaik.Web/Components/Admin/Pages/Dashboard.razor
T
kjh2064 f29f2c3cff
TaxBaik Browser E2E / browser-e2e (push) Failing after 1m3s
TaxBaik CI/CD / build-and-deploy (push) Failing after 2m46s
개선: 배포 검증과 관리자 UX 안정화
2026-06-27 20:57:09 +09:00

79 lines
2.5 KiB
Plaintext

@page "/admin/dashboard"
@using TaxBaik.Application.Services
@inject AdminDashboardService DashboardService
<PageTitle>대시보드</PageTitle>
<h1 class="mb-4">대시보드</h1>
<MudGrid>
<MudItem xs="12" sm="6" md="3">
<MudPaper Class="pa-4" Elevation="1">
<MudText Typo="Typo.subtitle2">이번달 문의</MudText>
<MudText Typo="Typo.h4">@summary.ThisMonthInquiries</MudText>
</MudPaper>
</MudItem>
<MudItem xs="12" sm="6" md="3">
<MudPaper Class="pa-4" Elevation="1">
<MudText Typo="Typo.subtitle2">신규 문의</MudText>
<MudText Typo="Typo.h4">@summary.NewInquiries</MudText>
</MudPaper>
</MudItem>
<MudItem xs="12" sm="6" md="3">
<MudPaper Class="pa-4" Elevation="1">
<MudText Typo="Typo.subtitle2">전체 포스트</MudText>
<MudText Typo="Typo.h4">@summary.TotalPosts</MudText>
</MudPaper>
</MudItem>
<MudItem xs="12" sm="6" md="3">
<MudPaper Class="pa-4" Elevation="1">
<MudText Typo="Typo.subtitle2">발행된 포스트</MudText>
<MudText Typo="Typo.h4">@summary.PublishedPosts</MudText>
</MudPaper>
</MudItem>
</MudGrid>
<MudPaper Class="pa-4 mt-4" Elevation="1">
<MudText Typo="Typo.h6" Class="mb-3">최근 문의</MudText>
<MudSimpleTable Striped="true" Dense="true">
<thead>
<tr>
<th>이름</th>
<th>전화</th>
<th>분야</th>
<th>상태</th>
<th>날짜</th>
</tr>
</thead>
<tbody>
@foreach (var inquiry in summary.RecentInquiries)
{
<tr>
<td>@inquiry.Name</td>
<td>@inquiry.Phone</td>
<td>@inquiry.ServiceType</td>
<td>
<MudChip Size="Size.Small"
Color="@(inquiry.Status == "new" ? Color.Warning : inquiry.Status == "contacted" ? Color.Info : Color.Success)">
@inquiry.Status
</MudChip>
</td>
<td>@inquiry.CreatedAt.ToString("yyyy-MM-dd")</td>
</tr>
}
</tbody>
</MudSimpleTable>
</MudPaper>
@code {
private AdminDashboardSummary summary = new(0, 0, 0, 0, []);
protected override async Task OnInitializedAsync()
{
summary = await DashboardService.GetSummaryAsync();
}
}