User Interface low complexity frontendmobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

Card panel displaying aggregated activity statistics for the peer mentor: total activities, hours logged, and activity breakdown by type. Provides coordinators a quick compliance overview. Mirrors stats patterns from the activity statistics dashboard but scoped to a single mentor.

Feature: Peer Mentor Profile & Status Screen

mentor-activity-summary-panel

Summaries

The Mentor Activity Summary Panel delivers a compliance and performance snapshot for any peer mentor, giving coordinators the data they need to assess mentor engagement without navigating away from the profile screen. By aggregating total activities, hours logged, and a breakdown by activity type, it reduces the time spent on compliance reviews and enables faster identification of underperforming or overloaded mentors. This directly supports the organization's accountability obligations to funders and regulatory bodies, and positions the platform as a genuine operational intelligence tool rather than a simple contact manager — a key differentiator in procurement and renewal conversations.

Low complexity widget that depends on a pre-aggregated `MentorActivitySummary` data model — the aggregation logic lives upstream in a service or repository layer, not in this component. Confirm the summary model is stable and covers all required fields (total count, hours, activity type breakdown) before UI development begins to avoid rework. The 'view all' tap navigates to a filtered activity log — coordinate with the team owning that screen to agree on the filter parameter contract. Empty and inactive mentor states require UX-defined designs.

No significant delivery risks, but the data contract with the upstream aggregation service is the key dependency to track. Budget time for edge case testing: new mentors with zero activity, mentors with a single activity type, and very large activity counts.

Stateless Flutter widget accepting a `MentorActivitySummary` value object and a `VoidCallback onViewAllTap`. `_buildStatRow` renders a label-value pair using token-based typography — keep this method generic enough to reuse across the three top-level stats. `_buildActivityBreakdown` iterates over `List` to render a compact visual breakdown; consider a horizontal bar or icon-row pattern depending on design spec. The 'view all' navigation is delegated entirely via `onViewAllTap` — do not embed routing logic in this widget.

Handle the empty/null summary case explicitly: show a zeroed-out state rather than crashing. The component mirrors patterns from the activity statistics dashboard — extract any shared stat row or breakdown widgets into the shared component library if duplication is detected. Widget tests: mock summary with full breakdown, empty summary (zero values), single activity type, and verify 'view all' callback fires on tap.

Responsibilities

  • Display total activity count and hours for current period
  • Show activity type breakdown in a compact visual format
  • Support tapping to navigate to full activity log filtered by mentor
  • Handle empty state for new or inactive mentors

Interfaces

MentorActivitySummaryPanel({required MentorActivitySummary summary, required VoidCallback onViewAllTap})
build(BuildContext context)
_buildStatRow(String label, String value)
_buildActivityBreakdown(List<ActivityTypeStat> breakdown)

Relationships

Dependents (1)

Components that depend on this component