feat: sync GridSmart agendas and use event-relative demo time
Support script and URL sources, automatic Sessionize polling, staff-linked service sessions, chronological agenda blocks, and inline Placeholders. Fix demo mode to use the active event date and document deployed behavior with regression coverage.
This commit is contained in:
1 parent
40f24cf5f7
commit
c0fbf495dc
27 files changed
+1215
-60
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { getActiveEvent, getAgenda, groupAgenda } from './api';
|
||||
import { DEFAULT_NOW } from './time';
|
||||
import { demoNow } from './time';
|
||||
import type { Event, Session, Slot } from './types';
|
||||
|
||||
export interface EventData {
|
||||
@@ -53,7 +53,7 @@ export function useEvent(): EventData {
|
||||
// The event's `use_realtime_clock` flag decides the clock: the real system
|
||||
// time, or the simulated mid-event clock (so the demo always looks live).
|
||||
const clockMode: 'simulated' | 'realtime' = event?.use_realtime_clock ? 'realtime' : 'simulated';
|
||||
const now = clockMode === 'realtime' ? new Date() : DEFAULT_NOW;
|
||||
const now = clockMode === 'simulated' && event ? demoNow(event.start_date) : new Date();
|
||||
|
||||
return {
|
||||
event,
|
||||
|
||||
Reference in new issue
Block a user