hotwax / available-to-promise

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

Issue with Order Fulfillment Capacity Input Validation in Shipping Facility Tab #332

Open Adameddy26 opened 2 months ago

Adameddy26 commented 2 months ago

Expected behavior

The input field should be blank when switching from 'No capacity' to 'custom' option, and upon saving, it should validate values correctly, prompting appropriate toast messages.

Steps to reproduce the issue

Navigate to the Shipping Facility tab. Choose 'No capacity' option for order fulfillment capacity of a facility. Switch to 'custom' option for the same. Observe '0' displayed in the modal instead of a blank value. Attempt to save with '0' as the input. Note the toast message: "Please provide a value." Rewrite '0' in the same field. Attempt to save again. Note the toast message: "Please provide a value greater than 0".

Environment details

App version : THRESHOLD-2.0-2C00FE9 App environment : DEV

Additional information

https://jam.dev/c/5de9497d-8a54-4be5-8805-18833f4f513a

amansinghbais commented 4 days ago

Based on discussion, we'll be showing blank input when limit is set to unlimited, while we will be showing 0 as prefilled when maxOrderLimit is set to no capacity.