-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve child functionality by allowing multiple items to be requested #4495
Conversation
c946944
to
c3deca5
Compare
8c2530d
to
505df58
Compare
Co-authored-by: isidzukuri <[email protected]>
505df58
to
9ae4c06
Compare
I'm good with this technically - @cielf over to you! |
Probably be later in the weekend / possibly Monday before I get to it, I'm afraid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! My first pass indicated things look pretty good, except for ...
1/ This sequence fails...
bin/setup
bin/start
sign in as [email protected]
select 'Children' from the l.h.m.
View Child Details on the first item on the list
observe -- it has an item needed
Edit Child Details
-- I expect that item to appear in the Items Requested field. It does not.
2/ "Item needed" on the child view should also now be Item(s) needed
3/ Out of scope for this, but we need to do some work on the child export too, I see. (will add something to the inbox to review and make better)
fix seen to ensure only requestable items seeded fix item to items
@cielf fixed. FYI it was a seed issue rather than a code issue. The seed was adding items that were not actually requestable so the dropdown would not display them. But that does beg the question if that is a corner case that we should consider? If a child had items it was requesting then the partner got rid of them. I feel like the odds of a partner removing items is low? |
Are you saying that the seed was adding a needed item to the child that was also an item that the partner wasn't allowed to see? (Bad seed, then, indeed). As for the likelihood of items being removed -- children age out of the smaller sizes of diapers and into bigger ones, so I would expect that the same child would have evolving needs over time. And a bank might take items off the list that they offer, if they don't have a steady supply of them. So there's definitely an edge case there... But/and that's an existing edge case, right? So technically out of scope for this PR. I'll put a note in our copious todo list to figure out what should happen (should, for example, the partner get a notification if the bank removes something one of their children needs?) |
@elasticspoon: Your PR |
Resolves #3797
Description
Most of the work for this PR was already done in #4126. But essentially we create a HABTM relationship between children and items.
I changed the front end selection behavior to use a
select2
dropdown.Added an additional system test to ensure that we can create a child with multiple requested items correctly.
Future PRs
item_needed_diaperid
columnType of change
How Has This Been Tested?
Screenshots