User Interface medium complexity Shared Component mobile
0
Dependencies
3
Dependents
0
Entities
0
Integrations

Description

Reusable activity form pre-configured for proxy entry. Shows all standard activity fields (date, type, duration, notes) and adds an attribution banner indicating the registering coordinator vs. the attributed peer mentor.

Feature: Proxy & Bulk Activity Registration

proxy-activity-form

Summaries

The Proxy Activity Form is a shared, reusable interface component that enables program coordinators to register activities on behalf of peer mentors—a critical workflow for capturing participation that would otherwise go unrecorded. Its attribution banner makes the accountability chain explicit, distinguishing who performed the activity from who logged it. This transparency supports audit compliance, reduces disputes over record ownership, and builds trust among stakeholders. As a shared component reused across both single-proxy and bulk-registration flows, it reduces development cost and ensures a consistent, professional user experience across the entire coordinator workflow.

This medium-complexity shared UI component is a central dependency for both single proxy registration and bulk registration flows, meaning any delays in its delivery will block downstream screens. Development must cover field rendering (date picker, activity type selector, duration input, notes textarea), attribution banner logic, pre-fill support for bulk defaults, and full validation. QA must verify each field independently, pre-fill behavior with provided defaults, and validation error states. Because it is shared across features, changes to this component post-delivery carry a higher regression risk; allocate review time accordingly and ensure thorough regression coverage before each release that touches proxy flows.

A stateful Flutter widget exposing `build(BuildContext context, ProxyActivityDefaults defaults)`, `onFieldChanged`, `validate()`, `getDraft()`, and `resetForm()` interfaces. Internally maintains form field controllers for date, activity type, duration, and optional notes, initialized from the `ProxyActivityDefaults` argument to support bulk pre-fill. The attribution banner reads coordinator and peer mentor display names from the defaults and renders them as a non-interactive informational block. `validate()` returns a typed result indicating which fields failed.

`getDraft()` returns a `ProxyActivityDraft` value object for upstream consumption. Uses Flutter's `Form` widget with `GlobalKey` for validation orchestration. Shared via the component library; import path must remain stable across features.

Responsibilities

  • Render activity type, date, duration, and optional notes fields
  • Display coordinator attribution banner (registered by / on behalf of)
  • Validate all required fields before allowing submission
  • Support pre-filling defaults for bulk use

Interfaces

build(BuildContext context, ProxyActivityDefaults defaults)
onFieldChanged(String field, dynamic value)
validate()
getDraft()
resetForm()

Relationships

Dependents (3)

Components that depend on this component