revert: rollback Fluent UI and Blazor homepage to last successful state (3be3794)
This commit is contained in:
@@ -5,41 +5,51 @@
|
||||
@using TaxBaik.Web.Components.Admin.Forms
|
||||
@inject InquiryService InquiryService
|
||||
@inject NavigationManager Navigation
|
||||
@inject IJSRuntime JS
|
||||
@inject ISnackbar Snackbar
|
||||
|
||||
<PageTitle>문의 등록</PageTitle>
|
||||
|
||||
<section class="admin-page-hero">
|
||||
<div>
|
||||
<div class="admin-eyebrow">Customer Relations</div>
|
||||
<h1 class="admin-page-title">새 문의 등록</h1>
|
||||
<p class="admin-page-subtitle">고객 문의를 등록합니다. (전화, 오프라인 등)</p>
|
||||
<MudText Typo="Typo.caption" Class="admin-eyebrow">Customer Relations</MudText>
|
||||
<MudText Typo="Typo.h4" Class="admin-page-title">새 문의 등록</MudText>
|
||||
<MudText Typo="Typo.body2" Class="admin-page-subtitle">고객 문의를 등록합니다. (전화, 오프라인 등)</MudText>
|
||||
</div>
|
||||
<button type="button" class="site-button secondary" @onclick="GoBack">취소</button>
|
||||
<MudButton Variant="Variant.Outlined" StartIcon="@Icons.Material.Filled.Close" @onclick="GoBack">취소</MudButton>
|
||||
</section>
|
||||
|
||||
<div class="admin-surface mt-4">
|
||||
<MudPaper Class="pa-4 mt-4" Elevation="1">
|
||||
<InquiryForm ButtonText="등록" OnSubmit="HandleCreate" OnCancel="GoBack" />
|
||||
</div>
|
||||
</MudPaper>
|
||||
|
||||
@code {
|
||||
private void GoBack() => Navigation.NavigateTo("/taxbaik/admin/inquiries");
|
||||
private void GoBack()
|
||||
{
|
||||
Navigation.NavigateTo("/taxbaik/admin/inquiries");
|
||||
}
|
||||
|
||||
private async Task HandleCreate(InquiryForm.InquiryFormModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
await InquiryService.SubmitAsync(model.Name, model.Phone, model.ServiceType, model.Message, model.Email, ipAddress: "admin-registered");
|
||||
await JS.InvokeVoidAsync("alert", "문의가 등록되었습니다.");
|
||||
await InquiryService.SubmitAsync(
|
||||
model.Name,
|
||||
model.Phone,
|
||||
model.ServiceType,
|
||||
model.Message,
|
||||
model.Email,
|
||||
ipAddress: "admin-registered");
|
||||
|
||||
Snackbar.Add("문의가 등록되었습니다.", Severity.Success);
|
||||
Navigation.NavigateTo("/taxbaik/admin/inquiries");
|
||||
}
|
||||
catch (ValidationException ex)
|
||||
{
|
||||
await JS.InvokeVoidAsync("alert", ex.Message);
|
||||
Snackbar.Add(ex.Message, Severity.Error);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await JS.InvokeVoidAsync("alert", $"등록 실패: {ex.Message}");
|
||||
Snackbar.Add($"등록 실패: {ex.Message}", Severity.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user