openfoodnetwork
openfoodnetwork copied to clipboard
[Admin][Fees] Wrong behavior when creating fees
Description
You access the fee page through an enterprise settings. You are directed to the page corresponding to this enterprise: admin/enterprise_fees?enterprise_id=3949 It displays only this enterprise fees, you don't see other enterprises fees.
The problem is that you can still choose another enterprise, create the fee and click "update" - but nothing will happen (on this page...but the fee was actually created behind the scenes).
Expected Behavior
The url should be to: admin/enterprise_fees to be able to manage all fees in the same place (as it's the case for permissions) Or The url remains the specific enterprise page, but the user must not be able to create fees for other enterprises.
Actual Behavior
In the fees creation page, you can only see fees for the specific enterprise you chose. But you can still create fees for another enterprise. As it won't appear when you click "update", you think you created nothing. But in fact, the fee has been created with a value equal to 0 as you weren't able to edit it.
Steps to Reproduce
- Click on Enterprises > Settings > Enterprise Fee > Manage enterprise fee
- Choose another enterprise in the dropdown list, fill in the fields and click "Update". Nothing happens
- Change url to: admin/enterprise_fees (remove the last part)
Animated Gif/Screenshot
1
2
3
Workaround
Create enterprise fee from a specific enterprise settings
Severity
bug-s3: a feature is broken but there is a workaround