create-pmos 0.265.0 → 0.267.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-board-test.js +1 -1
- package/workspace/briefing-premium-calendar-2-test.js +231 -0
- package/workspace/guide/briefing-premium.md +9 -2
- package/workspace/lib/board-premium.js +29 -3
- package/workspace/lib/initiative-premium.js +8 -0
- package/workspace/lib/routes-board-premium.js +15 -4
- package/workspace/lib/routes-initiative-premium.js +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +209 -0
- package/workspace/public/pm/premium-acts.js +281 -0
- package/workspace/public/pm/premium-board.js +36 -7
- package/workspace/public/pm/premium-initiative.js +9 -2
- package/workspace/public/pm/premium-meeting.js +160 -22
- package/workspace/public/pm/premium.css +29 -0
- package/workspace/public/premium-board.html +3 -2
- package/workspace/public/premium-initiative.html +1 -1
- package/workspace/test-files.json +2 -0
- package/workspace/test-lists/briefing-premium.json +2 -0
- package/workspace/test-lists/premium-board-actions.json +9 -0
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
/* pm/premium-board.js — the premium Board page (initiative briefing-premium-board, slice 5). Reads GET /api/board-premium and draws the model
|
|
2
2
|
* lib/board-premium.js builds from the routes the production Initiatives page reads: the Initiatives card (List, By stage, Timeline), the Sprint and
|
|
3
|
-
* Coming up cards, Core documents, the dock and the standard dialog. The
|
|
4
|
-
*
|
|
3
|
+
* Coming up cards, Core documents, the dock and the standard dialog. The presses are Draft it on a core document, through POST /api/core-docs/draft,
|
|
4
|
+
* and the board's own presses of pm/premium-acts.js (initiative premium-board-actions): the New asks card, New initiative, and a row's menu (move,
|
|
5
|
+
* hold, cancel, archive and their Undo). Nothing here issues a document. */
|
|
5
6
|
import { pmPost } from './http.js';
|
|
6
7
|
import { $, $$, esc, openDlg, closeDlg, toast, loadThread, onScroll, wireRail, logHtml, turnA, ptx, pillOf, CHECK, store, crumbHtml, wireCrumb, kv, H, openAddDoc } from './premium-shell.js';
|
|
8
|
+
import { dotsBtn, openMenu, closeMenu, menuKey, asksHtml, onAsks, openIniForm } from './premium-acts.js';
|
|
7
9
|
|
|
8
10
|
const MODE_KEY = 'pmos.premium.openAs';
|
|
9
11
|
let M = null; // the model
|
|
10
12
|
let view = 'list';
|
|
11
13
|
let shown = 25; // rows of the list on screen
|
|
12
14
|
let readTimer = null;
|
|
15
|
+
let showGone = false; // the cancelled and archived rows under the list
|
|
13
16
|
wireRail('init');
|
|
17
|
+
/** The context of the board presses (pm/premium-acts.js). */
|
|
18
|
+
const ctxOf = () => ({ ws: M.board.ws, board: M.board.id, boardName: M.board.name, self: M.board.self, first: (M.board.stages || [])[0] || '', reload: load });
|
|
14
19
|
const ICO = (p) => `<svg class="i" viewBox="0 0 24 24">${p}</svg>`;
|
|
15
20
|
const DOCI = '<path d="M6 3h9l4 4v14H6z"/><path d="M14 3v5h5M9 13h6M9 17h4"/>';
|
|
16
21
|
const STATE_ICO = { Linked: '<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>', Live: '<path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/>', 'Up to date': '<path d="M5 12.5l4.5 4.5L19 7.5"/>', Draft: '<path d="M4 20l4-1 11-11-3-3L5 16z"/>', 'Not started': '<circle cx="12" cy="12" r="9"/><path d="M12 8v5M12 16.5v.5"/>', Stale: '<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>', Due: '<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>' };
|
|
@@ -32,13 +37,22 @@ function drawHead() {
|
|
|
32
37
|
/* ── initiatives ───────────────────────────────────────────────────────────────────────────────────────────── */
|
|
33
38
|
const sub = (r) => `${esc(r.sub)}${r.statusLabel ? ` · <span class="${r.late ? 'bad' : 'warn'}">${esc(r.statusLabel)}</span>` : ''}`;
|
|
34
39
|
function listRow(r, i) {
|
|
40
|
+
return `<div class="inirw">${listBtn(r)}${r.acts ? dotsBtn(r) : ''}</div>`;
|
|
41
|
+
}
|
|
42
|
+
function listBtn(r) {
|
|
35
43
|
return `<button class="ini2 ibi${r.first ? ' first' : ''}" data-key="${esc(r.key)}"><span class="it"><b>${esc(r.title)}${r.first ? '<em class="tgf">Do this first</em>' : ''}</b><small>${sub(r)}</small></span><span class="wst"><span class="sg2" aria-hidden="true">${r.seg.map((c) => `<i class="${c}"></i>`).join('')}</span><em>${esc(r.stage || 'No stage')}${r.stageNote ? ' · ' + esc(r.stageNote) : ''}</em></span><span class="pg">${r.progress == null ? '' : `<i><b style="width:${r.progress}%"></b></i>`}</span><span class="rl${r.over ? ' over' : ''}">${esc(r.finish)}</span></button>`;
|
|
36
44
|
}
|
|
37
45
|
function drawList() {
|
|
38
46
|
const L = M.initiatives.list.rows;
|
|
39
|
-
if (!L.length) return '<p class="empty3 plain">No initiatives are on this board\'s now view.</p>';
|
|
40
|
-
return `<div class="inih"><span>Initiative</span><span>Where it is</span><span>Progress</span><span>Planned finish</span></div>` + L.slice(0, shown).map(listRow).join('')
|
|
41
|
-
+ (L.length > shown ? `<p class="note" style="margin-top:10px">${L.length - shown} more are loaded. <button class="fold alt" id="more" type="button">Show ${Math.min(25, L.length - shown)} more</button></p>` : '');
|
|
47
|
+
if (!L.length) return '<p class="empty3 plain">No initiatives are on this board\'s now view.</p>' + goneHtml();
|
|
48
|
+
return `<div class="inih"><span>Initiative</span><span>Where it is</span><span>Progress</span><span>Planned finish</span></div><div class="inil">` + L.slice(0, shown).map(listRow).join('') + '</div>'
|
|
49
|
+
+ (L.length > shown ? `<p class="note" style="margin-top:10px">${L.length - shown} more are loaded. <button class="fold alt" id="more" type="button">Show ${Math.min(25, L.length - shown)} more</button></p>` : '') + goneHtml();
|
|
50
|
+
}
|
|
51
|
+
/** The cancelled and archived rows, under a fold (initiative premium-board-actions). Their menu offers Reopen or Restore. */
|
|
52
|
+
function goneHtml() {
|
|
53
|
+
const G = M.initiatives.gone || { cancelled: [], archived: [] }, nc = G.cancelled.length, na = G.archived.length;
|
|
54
|
+
if (!nc && !na) return '';
|
|
55
|
+
return `<div class="bagone"><button class="dlink" type="button" id="goneT" aria-expanded="${showGone}">${[nc ? nc + ' cancelled' : '', na ? na + ' archived' : ''].filter(Boolean).join(' · ')}. ${showGone ? 'Hide them' : 'Show them'}</button>${showGone ? `<div class="inil">${G.cancelled.concat(G.archived).map((r) => `<div class="inirw gone">${listBtn(r)}${dotsBtn(r)}</div>`).join('')}</div>` : ''}</div>`;
|
|
42
56
|
}
|
|
43
57
|
function drawStages() {
|
|
44
58
|
const S = M.initiatives.stages;
|
|
@@ -63,6 +77,8 @@ function drawInit() {
|
|
|
63
77
|
$('#ibTabs').addEventListener('click', (e) => { const b = e.target.closest('[data-v]'); if (!b) return; view = b.dataset.v; drawInit(); });
|
|
64
78
|
$('#ibBody').addEventListener('click', (e) => {
|
|
65
79
|
if (e.target.closest('#more')) { shown += 25; drawInit(); return; }
|
|
80
|
+
if (e.target.closest('#goneT')) { showGone = !showGone; drawInit(); const g = $('#goneT'); if (g) g.focus(); return; }
|
|
81
|
+
const im = e.target.closest('[data-im]'); if (im) { const r = rowOf(im.dataset.im); if (r) openMenu(im, ctxOf(), r); return; }
|
|
66
82
|
const b = e.target.closest('[data-key]'); if (b) openIni(rowOf(b.dataset.key));
|
|
67
83
|
});
|
|
68
84
|
/* A click opens the initiative page, as the mockup's Page setting does; the Popup setting opens the dialog. The choice is kept in this browser. */
|
|
@@ -137,6 +153,14 @@ $('#docBody').addEventListener('click', async (e) => {
|
|
|
137
153
|
|
|
138
154
|
$('#addDoc').onclick = () => openAddDoc({ ws: M.board.ws, scope: M.docs.scope, sub: M.board.name, onAdded: load });
|
|
139
155
|
|
|
156
|
+
/* ── new asks and New initiative (initiative premium-board-actions) ───────────────────────────────────────── */
|
|
157
|
+
function drawAsks() {
|
|
158
|
+
$('#asksHost').innerHTML = asksHtml(ctxOf(), M.asks);
|
|
159
|
+
$('#newIni').hidden = !!M.board.self || !M.board.id;
|
|
160
|
+
}
|
|
161
|
+
$('#asksHost').addEventListener('click', (e) => { if (M) onAsks(e, ctxOf(), M.asks); });
|
|
162
|
+
$('#newIni').onclick = () => { closeMenu(); openIniForm(ctxOf(), null); };
|
|
163
|
+
|
|
140
164
|
/* ── dock ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
141
165
|
function drawDock() { $('#dN').textContent = M.dock.needs; $('#dLab').textContent = M.dock.label; $('#dNext').innerHTML = M.dock.next ? `<i></i>First <b>${esc(M.dock.next)}</b>` : 'Nothing is late or at risk'; }
|
|
142
166
|
|
|
@@ -156,7 +180,12 @@ function openRow(r) {
|
|
|
156
180
|
$('#dBody').addEventListener('click', (e) => { const lt = e.target.closest('#logT'); if (lt) { const c = $('#alog').classList.toggle('col'); lt.setAttribute('aria-expanded', !c); } });
|
|
157
181
|
|
|
158
182
|
/* ── load: the routes derive the initiatives in the background, so the first answers are "reading" ───────────── */
|
|
159
|
-
function draw() {
|
|
183
|
+
function draw() {
|
|
184
|
+
const mk = menuKey(); closeMenu();
|
|
185
|
+
drawMode(); drawHead(); drawInit(); drawAsks(); drawSide(); drawDocs(); drawDock(); onScroll();
|
|
186
|
+
// a read that lands while a row's menu is open draws the row again: open its menu again, with what the row holds now
|
|
187
|
+
if (mk) { const b = $$('#ibBody [data-im]').find((x) => x.dataset.im === mk), r = rowOf(mk); if (b && r) openMenu(b, ctxOf(), r); }
|
|
188
|
+
}
|
|
160
189
|
async function load() {
|
|
161
190
|
const p = new URLSearchParams(location.search), q = [p.get('ws') ? 'ws=' + encodeURIComponent(p.get('ws')) : '', p.get('board') ? 'board=' + encodeURIComponent(p.get('board')) : ''].filter(Boolean).join('&');
|
|
162
191
|
let r = null, status = 0;
|
|
@@ -178,7 +207,7 @@ async function load() {
|
|
|
178
207
|
$('#brief').textContent = '';
|
|
179
208
|
const first = !M; M = r.model; draw();
|
|
180
209
|
if (first && M.board.ws) startMetrics(M.board.ws); // the Metrics card of a tenant's board reads apart from the board
|
|
181
|
-
if (M.docs.rows.some((d) => d.running)) setTimeout(load, 5000); // a core-document run is going: ask again until it ends
|
|
210
|
+
if (M.docs.rows.some((d) => d.running) || r.stale) setTimeout(load, r.stale ? 2000 : 5000); // a core-document run is going, or a press is still being derived: ask again // a core-document run is going: ask again until it ends
|
|
182
211
|
}
|
|
183
212
|
$('#brief').textContent = 'Reading the board.';
|
|
184
213
|
load();
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* model lib/initiative-premium.js builds from the routes the production Initiatives sheet reads: the overview and checks, the Tasks card (PRD requirements and
|
|
3
3
|
* the board's tracker items) and the Core documents card. A document row with a file opens the document sheet (Read, Edit, Proposals, Edit log, Health) in the
|
|
4
4
|
* standard dialog beside the read-only agent. The presses are Draft it (POST /api/core-docs/draft), the sheet's Save, Ask the agent, Accept and Reject (the
|
|
5
|
-
* existing /api/doc-sheet routes, initiative briefing-premium-doc-edit), Add a task and a task's status
|
|
5
|
+
* existing /api/doc-sheet routes, initiative briefing-premium-doc-edit), Add a task and a task's status, and the bar under the stages (initiative
|
|
6
|
+
* premium-board-actions, pm/premium-acts.js): move to the next stage or back, hold, cancel, archive, resume, reopen and restore, each with Undo. Nothing here issues a document. */
|
|
6
7
|
import { pmPost } from './http.js';
|
|
7
8
|
import { proposalsModel, editBody, acceptBody, rejectBody, askBody, askLine } from './premium-doc-edit.js';
|
|
8
9
|
import { $, $$, esc, openDlg, closeDlg, setMode, toast, loadThread, onScroll, wireRail, logHtml, turnA, ptx, pillOf, kv, H2, CHECK, crumbHtml, wireCrumb, AI, openAddDoc } from './premium-shell.js';
|
|
10
|
+
import { barHtml, onBar, closeMenu } from './premium-acts.js';
|
|
9
11
|
|
|
10
12
|
let M = null; // the model
|
|
11
13
|
let taskView = 'list';
|
|
@@ -46,6 +48,10 @@ function checksHtml() {
|
|
|
46
48
|
const all = M.allSteps.length ? `<details class="src"><summary>All ${M.allSteps.length} workflow steps</summary><div class="ckl">${M.allSteps.map((c) => `<div class="ckr"><i></i><b>${esc(c.label)}</b><span>${esc(c.stateLabel)}</span><small>${esc(c.note)}</small></div>`).join('')}</div></details>` : '';
|
|
47
49
|
return `<section class="card rise" style="--d:4" id="cIniChk" aria-labelledby="hChk"><div class="ch"><span class="ic">${ICO('<path d="M5 12l5 5L20 7"/>')}</span><h2 id="hChk">Checks</h2><small>from the workflow engine</small></div><div class="ckl">${M.checks.map((c) => `<div class="ckr ${esc(c.state)}${c.cur ? ' cur' : ''}"><i></i><b>${esc(c.label)}</b><span>${esc(c.stateLabel)}</span>${c.owed ? `<small>${esc(c.owed)}</small>` : ''}</div>`).join('')}</div>${all}</section>`;
|
|
48
50
|
}
|
|
51
|
+
/* the bar's presses (pm/premium-acts.js): the page's context and the initiative as a row */
|
|
52
|
+
const actCtx = () => ({ ws: M.board.ws, board: M.board.id, boardName: M.board.name, self: !!M.acts.self, first: M.acts.stages[0] || '', reload: load });
|
|
53
|
+
const actRow = () => ({ id: M.id, key: 'bar', title: M.title, acts: M.acts });
|
|
54
|
+
$('#iMain').addEventListener('click', (e) => { if (M && M.acts && e.target.closest('#iBar')) onBar(e, actCtx(), actRow()); });
|
|
49
55
|
$('#iMain').addEventListener('click', (e) => {
|
|
50
56
|
const h = e.target.closest('[data-help]'); if (!h) return;
|
|
51
57
|
const a = M.help[+h.dataset.help]; if (!a) return;
|
|
@@ -409,7 +415,8 @@ function draw() {
|
|
|
409
415
|
$('#snap').textContent = M.header.text;
|
|
410
416
|
$('#snap').title = 'Every figure on this page comes from a record. A date, owner or progress shows only when one was set.';
|
|
411
417
|
const keepQ = $('#dmQ') && document.activeElement === $('#dmQ');
|
|
412
|
-
|
|
418
|
+
closeMenu();
|
|
419
|
+
$('#iMain').innerHTML = headHtml() + (M.acts ? `<div id="iBar">${barHtml(actCtx(), actRow())}</div>` : '') + `<div class="bcols"><div>${overviewHtml()}</div><div>${checksHtml()}</div></div>` + tasksHtml() + docsHtml();
|
|
413
420
|
if ($('#dmList')) drawDocList();
|
|
414
421
|
if (keepQ) { const q = $('#dmQ'); q.focus(); q.setSelectionRange(q.value.length, q.value.length); }
|
|
415
422
|
pillOf($('#tkTabs'));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/* pm/premium-meeting.js — Calendar in the premium Briefing's Today card (initiative briefing-premium-calendar,
|
|
2
|
-
* The Today / This week switch, the week list and the meeting dialog. Reads GET /api/calendar-views?view=week, GET /api/meeting-replay
|
|
3
|
-
* The
|
|
4
|
-
*
|
|
1
|
+
/* pm/premium-meeting.js — Calendar in the premium Briefing's Today card (initiative briefing-premium-calendar, slices 1 and 2).
|
|
2
|
+
* The Today / This week switch, the week list and the meeting dialog. Reads GET /api/calendar-views?view=week, GET /api/meeting-replay, GET /api/meeting-material and
|
|
3
|
+
* GET /api/meeting-material/suggest. The writes are "Link it" (POST /api/calendar-links), Add and Remove material (POST /api/meeting-material) and Make task
|
|
4
|
+
* (POST /api/plan-items). Every word is a field of a record: the pure half (weekView, meetingView, the body builders) takes the routes' answers and returns what the page
|
|
5
|
+
* draws or sends, so a test reads it without a DOM. Recording and Focus are slice 3. */
|
|
5
6
|
|
|
6
7
|
const pad = (n) => String(n).padStart(2, '0');
|
|
7
8
|
const clip = (s, n) => { const t = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1).trimEnd() + '…' : t; };
|
|
@@ -46,15 +47,16 @@ export function meetingView(row, replay, material) {
|
|
|
46
47
|
const rep = replay && replay.state === 'ok' ? replay.body : null;
|
|
47
48
|
const people = row.who && row.who.length ? row.who : (rep && rep.meeting && Array.isArray(rep.meeting.attendees) ? rep.meeting.attendees : []);
|
|
48
49
|
const keys = rep && Array.isArray(rep.keys) ? rep.keys : [];
|
|
49
|
-
const pick = (k) => keys.filter((x) => x.k === k).map((x) => ({ text: clip(x.text, 240), owner: x.owner || '', due: x.due || '', open: x.state === 'open' || x.state === 'owner' }));
|
|
50
|
-
const
|
|
50
|
+
const pick = (k) => keys.filter((x) => x.k === k).map((x) => ({ id: x.id == null ? '' : String(x.id), text: clip(x.text, 240), owner: x.owner || '', due: x.due || '', open: x.state === 'open' || x.state === 'owner' }));
|
|
51
|
+
const ini = rep && rep.note && rep.note.initiative && rep.note.initiative.id ? rep.note.initiative : null, nws = rep && rep.note ? (ini && ini.ws) || rep.note.ws || '' : '';
|
|
52
|
+
const notes = rep ? { title: clip((rep.note && rep.note.title) || '', 120), id: (rep.note && rep.note.id) || '', initiative: ini ? { id: ini.id, name: clip(ini.title || ini.name || ini.id, 70), ws: nws } : null, decisions: pick('decision'), actions: pick('action'), questions: pick('question') } : null;
|
|
51
53
|
const heard = rep && Number(rep.length_ms) > 0 ? Math.round(rep.length_ms / 60000) : 0;
|
|
52
54
|
return {
|
|
53
55
|
people,
|
|
54
56
|
notes, notesState: replay ? replay.state : 'none',
|
|
55
57
|
notesLine: !replay ? 'Reading the notes.' : replay.state === 'error' ? 'The notes could not be read: ' + clip(replay.error, 120) : replay.state === 'none' ? 'No notes for this meeting.' : '',
|
|
56
58
|
replay: rep && (rep.audio || heard) ? { minutes: heard, keyPoints: keys.length, lines: Array.isArray(rep.lines) ? rep.lines.length : 0 } : null,
|
|
57
|
-
material: material && material.state === 'ok' ? (material.items || []).map((i) => ({ title: clip(i.title || i.ref || i.url, 120), kind: i.kind || '', scope: i.scope === 'series' ? 'every meeting of this series' : 'this meeting' })) : null,
|
|
59
|
+
material: material && material.state === 'ok' ? (material.items || []).map((i, n) => ({ n, title: clip(i.title || i.ref || i.url, 120), kind: i.kind || '', scope: i.scope === 'series' ? 'every meeting of this series' : 'this meeting', removable: i.from === 'you' && (i.scope === 'series' || i.scope === 'meeting'), line: removeLine(i) })) : null,
|
|
58
60
|
materialLine: !material ? 'Reading the material.' : material.state === 'error' ? 'The material could not be read: ' + clip(material.error, 120) : (material.items || []).length ? '' : 'No material is linked to this meeting.',
|
|
59
61
|
row,
|
|
60
62
|
};
|
|
@@ -70,6 +72,53 @@ export function linkBody(row, choice, boards) {
|
|
|
70
72
|
return null;
|
|
71
73
|
}
|
|
72
74
|
|
|
75
|
+
/** The event the material routes key on: id, title and the series, as the calendar answer holds them. */
|
|
76
|
+
const eventOf = (row) => ({ id: row.id || undefined, title: row.title, ...(row.series ? { series: row.series } : {}) });
|
|
77
|
+
const isPmos = (k) => k === 'pmos-deck' || k === 'pmos-doc' || k === 'report';
|
|
78
|
+
const scopeText = (scope) => (scope === 'series' ? 'every meeting in the series' : 'this meeting');
|
|
79
|
+
|
|
80
|
+
/** A pasted address as the sheet shows it: an https address with a dot in its host. The server decides what kind it is when it saves. null for anything else. */
|
|
81
|
+
export function pasteOf(raw) {
|
|
82
|
+
const t = String(raw || '').trim();
|
|
83
|
+
if (!t || /\s/.test(t)) return null;
|
|
84
|
+
let u; try { u = new URL(/^[a-z][a-z0-9+.-]*:/i.test(t) ? t : 'https://' + t); } catch { return null; }
|
|
85
|
+
if (u.protocol !== 'https:' || !u.hostname.includes('.')) return null;
|
|
86
|
+
return { kind: 'link', url: u.href, title: u.hostname, meta: 'opens in a new tab · PMOS does not read it' };
|
|
87
|
+
}
|
|
88
|
+
/** The initiative whose documents the sheet suggests: the meeting's own level, when that is an initiative. */
|
|
89
|
+
export const levelInitiative = (row) => (row && row.level && row.level.kind === 'initiative' && row.level.id ? String(row.level.id) : '');
|
|
90
|
+
/** The query of GET /api/meeting-material/suggest. Suggested uses the level; Find in PMOS uses q (two letters or more). */
|
|
91
|
+
export function suggestQuery(row, { q, ws } = {}) {
|
|
92
|
+
const p = new URLSearchParams();
|
|
93
|
+
if (ws) p.set('ws', ws);
|
|
94
|
+
if (q) p.set('q', q); else if (levelInitiative(row)) p.set('initiative', levelInitiative(row));
|
|
95
|
+
return p.toString();
|
|
96
|
+
}
|
|
97
|
+
/** The body of POST /api/meeting-material for a pick made in the sheet. */
|
|
98
|
+
export function addBody(row, pick, scope) {
|
|
99
|
+
if (!pick || !(pick.url || pick.ref)) return null;
|
|
100
|
+
const item = isPmos(pick.kind) ? { kind: pick.kind, ref: pick.ref, title: pick.title, ...(pick.ws ? { ws: pick.ws } : {}) } : { url: pick.url, title: pick.title };
|
|
101
|
+
return { op: 'add', event: eventOf(row), scope: scope === 'series' ? 'series' : 'meeting', item };
|
|
102
|
+
}
|
|
103
|
+
/** The body of POST /api/meeting-material for a row of the list (a row the route returned). */
|
|
104
|
+
export function removeBody(row, item) {
|
|
105
|
+
if (!item || item.from !== 'you' || !['meeting', 'series'].includes(item.scope)) return null;
|
|
106
|
+
return { op: 'remove', event: eventOf(row), scope: item.scope, item: isPmos(item.kind) ? { kind: item.kind, ref: item.ref, ...(item.ws ? { ws: item.ws } : {}) } : { url: item.url } };
|
|
107
|
+
}
|
|
108
|
+
/** What a press records, said before the press (and after it, as the toast). */
|
|
109
|
+
export const addLine = (pick, scope) => `Adds “${clip(pick && pick.title, 80)}” to ${scopeText(scope)}. The calendar is not written.`;
|
|
110
|
+
export const removeLine = (item) => `Removes “${clip(item && item.title, 80)}” from ${scopeText(item && item.scope)}. The document itself is not changed.`;
|
|
111
|
+
|
|
112
|
+
/** Make task for a next step of the meeting's note: the planned event of the note's initiative, or the reason there is none. `stage` is the first stage of its breakdown. */
|
|
113
|
+
export function taskEvent(note, step, stage) {
|
|
114
|
+
if (!note || !note.initiative || !note.initiative.id || !note.initiative.ws) return { ok: false, reason: 'Link the note to an initiative first. Make task adds the step to its breakdown.' };
|
|
115
|
+
if (!stage || !stage.id) return { ok: false, reason: 'The initiative has no stage to put the step in.' };
|
|
116
|
+
const ev = { ev: 'planned', initiative: note.initiative.id, title: String(step.text || '').slice(0, 200), stage: stage.id, note: 'From the meeting note "' + (note.title || 'Untitled note') + '"' };
|
|
117
|
+
if (step.owner) ev.owner = /^(you|me)$/i.test(step.owner) ? 'you' : 'person:' + String(step.owner).slice(0, 60);
|
|
118
|
+
if (step.due && /^\d{4}-\d{2}-\d{2}$/.test(step.due)) ev.due = step.due;
|
|
119
|
+
return { ok: true, ws: note.initiative.ws, event: ev };
|
|
120
|
+
}
|
|
121
|
+
|
|
73
122
|
/* ── the page half ─────────────────────────────────────────────────────────────────────────────────────── */
|
|
74
123
|
|
|
75
124
|
/** deps: { $, $$, esc, openDlg, toast, pmGet, pmPost, turnA, ptx, kv, H, wsq(), ws() }. Returns { mode, draw, openToday }. */
|
|
@@ -110,8 +159,10 @@ export function mountMeeting(d) {
|
|
|
110
159
|
|
|
111
160
|
/* the dialog */
|
|
112
161
|
const sec = (label, body) => `<div class="mtg-sec"><span class="label">${esc(label)}</span>${body}</div>`;
|
|
113
|
-
const items = (L) => `<ul class="mtg-l">${L.map((x) => `<li>${esc(x.text)}${x.owner || x.due ? `<em>${esc([x.owner, x.due].filter(Boolean).join(' · '))}</em>` : ''}</li>`).join('')}</ul>`;
|
|
114
|
-
|
|
162
|
+
const items = (L, task) => `<ul class="mtg-l">${L.map((x, i) => `<li>${esc(x.text)}${x.owner || x.due ? `<em>${esc([x.owner, x.due].filter(Boolean).join(' · '))}</em>` : ''}${task ? `<button class="mtg-b mtg-task" data-task="${i}"${task.done.has(i) ? ' disabled' : ''}>${task.done.has(i) ? 'Task made' : 'Make task'}</button>` : ''}</li>`).join('')}</ul>`;
|
|
163
|
+
const pickLi = (it, key, on) => `<li class="mtg-pick"><span>${esc(clip(it.title, 120))}<em>${esc([it.kind, it.meta].filter(Boolean).join(' · '))}</em></span>${on ? '<span class="mtg-on">Picked</span>' : `<button class="mtg-b" data-pick="${esc(key)}">Pick</button>`}</li>`;
|
|
164
|
+
|
|
165
|
+
function detailHtml(v, boards, inis, saved, ui) {
|
|
115
166
|
const r = v.row, lv = r.level;
|
|
116
167
|
const aboutNow = lv ? aboutOf(lv) : saved || '';
|
|
117
168
|
const opts = [['', aboutNow ? 'Change what it is about' : 'Choose what it is about'], ['portfolio', 'Portfolio']].concat(boards.map((b) => ['board|' + b.ws + '|' + b.id, 'Board: ' + b.name]), inis.map((i) => ['initiative|' + i.id, 'Initiative: ' + i.name]), [['none', 'Remove the link']]);
|
|
@@ -119,38 +170,125 @@ export function mountMeeting(d) {
|
|
|
119
170
|
<div class="mtg-link"><select id="mtgSel" aria-label="What this meeting is about">${opts.map(([val, t]) => `<option value="${esc(val)}">${esc(t)}</option>`).join('')}</select><button class="cta" id="mtgLink" disabled>Link it</button></div>
|
|
120
171
|
<p class="note" id="mtgMsg" role="status">The link applies to every occurrence of “${esc(r.title)}”. The calendar itself is never written.</p>`;
|
|
121
172
|
const n = v.notes;
|
|
173
|
+
const task = n && n.actions.length ? { done: ui.tasked } : null;
|
|
122
174
|
const notes = v.notesLine ? `<p class="note">${esc(v.notesLine)}</p>` : [n.title ? `<p><b>${esc(n.title)}</b></p>` : '',
|
|
123
|
-
n.decisions.length ? `<h4 class="mtg-h">Decisions ${n.decisions.length}</h4>${items(n.decisions)}` : '', n.actions.length ? `<h4 class="mtg-h">Next steps ${n.actions.length}</h4>${items(n.actions)}` : '',
|
|
175
|
+
n.decisions.length ? `<h4 class="mtg-h">Decisions ${n.decisions.length}</h4>${items(n.decisions)}` : '', n.actions.length ? `<h4 class="mtg-h">Next steps ${n.actions.length}</h4>${items(n.actions, task)}` : '',
|
|
124
176
|
n.questions.length ? `<h4 class="mtg-h">Open questions ${n.questions.length}</h4>${items(n.questions)}` : '', (n.decisions.length + n.actions.length + n.questions.length) ? '' : '<p class="note">The note holds no decisions, next steps or questions yet.</p>'].join('');
|
|
125
|
-
const mat = v.materialLine ? `<p class="note">${esc(v.materialLine)}</p>` : `<ul class="mtg-l">${v.material.map((m) => `<li>${esc(m.title)}<em>${esc([m.kind, 'for ' + m.scope].filter(Boolean).join(' · '))}</em
|
|
177
|
+
const mat = (v.materialLine ? `<p class="note">${esc(v.materialLine)}</p>` : `<ul class="mtg-l">${v.material.map((m) => `<li>${esc(m.title)}<em>${esc([m.kind, 'for ' + m.scope].filter(Boolean).join(' · '))}</em>${m.removable ? `<button class="mtg-b mtg-rm" data-rm="${m.n}" aria-label="Remove ${esc(m.title)}" title="${esc(m.line)}">Remove</button>` : ''}</li>`).join('')}</ul>`)
|
|
178
|
+
+ `<div class="mtg-foot"><button class="mtg-b" id="mmAdd">Add material</button><span class="note">Your calendar invite is not changed.</span></div>`;
|
|
126
179
|
const rep = v.replay ? `<p>A recording is kept: ${v.replay.minutes ? v.replay.minutes + ' min, ' : ''}${v.replay.keyPoints} key ${v.replay.keyPoints === 1 ? 'point' : 'points'}.</p><p class="note">Replay opens in the console for now.</p>` : '';
|
|
127
|
-
|
|
180
|
+
const status = ui.status ? `<p class="note mtg-status" id="mtgStatus" role="status">${esc(ui.status.text)}${ui.status.undo ? ' <button class="mtg-b" id="mtgUndo">Undo</button>' : ''}</p>` : '<p class="note mtg-status" id="mtgStatus" role="status" hidden></p>';
|
|
181
|
+
return `<article class="paper doc mtg">${status}${d.kv([['When', r.day + ' · ' + r.time + (r.len ? ' · ' + r.len : '')], ['People', v.people.join(', ') || 'The calendar lists no other people.']])}${sec('What it is about', about)}${sec('Notes', notes)}${sec('Material', mat)}${rep ? sec('Replay', rep) : ''}</article>`;
|
|
182
|
+
}
|
|
183
|
+
function sheetHtml(row) {
|
|
184
|
+
return `<article class="paper doc mtg mtg-sheet"><button class="mtg-b" id="mmBack">Back to the meeting</button>
|
|
185
|
+
<p class="note">${esc(row.title)} · ${esc(row.day)} ${esc(row.time)}. PMOS keeps the link on its record of this meeting. The invite in your calendar is not changed.</p>
|
|
186
|
+
${sec('Suggested for this meeting', '<div id="mmSug"></div>')}${sec('Find in PMOS', '<input class="mtg-in" id="mmFind" type="search" placeholder="A document, report or deck" aria-label="Find a document, report or deck in PMOS" autocomplete="off"><div id="mmFound"></div>')}
|
|
187
|
+
${sec('Or paste a link', '<input class="mtg-in" id="mmLinkIn" type="url" placeholder="Any https address" aria-label="Paste a link" autocomplete="off"><div id="mmPaste"></div>')}<div id="mmOpts"></div></article>`;
|
|
128
188
|
}
|
|
129
189
|
|
|
130
190
|
async function openRow(row, via) {
|
|
131
191
|
let replay = null, material = null, boards = W ? W.boards : [], inis = W ? W.initiatives : [], saved = '';
|
|
132
|
-
const
|
|
192
|
+
const ui = { view: 'detail', status: null, tasked: new Set() }, SH = { sug: null, found: [], pick: null, scope: 'meeting', q: '', link: '', token: 0 };
|
|
193
|
+
let stT = null, findT = null, undoFn = null;
|
|
194
|
+
const view = () => meetingView(row, replay, material);
|
|
195
|
+
const say = (text, undo) => { clearTimeout(stT); undoFn = undo || null; ui.status = { text, undo: undo || null }; if (ui.view === 'detail') { paint(); stT = setTimeout(() => { ui.status = null; if (ui.view === 'detail') paint(); }, 9000); } else d.toast(text); };
|
|
196
|
+
const paint = () => { $('#oMain').innerHTML = ui.view === 'add' ? sheetHtml(row) : detailHtml(view(), boards, inis, saved, ui); if (ui.view === 'add') paintSheet(); };
|
|
197
|
+
function paintSheet() {
|
|
198
|
+
const list = (L, k) => (L.length ? `<ul class="mtg-l">${L.map((it, i) => pickLi(it, k + ':' + i, SH.pick && (SH.pick.ref || SH.pick.url) === (it.ref || it.url) && SH.pick.kind === it.kind)).join('')}</ul>` : '');
|
|
199
|
+
const q = $('#mmSug'); if (!q) return;
|
|
200
|
+
q.innerHTML = SH.sug == null ? '<p class="note">Looking in PMOS.</p>' : SH.sug.length ? list(SH.sug, 'sug') : '<p class="note">Nothing to suggest yet. Search below, or paste a link.</p>';
|
|
201
|
+
$('#mmFound').innerHTML = SH.q.length >= 2 ? (SH.foundBusy ? '<p class="note">Searching.</p>' : SH.found.length ? list(SH.found, 'found') : '<p class="note">Nothing in PMOS matches that.</p>') : '';
|
|
202
|
+
const pst = pasteOf(SH.link);
|
|
203
|
+
$('#mmPaste').innerHTML = pst ? list([pst], 'paste') : `<p class="note">${SH.link ? 'Paste an https address.' : 'A web page opens in a new tab and PMOS does not read it.'}</p>`;
|
|
204
|
+
const k = SH.pick;
|
|
205
|
+
$('#mmOpts').innerHTML = k ? `<div class="mtg-sec"><span class="label">For</span><div class="seg2" role="group" aria-label="For"><button class="mtg-b" data-scope="meeting" aria-pressed="${SH.scope === 'meeting'}">This meeting</button><button class="mtg-b" data-scope="series" aria-pressed="${SH.scope === 'series'}">${row.series ? 'Every meeting in the series' : 'Every meeting with this title'}</button></div>
|
|
206
|
+
<p class="note" id="mmLine">${esc(addLine(k, SH.scope))}</p><div class="mtg-foot"><button class="cta" id="mmDo">Add to the meeting</button><button class="mtg-b" id="mmCancel">Cancel</button></div></div>` : '';
|
|
207
|
+
}
|
|
208
|
+
async function reload() {
|
|
209
|
+
const mt = await d.pmGet(matPath());
|
|
210
|
+
material = mt && mt.ok === true ? { state: 'ok', items: mt.items || [] } : { state: 'error', error: (mt && mt.error) || 'no answer' };
|
|
211
|
+
}
|
|
212
|
+
const matPath = () => '/api/meeting-material?event=' + encodeURIComponent(row.id) + '&title=' + encodeURIComponent(row.title) + (row.series ? '&series=' + encodeURIComponent(row.series) : '') + '&date=' + row.day;
|
|
133
213
|
d.openDlg({ eye: 'Calendar · real data', title: row.title, sub: [row.day, row.time, row.len].filter(Boolean).join(' · '), noteKey: via === 'today' ? 'ev:meeting:' + Date.parse(row.at) : null,
|
|
134
|
-
stream: d.turnA(d.ptx('This meeting is in the calendar PMOS holds. Its notes, material and recording appear here only if PMOS holds them.')), pane:
|
|
214
|
+
stream: d.turnA(d.ptx('This meeting is in the calendar PMOS holds. Its notes, material and recording appear here only if PMOS holds them.')), pane: detailHtml(meetingView(row, null, null), boards, inis, '', ui), label: 'Meeting' });
|
|
135
215
|
if (via !== 'today') $('#askF').hidden = true;
|
|
136
|
-
const [rp, mt] = await Promise.all([d.pmGet('/api/meeting-replay?event=' + encodeURIComponent(row.id) + '&date=' + row.day), d.pmGet(
|
|
216
|
+
const [rp, mt] = await Promise.all([d.pmGet('/api/meeting-replay?event=' + encodeURIComponent(row.id) + '&date=' + row.day), d.pmGet(matPath())]);
|
|
137
217
|
if ($('#dTitle').textContent !== row.title) return;
|
|
138
218
|
replay = rp && rp.ok === true ? { state: 'ok', body: rp } : rp && rp.status === 404 ? { state: 'none' } : { state: 'error', error: (rp && rp.error) || 'no answer' };
|
|
139
219
|
material = mt && mt.ok === true ? { state: 'ok', items: mt.items || [] } : { state: 'error', error: (mt && mt.error) || 'no answer' };
|
|
140
220
|
paint();
|
|
141
|
-
|
|
221
|
+
|
|
222
|
+
const write = async (body) => { const res = await d.pmPost('/api/meeting-material', body); return res && res.ok === true ? res : { ok: false, error: (res && res.error) || 'The material was not saved.' }; };
|
|
223
|
+
async function removeItem(item) {
|
|
224
|
+
const body = removeBody(row, item); if (!body) return;
|
|
225
|
+
const res = await write(body);
|
|
226
|
+
if (!res.ok) return say('The material was not removed: ' + res.error);
|
|
227
|
+
await reload();
|
|
228
|
+
say('Removed “' + clip(item.title, 80) + '” from ' + scopeText(item.scope) + '. The document itself is not changed.', async () => { const back = await write({ ...addBody(row, item, item.scope), ...(item.topic ? { topic: item.topic } : {}), present: !!item.present }); await reload(); say(back.ok ? 'Put back.' : 'It was not put back: ' + back.error); });
|
|
229
|
+
}
|
|
230
|
+
async function makeTask(i) {
|
|
231
|
+
const n = view().notes, step = n && n.actions[i]; if (!step) return;
|
|
232
|
+
if (!n.initiative) return say(taskEvent(n, step, null).reason);
|
|
233
|
+
const lay = await d.pmGet('/api/plan-items?ladder=0&ws=' + encodeURIComponent(n.initiative.ws) + '&id=' + encodeURIComponent(n.initiative.id));
|
|
234
|
+
const plan = taskEvent(n, step, lay && lay.ok && (lay.stages || [])[0]);
|
|
235
|
+
if (!plan.ok) return say('The task was not made: ' + plan.reason);
|
|
236
|
+
const res = await d.pmPost('/api/plan-items', { ws: plan.ws, events: [plan.event] });
|
|
237
|
+
if (!res || res.ok !== true) return say('The task was not made' + (res && res.error ? ': ' + res.error : '.'));
|
|
238
|
+
ui.tasked.add(i);
|
|
239
|
+
const item = res.written && res.written[0] && res.written[0].item;
|
|
240
|
+
say(`Added to ${n.initiative.name}, under ${(lay.stages[0].label || lay.stages[0].id)}.`, item ? async () => {
|
|
241
|
+
const u = await d.pmPost('/api/plan-items', { ws: plan.ws, events: [{ ev: 'withdrawn', item, initiative: n.initiative.id }] });
|
|
242
|
+
if (u && u.ok === true) { ui.tasked.delete(i); say('The task is withdrawn.'); } else say('The task was not withdrawn' + (u && u.error ? ': ' + u.error : '.'));
|
|
243
|
+
} : null);
|
|
244
|
+
}
|
|
245
|
+
async function openSheet() {
|
|
246
|
+
ui.view = 'add'; SH.sug = null; SH.found = []; SH.pick = null; SH.q = ''; SH.link = ''; paint();
|
|
247
|
+
$('#mmBack').focus();
|
|
248
|
+
const r = await d.pmGet('/api/meeting-material/suggest?' + suggestQuery(row, { ws: d.ws() }));
|
|
249
|
+
SH.sug = r && r.ok && Array.isArray(r.suggested) ? r.suggested : []; if (ui.view === 'add') paintSheet();
|
|
250
|
+
}
|
|
251
|
+
const closeSheet = (focusAdd) => { ui.view = 'detail'; paint(); if (focusAdd && $('#mmAdd')) $('#mmAdd').focus(); };
|
|
252
|
+
const pickOf = (key) => { const [k, i] = key.split(':'); return (k === 'sug' ? SH.sug : k === 'found' ? SH.found : [pasteOf(SH.link)])[+i] || null; };
|
|
253
|
+
|
|
254
|
+
$('#oMain').oninput = (e) => {
|
|
255
|
+
if (e.target.id === 'mmLinkIn') { SH.link = e.target.value.trim(); const p = pasteOf(SH.link); if (p) SH.pick = p; else if (SH.pick && !SH.pick.ref) SH.pick = null; paintSheet(); }
|
|
256
|
+
if (e.target.id === 'mmFind') {
|
|
257
|
+
SH.q = e.target.value.trim(); SH.found = []; SH.foundBusy = SH.q.length >= 2; paintSheet(); clearTimeout(findT);
|
|
258
|
+
if (!SH.foundBusy) return;
|
|
259
|
+
const my = ++SH.token;
|
|
260
|
+
findT = setTimeout(async () => { const r = await d.pmGet('/api/meeting-material/suggest?' + suggestQuery(row, { q: SH.q, ws: d.ws() })); if (my !== SH.token || ui.view !== 'add') return; SH.foundBusy = false; SH.found = r && r.ok && Array.isArray(r.found) ? r.found : []; paintSheet(); }, 220);
|
|
261
|
+
}
|
|
262
|
+
};
|
|
142
263
|
$('#oMain').onchange = (e) => { if (e.target.id === 'mtgSel') $('#mtgLink').disabled = !e.target.value; };
|
|
143
264
|
$('#oMain').onclick = async (e) => {
|
|
144
|
-
|
|
145
|
-
|
|
265
|
+
const t = e.target.closest('button'); if (!t) return;
|
|
266
|
+
if (t.id === 'mmAdd') return openSheet();
|
|
267
|
+
if (t.id === 'mmBack' || t.id === 'mmCancel') return closeSheet(true);
|
|
268
|
+
if (t.dataset.pick) { SH.pick = pickOf(t.dataset.pick); paintSheet(); return; }
|
|
269
|
+
if (t.dataset.scope) { SH.scope = t.dataset.scope; paintSheet(); return; }
|
|
270
|
+
if (t.id === 'mmDo') {
|
|
271
|
+
const body = addBody(row, SH.pick, SH.scope); if (!body) return;
|
|
272
|
+
t.disabled = true;
|
|
273
|
+
const res = await write(body);
|
|
274
|
+
if (!res.ok) { t.disabled = false; $('#mmLine').textContent = 'The material was not saved: ' + res.error; return; }
|
|
275
|
+
await reload(); ui.view = 'detail';
|
|
276
|
+
say('Added “' + clip(SH.pick.title, 80) + '” to ' + scopeText(SH.scope) + '.');
|
|
277
|
+
if ($('#mmAdd')) $('#mmAdd').focus();
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
if (t.dataset.rm !== undefined) { const it = ((material && material.items) || [])[+t.dataset.rm]; if (it) await removeItem(it); return; }
|
|
281
|
+
if (t.dataset.task !== undefined) { t.disabled = true; await makeTask(+t.dataset.task); if (!ui.tasked.has(+t.dataset.task)) paint(); return; }
|
|
282
|
+
if (t.id === 'mtgUndo') { const fn = undoFn; undoFn = null; if (fn) await fn(); return; }
|
|
283
|
+
if (t.id !== 'mtgLink') return;
|
|
284
|
+
const body = linkBody(row, $('#mtgSel').value, boards);
|
|
146
285
|
if (!body) return;
|
|
147
|
-
|
|
286
|
+
t.disabled = true;
|
|
148
287
|
const res = await d.pmPost('/api/calendar-links', body);
|
|
149
|
-
if (!res || res.ok !== true) {
|
|
150
|
-
saved = body.kind === 'none' ? '' :
|
|
288
|
+
if (!res || res.ok !== true) { t.disabled = false; $('#mtgMsg').textContent = (res && res.error) || 'The link could not be saved.'; return; }
|
|
289
|
+
saved = body.kind === 'none' ? '' : $('#mtgSel').selectedOptions[0].textContent;
|
|
151
290
|
d.toast(body.kind === 'none' ? 'The link is removed for every occurrence of this meeting.' : 'Linked. It applies to every occurrence of this meeting.');
|
|
152
291
|
await readWeek(); paint(); if (mode === 'week') draw();
|
|
153
|
-
$('#oMain').onchange = (ev) => { if (ev.target.id === 'mtgSel') $('#mtgLink').disabled = !ev.target.value; };
|
|
154
292
|
};
|
|
155
293
|
}
|
|
156
294
|
|
|
@@ -807,6 +807,25 @@ a.round{color:inherit;text-decoration:none}
|
|
|
807
807
|
.dmcta.alt:hover{filter:none;background:var(--well)}
|
|
808
808
|
.dmcta{min-height:44px}
|
|
809
809
|
|
|
810
|
+
/* ── board actions (initiative premium-board-actions): the row menu, the New asks card, the bar on the initiative page and their dialogs; the mockup's rules, cut by class ── */
|
|
811
|
+
.inirw{position:relative}.inirw>.ini2{padding-right:56px;border-top:1px solid var(--hair)}
|
|
812
|
+
.inim{position:absolute;right:-8px;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:14px;display:grid;place-items:center;color:var(--ink-2);transition:background .2s}.inim:hover,.inim[aria-expanded="true"]{background:var(--well);color:var(--ink)}.inim svg{width:20px;height:20px;fill:currentColor;stroke:none}
|
|
813
|
+
.inirw.gone .ini2{opacity:.62}.inirw.gone .ini2 .it b{text-decoration:line-through;text-decoration-thickness:1px}
|
|
814
|
+
.bagone{margin-top:8px;padding-top:8px;border-top:1px solid var(--hair)}.bagone .dlink{min-height:44px}
|
|
815
|
+
.bam2{left:auto;right:0;top:calc(100% - 4px);min-width:250px}.bam2.up{top:auto;bottom:calc(100% - 4px)}.bam2 button{height:auto;min-height:44px;padding:8px 12px;font-family:inherit}.bam2 button span{display:grid;gap:2px}.bam2 button b{font-size:13px;color:var(--ink);font-weight:650}.bam2 button small{font-size:12px;color:var(--ink-3);font-weight:500}
|
|
816
|
+
.baask{margin-bottom:24px}.baask .bal{display:grid;gap:10px}.baa{padding:12px 14px;border-radius:14px;background:var(--well);display:grid;gap:6px}
|
|
817
|
+
.baq{margin:0;font-size:14px;line-height:1.45;color:var(--ink)}.bam{font-size:12.5px;color:var(--ink-3)}
|
|
818
|
+
.bad2{display:flex;flex-wrap:wrap;gap:6px}.bad2 span{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;background:var(--card-solid);font-size:12.5px;font-weight:600;color:var(--ink-2)}
|
|
819
|
+
.baact{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.baa .baact{margin-top:4px}
|
|
820
|
+
.baiact{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 20px}.baiact .note{margin:0}.iamw{position:relative}
|
|
821
|
+
.lifeb{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;margin:0 0 20px;border-radius:18px;background:color-mix(in oklab,var(--ink) 6%,transparent);box-shadow:inset 3px 0 0 var(--ink-3)}.lifeb>div{display:grid;gap:3px;flex:1 1 260px}.lifeb b{font-size:15px}.lifeb span{font-size:13px;color:var(--ink-2);line-height:1.45}
|
|
822
|
+
.addf textarea{border-radius:14px;border:1px solid var(--hair);background:var(--card-solid);padding:10px 12px;font:inherit;font-size:15px;color:var(--ink);min-width:0;width:100%;resize:vertical}.addf textarea:focus-visible{outline:2px solid var(--ember);outline-offset:1px}
|
|
823
|
+
.bapl button{min-height:40px}#oMain .addf .bapl button[aria-pressed="true"]{background:var(--solid);color:var(--on-solid)}
|
|
824
|
+
.bahp{padding:12px 14px;border-radius:14px;background:var(--well)}.bahp .label{margin:0 0 6px}.bahp ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}.bahp li{display:grid;grid-template-columns:16px minmax(0,1fr);gap:8px;font-size:13px;line-height:1.45;color:var(--ink-2)}.bahp svg{width:14px;height:14px;margin-top:2px;color:var(--ok)}
|
|
825
|
+
.barec{display:flex;gap:8px;margin:0;align-items:flex-start}.barec svg{width:14px;height:14px;flex:none;margin-top:3px}
|
|
826
|
+
.addf .cact{display:flex;flex-wrap:wrap;gap:10px}.addf .note[role="status"]{margin:0;min-height:1.2em}
|
|
827
|
+
@media (max-width:760px){.inirw>.ini2{padding-right:48px}.baiact .dmcta,.lifeb .dmcta,.baa .dmcta{height:44px}.baa .baact .dmcta{flex:1;justify-content:center}.bapl button{min-height:44px}}
|
|
828
|
+
|
|
810
829
|
/* ── initiative page (initiative briefing-premium-initiative) ── */
|
|
811
830
|
.ckr.current i{background:var(--ember)}
|
|
812
831
|
.ckr.done i{background:var(--ok)}
|
|
@@ -1310,6 +1329,16 @@ button.dsn:hover{box-shadow:inset 0 0 0 1.5px rgb(79,109,245)}
|
|
|
1310
1329
|
.mtg-link{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:10px 0 8px}
|
|
1311
1330
|
.mtg-link select{flex:1 1 220px;min-width:0;min-height:44px;border-radius:18px;border:1px solid var(--hair);background:var(--well);padding:0 14px;font:inherit;color:inherit}
|
|
1312
1331
|
@media (max-width:700px){#todayCard .ch{flex-wrap:wrap;row-gap:8px}}
|
|
1332
|
+
.mtg-b{min-height:44px;padding:0 16px;border-radius:var(--r-chip);background:var(--well);color:var(--ink);font-weight:650;font-size:var(--t-small);display:inline-flex;align-items:center;transition:transform .35s var(--spring)}
|
|
1333
|
+
.mtg-b:disabled{opacity:.55}
|
|
1334
|
+
.mtg-l li:has(>.mtg-b){display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}.mtg-l li>.mtg-b{grid-row:1 / span 2;grid-column:2}
|
|
1335
|
+
.mtg-foot{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:12px}.mtg-foot .note{margin:0}
|
|
1336
|
+
.mtg-in{width:100%;min-height:44px;border-radius:18px;border:1px solid var(--hair);background:var(--well);padding:0 14px;font:inherit;color:inherit;margin-bottom:8px}
|
|
1337
|
+
.mtg-pick{display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}.mtg-on{font-size:var(--t-small);color:var(--ember-ink);font-weight:600}
|
|
1338
|
+
.mtg-status{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 12px;padding:10px 14px;border-radius:18px;background:var(--well);color:var(--ink-2)}.mtg-status[hidden]{display:none}
|
|
1339
|
+
.mtg-sheet>.mtg-b{margin-bottom:10px}
|
|
1340
|
+
.mtg-sheet .seg2 button{min-height:44px}
|
|
1341
|
+
|
|
1313
1342
|
|
|
1314
1343
|
/* Agent sessions dialog and its header button (initiative premium-sessions) */
|
|
1315
1344
|
.sbtn{position:relative}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<div class="bcols">
|
|
51
51
|
<div>
|
|
52
52
|
<section class="card rise" style="--d:5" id="cIni" aria-labelledby="hIni">
|
|
53
|
-
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><path d="M12 3 3 8l9 5 9-5z"/><path d="m3 13 9 5 9-5"/></svg></span><h2 id="hIni">Initiatives</h2><small id="iniCap"></small></div>
|
|
53
|
+
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><path d="M12 3 3 8l9 5 9-5z"/><path d="m3 13 9 5 9-5"/></svg></span><h2 id="hIni">Initiatives</h2><small id="iniCap"></small><button class="fold alt dmadd2" id="newIni" type="button" hidden>New initiative</button></div>
|
|
54
54
|
<div class="mprog" id="iniBar" role="progressbar" aria-label="Open initiatives on track" aria-valuemin="0" hidden><b></b></div>
|
|
55
55
|
<div class="seg" id="ibTabs" role="group" aria-label="Initiatives view"><i class="pill"></i><button data-v="list" aria-pressed="true">List</button><button data-v="stages" aria-pressed="false">By stage</button><button data-v="time" aria-pressed="false">Timeline</button></div>
|
|
56
56
|
<div id="ibBody"></div>
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
</section>
|
|
59
59
|
</div>
|
|
60
60
|
<div>
|
|
61
|
+
<div id="asksHost"></div>
|
|
61
62
|
<section class="card rise" style="--d:6" id="cSpr" aria-labelledby="hSpr">
|
|
62
63
|
<div class="ch"><span class="ic"><svg class="i" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg></span><h2 id="hSpr">Sprint</h2><small id="sprCap"></small></div>
|
|
63
64
|
<div id="sprBody"></div>
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
<div class="dmg two" id="docBody" role="list"></div>
|
|
75
76
|
<p class="note" id="docNote" style="margin-top:12px"></p>
|
|
76
77
|
</section>
|
|
77
|
-
<p class="foot" id="foot">This page reads the board's own records, the same ones the Initiatives page reads. Its presses are Draft it on a core document, which starts the existing read-only run that writes a draft and sends nothing,
|
|
78
|
+
<p class="foot" id="foot">This page reads the board's own records, the same ones the Initiatives page reads. Its presses are Draft it on a core document, which starts the existing read-only run that writes a draft and sends nothing, Add a document, which saves a document on the board's record, and the board's own presses: accept or decline a new ask, New initiative, and move, hold, cancel or archive an initiative, each through the console's route and each with Undo. Issue and Drop are not built here. The Metrics charts are not drawn, because PMOS holds no metric series for a board. A sprint appears only when a session has read Jira.</p>
|
|
78
79
|
</main>
|
|
79
80
|
<noscript>This page needs JavaScript.</noscript>
|
|
80
81
|
<script type="module" src="/pm/premium-board.js"></script>
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</header>
|
|
42
42
|
<section class="hero hero-slim"><p class="brief rise" style="--d:2" id="brief" aria-live="polite"></p></section>
|
|
43
43
|
<div id="iMain"><p class="empty3 plain" id="iRead">The initiative is read from its records. This page shows nothing until it has read, rather than guess.</p></div>
|
|
44
|
-
<p class="foot" id="foot">This page reads the initiative's own records, the same ones the Initiatives sheet reads. Its presses are Draft it on a core document, which starts the existing read-only run that writes a draft and sends nothing, Add a task,
|
|
44
|
+
<p class="foot" id="foot">This page reads the initiative's own records, the same ones the Initiatives sheet reads. Its presses are Draft it on a core document, which starts the existing read-only run that writes a draft and sends nothing, Add a task, Add a document, which saves a document on the initiative's record, and the bar under the stages: move it, put it on hold, cancel or archive it, each through the console's route and each with Undo. Opening a document only reads it. Issue and Drop are not built on this page.</p>
|
|
45
45
|
</main>
|
|
46
46
|
<noscript>This page needs JavaScript.</noscript>
|
|
47
47
|
<script type="module" src="/pm/premium-initiative.js"></script>
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"briefing-premium-reports.test.js",
|
|
47
47
|
"briefing-premium-doc-edit.test.js",
|
|
48
48
|
"briefing-premium-calendar.test.js",
|
|
49
|
+
"briefing-premium-calendar-2.test.js",
|
|
49
50
|
"briefing-premium-products.test.js",
|
|
50
51
|
"briefing-premium-sources.test.js",
|
|
51
52
|
"briefing-premium-metrics.test.js",
|
|
@@ -213,6 +214,7 @@
|
|
|
213
214
|
"briefing-premium-reports.test.js": 1,
|
|
214
215
|
"briefing-premium-doc-edit.test.js": 1,
|
|
215
216
|
"briefing-premium-calendar.test.js": 1,
|
|
217
|
+
"briefing-premium-calendar-2.test.js": 1,
|
|
216
218
|
"briefing-premium-products.test.js": 1,
|
|
217
219
|
"briefing-premium-sources.test.js": 1,
|
|
218
220
|
"briefing-premium-metrics.test.js": 1,
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"briefing-premium-adddoc-test.js",
|
|
10
10
|
"briefing-premium-doc-edit-test.js",
|
|
11
11
|
"briefing-premium-calendar-test.js",
|
|
12
|
+
"briefing-premium-calendar-2-test.js",
|
|
12
13
|
"briefing-premium-products-test.js",
|
|
13
14
|
"briefing-premium-sources-test.js",
|
|
14
15
|
"briefing-premium-metrics-test.js",
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
"briefing-premium-adddoc-test.js": 120,
|
|
24
25
|
"briefing-premium-doc-edit-test.js": 90,
|
|
25
26
|
"briefing-premium-calendar-test.js": 90,
|
|
27
|
+
"briefing-premium-calendar-2-test.js": 90,
|
|
26
28
|
"briefing-premium-products-test.js": 90,
|
|
27
29
|
"briefing-premium-sources-test.js": 90,
|
|
28
30
|
"briefing-premium-metrics-test.js": 120,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Initiative premium-board-actions: the Board's own presses (new asks, New initiative, move, hold, cancel, archive, each with Undo) against the real server on a scratch team repo.",
|
|
3
|
+
"panels": [
|
|
4
|
+
"premium-board-actions-test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"premium-board-actions-test.js": 150
|
|
8
|
+
}
|
|
9
|
+
}
|