This commit is contained in:
@@ -1,4 +1,34 @@
|
||||
@page
|
||||
@model TaxBaik.Web.Pages.Admin.TaxProfiles.IndexModel
|
||||
@{ ViewData["Title"] = "세무 프로필"; }
|
||||
<section class="container py-5"><h1 class="h2 fw-bold">세무 프로필 관리</h1></section>
|
||||
|
||||
<section class="container-fluid py-4">
|
||||
<partial name="_AdminPageHeader" model='("Tax", "세무 프로필 관리", "고객별 세무 속성을 관리합니다.", null, null)' />
|
||||
<div class="card">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-vcenter card-table">
|
||||
<thead>
|
||||
<tr><th>고객ID</th><th>사업유형</th><th>세무위험</th><th>다음신고일</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model.Items.Count == 0)
|
||||
{
|
||||
<tr><td colspan="4"><partial name="_EmptyState" model="세무 프로필이 없습니다." /></td></tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in Model.Items)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.ClientId</td>
|
||||
<td>@item.BusinessType</td>
|
||||
<td><partial name="_StatusBadge" model="@(item.TaxRiskLevel ?? "normal")" /></td>
|
||||
<td>@item.NextFilingDueDate?.ToString("yyyy-MM-dd")</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using TaxBaik.Application.Services;
|
||||
using TaxBaik.Domain.Entities;
|
||||
using TaxBaik.Web.Services;
|
||||
namespace TaxBaik.Web.Pages.Admin.TaxProfiles;
|
||||
[Authorize(AuthenticationSchemes = AdminAuthDefaults.Scheme)]
|
||||
public class IndexModel : PageModel { }
|
||||
|
||||
namespace TaxBaik.Web.Pages.Admin.TaxProfiles;
|
||||
|
||||
[Authorize(AuthenticationSchemes = AdminAuthDefaults.Scheme)]
|
||||
public class IndexModel(TaxProfileService taxProfileService) : PageModel
|
||||
{
|
||||
public List<TaxProfile> Items { get; private set; } = [];
|
||||
|
||||
public async Task OnGetAsync(CancellationToken ct = default)
|
||||
=> Items = (await taxProfileService.GetAllAsync(ct)).ToList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user