Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Allow Minus on “Minutes in Advance Dine in Close”

Description / Background

Some restaurants are implementing the “Minutes in Advance Dine in Close” feature. This feature serves to set the latest time users can make a reservation.

In some cases, restaurants want to allow users to make reservations even if they exceed the available schedule. the Minutes in Advance Dine in Close feature does not allow exceeding the available schedule. This poses a constraint as some users may wish to book last-minute slots or even exceed the available schedule.

This new feature allows the admin to set the Minutes in Advance Dine in Close setting to a negative value. This setting allows the user to book even if the booking time has already started.

Glossary

https://app.clickup.com/9003122396/docs/8ca1fpw-35796/8ca1fpw-41516

Objectives

  • Admin can set negative number on Minutes in Advance Dine in Close
  • User can see new alert This outlet allows you to book xx minutes past the start dining time. However the starting dining time count will start based on selected time if the restaurant set the Minutes in Advance Dine in Close with negative number
  • User can see the old alert
  • User can book even if the time is already in the past, with a time limitation set by Minutes in Advance Dine in Close
  • User can see the number Minutes in Advance Dine in Close on alert
  • The user can see the Minutes in Advance Dine in Close value displayed in one of four formats: minutes, hours, days, or weeks:
    • number < 60 = minutes
    • number > 60 = hour
    • number > 1440 = days
    • number > 10080 = week
    • number > 43800 = month
  • If admin input -15 on Minutes in Advance Dine in Close

Seat available 4 PM, Now 4.05 PM

The user can still book the table for 4 pm until the clock is 4.15 pm because the restaurant has added -15 to “minutes in advance” so it gives the user more time to book the table.

  • If admin input 15 on Minutes in Advance Dine in Close

Seat available 4 PM, Now 4.05 PM

Users cannot book a table for 4 pm. With this setting, users can book a table for 4 pm with a maximum booking time of 3.45 pm.

Scope

  • Edit restaurant on Minutes in Advance Dine in Close param
  • New alert on time availability
  • User booking time (should be same as on admin)

Location

Admin Dashboard > Restaurant Settings > Minutes in Advance Dine in Close

Sequence Diagram / Flow

ERD

This feature does not require schema changes as it reuses the existing minutes_in_advance_dine_in_close field on the restaurant settings table, extending it to accept negative values.

Backend Implementation

  • Add default_max_dine_in_booking_cutoff_time on Admin Setting
  • Skip past time error when the restaurant use this feature
  • Add validation if the booking was made in the right booking time using allow minus booking time
  • Add Minutes in Advance Dine in Close on edit restaurant

https://github.com/hungryhub-team/hh-server/pull/5763

Frontend Implementation

See PR for details: -

PRD & Task

https://app.clickup.com/t/86cv7abh8

Design

Minutes in Advance Dine in Close Design

API Blueprint

This feature extends the existing restaurant settings API. No new endpoints are required.

New Query

N/A

DB Schema / Database Migration

-


Improvement:

-