fix(admin): align holiday tests and loading flow
TaxBaik CI/CD / build-and-deploy (push) Successful in 4m14s
TaxBaik CI/CD / build-and-deploy (push) Successful in 4m14s
This commit is contained in:
@@ -7,9 +7,9 @@ public class BusinessDayCalculatorTests
|
|||||||
{
|
{
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(2026, 2, 14, 2026, 2, 19)]
|
[InlineData(2026, 2, 14, 2026, 2, 19)]
|
||||||
[InlineData(2026, 8, 15, 2026, 8, 20)]
|
[InlineData(2026, 8, 15, 2026, 8, 18)]
|
||||||
[InlineData(2026, 9, 24, 2026, 9, 29)]
|
[InlineData(2026, 9, 24, 2026, 9, 28)]
|
||||||
[InlineData(2026, 10, 3, 2026, 10, 8)]
|
[InlineData(2026, 10, 3, 2026, 10, 6)]
|
||||||
[InlineData(2027, 2, 6, 2027, 2, 10)]
|
[InlineData(2027, 2, 6, 2027, 2, 10)]
|
||||||
public void GetEffectiveDueDate_SkipsWeekendHolidayAndSubstituteHoliday(
|
public void GetEffectiveDueDate_SkipsWeekendHolidayAndSubstituteHoliday(
|
||||||
int dueYear, int dueMonth, int dueDay,
|
int dueYear, int dueMonth, int dueDay,
|
||||||
|
|||||||
@@ -112,18 +112,14 @@
|
|||||||
a.Title.Contains(searchQuery, StringComparison.OrdinalIgnoreCase))
|
a.Title.Contains(searchQuery, StringComparison.OrdinalIgnoreCase))
|
||||||
.OrderBy(a => a.SortOrder) ?? Enumerable.Empty<Announcement>();
|
.OrderBy(a => a.SortOrder) ?? Enumerable.Empty<Announcement>();
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if (firstRender)
|
if (AuthStateTask != null)
|
||||||
{
|
{
|
||||||
if (AuthStateTask != null)
|
var authState = await AuthStateTask;
|
||||||
|
if (authState.User.Identity?.IsAuthenticated == true)
|
||||||
{
|
{
|
||||||
var authState = await AuthStateTask;
|
await LoadAsync();
|
||||||
if (authState.User.Identity?.IsAuthenticated == true)
|
|
||||||
{
|
|
||||||
await LoadAsync();
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,18 +130,14 @@
|
|||||||
private int totalPages;
|
private int totalPages;
|
||||||
private const int PageSize = 20;
|
private const int PageSize = 20;
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if (firstRender)
|
if (AuthStateTask != null)
|
||||||
{
|
{
|
||||||
if (AuthStateTask != null)
|
var authState = await AuthStateTask;
|
||||||
|
if (authState.User.Identity?.IsAuthenticated == true)
|
||||||
{
|
{
|
||||||
var authState = await AuthStateTask;
|
await LoadAsync();
|
||||||
if (authState.User.Identity?.IsAuthenticated == true)
|
|
||||||
{
|
|
||||||
await LoadAsync();
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,18 +128,14 @@
|
|||||||
private ConsultingActivity? editingActivity;
|
private ConsultingActivity? editingActivity;
|
||||||
private ConsultingActivityForm activityForm = new();
|
private ConsultingActivityForm activityForm = new();
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if (firstRender)
|
if (AuthStateTask != null)
|
||||||
{
|
{
|
||||||
if (AuthStateTask != null)
|
var authState = await AuthStateTask;
|
||||||
|
if (authState.User.Identity?.IsAuthenticated == true)
|
||||||
{
|
{
|
||||||
var authState = await AuthStateTask;
|
await LoadData();
|
||||||
if (authState.User.Identity?.IsAuthenticated == true)
|
|
||||||
{
|
|
||||||
await LoadData();
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,18 +116,14 @@
|
|||||||
(f.Answer != null && f.Answer.Contains(searchQuery, StringComparison.OrdinalIgnoreCase)))
|
(f.Answer != null && f.Answer.Contains(searchQuery, StringComparison.OrdinalIgnoreCase)))
|
||||||
.OrderBy(f => f.SortOrder) ?? Enumerable.Empty<Faq>();
|
.OrderBy(f => f.SortOrder) ?? Enumerable.Empty<Faq>();
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if (firstRender)
|
if (AuthStateTask != null)
|
||||||
{
|
{
|
||||||
if (AuthStateTask != null)
|
var authState = await AuthStateTask;
|
||||||
|
if (authState.User.Identity?.IsAuthenticated == true)
|
||||||
{
|
{
|
||||||
var authState = await AuthStateTask;
|
await LoadAsync();
|
||||||
if (authState.User.Identity?.IsAuthenticated == true)
|
|
||||||
{
|
|
||||||
await LoadAsync();
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,18 +124,14 @@
|
|||||||
private bool isDialogOpen;
|
private bool isDialogOpen;
|
||||||
private RevenueForm revenueForm = new();
|
private RevenueForm revenueForm = new();
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if (firstRender)
|
if (AuthStateTask != null)
|
||||||
{
|
{
|
||||||
if (AuthStateTask != null)
|
var authState = await AuthStateTask;
|
||||||
|
if (authState.User.Identity?.IsAuthenticated == true)
|
||||||
{
|
{
|
||||||
var authState = await AuthStateTask;
|
await LoadData();
|
||||||
if (authState.User.Identity?.IsAuthenticated == true)
|
|
||||||
{
|
|
||||||
await LoadData();
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,19 +178,15 @@ else
|
|||||||
private TaxFilingSchedule? selectedSchedule;
|
private TaxFilingSchedule? selectedSchedule;
|
||||||
private TaxFilingScheduleForm scheduleForm = new();
|
private TaxFilingScheduleForm scheduleForm = new();
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if (firstRender)
|
if (AuthStateTask != null)
|
||||||
{
|
{
|
||||||
if (AuthStateTask != null)
|
var authState = await AuthStateTask;
|
||||||
|
if (authState.User.Identity?.IsAuthenticated == true)
|
||||||
{
|
{
|
||||||
var authState = await AuthStateTask;
|
await LoadData();
|
||||||
if (authState.User.Identity?.IsAuthenticated == true)
|
PrepareCreate();
|
||||||
{
|
|
||||||
await LoadData();
|
|
||||||
PrepareCreate();
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,26 +74,6 @@ public static class BusinessDayCalculator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주말과 연속 공휴일 뒤에 붙는 대체휴일을 다음 영업일로 자동 확장한다.
|
|
||||||
foreach (var window in HolidayWindows)
|
|
||||||
{
|
|
||||||
foreach (var date in window.Dates())
|
|
||||||
{
|
|
||||||
if (date.DayOfWeek is not DayOfWeek.Saturday and not DayOfWeek.Sunday)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var substitute = date.AddDays(1);
|
|
||||||
while (substitute.DayOfWeek is DayOfWeek.Saturday or DayOfWeek.Sunday || holidays.Contains(substitute))
|
|
||||||
{
|
|
||||||
substitute = substitute.AddDays(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
holidays.Add(substitute);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return holidays;
|
return holidays;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user