diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/AdminLayout.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/AdminLayout.razor index d6de8040..99bddb81 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/AdminLayout.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Layout/AdminLayout.razor @@ -88,6 +88,10 @@ @* ── QUẢN TRỊ ── *@ @L["Admin_Nav_SectionAdmin"] + + + @L["Admin_Nav_Users"] + @L["Admin_Nav_Roles"] diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Staff/RolePermissions.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Staff/RolePermissions.razor index 15fe4836..d0e8e0d4 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Staff/RolePermissions.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Staff/RolePermissions.razor @@ -2,11 +2,14 @@ @layout AdminLayout @inherits AdminBase @inject WebClientTpos.Client.Services.IamApiService IamService +@inject IDialogService DialogService +@inject ISnackbar Snackbar @using WebClientTpos.Client.Services +@using MudBlazor @* - EN: Role permissions — real roles from IAM Service API. - VI: Phân quyền — dữ liệu roles thật từ IAM Service API. + EN: Role permissions — real roles from IAM Service API with full CRUD. + VI: Phân quyền — dữ liệu roles thật từ IAM Service API với CRUD đầy đủ. *@ Phân quyền — GoodGo Admin @@ -18,7 +21,7 @@

Quản lý vai trò và quyền truy cập

- @@ -37,7 +40,7 @@ else if (!_roles.Any())
Chưa có vai trò nào - Vai trò sẽ được tạo khi hệ thống IAM hoạt động + Nhấn "Tạo vai trò" để bắt đầu
} else @@ -72,11 +75,32 @@ else @if (selected != null) {
-
+

Chi tiết — @selected.Name

+
+ @if (!selected.IsSystem) + { + + + } + else + { + + Vai trò hệ thống + + } +
@@ -106,7 +130,7 @@ else
} - @* Permission Groups — placeholder since IAM doesn't expose permissions yet *@ + @* Permission Groups — placeholder since IAM doesn't expose permissions per role yet *@
Quyền hạn
@@ -127,42 +151,221 @@ else
} +@* ═══ CREATE / EDIT DIALOG ═══ *@ +@if (_showDialog) +{ +
+
+

+ @(_isEditing ? "Sửa vai trò" : "Tạo vai trò mới") +

+
+
+ + +
+
+ +