Features / Onboarding & setup

Village, Habitation and VO selection

A Cadre picks one Village, then one Habitation, then one VO to work on. Farmers for that VO are then downloaded.

FactsheetOnboarding & setup
Who uses it
Cadre
How you get here
Automatically after role detection for Cadre users; also via the Change button on the Data download screen in load-more mode.
Tables
worknodehierarchy
APIs
1 calls today, 2 App Service operations
Offline
Fully offline; reads the hierarchy downloaded during startup.

Screens

ScreenWhat it doesSource
Please select a VillageThree cascading drop-downs and a Next button.app/src/main/java/org/platformcommons/urvi/view/splash/SelectWorkNodeActivity.kt

What it captures

FieldTypeRequiredValidationOptions from
Select Villagesearchable drop-down (sorted)YesChanging the village clears Habitat and VO.Local work-node hierarchy, villages only; name in the selected language, falling back to English
Select Habitatdrop-downYesChanging the habitat clears VO.Children of the chosen village
Select VOdrop-downYesOnly VOs under the chosen habitat.Children of the chosen habitat

Rules

Conditions from the code, rewritten as plain decision rules.

WhenThen
The screen opens and DEVICE_BINDING_EXTERNAL_SWITCH = 1Device registration opens on top first.
Next is pressed with any of the three emptyToast "Please select a Village,VO and Habitation to proceed".
Next is pressed with all three chosenSave the selection, set language-selected = true and open Data download, clearing the back stack.
The hierarchy list is emptyToast "something went wrong".

API contracts

Each call opens to its use case, headers, request and response bodies, and errors.

Today: callUseReplaced by
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneUrviGeoDataForVOs/executeLoad the work-node (geography) hierarchy for the work-node picker.
App Service v2: operationUse
GET /session/bootstrapSession bootstrap after login and on cold start
GET /geo/childrenChildren of a geography node

Behaviour notes

  • A Refresh button exists in the layout but is always hidden.
  • Possible bug · unverified after choosing a new VO from load-more mode, Data download opens in normal mode with all items already SUCCESS, so the new VO's farmers may not be downloaded until the user taps Refresh on Farmers (not verified on device).

Improve in the rewrite

  • When the VO changes, reset download status so the new VO's farmers are fetched automatically.
  • Allow refreshing the hierarchy from this screen.