mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Initialise valid quantities when choosing OCs
Line items were initialised with undefined quantities which makes it impossible to distinguish between the initial unset quantity and a user entering an invalid quantity. When a user changed order cycles, all quantities are reset and the UI displayed the quantity modifier buttons instead of the Add button. Initialising with the valid quantity 0 helps us to display the Add button in that situation.
This commit is contained in:
@@ -23,5 +23,5 @@ Darkswarm.factory 'Variants', ->
|
||||
|
||||
lineItemFor: (variant) ->
|
||||
variant: variant
|
||||
quantity: null
|
||||
max_quantity: null
|
||||
quantity: 0
|
||||
max_quantity: 0
|
||||
|
||||
Reference in New Issue
Block a user