foodcoopsat / foodsoft_hackathon

Other
1 stars 2 forks source link

Order menu: Color highlighting / missing amount don't work properly in some cases #52

Closed twothreenine closed 6 months ago

twothreenine commented 6 months ago

I'd expect the following behavior: (= current behavior on upstream)

Alternatively, you could also expect: (my suggestion)

Behavior in FS one:

Bread:

Bread rolls:

Beer:

Oyster mushrooms:

lentschi commented 6 months ago

@twothreenine It's true, there were some bugs in that, which I now fixed. However a small deviation from your suggestion: I use group_order_granularity instead of the hardcoded value of 1 as a threshold to determine, whether the background turns red or yellow. (After all the +/- buttons also use that.)

twothreenine commented 6 months ago

I use group_order_granularity instead of the hardcoded value of 1 as a threshold to determine, whether the background turns red or yellow. (After all the +/- buttons also use that.)

Hmm, so if the external order unit is 25 kg and the internal one is 0.001 kg, then it turns yellow only at 24.999 ?

However, if the external order unit is package (0.75 kg) and the internal order unit is 0.05 kg, then it would make more sense to let it turn yellow at 0.70 kg than having it always yellow. 🤔