57269e281d
TaxBaik CI/CD / build-and-deploy (push) Failing after 36s
분리의 단점을 제거하고 단일 앱으로 통합: 구조 변경: - TaxBaik.Admin → TaxBaik.Web/Components/Admin/ - Admin Services → TaxBaik.Web/Services/ - 포트: 5001 (기존 5002 제거) 경로: - 홈페이지: http://localhost:5001/taxbaik - 관리자: http://localhost:5001/taxbaik/admin 기술: - Razor Pages (Web) + Blazor Server (Admin) 통합 - 단일 Program.cs로 양쪽 모두 지원 - JWT 인증 유지 - MudBlazor UI 유지 장점: - 개발 복잡도 감소 (터미널 1개) - 배포 단순화 (앱 1개) - DB 마이그레이션 1회 실행 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
93 lines
3.1 KiB
Plaintext
93 lines
3.1 KiB
Plaintext
@page "/admin/dashboard"
|
|
@using TaxBaik.Application.Services
|
|
@using TaxBaik.Domain.Interfaces
|
|
@attribute [Authorize]
|
|
@inject IInquiryRepository InquiryRepository
|
|
@inject BlogService BlogService
|
|
|
|
<PageTitle>대시보드</PageTitle>
|
|
|
|
<MudText Typo="Typo.h5" Class="mb-4">📊 대시보드</MudText>
|
|
|
|
<MudGrid>
|
|
<MudItem xs="12" sm="6" md="3">
|
|
<MudPaper Class="pa-4" Elevation="1">
|
|
<MudText Typo="Typo.subtitle2">이번달 문의</MudText>
|
|
<MudText Typo="Typo.h4">@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">@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">@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">@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 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 int thisMonthInquiries = 0;
|
|
private int newInquiries = 0;
|
|
private int totalPosts = 0;
|
|
private int publishedPosts = 0;
|
|
private List<Domain.Entities.Inquiry> recentInquiries = [];
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
var (inquiries, total) = await InquiryRepository.GetPagedAsync(1, 100);
|
|
recentInquiries = inquiries.OrderByDescending(x => x.CreatedAt).Take(5).ToList();
|
|
|
|
var now = DateTime.UtcNow;
|
|
thisMonthInquiries = inquiries.Count(x => x.CreatedAt.Year == now.Year && x.CreatedAt.Month == now.Month);
|
|
newInquiries = inquiries.Count(x => x.Status == "new");
|
|
totalPosts = 0; // TODO: get from blog service
|
|
publishedPosts = 0; // TODO: get from blog service
|
|
}
|
|
}
|