feat(manager): customer display looks: several, a default, one per display; pictures from the library (platform-v2 step 5.3)

Settings → Customer display lists the looks (default starred, how many
displays each), edits one (logo / picture with MediaField, the slideshow's
pictures picked several at a time, reordered, removed), new look (empty or a
copy), make default, delete, and "Which display shows which look". The Devices
page offers the looks for a display's Idle screen. MediaPicker: `multiple`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 17:50:52 +02:00
co-authored by Claude Opus 5.5
parent 27d7bbb976
commit 6d84e43330
7 changed files with 343 additions and 160 deletions
@@ -85,8 +85,9 @@ export function configGroups(fields = []) {
return out
}
/** Options of a `ref` field: prep zones, categories, printers, or live devices of one app ("devices:<app>"). */
export function refOptions(field, { zones = [], categories = [], printers = [], devices = [], selfId = null } = {}) {
/** Options of a `ref` field: prep zones, categories, printers, customer display looks, or live devices of one app ("devices:<app>"). */
export function refOptions(field, { zones = [], categories = [], printers = [], looks = [], devices = [], selfId = null } = {}) {
if (field.choices_from === 'display_looks') return looks.map(l => ({ value: String(l.id), label: l.name }))
if (field.choices_from === 'prep_zones') return zones.map(z => ({ value: String(z.id), label: z.name }))
if (field.choices_from === 'categories') return categories.map(c => ({ value: String(c.id), label: c.name }))
if (field.choices_from === 'printers') return printers.filter(p => p.is_active !== false).map(p => ({ value: String(p.id), label: p.name }))