8202c3278b
TaxBaik CI/CD / build-and-deploy (push) Failing after 2m17s
Phase 8: Complete WebAssembly 렌더 모드 전환 (정공법) Migration Summary: - ALL Admin components → TaxBaik.Web.Client - Routes.razor, Pages/*, Layout/*, Shared/*, Forms/* - App.razor → TaxBaik.WasmClient (호스트 컴포넌트) - Shared utilities → TaxBaik.Application.Utils Architecture: ✅ App.razor: TaxBaik.WasmClient (WebAssembly, 호스트) ✅ Routes + Pages: TaxBaik.WasmClient (WebAssembly) ✅ Layout + Shared + Forms: TaxBaik.WasmClient (WebAssembly) ✅ Services: TaxBaik.Web (API-First) Key Changes: - Namespaces: TaxBaik.Web.Components.Admin → TaxBaik.WasmClient.Components.Admin - Shared utilities: TaxBaik.Application.Utils (single source of truth) - Program.cs: MapRazorComponents<TaxBaik.WasmClient.Components.Admin.App>() - _Imports.razor: Components/Admin 폴더에 재구성 Build Status: ✅ 0 errors, 0 warnings Benefits: - Stateless server (no Circuit memory) - Client-side rendering (WebAssembly) - Unlimited concurrent users (horizontal scaling) - ERP-ready architecture Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
@page "/admin/blog/create"
|
|
@attribute [Authorize]
|
|
@using TaxBaik.Application.DTOs
|
|
@using TaxBaik.WasmClient.Components.Admin.Pages.Blog
|
|
@inject IBlogBrowserClient BlogClient
|
|
@inject ICategoryBrowserClient CategoryClient
|
|
@inject NavigationManager Navigation
|
|
@inject ISnackbar Snackbar
|
|
|
|
<PageTitle>새 포스트 작성</PageTitle>
|
|
|
|
<AdminCrudPageShell Title="새 포스트 작성"
|
|
Eyebrow="Content"
|
|
Subtitle="새로운 블로그 포스트를 작성합니다."
|
|
Loading="@false"
|
|
OnCancel="@GoBack">
|
|
<MudPaper Class="pa-4 mt-4" Elevation="1">
|
|
<BlogForm Model="model" Categories="categories" SubmitText="저장" OnSubmit="SavePost" OnCancel="GoBack" />
|
|
</MudPaper>
|
|
</AdminCrudPageShell>
|
|
|
|
@code {
|
|
private IReadOnlyList<Domain.Entities.Category> categories = [];
|
|
private BlogForm.BlogFormModel model = new();
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
categories = await CategoryClient.GetAllAsync();
|
|
}
|
|
|
|
private void GoBack()
|
|
{
|
|
Navigation.NavigateTo("/taxbaik/admin/blog");
|
|
}
|
|
|
|
private async Task SavePost()
|
|
{
|
|
try
|
|
{
|
|
var result = await BlogClient.CreateAsync(new CreateBlogPostDto
|
|
{
|
|
Title = model.Title,
|
|
Content = model.Content,
|
|
CategoryId = model.CategoryId,
|
|
Tags = model.Tags,
|
|
SeoTitle = model.SeoTitle,
|
|
SeoDescription = model.SeoDescription,
|
|
IsPublished = model.IsPublished
|
|
});
|
|
|
|
if (result == null)
|
|
{
|
|
Snackbar.Add("포스트 저장에 실패했습니다.", Severity.Error);
|
|
return;
|
|
}
|
|
|
|
Snackbar.Add("포스트가 저장되었습니다.", Severity.Success);
|
|
Navigation.NavigateTo("/taxbaik/admin/blog");
|
|
}
|
|
catch (ValidationException ex)
|
|
{
|
|
Snackbar.Add(ex.Message, Severity.Error);
|
|
}
|
|
}
|
|
}
|