KiOui / TOSTI

Tartarus Order System for Take-away Items
https://tosti.science.ru.nl/
MIT License
11 stars 1 forks source link

explitictly unset prioritize on deprioritizing #531

Closed mark-boute closed 8 months ago

mark-boute commented 9 months ago

closes #525 Make sure that the prioritize flag is unset on de-prioritizing.

mark-boute commented 9 months ago

@KiOui any idea why this is not unsetting the flag currently? I am stuck

KiOui commented 9 months ago

@KiOui any idea why this is not unsetting the flag currently? I am stuck

The OrderSerializer has the prioritize field as read-only. It should be altered in such a way that deprioritize overrules prioritize. I think we have three options here:

JobDoesburg commented 9 months ago

For me, this is a frontend thingy. There's nothing wrong with both prioritize and deprioritize flags set in principle. It's just not the behavior people expect if they hit the button. So keep it in the API / serializer

KiOui commented 9 months ago

I don't agree with you on that point. It's weird to have an order that both has priority and does not have priority. So I think migrating this to just one field that can either be prioritized, normal or deprioritized is the best option.

KiOui commented 8 months ago

This has been fixed in #534