rubyforgood / human-essentials

Human Essentials is an inventory management system for diaper, incontinence, and period-supply banks. It supports them in distributing to partners, tracking inventory, and reporting stats and analytics.
https://humanessentials.app
MIT License
436 stars 449 forks source link

[PACKS] # 1 Add custom request units at organizational level #4396

Open cielf opened 3 weeks ago

cielf commented 3 weeks ago

Summary

Add custom request units at organizational level (requires PACKS #0 completion first)

Why

This is step #1 of adding the ability to specify "packs" versus "units" for requests

Details

Add custom request units used to the organization, on both edit and show.

Prompts, fields and buttons for edit:

Custom request units used (please use singular form -- e.g. pack, not packs) :
Custom request unit : [text field] [Remove]
[+Add another unit]

For show:

Custom request units used:
list the units, one to a line none, if no units selected

Rules: Can not be duplicated within the organization Can not be removed if any items are using the unit.

These will be used as the basis for allowing customized units on specific items.

N.B.

All of the UI changes for PACKS must be implemented behind a flipper flag "enable_packs"

Screen hint for organization edit placement

Image

Screen hint for organization view

Image

Note from dev discussion

It's not problematic to remove a unit that has previously been active for item (and used in requests). The restriction in the Rules section above is only for units that are currently active on an item.

Criteria for completion

Background

The following sections have been identified as required for the PACKS implementation. These should be implemented in numerical order. The pre-work [PACKS #0] must be completed first.

Image

Eccatoe commented 3 weeks ago

I can take this one 👍