accept price 0
This commit is contained in:
parent
4f898054ff
commit
b81379432b
@ -90,7 +90,7 @@ const ShoppingEventForm: React.FC = () => {
|
||||
};
|
||||
|
||||
const addGroceryToEvent = () => {
|
||||
if (newGroceryItem.grocery_id > 0 && newGroceryItem.amount > 0 && newGroceryItem.price > 0) {
|
||||
if (newGroceryItem.grocery_id > 0 && newGroceryItem.amount > 0 && newGroceryItem.price >= 0) {
|
||||
setSelectedGroceries([...selectedGroceries, { ...newGroceryItem }]);
|
||||
setNewGroceryItem({ grocery_id: 0, amount: 1, price: 0 });
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user