[Feature] Optionally remove the "quantity" request type. similar to how we've allowed removing the "child" and "# of individuals" types.
Summary
Allow opting out of the quantity (aka bulk) request functionality on a bank or partner level
Justification
For banks or partners that only do 'child' or '# of individuals' orders, the quantity functionality is superfluous and distracting
Things we should know
Ideally, this should be paired with issue #3041 This issue was created by editing a copy of that issue, so if there is something that doesn't make sense, that may be why g.
Details
1/ Add a boolean field, enable_quantity_requests, on the organization .
a) Default to true (both for existing and future banks).
b) Will appear on the "My Organization" page with the label "Enable partners to make quantity-based (bulk) requests",
c) If the organization.enable_quantity_based_requests is newly saved as false,
- partner_profiles.enable_quantity_based_requests (see #2, below) will be set to false for all that organizations partners
2/ Add a boolean field, enable_quantity_based_requests, on partner_profiles. a) default to true for all current partners b) new partner profiles will default to the value of the organization's enable_quantity_based_requests c) This will appear on the partner profile screens (both bank and partner-facing) as "Enable Quantity-based (Bulk) Requests " d) However, this field will appear in the partner_profiles show/edit if and only if the bank's enable_quantity_based_requests is true e) Same behaviour for banks and partners
3/ If partner_profiles.enable_quantity_based_requests is true, the quantity order functionality that currently exists remains,
4/ If partner_profiles.enable_quantity_based_requests is false the following changes in PartnerBase. b/ The "Quantity" box and Create Request button will not appear in the dashboard c/ The "Quantity" box and Create Request button will not appear in requests
5/ a partner must have at least one of the three types of requests enabled. Enforce this.
Other considerations
This is likely going to require some changes to user-facing documentation -- ours and the banks.
Criteria for completion
- [ ] tests for all the changes created and pass
- [ ] existing tests modified as appropriate
- [ ] migrations for fields added to organization and partner_profile records supporting this functionality with defaults as described above
- [ ] ability to enable/disable quantity-based requests added to bank 'My organization"
- [ ] ability to enable/disable quantity-based requests added to partner profiles as above
- [ ] mandatpry to have at least one of quantity, child, and individual-based requests enabled
- [ ] dashboard behaviour as described above
- [ ] requests behaviour as described above