wal: pause
This commit is contained in:
@ -17,7 +17,7 @@ Skill này là tài liệu chuyên biệt để Claude (và developer khác) dù
|
||||
| Skill | Mục đích | Trigger ví dụ | Trạng thái |
|
||||
|---|---|---|---|
|
||||
| `dependency-audit-erp` | Scan CVE NuGet + npm 2 FE, respect pin constraint (MediatR 12.4.1, Swashbuckle 6.9.0) | "npm audit", "dotnet vulnerable", "deps scan", "nâng cấp package" | ✅ New Tier 3 |
|
||||
| `ef-core-migration` | Tạo/revert EF Core 10 migration, 3-file rule, DesignTimeDbContextFactory, migration history (mới nhất → row cuối bảng skill; số → `docs/STATUS.md`) | "thêm migration", "EF migration", "schema update", "snapshot lỗi" | ✅ Updated S117 (mig-ref → pointer anti-drift B1; Mig 66 AddPeApprovedPriceRange row added; số → `docs/STATUS.md`) |
|
||||
| `ef-core-migration` | Tạo/revert EF Core 10 migration, 3-file rule, DesignTimeDbContextFactory, migration history (mới nhất → row cuối bảng skill; số → `docs/STATUS.md`) | "thêm migration", "EF migration", "schema update", "snapshot lỗi" | ✅ Updated S164 (rows Mig 68 `AddPeAllowApproverDelete` + **Mig 69 `AddContractSigningPlans` 7-bảng KHKK 89→96** added; Total re-ground 96; số → `docs/STATUS.md`) |
|
||||
| `iis-deploy-runbook` | 3 IIS site + win-acme cert + gitea-runner + LibreOffice + debug 500/502/SignalR prod + **G-084 IPv4/IPv6 hardening** | "prod 500", "IIS fail", "cert hết hạn", "restart app pool", "deploy IIS", "port hijack" | ✅ Updated (G-084) |
|
||||
|
||||
## Format chuẩn 1 skill
|
||||
|
||||
@ -25,7 +25,7 @@ when-to-use:
|
||||
> - Office/HRM/… — xem `MenuKeys.cs` (mã là nguồn)
|
||||
> - 🧊 ~~Budgets root + `Bg_*`~~ — **XOÁ S61 (Mig 50)**, module Budget cũ thay bằng `PeWorkItemBudgets` (ngân-sách per-gói-thầu). Bia-mộ: `MenuKeys.cs:70` + `fe-{admin,user}/src/lib/menuKeys.ts:29`. *(Skill này liệt `Bg_*` như menu ĐANG SỐNG suốt từ S61 → S122 — stale **nặng hơn** lệch con-số vì nó mô-tả thứ **không tồn tại**; vá @S122 W4.)*
|
||||
>
|
||||
> **Inheritance roots (4 group, gotcha #35):** `Contracts` → `Ct_*`, `Workflows` → `Wf_*`, `PurchaseEvaluations` → `Pe_*`, `PeWorkflows` → `PeWf_*`. Thêm root mới có children → **PHẢI extend 3 chỗ** trong `GetMyMenuTreeQuery` (gotcha #35). *(🧊 câu cũ "Budgets KHÔNG inherit (Bg_* phải grant tay)" — gỡ theo module.)*
|
||||
> **Inheritance roots (4 group, gotcha #35):** `Contracts` → `Ct_*`, `Workflows` → `Wf_*`, `PurchaseEvaluations` → `Pe_*`, `PeWorkflows` → `PeWf_*`. Thêm root mới có children → **PHẢI extend 3 chỗ** trong `GetMyMenuTreeQuery` (gotcha #35). 🔴 **`KeHoachKyKet` (KHKK, +S161) CỐ Ý KHÔNG inherit** — switch `GetMyMenuTreeQuery.cs:71-74` vẫn đúng 4 case; 6 leaf `Khkk_*` grant TỪNG DÒNG riêng (seeder `DbInitializer.cs:2107` grant root + 6 leaf explicit, chạy SAU revoke để THẮNG). Đừng đọc "root mới" thành "tự inherit như `Ct_*`". *(🧊 câu cũ "Budgets KHÔNG inherit (Bg_* phải grant tay)" — gỡ theo module.)*
|
||||
|
||||
## Model
|
||||
|
||||
@ -39,7 +39,7 @@ User ────< UserRoles ────< Role ────< Permissions ──
|
||||
- Union (OR) nhiều role → user có quyền nếu **bất kỳ role nào** cho quyền đó
|
||||
- Admin role → **bypass** check (luôn pass mọi policy)
|
||||
|
||||
## Menu tree (seed — ~60 key sau Phase 8)
|
||||
## Menu tree (seed — số key SỐNG → `docs/STATUS.md` "Menu keys", B1 KHÔNG chép số ở đây; nguồn mã = `MenuKeys.cs` + `DbInitializer.cs`)
|
||||
|
||||
```
|
||||
Dashboard
|
||||
@ -57,10 +57,14 @@ Contracts (root inherit)
|
||||
Forms
|
||||
PurchaseEvaluations (root inherit)
|
||||
└── Pe_<Code>_<List|Create|Pending> × 2 type = 6 leaf
|
||||
Budgets (root, NO inherit — grant tay)
|
||||
├── Bg_List
|
||||
├── Bg_Create
|
||||
└── Bg_Pending
|
||||
KeHoachKyKet (root — const VÀO `All` @S161 W1 ⇒ sinh 4 policy KeHoachKyKet.{R,C,U,D}; Mig 69 KHKK)
|
||||
└── Khkk_G1 "Kế hoạch ký kết HĐ (NCC-TP)" (DbInitializer.cs:1780-1787)
|
||||
├── Khkk_WfView Luồng duyệt
|
||||
├── Khkk_List Danh sách
|
||||
├── Khkk_Create Thao tác
|
||||
├── Khkk_Pending Đang duyệt
|
||||
├── Khkk_Approved Đã duyệt
|
||||
└── Khkk_Deleted Đã xóa
|
||||
Reports
|
||||
System
|
||||
├── Users
|
||||
@ -72,6 +76,10 @@ System
|
||||
└── PeWf_<Code> × 2 type = 2 leaf
|
||||
```
|
||||
|
||||
> 🧊 ~~`Budgets (root, NO inherit)` + `Bg_List/Bg_Create/Bg_Pending`~~ — **XOÁ S61 (Mig 50)** cùng module Budget; cây trên từng liệt nó như ĐANG SỐNG tới S164 (cùng bệnh header :26 đã vá @S122 — vá header quên vá CÂY = dư-lượng bất-đối-xứng).
|
||||
> 🔸 `HopDongCung` (GĐ4 bản-cứng): const CÓ trong `MenuKeys.cs:43` nhưng **NGOÀI `All`** ⇒ **0 policy · 0 menu-row** tới khi có module (1-mốc theo owner). ĐỪNG liệt nó vào cây key sống.
|
||||
> 🔴 Gate FE cho KHKK: dùng **đúng key policy của endpoint** (`KeHoachKyKet`) — KHÔNG OR `Khkk_*` key con (gotcha **#85**: menu-hiện rộng hơn API-cho ⇒ 403 rải UI; `MenuPermissionHandler.cs:40` so khớp CHÍNH XÁC 1 key, không kế-thừa).
|
||||
|
||||
Tree hierarchy qua `ParentKey` field. Seed trong `DbInitializer.SeedMenuTreeAsync` + Pe/Wf/Bg seeders riêng.
|
||||
|
||||
## Code pointers
|
||||
|
||||
Reference in New Issue
Block a user