[CLAUDE] Domain+App+Api+FE-User+FE-Admin: Plan AA Chunk A - BE IsUserSelectable filter + menu seed Pe_DuyetNcc_WfView + sidebar widen w-72 xl:w-80 + revert Plan U truncate
BE changes:
- MenuKeys.cs +helper PurchaseEvaluationWorkflowView(typeCode) => "Pe_{typeCode}_WfView"
- DbInitializer.cs SeedMenuTreeAsync:
- tree.Add LuongDuyet (Order=2 first child) cho 2 type PE
- INSERT-only loop -> INSERT-OR-UPDATE-Order (shift existing prod rows Order+1)
- Idempotent: skip nếu Order match, UPDATE nếu mismatch
- DbInitializer.cs SeedPurchaseEvaluationPermissionDefaultsAsync +WfView leaf cho 7 role Read
- ApprovalWorkflowV2AdminFeatures.cs GetAwAdminOverviewQuery +IsUserSelectable bool? = null
+ handler conditional Where(d => d.IsUserSelectable == ius)
- ApprovalWorkflowsV2Controller.cs Overview signature +[FromQuery] bool? isUserSelectable
pass-through to mediator (gotcha #44 fix preserved class-level [Authorize] bare)
FE Layout changes (mirror 2 app rule §3.9):
- fe-user resolvePath regex (List|Create|Pending|WfView) + route
/purchase-evaluations/workflow-matrix?type=N
- fe-user + fe-admin sidebar w-60 xl:w-72 -> w-72 xl:w-80 (+48/+32px gain)
- Revert Plan U S23 t11 truncate × 5 sites (3 fe-user MenuGroup+MenuLeaf+StaticLeaf
+ 2 fe-admin MenuGroup+MenuLeaf). Keep min-w-0 flex-1 + shrink-0 + title
tooltip (no harm). Bro request hiển thị đầy đủ label custom Mig 27 dài.
Why:
- User UAT request 2026-05-15: thêm menu "Luồng duyệt" trên Danh sách hiển thị
ma trận phân quyền workflow V2 admin Designer ghim ra cho user xem trước khi
tạo phiếu. Filter IsUserSelectable=true (Mig 25).
- Sidebar Plan U S23 t11 truncate hiển thị "..." → bro muốn full label.
Widen sidebar +32-48px + bỏ truncate cho phép wrap natural khi cực dài.
Verify:
- dotnet build SolutionErp.slnx PASS clean 0 err 2 warn pre-existing DocxRenderer
- Investigator Pre-A confirm gotcha #44 đã fix permanent từ 2026-05-08
- Reviewer cumulative PASS 0 critical / 0 major / 0 minor blocker
Pending Chunk B: FE WorkflowMatrixViewPage.tsx ~215 LOC + types + App.tsx route.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -86,7 +86,12 @@ internal static class AwLabels
|
||||
// ========== GET overview ==========
|
||||
// Filter `applicableType=null` → return tất cả, `=N` → chỉ type đó.
|
||||
|
||||
public record GetAwAdminOverviewQuery(int? ApplicableType = null) : IRequest<AwAdminOverviewDto>;
|
||||
// [Plan AA S24 t1] `IsUserSelectable` filter cho user read-only matrix view —
|
||||
// chỉ workflow ghim (Mig 25 admin pin). Admin Designer KHÔNG truyền param →
|
||||
// return tất cả như cũ.
|
||||
public record GetAwAdminOverviewQuery(
|
||||
int? ApplicableType = null,
|
||||
bool? IsUserSelectable = null) : IRequest<AwAdminOverviewDto>;
|
||||
|
||||
public class GetAwAdminOverviewQueryHandler(
|
||||
IApplicationDbContext db,
|
||||
@ -106,6 +111,11 @@ public class GetAwAdminOverviewQueryHandler(
|
||||
query = query.Where(d => d.ApplicableType == typeEnum);
|
||||
}
|
||||
|
||||
if (request.IsUserSelectable is bool ius)
|
||||
{
|
||||
query = query.Where(d => d.IsUserSelectable == ius);
|
||||
}
|
||||
|
||||
var definitions = await query.ToListAsync(ct);
|
||||
|
||||
// Resolve dept names
|
||||
|
||||
Reference in New Issue
Block a user