hotwax / available-to-promise

HotWax Commerce Threshold Management App
https://threshold-management.hotwax.io
Apache License 2.0
4 stars 21 forks source link

User can save inventory rule with empty facility group and channel selections #315

Closed Adameddy26 closed 1 month ago

Adameddy26 commented 2 months ago

Expected behavior

The system should enforce at least one facility group or channel selection when creating a new inventory rule. When a user attempts to save the rule with no selections, a validation message should be displayed, preventing them from saving an empty rule.

Steps to reproduce the issue

Navigate to Threshold/Safety Stock/Shipping/Store Pickup section of ATP App after successful login. Click "Create New Rule" button to initiate rule creation. Add Facility Group(s): Select one or more facility groups from the available options. Add Channel(s): Select one or more channels from the available options. Complete any other required fields. Attempt to Save the Rule. Click the "Save" button. In the card list, open the selected facilities/channels modal. Select clear all option and then save the changes to observe the issue.

Environment details

App version: Threshold-2.0-85939b3 App environment: DEV

Additional information

https://jam.dev/c/8359fac3-ae7e-4fe5-9443-8af30e988ef9

amansinghbais commented 2 months ago

The flow of rule updation has been changed i.e., we are opening create rule page for updating rule. Hence the above issue is fixed in that flow.

PR link: https://github.com/hotwax/threshold-management/pull/316