Skip to content

feat(growers): show sessions and wallet registration in grower card - #1237

Open
Jaiharishan wants to merge 1 commit into
Greenstand:masterfrom
Jaiharishan:616-grower-sessions-wallet-registration
Open

feat(growers): show sessions and wallet registration in grower card#1237
Jaiharishan wants to merge 1 commit into
Greenstand:masterfrom
Jaiharishan:616-grower-sessions-wallet-registration

Conversation

@Jaiharishan

Copy link
Copy Markdown

Summary

  • Adds a collapsible Sessions section to the grower detail drawer (after Device Identifiers), pulling from the treetracker-field-data service (session, device-configuration, wallet-registration) so reviewers can see which app/device a grower used without running manual SQL.
  • Each session shows: check-in photo (if any), date, organization, device brand/model/app version, and wallet email/phone.
  • New REACT_APP_FIELD_DATA_API_ROOT env var added to .env.development/.env.staging/.env.production/.env.test, verified reachable against the real dev and prod clusters.
  • New src/api/fieldData.js module (fetch-based, follows existing src/api/* conventions).

Known limitation

GET /session on treetracker-field-data has no server-side filter by grower/wallet, so sessions are paged through and matched client-side by grower_account_id, and by target_wallet against the known email/phone for that grower (capped at 20 pages to keep the drawer responsive, with a console warning if the cap is hit). A proper filter param on the field-data service would remove this limitation.

Test plan

  • npm run prettier / eslint clean on changed files
  • New jest tests in src/components/tests/GrowerDetail.test.js (populated + empty session states) pass
  • Verified manually in the dev environment: opened a grower card, expanded the new Sessions accordion, confirmed it renders correctly alongside existing sections
  • src/models/ unit tests still pass

Closes #616

Adds a collapsible Sessions section to the grower detail drawer,
sourced from the treetracker-field-data service (session,
device-configuration, wallet-registration), so reviewers can see
which app/device a grower used without running manual queries.

Closes Greenstand#616
@Jaiharishan
Jaiharishan requested a review from a team as a code owner August 19, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List sessions and wallet registration in grower profile (grower card)

1 participant