2.0 KiB
2.0 KiB
AIMS Project Memory
Razor Pages Migration (Branch: feat/razor-pages-migration)
- Dashboard (
/) and Goals List (/goals) migrated to Razor Pages - Blazor
@pagedirectives removed fromDashboard.razorandGoalsList.razor - NavMenu.razor:
ForceLoad="true"on Dashboard and Ziele links - MainLayout.razor:
ToggleDarkModenow writesaims-dark-modecookie via JS Interop
Key gotchas
<option @(ternary)>→ RZ1031 error; useasp-items="Model.SelectList"insteadPageproperty in PageModel conflicts withPageModel.Page()method → usenewkeyword:public new int Page- Static methods in PageModel not accessible from Razor view via bare
IndexModel.Method()→ qualify fully:AIMS.Web.Pages.Goals.IndexModel.MakeUrl(...) - Razor Pages
_Layout.cshtmllives atPages/Shared/, ViewComponents atViews/Shared/Components/{Name}/Default.cshtml MapRazorPages()must come BEFOREMapRazorComponents<App>()in Program.cs to claim routes
File locations
- Layout:
src/AIMS.Web/Pages/Shared/_Layout.cshtml - NavMenu ViewComponent:
src/AIMS.Web/ViewComponents/NavMenuViewComponent.cs- View:
src/AIMS.Web/Views/Shared/Components/NavMenu/Default.cshtml
- View:
- CSS:
src/AIMS.Web/wwwroot/css/material.css - JS:
src/AIMS.Web/wwwroot/js/aims-pages.js - Dashboard:
src/AIMS.Web/Pages/Dashboard/Index.cshtml[.cs] - Goals List:
src/AIMS.Web/Pages/Goals/Index.cshtml[.cs] - Goals Tree partial:
src/AIMS.Web/Pages/Goals/_TreeNode.cshtml - HTMX endpoint:
src/AIMS.Web/Pages/Goals/Hierarchy.cshtml[.cs]@/goals/hierarchy
Key DTOs
GoalSummaryDto: Id, Name, CompanyName, DepartmentName, GoalType, CurrentActualValue, CurrentTargetValue, TargetValue, AchievementPercentage (decimal), Status, TagNames, LatestValuePeriodName, UnitGoalHierarchyNodeDto: same + Level, ParentGoalId, HasChildren, ChildCount, Children, ValueSourceYearDto: Id, YearNumber (int), Status, IsEditableGoalFilterDto: CompanyId, DepartmentId, YearId, Status, TagId, SearchTerm, ChildFilterMode, Page, PageSize, IsRootGoal