Skip to main content

FulfilmentMethodHandler

A routing component that determines and renders the correct fulfillment flow (delivery, table-side, room service) based on the ordering session’s fulfillment method.

Preview

View in Storybook

Import

import { FulfilmentMethodHandler } from '@/components/FulfilmentMethodHandler'

Usage

<FulfilmentMethodHandler
  orderingSession={session}
  onFulfillmentComplete={handleFulfillmentSet}
/>

Props

orderingSession
OrderingSession
required
The current ordering session containing the selected fulfillment method.
onFulfillmentComplete
(details: FulfillmentDetails) => void
required
Callback fired when fulfillment details are confirmed by the customer.

Behavior

  • Reads the fulfillment method from the ordering session
  • Renders Delivery, TableSide, or RoomService sub-component accordingly
  • Falls back to pickup if no specific method is set
  • Passes collected details (address, table number, room number) up via callback