Features / Farming models & harvest

365 DKG kitchen garden

A monthly yes/no check of whether the farmer's "365-day Kitchen Garden" (DKG, a natural-farming home-garden model) is still continuing. Each answer is saved as a farming-model record of type MODEL_TYPE.365_DKG.

FactsheetFarming models & harvest
Who uses it
Cadre user
How you get here
Farmer hub, 365 DKG tile (no checks except the farmer must be active).
Tables
farming_model
APIs
2 calls today, 4 App Service operations
Offline
Works offline; queued for sync.

Screens

ScreenWhat it doesSource
365 DKGAnswer the monthly question.app/src/main/java/org/platformcommons/urvi/view/dkg/AddDKGActivity.kt

What it captures

FieldTypeRequiredValidationOptions from
Is your kitchen garden continuing in this month?Yes / NoYesNothing happens on save if neither is picked (no message).Fixed

Rules

Conditions from the code, rewritten as plain decision rules.

WhenThen
The latest DKG record was created this monthIts answer is pre-selected and "Created on" is shown.
The latest record is older"Last created on" is shown.
The user confirms saveA new farming-model record is created with owner = farmer and the answer.

API contracts

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

App Service v2: operationUse
GET /configTyped config bundle (ETag)
GET /farmers/snapshotCursor-paged hydrated farmer snapshot
GET /farmers/{farmerId}/farming-modelsA farmer's ATM plots and DKG answers
POST /sync/batchApply an ordered batch of offline mutations

Behaviour notes

  • Possible bug · unverified every submit creates a new record, even several in the same month, instead of updating this month's record.

Improve in the rewrite

  • Update the current month's record instead of creating a new one.
  • Show a message when no answer is picked.