revert: rollback Fluent UI and Blazor homepage to last successful state (3be3794)
This commit is contained in:
@@ -3,75 +3,113 @@
|
||||
@using TaxBaik.Web.Services
|
||||
@inject IInquiryBrowserClient InquiryClient
|
||||
@inject NavigationManager Navigation
|
||||
@inject IJSRuntime JS
|
||||
@inject ISnackbar Snackbar
|
||||
|
||||
<PageTitle>문의 상세</PageTitle>
|
||||
|
||||
<section class="admin-page-hero">
|
||||
<div>
|
||||
<div class="admin-eyebrow">Inquiry Details</div>
|
||||
<h1 class="admin-page-title">문의 상세</h1>
|
||||
<p class="admin-page-subtitle">문의 정보를 확인하고 처리 상태를 관리합니다.</p>
|
||||
<MudText Typo="Typo.caption" Class="admin-eyebrow">Inquiry Details</MudText>
|
||||
<MudText Typo="Typo.h4" Class="admin-page-title">문의 상세</MudText>
|
||||
<MudText Typo="Typo.body2" Class="admin-page-subtitle">문의 정보를 확인하고 처리 상태를 관리합니다.</MudText>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@if (inquiry != null)
|
||||
{
|
||||
<div class="admin-page-actions">
|
||||
<button type="button" class="site-button secondary" @onclick='() => Navigation.NavigateTo("/taxbaik/admin/inquiries")'>문의 목록으로</button>
|
||||
</div>
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.ArrowBack"
|
||||
@onclick="@(() => Navigation.NavigateTo("/taxbaik/admin/inquiries"))">
|
||||
문의 목록으로
|
||||
</MudButton>
|
||||
|
||||
<div class="admin-detail-grid">
|
||||
<section class="admin-surface">
|
||||
<h3 class="admin-section-title">문의 정보</h3>
|
||||
<div class="admin-kv-grid">
|
||||
<div><span>이름</span><strong>@inquiry.Name</strong></div>
|
||||
<div><span>연락처</span><strong>@inquiry.Phone</strong></div>
|
||||
<div><span>이메일</span><strong>@(inquiry.Email ?? "-")</strong></div>
|
||||
<div><span>분야</span><strong>@inquiry.ServiceType</strong></div>
|
||||
<div class="span-2"><span>문의 내용</span><strong style="white-space: pre-wrap;">@inquiry.Message</strong></div>
|
||||
<div><span>접수일시</span><strong>@inquiry.CreatedAt.ToLocalTime().ToString("yyyy-MM-dd HH:mm")</strong></div>
|
||||
</div>
|
||||
</section>
|
||||
<MudGrid Class="mt-4">
|
||||
<MudItem xs="12" md="8">
|
||||
<MudPaper Class="pa-4" Elevation="1">
|
||||
<MudText Typo="Typo.h6" Class="mb-3">문의 정보</MudText>
|
||||
<MudGrid>
|
||||
<MudItem xs="12" sm="6">
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Secondary">이름</MudText>
|
||||
<MudText>@inquiry.Name</MudText>
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="6">
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Secondary">연락처</MudText>
|
||||
<MudText>@inquiry.Phone</MudText>
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="6">
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Secondary">이메일</MudText>
|
||||
<MudText>@(inquiry.Email ?? "-")</MudText>
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="6">
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Secondary">분야</MudText>
|
||||
<MudText>@inquiry.ServiceType</MudText>
|
||||
</MudItem>
|
||||
<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>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="12">
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Secondary">접수일시</MudText>
|
||||
<MudText>@inquiry.CreatedAt.ToLocalTime().ToString("yyyy-MM-dd HH:mm")</MudText>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
</MudPaper>
|
||||
|
||||
<section class="admin-surface">
|
||||
<h3 class="admin-section-title">담당자 메모</h3>
|
||||
<textarea class="admin-input" rows="6" @bind="adminMemo"></textarea>
|
||||
<div class="admin-dialog-actions mt-3">
|
||||
<button type="button" class="site-button primary" @onclick="SaveMemo">메모 저장</button>
|
||||
</div>
|
||||
</section>
|
||||
<MudPaper Class="pa-4 mt-4" Elevation="1">
|
||||
<MudText Typo="Typo.h6" Class="mb-3">담당자 메모</MudText>
|
||||
<MudTextField T="string" @bind-Value="adminMemo" Label="내부 메모 (고객에게 미노출)"
|
||||
Lines="4" Variant="Variant.Outlined" />
|
||||
<MudButton Class="mt-2" Variant="Variant.Filled" Color="Color.Primary"
|
||||
OnClick="SaveMemo">메모 저장</MudButton>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
|
||||
<section class="admin-surface">
|
||||
<h3 class="admin-section-title">처리 상태</h3>
|
||||
<div class="admin-stack">
|
||||
@foreach (var (key, label) in InquiryStatusMapper.Labels)
|
||||
{
|
||||
<button type="button" class="@GetStatusButtonClass(key)" @onclick="@(() => OnStatusChanged(key))">@label</button>
|
||||
}
|
||||
</div>
|
||||
</section>
|
||||
<MudItem xs="12" md="4">
|
||||
<MudPaper Class="pa-4" Elevation="1">
|
||||
<MudText Typo="Typo.h6" Class="mb-3">처리 상태</MudText>
|
||||
<MudStack Spacing="2">
|
||||
@foreach (var (key, label) in InquiryStatusMapper.Labels)
|
||||
{
|
||||
<MudButton Variant="@(inquiry.Status == key ? Variant.Filled : Variant.Outlined)"
|
||||
Color="@StatusColor(key)"
|
||||
FullWidth="true"
|
||||
OnClick="@(() => OnStatusChanged(key))">
|
||||
@label
|
||||
</MudButton>
|
||||
}
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
|
||||
@if (inquiry.ClientId == null)
|
||||
{
|
||||
<section class="admin-surface">
|
||||
<h3 class="admin-section-title">고객 카드 생성</h3>
|
||||
<p class="muted">이 문의를 고객 카드로 등록합니다.</p>
|
||||
<button type="button" class="site-button primary" @onclick="ConvertToClient">고객으로 등록</button>
|
||||
</section>
|
||||
}
|
||||
else
|
||||
{
|
||||
<section class="admin-surface">
|
||||
<h3 class="admin-section-title">연결된 고객</h3>
|
||||
<a class="site-button secondary" href="@($"/taxbaik/admin/clients/{inquiry.ClientId}")">고객 카드 보기</a>
|
||||
</section>
|
||||
}
|
||||
</div>
|
||||
@if (inquiry.ClientId == null)
|
||||
{
|
||||
<MudPaper Class="pa-4 mt-4" Elevation="1">
|
||||
<MudText Typo="Typo.h6" Class="mb-3">고객 카드 생성</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mb-3">이 문의를 고객 카드로 등록합니다.</MudText>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Success" FullWidth="true"
|
||||
OnClick="ConvertToClient">
|
||||
고객으로 등록
|
||||
</MudButton>
|
||||
</MudPaper>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudPaper Class="pa-4 mt-4" Elevation="1">
|
||||
<MudText Typo="Typo.h6" Class="mb-3">연결된 고객</MudText>
|
||||
<MudButton Variant="Variant.Outlined" Color="Color.Primary" FullWidth="true"
|
||||
Href="@($"/taxbaik/admin/clients/{inquiry.ClientId}")">
|
||||
고객 카드 보기
|
||||
</MudButton>
|
||||
</MudPaper>
|
||||
}
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="admin-surface">문의를 찾을 수 없습니다.</div>
|
||||
<MudText>문의를 찾을 수 없습니다.</MudText>
|
||||
}
|
||||
|
||||
@code {
|
||||
@@ -96,16 +134,16 @@ else
|
||||
if (success)
|
||||
{
|
||||
inquiry.Status = status;
|
||||
await JS.InvokeVoidAsync("alert", "상태가 변경되었습니다.");
|
||||
Snackbar.Add("상태가 변경되었습니다.", Severity.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
await JS.InvokeVoidAsync("alert", "상태 변경에 실패했습니다.");
|
||||
Snackbar.Add("상태 변경에 실패했습니다.", Severity.Error);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await JS.InvokeVoidAsync("alert", $"오류: {ex.Message}");
|
||||
Snackbar.Add($"오류: {ex.Message}", Severity.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,16 +156,16 @@ else
|
||||
if (success)
|
||||
{
|
||||
inquiry.AdminMemo = adminMemo;
|
||||
await JS.InvokeVoidAsync("alert", "메모가 저장되었습니다.");
|
||||
Snackbar.Add("메모가 저장되었습니다.", Severity.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
await JS.InvokeVoidAsync("alert", "메모 저장에 실패했습니다.");
|
||||
Snackbar.Add("메모 저장에 실패했습니다.", Severity.Error);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await JS.InvokeVoidAsync("alert", $"오류: {ex.Message}");
|
||||
Snackbar.Add($"오류: {ex.Message}", Severity.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,19 +184,26 @@ else
|
||||
{
|
||||
inquiry.ClientId = clientId;
|
||||
inquiry.Status = "consulting";
|
||||
await JS.InvokeVoidAsync("alert", "고객 카드가 생성되었습니다.");
|
||||
Snackbar.Add("고객 카드가 생성되었습니다.", Severity.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
await JS.InvokeVoidAsync("alert", "고객 카드 생성에 실패했습니다.");
|
||||
Snackbar.Add("고객 카드 생성에 실패했습니다.", Severity.Error);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await JS.InvokeVoidAsync("alert", $"오류: {ex.Message}");
|
||||
Snackbar.Add($"오류: {ex.Message}", Severity.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetStatusButtonClass(string status)
|
||||
=> inquiry?.Status == status ? "site-button primary" : "site-button secondary";
|
||||
private Color StatusColor(string status) => status switch
|
||||
{
|
||||
"new" => Color.Default,
|
||||
"consulting" => Color.Info,
|
||||
"contracted" => Color.Success,
|
||||
"rejected" => Color.Error,
|
||||
"closed" => Color.Dark,
|
||||
_ => Color.Default
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user