@page "/admin/season-simulator" @attribute [Authorize] @using TaxBaik.Application.Seasonal @using TaxBaik.Application.Services 시즌 시뮬레이터
Season Preview

시즌 시뮬레이터

날짜를 선택해 홈페이지 시즌 화면이 어떻게 보이는지 미리 확인합니다.

시뮬레이션 날짜

@foreach (var season in TaxSeasonCalendar.Seasons) { }

홈페이지 미리보기

@(simulationDate?.ToString("yyyy년 MM월 dd일") ?? "날짜를 선택하세요")

@if (activeSeason != null) { @activeSeason.Name 시즌 활성
@if (activeSeason.DaysUntilDeadline <= 7 && activeSeason.DaysUntilDeadline >= 0) {
D-@activeSeason.DaysUntilDeadline 마감 임박
}
@activeSeason.HeroHeadline
@activeSeason.HeroSubtext
@activeSeason.CtaText
활성 시즌 키@activeSeason.Key
마감까지@(activeSeason.DaysUntilDeadline >= 0 ? $"D-{activeSeason.DaysUntilDeadline}" : $"마감 후 @(-activeSeason.DaysUntilDeadline)일")
포커스 서비스@activeSeason.FocusService
블로그 카테고리@activeSeason.RelatedCategorySlug
긴박감 배지 문구@activeSeason.UrgencyBadge
} else {
선택한 날짜는 시즌 비활성 기간입니다. 홈페이지는 기본 Hero를 표시합니다.
사업자 세금, 부동산,
가족자산까지
세무사·부동산중개사·보험설계사 자격 보유 | 온라인 맞춤 상담
무료 상담 신청
}

연간 시즌 타임라인

@foreach (var s in TaxSeasonCalendar.Seasons) { var isActive = activeSeason?.Key == s.Key; }
기간 시즌 블로그 카테고리 상태
@s.StartMonth/@s.StartDay ~ @s.EndMonth/@s.EndDay @s.Name @s.RelatedCategorySlug @(isActive ? "활성" : "비활성")
@code { private DateTime? simulationDate = DateTime.Today; private CurrentSeasonDto? activeSeason; private string SimulationDateText { get => simulationDate?.ToString("yyyy-MM-dd") ?? ""; set { simulationDate = DateTime.TryParse(value, out var dt) ? dt : null; ComputeSeason(); } } protected override void OnInitialized() => ComputeSeason(); private void ComputeSeason() { if (simulationDate == null) { activeSeason = null; return; } var date = simulationDate.Value; var season = TaxSeasonCalendar.Seasons.FirstOrDefault(s => { var start = new DateTime(date.Year, s.StartMonth, s.StartDay); var endYear = (s.EndMonth < s.StartMonth) ? date.Year + 1 : date.Year; var end = new DateTime(endYear, s.EndMonth, s.EndDay); return date >= start && date <= end; }); if (season == null) { activeSeason = null; return; } var endYearCalc = (season.EndMonth < season.StartMonth) ? date.Year + 1 : date.Year; var deadline = new DateTime(endYearCalc, season.EndMonth, season.EndDay); var ddays = (deadline.Date - date.Date).Days; var badge = ddays <= 7 && ddays >= 0 ? season.UrgencyBadge.Replace("{n}", ddays.ToString()) : season.UrgencyBadge; activeSeason = new CurrentSeasonDto { Key = season.Key, Name = season.Name, HeroHeadline = season.HeroHeadline, HeroSubtext = season.HeroSubtext, UrgencyBadge = badge, FocusService = season.FocusService, RelatedCategorySlug = season.RelatedCategorySlug, CtaText = season.CtaText, DaysUntilDeadline = ddays, Deadline = deadline }; } private void JumpToSeason(TaxSeason season) { simulationDate = new DateTime(DateTime.Today.Year, season.StartMonth, season.StartDay); ComputeSeason(); } }