PCO Plan 1.7.0: a Teams tile — who is scheduled, with photos
The module now offers two tiles in the + picker, Plan and Teams, sharing the one Planning Center connection and the one poll. Teams draws the current plan's team and position assignments: each team as a band of its people, with the person's photo, their position and a dot for confirmed / unconfirmed / declined. Photos are proxied and cached by the module (GET /team-avatar/<planPersonId>) so no browser ever talks to Planning Center; a person with no photo gets their initials. Everything shown is the tile's own choice, so two tiles can differ: - Teams and Positions — a switch per team and per position, all on until someone flips one (GET /teams, GET /positions feed the lists) - Colours — a picker for the team headers, or Tint teams to give each its own, optionally carried into the rows, plus the header fade and pickers for the three statuses - Show — twelve switches (top bar, team headers and counts, avatars, positions, group by position, status, notes, declined and unconfirmed people, teams nobody is on, columns) Server: team_members?include=team,person rides a slow lane (re-read on a plan change, else at most once a minute) and can never fail the plan read — a lost roster keeps the last good one and says so. The service type's own team list is read too, cached ten minutes: Planning Center only returns a team once somebody is scheduled on it, so that list is the only way to show a team nobody has signed up for. No shell changes: picker entries carrying their own instanceSchema, the colour field and multiselects all already exist. tools/pco-mock.js grows team_members, the service type's teams and stand-in avatar images, including a declined person, people with no photo and a team nobody is on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8ca88ba10b
commit
6d0f8828c1
@@ -1,5 +1,9 @@
|
||||
/* PCO Plan — client part.
|
||||
|
||||
The module presents two tiles and this is the entry for both: the Teams
|
||||
tile (picker entry "teams") is built by teams-client.js, everything below
|
||||
draws the Plan tile.
|
||||
|
||||
The server part reads Planning Center and (optionally) follows the
|
||||
ProPresenter module's live item; this tile only renders the plan it is
|
||||
streamed. What is shown is this tile's own choice (gear menu →
|
||||
@@ -8,6 +12,8 @@
|
||||
(saved with the tile, 14 px until someone presses one); /admin only holds
|
||||
the connection settings. */
|
||||
|
||||
import createTeams from "./teams-client.js";
|
||||
|
||||
const REFRESH_SVG = '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-2.64-6.36"/><path d="M21 3v6h-6"/></svg>';
|
||||
|
||||
/* the text-size buttons: a drawn − and + at the icon size, like every other header icon */
|
||||
@@ -15,6 +21,12 @@ const MINUS_SVG = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" st
|
||||
const PLUS_SVG = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>';
|
||||
|
||||
export default function create({ root, moduleApi }) {
|
||||
// Tiles added as "Teams" carry that variant and have their own settings.
|
||||
if (moduleApi.variant === "teams") return createTeams({ root, moduleApi });
|
||||
return createPlan({ root, moduleApi });
|
||||
}
|
||||
|
||||
function createPlan({ root, moduleApi }) {
|
||||
let state = null;
|
||||
let skew = 0; // server clock − local clock, ms
|
||||
let feedOffline = false;
|
||||
|
||||
Reference in New Issue
Block a user