create-pmos 0.324.0 → 0.326.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-calendar-2-test.js +8 -6
- package/workspace/briefing-premium-calendar-3-test.js +7 -4
- package/workspace/briefing-premium-calendar-test.js +4 -2
- package/workspace/guide/briefing-premium.md +23 -2
- package/workspace/lib/engine/boards.js +28 -1
- package/workspace/lib/routes-boards.js +2 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-vw-backlog-test.js +127 -0
- package/workspace/premium-vw-doc-test.js +3 -1
- package/workspace/premium-vw-item-test.js +128 -0
- package/workspace/premium-vw-meet-test.js +210 -0
- package/workspace/premium-vw-notes-test.js +161 -0
- package/workspace/premium-vw-rec-test.js +209 -0
- package/workspace/public/pm/premium-board.js +13 -1
- package/workspace/public/pm/premium-initiative.js +7 -2
- package/workspace/public/pm/premium-meeting.js +106 -32
- package/workspace/public/pm/premium-shell.js +8 -2
- package/workspace/public/pm/premium-vw-backlog.css +30 -0
- package/workspace/public/pm/premium-vw-backlog.js +91 -0
- package/workspace/public/pm/premium-vw-doc-model.js +3 -2
- package/workspace/public/pm/premium-vw-doc.css +1 -0
- package/workspace/public/pm/premium-vw-doc.js +7 -4
- package/workspace/public/pm/premium-vw-item-model.js +58 -0
- package/workspace/public/pm/premium-vw-item.css +25 -0
- package/workspace/public/pm/premium-vw-item.js +66 -0
- package/workspace/public/pm/premium-vw-jira.js +3 -1
- package/workspace/public/pm/premium-vw-meet.css +87 -0
- package/workspace/public/pm/premium-vw-meet.js +322 -0
- package/workspace/public/pm/premium-vw-notes.css +43 -0
- package/workspace/public/pm/premium-vw-notes.js +188 -0
- package/workspace/public/pm/premium-vw-rec.css +75 -0
- package/workspace/public/pm/premium-vw-rec.js +257 -0
- package/workspace/public/pm/premium.js +2 -0
- package/workspace/test-files.json +2 -0
- package/workspace/test-lists/premium-viewer.json +4 -2
- package/workspace/test-lists/premium-vw-backlog.json +13 -0
- package/workspace/test-lists/premium-vw-item.json +13 -0
- package/workspace/test-lists/premium-vw-meet.json +13 -0
- package/workspace/test-lists/premium-vw-notes.json +13 -0
|
@@ -2,7 +2,10 @@
|
|
|
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
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
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
|
+
* draws or sends, so a test reads it without a DOM. Recording and Focus are slice 3.
|
|
6
|
+
* The dialog's detail is laid out as the console's note sheet (initiative premium-viewer, S3): a head with Before, During and After, what the meeting is about and its
|
|
7
|
+
* series line; the parts that come from the meeting's note (GET /api/notes/one) are drawn by premium-vw-meet.js. */
|
|
8
|
+
import { noteSheet, phaseOf, phaseHtml, seriesHtml, stageHtml, wireStage, PHASES, notesTablesHtml, openNoteTab, vmStyle } from './premium-vw-meet.js';
|
|
6
9
|
|
|
7
10
|
const pad = (n) => String(n).padStart(2, '0');
|
|
8
11
|
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; };
|
|
@@ -110,12 +113,14 @@ export function meetingView(row, replay, material, extra) {
|
|
|
110
113
|
const keys = rep && Array.isArray(rep.keys) ? rep.keys : [];
|
|
111
114
|
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' }));
|
|
112
115
|
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 || '' : '';
|
|
113
|
-
const
|
|
116
|
+
const S = extra && extra.sheet;
|
|
117
|
+
const notes = S ? { title: S.title, id: S.id, initiative: S.initiative, decisions: S.decisions, actions: S.actions, questions: S.questions, whyCol: S.whyCol }
|
|
118
|
+
: 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'), whyCol: false } : null;
|
|
114
119
|
const heard = rep && Number(rep.length_ms) > 0 ? Math.round(rep.length_ms / 60000) : 0;
|
|
115
120
|
return {
|
|
116
121
|
people,
|
|
117
|
-
notes, notesState: replay ? replay.state : 'none',
|
|
118
|
-
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.' : '',
|
|
122
|
+
notes, notesState: S ? 'ok' : replay ? replay.state : 'none', sheet: S || null,
|
|
123
|
+
notesLine: S ? '' : !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.' : '',
|
|
119
124
|
replay: rep && (rep.audio || heard) ? { minutes: heard, keyPoints: keys.length, lines: Array.isArray(rep.lines) ? rep.lines.length : 0 } : null,
|
|
120
125
|
material: material && material.state === 'ok' ? (material.items || []).map((i, n) => ({ n, title: clip(i.title || i.ref || i.url, 120), kind: i.kind || '', topic: clip(i.topic, 80), 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,
|
|
121
126
|
...prepOf(row, people, material, extra, aboutOf(row.level)),
|
|
@@ -383,6 +388,7 @@ export function mountMeeting(d) {
|
|
|
383
388
|
const ctx = { state: { wsId: d.ws() }, setState: bump, FIXTURE: ST.FIXTURE };
|
|
384
389
|
R = {
|
|
385
390
|
listen: (id) => V.listenNow(ctx, id), pause: () => V.pauseListening(ctx), listening: () => V.listeningId(), started: () => V.liveStarted(), banner: () => V.takeBanner(),
|
|
391
|
+
highlight: (id) => V.highlightNow(ctx, id), highlighting: () => V.highlightBusy(),
|
|
386
392
|
async stop(id) {
|
|
387
393
|
const one = await d.pmGet('/api/notes/one?id=' + encodeURIComponent(id)), note = one && one.ok ? one.note : null;
|
|
388
394
|
const { discardable } = await import('./note-dock.js');
|
|
@@ -401,6 +407,19 @@ export function mountMeeting(d) {
|
|
|
401
407
|
if (!made || made.ok !== true) return { ok: false, error: (made && made.error) || 'The note was not made.' };
|
|
402
408
|
return ctl.resume(made.note.id);
|
|
403
409
|
},
|
|
410
|
+
/** New in the Record control: an untitled note with no meeting, listened to at once (the console's recordNew). */
|
|
411
|
+
async fresh() {
|
|
412
|
+
if (HOLD || liveRows(NR).some((n) => n.state === 'recording')) return { ok: false, error: 'A meeting is recording. Pause or stop it first.' };
|
|
413
|
+
const made = await d.pmPost('/api/notes/new', { title: '' });
|
|
414
|
+
if (!made || made.ok !== true) return { ok: false, error: (made && made.error) || 'The note was not made.' };
|
|
415
|
+
const res = await ctl.resume(made.note.id); return res.ok ? { ok: true, id: made.note.id } : res;
|
|
416
|
+
},
|
|
417
|
+
/** Highlight: the last 30 seconds and the next ones, made into a highlight from the transcript when the window closes (the console's highlightNow). */
|
|
418
|
+
async highlight() {
|
|
419
|
+
if (!HOLD) return { ok: false, error: 'This page is not recording.' };
|
|
420
|
+
const rec = await recorder(); const ok = rec.highlight ? rec.highlight(HOLD.id) : false;
|
|
421
|
+
return ok === false ? { ok: false, error: 'The highlight was not started.' } : { ok: true };
|
|
422
|
+
},
|
|
404
423
|
async resume(id) {
|
|
405
424
|
const rec = await recorder(); const ok = await rec.listen(id);
|
|
406
425
|
await readNotes();
|
|
@@ -417,7 +436,14 @@ export function mountMeeting(d) {
|
|
|
417
436
|
return res && res.ok === true ? { ok: true } : { ok: false, error: (res && res.error) || 'The meeting was not stopped.' };
|
|
418
437
|
},
|
|
419
438
|
};
|
|
420
|
-
|
|
439
|
+
/** Today's meetings the Record menu lists: of today, not ended more than 10 minutes ago (recordable), from the week the card read. */
|
|
440
|
+
async function todayRows() {
|
|
441
|
+
if (!W || W.state !== 'ok') await readWeek();
|
|
442
|
+
return W && W.state === 'ok' ? W.days.flatMap((x) => x.rows).filter((r) => recordable(r)) : [];
|
|
443
|
+
}
|
|
444
|
+
window.__premiumRec = { pause: ctl.pause, resume: ctl.resume, stop: ctl.stop, record: ctl.record, fresh: ctl.fresh, highlight: ctl.highlight, today: todayRows,
|
|
445
|
+
highlighting: () => { const r = window.__premiumRecorder || R; return r && r.highlighting ? r.highlighting() : null; }, started: () => { const r = window.__premiumRecorder || R; return r ? r.started() : null; }, notes: () => NR,
|
|
446
|
+
note: (id) => NR.find((n) => n.id === id) || null, refresh: readNotes, open: (id) => openNote(id) };
|
|
421
447
|
/* Leaving the Briefing while it holds the recorder: the browser asks first, and if the PM leaves, the meeting is paused (it stays open for an hour) so the record never says "recording" for audio nobody is capturing. */
|
|
422
448
|
addEventListener('beforeunload', (e) => { if (HOLD) { e.preventDefault(); e.returnValue = ''; } });
|
|
423
449
|
addEventListener('pagehide', () => { if (HOLD) d.pmPost('/api/notes/pause', { id: HOLD.id }, { keepalive: true }); });
|
|
@@ -471,35 +497,39 @@ export function mountMeeting(d) {
|
|
|
471
497
|
const IC = { spark: '<path d="M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z"/>', clock: '<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>', scale: '<path d="M12 4v16M6 20h12M5 8h14M5 8l-2 6a3 3 0 0 0 4 0zM19 8l-2 6a3 3 0 0 0 4 0z"/>', doc: '<path d="M7 3h7l4 4v14H7zM14 3v4h4"/>', user: '<circle cx="12" cy="8" r="4"/><path d="M4 21c1-4 4-6 8-6s7 2 8 6"/>', link: '<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>', mic: '<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3"/>', plus: '<path d="M12 5v14M5 12h14"/>', x: '<path d="M6 6l12 12M18 6 6 18"/>', check: '<path d="M5 12.5l4.5 4.5L19 7.5"/>' };
|
|
472
498
|
const ic = (n) => `<svg class="i" viewBox="0 0 24 24">${IC[n]}</svg>`;
|
|
473
499
|
const secH = (t, tag, extra) => `<h4 class="sh">${esc(t)}${tag ? ` <small>${esc(tag)}</small>` : ''}${extra || ''}</h4>`;
|
|
474
|
-
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>`;
|
|
475
500
|
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>`;
|
|
476
501
|
|
|
477
502
|
function detailHtml(v, boards, inis, saved, ui) {
|
|
478
|
-
const r = v.row, lv = r.level, note = noteOfRow(NR, r);
|
|
503
|
+
const r = v.row, lv = r.level, note = noteOfRow(NR, r), S = v.sheet;
|
|
479
504
|
const aboutNow = lv ? aboutOf(lv) : saved || '';
|
|
480
505
|
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']]);
|
|
481
506
|
const link = `<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="addb pri" id="mtgLink" disabled>Link it</button></div>
|
|
482
507
|
<p class="note" id="mtgMsg" role="status">The link applies to every occurrence of “${esc(r.title)}”. The calendar itself is never written.</p>`;
|
|
483
508
|
const n = v.notes;
|
|
484
|
-
const task = n && n.actions.length ? { done: ui.tasked } : null;
|
|
485
|
-
const notes = v.notesLine ? `<p class="mut">${esc(v.notesLine)}</p>` : [n.title ? `<p><b>${esc(n.title)}</b></p>` : '',
|
|
486
|
-
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)}` : '',
|
|
487
|
-
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="mut">The note holds no decisions, next steps or questions yet.</p>'].join('');
|
|
488
509
|
const person = (nm) => `<span class="pp"><i class="av2">${esc(String(nm).trim().charAt(0).toUpperCase())}</i>${esc(clip(nm, 40))}</span>`;
|
|
489
|
-
const prow = (x) => `<div class="prow"><span class="pi${x.ok ? '' : ' w'}">${ic(x.ic)}</span><div><b>${esc(x.l)}</b><div class="pv">${x.about && aboutNow ? '<span>It is about <b>' + esc(aboutNow) + '</b
|
|
510
|
+
const prow = (x) => `<div class="prow"><span class="pi${x.ok ? '' : ' w'}">${ic(x.ic)}</span><div><b>${esc(x.l)}</b><div class="pv">${x.about && aboutNow ? '<span>It is about <b>' + esc(aboutNow) + '</b>.</span>' : x.people ? x.people.map(person).join('') : x.chips && x.chips.length ? x.chips.map((c) => `<span class="chp sm">${ic('doc')}${esc(c)}</span>`).join('') : '<span>' + esc(x.text) + '</span>'}</div></div>${x.ok ? '<span class="chp ok sm"><i></i>Ready</span>' : '<span class="chp warn sm"><i></i>Not yet</span>'}</div>`;
|
|
490
511
|
const ready = v.prepReady;
|
|
491
512
|
const prep = secH('Prepared for you', ready === v.prep.length ? 'all ready' : ready + ' of ' + v.prep.length + ' ready') + `<div class="prows">${v.prep.map(prow).join('')}</div>`;
|
|
492
513
|
const mats = v.materialLine ? `<p class="mut">${esc(v.materialLine)}</p>` : `<div class="mats">${v.material.map((m) => `<div class="mat"><span class="kd">${esc(m.kind || 'link')}</span><div><b>${esc(m.title)}</b><small>${esc([m.topic, 'for ' + m.scope].filter(Boolean).join(' · '))}</small></div><span class="mb">${m.removable ? `<button class="ib2 mtg-rm" data-rm="${m.n}" aria-label="Remove ${esc(m.title)}" title="${esc(m.line)}">${ic('x')}</button>` : ''}</span></div>`).join('')}</div>`;
|
|
493
514
|
const mat = secH('Material', v.material && v.material.length ? v.material.length + ' linked' : '', `<button class="addb" id="mmAdd" title="Your calendar invite is not changed.">${ic('plus')}Add material</button>`) + mats;
|
|
494
515
|
const prev = secH('Previous meetings', v.prev.length ? v.prev.length + ' before this' : '') + (v.prev.length ? `<div class="prevs">${v.prev.map((p) => `<div class="pvx"><div class="pvh"><time>${esc(p.date)}</time><span>${p.decided} decided</span><span>${p.steps} new next ${p.steps === 1 ? 'step' : 'steps'}</span></div></div>`).join('')}</div>` : '<p class="mut">No earlier notes of this meeting are kept.</p>');
|
|
495
516
|
const tops = secH('Topics', v.planned.length ? 'planned' : '') + (v.planned.length ? `<div class="tops">${v.planned.map((t, i) => `<div class="tp plan"><i>${i + 1}</i><span>${esc(clip(t.text, 120))}</span><small>planned</small></div>`).join('')}</div>` : '<p class="mut">The meeting has no topics yet.</p>');
|
|
496
|
-
|
|
497
|
-
const
|
|
517
|
+
/* After: from the note's own record when the meeting has one (premium-vw-meet.js), else the decisions, steps and questions the replay answer holds */
|
|
518
|
+
const task = { has: (i) => ui.tasked.has(i) };
|
|
519
|
+
const sx = { esc, tasked: task, replayBtn: !!v.replay, where: 'meeting', id: S ? S.id : null };
|
|
520
|
+
const after = S ? stageHtml('after', S, sx)
|
|
521
|
+
: secH('Notes', v.notesLine ? '' : 'from the meeting note') + (v.notesLine ? `<p class="mut">${esc(v.notesLine)}</p>` : (n.title ? `<p><b>${esc(n.title)}</b></p>` : '') + notesTablesHtml(n, esc, task) + ((n.decisions.length + n.actions.length + n.questions.length) ? '' : '<p class="mut">The note holds no decisions, next steps or questions yet.</p>'))
|
|
522
|
+
+ (v.replay ? secH('Replay', 'kept on this machine') + `<p>A recording is kept: ${v.replay.minutes ? v.replay.minutes + ' min, ' : ''}${v.replay.keyPoints} key ${v.replay.keyPoints === 1 ? 'point' : 'points'}.</p><div class="mtg-foot"><button class="addb pri" data-m3="replay">Replay</button><span class="note">Plays the note’s audio kept on this machine, with the transcript and the key points.</span></div>` : '');
|
|
498
523
|
const chips = statusChips(r, note).map((c) => `<span class="chp${c.kind ? ' ' + c.kind : ''}"><i></i>${esc(c.text)}</span>`).join('');
|
|
499
|
-
const done = !!(note && note.state === 'ended') || (r.past && !!v.replay);
|
|
500
524
|
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>';
|
|
501
|
-
const
|
|
502
|
-
|
|
525
|
+
const when = esc(r.day) + ' · ' + esc(r.time) + (r.end && hasTime(r.end) ? ' to ' + esc(hhmm(r.end)) : '') + (r.len ? ' · ' + esc(r.len) : '');
|
|
526
|
+
const hdr = `<div class="mh2"><div><h3 class="d1">${esc(r.title)}</h3>${v.people.length ? `<p class="mt">With ${esc(v.people.join(', '))}</p>` : ''}</div><div class="chs">${chips}</div></div>`;
|
|
527
|
+
const lines = `<div class="vm-ln">${ic('clock')}<span>${when}</span></div><div class="vm-ln">${ic('link')}${aboutNow ? `<span>It is about <b>${esc(aboutNow)}</b>.${lv && lv.why ? ' ' + esc(lv.why) + '.' : ''}</span>` : `<span class="mut">${r.past ? 'The calendar answer holds no link for an earlier meeting.' : 'Not linked yet.'}</span>`}<button type="button" class="vm-lk" data-vm="about" aria-expanded="${!!ui.about}">${aboutNow ? 'Change' : 'Link it'}</button></div><div class="vm-about"${ui.about ? '' : ' hidden'}>${link}</div>`;
|
|
528
|
+
const ph = ui.phase || 'before', part = (k, html) => `<div class="vm-body" data-part="${k}"${ph === k ? '' : ' hidden'}>${html}</div>`;
|
|
529
|
+
return `<article class="paper doc mtg vm">${status}${hdr}${lines}${seriesHtml(S, esc)}${actsHtml(r, ui)}${phaseHtml(ph, esc)}`
|
|
530
|
+
+ part('before', stageHtml('before', S, sx) + [prep, mat, prev, tops].join(''))
|
|
531
|
+
+ part('during', stageHtml('during', S, sx))
|
|
532
|
+
+ part('after', after) + '</article>';
|
|
503
533
|
}
|
|
504
534
|
function sheetHtml(row) {
|
|
505
535
|
return `<article class="paper doc mtg mtg-sheet"><button class="mtg-b" id="mmBack">Back to the meeting</button>
|
|
@@ -508,9 +538,25 @@ export function mountMeeting(d) {
|
|
|
508
538
|
${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>`;
|
|
509
539
|
}
|
|
510
540
|
|
|
541
|
+
/** Make task: the step goes into the first stage of the note's initiative (POST /api/plan-items). Answers { ok, text, undo? }. */
|
|
542
|
+
async function planTask(n, step) {
|
|
543
|
+
if (!n || !n.initiative) return { ok: false, text: taskEvent(n, step, null).reason };
|
|
544
|
+
const lay = await d.pmGet('/api/plan-items?ladder=0&ws=' + encodeURIComponent(n.initiative.ws) + '&id=' + encodeURIComponent(n.initiative.id));
|
|
545
|
+
const plan = taskEvent(n, step, lay && lay.ok && (lay.stages || [])[0]);
|
|
546
|
+
if (!plan.ok) return { ok: false, text: 'The task was not made: ' + plan.reason };
|
|
547
|
+
const res = await d.pmPost('/api/plan-items', { ws: plan.ws, events: [plan.event] });
|
|
548
|
+
if (!res || res.ok !== true) return { ok: false, text: 'The task was not made' + (res && res.error ? ': ' + res.error : '.') };
|
|
549
|
+
const item = res.written && res.written[0] && res.written[0].item;
|
|
550
|
+
return { ok: true, text: `Added to ${n.initiative.name}, under ${(lay.stages[0].label || lay.stages[0].id)}.`, undo: item ? async () => {
|
|
551
|
+
const u = await d.pmPost('/api/plan-items', { ws: plan.ws, events: [{ ev: 'withdrawn', item, initiative: n.initiative.id }] });
|
|
552
|
+
return u && u.ok === true ? { ok: true } : { ok: false, text: 'The task was not withdrawn' + (u && u.error ? ': ' + u.error : '.') };
|
|
553
|
+
} : null };
|
|
554
|
+
}
|
|
555
|
+
|
|
511
556
|
async function openRow(row, via) {
|
|
557
|
+
delete $('#oMain').dataset.ready;
|
|
512
558
|
let replay = null, material = null, extra = { prev: [], topics: [] }, boards = W ? W.boards : [], inis = W ? W.initiatives : [], saved = '';
|
|
513
|
-
const ui = { view: 'detail', status: null, tasked: new Set() }, SH = { sug: null, found: [], pick: null, scope: 'meeting', q: '', link: '', token: 0, topics: [], topic: null };
|
|
559
|
+
const ui = { view: 'detail', status: null, tasked: new Set(), phase: 'before', picked: false }, SH = { sug: null, found: [], pick: null, scope: 'meeting', q: '', link: '', token: 0, topics: [], topic: null };
|
|
514
560
|
let stT = null, findT = null, undoFn = null;
|
|
515
561
|
const view = () => meetingView(row, replay, material, extra);
|
|
516
562
|
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); };
|
|
@@ -518,6 +564,7 @@ export function mountMeeting(d) {
|
|
|
518
564
|
const pane = $('#dOut'), top = pane ? pane.scrollTop : 0, same = ui.last === ui.view; ui.last = ui.view;
|
|
519
565
|
$('#oMain').innerHTML = ({ add: () => sheetHtml(row), focus: focusHtml, replay: replayHtml }[ui.view] || (() => detailHtml(view(), boards, inis, saved, ui)))();
|
|
520
566
|
if (ui.view === 'add') paintSheet();
|
|
567
|
+
else if (ui.view === 'detail') { const S = view().sheet, sx = { esc, tasked: { has: (i) => ui.tasked.has(i) }, replayBtn: !!view().replay, where: 'meeting', id: S ? S.id : null, reread: async () => { await readSheet(); paint(); } }; for (const [k] of PHASES) wireStage(k, $(`#oMain .vm-body[data-part="${k}"]`), S, sx); }
|
|
521
568
|
if (pane && same) pane.scrollTop = top;
|
|
522
569
|
};
|
|
523
570
|
const alive = (v) => ui.view === v && $('#dlg').classList.contains('on') && $('#dTitle').textContent === row.title;
|
|
@@ -676,7 +723,20 @@ export function mountMeeting(d) {
|
|
|
676
723
|
const mt = await d.pmGet(matPath());
|
|
677
724
|
material = mt && mt.ok === true ? { state: 'ok', items: mt.items || [] } : { state: 'error', error: (mt && mt.error) || 'no answer' };
|
|
678
725
|
}
|
|
726
|
+
/* The meeting's note, as the console's note sheet reads it (GET /api/notes/one): Before, During and After draw its parts. */
|
|
727
|
+
async function readSheet() {
|
|
728
|
+
const nt = noteOfRow(NR, row);
|
|
729
|
+
const one = nt ? await d.pmGet('/api/notes/one?id=' + encodeURIComponent(nt.id)) : null;
|
|
730
|
+
extra = { ...extra, sheet: noteSheet(one) };
|
|
731
|
+
}
|
|
732
|
+
/* The stage the head opens on, until the PM picks one: During while the note records, After once there are notes, else Before. */
|
|
733
|
+
function pickPhase() {
|
|
734
|
+
if (ui.picked) return;
|
|
735
|
+
const v = view(), n = v.notes, nt = noteOfRow(NR, row);
|
|
736
|
+
ui.phase = phaseOf({ noteState: nt && nt.state, hasNotes: !!(v.sheet && v.sheet.overview) || !!v.replay || !!(n && n.decisions.length + n.actions.length + n.questions.length) });
|
|
737
|
+
}
|
|
679
738
|
const matPath = () => '/api/meeting-material?event=' + encodeURIComponent(row.id) + '&title=' + encodeURIComponent(row.title) + (row.series ? '&series=' + encodeURIComponent(row.series) : '') + '&date=' + row.day;
|
|
739
|
+
vmStyle();
|
|
680
740
|
d.openDlg({ eye: 'Calendar · real data', title: row.title, sub: [row.day, row.time, row.len, row.who && row.who.length ? row.who.join(', ') : ''].filter(Boolean).join(' · '), noteKey: via === 'today' ? 'ev:meeting:' + Date.parse(row.at) : null,
|
|
681
741
|
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' });
|
|
682
742
|
if (via !== 'today') $('#askF').hidden = true;
|
|
@@ -686,11 +746,13 @@ export function mountMeeting(d) {
|
|
|
686
746
|
material = mt && mt.ok === true ? { state: 'ok', items: mt.items || [] } : { state: 'error', error: (mt && mt.error) || 'no answer' };
|
|
687
747
|
await readNotes();
|
|
688
748
|
if ($('#dTitle').textContent !== row.title) return;
|
|
689
|
-
|
|
749
|
+
await readSheet();
|
|
750
|
+
if ($('#dTitle').textContent !== row.title) return;
|
|
751
|
+
pickPhase(); paint(); if (HOLD) tickClock(); mark();
|
|
690
752
|
{
|
|
691
753
|
const sk = (noteOfRow(NR, row) || {}).series, [sr, tp] = await Promise.all([sk && sk.key ? d.pmGet('/api/notes/series?key=' + encodeURIComponent(sk.key)) : null, d.pmGet(matPath() + '&topics=1')]);
|
|
692
754
|
if ($('#dTitle').textContent !== row.title) return;
|
|
693
|
-
extra = { prev: prevOf(sr, row), topics: tp && tp.ok && Array.isArray(tp.topics) ? tp.topics.filter((t) => t && t.text).slice(0, 8) : [] };
|
|
755
|
+
extra = { ...extra, prev: prevOf(sr, row), topics: tp && tp.ok && Array.isArray(tp.topics) ? tp.topics.filter((t) => t && t.text).slice(0, 8) : [] };
|
|
694
756
|
if (ui.view === 'detail') paint();
|
|
695
757
|
}
|
|
696
758
|
|
|
@@ -704,19 +766,20 @@ export function mountMeeting(d) {
|
|
|
704
766
|
}
|
|
705
767
|
async function makeTask(i) {
|
|
706
768
|
const n = view().notes, step = n && n.actions[i]; if (!step) return;
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
const plan = taskEvent(n, step, lay && lay.ok && (lay.stages || [])[0]);
|
|
710
|
-
if (!plan.ok) return say('The task was not made: ' + plan.reason);
|
|
711
|
-
const res = await d.pmPost('/api/plan-items', { ws: plan.ws, events: [plan.event] });
|
|
712
|
-
if (!res || res.ok !== true) return say('The task was not made' + (res && res.error ? ': ' + res.error : '.'));
|
|
769
|
+
const res = await planTask(n, step);
|
|
770
|
+
if (!res.ok) return say(res.text);
|
|
713
771
|
ui.tasked.add(i);
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
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 : '.'));
|
|
772
|
+
say(res.text, res.undo ? async () => {
|
|
773
|
+
const u = await res.undo();
|
|
774
|
+
if (u.ok) { ui.tasked.delete(i); say('The task is withdrawn.'); } else say(u.text);
|
|
718
775
|
} : null);
|
|
719
776
|
}
|
|
777
|
+
async function member(key) {
|
|
778
|
+
const S = view().sheet; if (!S) return;
|
|
779
|
+
const r = await d.pmPost('/api/notes/series-member', { id: S.id, key });
|
|
780
|
+
if (!r || r.ok !== true) return say('Not saved' + (r && r.error ? ': ' + r.error : '.'));
|
|
781
|
+
await readSheet(); say(key === 'off' ? 'Taken out of the series.' : 'Back in its series.');
|
|
782
|
+
}
|
|
720
783
|
async function openSheet() {
|
|
721
784
|
ui.view = 'add'; SH.sug = null; SH.found = []; SH.pick = null; SH.q = ''; SH.link = ''; SH.topics = []; SH.topic = null; paint();
|
|
722
785
|
$('#mmBack').focus();
|
|
@@ -736,10 +799,21 @@ export function mountMeeting(d) {
|
|
|
736
799
|
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);
|
|
737
800
|
}
|
|
738
801
|
};
|
|
802
|
+
$('#oMain').dataset.ready = 'meeting'; // the dialog's answers are read and its presses are live (the Before / During / After switch holds from here)
|
|
739
803
|
$('#oMain').onchange = (e) => { if (e.target.id === 'mtgSel') $('#mtgLink').disabled = !e.target.value; };
|
|
740
804
|
$('#oMain').onclick = async (e) => {
|
|
741
805
|
const t = e.target.closest('button'); if (!t) return;
|
|
742
806
|
if (t.dataset.m3) return m3Press(t.dataset.m3, t);
|
|
807
|
+
if (t.dataset.ph) {
|
|
808
|
+
ui.phase = t.dataset.ph; ui.picked = true;
|
|
809
|
+
$$('#oMain .vm-ph [data-ph]').forEach((b) => b.setAttribute('aria-pressed', String(b === t)));
|
|
810
|
+
$$('#oMain .vm-body[data-part]').forEach((x) => { x.hidden = x.dataset.part !== ui.phase; });
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
if ((t.dataset.vm === 'prev' || t.dataset.vm === 'next') && t.dataset.id) return openNoteTab({ pmGet: d.pmGet, pmPost: d.pmPost, esc, toast: d.toast, task: planTask }, t.dataset.id);
|
|
814
|
+
if (t.dataset.vm === 'about') { ui.about = !ui.about; t.setAttribute('aria-expanded', String(ui.about)); const x = $('#oMain .vm-about'); if (x) x.hidden = !ui.about; if (ui.about) $('#mtgSel').focus(); return; }
|
|
815
|
+
if (t.dataset.vm === 'serout') return member('off');
|
|
816
|
+
if (t.dataset.vm === 'serback') return member(null);
|
|
743
817
|
if (t.id === 'mmAdd') return openSheet();
|
|
744
818
|
if (t.id === 'mmBack' || t.id === 'mmCancel') return closeSheet(true);
|
|
745
819
|
if (t.dataset.pick) { SH.pick = pickOf(t.dataset.pick); paintSheet(); return; }
|
|
@@ -764,7 +838,7 @@ export function mountMeeting(d) {
|
|
|
764
838
|
t.disabled = true;
|
|
765
839
|
const res = await d.pmPost('/api/calendar-links', body);
|
|
766
840
|
if (!res || res.ok !== true) { t.disabled = false; $('#mtgMsg').textContent = (res && res.error) || 'The link could not be saved.'; return; }
|
|
767
|
-
saved = body.kind === 'none' ? '' : $('#mtgSel').selectedOptions[0].textContent;
|
|
841
|
+
saved = body.kind === 'none' ? '' : $('#mtgSel').selectedOptions[0].textContent; ui.about = false;
|
|
768
842
|
d.toast(body.kind === 'none' ? 'The link is removed for every occurrence of this meeting.' : 'Linked. It applies to every occurrence of this meeting.');
|
|
769
843
|
await readWeek(); paint(); if (other()) draw();
|
|
770
844
|
};
|
|
@@ -784,5 +858,5 @@ export function mountMeeting(d) {
|
|
|
784
858
|
$('#tl').addEventListener('click', (e) => { const b = e.target.closest('.ev[data-w]'); if (!b) return; e.stopImmediatePropagation(); const r = rowOf(b.dataset.w); if (r) openRow(r, 'week'); }, true);
|
|
785
859
|
readNotes().then(() => mark());
|
|
786
860
|
{ const want = new URLSearchParams(location.search).get('meeting'); if (want) { history.replaceState(null, '', location.pathname + location.search.replace(/[?&]meeting=[^&]*/, '').replace(/^&/, '?')); setTimeout(() => openNote(want), 600); } }
|
|
787
|
-
return { mode: () => (other() ? 'day' : 'today'), draw, openToday, busy: () => busy, mark, openNote, openRow: (row) => openRow(row, 'week') }; // openRow: the full calendar (premium-vw-cal.js)
|
|
861
|
+
return { mode: () => (other() ? 'day' : 'today'), draw, openToday, busy: () => busy, mark, openNote, task: planTask, openRow: (row) => openRow(row, 'week') }; // openRow: the full calendar (premium-vw-cal.js)
|
|
788
862
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { pmGet, pmPost } from './http.js';
|
|
3
3
|
import { recChipView, STOP_LINE } from './premium-meeting.js';
|
|
4
4
|
import { vwReset } from './premium-viewer.js';
|
|
5
|
+
import { chipActs, openLive, openFocus, mountRecord, HL_LINE } from './premium-vw-rec.js';
|
|
5
6
|
import { lineItems, behindOf, refreshTargets, whenRead } from './freshness-words.js';
|
|
6
7
|
export const $ = (s, r = document) => r.querySelector(s);
|
|
7
8
|
export const $$ = (s, r = document) => [...r.querySelectorAll(s)];
|
|
@@ -295,17 +296,21 @@ function mountRecChip(here) {
|
|
|
295
296
|
if (!v) { c.hidden = true; c.innerHTML = ''; ask = false; return; }
|
|
296
297
|
c.hidden = false; c.dataset.mode = v.mode;
|
|
297
298
|
if (ask) { c.innerHTML = `<span>Stop “${esc(v.title)}” for good? ${esc(STOP_LINE)}</span><button data-r="no">Cancel</button>${v.held ? '<button data-r="pause">Pause instead</button>' : ''}<button data-r="stopgo">Stop for good</button>`; return; }
|
|
298
|
-
|
|
299
|
+
const L = { hl: 'Highlight', pause: 'Pause', fv: 'Focus', open: 'Open', resume: 'Resume', stop: 'Stop' }; // the presses premium-vw-rec.js gives this page
|
|
300
|
+
c.innerHTML = `<i${v.mode === 'paused' ? ' class="paused"' : ''}></i><span>${esc(msg || v.text)}</span>${chipActs(v, here).map((a) => `<button data-r="${a}"${a === 'hl' ? ` title="${esc(HL_LINE)}"` : ''}>${L[a]}</button>`).join('')}`;
|
|
299
301
|
};
|
|
300
302
|
const read = async () => { const r = await pmGet('/api/notes'); if (r && r.ok === true && Array.isArray(r.notes)) rows = r.notes; draw(); };
|
|
301
303
|
c.addEventListener('click', async (e) => {
|
|
302
304
|
const b = e.target.closest('button'); if (!b) return;
|
|
303
305
|
const v = recChipView(rows, { holdingId: holding(), here }); if (!v) return;
|
|
304
306
|
const act = b.dataset.r; msg = '';
|
|
305
|
-
|
|
307
|
+
const d = { openDlg, toast, pmGet, pmPost };
|
|
308
|
+
if (act === 'open') { if (here === 'brief' && window.__premiumRec) openLive(v.id, d); else location.assign('/premium.html?meeting=' + encodeURIComponent(v.id)); return; }
|
|
309
|
+
if (act === 'fv') { openFocus(v.id, d); return; }
|
|
306
310
|
if (act === 'stop') { ask = true; draw(); const g = c.querySelector('[data-r="no"]'); if (g) g.focus(); return; }
|
|
307
311
|
if (act === 'no') { ask = false; draw(); return; }
|
|
308
312
|
b.disabled = true;
|
|
313
|
+
if (act === 'hl') { const r = window.__premiumRec ? await window.__premiumRec.highlight() : { ok: false }; msg = r.ok ? 'Highlighting the last 30 seconds and the next ones.' : (r.error || 'The highlight was not started.'); draw(); setTimeout(() => { msg = ''; draw(); }, 6000); return; }
|
|
309
314
|
if (act === 'pause') { ask = false; const r = window.__premiumRec ? await window.__premiumRec.pause() : { ok: false }; msg = r.ok ? '' : (r.error || 'It was not paused.'); }
|
|
310
315
|
else if (act === 'resume') { const r = window.__premiumRec ? await window.__premiumRec.resume(v.id) : { ok: false }; msg = r.ok ? '' : (r.error || 'It was not resumed.'); }
|
|
311
316
|
else if (act === 'stopgo') {
|
|
@@ -317,6 +322,7 @@ function mountRecChip(here) {
|
|
|
317
322
|
});
|
|
318
323
|
addEventListener('premium-rec', read);
|
|
319
324
|
read(); setInterval(read, 20000);
|
|
325
|
+
mountRecord(here, { openDlg, toast, pmGet, pmPost });
|
|
320
326
|
}
|
|
321
327
|
export function wireRail(here) {
|
|
322
328
|
mountRecChip(here);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
:root{--fs-1:11px;--fs-2:12px;--fs-3:14px;--fs-4:16px;--fs-5:20px;--fs-6:28px}
|
|
2
|
+
/* pm/premium-vw-backlog.css — the Jira backlog as a viewer tab (initiative premium-viewer, R10; premium-vw-backlog.js).
|
|
3
|
+
* Loaded once by vwStyle('backlog'). Sizes are only var(--fs-1..6), weights 400/500/600 (premium-console-type.test.js). */
|
|
4
|
+
.vbl .bl{display:grid;gap:14px}
|
|
5
|
+
.vbl .bl-src{margin:0;font-size:var(--fs-2);color:var(--ink-3)}
|
|
6
|
+
.vbl .bl-f{display:flex;gap:4px;flex-wrap:wrap;padding:4px;border-radius:8px;background:var(--well);width:max-content;max-width:100%}
|
|
7
|
+
.vbl .bl-f button{min-height:44px;padding:0 16px;border-radius:6px;font-size:var(--fs-2);font-weight:600;color:var(--ink-2)}
|
|
8
|
+
.vbl .bl-f button[aria-pressed="true"]{background:var(--solid);color:var(--on-solid)}
|
|
9
|
+
.vbl .bl-s{background:var(--card-solid);border:1px solid var(--hair);border-radius:8px;box-shadow:var(--card-shadow);overflow:hidden}
|
|
10
|
+
.vbl .bl-h{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--hair)}
|
|
11
|
+
.vbl .bl-h b{font-size:var(--fs-3);font-weight:600}
|
|
12
|
+
.vbl .bl-h small{font-size:var(--fs-2);color:var(--ink-3)}
|
|
13
|
+
.vbl .bl-gap{flex:1}
|
|
14
|
+
.vbl .bl-rws{list-style:none;margin:0;padding:0}
|
|
15
|
+
.vbl .bl-rw{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:4px 14px;border-top:1px solid var(--hair)}
|
|
16
|
+
.vbl .bl-rw:first-child{border-top:0}
|
|
17
|
+
.vbl .bl-rw.risk{box-shadow:inset 3px 0 0 var(--bad)}
|
|
18
|
+
.vbl .bl-t{flex:1 1 220px;min-width:0;min-height:44px;display:flex;align-items:center;gap:10px;text-align:left;font-size:var(--fs-3);color:var(--ink)}
|
|
19
|
+
.vbl .bl-t b{font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
20
|
+
@media (hover:hover){.vbl .bl-t:hover b{text-decoration:underline;text-underline-offset:3px}}
|
|
21
|
+
.vbl .bl-k{font:500 var(--fs-2) var(--mono);color:var(--ink-3);flex:none}
|
|
22
|
+
.vbl .bl-m{display:flex;align-items:center;gap:8px;flex:none}
|
|
23
|
+
.vbl .bl-st{font-size:var(--fs-1);font-weight:600;padding:2px 8px;border-radius:6px;background:var(--well);color:var(--ink-2)}
|
|
24
|
+
.vbl .bl-st.doing{color:var(--ember-ink)}
|
|
25
|
+
.vbl .bl-p{font:500 var(--fs-2) var(--mono);min-width:24px;text-align:center;padding:1px 6px;border-radius:6px;border:1px solid var(--hair);color:var(--ink-2)}
|
|
26
|
+
.vbl .bl-in{font-size:var(--fs-2);color:var(--ink-3);max-width:16ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
27
|
+
.vbl .bl-why{flex-basis:100%;margin:-6px 0 6px;font-size:var(--fs-2);color:var(--bad)}
|
|
28
|
+
.vbl .bl-none,.vbl .bl-empty{margin:0;padding:12px 14px;font-size:var(--fs-2);color:var(--ink-3)}
|
|
29
|
+
.vbl .bl-f button:focus-visible,.vbl .bl-t:focus-visible{outline:2px solid var(--ember);outline-offset:2px}
|
|
30
|
+
@media (max-width:560px){.vbl .bl-in{display:none}}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* pm/premium-vw-backlog.js — the Jira backlog of a board as a viewer tab (initiative premium-viewer, R10).
|
|
2
|
+
* The open sprints first (active, then the next ones), then the Backlog: the board's tickets in no sprint and not done. Each row shows
|
|
3
|
+
* its key, title, status, points and initiative; a blocked ticket says why. A row opens its ticket (the Jira ticket tab when that view
|
|
4
|
+
* is on the page, else its Jira page).
|
|
5
|
+
*
|
|
6
|
+
* WHERE EACH PART COMES FROM. GET /api/boards/sprints?ws&board answers { source, readAt, sprints, backlog } (lib/routes-boards.js;
|
|
7
|
+
* scripts/boards.js sprintsOf and backlogOf), read from the Jira status check's saved readings. Nothing is invented. What the records
|
|
8
|
+
* do not hold is not drawn, and the tab says so once:
|
|
9
|
+
* - only the tickets PMOS knows: the ones the board's initiatives pushed, or the children of their linked epics. The rest of the Jira
|
|
10
|
+
* backlog is not read.
|
|
11
|
+
* - no rank (the list goes by key), no assignee, no sprint capacity: the readings hold none of them.
|
|
12
|
+
* - read-only: moving a ticket between sprints or ranking it happens in Jira (Jira owns sprint and rank, D88). */
|
|
13
|
+
import { vwOpen, vwStyle } from './premium-viewer.js';
|
|
14
|
+
|
|
15
|
+
const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
|
|
16
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
17
|
+
const dm = (d) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(d || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
|
|
18
|
+
const pts = (n) => (Math.round(n * 10) / 10) + (n === 1 ? ' point' : ' points');
|
|
19
|
+
const STATE = { active: 'Active', future: 'Next' };
|
|
20
|
+
|
|
21
|
+
/** The tab's model from the answer of /api/boards/sprints: { readAt, sections: [{ id, name, sub, items, points, rows }], links, empty } or null. */
|
|
22
|
+
export function backlogModel(r) {
|
|
23
|
+
if (!r || r.ok !== true) return null;
|
|
24
|
+
const bl = r.backlog || { issues: [], points: null, links: {}, readAt: null };
|
|
25
|
+
const row = (i) => ({ key: i.key, title: i.summary || i.key, status: i.status || '', cat: i.category || 'todo', points: typeof i.points === 'number' ? i.points : null,
|
|
26
|
+
type: i.type || null, initiative: i.initiative || null, blocked: i.flagged ? (i.reason || 'Blocked') : null, stale: !!i.stale, url: (bl.links || {})[i.key] || null });
|
|
27
|
+
const sum = (p, n) => (p ? pts(p.committed) + (p.unestimated ? ', ' + p.unestimated + ' not estimated' : '') : n ? 'Not estimated' : '');
|
|
28
|
+
const open = (Array.isArray(r.sprints) ? r.sprints : []).filter((s) => s.state === 'active' || s.state === 'future');
|
|
29
|
+
const sections = open.map((s) => ({
|
|
30
|
+
id: 'sp:' + s.name, name: s.name, state: s.state,
|
|
31
|
+
sub: [STATE[s.state], [dm(s.start), dm(s.end)].filter(Boolean).join(' – ')].filter(Boolean).join(' · '),
|
|
32
|
+
items: (s.issues || []).length, points: sum(s.points, (s.issues || []).length), rows: (s.issues || []).map(row),
|
|
33
|
+
}));
|
|
34
|
+
const rows = (bl.issues || []).map(row);
|
|
35
|
+
sections.push({ id: 'backlog', name: 'Backlog', state: 'backlog', sub: '', items: rows.length, points: sum(bl.points, rows.length), rows });
|
|
36
|
+
const readAt = [r.readAt, bl.readAt].filter(Boolean).sort()[0] || null; // the oldest read is the honest age
|
|
37
|
+
return { readAt, sections, empty: r.source !== 'jira' && !rows.length, bugs: sections.some((s) => s.rows.some((x) => /bug/i.test(x.type || ''))) };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Which rows a filter keeps: '' all, 'blocked', 'bug'. */
|
|
41
|
+
export const keep = (f) => (x) => (!f ? true : f === 'blocked' ? !!x.blocked : f === 'bug' ? /bug/i.test(x.type || '') : true);
|
|
42
|
+
|
|
43
|
+
const ago = (iso) => { const t = new Date(iso); if (!Number.isFinite(t.getTime())) return ''; return 'read ' + dm(t.toISOString()) + ' ' + String(t.getHours()).padStart(2, '0') + ':' + String(t.getMinutes()).padStart(2, '0'); };
|
|
44
|
+
const chip = (x) => `<span class="bl-st ${x.cat}">${esc(x.status || (x.cat === 'doing' ? 'In progress' : 'To do'))}</span>`;
|
|
45
|
+
function rowHtml(x) {
|
|
46
|
+
return `<li class="bl-rw${x.blocked ? ' risk' : ''}"><button type="button" class="bl-t" data-tk="${esc(x.key)}"${x.url ? ` data-url="${esc(x.url)}"` : ''}${x.initiative ? ` data-ini="${esc(x.initiative)}"` : ''}><span class="bl-k">${esc(x.key)}</span><b>${esc(x.title)}</b></button>`
|
|
47
|
+
+ `<span class="bl-m">${chip(x)}${x.points != null ? `<span class="bl-p" title="Story points">${esc(x.points)}</span>` : ''}${x.initiative ? `<span class="bl-in">${esc(x.initiative)}</span>` : ''}</span>`
|
|
48
|
+
+ (x.blocked ? `<span class="bl-why">${esc(x.blocked)}</span>` : '') + (x.stale ? '<span class="bl-why">Not in the last read</span>' : '') + '</li>';
|
|
49
|
+
}
|
|
50
|
+
export function backlogHtml(m, f = '') {
|
|
51
|
+
if (!m) return '<p class="bl-empty">The backlog could not be read. Try again in a moment.</p>';
|
|
52
|
+
if (m.empty) return '<p class="bl-empty">No Jira reading for this board yet. The backlog appears once the Jira status check has read the initiatives\' tickets.</p>';
|
|
53
|
+
const opts = [['', 'All'], ['blocked', 'Blocked']].concat(m.bugs ? [['bug', 'Bugs']] : []);
|
|
54
|
+
const secs = m.sections.map((s) => {
|
|
55
|
+
const rows = s.rows.filter(keep(f));
|
|
56
|
+
return `<section class="bl-s" data-sec="${esc(s.id)}"><div class="bl-h"><b>${esc(s.name)}</b>${s.sub ? `<small>${esc(s.sub)}</small>` : ''}<span class="bl-gap"></span><small>${s.items} ${s.items === 1 ? 'item' : 'items'}${s.points ? ' · ' + esc(s.points) : ''}</small></div>`
|
|
57
|
+
+ (rows.length ? `<ul class="bl-rws">${rows.map(rowHtml).join('')}</ul>` : `<p class="bl-none">${s.items ? 'None match this filter.' : s.state === 'backlog' ? 'No ticket of this board is outside a sprint.' : 'No ticket in this sprint.'}</p>`) + '</section>';
|
|
58
|
+
}).join('');
|
|
59
|
+
return `<div class="bl"><p class="bl-src">From Jira${m.readAt ? ' · ' + esc(ago(m.readAt)) : ''}. Only the tickets this board's initiatives pushed or hold under their epics, by key. Ranking and moving between sprints happen in Jira.</p>`
|
|
60
|
+
+ `<div class="bl-f" role="group" aria-label="Show">${opts.map((o) => `<button type="button" data-f="${o[0]}" aria-pressed="${f === o[0]}">${o[1]}</button>`).join('')}</div>${secs}</div>`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Opens one ticket: the Jira ticket tab when its view is on the page, else the ticket's Jira page. */
|
|
64
|
+
async function openTicket({ ws, board, initiative, key, url }) {
|
|
65
|
+
if (initiative) { try { const J = await import('./premium-vw-jira.js'); if (J && typeof J.openTicket === 'function') { J.openTicket({ ws, board, initiative, ref: key }); return; } } catch { /* no ticket view on this page */ } }
|
|
66
|
+
if (url) window.open(url, '_blank', 'noopener');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Opens the backlog of a board as a viewer tab. */
|
|
70
|
+
export function openBacklog({ ws, board, title } = {}) {
|
|
71
|
+
vwStyle('backlog');
|
|
72
|
+
let m = null; let f = '';
|
|
73
|
+
const draw = (el) => { el.innerHTML = `<div class="vbl">${m === undefined ? '<p class="bl-empty">Reading the backlog…</p>' : backlogHtml(m, f)}</div>`; };
|
|
74
|
+
return vwOpen({
|
|
75
|
+
id: 'backlog:' + (board || ''), title: title || 'Backlog', icon: 'list',
|
|
76
|
+
render: async (el) => {
|
|
77
|
+
m = undefined; draw(el);
|
|
78
|
+
const q = new URLSearchParams(); if (ws) q.set('ws', ws); if (board) q.set('board', board);
|
|
79
|
+
let r = null;
|
|
80
|
+
try { const res = await fetch('/api/boards/sprints?' + q, { credentials: 'same-origin' }); r = await res.json(); } catch { r = null; }
|
|
81
|
+
m = backlogModel(r); draw(el);
|
|
82
|
+
},
|
|
83
|
+
wire: (el) => {
|
|
84
|
+
el.onclick = (e) => { // delegated: the pane's content is drawn again on each filter
|
|
85
|
+
const b = e.target.closest('[data-f]'); if (b) { f = b.dataset.f; draw(el); return; }
|
|
86
|
+
const t = e.target.closest('[data-tk]'); if (t) openTicket({ ws, board, initiative: t.dataset.ini || null, key: t.dataset.tk, url: t.dataset.url || null });
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (typeof window !== 'undefined') window.__premiumVwBacklog = { openBacklog };
|
|
@@ -48,6 +48,7 @@ export function bodyHtml(src, o = {}) {
|
|
|
48
48
|
while (i < L.length) {
|
|
49
49
|
const l = L[i];
|
|
50
50
|
if (!l.trim()) { i++; continue; }
|
|
51
|
+
if (/^\s*<!--.*-->\s*$/.test(l)) { out.push(`<div class="vwcm" hidden contenteditable="false" data-cm="${esc(l)}"${i && L[i - 1].trim() ? ' data-tight="1"' : ''}></div>`); i++; continue; } // a whole-line HTML comment (pmos:note, pmos:slide): kept, never drawn
|
|
51
52
|
if (/^```/.test(l)) { const lang = l.slice(3).trim(), buf = []; i++; while (i < L.length && !/^```/.test(L[i])) buf.push(L[i++]); i++; out.push(codeBlock(lang, buf.join('\n'))); continue; }
|
|
52
53
|
const h = /^(#{1,6})\s+(.*)$/.exec(l);
|
|
53
54
|
if (h) { const lv = Math.min(4, Math.max(2, h[1].length)), id = 'vwh' + (start + heads.length); heads.push([lv, h[2].replace(/[*_`]/g, ''), id]); out.push(`<h${lv} id="${id}" data-md="${h[1].length}">${inl(h[2])}</h${lv}>`); i++; continue; }
|
|
@@ -82,7 +83,7 @@ export function bodyHtml(src, o = {}) {
|
|
|
82
83
|
const b = bodyHtml(buf.join('\n'), { start: start + heads.length }); heads.push(...b.heads);
|
|
83
84
|
out.push(`<details class="xp"><summary>${inl(sm ? sm[1] : 'Details')}</summary><div>${b.html}</div></details>`); continue;
|
|
84
85
|
}
|
|
85
|
-
const buf = []; while (i < L.length && L[i].trim() && !/^(#{1,6}\s|>|\s*\||```|<details|(-{3,}|\*{3,}|_{3,})\s*$)/.test(L[i]) && !isList(L[i])) buf.push(L[i++].trim());
|
|
86
|
+
const buf = []; while (i < L.length && L[i].trim() && !/^(#{1,6}\s|>|\s*\||```|<details|(-{3,}|\*{3,}|_{3,})\s*$|\s*<!--.*-->\s*$)/.test(L[i]) && !isList(L[i])) buf.push(L[i++].trim());
|
|
86
87
|
if (!buf.length) buf.push(L[i++]);
|
|
87
88
|
out.push(`<p>${inl(buf.join(' '))}</p>`);
|
|
88
89
|
}
|
|
@@ -173,7 +174,7 @@ export function mergeEdit(orig, base, now) {
|
|
|
173
174
|
const out = { fmRaw: O.fmRaw, pre: B.pre.trim() === N.pre.trim() ? O.pre : N.pre, sections: [] };
|
|
174
175
|
for (const s of N.sections) {
|
|
175
176
|
const b = bOf.get(s.name), o = oOf.get(s.name);
|
|
176
|
-
out.sections.push(same(s, b) && o ? o : { name: s.name, head: s.head, body: '\n' + s.body.trim() + '\n' });
|
|
177
|
+
out.sections.push(same(s, b) && o ? o : { name: s.name, head: s.head, body: (/^\S/.test(s.body) ? '' : '\n') + s.body.trim() + '\n' });
|
|
177
178
|
}
|
|
178
179
|
let t = joinDoc(out);
|
|
179
180
|
if (/\n$/.test(orig) && !/\n$/.test(t)) t += '\n';
|
|
@@ -169,3 +169,4 @@
|
|
|
169
169
|
.vwcp a{color:var(--vw-lnk);font-size:var(--fs-2)}
|
|
170
170
|
@media (max-width:640px){.vwchip,.vwli>button{min-height:44px}}
|
|
171
171
|
@media (hover:hover){.vwbtn:hover{background:var(--well)}.cf a:hover{text-decoration:underline}.vwtb:hover{background:var(--well);color:var(--ink)}.vwpop button:hover{background:var(--well)}.vwxmn a:hover{background:var(--well)}.vwli>button:hover{background:var(--well)}}
|
|
172
|
+
.cfb .vwcm{display:none}
|
|
@@ -38,12 +38,15 @@ function inlineMd(n) {
|
|
|
38
38
|
return s;
|
|
39
39
|
}).join('');
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
const TIGHT = '\u0000'; // marks a comment that sat on the line right after the block before it
|
|
42
|
+
export function domToMd(root) { return mdOf(root).replace(/\n\n\u0000/g, '\n').replace(/\u0000/g, ''); }
|
|
43
|
+
function mdOf(root) {
|
|
42
44
|
const B = [];
|
|
43
45
|
for (const c of root.children) {
|
|
44
46
|
const t = c.tagName, cl = c.classList;
|
|
45
|
-
if (cl.contains('vwchg')) { if (!c.dataset.hidden) { const inner = $('.vwcb', c); if (inner) B.push(
|
|
47
|
+
if (cl.contains('vwchg')) { if (!c.dataset.hidden) { const inner = $('.vwcb', c); if (inner) B.push(mdOf(inner)); } continue; }
|
|
46
48
|
if (cl.contains('vwbefore') || cl.contains('vwcl')) continue;
|
|
49
|
+
if (cl.contains('vwcm')) { B.push((c.dataset.tight ? TIGHT : '') + c.dataset.cm); continue; } // a whole-line HTML comment goes back as it was
|
|
47
50
|
if (cl.contains('pnl')) B.push(`> [!${String(c.dataset.k || 'note').toUpperCase()}]\n` + [...$('.pc', c).children].map((x) => '> ' + inlineMd(x).trim()).join('\n>\n'));
|
|
48
51
|
else if (cl.contains('tw') || t === 'TABLE') {
|
|
49
52
|
const rows = [...c.querySelectorAll('tr')].map((r) => '| ' + [...r.children].map((x) => inlineMd(x).trim().replace(/\|/g, '\\|')).join(' | ') + ' |');
|
|
@@ -54,8 +57,8 @@ export function domToMd(root) {
|
|
|
54
57
|
else if (t === 'UL' || t === 'OL') B.push([...c.children].map((li, k) => `${t === 'OL' ? k + 1 + '.' : '-'} ${inlineMd(li).trim()}`).join('\n'));
|
|
55
58
|
else if (t === 'BLOCKQUOTE') B.push('> ' + inlineMd(c).trim());
|
|
56
59
|
else if (t === 'HR') B.push('---');
|
|
57
|
-
else if (t === 'DETAILS') { const sm = $('summary', c); B.push(`<details><summary>${sm ? sm.textContent.trim() : 'Details'}</summary>\n\n${
|
|
58
|
-
else if (t === 'DIV') { const s =
|
|
60
|
+
else if (t === 'DETAILS') { const sm = $('summary', c); B.push(`<details><summary>${sm ? sm.textContent.trim() : 'Details'}</summary>\n\n${mdOf($('div', c) || c)}\n\n</details>`); }
|
|
61
|
+
else if (t === 'DIV') { const s = mdOf(c); if (s.trim()) B.push(s); }
|
|
59
62
|
else { const s = inlineMd(c).trim(); if (s) B.push(s); }
|
|
60
63
|
}
|
|
61
64
|
return B.join('\n\n');
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* pm/premium-vw-item-model.js — the pure half of the work item view (initiative premium-viewer, S7; planning/prd/premium-viewer-prd.md R9).
|
|
2
|
+
* No DOM, no request: it turns the answer of GET /api/initiative-premium (lib/initiative-premium.js build()) into the HTML of an initiative tab
|
|
3
|
+
* or a task tab, so a node test loads it with import(). Every line is a field of that model; a part the model does not hold is left out,
|
|
4
|
+
* and an answer that is still reading or failed is said as such. Every value is escaped here. */
|
|
5
|
+
|
|
6
|
+
export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
|
|
7
|
+
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
8
|
+
export const when = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(String(iso || '')); return m ? +m[3] + ' ' + MON[+m[2] - 1] : ''; };
|
|
9
|
+
const kv = (rows) => { const r = rows.filter((x) => x && x[1]); return r.length ? `<div class="kv2">${r.map(([k, v]) => `<span>${esc(k)}</span><span>${esc(v)}</span>`).join('')}</div>` : ''; };
|
|
10
|
+
const sec = (title, body) => (body ? `<section class="vwi-s"><p class="label">${esc(title)}</p>${body}</section>` : '');
|
|
11
|
+
const CHECK_TONE = { done: 'ok', blocked: 'bad', pending: 'warn' };
|
|
12
|
+
export const SHOW_TASKS = 8;
|
|
13
|
+
|
|
14
|
+
/** The view ids: the same item opened twice refills one tab. */
|
|
15
|
+
export const iniId = (id) => 'item:ini:' + id;
|
|
16
|
+
export const taskId = (ini, key) => 'item:task:' + ini + ':' + key;
|
|
17
|
+
|
|
18
|
+
/** A task row of the model by its key ('task:<uid>' or 'req:<id>'), or null. */
|
|
19
|
+
export const findTask = (m, key) => (m && m.tasks && Array.isArray(m.tasks.rows) ? m.tasks.rows.find((t) => t.key === key) || null : null);
|
|
20
|
+
|
|
21
|
+
/** The state of an answer: 'ready' with a model, 'reading' while the routes derive, or 'error' with the route's words. */
|
|
22
|
+
export function stateOf(res) {
|
|
23
|
+
if (res && res.ok && res.state === 'ready' && res.model) return { state: 'ready', model: res.model };
|
|
24
|
+
if (res && res.state === 'reading') return { state: 'reading' };
|
|
25
|
+
return { state: 'error', error: (res && res.error) || 'The route did not answer.' };
|
|
26
|
+
}
|
|
27
|
+
export const readingHtml = (what) => `<article class="paper doc vwi"><p class="vwi-wait" role="status">Reading ${esc(what)} from the board. The board derives it from its records, so this can take a moment.</p></article>`;
|
|
28
|
+
export const errorHtml = (what, error) => `<article class="paper doc vwi"><p class="vwi-wait" role="alert">${esc(what)} could not be read: ${esc(error)}</p></article>`;
|
|
29
|
+
|
|
30
|
+
/** The initiative tab. `pageHref` is the initiative page's address for the same board. */
|
|
31
|
+
export function iniHtml(m, pageHref) {
|
|
32
|
+
const h = m.head || {}, rec = (m.files || []).find((f) => /record/i.test(f.label || ''));
|
|
33
|
+
const facts = (m.rows && m.rows[0] && m.rows[0].dialog && m.rows[0].dialog.facts) || [];
|
|
34
|
+
const top = `${rec ? `<p class="dpath">${esc(rec.path)}</p>` : ''}<div class="vwi-head">${h.statusLabel ? `<span class="chp ${esc(h.tone || 'mut')}"><i></i>${esc(h.statusLabel)}</span>` : ''}<b>${esc(m.title)}</b></div>${m.desc ? `<p class="vwi-desc">${esc(m.desc)}</p>` : ''}`;
|
|
35
|
+
const o = m.overview || {};
|
|
36
|
+
const next = o.h ? `<p class="vwi-next"><b>${esc(o.h)}</b>${o.who ? ` · ${esc(o.who)}` : ''}</p>${o.p ? `<p class="vwi-p">${esc(o.p)}</p>` : ''}` : o.why ? `<p class="vwi-p">${esc(o.why)}</p>` : '';
|
|
37
|
+
const watch = [].concat(m.health || [], m.warnings || []);
|
|
38
|
+
const checks = (m.checks || []).length ? `<ul class="vwi-l">${m.checks.map((c) => `<li><span class="chp ${CHECK_TONE[c.state] || 'mut'}"><i></i>${esc(c.stateLabel)}</span><span class="vwi-t"><b>${esc(c.label)}</b>${c.owed ? `<small>${esc(c.owed)}</small>` : ''}</span></li>`).join('')}</ul>` : '';
|
|
39
|
+
const T = m.tasks || { rows: [] }, rows = T.rows || [];
|
|
40
|
+
const tasks = rows.length ? `<ul class="vwi-l">${rows.slice(0, SHOW_TASKS).map((t) => `<li><button type="button" class="vwi-r" data-vwtask="${esc(t.key)}"><span class="vwi-t"><b>${esc(t.title)}</b><small>${esc([t.ref, t.src, t.state].filter(Boolean).join(' · '))}</small></span></button></li>`).join('')}</ul>${rows.length > SHOW_TASKS ? `<p class="vwi-p">${rows.length - SHOW_TASKS} more on the <a href="${esc(pageHref)}">initiative page</a>.</p>` : ''}` : T.note ? `<p class="vwi-p">${esc(T.note)}</p>` : '';
|
|
41
|
+
const docs = ((m.docs && m.docs.rows) || []).filter((d) => d.path && !(m.files || []).some((f) => f.path === d.path));
|
|
42
|
+
const links = (m.files || []).map((f) => [f.label, f.path]).concat(docs.map((d) => [d.title + (d.state ? ' · ' + d.state : ''), d.path]));
|
|
43
|
+
const linkHtml = links.length ? `<ul class="vwi-l">${links.map(([a, b]) => `<li><span class="vwi-t"><b>${esc(a)}</b><small class="vwi-path">${esc(b)}</small></span></li>`).join('')}</ul>` : '';
|
|
44
|
+
const miss = m.header && m.header.missing && m.header.missing.length ? `<p class="vwi-p">Not read: ${esc(m.header.missing.join(', '))}.</p>` : '';
|
|
45
|
+
return `<article class="paper doc vwi">${top}${kv(facts)}${sec('Next', next)}${sec('Watch', watch.length ? `<ul class="vwi-w">${watch.map((w) => `<li>${esc(w)}</li>`).join('')}</ul>` : '')}${sec('Checks', checks)}${sec('Tasks', tasks)}${sec('Links', linkHtml)}${miss}<p class="vwi-foot"><a class="vwi-go" href="${esc(pageHref)}">Open the initiative page</a></p></article>`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** The task tab. A task the model no longer holds says so. */
|
|
49
|
+
export function taskHtml(m, key) {
|
|
50
|
+
const t = findTask(m, key);
|
|
51
|
+
if (!t) return `<article class="paper doc vwi"><p class="vwi-wait" role="status">This task is no longer on ${esc(m.title)}. It may have moved to another initiative or been removed.</p>${iniLink(m)}</article>`;
|
|
52
|
+
const req = t.src === 'PRD requirement';
|
|
53
|
+
const rows = [['Type', t.kind || (req ? 'PRD requirement' : 'Task')], ['Reference', t.ref], ['Source', t.src], ['Owner', t.owner], ['Starts', when(t.start)], ['Due', when(t.end)], ['Status', t.state || (req ? 'No result recorded' : '')], ['Blocked', t.blocked ? 'Yes' : '']];
|
|
54
|
+
const note = req ? 'Read from the initiative’s PRD' + (m.tasks && m.tasks.basis && m.tasks.basis.source ? ' (' + m.tasks.basis.source + ')' : '') + '. The repository records no result for one requirement.'
|
|
55
|
+
: t.pmos ? 'A PMOS task, kept on the board. Change its status from its own dialog on the initiative page.' : 'Read from the board. Jira owns its status and dates.';
|
|
56
|
+
return `<article class="paper doc vwi"><div class="vwi-head"><b>${esc(t.title)}</b></div>${kv(rows)}<p class="vwi-p">${esc(note)}</p>${iniLink(m)}</article>`;
|
|
57
|
+
}
|
|
58
|
+
const iniLink = (m) => `<section class="vwi-s"><p class="label">Initiative</p><ul class="vwi-l"><li><button type="button" class="vwi-r" data-vwini="${esc(m.id)}"><span class="vwi-t"><b>${esc(m.title)}</b><small>${esc([m.head && m.head.statusLabel, m.lane, m.board && m.board.name].filter(Boolean).join(' · '))}</small></span></button></li></ul></section>`;
|