...
Validate if the items purchased have a refill drink and if this store gives a refill drink.
When finish the order, the system needs to get information of sanity about items, stores, duration, service modes available to create and display QRCode. So at this moment we need to create a new logic for iterate these items, similar items free.
This new logic can be created in the hook src/hooks/use-feature-qrcode-refill-drinks/use-feature-qrcode-refill-drinks.ts
DOD-LIKE
Validate if items purchased have can generate a QRCode
have a store;
have an item available;
have a service mode;
Create a unit tests
Task 3 - Create a new request for backend “intl-whitelabel-graphql” - GetRefillDrinkQRCode (Request GraphQL implementation)
We need to create new request for back-end, case the system have an item purchased available for get a refill drink, so we must call the back-end to generate a QRCode.
The new request can call of GetRefillDrinkQRCode
Create a new query in src/queries/rbi/ with parameters storeId, transactionId, transactionDatetime. These parameters we can get of getOrder response.
...
Run
apollo:generate
Create a function GetRefillDrinkQRCode in the hook of refill drink and use the new function
DOD-LIKE