Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Repos that we’ll change

Whitelabel: https://github.com/rbilabs/intl-whitelabel-app

Figma: https://www.figma.com/file/sfH3mHXoEUfHbm5qMul0Vn/branch/VNb1dzeeYVV0IphMPJo0lt/Popeyes?type=design&node-id=3189-125398&t=b8GDYgoS6YtWAr0K-0


Solution overview

We’ll extend the “AddOn section” (that we already use for the “Bag with Handles” solution) and add there the new logic to handle add-on free items.

 


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

  • No labels