feat(growers): show sessions and wallet registration in grower card - #1237
Open
Jaiharishan wants to merge 1 commit into
Open
feat(growers): show sessions and wallet registration in grower card#1237Jaiharishan wants to merge 1 commit into
Jaiharishan wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
treetracker-field-dataservice (session,device-configuration,wallet-registration) so reviewers can see which app/device a grower used without running manual SQL.REACT_APP_FIELD_DATA_API_ROOTenv var added to.env.development/.env.staging/.env.production/.env.test, verified reachable against the real dev and prod clusters.src/api/fieldData.jsmodule (fetch-based, follows existingsrc/api/*conventions).Known limitation
GET /sessionon treetracker-field-data has no server-side filter by grower/wallet, so sessions are paged through and matched client-side bygrower_account_id, and bytarget_walletagainst 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 filessrc/components/tests/GrowerDetail.test.js(populated + empty session states) passsrc/models/unit tests still passCloses #616