/
Documentation

Documentation

In this document, we intend to explain the operation and business rules and feature flags to correctly operate a restaurant closed for delivery service and for service with breaks in a restaurant with 2 working periods per day.

Restaurant closed for delivery

When there is a restaurant with closed delivery hours, it must return this information from the back-end, informing that the restaurant is in closed status and what the next opening time is.

To control this, we have a feature flag on the Front-end and Back-end.

Front:

delivery-closed-at-moment

Back:

delivery-closed-at-moment

Both must be enabled or disabled to avoid synchronization problems.

 

Restaurant with two opening hours

In RBIberia there are some restaurants that use two opening hours for the day, for example:

As you can see in the “Operation break” the restaurant will be closed from 7pm until 9pm, if the flag is on, if the flag is turned off this interval must be disregarded, and it must operate from 8am to 11:59pm without a break.

This is controlled in Sanity, so the backend and frontend will look at it to find this time.

On the backend, we have a feature flag to control this:

enable-additional-time-slot

Likewise, this flag must only be active for certain markets, such as ES and PT.

On the front end, the display of this period with an interval has another flag:

highlight-breaking-time-slot

This flag is used at several points, because in the back-end there are several repositories, where it needs to be validated in the delivery-service and packages to validate the opening hours of the in-house restaurants and also in the partners, so we need to add the flag in intl-partner-delivery.

This is the flow between repositories that use the feature flags per repository.

 

 

 

Related content

Acceptance Criteria
Acceptance Criteria
Read with this
Additional delivery Breaking Time hours
Additional delivery Breaking Time hours
More like this
Refinement
Read with this
Feature "Break time" - 2 time slot for delivery service
Feature "Break time" - 2 time slot for delivery service
More like this
Tech Refinement - Cross Brand
Tech Refinement - Cross Brand
Read with this
War Room BK ES Flags
War Room BK ES Flags
More like this