VO / SHG / Farmer endorsement
Unit/FMT staff review farmers, SHGs and VOs and mark them endorsed, flagged or resolved, with threaded comments and abstract documents. Endorsing locks the farmers' KAP.
FactsheetVO & endorsements
- Who uses it
- Unit-in-charge (unit-incharge)FMT (fmt_l1)
- How you get here
- VO tab (home for Unit/FMT login) > Endorsement card. Drawer "Endorsements" item (unit login only); drawer "Refresh" reloads endorsements.
- Tables
endorsement_entity,ie_flat_entity- APIs
- 13 calls today, 13 App Service operations
- Offline
- Status changes are saved to endorsement_entity and synced later; category-freeze and KAP-submitted checks need server data.
Screens
| Screen | What it does | Source |
|---|---|---|
| VO tab hub | Cards for Endorsement, Survey and Compact Block. | app/src/main/java/org/platformcommons/urvi/view/endorsements/VoTabFragment.kt |
| Endorsement list | VO > SHG > farmer drill-down with status menus and bulk endorse. | app/src/main/java/org/platformcommons/urvi/view/endorsements/vo/EndorsementFragment.kt |
| Resolve comments | Status actions and threaded comments. | app/src/main/java/org/platformcommons/urvi/view/endorsements/comment/ResolveCommentsFragment.kt |
What it captures
| Field | Type | Required | Validation | Options from |
|---|---|---|---|---|
| Comment | Text | No | Threaded with "load more"; auto comments added for Not resolved / Mark as resolved. | User input |
| Endorsed abstract upload | File | No | Accepts image/*, PDF and Word files. VO/SHG only. | Device files |
Rules
Conditions from the code, rewritten as plain decision rules.
| When | Then |
|---|---|
| Navigating | VO list > SHG list > farmer list > KAP 25-26 read-only. Lists are sorted by name and filtered by the Home search box. |
| Row status PENDING | Menu: Raise flag, Mark as endorsed, Download abstract (VO/SHG only). |
| Row status FLAGGED | Menu: View comments, Mark as endorsed. |
| Row status ENDORSED | Menu: View comments, Upload endorsed abstract, Get endorsed abstract (VO/SHG only). |
| Row status REVIEW | Menu: View comments, Mark as endorsed. |
| Row is a farmer | Download / Upload / Get abstract are always hidden. |
| Endorsing a farmer without IE id | Blocked. |
| Endorsing a farmer whose category is not frozen (server PLUS_ONE_FARMING_CATEGORY_LAST_UPDATE_DATE check) | "please freeze the category before endorsing". |
| Endorsing a C4 farmer with frozen category | Endorsed directly. |
| Endorsing a non-C4 farmer whose KAP 25-26 is not submitted | "submit KAP". |
| Endorsing an SHG with any active farmer lacking IE id | "there are few farmers with no IE id". |
| Endorsing an SHG with unfrozen farmer categories | Shows list of unfrozen farmers. |
| Endorsing an SHG where all farmers are C4 | Endorsed. |
| Endorsing an SHG where some Farmer/C5 members have not submitted KAP | Shows list of those members; blocked. |
| Endorsing a VO with any SHG not endorsed | "Please endorse SHG below" with the list; blocked. |
| Flag / Not resolved / Mark as resolved | Status FLAGGED / FLAGGED + auto comment / REVIEW + auto comment. |
| Non-SHG farmer list under a VO | "Bulk endorse" button: takes the VO's farmers, keeps those with KAP submitted (dataset PlusOneAAP2526IEIDStatus), confirms, then calls bulk endorse. |
| A VO or SHG is endorsed | Status is also written to that VO's or SHG's ie_flat_entity rows, which locks their KAP. |
API contracts
Each call opens to its use case, headers, request and response bodies, and errors.
| App Service v2: operation | Use |
|---|---|
GET /config | Typed config bundle (ETag) |
GET /farmers/search | Search farmers in a geography (online) |
GET /farmers/{farmerId}/plan | KAP / annual action plan for a season |
GET /endorsements | Endorsement statuses (VO, SHG, farmer) |
GET /endorsements/{entityType}/{entityId}/comments | Comment thread of an endorsed entity |
GET /endorsements/{entityType}/{entityId}/eligibility | Why an endorsement action is allowed or blocked |
GET /vo/{voId}/abstract | VO abstract download link |
GET /shg/{shgId}/abstract | SHG abstract download link |
POST /sync/batch | Apply an ordered batch of offline mutations |
POST /files | Create a file upload (resumable or single-shot) |
GET /files/{fileId} | File metadata and signed download URL |
PATCH /files/{fileId} | Append a chunk to a resumable upload |
HEAD /files/{fileId} | Current offset of a resumable upload |
Behaviour notes
- The farmer KAP opened from here is read-only (UIC mode).
Improve in the rewrite
- Show the blocking checklist (IE id, frozen category, KAP submitted, SHGs endorsed) before the user taps endorse.
- Move hard-coded menu matrix to a status-to-actions table shared with the server.