Add Opportunities/Conference Scout track card, handle empty subtask lists
Currently no open items, just a note about the manual monthly sync step (next run 2026-09-01). Also hardens buildTaskDetail/buildTaskSidebarCard for entries with zero subtasks: shows "No open items right now" instead of an empty table, and "No open items" instead of a misleading "All done" in the sidebar summary chip.
This commit is contained in:
1 parent
824a00782c
commit
20101d7d7a
1 file changed
+28
-10
+28
-10
@@ -6283,6 +6283,15 @@
|
||||
],
|
||||
reports: []
|
||||
},
|
||||
{
|
||||
id: "open-items-opportunities",
|
||||
label: "Opportunities / Conference Scout",
|
||||
subtasks: [],
|
||||
notes: [
|
||||
"After each monthly Scout run, the report needs to be manually pulled and synced into SCOUT_RESULTS — not automated. Next run 2026-09-01, so \"sync Sept 1 scout results\" will become a real task then, not open yet."
|
||||
],
|
||||
reports: []
|
||||
},
|
||||
{
|
||||
id: "week-2026-08-17",
|
||||
label: "Week of 17–21 Aug 2026",
|
||||
@@ -6334,9 +6343,11 @@
|
||||
card.dataset.id = entry.id;
|
||||
|
||||
var openCount = entry.subtasks.filter(function (s) { return s.status.indexOf("Done") !== 0; }).length;
|
||||
var summary = entry.subtasks.length === 1
|
||||
? entry.subtasks[0].status
|
||||
: (openCount === 0 ? "All done" : openCount + " still open");
|
||||
var summary = entry.subtasks.length === 0
|
||||
? "No open items"
|
||||
: (entry.subtasks.length === 1
|
||||
? entry.subtasks[0].status
|
||||
: (openCount === 0 ? "All done" : openCount + " still open"));
|
||||
|
||||
card.innerHTML =
|
||||
"<div class=\"ab-card-top\">" +
|
||||
@@ -6361,17 +6372,24 @@
|
||||
}
|
||||
|
||||
function buildTaskDetail(entry) {
|
||||
var rows = entry.subtasks.map(function (s) {
|
||||
return "<tr><td>" + tasksEsc(s.subtask) + "</td><td>" + tasksEsc(s.ask) + "</td><td>" + tasksEsc(s.kpi) + "</td><td>" + taskStatusIcon(s.status) + tasksEsc(s.status) + "</td></tr>";
|
||||
}).join("");
|
||||
var body;
|
||||
if (!entry.subtasks.length) {
|
||||
body = "<p class=\"narrative\">No open items right now.</p>";
|
||||
} else {
|
||||
var rows = entry.subtasks.map(function (s) {
|
||||
return "<tr><td>" + tasksEsc(s.subtask) + "</td><td>" + tasksEsc(s.ask) + "</td><td>" + tasksEsc(s.kpi) + "</td><td>" + taskStatusIcon(s.status) + tasksEsc(s.status) + "</td></tr>";
|
||||
}).join("");
|
||||
body =
|
||||
"<table class=\"crm-detail-table\">" +
|
||||
"<thead><tr><th>Subtask</th><th>Ask</th><th>KPI</th><th>Status</th></tr></thead>" +
|
||||
"<tbody>" + rows + "</tbody>" +
|
||||
"</table>";
|
||||
}
|
||||
|
||||
return (
|
||||
"<div class=\"card\">" +
|
||||
"<h3>" + tasksEsc(entry.label) + "</h3>" +
|
||||
"<table class=\"crm-detail-table\">" +
|
||||
"<thead><tr><th>Subtask</th><th>Ask</th><th>KPI</th><th>Status</th></tr></thead>" +
|
||||
"<tbody>" + rows + "</tbody>" +
|
||||
"</table>" +
|
||||
body +
|
||||
"</div>" +
|
||||
"<div class=\"card\">" +
|
||||
"<h2>Notes</h2>" +
|
||||
|
||||
Reference in new issue
Block a user