Repos that we’ll change
...
Motivation: the client wants to control freely the number of items. This will solve other business problems.
Label: Quantity of free add-ons
Description: (to be defined)
PATH FOR THE SOLUTION
As we’ll have other options we’ll have something equal to the original options (with different names)
The original option is referenced in the document using the schema for the options. We’ll need to do the same thing here
We’ll create our new fragment/object in the
src/schemas/menu/objects
...
Motivation: configure the add-ons free modal. The fieldset will help with the organization to group the fields
Label: (to be defined)
Description: (to be defined)
Rules:
The fieldset should not be collapsed when appears (DOC)
All fields should be children of the fieldset
The fieldset should only be visible if the toggle for add-on free items is ON
...
Modal toggle (to show/hide on the Whitelabel App):
Label: (to be defined)
Description: (to be defined)
Modal title field
Label: (to be defined)
Description: (to be defined)
Modal description field
Label: (to be defined)
Description: (to be defined)
Modal primary button field
Label: (to be defined)
Description: (to be defined)
Rules:
If the toggle is ON
The title and primary button should be filled in and are required. This is needed to prevent the user from publishing the document and to not show an empty modal on the Whitelabel App
Description and image fields are optional
...
Task 4: Add a description on the AddOnsItemsContainer section for the addon-free items
...
...
Rules:
If the add-on free toggle is ON we’ll show the description in the section
PATH FOR THE SOLUTION
This text will be fixed on the code but concatenated with the dynamic info. Example:
Code Block language typescript `You can add up to ${quantityFromSanity} extra ${item.name} for your order. Additional ${item.name} will cost ${item.price}`
OBS: this is only an example and will not be exactly this.
This change new feature will be made inside the AddOnsItemsContainer
DOD-LIKE
Respect all points from the Rules section
The styles should be as Figma
Implement the unit tests
Validate in web and native