micronutrientsupport / micronutrient-support-tool

Web front-end for the MAPS Micronutrient Support Tool
MIT License
2 stars 0 forks source link

Expand intervention selection modal options #1130

Open bgsandan opened 1 year ago

bgsandan commented 1 year ago

With apoloigies to @pautva for butchering screenshots of the beautiful figma.

Update the intervention selection screen to allow display and customisation of more of the intervention parameters at this point.  Also support user selection of focus micronutrient and target nation when accessing the intervention costings section without first going through QuickMAPS (See #1129).

Basic functionality of selecting and forking an intervention remain.  However, the user is able to select and change their focus micronutrient, nation and geography of interest (Sections 1,2 & 3) in the screenshot below.  Options 4, 5 and 6 (read-only) come from the data for the intervention selected to be forked in the  /interventions endpoint

image
bgsandan commented 1 year ago

Details of how to send the additional values for the fields in 1, 2 & 3 (Country, Focus Geography and Focus micronutrient) to the create intervention POST route TBC :rocket:

jlczapski commented 1 year ago
{
  "nation": "MWI",
  "focusGeography": "MWI.11_1",
  "focusMicronutrient": "B3",
  "interventionType": "BF",
  "foodVehicle": 7,
  "interventionStatus": ""
}

Ex. body for the TBC POST request, still waiting on what interventionStatus will contain.

bgsandan commented 1 year ago

Current body looks like this:

{
    "parentInterventionId": 1
    "newInterventionName": "My intervention",
    "newInterventionDescription": "Some text,
}

Suggest new one looks like

{
    "parentInterventionId": 1
    "newInterventionName": "My intervention",
    "newInterventionDescription": "Some text,
    "newInterventionNation": "MWI",
        "newInterventionFocusGeography": "MWI.11_1",
        "newInterventionFocusMicronutrient": "B3",
}

Food vehicle, intervention type and interventionstatus shouldn't need sending to the POST request as they will come from the selected intervention