feat(signage): new widgets (shape, scrolling text, countdown, opening hours, Wi-Fi, contact details); the venue's opening hours on the server, edited on the Schedule page

Shapes: rectangle, circle, triangle, polygon, star or own corners, fill or gradient,
border. Countdown: to a time every day or a date, from now / a span before / a set
time, in venue time (the slide shows what is left right now). Opening hours, Wi-Fi
(with a join-the-network code) and contact details read the venue's identity and
opening hours (GET/PUT /api/identity/hours; Schedule -> Opening hours, shaded on its
timeline); the editor warns with a link when they're missing. Plan 6R.15, F-112.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 13:24:54 +02:00
co-authored by Claude Opus 5.5
parent 2a38602d45
commit f26e51273c
22 changed files with 1002 additions and 46 deletions
+7 -1
View File
@@ -5,7 +5,7 @@ import {
customKeys, filterStaff, groupCounts, groupOf, staffBody, staffForm, staffProblems, validPin, zonesBody, zonesOf, zonesSummary,
} from '../src/pages/staff/staffLogic.js'
import {
addDays, clashWith, gridOf, hourMarks, hoursOf, inOpening, loadView, overlaps, placeOnDay, saveView, shiftState, weekDays, weekStartOf, weekTotals,
addDays, clashWith, gridOf, hourMarks, hoursOf, hoursValid, inOpening, inSpans, loadView, overlaps, placeOnDay, saveView, shiftState, weekDays, weekStartOf, weekTotals,
} from '../src/pages/schedule/scheduleLogic.js'
const staff = [
@@ -79,6 +79,12 @@ test('shifts: hours past midnight, clashes, the grid, states, totals, the timeli
assert.equal(hourMarks(22)[2], 0)
assert.equal(inOpening(23, '18:00', '02:00'), true)
assert.equal(inOpening(3, '18:00', '02:00'), false)
// the venue's hours, several spans a day (6R.15)
assert.equal(inSpans(13, [{ from: '12:00', to: '15:00' }, { from: '18:00', to: '23:00' }]), true)
assert.equal(inSpans(16, [{ from: '12:00', to: '15:00' }, { from: '18:00', to: '23:00' }]), false)
assert.equal(inSpans(10, undefined), false)
assert.equal(hoursValid([[{ from: '12:00', to: '15:00' }], []]), true)
assert.equal(hoursValid([[{ from: '12:00', to: '' }]]), false)
})
test('the view settings stay in this browser and survive a broken store', () => {