cssat / sprout-issues

An issue-only repository for the Sprout data collection platform
https://sproutservices.org
2 stars 1 forks source link

Unable to click the Add Purchase button in the End of Intervention tab #242

Open lucypotato opened 1 month ago

lucypotato commented 1 month ago

Describe the bug A user was trying to add purchase information to the End of Intervention section "Describe items, goods, or services paid for through concrete funds", and it would not let them add any purchases. They tried to click on the Add Purchase button and nothing was happening.

To Reproduce Steps to reproduce the behavior:

  1. Click Edit Assessment on a CANS
  2. Go to the End of Intervention tab
  3. Click on Add Purchase
  4. See error in console

Expected behavior The Add Purchase button should be clickable, and when clicked it should display input fields for adding a price and description.

Additional context

TypeError: Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.
    at nonIterableSpread.js:2:9
    at o (toConsumableArray.js:6:95)
    at a.value (EndOfIntervention.js:71:29)
    at Object.u (react-dom.production.min.js:14:84)
    at p (react-dom.production.min.js:14:238)
    at react-dom.production.min.js:14:292
    at v (react-dom.production.min.js:15:72)
    at at (react-dom.production.min.js:52:170)
    at it (react-dom.production.min.js:51:255)
    at ut (react-dom.production.min.js:52:334)

Zendesk Issues

subaykan commented 1 month ago

line of code that is the suspect:

https://github.com/cssat/sprout-wizard/blob/master/client/src/app/components/cans/cansFormTabs/EndOfIntervention.js#L71