Skip to content
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

[PACKS] #3 Allowing the selection of custom request units in partner request #4398

Closed
2 tasks
cielf opened this issue May 30, 2024 · 4 comments · Fixed by #4510
Closed
2 tasks

[PACKS] #3 Allowing the selection of custom request units in partner request #4398

cielf opened this issue May 30, 2024 · 4 comments · Fixed by #4510

Comments

@cielf
Copy link
Collaborator

cielf commented May 30, 2024

Summary

Allow the selection of custom request units in partner request

Why

This is step #3 of adding the ability to specify "packs" versus "individual" for requests

Details

When an item is selected that has request choice units, the units drop down will appear. It will contain the reporting unit and the additional units selected. The units will be pluralized.

If the item selected has no request choice units, the units drop down will not appear.

If the item selected has custom units, the units must be selected.

Image

Disallow selecting multiple different unit selections on the same item within the same request. (Example -- we would disallow requesting 15 Adult Briefs (Large XL) units and 3 Adult Briefs (Large XL) packs within the same request. The error message in this case should be "You may only request one unit level per item -- please consolidate: Adult Briefs (Large XL)")

Please note that the seed has data in it that does not pass the above condition -- we'll need to address that too!

N.B.

All of the changes for PACKS must be implemented behind a flipper flag "enable_packs"
1/ Flipper works by enabling or disabling a tag (for the PACKS issues, that is enable_packs)
2/ Here is a code snippet illustrating how to use it in your code, with enable_packs as the example tag:
if Flipper.enabled?(:enable_packs)
// do the thing we are guarding with the tag
end
3/ How to check out if it works manually (with the example tag: enable_packs ):
You have to enable the flipper tag on your localhost (note - the tag is stored in your db, so if you reset your db you have to do it again)

localhost:3000/flipper

userid: admin
password: password
Sign In

Click: Add feature
enable_packs
Click: Add feature

Click: Fully enable

To set it back (to check that your nifty changes haven’t broken anything when the flag is off)
Sign in as above:
click on “enable_packs”
click “Delete”
type enable_packs in the “Are you sure” dialog and click ok

Criteria for completion

  • functionality as described above
  • tests that support the functionality as described above

Background

The following sections have been identified as required for the PACKS implementation. These should be implemented in numerical order.

Image

@patelkrunal31
Copy link
Collaborator

I will claim this.

Copy link
Contributor

GitHub Actions bot commented Jul 2, 2024

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

@awwaiid
Copy link
Collaborator

awwaiid commented Jul 7, 2024

This issue is available for contribution. There is a draft-PR (thank you @patelkrunal31) at #4420 with an experiment toward a dependent-dropdown; you may build on top of that or be inspired by it as you like!

@awwaiid awwaiid added Difficulty—Advanced Help Wanted Groomed + open to all! labels Jul 7, 2024
dorner added a commit that referenced this issue Jul 12, 2024
@github-actions GitHub Actions bot removed the Help Wanted Groomed + open to all! label Jul 14, 2024
Copy link
Contributor

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

@github-actions GitHub Actions bot added the stale label Aug 14, 2024
awwaiid added a commit that referenced this issue Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment