Skip to end of metadata
Go to start of metadata

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

Compare with Current View Version History

« Previous Version 5 Next »

Problem

When the user to search a restaurant on Whitelabel in Delivery mode, the system gives a restaurant available for delivery.

But in case of this restaurant is closed, the system show error for restaurant is unavailable, the same message in case not have delivery in this address.

This cause problems for users, because show de wrong message, the correct message is the restaurant is closed at this moment but have a delivery in this address.

Proposal of Solution

Show a message informing the user that restaurant is closed, but open at X hours.

Currently, the system check if the restaurant is open, but this verification is bad, because only validate if it is open, case restaurant is open show information and set the restaurant to make orders, but in case of restaurant closed, so don’t send information for system and the show wrong message.

Technical Problem

The front-end get this information in this file: src/components/address-modal/index.tsx

And user this function useEffect for get results of delivery:

The const deliveryRestaurantData in line 529 have the data about the restaurant, and this information comes in a delivery query of GraphQl useDeliveryRestaurantLazyQuery:

Use this query of GraphQl:

On repository of intl-whitelabel-graphql has this query:

File: src/functions/graphql/resolvers/restaurant.ts

  • No labels