'use strict'; import * as sol from "../../solight/sol.js"; import * as serv from "../services/service.js"; const html = htm.bind(preact.h); const person_row = (events, person) => html` ${sol.personName(person)} `; const persons_table = (events, persons) => { const ps = sol.sortPersonsByName(persons); return html`

Persons (${ps.length})

${ps.map(p => person_row(events, p))}
Name
`; }; const persons_overview = (schedule) => { const persons = sol.allPersons(schedule); const events = sol.allEvents(schedule); return html`

Schedule (v ${sol.scheduleVersion(schedule)})

${persons_table(events, persons)}`; }; const update_main_slide = (data, time) => { if (sol.defined(data.scheduleData)) { const schedule = data.scheduleData; const inner = html` ${persons_overview(schedule)}`; // Add main slide to info beamer const anchorElId = "main"; const el = document.getElementById(anchorElId); preact.render(inner, el); }; }; export { update_main_slide };