Features / Home & navigation

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

ScreenWhat it doesSource
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.

WhenThen
The user is CadreShow My Plan & Profile, Program Configuration, Login History, Program Instructions, Activity Tracker, Settings, Logout.
The user is UnitShow Analytics, Program Configuration, Login History, Program Instructions, Endorsements, Settings, Logout. Hide My Plan & Profile and Activity Tracker.
My Plan & Profile is tappedOpen the farmer hub in user mode for the logged-in user and start a user-data fetch.
Logout is tappedConfirm "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.

App Service v2: operationUse
POST /auth/logoutLog out and revoke tokens
GET /session/bootstrapSession 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.