Real-time clock toggle: per-event use_realtime_clock flag
- Migration 20260834000000: events.use_realtime_clock (boolean, default false) - Admin: Real-time clock toggle in the Events create/edit modal - Convivo: useEvent picks new Date() vs simulated DEFAULT_NOW from the flag; Home shows a 'Demo clock' badge only in simulated mode - Docs: app-structure, admin-app, schema, next-steps
This commit is contained in:
1 parent
a5ad9795ee
commit
5ac0aa3f57
11 files changed
+113
-23
No files matched your search
@@ -174,6 +174,7 @@ function EventModal({
|
||||
const [endDate, setEndDate] = useState(event ? event.end_date.slice(0, 10) : '');
|
||||
const [location, setLocation] = useState(event?.location ?? '');
|
||||
const [endpoint, setEndpoint] = useState(event?.sessionize_endpoint ?? '');
|
||||
const [realtimeClock, setRealtimeClock] = useState(event?.use_realtime_clock ?? false);
|
||||
const [busy, setBusy] = useState(false);
|
||||
|
||||
async function save() {
|
||||
@@ -186,6 +187,7 @@ function EventModal({
|
||||
end_date: endDate,
|
||||
location: location.trim() || null,
|
||||
sessionize_endpoint: endpoint.trim() || null,
|
||||
use_realtime_clock: realtimeClock,
|
||||
});
|
||||
onSaved(event ? 'Event updated' : 'Event created');
|
||||
} catch (e) {
|
||||
@@ -242,6 +244,19 @@ function EventModal({
|
||||
“Run sync” button. You can also import the .xlsx export in the Interfaces menu.
|
||||
</div>
|
||||
</div>
|
||||
<div className="field">
|
||||
<div className="row between" style={{ alignItems: 'center' }}>
|
||||
<div>
|
||||
<label>Real-time clock</label>
|
||||
<div className="muted small" style={{ marginTop: 2 }}>
|
||||
{realtimeClock
|
||||
? 'The app uses the real system clock for Live/Next/Done.'
|
||||
: 'The app uses a simulated mid-event clock (demo always looks live).'}
|
||||
</div>
|
||||
</div>
|
||||
<Toggle checked={realtimeClock} onChange={setRealtimeClock} label={realtimeClock ? 'On' : 'Off'} />
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user