create-pmos 0.400.0 → 0.402.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 +25 -30
- package/payload/KIT-VERSION +2 -2
- 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/payload/state/log.md +1 -1
- package/workspace/board-programs-test.js +226 -0
- package/workspace/board-shot.js +54 -0
- package/workspace/briefing-premium-board-test.js +23 -16
- package/workspace/briefing-premium-calendar-test.js +6 -3
- package/workspace/briefing-premium-sources-test.js +17 -10
- package/workspace/briefing-premium-test.js +41 -16
- package/workspace/changelog.json +24 -0
- package/workspace/fixtures/board-premium-facts.js +20 -3
- package/workspace/fixtures/briefing-premium-facts.js +18 -2
- package/workspace/fixtures/program-ascent.js +101 -0
- package/workspace/guide/home.md +15 -8
- package/workspace/guide/index.md +1 -0
- package/workspace/guide/programs.md +37 -0
- package/workspace/lib/briefing-premium-products.js +4 -4
- package/workspace/lib/briefing-premium.js +2 -2
- package/workspace/lib/core-docs.js +2 -2
- package/workspace/lib/programs.js +129 -0
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-briefing-premium.js +1 -1
- package/workspace/lib/routes-programs.js +122 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +1 -1
- package/workspace/premium-phone-card-test.js +6 -1
- package/workspace/premium-vw-cal-test.js +10 -4
- package/workspace/program-panel-test.js +143 -0
- package/workspace/public/pm/bd-acts.js +23 -14
- package/workspace/public/pm/bd-asks.js +89 -23
- package/workspace/public/pm/bd-prog-panel.js +451 -0
- package/workspace/public/pm/bd-prog.js +191 -0
- package/workspace/public/pm/bd-span.js +98 -15
- package/workspace/public/pm/bd-views.js +93 -29
- package/workspace/public/pm/cozy-board.css +226 -9
- package/workspace/public/pm/cozy-home.css +27 -1
- package/workspace/public/pm/cozy-panel.css +178 -0
- package/workspace/public/pm/cozy-today.css +190 -3
- package/workspace/public/pm/home-app.js +93 -26
- package/workspace/public/pm/home-chat.js +35 -32
- package/workspace/public/pm/home-data.js +8 -2
- package/workspace/public/pm/home-ini.js +1 -1
- package/workspace/public/pm/home-list.js +100 -24
- package/workspace/public/pm/home-today.js +138 -61
- package/workspace/public/pm/home-work.js +1 -3
- package/workspace/public/pm/premium-board.js +225 -57
- package/workspace/public/pm/premium-vw-item.css +6 -0
- package/workspace/public/pm/program-model.js +192 -0
- package/workspace/public/premium-board.html +4 -1
- package/workspace/test-files.json +1 -0
- package/workspace/test-lists/board-programs.json +9 -0
- package/workspace/test-lists/program-hierarchy.json +11 -0
- package/workspace/test-lists/program-panel.json +9 -0
|
@@ -37,7 +37,7 @@ const dayIso = (n) => { const t = new Date(Date.now() + n * 86400000); return t.
|
|
|
37
37
|
const plural = (n, a, b) => (n === 1 ? a : b);
|
|
38
38
|
const cap = (s) => (s ? s.charAt(0).toUpperCase() + s.slice(1) : '');
|
|
39
39
|
|
|
40
|
-
let A = null; // the page: { M(), load(), say(msg, undo?), panel(html, from, cls), close(), redraw(), F, rowOf(key), statusOf(r), openIni(r), openTicket(ini, tk), askHref(r, q), pageHref(r), trail(r), docMeta(path), loadDocMeta(
|
|
40
|
+
let A = null; // the page: { M(), load(), say(msg, undo?), panel(html, from, cls), close(), redraw(), F, rowOf(key), statusOf(r), openIni(r), openTicket(ini, tk), askHref(r, q), pageHref(r), trail(r), docMeta(path, ws), loadDocMeta([{ path, ws }]), viewDoc(path) }
|
|
41
41
|
export function init(api) { A = api; }
|
|
42
42
|
const M = () => A.M();
|
|
43
43
|
const post = (p, body) => pmPost(p, { ws: M().board.ws, ...body });
|
|
@@ -59,9 +59,11 @@ const chipsRadio = (L, name) => `<div class="bd-chips" role="radiogroup" aria-la
|
|
|
59
59
|
const whyOf = (root) => { const c = root.querySelector('[data-why].on'), t = (root.querySelector('input[name="why"]') || {}).value || ''; return ((c && c.dataset.why) || 'Other') + (t.trim() ? ': ' + t.trim().replace(/\s+/g, ' ') : ''); };
|
|
60
60
|
|
|
61
61
|
/* ── a row's actions (BdActions): the ⋯ menu ────────────────────────────────────────────────────────────────────── */
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
const
|
|
62
|
+
/** The board an initiative belongs to: its own product's with All products picked (r.ws, r.boardId), else this board. */
|
|
63
|
+
const own = (id) => { const r = (M().rows || []).find((x) => x.id === id && x.ws); return r ? { ws: r.ws, board: r.boardId } : { ws: M().board.ws, board: M().board.id }; };
|
|
64
|
+
const life = (id, state, reason, back) => post('/api/lifecycle', { ws: own(id).ws, initiative_id: id, state, reason: reason || '', ...(back ? { back } : {}) });
|
|
65
|
+
const arch = (id, archived, reason) => post('/api/boards/archive', { ...own(id), id, archived, ...(reason ? { reason } : {}) });
|
|
66
|
+
const move = (id, to, why) => post('/api/boards/move', { ...own(id), id, to, ...(why ? { why } : {}) });
|
|
65
67
|
const prevOf = (r) => ({ life: r.acts.life, reason: r.acts.reason, backDay: r.acts.backDay || null });
|
|
66
68
|
const lifeBack = (r, p) => (p.life === 'hold' ? life(r.id, 'on-hold', p.reason, p.backDay) : p.life === 'cancelled' ? life(r.id, 'cancelled', p.reason) : life(r.id, 'active', 'undo'));
|
|
67
69
|
/** How much of the step is ready, for "Move to <next> · 2 of 4 ready": the parts or tickets counted toward its output. */
|
|
@@ -189,7 +191,10 @@ function filterHtml() {
|
|
|
189
191
|
const kinds = [...new Set(rows.map((r) => r.lane).filter(Boolean))].sort();
|
|
190
192
|
const sprints = (M().jira && M().jira.sprints) || [];
|
|
191
193
|
const chip = (k, v, label) => `<button type="button" class="bd-chip${F[k].has(v) ? ' on' : ''}" data-flt="${k}" data-v="${esc(v)}" aria-pressed="${F[k].has(v)}">${label || esc(v)}</button>`;
|
|
192
|
-
|
|
194
|
+
// the grouping (PgBoard, PgBoardProduct): programs first by default, so the toolbar shows nothing; By product shows its chip there
|
|
195
|
+
const G = A.grouping ? A.grouping() : null;
|
|
196
|
+
const grp = G && G.on ? `<p class="bd-mlbl">Group</p><div class="bd-fg" role="radiogroup" aria-label="Group">${[['program', 'Programs first'], ['product', 'By product']].map(([k, n]) => `<button type="button" class="bd-chip${(k === 'product') === G.byProduct ? ' on' : ''}" role="radio" aria-checked="${(k === 'product') === G.byProduct}" data-fgrp="${k}">${n}</button>`).join('')}</div>` : '';
|
|
197
|
+
return grp + `<p class="bd-mlbl">Owner</p><div class="bd-fg">${owners.map((o) => chip('owners', o, (o === 'No owner' ? '' : V.avatar(o, 'xs')) + esc(o))).join('')}</div>`
|
|
193
198
|
+ `<p class="bd-mlbl">Kind</p><div class="bd-fg">${kinds.map((l) => chip('lanes', l, esc(cap(l)))).join('') || '<span class="bd-amut">No kind is on record</span>'}</div>`
|
|
194
199
|
+ (sprints.length ? `<p class="bd-mlbl">Sprint</p><div class="bd-fg">${sprints.map((s) => chip('sprints', s.name, esc(s.name + (s.now ? ' · now' : '')))).join('')}${chip('sprints', 'Backlog')}</div>` : '')
|
|
195
200
|
+ `<div class="bd-arow bd-ffoot"><button type="button" class="bd-btn sm ghost" data-fclear>Clear</button><span class="bd-amut bd-push">Applies as you pick</span></div>`;
|
|
@@ -266,8 +271,8 @@ function docById(id) { return V.docRows().find((x) => V.docId(x) === id) || null
|
|
|
266
271
|
async function openDocPanel(id, from) {
|
|
267
272
|
const x = docById(id); if (!x) return;
|
|
268
273
|
docOpen = id;
|
|
269
|
-
const meta = x.path ? A.docMeta(x.path) : null, h = V.healthOf(x), d = x.d || {};
|
|
270
|
-
const eye = (x.src === 'core' ? 'Board document' : x.kind) + ' · ' + (x.src === 'core' ? M().board.name || 'Board' : x.ini.title);
|
|
274
|
+
const meta = x.path ? A.docMeta(x.path, x.ws) : null, h = V.healthOf(x), d = x.d || {};
|
|
275
|
+
const eye = (x.src === 'core' ? 'Board document' : x.kind) + ' · ' + (x.src === 'core' ? d.product || M().board.name || 'Board' : x.ini.title);
|
|
271
276
|
const sub = x.src === 'core' ? [d.by, d.cadence].filter(Boolean).join(' · ') : meta ? [meta.by, meta.changed].filter(Boolean).join(' · ') : '';
|
|
272
277
|
const home = x.src === 'ini' ? A.pageHref(x.ini) : null;
|
|
273
278
|
const tools = home ? `<a class="bd-ib" href="${esc(home)}" aria-label="Open in Home" title="Open in Home">${SV(I.ext)}</a>` : '';
|
|
@@ -276,7 +281,7 @@ async function openDocPanel(id, from) {
|
|
|
276
281
|
else box = `<div class="bd-box"><div class="bd-boxh"><b>${esc(h.text)}</b><span class="bd-amut">Health</span></div>${x.src === 'core' && d.what ? `<p class="sm">${esc(d.what)}</p>` : ''}</div>`;
|
|
277
282
|
const drift = x.drift && x.drift.length ? `<div class="bd-warn sm">The PRD changed after the tickets were pushed. ${esc(x.drift.join(', '))} may not match.</div>` : '';
|
|
278
283
|
const draft = x.src === 'core' && d.st === 'draft' && d.slot;
|
|
279
|
-
const issue = x.src === 'core' && d.path ? (draft ? `<div class="bd-issue" data-issue-bar="draft"><span>A draft. Nothing is sent: issuing marks it issued and sends nothing to anyone.</span><button type="button" class="bd-btn solid" data-act="issue" data-key="${esc(d.key)}">Issue it</button></div>` : `<div class="bd-issue done" data-issue-bar="done"><span>${esc(d.state || 'Issued')}. Nothing was sent to anyone.</span></div>`) : '';
|
|
284
|
+
const issue = x.src === 'core' && d.path ? (draft ? `<div class="bd-issue" data-issue-bar="draft"><span>A draft. Nothing is sent: issuing marks it issued and sends nothing to anyone.</span><button type="button" class="bd-btn solid" data-act="issue" data-key="${esc(d.key)}"${d.ws ? ` data-ws="${esc(d.ws)}"` : ''}>Issue it</button></div>` : `<div class="bd-issue done" data-issue-bar="done"><span>${esc(d.state || 'Issued')}. Nothing was sent to anyone.</span></div>`) : '';
|
|
280
285
|
const log = meta && meta.log && meta.log.length ? `<p class="bd-lbl">Edit log</p>${meta.log.map((l) => `<div class="bd-trow sm">${V.avatar(l.by, 'b')}<span class="bd-push0">${esc(l.subject)}</span><span class="bd-amut">${esc(l.at)}</span></div>`).join('')}` : x.path ? '<p class="bd-amut" id="dlogW">Reading the edit log…</p>' : '';
|
|
281
286
|
const cmp = x.drift && x.drift.length ? `<a class="bd-btn" href="${esc(A.askHref(x.ini, 'What changed in the PRD after ' + x.drift.join(', ') + ' ' + (x.drift.length === 1 ? 'was' : 'were') + ' pushed? Compare it with Jira.'))}">Compare with Jira</a>` : '';
|
|
282
287
|
const foot = home || cmp ? `<div class="bd-arow bd-pfoot">${home ? `<a class="bd-btn solid" href="${esc(home)}">Open in Home</a>` : ''}${cmp}</div>` : '';
|
|
@@ -284,16 +289,18 @@ async function openDocPanel(id, from) {
|
|
|
284
289
|
panel(x.title, `${issue}${msg('formM')}${box}${drift}${log}${text}${foot}`, from, { eye, sub, tools, cls: 'pk-doc' });
|
|
285
290
|
A.redraw();
|
|
286
291
|
if (x.path) {
|
|
287
|
-
if (!meta) { await A.loadDocMeta([x.path]); const m2 = A.docMeta(x.path), w = $('#dlogW'); if (w && docOpen === id) w.outerHTML = m2 && m2.log ? `<p class="bd-lbl">Edit log</p>${m2.log.map((l) => `<div class="bd-trow sm">${V.avatar(l.by, 'b')}<span class="bd-push0">${esc(l.subject)}</span><span class="bd-amut">${esc(l.at)}</span></div>`).join('')}` : '<p class="bd-amut">No edit is in the git history yet.</p>'; }
|
|
288
|
-
let t = null; try { const res = await fetch('/api/doc?ws=' + encodeURIComponent(M().board.ws || '') + '&path=' + encodeURIComponent(x.path), { credentials: 'same-origin' }); t = res.ok ? await res.text() : null; } catch { t = null; }
|
|
292
|
+
if (!meta) { await A.loadDocMeta([{ path: x.path, ws: x.ws }]); const m2 = A.docMeta(x.path, x.ws), w = $('#dlogW'); if (w && docOpen === id) w.outerHTML = m2 && m2.log ? `<p class="bd-lbl">Edit log</p>${m2.log.map((l) => `<div class="bd-trow sm">${V.avatar(l.by, 'b')}<span class="bd-push0">${esc(l.subject)}</span><span class="bd-amut">${esc(l.at)}</span></div>`).join('')}` : '<p class="bd-amut">No edit is in the git history yet.</p>'; }
|
|
293
|
+
let t = null; try { const res = await fetch('/api/doc?ws=' + encodeURIComponent(x.ws || M().board.ws || '') + '&path=' + encodeURIComponent(x.path), { credentials: 'same-origin' }); t = res.ok ? await res.text() : null; } catch { t = null; }
|
|
289
294
|
const el = $('#cdText'); if (el && docOpen === id) el.textContent = t == null ? x.path + ' could not be read.' : t;
|
|
290
295
|
}
|
|
291
296
|
}
|
|
297
|
+
/** A board document by its key; with All products, by its key and its product's workspace (two products can hold the same key). */
|
|
298
|
+
const coreDoc = (key, ws) => { const D = M().docs || {}; return (D.rows || []).find((x) => x.key === key && (!ws || x.ws === ws)) || null; };
|
|
292
299
|
async function issueDoc(key, btn) {
|
|
293
|
-
const D = M().docs || {}, d = (
|
|
294
|
-
const r = await press(btn, $('#formM'), () => post('/api/core-docs/issue', { scope: D.scope, key: d.key, slot: d.slot }));
|
|
300
|
+
const D = M().docs || {}, d = coreDoc(key, btn.dataset.ws); if (!d) return;
|
|
301
|
+
const r = await press(btn, $('#formM'), () => post('/api/core-docs/issue', { ...(d.ws ? { ws: d.ws } : {}), scope: d.scope || D.scope, key: d.key, slot: d.slot }));
|
|
295
302
|
if (!r) return;
|
|
296
|
-
A.say('Issued. Nothing was sent to anyone.'); await A.load(); openDocPanel('core
|
|
303
|
+
A.say('Issued. Nothing was sent to anyone.'); await A.load(); openDocPanel(V.docId({ src: 'core', d }), null);
|
|
297
304
|
}
|
|
298
305
|
/** Add a document: a board document written by you or drafted by PMOS, kept in PMOS or linked to a page elsewhere (POST /api/custom-docs/add).
|
|
299
306
|
* PMOS saves the title and the address on the board's record; it does not read or sync the linked page. */
|
|
@@ -347,6 +354,7 @@ document.addEventListener('click', async (e) => {
|
|
|
347
354
|
const fi = t.closest('[data-findini]'); if (fi) { const r = A.rowOf(fi.dataset.findini); Pop.close(false); if (r) A.openIni(r); return; }
|
|
348
355
|
const ft = t.closest('[data-findtk]'); if (ft) { Pop.close(false); A.openTicket(ft.dataset.ini, ft.dataset.findtk); return; }
|
|
349
356
|
const fl = t.closest('[data-flt]'); if (fl && Pop.isOpen() && Pop.el().contains(fl)) { const S = A.F[fl.dataset.flt], v = fl.dataset.v; if (S.has(v)) S.delete(v); else S.add(v); Pop.redraw(filterHtml()); A.redraw(); return; }
|
|
357
|
+
const fg = t.closest('[data-fgrp]'); if (fg && Pop.isOpen() && Pop.el().contains(fg)) { A.setGrouping(fg.dataset.fgrp === 'product'); Pop.redraw(filterHtml()); return; }
|
|
350
358
|
if (t.closest('[data-fclear]')) { A.F.owners.clear(); A.F.lanes.clear(); A.F.sprints.clear(); Pop.redraw(filterHtml()); A.redraw(); return; }
|
|
351
359
|
const sp = t.closest('[data-sprint]'); if (sp) { const S = A.F.sprints, v = sp.dataset.sprint; if (S.has(v)) S.delete(v); else { S.clear(); S.add(v); } Pop.close(false); A.say(S.has(v) ? 'Showing the initiatives with work in ' + v + '.' : 'Showing every sprint.'); A.redraw(); return; }
|
|
352
360
|
const rl = t.closest('[data-rel]'); if (rl) { Pop.close(false); openRelease(+rl.dataset.rel, $('#chSprint')); return; }
|
|
@@ -366,7 +374,8 @@ document.addEventListener('click', async (e) => {
|
|
|
366
374
|
if (k === 'issue') { issueDoc(b.dataset.key, b); return; }
|
|
367
375
|
if (k === 'draft') {
|
|
368
376
|
b.disabled = true;
|
|
369
|
-
const
|
|
377
|
+
const d = coreDoc(b.dataset.key, b.dataset.ws);
|
|
378
|
+
const r = await pmPost('/api/core-docs/draft', { ws: (d && d.ws) || M().board.ws, scope: (d && d.scope) || M().docs.scope, key: b.dataset.key }).catch(() => null);
|
|
370
379
|
if (r && r.ok) { A.say('The agent is drafting it. It lands as a draft for you to review; nothing is sent.'); await A.load(); } else { b.disabled = false; A.say(errOf(r)); }
|
|
371
380
|
}
|
|
372
381
|
});
|
|
@@ -15,10 +15,12 @@ import { $, $$, esc } from './premium-shell.js';
|
|
|
15
15
|
import * as Pop from './bd-pop.js';
|
|
16
16
|
import { avatar } from './bd-views.js';
|
|
17
17
|
|
|
18
|
-
let A = null; // the page: { M(), load(), say(msg, undo?), panel(html, from, cls), close(), rowOf(key), openIni(r), openDoc(path), anchors() }
|
|
18
|
+
let A = null; // the page: { M(), load(), say(msg, undo?), panel(html, from, cls), close(), rowOf(key), openIni(r), openDoc(path), anchors(ws, board), programs(), reloadPrograms() }
|
|
19
19
|
export function init(api) { A = api; }
|
|
20
20
|
const M = () => A.M();
|
|
21
21
|
const post = (p, body) => pmPost(p, { ws: M().board.ws, ...body });
|
|
22
|
+
/** The board an ask goes to: the product picked for it, else its own product's board (All products tags each ask), else this board. */
|
|
23
|
+
const boardOfAsk = (a) => { const p = picked[a.id]; return p && p.ws ? { ws: p.ws, board: p.id } : a.ws ? { ws: a.ws, board: a.boardId } : { ws: M().board.ws, board: M().board.id }; };
|
|
22
24
|
const errOf = (r) => (r && r.error) || 'Nothing was recorded. The server did not say why.';
|
|
23
25
|
const SV = (d) => `<svg viewBox="0 0 24 24" aria-hidden="true"><path d="${d}"/></svg>`;
|
|
24
26
|
const I = { x: 'M6 6l12 12M18 6L6 18', link: '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', file: 'M7 3h7l5 5v13H7zM14 3v5h5', up: 'M12 16V4M7 9l5-5 5 5M5 20h14', info: 'M12 8v5M12 16h.01M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18', chev: 'M7 10l5 5 5-5', next: 'M9 6l6 6-6 6' };
|
|
@@ -32,7 +34,7 @@ const asksOf = () => ((M().asks && M().asks.rows) || []);
|
|
|
32
34
|
function askCard(a, i, phone) {
|
|
33
35
|
if (phone && i > 0 && expanded !== a.id) return `<button type="button" class="bd-acard row" data-askopen="${esc(a.id)}">${avatar(a.by || a.source)}<span class="tx"><b>${esc(a.by || a.source || 'Someone')}</b> · “${esc(a.line)}”</span>${SV(I.next)}</button>`;
|
|
34
36
|
const who = `<div class="bd-awho">${avatar(a.by || a.source)}<b>${esc(a.by || a.source || 'Someone')}</b><span class="bd-amut">${esc([a.by ? a.source : '', a.at].filter(Boolean).map((x) => '· ' + x).join(' '))}</span></div>`;
|
|
35
|
-
const prod = picked[a.id] || a.product;
|
|
37
|
+
const prod = picked[a.id] || a.product || (a.forProduct ? { name: a.forProduct, why: 'it came in on the ' + a.forProduct + ' board' } : null);
|
|
36
38
|
const product = prod && prod.name ? `<div class="bd-aprod"><span class="bd-chip sm"><b>${esc(prod.name)}</b></span><span class="bd-amut">Why: ${esc(prod.why || '')}</span></div>` : '';
|
|
37
39
|
const pills = [a.draft.lane ? `<span class="bd-pill">Suggest: ${esc(cap(a.draft.lane))}</span>` : '', a.draft.anchor ? `<span class="bd-pill">${esc(krShort(a.draft.anchor))}</span>` : '', a.close ? `<span class="bd-pill w">Close to: ${esc(a.close.title)}</span>` : ''].join('');
|
|
38
40
|
const prior = (a.prior || []).length ? `<p class="bd-warn sm">Close to something you declined: “${esc(a.prior[0].title)}”.</p>` : '';
|
|
@@ -42,11 +44,11 @@ function askCard(a, i, phone) {
|
|
|
42
44
|
+ `<div class="bd-arow"><button type="button" class="bd-btn sm solid" data-askact="decline-go" data-id="${esc(a.id)}">Decline</button><button type="button" class="bd-btn sm ghost" data-askact="back">Back</button><span class="bd-amut bd-push">The reason is kept with the ask</span></div></div>`;
|
|
43
45
|
}
|
|
44
46
|
const btns = phone
|
|
45
|
-
? `<button type="button" class="bd-btn solid wide" data-askact="accept" data-id="${esc(a.id)}">Accept to ${esc(firstStage())}</button><div class="bd-arow two">${a.close ? `<button type="button" class="bd-btn" data-askact="add" data-id="${esc(a.id)}">Add to existing</button>` : ''}<button type="button" class="bd-btn ghost" data-askact="decline" data-id="${esc(a.id)}">Decline</button></div>`
|
|
46
|
-
: `<div class="bd-arow"><button type="button" class="bd-btn sm solid" data-askact="accept" data-id="${esc(a.id)}">Accept to ${esc(firstStage())}</button>${a.close ? `<button type="button" class="bd-btn sm" data-askact="add" data-id="${esc(a.id)}">Add to ${esc(a.close.title)}</button>` : ''}<button type="button" class="bd-btn sm ghost" data-askact="decline" data-id="${esc(a.id)}">Decline</button></div>`;
|
|
47
|
+
? `<button type="button" class="bd-btn solid wide" data-askact="accept" data-id="${esc(a.id)}">Accept to ${esc(firstStage(a))}</button><div class="bd-arow two">${a.close ? `<button type="button" class="bd-btn" data-askact="add" data-id="${esc(a.id)}">Add to existing</button>` : ''}<button type="button" class="bd-btn ghost" data-askact="decline" data-id="${esc(a.id)}">Decline</button></div>`
|
|
48
|
+
: `<div class="bd-arow"><button type="button" class="bd-btn sm solid" data-askact="accept" data-id="${esc(a.id)}">Accept to ${esc(firstStage(a))}</button>${a.close ? `<button type="button" class="bd-btn sm" data-askact="add" data-id="${esc(a.id)}">Add to ${esc(a.close.title)}</button>` : ''}<button type="button" class="bd-btn sm ghost" data-askact="decline" data-id="${esc(a.id)}">Decline</button></div>`;
|
|
47
49
|
return `<div class="bd-acard" data-ask="${esc(a.id)}">${who}<p class="bd-aq">“${esc(a.line)}”</p>${product}${pills ? `<div class="bd-pills">${pills}</div>` : ''}${prior}${btns}<p class="bd-amsg" role="status"></p></div>`;
|
|
48
50
|
}
|
|
49
|
-
const firstStage = () => (M().board.stages || [])[0] || 'Triage';
|
|
51
|
+
const firstStage = (a) => (a && a.stages && a.stages[0]) || (M().board.stages || [])[0] || 'Triage';
|
|
50
52
|
function unsureHtml(L) {
|
|
51
53
|
if (!L.length) return '';
|
|
52
54
|
return `<div class="bd-unsure"><p class="bd-lbl">Not sure which product · ${L.length}</p>${L.map((a) => `<div class="bd-un1"><p class="sm">${esc(a.by || 'Someone')}${a.source ? ' by ' + esc(a.source.toLowerCase()) : ''}: “${esc(a.line)}”</p><p class="bd-amut">Could be ${a.products.map((p) => esc(p.name) + (p.why ? ' (' + esc(p.why) + ')' : '')).join(' or ')}.</p><div class="bd-chips">${a.products.map((p) => `<button type="button" class="bd-chip" data-pickprod="${esc(a.id)}" data-prod="${esc(p.id)}">${esc(p.name)}</button>`).join('')}</div></div>`).join('')}<p class="bd-amut bd-hr">PMOS picks the product from where the ask came from and what it talks about. When both point the same way, it shows the product with its reason. When they disagree, it asks you.</p></div>`;
|
|
@@ -57,7 +59,7 @@ function asksHtml() {
|
|
|
57
59
|
if (M().asks == null || M().asks.missing) return '<p class="bd-h3">New asks</p><p class="bd-amut">The new asks could not be read, so none is shown.</p>';
|
|
58
60
|
const sure = L.filter((a) => !(a.products || []).length || picked[a.id]), unsure = L.filter((a) => (a.products || []).length && !picked[a.id]);
|
|
59
61
|
const src = [...new Set(L.map((a) => a.source).filter(Boolean))];
|
|
60
|
-
const head = `<div class="bd-phead"><p class="bd-h3" id="hAsks">${L.length} new ${L.length === 1 ? 'ask' : 'asks'}</p>${src.length ? `<span class="bd-amut"
|
|
62
|
+
const head = `<div class="bd-phead"><p class="bd-h3" id="hAsks">${L.length} new ${L.length === 1 ? 'ask' : 'asks'}</p>${src.length ? `<span class="bd-amut">${M().board.all ? 'Across products' : 'For ' + esc(M().board.name || 'this board')} · from ${esc(src.slice(0, 3).join(', ').toLowerCase())}</span>` : ''}</div>`;
|
|
61
63
|
if (!L.length) return head + '<p class="bd-amut">No new ask waits for triage.</p>';
|
|
62
64
|
return head + `<div class="bd-acards">${sure.map((a, i) => askCard(a, i, phone)).join('')}</div>` + unsureHtml(unsure);
|
|
63
65
|
}
|
|
@@ -70,11 +72,12 @@ async function acceptAsk(a, btn) {
|
|
|
70
72
|
const d = a.draft || {};
|
|
71
73
|
if (!d.anchor) { Pop.close(false); openNew(null, a); return; } // no anchor yet: the New initiative panel asks for one
|
|
72
74
|
btn.disabled = true;
|
|
73
|
-
const
|
|
75
|
+
const B = boardOfAsk(a);
|
|
76
|
+
const r = await post('/api/boards/asks/accept', { ws: B.ws, board: B.board, ask: a.id, title: d.title, lane: d.lane || 'feature', anchor: d.anchor, intent: a.line.slice(0, 400) }).catch(() => null);
|
|
74
77
|
if (!r || !r.ok) { btn.disabled = false; const m = btn.closest('.bd-acard').querySelector('.bd-amsg'); if (m) m.textContent = errOf(r); return; }
|
|
75
78
|
Pop.close(false);
|
|
76
79
|
const id = r.initiative && r.initiative.id;
|
|
77
|
-
A.say('Accepted to ' + (r.stage || firstStage()) + ' · ' + d.title, id ? async () => { const u = await post('/api/boards/archive', { board:
|
|
80
|
+
A.say('Accepted to ' + (r.stage || firstStage(a)) + ' · ' + d.title, id ? async () => { const u = await post('/api/boards/archive', { ws: B.ws, board: B.board, id, archived: true, reason: 'Accepted by mistake: undone' }).catch(() => null); A.say(u && u.ok ? d.title + ' is undone. It is archived, and nothing else changed.' : errOf(u)); await A.load(); } : null);
|
|
78
81
|
await A.load();
|
|
79
82
|
}
|
|
80
83
|
document.addEventListener('click', async (e) => {
|
|
@@ -84,7 +87,9 @@ document.addEventListener('click', async (e) => {
|
|
|
84
87
|
const pp = e.target.closest('[data-pickprod]');
|
|
85
88
|
if (pp) {
|
|
86
89
|
const a = asksOf().find((x) => x.id === pp.dataset.pickprod), p = a && a.products.find((x) => x.id === pp.dataset.prod); if (!p) return;
|
|
87
|
-
|
|
90
|
+
const there = M().board.all ? (M().board.products || []).find((x) => x.id === p.id || x.name === p.name) : null; // All products holds every product's board
|
|
91
|
+
if (there) { picked[a.id] = { name: there.name, why: 'you chose it', ws: there.ws, id: there.id }; redrawAsks(); }
|
|
92
|
+
else if (p.name === M().board.name || p.id === M().board.id) { picked[a.id] = { name: p.name, why: 'you chose it' }; redrawAsks(); }
|
|
88
93
|
else A.say('Open the ' + p.name + ' Board to accept it there. This Board holds only ' + (M().board.name || 'its own') + ' work.');
|
|
89
94
|
return;
|
|
90
95
|
}
|
|
@@ -99,7 +104,8 @@ document.addEventListener('click', async (e) => {
|
|
|
99
104
|
if (k === 'add') why = 'Added to ' + a.close.title + ' (' + a.close.id + ')';
|
|
100
105
|
else { const c = Pop.el().querySelector('[data-whynot].on'), t = (card.querySelector('input[name="why"]') || {}).value || ''; why = ((c && c.dataset.whynot) || 'Other') + (t.trim() ? ': ' + t.trim().replace(/\s+/g, ' ') : ''); }
|
|
101
106
|
b.disabled = true;
|
|
102
|
-
const
|
|
107
|
+
const B = boardOfAsk(a);
|
|
108
|
+
const r = await post('/api/boards/asks/decline', { ws: B.ws, board: B.board, ask: a.id, why }).catch(() => null);
|
|
103
109
|
if (!r || !r.ok) { b.disabled = false; if (m) m.textContent = errOf(r); return; }
|
|
104
110
|
declining = null; Pop.close(false);
|
|
105
111
|
A.say(k === 'add' ? 'Added to ' + a.close.title + '. The ask is kept with the reason.' : 'Ask declined. The reason is kept in the board ledger.');
|
|
@@ -129,6 +135,25 @@ function closeOf(text) {
|
|
|
129
135
|
for (const r of M().initiatives.list.rows) { const have = sig(r.title), n = [...have].filter((w) => want.has(w)).length; if (have.size && (n >= 2 || (n >= 1 && n / have.size >= 0.5)) && (!best || n > best.n)) best = { n, r }; }
|
|
130
136
|
return best ? { key: best.r.key, title: best.r.title, stage: (best.r.track && best.r.track.label) || best.r.stage } : null;
|
|
131
137
|
}
|
|
138
|
+
/** The product of a new initiative: this board's, read-only; with All products (PgBoard) a choice of every product that takes new work. */
|
|
139
|
+
const products = () => (M().board.products || []).filter((p) => !p.self);
|
|
140
|
+
function productField(ask) {
|
|
141
|
+
if (!M().board.all) return `<div class="bd-field"><span class="bd-flbl">Product</span><span class="bd-inp ro">${esc(M().board.name || 'This board')}</span></div>`;
|
|
142
|
+
const P = products(), at = ask && ask.ws ? ask.ws : '';
|
|
143
|
+
return `<label class="bd-field">Product<select class="bd-inp" name="product"${ask ? ' disabled' : ''}>${P.length > 1 && !at ? '<option value="">Choose the product</option>' : ''}${P.map((p) => `<option value="${esc(p.ws)}"${p.ws === at || P.length === 1 ? ' selected' : ''}>${esc(p.name)}</option>`).join('')}</select></label>`;
|
|
144
|
+
}
|
|
145
|
+
/** The board a new initiative goes to: the product picked in the form, or this board. */
|
|
146
|
+
function boardOfForm(f) {
|
|
147
|
+
if (!M().board.all) return { ws: M().board.ws, board: M().board.id };
|
|
148
|
+
const ws = N && N.ask && N.ask.ws ? N.ask.ws : f.elements.product ? f.elements.product.value : '';
|
|
149
|
+
const p = products().find((x) => x.ws === ws); return p ? { ws: p.ws, board: p.id, stages: p.stages } : null;
|
|
150
|
+
}
|
|
151
|
+
async function fillAnchors(ws, board, want) {
|
|
152
|
+
const L = await A.anchors(ws, board), w = $('#anW'); if (!w) return;
|
|
153
|
+
w.innerHTML = L && L.length ? `<select class="bd-inp" name="anchor"><option value="">Choose a goal or a health budget</option>${L.map((x) => `<option value="${esc(x.value)}"${x.value === want ? ' selected' : ''}>${esc(x.label || x.value)}</option>`).join('')}</select>`
|
|
154
|
+
: `<input class="bd-inp" name="anchor" maxlength="120" value="${esc(want || '')}" placeholder="A KR id or health:<budget>">`;
|
|
155
|
+
}
|
|
156
|
+
document.addEventListener('change', (e) => { if (N && e.target.matches('form[data-form="new2"] select[name="product"]')) { const B = boardOfForm(e.target.form); if (B) fillAnchors(B.ws, B.board, ''); } });
|
|
132
157
|
export async function openNew(from, ask) {
|
|
133
158
|
const d = ask ? ask.draft || {} : {};
|
|
134
159
|
N = { ask: ask || null, links: [], files: [], lean: d.lane || null, prior: ask ? ask.prior || [] : [], ack: false, close: null };
|
|
@@ -140,13 +165,13 @@ export async function openNew(from, ask) {
|
|
|
140
165
|
+ `<div class="bd-linkin" id="nwLink" hidden><input class="bd-inp sm" name="link" maxlength="600" placeholder="https://" aria-label="A link"><button type="button" class="bd-btn sm" data-newact="addlink">Add</button></div><p class="bd-amut">Drop files here. PMOS reads them before it asks you anything.</p></div>`
|
|
141
166
|
+ `<div class="bd-box sm" id="nwKind">${kindBox()}</div>`
|
|
142
167
|
+ `<label class="bd-field">Counts toward<span id="anW"><select class="bd-inp" name="anchor" disabled><option>Reading the goals</option></select></span><span class="bd-amut">A goal, or a health budget for upkeep work.</span></label>`
|
|
143
|
-
+
|
|
168
|
+
+ productField(ask)
|
|
144
169
|
+ `<div id="nwHints">${hintsHtml()}</div><p class="bd-amsg" id="formM" role="status"></p>`
|
|
145
|
-
+ `<div class="bd-arow bd-pfoot"><button type="submit" class="bd-btn solid">${ask ? 'Accept and start ' : 'Create and start '}${esc(firstStage())}</button><span class="bd-amut">PMOS asks a few questions next</span></div></form>`;
|
|
170
|
+
+ `<div class="bd-arow bd-pfoot"><button type="submit" class="bd-btn solid">${ask ? 'Accept and start ' : 'Create and start '}${esc(firstStage(ask))}</button><span class="bd-amut">PMOS asks a few questions next</span></div></form>`;
|
|
146
171
|
A.panel(`<div class="pk-h"><div class="pk-ht"><h2 id="pkTitle">${ask ? 'Accept ask' : 'New initiative'}</h2></div><div class="pk-tools"><button type="button" class="bd-ib" data-pk="close" aria-label="Close" title="Close">${SV(I.x)}</button></div></div><div class="pk-b bd-pl">${body}</div>`, from, 'pk-new');
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
172
|
+
// All products: the goals of the product picked (an ask's own product, or the only one); none picked yet, the field waits for it
|
|
173
|
+
const f0 = document.querySelector('form[data-form="new2"]'), B = f0 ? boardOfForm(f0) : null;
|
|
174
|
+
if (B) await fillAnchors(B.ws, B.board, d.anchor); else { const w = $('#anW'); if (w) w.innerHTML = '<select class="bd-inp" name="anchor" disabled><option>Choose the product first</option></select>'; }
|
|
150
175
|
if (d.title) lean(d.title);
|
|
151
176
|
}
|
|
152
177
|
let leanT = null;
|
|
@@ -194,16 +219,18 @@ document.addEventListener('submit', async (e) => {
|
|
|
194
219
|
const m = $('#formM'), go = f.querySelector('[type="submit"]'), val = (n) => (f.elements[n] ? String(f.elements[n].value || '').trim() : '');
|
|
195
220
|
const title = val('title'), why = val('why').replace(/\s+/g, ' ').slice(0, 400), anchor = val('anchor'), askId = f.dataset.ask || null;
|
|
196
221
|
if (!title) { m.textContent = 'Give it a name.'; f.title.focus(); return; }
|
|
222
|
+
const B = boardOfForm(f);
|
|
223
|
+
if (!B) { m.textContent = 'Choose the product it is for.'; return; }
|
|
197
224
|
if (!anchor) { m.textContent = 'Choose what it counts toward. Unanchored work is rejected.'; return; }
|
|
198
225
|
go.disabled = true; m.textContent = '';
|
|
199
226
|
let ask = askId;
|
|
200
|
-
if (!ask) { const r0 = await post('/api/boards/asks/add', { board:
|
|
201
|
-
const res = await post('/api/boards/asks/accept', { board:
|
|
227
|
+
if (!ask) { const r0 = await post('/api/boards/asks/add', { ws: B.ws, board: B.board, line: title, source: 'New initiative, typed by you' }).catch(() => null); if (!r0 || r0.ok !== true) { go.disabled = false; m.textContent = errOf(r0); return; } ask = r0.ask && r0.ask.id; }
|
|
228
|
+
const res = await post('/api/boards/asks/accept', { ws: B.ws, board: B.board, ask, title, lane: N.lean || 'feature', anchor, ...(why ? { intent: why } : {}) }).catch(() => null);
|
|
202
229
|
if (!res || res.ok !== true) { go.disabled = false; m.textContent = errOf(res); return; }
|
|
203
|
-
const id = res.initiative && res.initiative.id, stage = res.stage || firstStage();
|
|
230
|
+
const id = res.initiative && res.initiative.id, stage = res.stage || firstStage(B);
|
|
204
231
|
if (id) {
|
|
205
|
-
await post('/api/board-grill/start', { id, why, links: N.links }).catch(() => null);
|
|
206
|
-
for (const file of N.files) { if (file.size > 4 * 1024 * 1024) continue; await post('/api/board-grill/file', { id, name: file.name, type: file.type, data: await b64(file) }).catch(() => null); }
|
|
232
|
+
await post('/api/board-grill/start', { ws: B.ws, id, why, links: N.links }).catch(() => null);
|
|
233
|
+
for (const file of N.files) { if (file.size > 4 * 1024 * 1024) continue; await post('/api/board-grill/file', { ws: B.ws, id, name: file.name, type: file.type, data: await b64(file) }).catch(() => null); }
|
|
207
234
|
}
|
|
208
235
|
N = null;
|
|
209
236
|
A.say('“' + title + '” is ' + (askId ? 'accepted' : 'created') + ' in ' + stage + ', anchored to ' + anchor + '.');
|
|
@@ -211,9 +238,48 @@ document.addEventListener('submit', async (e) => {
|
|
|
211
238
|
if (id) openGrill(id, title, stage, true); else A.close();
|
|
212
239
|
});
|
|
213
240
|
|
|
241
|
+
/* ── New program (PgBoard's "New program or initiative") ─────────────────────────────────────────────────────────── */
|
|
242
|
+
/** The menu under New (PgBoard): New initiative, or New program. A program is a PMOS record (POST /api/programs/save); its products, state
|
|
243
|
+
* and stage spread come from the initiatives that join it, so the form asks only its name, what it is for and its target. */
|
|
244
|
+
export function openNewMenu(btn) {
|
|
245
|
+
Pop.open(`<button type="button" class="bd-mi" data-newmenu="ini">${SV(I.file)}<span>New initiative</span></button><button type="button" class="bd-mi" data-newmenu="prog"><span class="bd-pti s" aria-hidden="true">${SV('M12 3l9 5-9 5-9-5zM3 13l9 5 9-5M3 17.5l9 5 9-5')}</span><span>New program</span><span class="k">spans products</span></button>`, btn, { label: 'New', width: 260, align: 'right', cls: 'bd-newm' });
|
|
246
|
+
}
|
|
247
|
+
function openNewProgram(from) {
|
|
248
|
+
const ws = M().board.all ? ((products()[0] || {}).ws || '') : M().board.ws;
|
|
249
|
+
const body = `<form class="bd-form bd-new" data-form="newprog" data-ws="${esc(ws || '')}" novalidate>`
|
|
250
|
+
+ `<label class="bd-field">Name<input class="bd-inp" name="title" maxlength="120" placeholder="For example: Project Ascent" autocomplete="off"></label>`
|
|
251
|
+
+ `<label class="bd-field">What it is for<textarea class="bd-inp ta" name="goal" rows="2" maxlength="400" placeholder="The outcome its initiatives add up to"></textarea></label>`
|
|
252
|
+
+ `<label class="bd-field">Target<input class="bd-inp" type="date" name="target"><span class="bd-amut">Optional. A program can run longer than any one initiative.</span></label>`
|
|
253
|
+
+ `<p class="bd-amsg" id="formM" role="status"></p><div class="bd-arow bd-pfoot"><button type="submit" class="bd-btn solid">Create program</button><span class="bd-amut">Then move initiatives into it from its panel</span></div></form>`;
|
|
254
|
+
A.panel(`<div class="pk-h"><div class="pk-ht"><h2 id="pkTitle">New program</h2></div><div class="pk-tools"><button type="button" class="bd-ib" data-pk="close" aria-label="Close" title="Close">${SV(I.x)}</button></div></div><div class="pk-b bd-pl">${body}</div>`, from, 'pk-new');
|
|
255
|
+
const i = document.querySelector('form[data-form="newprog"] input[name="title"]'); if (i) i.focus();
|
|
256
|
+
}
|
|
257
|
+
document.addEventListener('click', (e) => {
|
|
258
|
+
const b = e.target.closest('[data-newmenu]'); if (!b || !A || !Pop.isOpen() || !Pop.el().contains(b)) return;
|
|
259
|
+
const from = $('#newIni'); Pop.close(false);
|
|
260
|
+
if (b.dataset.newmenu === 'prog') openNewProgram(from); else openNew(from);
|
|
261
|
+
});
|
|
262
|
+
document.addEventListener('submit', async (e) => {
|
|
263
|
+
const f = e.target.closest('form[data-form="newprog"]'); if (!f || !A) return;
|
|
264
|
+
e.preventDefault();
|
|
265
|
+
const m = $('#formM'), go = f.querySelector('[type="submit"]'), val = (n) => String(f.elements[n].value || '').trim();
|
|
266
|
+
const title = val('title'), goal = val('goal').replace(/\s+/g, ' '), target = val('target');
|
|
267
|
+
if (!title) { m.textContent = 'Give the program a name.'; f.elements.title.focus(); return; }
|
|
268
|
+
const same = (A.programs() || []).find((p) => !p.archived && String(p.title).toLowerCase() === title.toLowerCase());
|
|
269
|
+
if (same) { m.textContent = 'A program named ' + same.title + ' exists already.'; return; }
|
|
270
|
+
go.disabled = true; m.textContent = '';
|
|
271
|
+
const r = await pmPost('/api/programs/save', { ws: f.dataset.ws || null, program: { title, ...(goal ? { goal } : {}), ...(target ? { target } : {}) } }).catch(() => null);
|
|
272
|
+
if (!r || !r.ok) { go.disabled = false; m.textContent = errOf(r); return; }
|
|
273
|
+
A.close(); A.say('Program ' + title + ' is created. Move initiatives into it from its panel.');
|
|
274
|
+
await A.reloadPrograms();
|
|
275
|
+
if (r.program && r.program.id) document.dispatchEvent(new CustomEvent('bd:program', { detail: { id: r.program.id } }));
|
|
276
|
+
});
|
|
277
|
+
|
|
214
278
|
/* ── the first questions (BdGrill) ─────────────────────────────────────────────────────────────────────────────── */
|
|
215
279
|
let Q = null; // { id, title, stage, fresh, data, at }
|
|
216
|
-
|
|
280
|
+
/** The workspace an initiative belongs to: its own product's with All products picked, else this board's. */
|
|
281
|
+
const wsOf = (id) => { const r = (M().rows || []).find((x) => x.id === id && x.ws); return r ? r.ws : M().board.ws; };
|
|
282
|
+
const gget = async (id) => { try { const r = await (await fetch('/api/board-grill?ws=' + encodeURIComponent(wsOf(id) || '') + '&id=' + encodeURIComponent(id), { credentials: 'same-origin' })).json(); return r && r.ok ? r : null; } catch { return null; } };
|
|
217
283
|
function grillHtml() {
|
|
218
284
|
const g = Q.data, qs = g ? g.questions : [], cur = qs[Q.at] || null, open = qs.filter((x) => !x.answer).length;
|
|
219
285
|
const took = g && g.summary.took.length ? g.summary.took : ['Nothing yet: no Why and no material were given.'];
|
|
@@ -240,7 +306,7 @@ async function saveCur() {
|
|
|
240
306
|
const typed = (box.querySelector('input[name="qa"]') || {}).value || '', chip = box.querySelector('[data-qchip].on');
|
|
241
307
|
const answer = typed.trim() || (chip ? chip.dataset.qchip : '');
|
|
242
308
|
if (answer === (cur.answer || '')) return true;
|
|
243
|
-
const r = await post('/api/board-grill/answer', { id: Q.id, q: cur.key, answer }).catch(() => null);
|
|
309
|
+
const r = await post('/api/board-grill/answer', { ws: wsOf(Q.id), id: Q.id, q: cur.key, answer }).catch(() => null);
|
|
244
310
|
if (!r || !r.ok) { $('#grM').textContent = errOf(r); return false; }
|
|
245
311
|
Q.data = r; return true;
|
|
246
312
|
}
|
|
@@ -252,7 +318,7 @@ document.addEventListener('click', async (e) => {
|
|
|
252
318
|
if (!(await saveCur())) return;
|
|
253
319
|
const open = Q.data ? Q.data.questions.filter((x) => !x.answer).length : 0, title = Q.title;
|
|
254
320
|
if (b.dataset.grill === 'next' && Q.at < ((Q.data && Q.data.questions.length) || 0) - 1) { Q.at++; A.panel(grillHtml(), null, 'pk-new'); const i = $('#peek .bd-qc.on input'); if (i) i.focus(); return; }
|
|
255
|
-
if (b.dataset.grill === 'later' && open) await post('/api/board-grill/later', { id: Q.id }).catch(() => null);
|
|
321
|
+
if (b.dataset.grill === 'later' && open) await post('/api/board-grill/later', { ws: wsOf(Q.id), id: Q.id }).catch(() => null);
|
|
256
322
|
Q = null; A.close();
|
|
257
323
|
A.say(open ? 'Kept as the next step of ' + title + ': ' + open + ' open ' + (open === 1 ? 'question' : 'questions') + '.' : 'The answers are kept on ' + title + ' for its BRD.');
|
|
258
324
|
A.load();
|