Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 6 Next »

Questions:

  •  N/D

Technical Refinement

Description

This activity should be considered a solution to Highlight current day to restaurants that close after midnight.

For example:

A restaurant with the following date:

Open → 10 am

Closes → 2 am

 

In this case, 2 am should be considered the next day at 2 am closing of the restaurant.

The period of this restaurant is CLOSED from 2 am to 10 am.

  • intl-whitelabel-app

    • TASK 1— Change the component rule to status

      • path: intl-whitelabel-app/workspaces/frontend/src/components/store-status/hooks/use-store-status.ts

      • We will create a feature flag: enable-close-hours-status-after-midnight

      • We will have to change the component rule to consider the closing time after midnight

        • The idea is:

          • When the close hours are less than the open hours, we will add on close hours, 1 day.

          • Currently:

            • open: 10 am (2024/01/01)

            • close: 2 am (2024/01/01)

          • After the change, will be:

            • open: 10 am (2024/01/01)

            • close: 2 am (2024/01/02)

      • The change will be on hook: useStoreStatus on method: getStoreStatus, before if’s.

      • Task objectives (DOD-like):

        • Don’t impact the rules current status

        • The status should follow the same rules from other flows of “normal hours”.

          • Closed Today

          • Closes at hh:mm(60 min before)

          • Open at hh:mm(60 min before)

          • Open now

          • Closed now

Screenshots

  • N/A

POC

closeDate = closeDate < openDate ? add(closeDate, { days: 1 }) : closeDate;

Impact Analysis

  • Currently highlight

Dependencies

  • N/A

Unit Test

  • N/A

  • N/A

  • No labels