Screens What it captures Rules API contracts Behaviour notes Improve in the rewrite Screens Screen What it does Source Add / Edit crop block (PMDS section) PMDS questions and A Grade crop lists. app/src/main/java/org/platformcommons/urvi/view/portfolio/AddPortfolioActivity.kt A Grade crop list Associated and bio-diversity crop rows. app/src/main/java/org/platformcommons/urvi/view/portfolio/PortfolioAGradeCropAdapter.kt
What it captures Field Type Required Validation Options from Type of PMDS Radio (Regular / Pelletized) If PMDS Fixed list Kits used per acre @15 kg Radio (1 / 2) If PMDS and Regular Fixed list Mode of sowing Radio (Broadcasting / Line sowing) If PMDS Fixed list No. of seed varieties sown Whole number If PMDS 6 to 35. User input Quantity of PMDS seeds used (kg) Decimal If PMDS 1 to 999 kg; up to 3 digits before and 2 after the decimal point. User input Associated crops Multi-select If A Grade (at least 2) Select Crop sheet Bio-diversity crops Multi-select If A Grade (at least 2) Select Crop sheet
Rules Conditions from the code, rewritten as plain decision rules.
When Then Crop type is PMDS The AP_GOV_PMDS crop is added automatically and "Add crop" is hidden. Crop type is A Grade Only one main crop is allowed and the A Grade practice is added automatically. A crop is removed or the crop type changes away from PMDS Stored PMDS answers are deleted. PMDS / RDS crop-type config switches are off Those crop types are not offered.
API contracts Each call opens to its use case, headers, request and response bodies, and errors.
Behaviour notes Associated and bio-diversity crops are merged into the block's crop list on save. Improve in the rewrite Drive the PMDS questions and ranges from server config rather than code.