Side menu
A bottom-sheet menu opened from the bottom bar. It shows a greeting, last sync time and version, and links to role-specific modules, Settings and Logout.
FactsheetHome & navigation
- Who uses it
- CadreUnit In-Charge / FMT L1
- How you get here
- Tap the navigation icon on the Home bottom bar.
- APIs
- 2 calls today, 2 App Service operations
- Offline
- Works offline.
Screens
| Screen | What it does | Source |
|---|---|---|
| Side menu (bottom sheet) | Header "Hello ! <first name>", account name, "Last Synced Time: dd/MM/yyyy HH:mm" (or NA); footer "Version <name> (<code>)". | app/src/main/java/org/platformcommons/urvi/view/home/BottomNavigationDrawerFragment.kt |
Rules
Conditions from the code, rewritten as plain decision rules.
| When | Then |
|---|---|
| The user is Cadre | Show My Plan & Profile, Program Configuration, Login History, Program Instructions, Activity Tracker, Settings, Logout. |
| The user is Unit | Show Analytics, Program Configuration, Login History, Program Instructions, Endorsements, Settings, Logout. Hide My Plan & Profile and Activity Tracker. |
| My Plan & Profile is tapped | Open the farmer hub in user mode for the logged-in user and start a user-data fetch. |
| Logout is tapped | Confirm "Any un-synced data will be lost", then wipe the app and return to the splash. |
API contracts
Each call opens to its use case, headers, request and response bodies, and errors.
| Today: call | Use | Replaced by |
|---|---|---|
PATCH /gateway/urvi-app-service/api/v1/user-device-sessions/users/{userId}?remarks= | Expire all device sessions of the user. | |
GET /gateway/asset-service/api/v1/assets/ownerEntities?ownerEntityIdList=&ownerEntityType=OWNER_ENTITY.IE | Download land and cattle assets for a chunk of farmers (or the cadre, with OWNER_ENTITY.BRIDGE_USER). |
| App Service v2: operation | Use |
|---|---|
POST /auth/logout | Log out and revoke tokens |
GET /session/bootstrap | Session bootstrap after login and on cold start |
Behaviour notes
- Analytics is hard-coded hidden for Cadre in the menu but reachable from the bottom bar.
- "Refresh Endorsement Status" exists but is hidden in the XML for everyone.
- Logout cancels all background jobs, optionally expires the device binding, clears every Room database (app, assessment and Injection DB) and preferences, but keeps the language.
Improve in the rewrite
- Show the pending sync count in the logout warning and offer Sync now.
- Drive menu visibility from one role-permission table.