*** **WIP **** *****
Neste documento pretendemos explicar o funcionamento e as regras de negócio para funcionar corretamente o restaurante fechado para o serviço de entrega e para o atendimento com intervalo em um restaurante com 2 períodos de trabalho no dia.
*Restaurante fechado para entrega
Quando há um restaurante com horário fechado para entrega ele deve retornar essa informação do back-end, informando que o restaurante esta no status fechado e qual é o próximo horário de abertura.
...
Table of Contents |
---|
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
Ambas devem estar habilitadas ou desabilitadas para não gerar problemas de sincronismo.
Restaurante com dois horários de funcionamento
Na RBIberia tem alguns restaurantes que usam dois horários de funcionamento para o dia, por exemplo:
...
Como pode ver no “Operation break” o restaurante estará fechado das 19h até as 21h, caso a flag esteja ligada, se a flag for desligada esse intervalo deve ser desconsiderado e deve funcionar das 8h as 23:59 sem intervalo.
Isso é controlado no Sanity então o back-end e o front-end vão olhar para ele para encontrar esse horário.
No back-end nós temos uma feature flag para controlar issoBoth 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
Da mesma forma essa flag tem q estar ativa apenas para determinados mercados como ES e PT.
No front end a exibição desse período com intervalo tem outra 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.
...