diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/AuthLayout.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/AuthLayout.razor index e581d80a..77fac367 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/AuthLayout.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/AuthLayout.razor @@ -12,7 +12,7 @@ diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/MainLayout.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/MainLayout.razor index 0ceee7b2..41164c4d 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/MainLayout.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/MainLayout.razor @@ -21,7 +21,7 @@ - @L["Nav_Login"] + @L["Nav_Login"] @L["Nav_FreeTrial"] @@ -44,7 +44,7 @@ @L["Nav_Features"] @L["Nav_Pricing"] @L["Nav_Contact"] - @L["Nav_Login"] + @L["Nav_Login"]
@L["Nav_FreeTrial"] diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Auth/LoginSelect.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Auth/LoginSelect.razor index ab00d463..7694fe4e 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Auth/LoginSelect.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Auth/LoginSelect.razor @@ -1,5 +1,6 @@ @page "/auth/login" -@layout AuthLayout +@page "/login" +@layout MainLayout @inject NavigationManager Navigation @inject IJSRuntime JS diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Home.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Home.razor index 00de7347..8a1529df 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Home.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Home.razor @@ -1,80 +1,14 @@ +@page "/home" @page "/" -@layout AuthLayout -@inject NavigationManager Navigation -@inject IJSRuntime JS -GoodGo POS — Hệ thống quản lý POS đa ngành +GoodGo POS - -
- -

- GoodGo POS -

- -

- Hệ thống quản lý POS đa ngành -

- -

- Giải pháp toàn diện cho Café, Nhà hàng, Karaoke, Spa & Bán lẻ -

- -
- - +
+

GoodGo POS

+

Hệ thống quản lý POS đa ngành

+

Café · Nhà hàng · Karaoke · Spa · Bán lẻ

+ -
- - -
-
- - @foreach (var card in _featureCards) - { -
- -

@card.Title

-

@card.Description

-
- } - -
-
- - - - -@code { - protected override async Task OnAfterRenderAsync(bool firstRender) - { - if (firstRender) - { - try { await JS.InvokeVoidAsync("lucide.createIcons"); } catch { } - } - } - - private record FeatureCard(string Icon, string Title, string Description); - - private readonly FeatureCard[] _featureCards = - [ - new("coffee", "Café & Bar", "Quản lý đơn hàng, pha chế, loyalty"), - new("utensils", "Nhà hàng", "Sơ đồ bàn, bếp, đặt bàn"), - new("mic", "Karaoke", "Quản lý phòng, timer, F&B"), - new("sparkles", "Spa & Beauty", "Lịch hẹn, dịch vụ, therapist"), - ]; -} +
diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Server/Program.cs b/apps/web-client-tpos-net/src/WebClientTpos.Server/Program.cs index 9b8c3c03..79cb0226 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Server/Program.cs +++ b/apps/web-client-tpos-net/src/WebClientTpos.Server/Program.cs @@ -61,6 +61,20 @@ if (app.Environment.IsDevelopment()) app.UseHttpsRedirection(); +// EN: Redirect exact root "/" to "/home" before Blazor SPA catches it +// VI: Redirect chính xác "/" về "/home" trước khi Blazor SPA xử lý +app.Use(async (context, next) => +{ + if (context.Request.Path == "/" && context.Request.Method == "GET" + && !context.Request.Path.StartsWithSegments("/api") + && !context.Request.Headers.Accept.ToString().Contains("application/json")) + { + context.Response.Redirect("/home"); + return; + } + await next(); +}); + // EN: Enable CORS // VI: Kích hoạt CORS app.UseCors("BlazorClient");