feat(projects): wire Project detail + tasks pages (MAPPS-127) #89

Merged
longjacksonle merged 1 commit from feat/mapps-127-wire-project-detail-tasks into main 2026-06-07 04:24:30 +02:00

What

Follow-up to MAPPS-126. Wires the last two hardcoded surfaces on the Projects page: ProjectDetailPage (fixed overview, fake John Smith / Jane Doe tasks + activity, hardcoded Details / Budget / Time sidebars) and ProjectTasksPage (static five-row table).

Closes MAPPS-127.

How

  • Detail page: GET /api/v1/projects/:id drives the header (project name), Overview (real description), and the sidebar (status badge; task-completion progress; start / due dates; project-manager name; Budget = budget_amount vs actual_amount with a utilization bar; Time = budget_hours estimated vs actual_hours logged). The Tasks card comes from GET /api/v1/projects/:id/tasks. Statuses resolve via GET /api/v1/task-statuses (is_completed drives the green badge + the progress %), users via GET /api/v1/auth/users. Dropped the fake Recent Activity card (no activity-feed endpoint exists). Loading / load-failed states.
  • Tasks page: real table from the same tasks endpoint (title, status badge, assignee, due date, actual/estimated hours) with loading / empty / failed states.
  • Reuses MAPPS-126's helpers (Paginated, de_flex_f64, status_badge, fmt_date, fmt_money); adds RemoteTask / RemoteTaskStatus / RemoteUser + task_status_badge, user_name, fmt_hours. Removed the dead TaskItem / ActivityItem components.

Stacked on #88

This branch builds on the MAPPS-126 branch (reuses those helpers), so until #88 merges this PR's diff also shows #88's changes. Merge #88 first, then this.

Verification

  • cargo fmt --check clean; cargo clippy --target wasm32-unknown-unknown --all-targets -- -D warnings clean.
  • Live: created a project + task, confirmed GET /projects/:id and /projects/:id/tasks return the expected fields (decimals as strings, handled). Test data cleaned up.
  • Note: GET /auth/users requires admin/manager; a lower-privilege session gets an empty list and assignee/PM names fall back to "Unassigned" / "Unknown" rather than erroring - the page degrades gracefully because the fetch is best-effort.

🤖 Generated with Claude Code

## What Follow-up to MAPPS-126. Wires the last two hardcoded surfaces on the Projects page: `ProjectDetailPage` (fixed overview, fake John Smith / Jane Doe tasks + activity, hardcoded Details / Budget / Time sidebars) and `ProjectTasksPage` (static five-row table). Closes MAPPS-127. ## How - **Detail page:** `GET /api/v1/projects/:id` drives the header (project name), Overview (real description), and the sidebar (status badge; task-completion progress; start / due dates; project-manager name; Budget = `budget_amount` vs `actual_amount` with a utilization bar; Time = `budget_hours` estimated vs `actual_hours` logged). The Tasks card comes from `GET /api/v1/projects/:id/tasks`. Statuses resolve via `GET /api/v1/task-statuses` (`is_completed` drives the green badge + the progress %), users via `GET /api/v1/auth/users`. Dropped the fake Recent Activity card (no activity-feed endpoint exists). Loading / load-failed states. - **Tasks page:** real table from the same tasks endpoint (title, status badge, assignee, due date, actual/estimated hours) with loading / empty / failed states. - Reuses MAPPS-126's helpers (`Paginated`, `de_flex_f64`, `status_badge`, `fmt_date`, `fmt_money`); adds `RemoteTask` / `RemoteTaskStatus` / `RemoteUser` + `task_status_badge`, `user_name`, `fmt_hours`. Removed the dead `TaskItem` / `ActivityItem` components. ## Stacked on #88 This branch builds on the MAPPS-126 branch (reuses those helpers), so until #88 merges this PR's diff also shows #88's changes. **Merge #88 first**, then this. ## Verification - `cargo fmt --check` clean; `cargo clippy --target wasm32-unknown-unknown --all-targets -- -D warnings` clean. - Live: created a project + task, confirmed `GET /projects/:id` and `/projects/:id/tasks` return the expected fields (decimals as strings, handled). Test data cleaned up. - Note: `GET /auth/users` requires admin/manager; a lower-privilege session gets an empty list and assignee/PM names fall back to "Unassigned" / "Unknown" rather than erroring - the page degrades gracefully because the fetch is best-effort. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(projects): wire Project detail + tasks pages to the backend (MAPPS-127)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 41s
Create release / Create release from merged PR (pull_request) Has been skipped
67ec6e1af1
Follow-up to MAPPS-126. ProjectDetailPage and ProjectTasksPage were the last hardcoded surfaces on the Projects page: the detail page showed a fixed "Network Infrastructure Upgrade" overview, fake John Smith / Jane Doe tasks and activity, and hardcoded Details / Budget / Time sidebars; the tasks page was a static five-row table.

ProjectDetailPage now fetches GET /api/v1/projects/:id (header = project name; Overview = real description; Details = status badge, task-completion progress, start / due dates, project-manager name; Budget = budget_amount vs actual_amount with a utilization bar; Time = budget_hours estimated vs actual_hours logged) and GET /api/v1/projects/:id/tasks for the Tasks card. Task statuses are resolved via GET /api/v1/task-statuses (is_completed drives the green "done" badge and the progress percentage) and user ids via GET /api/v1/auth/users. The fake Recent Activity card is gone (there is no activity-feed endpoint). Loading and load-failed states replace the always-on template.

ProjectTasksPage renders a real table from the same tasks endpoint (title, status badge, assignee, due date, actual/estimated hours) with loading / empty / failed states.

Reuses the helpers MAPPS-126 added (Paginated, de_flex_f64, status_badge, fmt_date, fmt_money) and adds RemoteTask / RemoteTaskStatus / RemoteUser plus task_status_badge, user_name, and fmt_hours. Removed the dead TaskItem and ActivityItem components.

Note: listing users (GET /auth/users) requires admin/manager, so a lower-privilege session gets an empty user list and assignee/PM names fall back to "Unassigned" / "Unknown" rather than failing. The page degrades gracefully because the fetch is best-effort (.ok()).

Stacked on MAPPS-126 (PR #88); merge that first.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/mapps-127-wire-project-detail-tasks 2026-06-07 04:24:30 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!89
No description provided.