Repos that we’ll change
Whitelabel: https://github.com/rbilabs/intl-whitelabel-app
Task summary
Whitelabel:
Task 1: Adjust the extras modal quantity limit for the free item
Tasks breakdown
Task 1: Adjust the extras modal quantity limit for the free item
Rules:
The quantity limit should respect the following rule:
sum the free quantity limits from Sanity (looking into each menu item because we can have all the items at the same time depending on the case)
Respect the maximum limit that is configured on Sanity (the default is 9). Well always need to respect this limit:
Even if the sum is equal 10 and the limit is 9 the maximum will be 9
If the maximum was reached the “+” button will be disabled
PATH FOR THE SOLUTION
As the modal is already using the data from Sanity we’ll just need to develop this new logic for the limit
Create a new method to handle this
If we choose the creation of a new hook/context (task 7) perhaps we can catch this info from there and just use it on the modal when our flag is ON
DOD-LIKE
Respect all points from the Rules section
Implement new unit tests
Add Comment