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
464 stars 493 forks source link

quota on partner should be restricted to non-negative. #4657

Closed cielf closed 1 month ago

cielf commented 2 months ago

Summary

The quota on partners should be restricted to non-negative

Why?

Any negative number would be an obvious mistake, as this is the number of items they can request per request.

Details

Recreation

login in as org_admin1@example.com From the left hand menu: Partner Agencies | All Partners click on a Partner, then on "Edit Partner Information" Enter a negative number in quota, then "Update Partner". It saves. It should, instead give an error message indicating that the quota has to be at least 0.

Criteria for completion

italomatos commented 2 months ago

hey @cielf can I do this?

cielf commented 2 months ago

Go ahead.

italomatos commented 2 months ago

https://github.com/rubyforgood/human-essentials/pull/4658

🚀🚀