Skip to content

Logic: App On Demand Widget

Vincent Cardillo edited this page Jan 14, 2016 · 1 revision

Examples:

Time: 9:30am
(gray) Today's Lunch             ASAP
Opening at 11am for on-demand service (View Menu Btn)
-------
All avalable OA options (including today's lunch)


Time: 10:00am
(gray) Today's Lunch             ASAP
Opening at 11am for on-demand service (View Menu Btn)
-------
All avalable OA options (starting with today's dinner)


Time: 11:00am
(selected) Today's Lunch             ASAP
Available now for on-demand service 
-------
All avalable OA options (starting with today's dinner)


Time: 10:05pm
(gray) Tomorrow's Lunch             ASAP
Opening {tomorrow/day} at 11am for on-demand service 
-------
All avalable OA options (starting with tomorrow's lunch)

Notes:

  • Always include store state as a field
  • {cmt} = MaitreD->determineCurrentMealType
  • UM = Upcoming Menus Definition
Are we open?
Yes: The widget is selected, title="Today's {cmt}", text="Now Available", and the current meal menu to use is {cmt}, and we can safely use the UM
No: The widget is NOT selected (gray)
    IF soldout: "{Sold out text}"
    ELSE:
        -> Is there an ULM for today? (account for buffer time)
            Yes: title="Today's {LM MealType}", text="Opening at timenow()+5mins for on-demand service"
            No: Is there a /menu/next menu?
                Yes: title="{Day's} {Meal}", text="Opening tomorrow/{day} at {startTime}"
                No: OD is not available at all, and the OD widget is NULL.

Upcoming Menus Definition: OD Menus for today, where the menu's startTime is greater than the current time, order by startTime ASC

Upcoming Late Menu Definition: OD Menus for today, where the menu's startTime+bufferMins is greater than the current time, order by startTime ASC Get the first one

Clone this wiki locally