This commit is contained in:
@@ -46,61 +46,44 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<MudDataGrid T="Contract"
|
<table class="admin-grid table">
|
||||||
Items="@contracts"
|
<thead>
|
||||||
Dense="true"
|
<tr>
|
||||||
Hover="true"
|
<th>ID</th>
|
||||||
Striped="true"
|
<th>고객</th>
|
||||||
|
<th>계약번호</th>
|
||||||
RowsPerPage="30"
|
<th>서비스 유형</th>
|
||||||
SelectedItem="@selectedContract"
|
<th>월 수수료</th>
|
||||||
SelectedItemChanged="OnRowSelected"
|
<th>계약기간</th>
|
||||||
Class="admin-grid">
|
<th>상태</th>
|
||||||
<Columns>
|
<th>작업</th>
|
||||||
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" />
|
</tr>
|
||||||
<TemplateColumn Title="고객">
|
</thead>
|
||||||
<CellTemplate>
|
<tbody>
|
||||||
@if (clientMap.TryGetValue(context.Item.ClientId, out var clientName))
|
@foreach (var item in contracts)
|
||||||
{
|
{
|
||||||
@clientName
|
var isActive = !item.EndDate.HasValue || item.EndDate.Value >= DateTime.Today;
|
||||||
}
|
<tr @onclick="() => OnRowSelected(item)" style="cursor:pointer;">
|
||||||
</CellTemplate>
|
<td>@item.Id</td>
|
||||||
</TemplateColumn>
|
<td>@clientMap.GetValueOrDefault(item.ClientId)</td>
|
||||||
<PropertyColumn Property="x => x.ContractNumber" Title="계약번호" />
|
<td>@item.ContractNumber</td>
|
||||||
<PropertyColumn Property="x => x.ServiceType" Title="서비스 유형" />
|
<td>@item.ServiceType</td>
|
||||||
<PropertyColumn Property="x => x.MonthlyFee" Title="월 수수료" Format="C" />
|
<td>@(item.MonthlyFee?.ToString("C") ?? string.Empty)</td>
|
||||||
<TemplateColumn Title="계약기간">
|
<td>
|
||||||
<CellTemplate>
|
@item.StartDate.ToString("yyyy-MM-dd")
|
||||||
@context.Item.StartDate.ToString("yyyy-MM-dd")
|
@if (item.EndDate.HasValue)
|
||||||
@if (context.Item.EndDate.HasValue)
|
|
||||||
{
|
{
|
||||||
<span>~@context.Item.EndDate.Value.ToString("yyyy-MM-dd")</span>
|
<span>~@item.EndDate.Value.ToString("yyyy-MM-dd")</span>
|
||||||
}
|
}
|
||||||
</CellTemplate>
|
</td>
|
||||||
</TemplateColumn>
|
<td>@(isActive ? "활성" : "만료")</td>
|
||||||
<TemplateColumn Title="상태">
|
<td>
|
||||||
<CellTemplate>
|
<button type="button" class="mud-button-root mud-button mud-button-text mud-ripple" @onclick:stopPropagation="true" @onclick="@(async () => await DeleteContract(item.Id))">삭제</button>
|
||||||
@{
|
</td>
|
||||||
var isActive = !context.Item.EndDate.HasValue || context.Item.EndDate.Value >= DateTime.Today;
|
</tr>
|
||||||
}
|
}
|
||||||
@if (isActive)
|
</tbody>
|
||||||
{
|
</table>
|
||||||
<MudChip Size="Size.Small" Color="Color.Success" Variant="Variant.Filled">활성</MudChip>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<MudChip Size="Size.Small" Color="Color.Default" Variant="Variant.Outlined">만료</MudChip>
|
|
||||||
}
|
|
||||||
</CellTemplate>
|
|
||||||
</TemplateColumn>
|
|
||||||
<TemplateColumn Title="작업" Sortable="false">
|
|
||||||
<CellTemplate>
|
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" Size="Size.Small"
|
|
||||||
OnClick="@(async () => await DeleteContract(context.Item.Id))" />
|
|
||||||
</CellTemplate>
|
|
||||||
</TemplateColumn>
|
|
||||||
</Columns>
|
|
||||||
</MudDataGrid>
|
|
||||||
}
|
}
|
||||||
</MudItem>
|
</MudItem>
|
||||||
|
|
||||||
|
|||||||
@@ -40,35 +40,28 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<MudDataGrid T="TaxFilingSchedule"
|
<table class="admin-grid table">
|
||||||
Items="@schedules"
|
<thead>
|
||||||
Dense="true"
|
<tr>
|
||||||
Hover="true"
|
<th>ID</th>
|
||||||
Striped="true"
|
<th>고객</th>
|
||||||
|
<th>신고 유형</th>
|
||||||
RowsPerPage="30"
|
<th>마감일</th>
|
||||||
SelectedItem="@selectedSchedule"
|
<th>신고연도</th>
|
||||||
SelectedItemChanged="OnRowSelected"
|
<th>상태</th>
|
||||||
Class="admin-grid">
|
<th>작업</th>
|
||||||
<Columns>
|
</tr>
|
||||||
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" />
|
</thead>
|
||||||
<TemplateColumn Title="고객">
|
<tbody>
|
||||||
<CellTemplate>
|
@foreach (var item in schedules)
|
||||||
@if (clientMap.TryGetValue(context.Item.ClientId, out var clientName))
|
|
||||||
{
|
{
|
||||||
@clientName
|
var effectiveDueDate = BusinessDayCalculator.GetEffectiveDueDate(DateOnly.FromDateTime(item.DueDate));
|
||||||
}
|
var daysLeft = BusinessDayCalculator.GetDday(DateOnly.FromDateTime(item.DueDate));
|
||||||
</CellTemplate>
|
<tr @onclick="() => OnRowSelected(item)" style="cursor:pointer;">
|
||||||
</TemplateColumn>
|
<td>@item.Id</td>
|
||||||
<PropertyColumn Property="x => x.FilingType" Title="신고 유형" />
|
<td>@clientMap.GetValueOrDefault(item.ClientId)</td>
|
||||||
<TemplateColumn Title="마감일">
|
<td>@item.FilingType</td>
|
||||||
<CellTemplate>
|
<td>
|
||||||
@{
|
|
||||||
var effectiveDueDate = BusinessDayCalculator.GetEffectiveDueDate(DateOnly.FromDateTime(context.Item.DueDate));
|
|
||||||
var daysLeft = BusinessDayCalculator.GetDday(DateOnly.FromDateTime(context.Item.DueDate));
|
|
||||||
var statusColor = daysLeft < 0 ? Color.Error : daysLeft <= 7 ? Color.Warning : Color.Success;
|
|
||||||
}
|
|
||||||
<MudChip Size="Size.Small" Color="@statusColor" Variant="Variant.Filled">
|
|
||||||
@effectiveDueDate.ToDateTime(TimeOnly.MinValue).ToString("yyyy-MM-dd")
|
@effectiveDueDate.ToDateTime(TimeOnly.MinValue).ToString("yyyy-MM-dd")
|
||||||
@if (daysLeft >= 0)
|
@if (daysLeft >= 0)
|
||||||
{
|
{
|
||||||
@@ -78,41 +71,20 @@ else
|
|||||||
{
|
{
|
||||||
<span class="ms-1">(마감 @Math.Abs(daysLeft)일 경과)</span>
|
<span class="ms-1">(마감 @Math.Abs(daysLeft)일 경과)</span>
|
||||||
}
|
}
|
||||||
</MudChip>
|
</td>
|
||||||
</CellTemplate>
|
<td>@item.FilingYear</td>
|
||||||
</TemplateColumn>
|
<td>@(item.Status == "completed" ? "완료" : "대기")</td>
|
||||||
<PropertyColumn Property="x => x.FilingYear" Title="신고연도" />
|
<td>
|
||||||
<TemplateColumn Title="상태">
|
<button type="button" class="mud-button-root mud-button mud-button-text mud-ripple" @onclick:stopPropagation="true" @onclick="@(async () => await DeleteSchedule(item.Id))">삭제</button>
|
||||||
<CellTemplate>
|
@if (item.Status != "completed")
|
||||||
@if (context.Item.Status == "completed")
|
|
||||||
{
|
{
|
||||||
<MudChip Size="Size.Small" Color="Color.Success" Variant="Variant.Filled">완료</MudChip>
|
<button type="button" class="mud-button-root mud-button mud-button-text mud-ripple ms-2" @onclick:stopPropagation="true" @onclick="@(async () => await CompleteSchedule(item.Id))">완료</button>
|
||||||
}
|
}
|
||||||
else
|
</td>
|
||||||
{
|
</tr>
|
||||||
<MudChip Size="Size.Small" Color="Color.Default" Variant="Variant.Outlined">대기</MudChip>
|
|
||||||
}
|
}
|
||||||
</CellTemplate>
|
</tbody>
|
||||||
</TemplateColumn>
|
</table>
|
||||||
<TemplateColumn Title="작업" Sortable="false">
|
|
||||||
<CellTemplate>
|
|
||||||
<MudButtonGroup Size="Size.Small" Variant="Variant.Outlined">
|
|
||||||
@if (context.Item.Status != "completed")
|
|
||||||
{
|
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.CheckCircle"
|
|
||||||
Color="Color.Success"
|
|
||||||
OnClick="@(async () => await CompleteSchedule(context.Item.Id))"
|
|
||||||
Title="완료" />
|
|
||||||
}
|
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Delete"
|
|
||||||
Color="Color.Error"
|
|
||||||
OnClick="@(async () => await DeleteSchedule(context.Item.Id))"
|
|
||||||
Title="삭제" />
|
|
||||||
</MudButtonGroup>
|
|
||||||
</CellTemplate>
|
|
||||||
</TemplateColumn>
|
|
||||||
</Columns>
|
|
||||||
</MudDataGrid>
|
|
||||||
}
|
}
|
||||||
</MudItem>
|
</MudItem>
|
||||||
|
|
||||||
|
|||||||
@@ -36,49 +36,33 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<MudDataGrid T="TaxProfile"
|
<table class="admin-grid table">
|
||||||
Items="@profiles"
|
<thead>
|
||||||
Dense="true"
|
<tr>
|
||||||
Hover="true"
|
<th>ID</th>
|
||||||
Striped="true"
|
<th>고객</th>
|
||||||
|
<th>사업 유형</th>
|
||||||
RowsPerPage="30"
|
<th>위험도</th>
|
||||||
SelectedItem="@selectedProfile"
|
<th>다음 신고</th>
|
||||||
SelectedItemChanged="OnRowSelected"
|
<th>작업</th>
|
||||||
Class="admin-grid">
|
</tr>
|
||||||
<Columns>
|
</thead>
|
||||||
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" />
|
<tbody>
|
||||||
<TemplateColumn Title="고객">
|
@foreach (var item in profiles)
|
||||||
<CellTemplate>
|
|
||||||
@if (clientMap.TryGetValue(context.Item.ClientId, out var clientName))
|
|
||||||
{
|
{
|
||||||
@clientName
|
<tr @onclick="() => OnRowSelected(item)" style="cursor:pointer;">
|
||||||
|
<td>@item.Id</td>
|
||||||
|
<td>@clientMap.GetValueOrDefault(item.ClientId)</td>
|
||||||
|
<td>@item.BusinessType</td>
|
||||||
|
<td>@item.TaxRiskLevel</td>
|
||||||
|
<td>@(item.NextFilingDueDate?.ToString("yyyy-MM-dd") ?? string.Empty)</td>
|
||||||
|
<td>
|
||||||
|
<button type="button" class="mud-button-root mud-button mud-button-text mud-ripple" @onclick:stopPropagation="true" @onclick="@(async () => await DeleteProfile(item.Id))">삭제</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
}
|
}
|
||||||
</CellTemplate>
|
</tbody>
|
||||||
</TemplateColumn>
|
</table>
|
||||||
<PropertyColumn Property="x => x.BusinessType" Title="사업 유형" />
|
|
||||||
<TemplateColumn Title="위험도">
|
|
||||||
<CellTemplate>
|
|
||||||
<MudChip Size="Size.Small" Color="@GetRiskColor(context.Item.TaxRiskLevel)" Variant="Variant.Filled">
|
|
||||||
@context.Item.TaxRiskLevel
|
|
||||||
</MudChip>
|
|
||||||
</CellTemplate>
|
|
||||||
</TemplateColumn>
|
|
||||||
<TemplateColumn Title="다음 신고">
|
|
||||||
<CellTemplate>
|
|
||||||
@if (context.Item.NextFilingDueDate.HasValue)
|
|
||||||
{
|
|
||||||
@context.Item.NextFilingDueDate.Value.ToString("yyyy-MM-dd")
|
|
||||||
}
|
|
||||||
</CellTemplate>
|
|
||||||
</TemplateColumn>
|
|
||||||
<TemplateColumn Title="작업" Sortable="false">
|
|
||||||
<CellTemplate>
|
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" Size="Size.Small" OnClick="@(async () => await DeleteProfile(context.Item.Id))" />
|
|
||||||
</CellTemplate>
|
|
||||||
</TemplateColumn>
|
|
||||||
</Columns>
|
|
||||||
</MudDataGrid>
|
|
||||||
}
|
}
|
||||||
</MudItem>
|
</MudItem>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user