claude-meta/memory/projects/aims/MEMORY.md

2.0 KiB

AIMS Project Memory

Razor Pages Migration (Branch: feat/razor-pages-migration)

  • Dashboard (/) and Goals List (/goals) migrated to Razor Pages
  • Blazor @page directives removed from Dashboard.razor and GoalsList.razor
  • NavMenu.razor: ForceLoad="true" on Dashboard and Ziele links
  • MainLayout.razor: ToggleDarkMode now writes aims-dark-mode cookie via JS Interop

Key gotchas

  • <option @(ternary)> → RZ1031 error; use asp-items="Model.SelectList" instead
  • Page property in PageModel conflicts with PageModel.Page() method → use new keyword: 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.cshtml lives at Pages/Shared/, ViewComponents at Views/Shared/Components/{Name}/Default.cshtml
  • MapRazorPages() must come BEFORE MapRazorComponents<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
  • 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, Unit
  • GoalHierarchyNodeDto: same + Level, ParentGoalId, HasChildren, ChildCount, Children, ValueSource
  • YearDto: Id, YearNumber (int), Status, IsEditable
  • GoalFilterDto: CompanyId, DepartmentId, YearId, Status, TagId, SearchTerm, ChildFilterMode, Page, PageSize, IsRootGoal