This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true"
|
||||
Style="width: 80px;" />
|
||||
Class="admin-table-id-column" />
|
||||
|
||||
<PropertyColumn Property="x => x.Name" Title="이름" Sortable="true"
|
||||
Filterable="true" />
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<PropertyColumn Property="x => x.Message" Title="메시지"
|
||||
Sortable="false"
|
||||
CellStyleFunc="@(_ => "max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;")" />
|
||||
CellClass="admin-table-message-column" />
|
||||
|
||||
<PropertyColumn Property="x => x.CreatedAt" Title="생성일"
|
||||
Sortable="true"
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
@attribute [Authorize]
|
||||
@using System.ComponentModel.DataAnnotations
|
||||
@using TaxBaik.Application.DTOs
|
||||
@using TaxBaik.Web.Services
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@inject IAnnouncementBrowserClient AnnouncementClient
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/admin/announcements"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@using TaxBaik.Web.Services
|
||||
@using TaxBaik.Domain.Entities
|
||||
@inject IAnnouncementBrowserClient AnnouncementClient
|
||||
@inject NavigationManager Navigation
|
||||
@@ -32,7 +31,7 @@
|
||||
else if (!FilteredAnnouncements.Any())
|
||||
{
|
||||
<div class="pa-6 text-center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Campaign" Style="font-size:3rem; opacity:.3;" />
|
||||
<MudIcon Icon="@Icons.Material.Filled.Campaign" Class="admin-empty-state-icon" />
|
||||
<MudText Class="mt-2 text-muted">검색 조건에 맞는 공지사항이 없습니다.</MudText>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<PageTitle>블로그 관리</PageTitle>
|
||||
|
||||
<AdminPageHeader Title="블로그 관리" Eyebrow="Content" Subtitle="검색 유입 콘텐츠의 발행 상태와 성과를 관리합니다.">
|
||||
<ChildContent>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2">
|
||||
<MudButton Variant="Variant.Outlined" Color="Color.Secondary" StartIcon="@Icons.Material.Filled.Restore"
|
||||
OnClick="ToggleArchiveView">
|
||||
@(showArchived ? "전체 글 보기" : "내린 글 보기")
|
||||
@@ -18,13 +18,15 @@
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.EditNote"
|
||||
Href="./blog/create">새 포스트 작성</MudButton>
|
||||
</ChildContent>
|
||||
</MudStack>
|
||||
</AdminPageHeader>
|
||||
|
||||
<div class="d-flex pa-4 gap-4 align-center">
|
||||
<MudTextField @bind-Value="searchQuery" Placeholder="블로그 제목 또는 본문 검색..." Adornment="Adornment.Start"
|
||||
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="flex-grow-1" Immediate="true" Clearable="true" />
|
||||
</div>
|
||||
<AdminSearchBar>
|
||||
<SearchContent>
|
||||
<MudTextField @bind-Value="searchQuery" Placeholder="블로그 제목 또는 본문 검색..." Adornment="Adornment.Start"
|
||||
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="flex-grow-1" Immediate="true" Clearable="true" />
|
||||
</SearchContent>
|
||||
</AdminSearchBar>
|
||||
|
||||
<AdminDataPanel Loading="@isLoading">
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Class="mb-3">
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<input class="mud-input-slot" placeholder="route" @bind="_route" @bind:event="oninput" />
|
||||
<input class="mud-input-slot" placeholder="시작 ISO 시각" @bind="_start" @bind:event="oninput" />
|
||||
<input class="mud-input-slot" placeholder="종료 ISO 시각" @bind="_end" @bind:event="oninput" />
|
||||
<button type="button" class="mud-button-root" @onclick="LoadAsync">새로고침</button>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="LoadAsync">새로고침</MudButton>
|
||||
</div>
|
||||
@if (_loading)
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
@page "/admin/clients/{ClientId:int}"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@using TaxBaik.Web.Services
|
||||
@using TaxBaik.Web.Services.AdminClients
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@inject IClientBrowserClient ClientClient
|
||||
@inject IConsultingActivityBrowserClient ConsultingClient
|
||||
@@ -73,7 +71,7 @@
|
||||
{
|
||||
<MudItem xs="12">
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Secondary">메모</MudText>
|
||||
<MudText Style="white-space: pre-wrap;">@client.Memo</MudText>
|
||||
<MudText Class="admin-pre-wrap">@client.Memo</MudText>
|
||||
</MudItem>
|
||||
}
|
||||
</MudGrid>
|
||||
@@ -136,14 +134,14 @@
|
||||
@foreach (var c in consultations)
|
||||
{
|
||||
<MudListItem>
|
||||
<MudPaper Class="pa-3" Outlined="true" Style="width:100%">
|
||||
<MudPaper Class="pa-3 admin-consultation-item" Outlined="true">
|
||||
<MudStack Row="true" AlignItems="AlignItems.Start" Justify="Justify.SpaceBetween">
|
||||
<div>
|
||||
<MudText Typo="Typo.caption" Color="Color.Secondary">
|
||||
@c.ConsultationDate.ToString("yyyy-MM-dd")
|
||||
@if (!string.IsNullOrEmpty(c.ServiceType)) { <text> · @c.ServiceType</text> }
|
||||
</MudText>
|
||||
<MudText Style="white-space: pre-wrap;" Class="mt-1">@c.Summary</MudText>
|
||||
<MudText Class="mt-1 admin-pre-wrap">@c.Summary</MudText>
|
||||
@if (!string.IsNullOrEmpty(c.Result))
|
||||
{
|
||||
<MudChip T="string" Size="Size.Small" Color="Color.Info" Class="mt-1">@c.Result</MudChip>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@using TaxBaik.Application.DTOs
|
||||
@using TaxBaik.Web.Services
|
||||
@using TaxBaik.Domain.Entities
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@inject IClientBrowserClient ClientClient
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/admin/clients"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@using TaxBaik.Web.Services
|
||||
@using TaxBaik.Domain.Entities
|
||||
@inject IClientBrowserClient ClientClient
|
||||
@inject NavigationManager Navigation
|
||||
@@ -12,11 +11,18 @@
|
||||
|
||||
<AdminPageHeader Title="고객 관리" Eyebrow="CRM" Subtitle="고객 카드를 등록하고 상담 이력을 관리합니다.">
|
||||
<ChildContent>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.PersonAdd"
|
||||
Href="./clients/create">
|
||||
고객 등록
|
||||
</MudButton>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
|
||||
<MudButton Variant="Variant.Outlined" Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.Refresh"
|
||||
OnClick="@SearchAsync">
|
||||
새로고침
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.PersonAdd"
|
||||
Href="./clients/create">
|
||||
고객 등록
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
</ChildContent>
|
||||
</AdminPageHeader>
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/admin/common-codes"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@using TaxBaik.Web.Services.AdminClients
|
||||
@using TaxBaik.Domain.Entities
|
||||
@attribute [Authorize]
|
||||
@inject ICommonCodeBrowserClient CommonCodeClient
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
|
||||
<MudDataGrid Items="@companies" Striped="true" Hover="true" Loading="@isLoading" Class="admin-grid">
|
||||
<MudDataGrid Items="@companies" Striped="true" Hover="true" Loading="@isLoading" Class="admin-grid mt-4">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.CompanyCode" Title="회사코드" />
|
||||
<PropertyColumn Property="x => x.CompanyName" Title="회사명" />
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/admin/consulting-activities"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@using TaxBaik.Web.Services.AdminClients
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@inject IConsultingActivityBrowserClient ActivityClient
|
||||
@inject IClientBrowserClient ClientClient
|
||||
@@ -21,29 +20,19 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="admin-grid table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>고객</th>
|
||||
<th>활동 유형</th>
|
||||
<th>활동일시</th>
|
||||
<th>설명</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in activities)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.Id</td>
|
||||
<td>@clientMap.GetValueOrDefault(item.ClientId)</td>
|
||||
<td>@item.ActivityType</td>
|
||||
<td>@item.ActivityDate.ToString("g")</td>
|
||||
<td>@item.Description</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<MudDataGrid T="ConsultingActivity" Items="@activities" Dense="true" Hover="true" Striped="true" Class="admin-grid mt-4">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" Class="admin-table-id-column" />
|
||||
<TemplateColumn Title="고객" Sortable="true">
|
||||
<CellTemplate>
|
||||
@clientMap.GetValueOrDefault(context.Item.ClientId)
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<PropertyColumn Property="x => x.ActivityType" Title="활동 유형" Sortable="true" />
|
||||
<PropertyColumn Property="x => x.ActivityDate" Title="활동일시" Sortable="true" Format="yyyy-MM-dd HH:mm" />
|
||||
<PropertyColumn Property="x => x.Description" Title="설명" Sortable="false" CellStyleFunc="@(_ => "max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;")" />
|
||||
</Columns>
|
||||
</MudDataGrid>
|
||||
}
|
||||
</AdminDataPanel>
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/admin/contracts"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@using TaxBaik.Web.Services.AdminClients
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@inject IContractBrowserClient ContractClient
|
||||
@inject IClientBrowserClient ClientClient
|
||||
@@ -40,50 +39,47 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="admin-grid table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>고객</th>
|
||||
<th>계약번호</th>
|
||||
<th>서비스 유형</th>
|
||||
<th>월 수수료</th>
|
||||
<th>계약기간</th>
|
||||
<th>상태</th>
|
||||
<th>작업</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in contracts)
|
||||
{
|
||||
var isActive = !item.EndDate.HasValue || item.EndDate.Value >= DateTime.Today;
|
||||
<tr @onclick="() => OnRowSelected(item)" style="cursor:pointer;">
|
||||
<td>@item.Id</td>
|
||||
<td>@clientMap.GetValueOrDefault(item.ClientId)</td>
|
||||
<td>@item.ContractNumber</td>
|
||||
<td>@item.ServiceType</td>
|
||||
<td>@(item.MonthlyFee?.ToString("C") ?? string.Empty)</td>
|
||||
<td>
|
||||
@item.StartDate.ToString("yyyy-MM-dd")
|
||||
@if (item.EndDate.HasValue)
|
||||
{
|
||||
<span>~@item.EndDate.Value.ToString("yyyy-MM-dd")</span>
|
||||
}
|
||||
</td>
|
||||
<td>@(isActive ? "활성" : "만료")</td>
|
||||
<td>
|
||||
<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>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<MudDataGrid T="Contract" Items="@contracts" Dense="true" Hover="true" Striped="true" Class="admin-grid mt-4">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" Class="admin-table-id-column" />
|
||||
<TemplateColumn Title="고객" Sortable="true">
|
||||
<CellTemplate>
|
||||
@clientMap.GetValueOrDefault(context.Item.ClientId)
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<PropertyColumn Property="x => x.ContractNumber" Title="계약번호" Sortable="true" />
|
||||
<PropertyColumn Property="x => x.ServiceType" Title="서비스 유형" Sortable="true" />
|
||||
<PropertyColumn Property="x => x.MonthlyFee" Title="월 수수료" Sortable="true" Format="C" />
|
||||
<TemplateColumn Title="계약기간" Sortable="true">
|
||||
<CellTemplate>
|
||||
@context.Item.StartDate.ToString("yyyy-MM-dd")
|
||||
@if (context.Item.EndDate.HasValue)
|
||||
{
|
||||
<span>~@context.Item.EndDate.Value.ToString("yyyy-MM-dd")</span>
|
||||
}
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<TemplateColumn Title="상태" Sortable="true">
|
||||
<CellTemplate>
|
||||
@(context.Item.EndDate.HasValue && context.Item.EndDate.Value < DateTime.Today ? "만료" : "활성")
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<TemplateColumn Title="작업" CellStyleFunc="@(_ => "text-align: right;")">
|
||||
<CellTemplate>
|
||||
<MudButtonGroup Size="Size.Small" Variant="Variant.Text">
|
||||
<MudButton Color="Color.Primary" OnClick="@(() => OnRowSelected(context.Item))">선택</MudButton>
|
||||
<MudButton Color="Color.Error" OnClick="@(() => DeleteContract(context.Item.Id))">삭제</MudButton>
|
||||
</MudButtonGroup>
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
</Columns>
|
||||
</MudDataGrid>
|
||||
}
|
||||
</MudItem>
|
||||
|
||||
<!-- Right: Detail Form Panel (Inline Editor) -->
|
||||
<MudItem XS="12" MD="4">
|
||||
<MudPaper Class="pa-4 admin-surface admin-editor-panel" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 400px;">
|
||||
<AdminEditorPanel Loading="false">
|
||||
<div class="d-flex align-center justify-space-between mb-4">
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold">@(isEditMode ? "계약 상세 정보" : "새 계약 추가")</MudText>
|
||||
@if (isEditMode)
|
||||
@@ -96,8 +92,7 @@ else
|
||||
<MudForm @ref="form">
|
||||
<div class="mb-3">
|
||||
<label class="mud-input-label mud-input-label-animated mud-input-label-outlined mb-1">고객</label>
|
||||
<select class="mud-input mud-input-outlined mud-input-root mud-input-root-adorned-start"
|
||||
style="width: 100%; min-height: 56px; padding: 16px 14px;"
|
||||
<select class="mud-input mud-input-outlined mud-input-root mud-input-root-adorned-start admin-native-select"
|
||||
value="@(contractForm.ClientId?.ToString() ?? string.Empty)"
|
||||
disabled="@isEditMode"
|
||||
@onchange="e => contractForm.ClientId = int.TryParse(e.Value?.ToString(), out var clientId) ? clientId : null">
|
||||
@@ -124,7 +119,7 @@ else
|
||||
}
|
||||
</div>
|
||||
</MudForm>
|
||||
</MudPaper>
|
||||
</AdminEditorPanel>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
}
|
||||
|
||||
@@ -2,134 +2,169 @@
|
||||
@page "/admin/dashboard"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@inject TaxBaik.Web.Client.Components.Admin.Services.IAdminSessionBootstrap SessionBootstrap
|
||||
@inject TaxBaik.Web.Client.Components.Admin.Services.IAdminDashboardClient DashboardClient
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
<PageTitle>대시보드</PageTitle>
|
||||
|
||||
<AdminPageHeader Title="대시보드" Eyebrow="Home" Subtitle="핵심 운영 상태와 최근 오류를 한 번에 확인합니다.">
|
||||
<AdminPageHeader Title="대시보드" Eyebrow="Home" Subtitle="로그인 후 가장 먼저 보는 운영 요약과 최근 상태를 한 화면에 모았습니다.">
|
||||
<ChildContent>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1" Class="admin-header-actions">
|
||||
<MudButton Variant="Variant.Outlined" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Refresh" OnClick="@ReloadAsync">
|
||||
새로고침
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Add" Href="./inquiries/create">
|
||||
새 문의
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
</ChildContent>
|
||||
</AdminPageHeader>
|
||||
|
||||
<MudPaper Class="admin-surface admin-dashboard-status mb-4" Elevation="0" Outlined="true">
|
||||
<MudStack Row="true" Wrap="Wrap.Wrap" Spacing="2" AlignItems="AlignItems.Stretch">
|
||||
<MudPaper Class="admin-status-chip" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline">현재 화면</MudText>
|
||||
<MudText Typo="Typo.body2">대시보드</MudText>
|
||||
</MudPaper>
|
||||
<MudPaper Class="admin-status-chip" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline">핵심 동작</MudText>
|
||||
<MudText Typo="Typo.body2">문의 확인, 신규 등록, 콘텐츠 이동</MudText>
|
||||
</MudPaper>
|
||||
<MudPaper Class="admin-status-chip" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline">선택 기준</MudText>
|
||||
<MudText Typo="Typo.body2">활성 메뉴는 현재 경로와 일치</MudText>
|
||||
</MudPaper>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
|
||||
<MudGrid Spacing="3" Class="mt-4">
|
||||
<!-- 오류 진단 -->
|
||||
<MudItem XS="12" SM="6" MD="4">
|
||||
<MudPaper Class="pa-4 dashboard-card" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 200px; display: flex; flex-direction: column;">
|
||||
<MudIcon Icon="@Icons.Material.Filled.BugReport" Size="Size.Large" Color="Color.Error" Class="mb-3" />
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-2">오류 진단</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-4 flex-grow-1">
|
||||
브라우저 오류와 JS interop 실패는 클라이언트 로그에서 바로 추적합니다.
|
||||
</MudText>
|
||||
<MudLink Href="./client-logs" Color="Color.Primary" Class="font-weight-bold">
|
||||
클라이언트 로그 보기 →
|
||||
</MudLink>
|
||||
</MudPaper>
|
||||
<MudItem xs="12" md="3">
|
||||
<AdminMetricCard Label="이번 달 문의" Value="@GetMetricValue(summary?.ThisMonthInquiries)" Caption="월간 유입 추이" Accent="accent-blue" Icon="@Icons.Material.Filled.Campaign" ValueColor="var(--primary-color)" IconColor="var(--primary-light)" OnClick="@(() => Navigation.NavigateTo("./inquiries"))" />
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="3">
|
||||
<AdminMetricCard Label="신규 문의" Value="@GetMetricValue(summary?.NewInquiries)" Caption="즉시 대응 필요" Accent="accent-green" Icon="@Icons.Material.Filled.MarkUnreadChatAlt" ValueColor="var(--success-dark)" IconColor="var(--success-light)" OnClick="@(() => Navigation.NavigateTo("./inquiries?status=new"))" />
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="3">
|
||||
<AdminMetricCard Label="전체 포스트" Value="@GetMetricValue(summary?.TotalPosts)" Caption="콘텐츠 자산" Accent="accent-slate" Icon="@Icons.Material.Filled.Article" ValueColor="var(--text-primary)" IconColor="var(--bg-tertiary)" OnClick="@(() => Navigation.NavigateTo("./blog"))" />
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="3">
|
||||
<AdminMetricCard Label="발행 포스트" Value="@GetMetricValue(summary?.PublishedPosts)" Caption="공개 노출 중" Accent="accent-warm" Icon="@Icons.Material.Filled.Public" ValueColor="var(--tertiary-dark)" IconColor="var(--tertiary-light)" OnClick="@(() => Navigation.NavigateTo("./blog"))" />
|
||||
</MudItem>
|
||||
|
||||
<!-- 운영 메뉴 -->
|
||||
<MudItem XS="12" SM="6" MD="4">
|
||||
<MudPaper Class="pa-4 dashboard-card" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 200px; display: flex; flex-direction: column;">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Dashboard" Size="Size.Large" Color="Color.Info" Class="mb-3" />
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-2">운영 메뉴</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-4 flex-grow-1">
|
||||
CRM, 홈페이지, 문의 관리 화면을 표준 템플릿으로 확장합니다.
|
||||
</MudText>
|
||||
<MudLink Href="./inquiries" Color="Color.Primary" Class="font-weight-bold">
|
||||
문의 관리로 이동 →
|
||||
</MudLink>
|
||||
</MudPaper>
|
||||
<MudItem xs="12" md="7">
|
||||
<AdminDataPanel Loading="@isLoading" SkeletonContent="@SummarySkeleton">
|
||||
<MudStack Spacing="2">
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
|
||||
<div>
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold">최근 문의</MudText>
|
||||
<MudText Typo="Typo.body2" Class="text-muted">실제 운영자가 가장 자주 보는 처리 대상입니다.</MudText>
|
||||
</div>
|
||||
<MudButton Variant="Variant.Text" Href="./inquiries">전체 보기</MudButton>
|
||||
</MudStack>
|
||||
|
||||
@if (summary?.RecentInquiries is null || summary.RecentInquiries.Count == 0)
|
||||
{
|
||||
<AdminEmptyState Icon="@Icons.Material.Filled.Inbox" Message="최근 문의가 없습니다." />
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudTable Items="summary.RecentInquiries" Dense="true" Hover="true" Bordered="false" Elevation="0" Class="admin-table">
|
||||
<HeaderContent>
|
||||
<MudTh>고객</MudTh>
|
||||
<MudTh>제목</MudTh>
|
||||
<MudTh>상태</MudTh>
|
||||
<MudTh>등록일</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="고객">@context.Name</MudTd>
|
||||
<MudTd DataLabel="요약">@GetMessageSnippet(context.Message)</MudTd>
|
||||
<MudTd DataLabel="상태">@context.Status</MudTd>
|
||||
<MudTd DataLabel="등록일">@context.CreatedAt.ToString("yyyy-MM-dd")</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
}
|
||||
</MudStack>
|
||||
</AdminDataPanel>
|
||||
</MudItem>
|
||||
|
||||
<!-- 배포 확인 -->
|
||||
<MudItem XS="12" SM="6" MD="4">
|
||||
<MudPaper Class="pa-4 dashboard-card" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 200px; display: flex; flex-direction: column;">
|
||||
<MudIcon Icon="@Icons.Material.Filled.CloudUpload" Size="Size.Large" Color="Color.Success" Class="mb-3" />
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-2">배포 확인</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-4 flex-grow-1">
|
||||
하위 경로 배포와 렌더러 분리를 유지하도록 라우트 린트를 적용합니다.
|
||||
</MudText>
|
||||
<MudLink Href="./client-logs" Color="Color.Primary" Class="font-weight-bold">
|
||||
최근 에러 확인 →
|
||||
</MudLink>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="5">
|
||||
<MudCard Class="admin-surface" Elevation="0" Outlined="true">
|
||||
<MudCardContent>
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold">빠른 작업</MudText>
|
||||
<MudText Typo="Typo.body2" Class="text-muted mb-3">운영자가 가장 많이 쓰는 이동 경로를 바로 배치했습니다.</MudText>
|
||||
<MudStack Spacing="2">
|
||||
<MudButton Variant="Variant.Outlined" FullWidth="true" Href="./clients" StartIcon="@Icons.Material.Filled.Groups">고객 관리</MudButton>
|
||||
<MudButton Variant="Variant.Outlined" FullWidth="true" Href="./tax-profiles" StartIcon="@Icons.Material.Filled.Badge">세무 프로필</MudButton>
|
||||
<MudButton Variant="Variant.Outlined" FullWidth="true" Href="./tax-filing-schedules" StartIcon="@Icons.Material.Filled.EventNote">신고 일정</MudButton>
|
||||
<MudButton Variant="Variant.Outlined" FullWidth="true" Href="./settings" StartIcon="@Icons.Material.Filled.Settings">설정</MudButton>
|
||||
</MudStack>
|
||||
|
||||
<!-- 원인 규명 -->
|
||||
<MudItem XS="12" SM="6" MD="4">
|
||||
<MudPaper Class="pa-4 dashboard-card" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 200px; display: flex; flex-direction: column;">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Search" Size="Size.Large" Color="Color.Warning" Class="mb-3" />
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-2">원인 규명</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-4 flex-grow-1">
|
||||
중복되는 오류는 최근 로그 요약에서 source와 route 기준으로 묶어 봅니다.
|
||||
</MudText>
|
||||
<MudLink Href="./client-logs?q=invoke" Color="Color.Primary" Class="font-weight-bold">
|
||||
오류 검색 →
|
||||
</MudLink>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudDivider Class="my-4" />
|
||||
|
||||
<!-- 관측성 -->
|
||||
<MudItem XS="12" SM="6" MD="4">
|
||||
<MudPaper Class="pa-4 dashboard-card" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 200px; display: flex; flex-direction: column;">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Visibility" Size="Size.Large" Color="Color.Secondary" Class="mb-3" />
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-2">관측성</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-4 flex-grow-1">
|
||||
Top sources / routes를 확인해서 어떤 모듈이 재발하는지 빠르게 좁힙니다.
|
||||
</MudText>
|
||||
<MudLink Href="./client-logs" Color="Color.Primary" Class="font-weight-bold">
|
||||
요약 리포트 보기 →
|
||||
</MudLink>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
|
||||
<!-- 빠른 통계 -->
|
||||
<MudItem XS="12">
|
||||
<MudPaper Class="pa-4 admin-surface" Elevation="0" Style="border: 1px solid var(--border-color);">
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-3">📊 빠른 통계</MudText>
|
||||
<MudGrid Spacing="2">
|
||||
<MudItem XS="12" SM="6" MD="3">
|
||||
<MudText Typo="Typo.body2">
|
||||
<strong>전체 문의:</strong> API에서 조회
|
||||
</MudText>
|
||||
</MudItem>
|
||||
<MudItem XS="12" SM="6" MD="3">
|
||||
<MudText Typo="Typo.body2">
|
||||
<strong>오류 건수:</strong> 클라이언트 로그 참조
|
||||
</MudText>
|
||||
</MudItem>
|
||||
<MudItem XS="12" SM="6" MD="3">
|
||||
<MudText Typo="Typo.body2">
|
||||
<strong>배포 상태:</strong> 최신 버전 실행 중
|
||||
</MudText>
|
||||
</MudItem>
|
||||
<MudItem XS="12" SM="6" MD="3">
|
||||
<MudText Typo="Typo.body2">
|
||||
<strong>로그 범위:</strong> 최근 7일
|
||||
</MudText>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
</MudPaper>
|
||||
<MudText Typo="Typo.subtitle2" Class="font-weight-bold mb-2">운영 기준</MudText>
|
||||
<MudStack Spacing="1">
|
||||
<MudPaper Class="admin-status-chip" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline">기준 1</MudText>
|
||||
<MudText Typo="Typo.body2">활성 메뉴만 역할별로 표시</MudText>
|
||||
</MudPaper>
|
||||
<MudPaper Class="admin-status-chip" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline">기준 2</MudText>
|
||||
<MudText Typo="Typo.body2">로딩 시 스켈레톤 우선 노출</MudText>
|
||||
</MudPaper>
|
||||
<MudPaper Class="admin-status-chip" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline">기준 3</MudText>
|
||||
<MudText Typo="Typo.body2">모바일에서는 우선 순위 높은 메뉴만 유지</MudText>
|
||||
</MudPaper>
|
||||
<MudPaper Class="admin-status-chip" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline">기준 4</MudText>
|
||||
<MudText Typo="Typo.body2">상단 상태로 현재 위치를 즉시 확인</MudText>
|
||||
</MudPaper>
|
||||
</MudStack>
|
||||
</MudCardContent>
|
||||
</MudCard>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
|
||||
<style>
|
||||
.dashboard-card {
|
||||
background: var(--surface-bg);
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
@code {
|
||||
private AdminDashboardSummary? summary;
|
||||
private bool isLoading = true;
|
||||
|
||||
.dashboard-card:hover {
|
||||
border-color: var(--primary-color) !important;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await SessionBootstrap.EnsureInitializedAsync();
|
||||
await ReloadAsync();
|
||||
}
|
||||
|
||||
.dashboard-card :deep(.mud-link) {
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
private async Task ReloadAsync()
|
||||
{
|
||||
isLoading = true;
|
||||
try
|
||||
{
|
||||
summary = await DashboardClient.GetSummaryAsync();
|
||||
}
|
||||
catch
|
||||
{
|
||||
summary = null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
isLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
.dashboard-card :deep(.mud-link:hover) {
|
||||
text-decoration: underline;
|
||||
private RenderFragment SummarySkeleton => builder =>
|
||||
{
|
||||
builder.OpenComponent<AdminSkeletonRows>(0);
|
||||
builder.AddAttribute(1, "Rows", 4);
|
||||
builder.AddAttribute(2, "Columns", 4);
|
||||
builder.CloseComponent();
|
||||
};
|
||||
|
||||
private static string GetMetricValue(int? value) => value?.ToString() ?? "0";
|
||||
|
||||
private static string GetMessageSnippet(string message)
|
||||
=> string.IsNullOrWhiteSpace(message)
|
||||
? "내용 없음"
|
||||
: message.Length <= 48 ? message : message[..48] + "...";
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<MudGrid Spacing="3" Class="mt-4">
|
||||
<!-- 오류 진단 -->
|
||||
<MudItem XS="12" SM="6" MD="4">
|
||||
<MudPaper Class="pa-4 dashboard-card" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 200px; display: flex; flex-direction: column;">
|
||||
<MudPaper Class="pa-4 dashboard-card admin-dashboard-tile" Elevation="0">
|
||||
<MudIcon Icon="@Icons.Material.Filled.BugReport" Size="Size.Large" Color="Color.Error" Class="mb-3" />
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-2">오류 진단</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-4 flex-grow-1">
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<!-- 운영 메뉴 -->
|
||||
<MudItem XS="12" SM="6" MD="4">
|
||||
<MudPaper Class="pa-4 dashboard-card" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 200px; display: flex; flex-direction: column;">
|
||||
<MudPaper Class="pa-4 dashboard-card admin-dashboard-tile" Elevation="0">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Dashboard" Size="Size.Large" Color="Color.Info" Class="mb-3" />
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-2">운영 메뉴</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-4 flex-grow-1">
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
<!-- 배포 확인 -->
|
||||
<MudItem XS="12" SM="6" MD="4">
|
||||
<MudPaper Class="pa-4 dashboard-card" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 200px; display: flex; flex-direction: column;">
|
||||
<MudPaper Class="pa-4 dashboard-card admin-dashboard-tile" Elevation="0">
|
||||
<MudIcon Icon="@Icons.Material.Filled.CloudUpload" Size="Size.Large" Color="Color.Success" Class="mb-3" />
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-2">배포 확인</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-4 flex-grow-1">
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
<!-- 원인 규명 -->
|
||||
<MudItem XS="12" SM="6" MD="4">
|
||||
<MudPaper Class="pa-4 dashboard-card" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 200px; display: flex; flex-direction: column;">
|
||||
<MudPaper Class="pa-4 dashboard-card admin-dashboard-tile" Elevation="0">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Search" Size="Size.Large" Color="Color.Warning" Class="mb-3" />
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-2">원인 규명</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-4 flex-grow-1">
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
<!-- 관측성 -->
|
||||
<MudItem XS="12" SM="6" MD="4">
|
||||
<MudPaper Class="pa-4 dashboard-card" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 200px; display: flex; flex-direction: column;">
|
||||
<MudPaper Class="pa-4 dashboard-card admin-dashboard-tile" Elevation="0">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Visibility" Size="Size.Large" Color="Color.Secondary" Class="mb-3" />
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-2">관측성</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-4 flex-grow-1">
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<!-- 빠른 통계 -->
|
||||
<MudItem XS="12">
|
||||
<MudPaper Class="pa-4 admin-surface" Elevation="0" Style="border: 1px solid var(--border-color);">
|
||||
<MudPaper Class="pa-4 admin-surface admin-dashboard-summary" Elevation="0">
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold mb-3">📊 빠른 통계</MudText>
|
||||
<MudGrid Spacing="2">
|
||||
<MudItem XS="12" SM="6" MD="3">
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
@page "/admin/faqs/{Id:int}/edit"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@using TaxBaik.Web.Services
|
||||
@inject IFaqBrowserClient FaqClient
|
||||
@inject NavigationManager Navigation
|
||||
@inject ISnackbar Snackbar
|
||||
@@ -15,7 +14,7 @@
|
||||
</AdminPageHeader>
|
||||
|
||||
<AdminEditorPanel Loading="@isLoading" SkeletonContent="@FaqSkeleton">
|
||||
<MudPaper Class="admin-surface" Elevation="0" Style="max-width:720px;">
|
||||
<MudPaper Class="admin-surface admin-faq-edit-panel" Elevation="0">
|
||||
<MudForm @ref="form" @bind-IsValid="isValid">
|
||||
<MudGrid Spacing="3">
|
||||
<MudItem xs="12">
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/admin/faqs"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@using TaxBaik.Web.Services
|
||||
@using TaxBaik.Domain.Entities
|
||||
@inject IFaqBrowserClient FaqClient
|
||||
@inject NavigationManager Navigation
|
||||
@@ -32,7 +31,7 @@
|
||||
else if (!FilteredFaqs.Any())
|
||||
{
|
||||
<div class="pa-6 text-center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.QuestionAnswer" Style="font-size:3rem; opacity:.3;" />
|
||||
<MudIcon Icon="@Icons.Material.Filled.QuestionAnswer" Class="admin-faq-empty-icon" />
|
||||
<MudText Class="mt-2 text-muted">검색 조건에 맞는 FAQ가 없습니다.</MudText>
|
||||
</div>
|
||||
}
|
||||
@@ -41,31 +40,29 @@
|
||||
<MudSimpleTable Striped="true" Dense="true" Class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:110px;">순서</th>
|
||||
<th class="faq-col-order">순서</th>
|
||||
<th>질문</th>
|
||||
<th style="width:130px;">카테고리</th>
|
||||
<th style="width:90px;">상태</th>
|
||||
<th style="width:160px;"></th>
|
||||
<th class="faq-col-category">카테고리</th>
|
||||
<th class="faq-col-status">상태</th>
|
||||
<th class="faq-col-actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in FilteredFaqs)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<div class="d-flex align-center justify-start gap-1">
|
||||
<MudText Typo="Typo.body2" Class="mr-2">@item.SortOrder</MudText>
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ArrowDropUp" Size="Size.Small" OnClick="@(() => MoveUpAsync(item))" Style="padding:2px;" />
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ArrowDropDown" Size="Size.Small" OnClick="@(() => MoveDownAsync(item))" Style="padding:2px;" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<MudText Typo="Typo.body2" Style="max-width:480px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">
|
||||
@item.Question
|
||||
</MudText>
|
||||
</td>
|
||||
<td>
|
||||
@if (!string.IsNullOrEmpty(item.Category))
|
||||
<tr>
|
||||
<td>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
|
||||
<MudText Typo="Typo.body2" Class="mr-2">@item.SortOrder</MudText>
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ArrowDropUp" Size="Size.Small" OnClick="@(() => MoveUpAsync(item))" Class="admin-faq-sort-button" />
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ArrowDropDown" Size="Size.Small" OnClick="@(() => MoveDownAsync(item))" Class="admin-faq-sort-button" />
|
||||
</MudStack>
|
||||
</td>
|
||||
<td>
|
||||
<MudText Typo="Typo.body2" Class="admin-faq-question">@item.Question</MudText>
|
||||
</td>
|
||||
<td>
|
||||
@if (!string.IsNullOrEmpty(item.Category))
|
||||
{
|
||||
<MudChip T="string" Size="Size.Small" Color="Color.Default">@item.Category</MudChip>
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@using TaxBaik.Application.Services
|
||||
@using TaxBaik.Web.Services
|
||||
@inject IInquiryBrowserClient InquiryClient
|
||||
@inject NavigationManager Navigation
|
||||
@inject ISnackbar Snackbar
|
||||
@@ -13,12 +12,14 @@
|
||||
|
||||
@if (inquiry != null)
|
||||
{
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.ArrowBack"
|
||||
@onclick="@(() => Navigation.NavigateTo("./inquiries"))">
|
||||
문의 목록으로
|
||||
</MudButton>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Class="mt-4 mb-4" Spacing="2">
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.ArrowBack"
|
||||
@onclick="@(() => Navigation.NavigateTo("./inquiries"))">
|
||||
문의 목록으로
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
|
||||
<MudGrid Class="mt-4">
|
||||
<MudItem xs="12" md="8">
|
||||
@@ -43,7 +44,7 @@
|
||||
<MudItem xs="12">
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Secondary">문의 내용</MudText>
|
||||
<MudPaper Class="pa-3 mt-1" Outlined="true">
|
||||
<MudText Style="white-space: pre-wrap;">@inquiry.Message</MudText>
|
||||
<MudText Class="admin-pre-wrap">@inquiry.Message</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="12">
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@using TaxBaik.Application.Services
|
||||
@using TaxBaik.Web.Services
|
||||
@inject IInquiryBrowserClient InquiryClient
|
||||
@inject ISnackbar Snackbar
|
||||
|
||||
@@ -10,30 +9,57 @@
|
||||
|
||||
<AdminPageHeader Title="문의 관리" Eyebrow="Customer Requests" Subtitle="상담 요청을 상태별로 확인하고 후속 조치를 기록합니다.">
|
||||
<ChildContent>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Add"
|
||||
Href="./inquiries/create">새 문의 등록</MudButton>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
|
||||
<MudButton Variant="Variant.Outlined" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Refresh" OnClick="@LoadData">새로고침</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Add"
|
||||
Href="./inquiries/create">새 문의 등록</MudButton>
|
||||
</MudStack>
|
||||
</ChildContent>
|
||||
</AdminPageHeader>
|
||||
|
||||
<AdminSearchBar>
|
||||
<SearchContent>
|
||||
<MudGrid>
|
||||
<MudItem xs="12" md="5">
|
||||
<MudTextField @bind-Value="searchText" Label="검색 (이름·전화·이메일·메모)"
|
||||
Adornment="Adornment.End" AdornmentIcon="@Icons.Material.Filled.Search"
|
||||
Immediate="false" OnKeyUp="@OnSearchKeyUp" />
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="3">
|
||||
<CommonCodeSelect @bind-Value="statusFilter" Group="INQUIRY_STATUS" Label="상태" Placeholder="전체" Clearable="true" />
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
</SearchContent>
|
||||
<Actions>
|
||||
<MudButton Variant="Variant.Outlined" OnClick="@SearchAsync">검색</MudButton>
|
||||
<MudButton Variant="Variant.Text" OnClick="@ResetAsync">초기화</MudButton>
|
||||
</Actions>
|
||||
</AdminSearchBar>
|
||||
|
||||
<AdminDataPanel Loading="@isLoading">
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Class="mb-3 px-1">
|
||||
<MudText Typo="Typo.subtitle1">@($"검색 결과 {filteredInquiries.Count}건 / 전체 {allInquiries.Count}건")</MudText>
|
||||
<MudText Typo="Typo.body2">상태 필터: @(string.IsNullOrWhiteSpace(statusFilter) ? "전체" : statusFilter)</MudText>
|
||||
</MudStack>
|
||||
|
||||
<MudTabs Rounded="true" Elevation="0" Class="admin-tabs">
|
||||
<MudTabPanel Text="전체">
|
||||
<InquiryTable Inquiries="allInquiries" Status="" />
|
||||
<InquiryTable Inquiries="filteredInquiries" Status="" />
|
||||
</MudTabPanel>
|
||||
<MudTabPanel Text="신규">
|
||||
<InquiryTable Inquiries="allInquiries" Status="@InquiryStatusMapper.StatusNew" />
|
||||
<InquiryTable Inquiries="filteredInquiries" Status="@InquiryStatusMapper.StatusNew" />
|
||||
</MudTabPanel>
|
||||
<MudTabPanel Text="상담중">
|
||||
<InquiryTable Inquiries="allInquiries" Status="@InquiryStatusMapper.StatusConsulting" />
|
||||
<InquiryTable Inquiries="filteredInquiries" Status="@InquiryStatusMapper.StatusConsulting" />
|
||||
</MudTabPanel>
|
||||
<MudTabPanel Text="계약완료">
|
||||
<InquiryTable Inquiries="allInquiries" Status="@InquiryStatusMapper.StatusContracted" />
|
||||
<InquiryTable Inquiries="filteredInquiries" Status="@InquiryStatusMapper.StatusContracted" />
|
||||
</MudTabPanel>
|
||||
<MudTabPanel Text="거절">
|
||||
<InquiryTable Inquiries="allInquiries" Status="@InquiryStatusMapper.StatusRejected" />
|
||||
<InquiryTable Inquiries="filteredInquiries" Status="@InquiryStatusMapper.StatusRejected" />
|
||||
</MudTabPanel>
|
||||
<MudTabPanel Text="종결">
|
||||
<InquiryTable Inquiries="allInquiries" Status="@InquiryStatusMapper.StatusClosed" />
|
||||
<InquiryTable Inquiries="filteredInquiries" Status="@InquiryStatusMapper.StatusClosed" />
|
||||
</MudTabPanel>
|
||||
</MudTabs>
|
||||
</AdminDataPanel>
|
||||
@@ -44,6 +70,9 @@
|
||||
|
||||
private bool isLoading = true;
|
||||
private IReadOnlyList<Domain.Entities.Inquiry> allInquiries = [];
|
||||
private IReadOnlyList<Domain.Entities.Inquiry> filteredInquiries = [];
|
||||
private string searchText = "";
|
||||
private string statusFilter = "";
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
@@ -72,6 +101,7 @@
|
||||
{
|
||||
var (items, _) = await InquiryClient.GetPagedAsync(1, 200);
|
||||
allInquiries = items.ToList();
|
||||
ApplyFilters();
|
||||
|
||||
if (allInquiries.Count > 0)
|
||||
{
|
||||
@@ -88,4 +118,45 @@
|
||||
isLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyFilters()
|
||||
{
|
||||
IEnumerable<Domain.Entities.Inquiry> query = allInquiries;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(statusFilter))
|
||||
query = query.Where(x => string.Equals(x.Status, statusFilter, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchText))
|
||||
{
|
||||
var term = searchText.Trim();
|
||||
query = query.Where(x =>
|
||||
x.Name.Contains(term, StringComparison.OrdinalIgnoreCase) ||
|
||||
x.Phone.Contains(term, StringComparison.OrdinalIgnoreCase) ||
|
||||
(x.Email?.Contains(term, StringComparison.OrdinalIgnoreCase) ?? false) ||
|
||||
(x.AdminMemo?.Contains(term, StringComparison.OrdinalIgnoreCase) ?? false) ||
|
||||
x.Message.Contains(term, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
filteredInquiries = query.OrderByDescending(x => x.CreatedAt).ToList();
|
||||
}
|
||||
|
||||
private async Task SearchAsync()
|
||||
{
|
||||
ApplyFilters();
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
private async Task ResetAsync()
|
||||
{
|
||||
searchText = "";
|
||||
statusFilter = "";
|
||||
ApplyFilters();
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
private async Task OnSearchKeyUp(KeyboardEventArgs e)
|
||||
{
|
||||
if (e.Key == "Enter")
|
||||
await SearchAsync();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/admin/logout"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@using TaxBaik.Web.Services
|
||||
@inject CustomAuthenticationStateProvider AuthStateProvider
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/admin/revenue-trackings"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@using TaxBaik.Web.Services.AdminClients
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@inject IRevenueTrackingBrowserClient RevenueClient
|
||||
@inject IClientBrowserClient ClientClient
|
||||
@@ -21,29 +20,19 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="admin-grid table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>고객</th>
|
||||
<th>청구번호</th>
|
||||
<th>청구일</th>
|
||||
<th>청구액</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in revenues)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.Id</td>
|
||||
<td>@clientMap.GetValueOrDefault(item.ClientId)</td>
|
||||
<td>@item.InvoiceNumber</td>
|
||||
<td>@item.InvoiceDate.ToString("yyyy-MM-dd")</td>
|
||||
<td>@item.Amount.ToString("C")</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<MudDataGrid T="RevenueTracking" Items="@revenues" Dense="true" Hover="true" Striped="true" Class="admin-grid mt-4">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" Class="admin-table-id-column" />
|
||||
<TemplateColumn Title="고객" Sortable="true">
|
||||
<CellTemplate>
|
||||
@clientMap.GetValueOrDefault(context.Item.ClientId)
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<PropertyColumn Property="x => x.InvoiceNumber" Title="청구번호" Sortable="true" />
|
||||
<PropertyColumn Property="x => x.InvoiceDate" Title="청구일" Sortable="true" Format="yyyy-MM-dd" />
|
||||
<PropertyColumn Property="x => x.Amount" Title="청구액" Sortable="true" Format="C" />
|
||||
</Columns>
|
||||
</MudDataGrid>
|
||||
}
|
||||
</AdminDataPanel>
|
||||
|
||||
|
||||
@@ -10,19 +10,24 @@
|
||||
|
||||
<MudGrid>
|
||||
<MudItem xs="12" md="4">
|
||||
<MudPaper Class="pa-4" Elevation="1">
|
||||
<MudText Typo="Typo.h6" Class="mb-3">시뮬레이션 날짜</MudText>
|
||||
<MudDatePicker @bind-Date="simulationDate" Label="날짜 선택" DateFormat="yyyy-MM-dd" PickerVariant="PickerVariant.Static" />
|
||||
<MudDivider Class="my-3" />
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2">연간 세무 캘린더</MudText>
|
||||
@foreach (var season in TaxSeasonCalendar.Seasons)
|
||||
{
|
||||
<MudButton Variant="Variant.Outlined" Size="Size.Small" FullWidth="true"
|
||||
Class="mb-1" Color="Color.Primary"
|
||||
OnClick="@(() => JumpToSeason(season))">
|
||||
@season.StartMonth/@season.StartDay — @season.Name
|
||||
</MudButton>
|
||||
}
|
||||
<MudPaper Class="pa-4 admin-season-panel" Elevation="1">
|
||||
<MudStack Spacing="2">
|
||||
<MudText Typo="Typo.h6">시뮬레이션 날짜</MudText>
|
||||
<MudDatePicker @bind-Date="simulationDate" Label="날짜 선택" DateFormat="yyyy-MM-dd" PickerVariant="PickerVariant.Static" Class="admin-season-date-picker" />
|
||||
<MudDivider />
|
||||
<MudText Typo="Typo.subtitle2">연간 세무 캘린더</MudText>
|
||||
<MudStack Spacing="1">
|
||||
@foreach (var season in TaxSeasonCalendar.Seasons)
|
||||
{
|
||||
<MudButton Variant="Variant.Outlined" Size="Size.Small" FullWidth="true"
|
||||
Color="Color.Primary"
|
||||
Class="admin-season-jump-button"
|
||||
OnClick="@(() => JumpToSeason(season))">
|
||||
@season.StartMonth/@season.StartDay — @season.Name
|
||||
</MudButton>
|
||||
}
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
|
||||
@@ -38,24 +43,24 @@
|
||||
</MudChip>
|
||||
<MudDivider Class="mb-4" />
|
||||
<!-- Hero 섹션 미리보기 -->
|
||||
<div style="background: linear-gradient(135deg, #1a365d 0%, #2a4365 100%); border-radius: 12px; padding: 2rem; color: white; margin-bottom: 1.5rem;">
|
||||
<div class="admin-season-hero">
|
||||
@if (activeSeason.DaysUntilDeadline <= 7 && activeSeason.DaysUntilDeadline >= 0)
|
||||
{
|
||||
<div style="background: #f59e0b; color: #1a202c; display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; margin-bottom: 1rem;">
|
||||
<div class="admin-season-badge">
|
||||
D-@activeSeason.DaysUntilDeadline 마감 임박
|
||||
</div>
|
||||
}
|
||||
<div style="font-size: 1.8rem; font-weight: 800; white-space: pre-line; margin-bottom: 0.5rem; line-height: 1.3;">
|
||||
<div class="admin-season-hero-title">
|
||||
@activeSeason.HeroHeadline
|
||||
</div>
|
||||
<div style="font-size: 0.95rem; color: rgba(255,255,255,0.8); margin-bottom: 1.5rem;">
|
||||
<div class="admin-season-hero-subtext">
|
||||
@activeSeason.HeroSubtext
|
||||
</div>
|
||||
<div style="display: flex; gap: 0.75rem; flex-wrap: wrap;">
|
||||
<div style="background: #e53e3e; color: white; padding: 10px 20px; border-radius: 8px; font-weight: 700; font-size: 0.95rem;">
|
||||
<div class="admin-season-hero-actions">
|
||||
<div class="admin-season-cta">
|
||||
@activeSeason.CtaText
|
||||
</div>
|
||||
<div style="background: transparent; border: 2px solid rgba(255,255,255,0.5); color: white; padding: 10px 20px; border-radius: 8px; font-size: 0.95rem;">
|
||||
<div class="admin-season-secondary-cta">
|
||||
서비스 안내
|
||||
</div>
|
||||
</div>
|
||||
@@ -102,23 +107,23 @@
|
||||
선택한 날짜(@(simulationDate?.ToString("MM월 dd일") ?? "-"))는 시즌 비활성 기간입니다.
|
||||
홈페이지는 기본 Hero를 표시합니다.
|
||||
</MudAlert>
|
||||
<div style="background: linear-gradient(135deg, #1a365d 0%, #2a4365 100%); border-radius: 12px; padding: 2rem; color: white; margin-top: 1.5rem;">
|
||||
<div style="font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem;">
|
||||
<div class="admin-season-hero admin-season-hero--inactive">
|
||||
<div class="admin-season-hero-title">
|
||||
사업자 세금, 부동산,<br/>가족자산까지
|
||||
</div>
|
||||
<div style="font-size: 0.95rem; color: rgba(255,255,255,0.8); margin-bottom: 1.5rem;">
|
||||
<div class="admin-season-hero-subtext">
|
||||
세무사·부동산중개사·보험설계사 자격 보유 | 온라인 맞춤 상담
|
||||
</div>
|
||||
<div style="background: #e53e3e; color: white; display: inline-block; padding: 10px 20px; border-radius: 8px; font-weight: 700;">
|
||||
<div class="admin-season-cta">
|
||||
무료 상담 신청
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</MudPaper>
|
||||
|
||||
<MudPaper Class="pa-4 mt-4" Elevation="1">
|
||||
<MudPaper Class="pa-4 mt-4 admin-season-panel" Elevation="1">
|
||||
<MudText Typo="Typo.h6" Class="mb-3">연간 시즌 타임라인</MudText>
|
||||
<MudSimpleTable Dense="true">
|
||||
<MudSimpleTable Dense="true" Class="admin-season-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>기간</th>
|
||||
@@ -131,12 +136,12 @@
|
||||
@foreach (var s in TaxSeasonCalendar.Seasons)
|
||||
{
|
||||
var isActive = activeSeason?.Key == s.Key;
|
||||
<tr style="@(isActive ? "background: rgba(66,153,225,0.1);" : "")">
|
||||
<td style="white-space: nowrap;">
|
||||
<tr class="@(isActive ? "admin-season-row is-active" : "admin-season-row")">
|
||||
<td class="admin-nowrap">
|
||||
@s.StartMonth/@s.StartDay ~ @s.EndMonth/@s.EndDay
|
||||
</td>
|
||||
<td>@s.Name</td>
|
||||
<td><code style="font-size:0.8rem;">@s.RelatedCategorySlug</code></td>
|
||||
<td><code class="admin-code-sm">@s.RelatedCategorySlug</code></td>
|
||||
<td>
|
||||
@if (isActive)
|
||||
{
|
||||
@@ -144,7 +149,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="color: #a0aec0; font-size: 0.85rem;">비활성</span>
|
||||
<span class="admin-muted-label">비활성</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@using System.Collections.Generic
|
||||
@using TaxBaik.Web.Services
|
||||
@using TaxBaik.Domain.Interfaces
|
||||
@inject IApiClient ApiClient
|
||||
@inject ISnackbar Snackbar
|
||||
@@ -11,15 +10,37 @@
|
||||
|
||||
<AdminPageHeader Title="설정" Eyebrow="System" Subtitle="공개 사이트 연락처와 관리자 계정 보안을 관리합니다." />
|
||||
|
||||
<MudGrid Class="mb-3" Spacing="2">
|
||||
<MudItem xs="12" md="4">
|
||||
<MudPaper Class="admin-surface" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline">공개 정보</MudText>
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold">@form.Phone</MudText>
|
||||
<MudText Typo="Typo.body2">@form.Email</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="4">
|
||||
<MudPaper Class="admin-surface" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline">소셜 채널</MudText>
|
||||
<MudText Typo="Typo.body2">카카오채널과 인스타그램 링크를 함께 관리합니다.</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="4">
|
||||
<MudPaper Class="admin-surface" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline">보안 기준</MudText>
|
||||
<MudText Typo="Typo.body2">비밀번호는 12자 이상, 변경 전 확인을 요구합니다.</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
|
||||
<MudGrid>
|
||||
<MudItem xs="12" md="7">
|
||||
<AdminEditorPanel Loading="@isLoadingSettings">
|
||||
<div class="admin-section-header compact">
|
||||
<MudStack Row="true" AlignItems="AlignItems.Start" Justify="Justify.SpaceBetween" Class="admin-section-header compact">
|
||||
<div>
|
||||
<MudText Typo="Typo.h6">사이트 정보</MudText>
|
||||
<MudText Typo="Typo.body2">홈페이지와 문의 알림에 노출되는 기본 정보입니다.</MudText>
|
||||
</div>
|
||||
</div>
|
||||
</MudStack>
|
||||
<MudForm>
|
||||
<MudTextField @bind-Value="form.Phone" Label="전화번호"
|
||||
Variant="Variant.Outlined" Class="mb-4" />
|
||||
@@ -42,12 +63,12 @@
|
||||
|
||||
<MudItem xs="12" md="5">
|
||||
<AdminEditorPanel Loading="@isLoadingSettings">
|
||||
<div class="admin-section-header compact">
|
||||
<MudStack Row="true" AlignItems="AlignItems.Start" Justify="Justify.SpaceBetween" Class="admin-section-header compact">
|
||||
<div>
|
||||
<MudText Typo="Typo.h6">계정 관리</MudText>
|
||||
<MudText Typo="Typo.body2">비밀번호는 12자 이상으로 관리합니다.</MudText>
|
||||
</div>
|
||||
</div>
|
||||
</MudStack>
|
||||
|
||||
<MudForm>
|
||||
<MudTextField @bind-Value="passwordForm.CurrentPassword" Label="현재 비밀번호" InputType="InputType.Password"
|
||||
@@ -196,5 +217,4 @@
|
||||
{
|
||||
public string Message { get; set; } = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/admin/tax-filing-schedules"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@using TaxBaik.Web.Services.AdminClients
|
||||
@using TaxBaik.Domain.Entities
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@inject ITaxFilingScheduleBrowserClient TaxFilingClient
|
||||
@@ -35,57 +34,58 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="admin-grid table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>고객</th>
|
||||
<th>신고 유형</th>
|
||||
<th>마감일</th>
|
||||
<th>신고연도</th>
|
||||
<th>상태</th>
|
||||
<th>작업</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in schedules)
|
||||
{
|
||||
var effectiveDueDate = BusinessDayCalculator.GetEffectiveDueDate(DateOnly.FromDateTime(item.DueDate));
|
||||
var daysLeft = BusinessDayCalculator.GetDday(DateOnly.FromDateTime(item.DueDate));
|
||||
<tr @onclick="() => OnRowSelected(item)" style="cursor:pointer;">
|
||||
<td>@item.Id</td>
|
||||
<td>@clientMap.GetValueOrDefault(item.ClientId)</td>
|
||||
<td>@item.FilingType</td>
|
||||
<td>
|
||||
@effectiveDueDate.ToDateTime(TimeOnly.MinValue).ToString("yyyy-MM-dd")
|
||||
@if (daysLeft >= 0)
|
||||
<MudDataGrid T="TaxFilingSchedule" Items="@schedules" Dense="true" Hover="true" Striped="true" Class="admin-grid mt-4">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" Class="admin-table-id-column" />
|
||||
<TemplateColumn Title="고객" Sortable="true">
|
||||
<CellTemplate>
|
||||
@clientMap.GetValueOrDefault(context.Item.ClientId)
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<PropertyColumn Property="x => x.FilingType" Title="신고 유형" Sortable="true" />
|
||||
<TemplateColumn Title="마감일" Sortable="true">
|
||||
<CellTemplate>
|
||||
@{
|
||||
var effectiveDueDate = BusinessDayCalculator.GetEffectiveDueDate(DateOnly.FromDateTime(context.Item.DueDate));
|
||||
var daysLeft = BusinessDayCalculator.GetDday(DateOnly.FromDateTime(context.Item.DueDate));
|
||||
}
|
||||
@effectiveDueDate.ToDateTime(TimeOnly.MinValue).ToString("yyyy-MM-dd")
|
||||
@if (daysLeft >= 0)
|
||||
{
|
||||
<span class="ms-1">(D-@daysLeft)</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="ms-1">(마감 @Math.Abs(daysLeft)일 경과)</span>
|
||||
}
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<PropertyColumn Property="x => x.FilingYear" Title="신고연도" Sortable="true" />
|
||||
<TemplateColumn Title="상태" Sortable="true">
|
||||
<CellTemplate>
|
||||
@(context.Item.Status == "completed" ? "완료" : "대기")
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<TemplateColumn Title="작업" CellStyleFunc="@(_ => "text-align: right;")">
|
||||
<CellTemplate>
|
||||
<MudButtonGroup Size="Size.Small" Variant="Variant.Text">
|
||||
<MudButton Color="Color.Primary" OnClick="@(() => OnRowSelected(context.Item))">선택</MudButton>
|
||||
<MudButton Color="Color.Error" OnClick="@(() => DeleteSchedule(context.Item.Id))">삭제</MudButton>
|
||||
@if (context.Item.Status != "completed")
|
||||
{
|
||||
<span class="ms-1">(D-@daysLeft)</span>
|
||||
<MudButton Color="Color.Success" OnClick="@(() => CompleteSchedule(context.Item.Id))">완료</MudButton>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="ms-1">(마감 @Math.Abs(daysLeft)일 경과)</span>
|
||||
}
|
||||
</td>
|
||||
<td>@item.FilingYear</td>
|
||||
<td>@(item.Status == "completed" ? "완료" : "대기")</td>
|
||||
<td>
|
||||
<button type="button" class="mud-button-root mud-button mud-button-text mud-ripple" @onclick:stopPropagation="true" @onclick="@(async () => await DeleteSchedule(item.Id))">삭제</button>
|
||||
@if (item.Status != "completed")
|
||||
{
|
||||
<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>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</MudButtonGroup>
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
</Columns>
|
||||
</MudDataGrid>
|
||||
}
|
||||
</MudItem>
|
||||
|
||||
<!-- Right: Detail Form Panel (Inline Editor) -->
|
||||
<MudItem XS="12" MD="4">
|
||||
<MudPaper Class="pa-4 admin-surface admin-editor-panel" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 400px;">
|
||||
<AdminEditorPanel Loading="false">
|
||||
<div class="d-flex align-center justify-space-between mb-4">
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold">@(isEditMode ? "신고 일정 상세" : "새 신고 일정 추가")</MudText>
|
||||
@if (isEditMode)
|
||||
@@ -98,8 +98,7 @@ else
|
||||
<MudForm @ref="form">
|
||||
<div class="mb-3">
|
||||
<label class="mud-input-label mud-input-label-animated mud-input-label-outlined mb-1">고객</label>
|
||||
<select class="mud-input mud-input-outlined mud-input-root mud-input-root-adorned-start"
|
||||
style="width: 100%; min-height: 56px; padding: 16px 14px;"
|
||||
<select class="mud-input mud-input-outlined mud-input-root mud-input-root-adorned-start admin-native-select"
|
||||
value="@(scheduleForm.ClientId?.ToString() ?? string.Empty)"
|
||||
disabled="@isEditMode"
|
||||
@onchange="e => scheduleForm.ClientId = int.TryParse(e.Value?.ToString(), out var clientId) ? clientId : null">
|
||||
@@ -129,7 +128,7 @@ else
|
||||
}
|
||||
</div>
|
||||
</MudForm>
|
||||
</MudPaper>
|
||||
</AdminEditorPanel>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
@using TaxBaik.Web.Services
|
||||
@using TaxBaik.Domain.Entities
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@inject ITaxFilingBrowserClient FilingClient
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/admin/tax-filings"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@attribute [Authorize]
|
||||
@using TaxBaik.Web.Services
|
||||
@using TaxBaik.Domain.Entities
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@inject ITaxFilingBrowserClient FilingClient
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/admin/tax-profiles"
|
||||
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
|
||||
@using System.ComponentModel.DataAnnotations
|
||||
@using TaxBaik.Web.Services.AdminClients
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@inject ITaxProfileBrowserClient TaxProfileClient
|
||||
@inject IClientBrowserClient ClientClient
|
||||
@@ -32,39 +31,33 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="admin-grid table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>고객</th>
|
||||
<th>사업 유형</th>
|
||||
<th>위험도</th>
|
||||
<th>다음 신고</th>
|
||||
<th>작업</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in profiles)
|
||||
{
|
||||
<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>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<MudDataGrid T="TaxProfile" Items="@profiles" Dense="true" Hover="true" Striped="true" Class="admin-grid mt-4">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Id" Title="ID" Sortable="true" Class="admin-table-id-column" />
|
||||
<TemplateColumn Title="고객" Sortable="true">
|
||||
<CellTemplate>
|
||||
@clientMap.GetValueOrDefault(context.Item.ClientId)
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<PropertyColumn Property="x => x.BusinessType" Title="사업 유형" Sortable="true" />
|
||||
<PropertyColumn Property="x => x.TaxRiskLevel" Title="위험도" Sortable="true" />
|
||||
<PropertyColumn Property="x => x.NextFilingDueDate" Title="다음 신고" Sortable="true" Format="yyyy-MM-dd" />
|
||||
<TemplateColumn Title="작업" CellStyleFunc="@(_ => "text-align: right;")">
|
||||
<CellTemplate>
|
||||
<MudButtonGroup Size="Size.Small" Variant="Variant.Text">
|
||||
<MudButton Color="Color.Primary" OnClick="@(() => OnRowSelected(context.Item))">선택</MudButton>
|
||||
<MudButton Color="Color.Error" OnClick="@(() => DeleteProfile(context.Item.Id))">삭제</MudButton>
|
||||
</MudButtonGroup>
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
</Columns>
|
||||
</MudDataGrid>
|
||||
}
|
||||
</MudItem>
|
||||
|
||||
<!-- Right: Detail Form Panel (Inline Editor) -->
|
||||
<MudItem XS="12" MD="4">
|
||||
<MudPaper Class="pa-4 admin-surface admin-editor-panel" Elevation="0" Style="border: 1px solid var(--border-color); min-height: 400px;">
|
||||
<AdminEditorPanel Loading="false">
|
||||
<div class="d-flex align-center justify-space-between mb-4">
|
||||
<MudText Typo="Typo.h6" Class="font-weight-bold">@(isEditMode ? "세무 프로필 수정" : "새 세무 프로필 추가")</MudText>
|
||||
@if (isEditMode)
|
||||
@@ -94,7 +87,7 @@ else
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="SaveProfile" id="btn-save-profile">저장</MudButton>
|
||||
</div>
|
||||
</MudForm>
|
||||
</MudPaper>
|
||||
</AdminEditorPanel>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
}
|
||||
|
||||
@@ -50,8 +50,14 @@ public class AdminDashboardClient : IAdminDashboardClient
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
{
|
||||
_logger.LogDebug("Dashboard summary request returned 401; using empty summary");
|
||||
return new AdminDashboardSummary(0, 0, 0, 0, []);
|
||||
}
|
||||
|
||||
_logger.LogError(ex, "Failed to fetch dashboard summary");
|
||||
throw;
|
||||
return new AdminDashboardSummary(0, 0, 0, 0, []);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,8 +72,11 @@ public class AdminDashboardClient : IAdminDashboardClient
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
return [];
|
||||
|
||||
_logger.LogError(ex, "Failed to fetch upcoming filings");
|
||||
throw;
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +91,11 @@ public class AdminDashboardClient : IAdminDashboardClient
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
return [];
|
||||
|
||||
_logger.LogError(ex, "Failed to fetch recent inquiries");
|
||||
throw;
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,8 +113,11 @@ public class AdminDashboardClient : IAdminDashboardClient
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
return new MonthlyStatsDto();
|
||||
|
||||
_logger.LogError(ex, "Failed to fetch monthly stats");
|
||||
throw;
|
||||
return new MonthlyStatsDto();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace TaxBaik.Web.Client.Components.Admin.Services;
|
||||
|
||||
public sealed class AdminSessionBootstrap : IAdminSessionBootstrap
|
||||
{
|
||||
private readonly ITokenStore _tokenStore;
|
||||
private readonly ILocalStorageService _localStorage;
|
||||
private readonly ILogger<AdminSessionBootstrap> _logger;
|
||||
private readonly SemaphoreSlim _gate = new(1, 1);
|
||||
private bool _initialized;
|
||||
|
||||
public AdminSessionBootstrap(
|
||||
ITokenStore tokenStore,
|
||||
ILocalStorageService localStorage,
|
||||
ILogger<AdminSessionBootstrap> logger)
|
||||
{
|
||||
_tokenStore = tokenStore;
|
||||
_localStorage = localStorage;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task EnsureInitializedAsync()
|
||||
{
|
||||
if (_initialized)
|
||||
return;
|
||||
|
||||
await _gate.WaitAsync();
|
||||
try
|
||||
{
|
||||
if (_initialized)
|
||||
return;
|
||||
|
||||
await LoadTokensAsync();
|
||||
_initialized = true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
_gate.Release();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task LoadTokensAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var accessToken = await _localStorage.GetItemAsStringAsync("accessToken");
|
||||
var refreshToken = await _localStorage.GetItemAsStringAsync("refreshToken");
|
||||
var expiryRaw = await _localStorage.GetItemAsStringAsync("tokenExpiry");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(accessToken))
|
||||
_tokenStore.AccessToken = accessToken;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(refreshToken))
|
||||
_tokenStore.RefreshToken = refreshToken;
|
||||
|
||||
if (TryNormalizeExpiryTicks(expiryRaw, out var expiryTicks))
|
||||
_tokenStore.TokenExpiryTicks = expiryTicks;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogDebug(ex, "Admin session bootstrap failed");
|
||||
}
|
||||
}
|
||||
|
||||
private static bool TryNormalizeExpiryTicks(string? rawValue, out long ticks)
|
||||
{
|
||||
ticks = 0;
|
||||
if (!long.TryParse(rawValue, out var parsed))
|
||||
return false;
|
||||
|
||||
if (parsed > 10_000_000_000_000L && parsed < 100_000_000_000_000_000L)
|
||||
{
|
||||
ticks = parsed;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (parsed > 1_000_000_000_000L && parsed < 100_000_000_000_000L)
|
||||
{
|
||||
ticks = DateTimeOffset.FromUnixTimeMilliseconds(parsed).UtcDateTime.Ticks;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -106,6 +106,6 @@ public class ApiClient : IApiClient
|
||||
{
|
||||
var relative = $"api/{endpoint.TrimStart('/')}";
|
||||
var appRoot = new Uri(_navigationManager.BaseUri);
|
||||
return new Uri(appRoot, $"/{relative}"); // 상대 경로 사용 (Nginx가 /taxbaik 프리픽스 처리)
|
||||
return new Uri(appRoot, $"/{relative}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,15 +9,21 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
|
||||
{
|
||||
private readonly ITokenStore _tokenStore;
|
||||
private readonly IApiClient _apiClient;
|
||||
private readonly IAdminSessionBootstrap _sessionBootstrap;
|
||||
private readonly ILocalStorageService _localStorage;
|
||||
private readonly ILogger<CustomAuthenticationStateProvider> _logger;
|
||||
|
||||
public CustomAuthenticationStateProvider(
|
||||
ITokenStore tokenStore,
|
||||
IApiClient apiClient,
|
||||
IAdminSessionBootstrap sessionBootstrap,
|
||||
ILocalStorageService localStorage,
|
||||
ILogger<CustomAuthenticationStateProvider> logger)
|
||||
{
|
||||
_tokenStore = tokenStore;
|
||||
_apiClient = apiClient;
|
||||
_sessionBootstrap = sessionBootstrap;
|
||||
_localStorage = localStorage;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
@@ -25,6 +31,8 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
|
||||
{
|
||||
try
|
||||
{
|
||||
await _sessionBootstrap.EnsureInitializedAsync();
|
||||
|
||||
var accessToken = _tokenStore.AccessToken;
|
||||
|
||||
if (string.IsNullOrEmpty(_tokenStore.AccessToken))
|
||||
@@ -165,6 +173,7 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
|
||||
{
|
||||
// TokenStore 초기화
|
||||
_tokenStore.Clear();
|
||||
await _localStorage.ClearAuthAsync();
|
||||
|
||||
NotifyAuthenticationStateChanged(GetAuthenticationStateAsync());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace TaxBaik.Web.Client.Components.Admin.Services;
|
||||
|
||||
public interface IAdminSessionBootstrap
|
||||
{
|
||||
Task EnsureInitializedAsync();
|
||||
}
|
||||
@@ -71,7 +71,7 @@ public class TokenRefreshHandler : DelegatingHandler
|
||||
var scheme = originalRequest.RequestUri?.Scheme ?? "http";
|
||||
|
||||
using var httpClient = new HttpClient();
|
||||
var refreshUri = new Uri($"{scheme}://{authority}/api/auth/refresh"); // 상대 경로 사용 (Nginx가 /taxbaik 프리픽스 처리)
|
||||
var refreshUri = new Uri($"{scheme}://{authority}/api/auth/refresh");
|
||||
var json = JsonSerializer.Serialize(new { refreshToken });
|
||||
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<AdminDataPanel Loading="@Loading" SkeletonContent="@SkeletonContent">
|
||||
<div class="admin-editor-panel-shell">
|
||||
<MudPaper Class="admin-surface admin-editor-panel-shell" Elevation="0" Outlined="true">
|
||||
@ChildContent
|
||||
</div>
|
||||
</MudPaper>
|
||||
</AdminDataPanel>
|
||||
|
||||
@code {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="pa-6 text-center">
|
||||
<MudIcon Icon="@Icon" Style="font-size:3rem; opacity:.3;" />
|
||||
<MudIcon Icon="@Icon" Class="admin-empty-state-icon" />
|
||||
<MudText Class="mt-2 text-muted">@Message</MudText>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
@inject IJSRuntime JS
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Small" Class="admin-login-page d-flex align-center justify-center" Style="min-height: 100vh;">
|
||||
<MudPaper Class="pa-8" Elevation="3" Style="width: 100%; max-width: 400px;">
|
||||
<MudText Typo="Typo.h4" Class="mb-6 text-center">관리자 로그인</MudText>
|
||||
<MudContainer MaxWidth="MaxWidth.Small" Class="admin-login-page admin-login-page-shell d-flex align-center justify-center">
|
||||
<MudPaper Class="pa-8 admin-login-card" Elevation="3">
|
||||
<MudStack Spacing="1" Class="mb-6 text-center">
|
||||
<MudText Typo="Typo.h4">관리자 로그인</MudText>
|
||||
<MudText Typo="Typo.body2" Color="Color.Secondary">관리자 계정으로 운영 화면에 प्रवेश합니다.</MudText>
|
||||
</MudStack>
|
||||
|
||||
<form id="admin-login-form" @onsubmit="HandleLogin" @onsubmit:preventDefault>
|
||||
<MudTextField
|
||||
@@ -23,32 +26,32 @@
|
||||
InputType="InputType.Password"
|
||||
Clearable="true" />
|
||||
|
||||
<div class="d-flex align-center mb-4">
|
||||
<MudCheckBox T="bool"
|
||||
@bind-Value="rememberMe"
|
||||
Label="아이디 기억하기"
|
||||
Color="Color.Primary"
|
||||
Class="ml-n3" />
|
||||
</div>
|
||||
<MudCheckBox T="bool"
|
||||
@bind-Value="rememberMe"
|
||||
Label="아이디 기억하기"
|
||||
Color="Color.Primary"
|
||||
Class="mb-4" />
|
||||
|
||||
@if (!string.IsNullOrEmpty(errorMessage))
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Class="mb-4">@errorMessage</MudAlert>
|
||||
}
|
||||
|
||||
<MudButton
|
||||
ButtonType="ButtonType.Submit"
|
||||
Variant="Variant.Filled"
|
||||
Color="Color.Primary"
|
||||
FullWidth="true"
|
||||
Size="Size.Large"
|
||||
Class="mb-4">
|
||||
<MudButton ButtonType="ButtonType.Submit"
|
||||
Variant="Variant.Filled"
|
||||
Color="Color.Primary"
|
||||
FullWidth="true"
|
||||
Size="Size.Large"
|
||||
Class="mb-4">
|
||||
로그인
|
||||
</MudButton>
|
||||
|
||||
<MudText Typo="Typo.caption" Class="text-center">
|
||||
<em>테스트: admin / Admin@123456</em>
|
||||
</MudText>
|
||||
@if (!string.Equals(Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"), "Production", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
<MudText Typo="Typo.caption" Class="text-center">
|
||||
<em>개발/테스트 환경에서만 표시되는 안내입니다.</em>
|
||||
</MudText>
|
||||
}
|
||||
</form>
|
||||
</MudPaper>
|
||||
</MudContainer>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="admin-metric-card-body">
|
||||
<span class="admin-metric-card-label">@Label</span>
|
||||
<div class="admin-metric-card-value-row">
|
||||
<span class="admin-metric-card-value" style="color: @ValueColor;">@Value</span>
|
||||
<span class="admin-metric-card-icon" style="color: @IconColor;">@Icon</span>
|
||||
<span class="admin-metric-card-value" style="--admin-metric-value-color: @ValueColor;">@Value</span>
|
||||
<span class="admin-metric-card-icon" style="--admin-metric-icon-color: @IconColor;">@Icon</span>
|
||||
</div>
|
||||
<span class="admin-metric-card-caption">@Caption</span>
|
||||
</div>
|
||||
|
||||
@@ -43,4 +43,51 @@ public static class AdminNavigationCatalog
|
||||
new("공통관리", "/admin/common-codes", Icons.Material.Filled.Apps, AllowedRoles: ["Admin"]),
|
||||
]),
|
||||
];
|
||||
|
||||
public static bool IsActive(AdminNavigationItem item, string currentPath)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(currentPath))
|
||||
return false;
|
||||
|
||||
var normalizedPath = NormalizePath(currentPath);
|
||||
var normalizedHref = NormalizePath(item.Href);
|
||||
|
||||
return item.IsExact
|
||||
? string.Equals(normalizedPath, normalizedHref, StringComparison.OrdinalIgnoreCase)
|
||||
: normalizedPath.StartsWith(normalizedHref, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public static string GetLabel(string currentPath)
|
||||
{
|
||||
var path = NormalizePath(currentPath);
|
||||
return path switch
|
||||
{
|
||||
"/" or "/admin" or "/admin/dashboard" or "/dashboard" => "대시보드",
|
||||
"/admin/inquiries" => "문의 관리",
|
||||
"/admin/clients" => "고객 관리",
|
||||
"/admin/blog" => "블로그 관리",
|
||||
"/admin/faqs" => "FAQ 관리",
|
||||
"/admin/announcements" => "공지사항",
|
||||
"/admin/tax-profiles" => "세무 프로필",
|
||||
"/admin/tax-filing-schedules" => "신고 일정",
|
||||
"/admin/contracts" => "계약 관리",
|
||||
"/admin/consulting-activities" => "상담 활동",
|
||||
"/admin/revenue-trackings" => "수익 추적",
|
||||
"/admin/common-codes" => "공통관리",
|
||||
"/admin/settings" => "설정",
|
||||
_ => "운영 화면"
|
||||
};
|
||||
}
|
||||
|
||||
private static string NormalizePath(string path)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(path))
|
||||
return "/";
|
||||
|
||||
var normalized = path.Trim();
|
||||
if (!normalized.StartsWith('/'))
|
||||
normalized = "/" + normalized;
|
||||
|
||||
return normalized.TrimEnd('/') is "" ? "/" : normalized.TrimEnd('/');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
<section class="admin-page-hero">
|
||||
<div>
|
||||
@if (!string.IsNullOrWhiteSpace(Eyebrow))
|
||||
<MudPaper Class="admin-page-hero" Elevation="0" Outlined="true">
|
||||
<MudStack Row="true" Wrap="Wrap.Wrap" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Spacing="3">
|
||||
<div>
|
||||
@if (!string.IsNullOrWhiteSpace(Eyebrow))
|
||||
{
|
||||
<MudText Typo="Typo.caption" Class="admin-eyebrow">@Eyebrow</MudText>
|
||||
}
|
||||
<MudText Typo="Typo.h4" Class="admin-page-title">@Title</MudText>
|
||||
@if (!string.IsNullOrWhiteSpace(Subtitle))
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="admin-page-subtitle">@Subtitle</MudText>
|
||||
}
|
||||
</div>
|
||||
@if (ChildContent is not null)
|
||||
{
|
||||
<MudText Typo="Typo.caption" Class="admin-eyebrow">@Eyebrow</MudText>
|
||||
<div>@ChildContent</div>
|
||||
}
|
||||
<MudText Typo="Typo.h4" Class="admin-page-title">@Title</MudText>
|
||||
@if (!string.IsNullOrWhiteSpace(Subtitle))
|
||||
{
|
||||
<MudText Typo="Typo.body2" Class="admin-page-subtitle">@Subtitle</MudText>
|
||||
}
|
||||
</div>
|
||||
@if (ChildContent is not null)
|
||||
{
|
||||
<div>@ChildContent</div>
|
||||
}
|
||||
</section>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
|
||||
@code {
|
||||
[Parameter, EditorRequired]
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
@using TaxBaik.Web.Client.Components.Admin.Shared
|
||||
@inject NavigationManager Navigation
|
||||
@inject TaxBaik.Web.Client.Components.Admin.Services.IAdminSessionBootstrap SessionBootstrap
|
||||
@implements IDisposable
|
||||
|
||||
<div class="admin-shell">
|
||||
<header class="admin-topbar">
|
||||
<button type="button" class="admin-menu-button" @onclick="ToggleDrawer">Menu</button>
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
Color="Color.Primary"
|
||||
Class="admin-menu-button"
|
||||
aria-label="메뉴 토글"
|
||||
aria-expanded="@drawerOpen"
|
||||
OnClick="@ToggleDrawer">
|
||||
메뉴
|
||||
</MudButton>
|
||||
<div class="admin-topbar-title">
|
||||
<div class="admin-brand-text">TaxBaik</div>
|
||||
<div class="admin-brand-subtitle">세무회계 관리 대시보드</div>
|
||||
</div>
|
||||
<div class="admin-topbar-actions">
|
||||
<a class="admin-topbar-action" href="/" target="_blank" rel="noopener">공개 사이트</a>
|
||||
<a class="admin-topbar-action" href="./logout">로그아웃</a>
|
||||
<span class="admin-topbar-status">현재: @currentRouteLabel</span>
|
||||
<MudButton Variant="Variant.Text" Color="Color.Primary" Href="/" Target="_blank" Class="admin-topbar-action">
|
||||
공개 사이트
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Text" Color="Color.Primary" Href="./logout" Class="admin-topbar-action">
|
||||
로그아웃
|
||||
</MudButton>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -33,15 +47,25 @@
|
||||
public RenderFragment? ChildContent { get; set; }
|
||||
|
||||
private bool drawerOpen = true;
|
||||
private string currentRouteLabel = "대시보드";
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
UpdateRouteLabel();
|
||||
Navigation.LocationChanged += OnLocationChanged;
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (!firstRender)
|
||||
return;
|
||||
|
||||
await SessionBootstrap.EnsureInitializedAsync();
|
||||
}
|
||||
|
||||
private void OnLocationChanged(object? sender, LocationChangedEventArgs args)
|
||||
{
|
||||
drawerOpen = true;
|
||||
UpdateRouteLabel();
|
||||
InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
@@ -50,6 +74,13 @@
|
||||
drawerOpen = !drawerOpen;
|
||||
}
|
||||
|
||||
private void UpdateRouteLabel()
|
||||
{
|
||||
var path = Navigation.ToBaseRelativePath(Navigation.Uri);
|
||||
path = string.IsNullOrWhiteSpace(path) ? "/" : "/" + path;
|
||||
currentRouteLabel = AdminNavigationCatalog.GetLabel(path);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Navigation.LocationChanged -= OnLocationChanged;
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using TaxBaik.Web.Client.Components.Admin.Shared
|
||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||
@inject NavigationManager Navigation
|
||||
@implements IDisposable
|
||||
<aside class="admin-drawer">
|
||||
<div class="admin-drawer-brand">
|
||||
<MudPaper Class="admin-drawer-brand" Elevation="0">
|
||||
<div class="admin-brand-mark">T</div>
|
||||
<div>
|
||||
<div class="admin-drawer-title">TaxBaik</div>
|
||||
<div class="admin-drawer-subtitle">세무 운영 콘솔</div>
|
||||
<MudText Typo="Typo.subtitle2" Class="admin-drawer-title">TaxBaik</MudText>
|
||||
<MudText Typo="Typo.caption" Class="admin-drawer-subtitle">세무 운영 콘솔</MudText>
|
||||
</div>
|
||||
</div>
|
||||
</MudPaper>
|
||||
|
||||
<MudPaper Class="admin-drawer-context" Elevation="0" Outlined="true">
|
||||
<MudText Typo="Typo.overline" Class="admin-drawer-context-label">현재 화면</MudText>
|
||||
<MudText Typo="Typo.body2" Class="admin-drawer-context-value">@currentLabel</MudText>
|
||||
</MudPaper>
|
||||
|
||||
<nav class="admin-nav" aria-label="관리자 메뉴">
|
||||
@foreach (var group in visibleSections)
|
||||
@@ -16,8 +23,10 @@
|
||||
<div class="admin-nav-group">@group.Label</div>
|
||||
@foreach (var item in group.Items)
|
||||
{
|
||||
<a class="admin-nav-link" href="@item.Href">
|
||||
<span class="admin-nav-link-icon">@item.Icon</span>
|
||||
<a class="admin-nav-link @(AdminNavigationCatalog.IsActive(item, currentPath) ? "active" : null)"
|
||||
href="@item.Href"
|
||||
aria-current="@(AdminNavigationCatalog.IsActive(item, currentPath) ? "page" : null)">
|
||||
<MudIcon Icon="@item.Icon" Class="admin-nav-link-icon" />
|
||||
<span class="admin-nav-link-label">@item.Label</span>
|
||||
@if (!string.IsNullOrWhiteSpace(item.Badge))
|
||||
{
|
||||
@@ -28,14 +37,23 @@
|
||||
}
|
||||
</nav>
|
||||
|
||||
<div class="admin-drawer-footer">
|
||||
<MudPaper Class="admin-drawer-footer" Elevation="0">
|
||||
<a class="admin-footer-item" href="/" target="_blank" rel="noopener">공개 사이트</a>
|
||||
<a class="admin-footer-item" href="./logout">로그아웃</a>
|
||||
</div>
|
||||
</MudPaper>
|
||||
</aside>
|
||||
|
||||
@code {
|
||||
private IReadOnlyList<AdminNavigationSection> visibleSections = [];
|
||||
private string currentPath = "/";
|
||||
private string currentLabel = "대시보드";
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
currentPath = ResolveCurrentPath();
|
||||
currentLabel = AdminNavigationCatalog.GetLabel(currentPath);
|
||||
Navigation.LocationChanged += OnLocationChanged;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
@@ -49,4 +67,22 @@
|
||||
.Where(section => section.Items.Count > 0)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private void OnLocationChanged(object? sender, LocationChangedEventArgs args)
|
||||
{
|
||||
currentPath = ResolveCurrentPath();
|
||||
currentLabel = AdminNavigationCatalog.GetLabel(currentPath);
|
||||
InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
private string ResolveCurrentPath()
|
||||
{
|
||||
var path = Navigation.ToBaseRelativePath(Navigation.Uri);
|
||||
return string.IsNullOrWhiteSpace(path) ? "/" : "/" + path;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Navigation.LocationChanged -= OnLocationChanged;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@using TaxBaik.Domain.Entities
|
||||
@using TaxBaik.Web.Services.AdminClients
|
||||
@inject ICommonCodeBrowserClient CommonCodeClient
|
||||
|
||||
<MudSelect T="string"
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
@using TaxBaik.Application.Services
|
||||
@using TaxBaik.Application.Utils
|
||||
@using TaxBaik.Domain.Entities
|
||||
@using TaxBaik.Web.Client.Components.Admin.Services
|
||||
@using TaxBaik.Web.Client.Components.Admin.Services.AdminClients
|
||||
@using TaxBaik.WasmClient.Components.Admin.Forms
|
||||
@using TaxBaik.Web.Services
|
||||
@using TaxBaik.Web.Services.AdminClients
|
||||
@using TaxBaik.WasmClient.Components.Admin.Shared
|
||||
@using TaxBaik.WasmClient.Components.Admin.Layout
|
||||
|
||||
@@ -7,12 +7,14 @@ using TaxBaik.Web.Services.AdminClients;
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
builder.RootComponents.Add<TaxBaik.WasmClient.Components.Admin.App>("#app");
|
||||
|
||||
// API Base Url: 상대 경로 사용 (Nginx가 /taxbaik 프리픽스 처리)
|
||||
// API Base Url: 상대 경로 사용
|
||||
var hostBase = new Uri(builder.HostEnvironment.BaseAddress);
|
||||
var apiBaseUrl = new Uri(hostBase, "/api/").ToString();
|
||||
|
||||
// HTTP Client for API (with automatic token refresh)
|
||||
builder.Services.AddScoped<ITokenStore, TokenStore>();
|
||||
builder.Services.AddScoped<TaxBaik.Web.Client.Components.Admin.Services.ITokenStore, TaxBaik.Web.Client.Components.Admin.Services.TokenStore>();
|
||||
builder.Services.AddScoped<TaxBaik.Web.Services.ITokenStore, TaxBaik.Web.Services.TokenStore>();
|
||||
builder.Services.AddScoped<TaxBaik.Web.Client.Components.Admin.Services.IAdminSessionBootstrap, TaxBaik.Web.Client.Components.Admin.Services.AdminSessionBootstrap>();
|
||||
builder.Services.AddScoped<TokenRefreshHandler>();
|
||||
|
||||
builder.Services.AddHttpClient<IApiClient, ApiClient>(client =>
|
||||
@@ -21,6 +23,7 @@ builder.Services.AddHttpClient<IApiClient, ApiClient>(client =>
|
||||
}).AddHttpMessageHandler<TokenRefreshHandler>();
|
||||
|
||||
// 각 Browser API Client 등록
|
||||
builder.Services.AddHttpClient<TaxBaik.Web.Client.Components.Admin.Services.IAdminDashboardClient, TaxBaik.Web.Client.Components.Admin.Services.AdminDashboardClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
|
||||
builder.Services.AddHttpClient<IAdminDashboardClient, AdminDashboardClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
|
||||
builder.Services.AddHttpClient<IBlogBrowserClient, BlogBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl)).AddHttpMessageHandler<TokenRefreshHandler>();
|
||||
builder.Services.AddHttpClient<ICategoryBrowserClient, CategoryBrowserClient>(client => client.BaseAddress = new Uri(apiBaseUrl));
|
||||
@@ -40,6 +43,7 @@ builder.Services.AddHttpClient<ICommonCodeBrowserClient, CommonCodeBrowserClient
|
||||
builder.Services.AddScoped<CustomAuthenticationStateProvider>();
|
||||
builder.Services.AddScoped<AuthenticationStateProvider>(sp => sp.GetRequiredService<CustomAuthenticationStateProvider>());
|
||||
builder.Services.AddScoped<ILocalStorageService, LocalStorageService>();
|
||||
builder.Services.AddScoped<TaxBaik.Web.Client.Components.Admin.Services.ILocalStorageService, TaxBaik.Web.Client.Components.Admin.Services.LocalStorageService>();
|
||||
builder.Services.AddCascadingAuthenticationState();
|
||||
builder.Services.AddAuthorizationCore();
|
||||
|
||||
|
||||
@@ -50,8 +50,14 @@ public class AdminDashboardClient : IAdminDashboardClient
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
{
|
||||
_logger.LogDebug("Dashboard summary request returned 401; using empty summary");
|
||||
return new(0, 0, 0, 0, []);
|
||||
}
|
||||
|
||||
_logger.LogError(ex, "Failed to fetch dashboard summary");
|
||||
throw;
|
||||
return new(0, 0, 0, 0, []);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,8 +72,11 @@ public class AdminDashboardClient : IAdminDashboardClient
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
return [];
|
||||
|
||||
_logger.LogError(ex, "Failed to fetch upcoming filings");
|
||||
throw;
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +91,11 @@ public class AdminDashboardClient : IAdminDashboardClient
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
return [];
|
||||
|
||||
_logger.LogError(ex, "Failed to fetch recent inquiries");
|
||||
throw;
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,8 +113,11 @@ public class AdminDashboardClient : IAdminDashboardClient
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
return new { };
|
||||
|
||||
_logger.LogError(ex, "Failed to fetch monthly stats");
|
||||
throw;
|
||||
return new { };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +106,6 @@ public class ApiClient : IApiClient
|
||||
{
|
||||
var relative = $"api/{endpoint.TrimStart('/')}";
|
||||
var appRoot = new Uri(_navigationManager.BaseUri);
|
||||
return new Uri(appRoot, $"/{relative}"); // 상대 경로 사용 (Nginx가 /taxbaik 프리픽스 처리)
|
||||
return new Uri(appRoot, $"/{relative}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,16 +3,27 @@
|
||||
@{
|
||||
ViewData["Title"] = "관리자 로그인";
|
||||
ViewData["Description"] = "관리자 로그인 페이지입니다.";
|
||||
ViewData["CanonicalUrl"] = $"{Request.Scheme}://{Request.Host}/taxbaik/admin/login";
|
||||
ViewData["CanonicalUrl"] = $"{Request.Scheme}://{Request.Host}/admin/login";
|
||||
}
|
||||
|
||||
<section class="container py-5" style="max-width: 560px;">
|
||||
<div class="card shadow-sm border-0">
|
||||
<section class="admin-login-shell">
|
||||
<div class="admin-login-hero">
|
||||
<p class="admin-login-kicker">TaxBaik Admin</p>
|
||||
<h1>관리자 로그인</h1>
|
||||
<p>로그인 후 대시보드, 문의 처리, 콘텐츠 운영 화면으로 바로 이동합니다.</p>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm border-0 admin-login-card">
|
||||
<div class="card-body p-4 p-md-5">
|
||||
<div class="mb-4">
|
||||
<p class="text-uppercase text-muted small mb-1">TaxBaik Admin</p>
|
||||
<h1 class="h3 fw-bold mb-2">관리자 로그인</h1>
|
||||
<p class="text-muted mb-0">로그인 후 대시보드와 관리자 기능을 이용할 수 있습니다.</p>
|
||||
<div class="admin-login-summary mb-4">
|
||||
<div>
|
||||
<p class="text-uppercase text-muted small mb-1">현재 화면</p>
|
||||
<strong>로그인</strong>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-uppercase text-muted small mb-1">진입 후</p>
|
||||
<strong>대시보드 자동 이동</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(Model.ErrorMessage))
|
||||
@@ -20,7 +31,7 @@
|
||||
<div class="alert alert-danger" role="alert">@Model.ErrorMessage</div>
|
||||
}
|
||||
|
||||
<form id="admin-login-form" method="post" class="vstack gap-3">
|
||||
<form id="admin-login-form" method="post" class="vstack gap-3 admin-login-form">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" id="ReturnUrl" name="ReturnUrl" value="@Model.ReturnUrl" />
|
||||
|
||||
@@ -37,7 +48,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" id="RememberMe" name="RememberMe" type="checkbox" value="true" checked="@(Model.RememberMe ? "checked" : null)" />
|
||||
<input class="form-check-input" id="RememberMe" name="RememberMe" type="checkbox" value="true" checked="@(Model.RememberMe)" />
|
||||
<label class="form-check-label" for="RememberMe">로그인 상태 유지</label>
|
||||
</div>
|
||||
|
||||
@@ -46,8 +57,8 @@
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p class="text-muted small mt-4 mb-0">
|
||||
이 페이지는 서버 렌더링 기반입니다. 로그인 성공 후 관리자 웹앱으로 이동합니다.
|
||||
<p class="admin-login-footnote">
|
||||
이 페이지는 서버 렌더링 기반이며, 로그인 성공 후 관리자 웹앱으로 이동합니다.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -91,11 +91,8 @@ public class LoginModel(AuthService authService) : PageModel
|
||||
if (string.Equals(absolute.Host, "www.taxbaik.com", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(absolute.Host, "taxbaik.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// PathAndQuery에서 /taxbaik 프리픽스 제거 (Nginx가 처리)
|
||||
var path = absolute.PathAndQuery;
|
||||
return path.StartsWith("/taxbaik/", StringComparison.OrdinalIgnoreCase)
|
||||
? path.Substring("/taxbaik".Length) // "/taxbaik/admin" → "/admin"
|
||||
: path;
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
rssContent.AppendLine("<rss version=\"2.0\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">");
|
||||
rssContent.AppendLine(" <channel>");
|
||||
rssContent.AppendLine(" <title>백원숙 세무회계 - 블로그</title>");
|
||||
rssContent.AppendLine(" <link>https://www.taxbaik.com/taxbaik</link>");
|
||||
rssContent.AppendLine(" <link>https://www.taxbaik.com</link>");
|
||||
rssContent.AppendLine(" <description>세무사 백원숙의 세금, 부동산, 가족자산 전문 블로그</description>");
|
||||
rssContent.AppendLine(" <language>ko-kr</language>");
|
||||
rssContent.AppendLine($" <lastBuildDate>{Model.LastBuildDate}</lastBuildDate>");
|
||||
@@ -18,8 +18,8 @@
|
||||
{
|
||||
rssContent.AppendLine(" <item>");
|
||||
rssContent.AppendLine($" <title>{System.Net.WebUtility.HtmlEncode(post.Title)}</title>");
|
||||
rssContent.AppendLine($" <link>https://www.taxbaik.com/taxbaik/blog/{post.Slug}</link>");
|
||||
rssContent.AppendLine($" <guid isPermaLink=\"true\">https://www.taxbaik.com/taxbaik/blog/{post.Slug}</guid>");
|
||||
rssContent.AppendLine($" <link>https://www.taxbaik.com/blog/{post.Slug}</link>");
|
||||
rssContent.AppendLine($" <guid isPermaLink=\"true\">https://www.taxbaik.com/blog/{post.Slug}</guid>");
|
||||
rssContent.AppendLine($" <pubDate>{post.PublishedAt?.ToString("R")}</pubDate>");
|
||||
var desc = post.Content?.Substring(0, Math.Min(200, post.Content?.Length ?? 0)) ?? "";
|
||||
rssContent.AppendLine($" <description>{System.Net.WebUtility.HtmlEncode(desc)}</description>");
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@{
|
||||
ViewData["Title"] = "고객 포털 로그인";
|
||||
ViewData["Description"] = "고객 포털 로그인 페이지입니다.";
|
||||
ViewData["CanonicalUrl"] = $"{Request.Scheme}://{Request.Host}/taxbaik/portal/login";
|
||||
ViewData["CanonicalUrl"] = $"{Request.Scheme}://{Request.Host}/portal/login";
|
||||
}
|
||||
|
||||
<section class="container py-5" style="max-width: 560px;">
|
||||
|
||||
@@ -52,5 +52,5 @@ public class LoginModel : PageModel
|
||||
public IActionResult OnPostKakao() => Challenge(BuildProps("kakao"), PortalOAuthDefaults.KakaoScheme);
|
||||
|
||||
private static AuthenticationProperties BuildProps(string provider) =>
|
||||
new() { RedirectUri = $"/taxbaik/portal/external-callback?provider={provider}" };
|
||||
new() { RedirectUri = $"/portal/external-callback?provider={provider}" };
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@{
|
||||
ViewData["Title"] = "고객 포털 회원가입";
|
||||
ViewData["Description"] = "고객 포털 회원가입 페이지입니다.";
|
||||
ViewData["CanonicalUrl"] = $"{Request.Scheme}://{Request.Host}/taxbaik/portal/register";
|
||||
ViewData["CanonicalUrl"] = $"{Request.Scheme}://{Request.Host}/portal/register";
|
||||
}
|
||||
|
||||
<section class="container py-5" style="max-width: 640px;">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
rssContent.AppendLine("<rss version=\"2.0\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">");
|
||||
rssContent.AppendLine(" <channel>");
|
||||
rssContent.AppendLine(" <title>백원숙 세무회계 - 블로그</title>");
|
||||
rssContent.AppendLine(" <link>https://www.taxbaik.com/taxbaik</link>");
|
||||
rssContent.AppendLine(" <link>https://www.taxbaik.com</link>");
|
||||
rssContent.AppendLine(" <description>세무사 백원숙의 세금, 부동산, 가족자산 전문 블로그</description>");
|
||||
rssContent.AppendLine(" <language>ko-kr</language>");
|
||||
rssContent.AppendLine($" <lastBuildDate>{Model.LastBuildDate}</lastBuildDate>");
|
||||
@@ -18,8 +18,8 @@
|
||||
{
|
||||
rssContent.AppendLine(" <item>");
|
||||
rssContent.AppendLine($" <title>{System.Net.WebUtility.HtmlEncode(post.Title)}</title>");
|
||||
rssContent.AppendLine($" <link>https://www.taxbaik.com/taxbaik/blog/{post.Slug}</link>");
|
||||
rssContent.AppendLine($" <guid isPermaLink=\"true\">https://www.taxbaik.com/taxbaik/blog/{post.Slug}</guid>");
|
||||
rssContent.AppendLine($" <link>https://www.taxbaik.com/blog/{post.Slug}</link>");
|
||||
rssContent.AppendLine($" <guid isPermaLink=\"true\">https://www.taxbaik.com/blog/{post.Slug}</guid>");
|
||||
rssContent.AppendLine($" <pubDate>{post.PublishedAt?.ToString("R")}</pubDate>");
|
||||
var desc = post.Content?.Substring(0, Math.Min(200, post.Content?.Length ?? 0)) ?? "";
|
||||
rssContent.AppendLine($" <description>{System.Net.WebUtility.HtmlEncode(desc)}</description>");
|
||||
|
||||
@@ -16,7 +16,7 @@ public class SitemapModel : PageModel
|
||||
|
||||
public async Task OnGetAsync()
|
||||
{
|
||||
var baseUrl = "https://www.taxbaik.com/taxbaik";
|
||||
var baseUrl = "https://www.taxbaik.com";
|
||||
|
||||
// 정적 페이지 (항상 포함)
|
||||
Urls.AddRange(new[]
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="@(ViewData["Title"] ?? "백원숙 세무회계 - 세무사 전문 상담")" />
|
||||
<meta property="og:description" content="@(ViewData["Description"] ?? "백원숙 세무회계 - 사업자 기장, 부동산 양도세·증여세, 종합소득세 전문 상담. 맞춤형 세무 절세 컨설팅 제공.")" />
|
||||
<meta property="og:image" content="@(ViewData["OgImage"] ?? "https://www.taxbaik.com/taxbaik/images/og-image.jpg")" />
|
||||
<meta property="og:url" content="@(ViewData["OgUrl"] ?? "https://www.taxbaik.com/taxbaik/")" />
|
||||
<meta property="og:image" content="@(ViewData["OgImage"] ?? "https://www.taxbaik.com/images/og-image.jpg")" />
|
||||
<meta property="og:url" content="@(ViewData["OgUrl"] ?? "https://www.taxbaik.com/")" />
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:title" content="@(ViewData["Title"] ?? "백원숙 세무회계 - 세무사 전문 상담")" />
|
||||
<meta property="twitter:description" content="@(ViewData["Description"] ?? "백원숙 세무회계 - 사업자 기장, 부동산 양도세·증여세, 종합소득세 전문 상담. 맞춤형 세무 절세 컨설팅 제공.")" />
|
||||
<meta property="twitter:image" content="@(ViewData["OgImage"] ?? "https://www.taxbaik.com/taxbaik/images/og-image.jpg")" />
|
||||
<meta property="twitter:image" content="@(ViewData["OgImage"] ?? "https://www.taxbaik.com/images/og-image.jpg")" />
|
||||
|
||||
<!-- 검색엔진 등록용 소유권 인증 메타 태그 (발급받으신 토큰이 있으면 아래 content에 넣어 주시면 됩니다) -->
|
||||
<!-- <meta name="naver-site-verification" content="네이버_서치어드바이저_토큰_입력" /> -->
|
||||
@@ -27,7 +27,6 @@
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="theme-color" content="#C89D6E" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="alternate icon" href="/favicon.ico" />
|
||||
|
||||
<!-- RSS Feed -->
|
||||
<link rel="alternate" type="application/rss+xml" title="백원숙 세무회계 블로그" href="/rss.xml" />
|
||||
@@ -36,7 +35,7 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+KR:wght@400;500;700&family=Outfit:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
|
||||
<link rel="canonical" href="@(ViewData["CanonicalUrl"] ?? "https://www.taxbaik.com/taxbaik/")" />
|
||||
<link rel="canonical" href="@(ViewData["CanonicalUrl"] ?? "https://www.taxbaik.com/")" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
|
||||
@@ -47,7 +46,7 @@
|
||||
"@@type": "ProfessionalService",
|
||||
"name": "백원숙 세무회계",
|
||||
"description": "사업자 기장, 부동산 양도세·증여세, 종합소득세 전문 상담 세무사",
|
||||
"url": "https://www.taxbaik.com/taxbaik/",
|
||||
"url": "https://www.taxbaik.com/",
|
||||
"telephone": "010-4122-8268",
|
||||
"email": "taxbaik5668@gmail.com",
|
||||
"address": {
|
||||
|
||||
+16
-10
@@ -40,7 +40,7 @@ builder.Host.UseSerilog((context, config) =>
|
||||
.MinimumLevel.Information()
|
||||
.WriteTo.Console()
|
||||
.WriteTo.File(
|
||||
path: "logs/taxbaik-.log",
|
||||
path: "logs/taxbaik-web-.log",
|
||||
rollingInterval: RollingInterval.Day,
|
||||
outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] {Message:lj}{NewLine}{Exception}")
|
||||
.Enrich.FromLogContext()
|
||||
@@ -48,7 +48,9 @@ builder.Host.UseSerilog((context, config) =>
|
||||
|
||||
var botToken = context.Configuration["Telegram:BotToken"];
|
||||
var systemChatId = context.Configuration["Telegram:SystemChatId"] ?? context.Configuration["Telegram:ChatId"];
|
||||
if (!string.IsNullOrEmpty(botToken) && !string.IsNullOrEmpty(systemChatId))
|
||||
if (context.HostingEnvironment.IsProduction()
|
||||
&& !string.IsNullOrEmpty(botToken)
|
||||
&& !string.IsNullOrEmpty(systemChatId))
|
||||
{
|
||||
config.WriteTo.Sink(new TaxBaik.Web.Logging.TelegramSink(botToken, systemChatId), Serilog.Events.LogEventLevel.Error);
|
||||
}
|
||||
@@ -146,8 +148,8 @@ var authenticationBuilder = builder.Services.AddAuthentication(opts =>
|
||||
opts.Cookie.HttpOnly = true;
|
||||
opts.Cookie.SameSite = SameSiteMode.Lax;
|
||||
opts.Cookie.SecurePolicy = isProduction ? CookieSecurePolicy.Always : CookieSecurePolicy.SameAsRequest;
|
||||
opts.LoginPath = "/taxbaik/portal/login";
|
||||
opts.AccessDeniedPath = "/taxbaik/portal/login";
|
||||
opts.LoginPath = "/portal/login";
|
||||
opts.AccessDeniedPath = "/portal/login";
|
||||
opts.SlidingExpiration = true;
|
||||
opts.ExpireTimeSpan = TimeSpan.FromDays(7);
|
||||
})
|
||||
@@ -168,7 +170,7 @@ if (!string.IsNullOrWhiteSpace(googleClientId) && !string.IsNullOrWhiteSpace(goo
|
||||
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
|
||||
opts.ClientId = googleClientId;
|
||||
opts.ClientSecret = googleClientSecret;
|
||||
opts.CallbackPath = "/taxbaik/portal/signin-google";
|
||||
opts.CallbackPath = "/portal/signin-google";
|
||||
});
|
||||
}
|
||||
|
||||
@@ -181,7 +183,7 @@ if (!string.IsNullOrWhiteSpace(naverClientId) && !string.IsNullOrWhiteSpace(nave
|
||||
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
|
||||
opts.ClientId = naverClientId;
|
||||
opts.ClientSecret = naverClientSecret;
|
||||
opts.CallbackPath = "/taxbaik/portal/signin-naver";
|
||||
opts.CallbackPath = "/portal/signin-naver";
|
||||
opts.AuthorizationEndpoint = "https://nid.naver.com/oauth2.0/authorize";
|
||||
opts.TokenEndpoint = "https://nid.naver.com/oauth2.0/token";
|
||||
opts.UserInformationEndpoint = "https://openapi.naver.com/v1/nid/me";
|
||||
@@ -213,7 +215,7 @@ if (!string.IsNullOrWhiteSpace(kakaoClientId) && !string.IsNullOrWhiteSpace(kaka
|
||||
opts.SignInScheme = PortalOAuthDefaults.ExternalScheme;
|
||||
opts.ClientId = kakaoClientId;
|
||||
opts.ClientSecret = kakaoClientSecret;
|
||||
opts.CallbackPath = "/taxbaik/portal/signin-kakao";
|
||||
opts.CallbackPath = "/portal/signin-kakao";
|
||||
opts.AuthorizationEndpoint = "https://kauth.kakao.com/oauth/authorize";
|
||||
opts.TokenEndpoint = "https://kauth.kakao.com/oauth/token";
|
||||
opts.UserInformationEndpoint = "https://kapi.kakao.com/v2/user/me";
|
||||
@@ -399,7 +401,7 @@ app.Use(async (context, next) =>
|
||||
{
|
||||
var path = context.Request.Path.Value ?? string.Empty;
|
||||
if (path.Equals("/favicon.ico", StringComparison.OrdinalIgnoreCase) ||
|
||||
path.Equals("/taxbaik/favicon.ico", StringComparison.OrdinalIgnoreCase))
|
||||
path.Equals("/favicon.ico", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
context.Response.ContentType = "image/svg+xml";
|
||||
await context.Response.SendFileAsync(Path.Combine(app.Environment.WebRootPath ?? "wwwroot", "favicon.svg"));
|
||||
@@ -427,13 +429,17 @@ catch (Exception ex)
|
||||
Console.WriteLine($"Migration warning (development only): {ex.Message}");
|
||||
}
|
||||
|
||||
// PathBase는 Nginx reverse proxy에서 처리 (절대 경로 제거)
|
||||
// app.UsePathBase("/taxbaik"); ← 상대 경로로 전환됨
|
||||
// PathBase는 사용하지 않음
|
||||
|
||||
// 개발 및 테스트 환경에서 resource-collection.js 404로 인해 Blazor WASM이 크래시되는 현상 방지
|
||||
app.Use(async (context, next) =>
|
||||
{
|
||||
var path = context.Request.Path.Value ?? string.Empty;
|
||||
if (path.Equals("/_framework/blazor-hotreload", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
context.Response.StatusCode = StatusCodes.Status204NoContent;
|
||||
return;
|
||||
}
|
||||
if (path.Contains("resource-collection") && path.EndsWith(".js"))
|
||||
{
|
||||
context.Response.ContentType = "application/javascript";
|
||||
|
||||
@@ -47,7 +47,7 @@ public class SitemapValidationService
|
||||
|
||||
// 2. 동적 블로그 포스트 검증
|
||||
var (posts, _) = await _blogService.GetPublishedPagedAsync(1, 1000, categoryId: null, ct: default);
|
||||
var blogUrls = posts.Select(p => $"https://www.taxbaik.com/taxbaik/blog/{p.Slug}").ToList();
|
||||
var blogUrls = posts.Select(p => $"https://www.taxbaik.com/blog/{p.Slug}").ToList();
|
||||
|
||||
ValidateUrls(blogUrls, result);
|
||||
|
||||
@@ -129,7 +129,7 @@ public class SitemapValidationService
|
||||
}
|
||||
|
||||
// GUID 유효성 (URL 형식)
|
||||
var guid = $"https://www.taxbaik.com/taxbaik/blog/{post.Slug}";
|
||||
var guid = $"https://www.taxbaik.com/blog/{post.Slug}";
|
||||
if (!Uri.TryCreate(guid, UriKind.Absolute, out _))
|
||||
{
|
||||
result.Errors.Add($"GUID 유효하지 않음: {guid}");
|
||||
@@ -242,7 +242,7 @@ public class SitemapValidationService
|
||||
/// </summary>
|
||||
private static List<string> GetStaticUrls()
|
||||
{
|
||||
var baseUrl = "https://www.taxbaik.com/taxbaik";
|
||||
var baseUrl = "https://www.taxbaik.com";
|
||||
return new List<string>
|
||||
{
|
||||
$"{baseUrl}",
|
||||
|
||||
@@ -17,7 +17,7 @@ public class TelegramInquiryNotificationService : IInquiryNotificationService
|
||||
_httpClientFactory = httpClientFactory;
|
||||
_configuration = configuration;
|
||||
_logger = logger;
|
||||
_baseUrl = (_configuration["App:PublicBaseUrl"] ?? "https://www.taxbaik.com/taxbaik").TrimEnd('/');
|
||||
_baseUrl = (_configuration["App:PublicBaseUrl"] ?? "https://www.taxbaik.com").TrimEnd('/');
|
||||
}
|
||||
|
||||
public async Task NotifyCreatedAsync(int inquiryId, string name, string phone, string serviceType, string message, string? ipAddress, DateTime createdAtUtc, CancellationToken ct = default)
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
"Default": "Host=localhost;Database=taxbaikdb;Username=taxbaik;Password=taxbaik123"
|
||||
},
|
||||
"ApiClient": {
|
||||
"BaseUrl": "http://localhost:5001/taxbaik/api/"
|
||||
"BaseUrl": "http://localhost:5001/api/"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
"SecretKey": "dev-secret-key-change-in-production-min-32-chars!"
|
||||
},
|
||||
"App": {
|
||||
"PublicBaseUrl": "https://www.taxbaik.com/taxbaik"
|
||||
"PublicBaseUrl": "https://www.taxbaik.com"
|
||||
},
|
||||
"ApiClient": {
|
||||
"BaseUrl": "http://localhost:5001/taxbaik/api/"
|
||||
"BaseUrl": "http://localhost:5001/api/"
|
||||
},
|
||||
"Telegram": {
|
||||
"BotToken": "8679990909:AAGLLRUIAuEbYAZVGOYDu-UuTu4ihroEiX0",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>TaxBaik Admin</title>
|
||||
<base href="/taxbaik/admin/" />
|
||||
<base href="/admin/" />
|
||||
<link href="_framework/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="app.css" rel="stylesheet" />
|
||||
<link href="TaxBaik.Web.Client.styles.css" rel="stylesheet" />
|
||||
|
||||
@@ -195,6 +195,191 @@ html, body {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.admin-row-clickable {
|
||||
cursor: pointer;
|
||||
transition: background-color var(--transition-fast), color var(--transition-fast);
|
||||
}
|
||||
|
||||
.admin-row-clickable:hover {
|
||||
background-color: rgba(31, 78, 121, 0.05);
|
||||
}
|
||||
|
||||
.admin-native-select {
|
||||
width: 100%;
|
||||
min-height: 56px;
|
||||
padding: 16px 14px;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.admin-native-select:focus {
|
||||
outline: 2px solid var(--primary-color);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.faq-col-order { width: 110px; }
|
||||
.faq-col-category { width: 130px; }
|
||||
.faq-col-status { width: 90px; }
|
||||
.faq-col-actions { width: 160px; }
|
||||
|
||||
.admin-season-panel {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.admin-season-table {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.admin-season-date-picker {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.admin-season-jump-button {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.admin-season-hero {
|
||||
background: linear-gradient(135deg, #1a365d 0%, #2a4365 100%);
|
||||
border-radius: 12px;
|
||||
padding: 2rem;
|
||||
color: #fff;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.admin-season-hero--inactive {
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.admin-season-badge {
|
||||
background: #f59e0b;
|
||||
color: #1a202c;
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
border-radius: 20px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.admin-season-hero-title {
|
||||
font-size: 1.8rem;
|
||||
font-weight: 800;
|
||||
white-space: pre-line;
|
||||
margin-bottom: 0.5rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.admin-season-hero-subtext {
|
||||
font-size: 0.95rem;
|
||||
color: rgba(255,255,255,0.8);
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.admin-season-hero-actions {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.admin-season-cta {
|
||||
background: #e53e3e;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
padding: 10px 20px;
|
||||
border-radius: 8px;
|
||||
font-weight: 700;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.admin-season-secondary-cta {
|
||||
background: transparent;
|
||||
border: 2px solid rgba(255,255,255,0.5);
|
||||
color: #fff;
|
||||
padding: 10px 20px;
|
||||
border-radius: 8px;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.admin-season-row.is-active {
|
||||
background: rgba(66, 153, 225, 0.1);
|
||||
}
|
||||
|
||||
.admin-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.admin-code-sm {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.admin-muted-label {
|
||||
color: #a0aec0;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.admin-faq-empty-icon {
|
||||
font-size: 3rem;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.admin-faq-sort-button {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.admin-faq-question {
|
||||
max-width: 480px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.admin-pre-wrap {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.admin-login-page-shell {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.admin-faq-edit-panel {
|
||||
max-width: 720px;
|
||||
}
|
||||
|
||||
.admin-empty-state-icon {
|
||||
font-size: 3rem;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.admin-consultation-item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.admin-dashboard-tile {
|
||||
border: 1px solid var(--border-color);
|
||||
min-height: 200px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.admin-dashboard-summary {
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.admin-table-id-column {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.admin-table-message-column {
|
||||
max-width: 200px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.font-weight-bold {
|
||||
font-weight: var(--font-weight-bold) !important;
|
||||
}
|
||||
@@ -343,6 +528,80 @@ textarea:focus-visible {
|
||||
border-left-color: var(--info-color);
|
||||
}
|
||||
|
||||
.admin-login-shell {
|
||||
min-height: calc(100vh - 72px);
|
||||
padding: 48px 20px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
gap: 20px;
|
||||
background:
|
||||
radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
|
||||
radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.08), transparent 24%),
|
||||
linear-gradient(180deg, #F8FAFC 0%, #EEF4FF 100%);
|
||||
}
|
||||
|
||||
.admin-login-hero {
|
||||
width: min(640px, 100%);
|
||||
text-align: left;
|
||||
padding: 8px 4px 0;
|
||||
}
|
||||
|
||||
.admin-login-kicker {
|
||||
margin: 0 0 8px;
|
||||
color: var(--primary-color);
|
||||
font-size: 0.78rem;
|
||||
font-weight: var(--font-weight-semibold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.admin-login-hero h1 {
|
||||
margin: 0 0 10px;
|
||||
color: var(--text-primary);
|
||||
font-size: clamp(1.8rem, 3vw, 2.4rem);
|
||||
line-height: 1.1;
|
||||
font-weight: var(--font-weight-bold);
|
||||
}
|
||||
|
||||
.admin-login-hero p {
|
||||
margin: 0;
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.98rem;
|
||||
}
|
||||
|
||||
.admin-login-card {
|
||||
width: min(640px, 100%);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.admin-login-summary {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.admin-login-summary > div {
|
||||
padding: 12px 14px;
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid rgba(148, 163, 184, 0.22);
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
|
||||
}
|
||||
|
||||
.admin-login-summary strong {
|
||||
color: var(--text-primary);
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.admin-login-form {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.admin-login-footnote {
|
||||
margin: 16px 0 0;
|
||||
color: var(--text-tertiary);
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
/* Reconnect Modal */
|
||||
.admin-reconnect-modal {
|
||||
display: none;
|
||||
@@ -510,6 +769,29 @@ textarea:focus-visible {
|
||||
border-bottom: 1px solid var(--border-color-light);
|
||||
}
|
||||
|
||||
.admin-drawer-context {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
padding: 10px 12px 8px;
|
||||
border-bottom: 1px solid var(--border-color-light);
|
||||
background: linear-gradient(180deg, rgba(37, 99, 235, 0.04), rgba(255, 255, 255, 0));
|
||||
}
|
||||
|
||||
.admin-drawer-context-label {
|
||||
color: var(--text-tertiary);
|
||||
font-size: 0.68rem;
|
||||
font-weight: var(--font-weight-semibold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
}
|
||||
|
||||
.admin-drawer-context-value {
|
||||
color: var(--text-primary);
|
||||
font-size: 0.9rem;
|
||||
font-weight: var(--font-weight-semibold);
|
||||
}
|
||||
|
||||
.admin-brand-mark {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -762,6 +1044,38 @@ textarea:focus-visible {
|
||||
background: var(--primary-color);
|
||||
}
|
||||
|
||||
.admin-dashboard-status {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 12px 16px;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-lg);
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
|
||||
}
|
||||
|
||||
.admin-status-chip {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
padding: 10px 12px;
|
||||
border-radius: var(--radius-md);
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
border: 1px solid rgba(148, 163, 184, 0.18);
|
||||
}
|
||||
|
||||
.admin-status-chip .mud-typography--overline {
|
||||
color: var(--text-tertiary);
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.admin-status-chip .mud-typography--body2 {
|
||||
color: var(--text-primary);
|
||||
font-weight: var(--font-weight-medium);
|
||||
}
|
||||
|
||||
/* ============================================================================
|
||||
Dashboard Page Styles
|
||||
============================================================================ */
|
||||
@@ -772,8 +1086,11 @@ textarea:focus-visible {
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding: 14px 16px;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-lg);
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.admin-page-hero > div:first-child {
|
||||
@@ -855,15 +1172,17 @@ textarea:focus-visible {
|
||||
}
|
||||
|
||||
.admin-metric-card-value {
|
||||
font-size: 1.45rem;
|
||||
font-weight: var(--font-weight-bold);
|
||||
line-height: 1;
|
||||
font-size: 1.45rem;
|
||||
font-weight: var(--font-weight-bold);
|
||||
line-height: 1;
|
||||
color: var(--admin-metric-value-color, var(--primary-color));
|
||||
}
|
||||
|
||||
.admin-metric-card-icon {
|
||||
font-size: 1.9rem;
|
||||
opacity: 0.14;
|
||||
line-height: 1;
|
||||
font-size: 1.9rem;
|
||||
opacity: 0.14;
|
||||
line-height: 1;
|
||||
color: var(--admin-metric-icon-color, var(--secondary-color));
|
||||
}
|
||||
|
||||
.admin-metric-card-caption {
|
||||
@@ -1500,13 +1819,18 @@ textarea:focus-visible {
|
||||
}
|
||||
|
||||
.admin-drawer {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
inset: 56px 12px auto 12px;
|
||||
width: auto;
|
||||
max-height: calc(100vh - 72px);
|
||||
height: auto;
|
||||
max-height: 60px;
|
||||
flex-direction: row;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
overflow-x: auto;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-xl);
|
||||
box-shadow: var(--shadow-2xl);
|
||||
overflow-y: auto;
|
||||
z-index: 20;
|
||||
background: var(--bg-primary);
|
||||
}
|
||||
|
||||
.admin-drawer-brand {
|
||||
@@ -1525,10 +1849,10 @@ textarea:focus-visible {
|
||||
|
||||
.admin-nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-direction: column;
|
||||
padding: var(--space-2);
|
||||
gap: var(--space-1);
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.admin-nav .mud-nav-link {
|
||||
@@ -1542,6 +1866,7 @@ textarea:focus-visible {
|
||||
|
||||
.admin-main {
|
||||
flex: 1;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.admin-content {
|
||||
@@ -1554,7 +1879,11 @@ textarea:focus-visible {
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-4);
|
||||
padding-bottom: var(--space-3);
|
||||
padding: var(--space-3) var(--space-4);
|
||||
}
|
||||
|
||||
.admin-dashboard-status {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.admin-page-title {
|
||||
@@ -1809,11 +2138,81 @@ textarea:focus-visible {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.admin-topbar-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 28px;
|
||||
padding: 0 10px;
|
||||
border-radius: var(--radius-full);
|
||||
border: 1px solid rgba(37, 99, 235, 0.18);
|
||||
background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, rgba(255, 255, 255, 0.96) 100%);
|
||||
color: var(--primary-dark);
|
||||
font-size: 0.75rem;
|
||||
font-weight: var(--font-weight-semibold);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.admin-topbar-action {
|
||||
white-space: nowrap;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.admin-nav-group {
|
||||
padding: 10px 12px 4px;
|
||||
color: var(--text-tertiary);
|
||||
font-size: 0.68rem;
|
||||
font-weight: var(--font-weight-semibold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
}
|
||||
|
||||
.admin-nav-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin: 2px 8px;
|
||||
padding: 10px 12px;
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--text-primary);
|
||||
text-decoration: none;
|
||||
transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
|
||||
}
|
||||
|
||||
.admin-nav-link:hover {
|
||||
background: var(--primary-light);
|
||||
color: var(--primary-dark);
|
||||
}
|
||||
|
||||
.admin-nav-link.active {
|
||||
background: linear-gradient(90deg, rgba(37, 99, 235, 0.14) 0%, rgba(37, 99, 235, 0.08) 100%);
|
||||
color: var(--primary-dark);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
box-shadow: inset 3px 0 0 var(--primary-color), 0 1px 2px rgba(15, 23, 42, 0.05);
|
||||
transform: translateX(1px);
|
||||
}
|
||||
|
||||
.admin-nav-link-icon {
|
||||
display: inline-flex;
|
||||
width: 18px;
|
||||
justify-content: center;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.admin-nav-link-label {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.admin-nav-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 18px;
|
||||
padding: 0 6px;
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--secondary-light);
|
||||
color: var(--secondary-dark);
|
||||
font-size: 0.65rem;
|
||||
}
|
||||
|
||||
/* Enhanced Drawer Footer */
|
||||
.admin-drawer-footer {
|
||||
border-top: 1px solid var(--divider-color);
|
||||
@@ -1833,10 +2232,10 @@ textarea:focus-visible {
|
||||
|
||||
/* Responsive Topbar */
|
||||
@media (max-width: 600px) {
|
||||
.admin-topbar-action {
|
||||
padding: 4px 8px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
.admin-topbar-action {
|
||||
padding: 4px 8px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.admin-topbar-title {
|
||||
min-width: 120px;
|
||||
@@ -1882,12 +2281,19 @@ html, body {
|
||||
|
||||
/* 페이지 헤더 영역 */
|
||||
.admin-page-hero {
|
||||
padding: 12px 16px !important;
|
||||
background-color: #F8FAFC !important;
|
||||
border-bottom: 1px solid #E2E8F0 !important;
|
||||
padding: 14px 16px !important;
|
||||
background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%) !important;
|
||||
border: 1px solid #E2E8F0 !important;
|
||||
border-radius: 12px !important;
|
||||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
|
||||
margin-bottom: 12px !important;
|
||||
}
|
||||
|
||||
.admin-header-actions {
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.admin-page-title {
|
||||
font-size: 16px !important;
|
||||
font-weight: bold !important;
|
||||
|
||||
@@ -28,12 +28,12 @@ window.taxbaikAdminSession = {
|
||||
const body = JSON.stringify(payload);
|
||||
if (navigator.sendBeacon) {
|
||||
const blob = new Blob([body], { type: 'application/json' });
|
||||
if (navigator.sendBeacon('/taxbaik/api/client-logs', blob)) {
|
||||
if (navigator.sendBeacon(window.taxbaikAdminSession.getApiUrl('/client-logs'), blob)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fetch('/taxbaik/api/client-logs', {
|
||||
fetch(window.taxbaikAdminSession.getApiUrl('/client-logs'), {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body,
|
||||
@@ -248,6 +248,39 @@ window.taxbaikAdminSession = {
|
||||
return window.innerWidth || document.documentElement.clientWidth || 0;
|
||||
},
|
||||
|
||||
getAppRootPath: function () {
|
||||
try {
|
||||
const base = new URL(document.baseURI);
|
||||
let pathname = base.pathname || '/';
|
||||
|
||||
if (pathname.endsWith('/admin/')) {
|
||||
pathname = pathname.slice(0, -'/admin/'.length) || '/';
|
||||
} else if (pathname.endsWith('/portal/')) {
|
||||
pathname = pathname.slice(0, -'/portal/'.length) || '/';
|
||||
} else if (pathname.endsWith('/admin')) {
|
||||
pathname = pathname.slice(0, -'/admin'.length) || '/';
|
||||
} else if (pathname.endsWith('/portal')) {
|
||||
pathname = pathname.slice(0, -'/portal'.length) || '/';
|
||||
}
|
||||
|
||||
return pathname.endsWith('/') ? pathname.slice(0, -1) : pathname;
|
||||
} catch {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
|
||||
getAdminUrl: function (path) {
|
||||
const rootPath = window.taxbaikAdminSession.getAppRootPath();
|
||||
const normalizedPath = String(path || '').startsWith('/') ? String(path || '') : `/${String(path || '')}`;
|
||||
return `${window.location.origin}${rootPath}/admin${normalizedPath}`;
|
||||
},
|
||||
|
||||
getApiUrl: function (path) {
|
||||
const rootPath = window.taxbaikAdminSession.getAppRootPath();
|
||||
const normalizedPath = String(path || '').startsWith('/') ? String(path || '') : `/${String(path || '')}`;
|
||||
return `${window.location.origin}${rootPath}/api${normalizedPath}`;
|
||||
},
|
||||
|
||||
clearAuthToken: function () {
|
||||
try {
|
||||
localStorage.removeItem('accessToken');
|
||||
@@ -410,7 +443,7 @@ window.taxbaikAdminSession = {
|
||||
}
|
||||
|
||||
window.taxbaikAdminSession.traceUiState('admin-login', 'submit started');
|
||||
const loginUrl = new URL('/taxbaik/api/auth/login', window.location.origin).toString();
|
||||
const loginUrl = window.taxbaikAdminSession.getApiUrl('/auth/login');
|
||||
const response = await fetch(loginUrl, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
@@ -455,7 +488,7 @@ window.taxbaikAdminSession = {
|
||||
// Blazor가 대시보드 페이지를 로드할 때 CustomAuthenticationStateProvider가
|
||||
// 자동으로 localStorage에서 토큰을 복원합니다
|
||||
setTimeout(() => {
|
||||
window.location.href = '/taxbaik/admin/dashboard';
|
||||
window.location.href = window.taxbaikAdminSession.getAdminUrl('/dashboard');
|
||||
}, 200);
|
||||
} catch (error) {
|
||||
window.taxbaikAdminSession.traceUiState('admin-login', `submit failed: ${error?.message || 'login failed'}`);
|
||||
|
||||
@@ -28,9 +28,9 @@ User-agent: Kakaobot
|
||||
Allow: /
|
||||
|
||||
# Sitemap 위치
|
||||
Sitemap: https://www.taxbaik.com/taxbaik/sitemap.xml
|
||||
Sitemap: https://www.taxbaik.com/taxbaik/sitemap.xml
|
||||
Sitemap: https://www.taxbaik.com/sitemap.xml
|
||||
Sitemap: https://www.taxbaik.com/sitemap.xml
|
||||
|
||||
# RSS 피드
|
||||
Sitemap: https://www.taxbaik.com/taxbaik/rss.xml
|
||||
Sitemap: https://www.taxbaik.com/taxbaik/feed.xml
|
||||
Sitemap: https://www.taxbaik.com/rss.xml
|
||||
Sitemap: https://www.taxbaik.com/feed.xml
|
||||
|
||||
Reference in New Issue
Block a user