2423 lines
115 KiB
HTML
2423 lines
115 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>ServiceMeow HQ — Roadmap + UAT Launches</title>
|
||
<style>
|
||
|
||
:root {
|
||
--bg: #f6f7fb;
|
||
--card: #ffffff;
|
||
--accent: #4a6cf7;
|
||
--accent-soft: #e8edff;
|
||
--text: #1f2430;
|
||
--muted: #7a8195;
|
||
--done: #2ecc71;
|
||
--border: #e3e6ef;
|
||
}
|
||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||
background: var(--bg); color: var(--text);
|
||
}
|
||
.page { max-width: 1760px; margin: 0 auto; padding: 24px 20px 48px; }
|
||
.page-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
|
||
.page-header h1 { font-size: 23px; font-weight: 700; }
|
||
.page-header .date { color: var(--muted); font-size: 14px; margin-top: 3px; }
|
||
.wk-pill {
|
||
display: inline-block; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
|
||
border-radius: 999px; padding: 3px 12px; margin-left: 8px; vertical-align: 3px;
|
||
}
|
||
|
||
.layout { display: grid; grid-template-columns: minmax(380px, 5fr) minmax(440px, 6fr); gap: 20px; align-items: start; }
|
||
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } }
|
||
|
||
.card {
|
||
background: var(--card); border: 1px solid var(--border); border-radius: 14px;
|
||
padding: 16px 18px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(20,30,60,.05);
|
||
}
|
||
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
|
||
.card .hint { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
|
||
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
|
||
.mini-btn {
|
||
background: none; border: 1px solid var(--border); color: var(--muted);
|
||
padding: 5px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; white-space: nowrap;
|
||
}
|
||
.mini-btn:hover { border-color: #e74c3c; color: #e74c3c; }
|
||
|
||
label.item {
|
||
display: flex; align-items: flex-start; gap: 11px;
|
||
padding: 7px 6px; border-radius: 8px; cursor: pointer;
|
||
font-size: 14px; line-height: 1.4; transition: background .15s;
|
||
}
|
||
label.item:hover { background: var(--accent-soft); }
|
||
label.item input {
|
||
appearance: none; width: 19px; height: 19px; min-width: 19px;
|
||
border: 2px solid #c4c9d9; border-radius: 6px; margin-top: 1px; cursor: pointer;
|
||
display: grid; place-content: center; transition: all .15s;
|
||
}
|
||
label.item input:checked { background: var(--done); border-color: var(--done); }
|
||
label.item input:checked::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 700; }
|
||
label.item.checked span.txt { text-decoration: line-through; color: var(--muted); }
|
||
.wk-badge {
|
||
font-size: 10.5px; font-weight: 600; color: #5a6478; background: #eef1f8;
|
||
border-radius: 4px; padding: 1px 6px; margin-left: auto; white-space: nowrap; margin-top: 2px;
|
||
}
|
||
button.wk-badge { font-family: inherit; cursor: pointer; border: 1px solid transparent; line-height: 1.7; }
|
||
button.wk-badge:hover { border-color: var(--accent); box-shadow: 0 1px 5px rgba(74,108,247,.25); }
|
||
.bar[draggable] { cursor: grab; }
|
||
.bar[draggable]:active { cursor: grabbing; }
|
||
table.gantt td.task-name[draggable] { cursor: grab; }
|
||
table.gantt td.task-name[draggable]:active { cursor: grabbing; }
|
||
table.gantt td.cell.drop-hi { background: #e8edff; box-shadow: inset 0 0 0 2px var(--accent); }
|
||
.wk-badge.undated { background: #f6f0fa; color: #8a6bb0; }
|
||
.del { background: none; border: none; color: #c4c9d9; cursor: pointer; font-size: 15px; padding: 2px 4px; margin-left: 4px; }
|
||
.del:hover { color: #e74c3c; }
|
||
.carry { background: none; border: none; color: #b0721f; cursor: pointer; font-size: 14px; padding: 2px 4px; margin-left: 2px; opacity: .55; }
|
||
.carry:hover { opacity: 1; }
|
||
.carry-badge { font-size: 10px; font-weight: 600; color: #b0721f; background: #fff3e0; border-radius: 4px; padding: 1px 6px; white-space: nowrap; margin-top: 3px; }
|
||
.carry-back { background: none; border: none; color: #b0721f; cursor: pointer; font-size: 14px; padding: 2px 4px; margin-left: 2px; opacity: .55; }
|
||
.carry-back:hover { opacity: 1; }
|
||
.add-row { display: flex; gap: 8px; margin-top: 8px; }
|
||
.add-row input {
|
||
flex: 1; padding: 9px 12px; border: 1px dashed #c4c9d9; border-radius: 8px;
|
||
font-size: 13.5px; font-family: inherit;
|
||
}
|
||
.add-row button { padding: 9px 14px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 13px; cursor: pointer; }
|
||
.add-row button:hover { background: #3a5be0; }
|
||
.empty { color: var(--muted); font-size: 13px; padding: 8px 6px; }
|
||
.subhead { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #4a5266; padding: 10px 6px 4px; }
|
||
.subhead .dot { width: 8px; height: 8px; border-radius: 50%; }
|
||
.subhead .count { font-weight: 500; color: var(--muted); font-size: 10.5px; margin-left: auto; }
|
||
.subhead.tog { cursor: pointer; user-select: none; border-radius: 6px; }
|
||
.subhead.tog:hover { background: #eef1f8; color: var(--accent); }
|
||
.subhead .caret { font-size: 9px; width: 10px; color: var(--muted); flex: none; }
|
||
.mini-btn { border: 1px solid var(--border); background: #fff; color: #4a5266; font-size: 11.5px; padding: 4px 10px; border-radius: 7px; cursor: pointer; margin-left: 6px; }
|
||
.mini-btn:hover { border-color: var(--accent); color: var(--accent); }
|
||
.prog { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
|
||
.prog .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
|
||
.prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #7c9bff); width: 0%; transition: width .25s; }
|
||
.prog span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
|
||
|
||
/* ---------- RIGHT: focus + gantt ---------- */
|
||
.focus-card h2.now { color: #e8590c; }
|
||
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
|
||
.chip {
|
||
display: inline-flex; align-items: center; gap: 7px;
|
||
border: 1px solid var(--border); background: #fafbff; border-radius: 10px;
|
||
padding: 7px 12px; font-size: 13px; font-weight: 500; cursor: default;
|
||
}
|
||
.chip .sw { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
|
||
.chip.due { border-color: #f3c18f; background: #fff8ef; font-weight: 600; cursor: pointer; }
|
||
.chip.due:hover { border-color: #e8a95f; box-shadow: 0 1px 5px rgba(180,110,20,.25); }
|
||
.chip.done .chip-name { text-decoration: line-through; color: var(--muted); }
|
||
.chip .done-tag { font-size: 10px; font-weight: 700; color: #1e7b3a; background: #e7f6ec; border-radius: 4px; padding: 1px 6px; }
|
||
.chip .due-tag { font-size: 10px; font-weight: 700; color: #b0721f; background: #ffe9c8; border-radius: 4px; padding: 1px 6px; }
|
||
.chip.upcoming .soon-tag { font-size: 10px; font-weight: 700; color: #5a6478; background: #eef1f8; border-radius: 4px; padding: 1px 6px; }
|
||
.chip.upcoming { cursor: pointer; }
|
||
.chip.upcoming:hover { border-color: var(--accent); box-shadow: 0 1px 5px rgba(74,108,247,.18); }
|
||
.focus-empty { color: var(--muted); font-size: 13px; margin-top: 8px; }
|
||
.flag { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #f0dcb8; background: #fff8ef; color: #7a4d12; border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
|
||
.flag .sw { width: 9px; height: 9px; border-radius: 3px; background: #f59f00; flex: 0 0 auto; }
|
||
.flag-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 8px; border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; background: #fffdf8; }
|
||
.flag-item.resolved { opacity: .55; background: #f7fbf8; }
|
||
.flag-item .f-body { flex: 1; min-width: 0; }
|
||
.flag-item .f-text { font-size: 13.5px; line-height: 1.4; }
|
||
.flag-item .f-meta { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
|
||
.flag-item .f-tag { background: #eef1f8; color: #5a6478; border-radius: 4px; padding: 1px 6px; font-weight: 600; }
|
||
.flag-item .f-date { background: #fff3e0; color: #b0721f; border-radius: 4px; padding: 1px 6px; font-weight: 600; }
|
||
.flag-btn { background: none; border: 1px solid var(--border); cursor: pointer; font-size: 11.5px; padding: 3px 8px; border-radius: 6px; color: var(--muted); white-space: nowrap; }
|
||
.flag-btn:hover { border-color: var(--accent); color: var(--accent); }
|
||
.flag-btn.del:hover { border-color: #e74c3c; color: #e74c3c; }
|
||
.flag-add { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 10px; }
|
||
.flag-add .f-desc { grid-column: 1 / -1; width: 100%; padding: 9px 12px; border: 1px dashed #c4c9d9; border-radius: 8px; font-size: 13.5px; font-family: inherit; }
|
||
.flag-add input, .flag-add select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; font-family: inherit; color: var(--text); background: #fff; }
|
||
.flag-add button { padding: 8px 14px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
|
||
.flag-add button:hover { background: #3a5be0; }
|
||
.flag-item .f-body { cursor: pointer; }
|
||
.flag-item .f-body:hover .f-text { color: var(--accent); }
|
||
.flag-item .f-taskcount { background: #eef6ff; color: #3a5be0; border-radius: 4px; padding: 1px 6px; font-weight: 600; }
|
||
.flag { cursor: pointer; }
|
||
.flag:hover { border-color: #f59f00; background: #fff3dd; }
|
||
.fe-tasks { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
|
||
.fe-task { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fffdf8; font-size: 13px; }
|
||
.fe-task input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); flex: 0 0 auto; }
|
||
.fe-task .ft-text { flex: 1; min-width: 0; }
|
||
.fe-task .ft-text.done { text-decoration: line-through; opacity: .55; }
|
||
.fe-task .ft-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 2px; flex: 0 0 auto; }
|
||
.fe-task .ft-del:hover { color: #e74c3c; }
|
||
.fe-empty { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
|
||
.fe-add { display: flex; gap: 8px; margin-top: 10px; }
|
||
.fe-add input { flex: 1; padding: 8px 10px; border: 1px dashed #c4c9d9; border-radius: 8px; font-size: 13px; font-family: inherit; }
|
||
.fe-add button { padding: 8px 14px; background: var(--accent); border: none; color: #fff; border-radius: 8px; font-size: 13px; cursor: pointer; }
|
||
.fe-add button:hover { background: #3a5be0; }
|
||
|
||
.gantt-scroll { overflow-x: auto; margin-top: 10px; }
|
||
table.gantt { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 12px; }
|
||
table.gantt th, table.gantt td { border: 1px solid var(--border); padding: 0; }
|
||
table.gantt th.month { font-weight: 700; font-size: 11.5px; text-align: center; padding: 6px 2px; background: #f2f4fb; color: #3c4356; }
|
||
table.gantt th.corner { background: #f2f4fb; }
|
||
table.gantt th.week { font-weight: 600; color: var(--muted); font-size: 10.5px; text-align: center; padding: 4px 0; }
|
||
table.gantt th.week.now { background: #ffe9c8; color: #b0721f; }
|
||
table.gantt tr.proj-row td { background: #f2f4fb; padding: 6px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; }
|
||
table.gantt tr.proj-row td .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
|
||
table.gantt td.task-name { padding: 5px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
|
||
table.gantt td.cell { position: relative; background: #fff; height: 26px; }
|
||
table.gantt td.cell.nowcol { background: #fffaf3; }
|
||
.bar { position: absolute; left: 3px; right: 3px; top: 5px; bottom: 5px; border-radius: 7px; box-shadow: 0 1px 3px rgba(20,30,60,.18); cursor: pointer; }
|
||
.bar:hover { filter: brightness(1.12); }
|
||
.bar.span { left: 0; right: 0; border-radius: 0; box-shadow: none; }
|
||
.bar.span-first { left: 3px; border-radius: 7px 0 0 7px; box-shadow: 0 1px 3px rgba(20,30,60,.18); }
|
||
.bar.span-last { right: 3px; border-radius: 0 7px 7px 0; box-shadow: 0 1px 3px rgba(20,30,60,.18); }
|
||
.bar.ongoing { background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 6px, rgba(255,255,255,0) 6px 12px); }
|
||
.wk-badge.inprog { background: #e7f6ec; color: #1e7b3a; border: 1px solid #bfe5cc; }
|
||
.wk-badge.delayed { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c0; }
|
||
.chip .delayed-tag { font-size: 10px; font-weight: 700; color: #c0392b; background: #fdecea; border-radius: 4px; padding: 1px 6px; }
|
||
.chip .inprog-tag { font-size: 10px; font-weight: 700; color: #1e7b3a; background: #e7f6ec; border-radius: 4px; padding: 1px 6px; }
|
||
.st-btn { flex: 1; padding: 9px 10px; border: 1px solid var(--border); background: #fff; color: #4a5266; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
|
||
.st-btn:hover { border-color: var(--accent); color: var(--accent); }
|
||
.st-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
|
||
.st-btn.active.done { background: var(--done); border-color: var(--done); color: #fff; }
|
||
.st-btn.active.inprog { background: #2ecc71; border-color: #2ecc71; color: #fff; }
|
||
.st-btn.active.delayed { background: #e74c3c; border-color: #e74c3c; color: #fff; }
|
||
.st-clear { background: none; border: none; color: var(--muted); font-size: 11.5px; cursor: pointer; text-decoration: underline; }
|
||
.st-clear:hover { color: #e74c3c; }
|
||
.bar-note { position: absolute; top: -7px; right: -5px; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 1.5px solid #4a6cf7; color: #4a6cf7; font-size: 9px; font-weight: 800; display: grid; place-content: center; line-height: 1; }
|
||
|
||
/* hover tooltip for task notes */
|
||
.note-tip {
|
||
position: fixed; z-index: 60; max-width: 300px; background: #fff; border: 1px solid var(--border);
|
||
border-radius: 10px; box-shadow: 0 8px 28px rgba(10,20,50,.22); padding: 10px 12px;
|
||
pointer-events: none; font-size: 12.5px; line-height: 1.5; color: var(--text);
|
||
}
|
||
.note-tip .nt-head { font-size: 12.5px; margin-bottom: 4px; }
|
||
.note-tip .nt-head span { color: var(--muted); font-weight: 600; }
|
||
.note-tip .nt-note { white-space: pre-wrap; color: #3c4356; }
|
||
.note-tip .nt-none { color: var(--muted); font-style: italic; }
|
||
|
||
.note-ico { font-size: 12px; margin-left: 4px; cursor: pointer; }
|
||
|
||
.zoom-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
|
||
.zoom-btn { border: 1px solid var(--border); background: #fff; color: #4a5266; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 8px; cursor: pointer; }
|
||
.zoom-btn:hover { border-color: var(--accent); color: var(--accent); }
|
||
.zoom-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
|
||
.zoom-label { font-size: 11.5px; color: var(--muted); margin-left: 4px; }
|
||
|
||
/* notes modal */
|
||
.modal-ov { position: fixed; inset: 0; background: rgba(15,20,40,.45); display: grid; place-content: center; z-index: 50; padding: 20px; }
|
||
.modal { background: #fff; border-radius: 14px; width: min(480px, 100%); padding: 18px 20px; box-shadow: 0 10px 40px rgba(10,20,50,.3); }
|
||
.modal h3 { font-size: 15px; margin-bottom: 2px; }
|
||
.modal .m-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
|
||
.modal textarea { width: 100%; min-height: 110px; resize: vertical; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; font-family: inherit; }
|
||
.modal .m-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
|
||
.modal .m-actions button { padding: 8px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; border: 1px solid var(--border); background: #fff; color: #4a5266; }
|
||
.modal .m-actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
|
||
.modal .m-actions button.danger:hover { border-color: #e74c3c; color: #e74c3c; }
|
||
.modal .m-actions .spacer { flex: 1; }
|
||
.legend { display: flex; gap: 12px; margin-top: 10px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
|
||
.legend span { display: inline-flex; align-items: center; gap: 5px; }
|
||
.legend i { width: 11px; height: 11px; border-radius: 3px; }
|
||
|
||
|
||
/* ---------- hub tabs ---------- */
|
||
.hubbar { max-width: 1760px; margin: 0 auto; padding: 12px 20px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
|
||
.hubbar .hub-title { font-size: 17px; font-weight: 800; letter-spacing: .01em; }
|
||
.hubbar .hub-date { color: var(--muted); font-size: 13px; }
|
||
.tabbar { display: flex; gap: 6px; margin: 10px 0 0; }
|
||
.tabbtn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13.5px; font-weight: 700;
|
||
border: 1.5px solid var(--border); background: #fff; color: #4a5266; border-radius: 10px; padding: 7px 16px; cursor: pointer; transition: all .12s; }
|
||
.tabbtn:hover { border-color: var(--accent); color: var(--accent); }
|
||
.tabbtn.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(74,108,247,.3); }
|
||
.tabbtn .tbadge { font-size: 11px; font-weight: 800; background: #fdecea; color: #c0392b; border-radius: 999px; padding: 2px 8px; }
|
||
.tabbtn.active .tbadge { background: rgba(255,255,255,.28); color: #fff; }
|
||
.tabpane { display: none; }
|
||
.tabpane.active { display: block; }
|
||
#tab-uat .container { max-width: 1760px; padding: 4px 20px 48px; }
|
||
#tab-uat .section-head { padding: 14px 12px 6px; }
|
||
/* Web Alignment tab */
|
||
.wa-wrap { max-width: 1100px; margin: 0 auto; }
|
||
.wa-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin: 4px 0 14px; font-size: 14px; }
|
||
.wa-when .wa-sub { color: var(--muted); font-size: 12.5px; }
|
||
.wa-when.today { background: #fff8ef; border-color: #f3c18f; font-weight: 600; }
|
||
.wa-added { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
|
||
/* WA sub-items */
|
||
.wa-subs { margin: 1px 0 6px 36px; }
|
||
.wa-subrow { font-size: 13px !important; padding: 4px 6px !important; background: #fbfcff; }
|
||
.wa-subrow input { width: 15px !important; height: 15px !important; min-width: 15px !important; }
|
||
.wa-subcnt { font-size: 10.5px; font-weight: 700; color: #5a6478; background: #eef1f8; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
|
||
.wa-addsub { font-size: 11px; font-weight: 600; border: 1px dashed #c4c9d9; background: #fff; color: var(--muted); border-radius: 7px; padding: 2px 9px; cursor: pointer; white-space: nowrap; font-family: inherit; }
|
||
.wa-addsub:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
||
.wa-subadd { margin: 2px 0 4px; }
|
||
.wa-subadd input { width: 100%; padding: 6px 10px; border: 1.5px solid var(--accent); border-radius: 8px; font: inherit; font-size: 13px; }
|
||
/* Backup / restore */
|
||
.hub-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
|
||
.hub-actions .mini-btn, .hub-actions label.mini-btn { cursor: pointer; }
|
||
/* de-clutter: the hub bar already carries the title & date */
|
||
#tab-roadmap .page-header { display: none; }
|
||
#tab-roadmap .page { padding-top: 4px; }
|
||
.hubbar .hub-wk { margin-left: 0; }
|
||
#tab-uat footer { margin-top: 16px; font-size: 11.5px; }
|
||
#tab-uat header h1 { display: none; }
|
||
#tab-uat .sub { margin-top: 0; }
|
||
|
||
|
||
:root {
|
||
--bg: #f6f7fb;
|
||
--card: #ffffff;
|
||
--accent: #4a6cf7;
|
||
--accent-soft: #e8edff;
|
||
--text: #1f2430;
|
||
--muted: #7a8195;
|
||
--border: #e3e6ef;
|
||
--st0: #9aa1b5; /* not reached out */
|
||
--st0bg: #eef0f6;
|
||
--st1: #4a6cf7; /* reached out */
|
||
--st1bg: #e8edff;
|
||
--st2: #d98b0b; /* waiting */
|
||
--st2bg: #fdf3df;
|
||
--st3: #22a45d; /* approved */
|
||
--st3bg: #e4f6ec;
|
||
--st4: #8a5cd6; /* on hold */
|
||
--st4bg: #f1eafc;
|
||
}
|
||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||
background: var(--bg);
|
||
color: var(--text);
|
||
}
|
||
.container { max-width: 1120px; margin: 0 auto; }
|
||
#tab-uat header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
|
||
#tab-uat h1 { font-size: 22px; font-weight: 700; }
|
||
.sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
|
||
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
||
#tab-uat button, #tab-uat select, #tab-uat label.filebtn {
|
||
font: inherit; font-size: 13.5px;
|
||
border: 1px solid var(--border);
|
||
background: var(--card);
|
||
color: var(--text);
|
||
border-radius: 9px;
|
||
padding: 8px 12px;
|
||
cursor: pointer;
|
||
transition: background .15s, border-color .15s;
|
||
}
|
||
#tab-uat button:hover, #tab-uat select:hover { background: #f2f4fa; }
|
||
label.filebtn { display: inline-flex; align-items: center; }
|
||
label.filebtn input { display: none; }
|
||
|
||
.summary {
|
||
background: var(--card);
|
||
border: 1px solid var(--border);
|
||
border-radius: 14px;
|
||
padding: 16px 20px;
|
||
margin: 18px 0 20px;
|
||
box-shadow: 0 1px 3px rgba(20,30,60,.05);
|
||
}
|
||
.summary-grid { display: flex; gap: 10px; flex-wrap: wrap; }
|
||
.uchip {
|
||
display: flex; flex-direction: column; gap: 2px;
|
||
border-radius: 10px; padding: 8px 14px; min-width: 118px;
|
||
}
|
||
.uchip .n { font-size: 20px; font-weight: 700; }
|
||
.uchip .l { font-size: 12px; }
|
||
.uchip.s0 { background: var(--st0bg); } .uchip.s0 .l { color: var(--st0); }
|
||
.uchip.s1 { background: var(--st1bg); } .uchip.s1 .l { color: var(--st1); }
|
||
.uchip.s2 { background: var(--st2bg); } .uchip.s2 .l { color: var(--st2); }
|
||
.uchip.s3 { background: var(--st3bg); } .uchip.s3 .l { color: var(--st3); }
|
||
.uchip.s4 { background: var(--st4bg); } .uchip.s4 .l { color: var(--st4); }
|
||
.progress-wrap { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 14px; }
|
||
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #7c9bff); border-radius: 999px; transition: width .3s ease; }
|
||
.progress-label { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
|
||
|
||
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
|
||
.filters .search { flex: 1; min-width: 200px; }
|
||
.filters input {
|
||
width: 100%; font: inherit; font-size: 13.5px;
|
||
border: 1px solid var(--border); border-radius: 9px;
|
||
padding: 8px 12px; background: var(--card);
|
||
}
|
||
.filters input:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
|
||
|
||
.section {
|
||
background: var(--card);
|
||
border: 1px solid var(--border);
|
||
border-radius: 14px;
|
||
padding: 6px 10px;
|
||
margin-bottom: 16px;
|
||
box-shadow: 0 1px 3px rgba(20,30,60,.05);
|
||
}
|
||
.section h2 {
|
||
font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em;
|
||
color: var(--muted); padding: 12px 10px 4px;
|
||
display: flex; justify-content: space-between; align-items: baseline;
|
||
}
|
||
.state-label {
|
||
font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
|
||
color: var(--accent); padding: 10px 10px 2px;
|
||
}
|
||
.colhead {
|
||
display: grid;
|
||
grid-template-columns: 104px minmax(0,1fr) 150px 196px 136px 246px;
|
||
gap: 10px; align-items: center;
|
||
padding: 4px 10px 6px;
|
||
font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
|
||
color: var(--muted);
|
||
border-bottom: 1px solid #eceef5;
|
||
}
|
||
.rowwrap { border-bottom: 1px solid #f0f2f8; display: grid; grid-template-columns: 30px 30px 1fr; gap: 2px 6px; align-items: center; }
|
||
.rowwrap:last-child { border-bottom: none; }
|
||
.rowwrap .uat-line { grid-column: 3; }
|
||
.holdbtn {
|
||
width: 26px; height: 26px; border-radius: 50%; padding: 0;
|
||
border: 1.5px solid var(--border); background: #fff; color: var(--muted);
|
||
font-size: 11.5px; line-height: 1; cursor: pointer;
|
||
display: flex; align-items: center; justify-content: center;
|
||
transition: all .12s;
|
||
}
|
||
.holdbtn:hover { border-color: var(--st4); color: var(--st4); background: var(--st4bg); }
|
||
.holdbtn.on { background: var(--st4); border-color: var(--st4); color: #fff; box-shadow: 0 1px 4px rgba(138,92,214,.35); }
|
||
.row {
|
||
display: grid;
|
||
grid-template-columns: 104px minmax(0,1fr) 150px 196px 136px 246px;
|
||
gap: 10px; align-items: center;
|
||
padding: 8px 10px; border-radius: 9px;
|
||
border-left: 3px solid transparent;
|
||
}
|
||
.row.st-1 { border-left-color: var(--st1); background: linear-gradient(90deg, var(--st1bg), transparent 45%); }
|
||
.row.st-2 { border-left-color: var(--st2); background: linear-gradient(90deg, var(--st2bg), transparent 45%); }
|
||
.row.st-3 { border-left-color: var(--st3); background: linear-gradient(90deg, var(--st3bg), transparent 45%); }
|
||
.row.st-4 { border-left-color: var(--st4); background: linear-gradient(90deg, var(--st4bg), transparent 45%); }
|
||
.row:last-child { border-bottom: none; }
|
||
.row:hover { background: #f8f9fd; }
|
||
.row .ticket { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--accent); }
|
||
.row .desc { font-size: 13.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||
.row .cell { font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||
.row .cell.tester { white-space: normal; overflow: visible; }
|
||
.row .cell.tester .tag.tester { display: block; white-space: normal; line-height: 1.5; }
|
||
.tag {
|
||
font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
|
||
background: var(--st0bg); color: var(--muted); white-space: nowrap;
|
||
}
|
||
.tag.epic { background: #f0f2f8; color: var(--muted); }
|
||
.tag.tester { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
|
||
.status-btns { display: flex; gap: 3px; justify-content: flex-end; }
|
||
.sbtn {
|
||
font-size: 11.5px; font-weight: 600;
|
||
border: 1.5px solid transparent; border-radius: 8px;
|
||
padding: 5px 8px; cursor: pointer; white-space: nowrap;
|
||
background: transparent; color: var(--muted);
|
||
transition: all .12s;
|
||
}
|
||
.sbtn:hover { background: #eef0f6; }
|
||
.sbtn[data-s="0"].on { background: var(--st0bg); border-color: var(--st0); color: var(--st0); }
|
||
.sbtn[data-s="1"].on { background: var(--st1); border-color: var(--st1); color: #fff; }
|
||
.sbtn[data-s="2"].on { background: var(--st2); border-color: var(--st2); color: #fff; }
|
||
.sbtn[data-s="3"].on { background: var(--st3); border-color: var(--st3); color: #fff; }
|
||
.sbtn[data-s="4"].on { background: var(--st4); border-color: var(--st4); color: #fff; }
|
||
.clearbtn {
|
||
font-size: 12px; line-height: 1;
|
||
border: none; border-radius: 8px;
|
||
padding: 5px 7px; cursor: pointer;
|
||
background: transparent; color: #b6bccd;
|
||
transition: all .12s;
|
||
}
|
||
.clearbtn:hover { background: #fdecec; color: #d64545; }
|
||
.uempty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14.5px; }
|
||
@media (max-width: 960px) {
|
||
.colhead { display: none; }
|
||
.row { grid-template-columns: 96px minmax(0,1fr) auto; }
|
||
.row .cell { display: none; }
|
||
}
|
||
.drop-hint {
|
||
border: 2px dashed var(--border); border-radius: 14px;
|
||
padding: 28px; text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 16px;
|
||
}
|
||
.drop-hint.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
|
||
footer { margin-top: 28px; font-size: 12px; color: var(--muted); text-align: center; }
|
||
.editable { cursor: text; border-radius: 6px; transition: background .12s, outline-color .12s; outline: 1px dashed transparent; outline-offset: -1px; }
|
||
.editable:hover { background: #eef1fb; outline-color: #b9c4e8; }
|
||
.inline-edit { width: 100%; font: inherit; font-size: 12.5px; border: 1.5px solid var(--accent); border-radius: 6px; padding: 4px 6px; background: #fff; color: var(--text); }
|
||
.inline-edit:focus { outline: none; }
|
||
.uat-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 2px 10px 9px; }
|
||
.mini { font-size: 12px; font-weight: 600; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); cursor: pointer; transition: all .12s; }
|
||
.mini:hover { background: #f2f4fa; }
|
||
.mini.wip:hover { background: var(--st2bg); border-color: var(--st2); color: var(--st2); }
|
||
.notetext { font-size: 12.5px; color: var(--muted); font-style: italic; flex: 1 1 220px; min-width: 200px; line-height: 1.4; }
|
||
.note-edit { flex: 1 1 240px; min-width: 220px; font: inherit; font-size: 12.5px; border: 1.5px solid var(--accent); border-radius: 8px; padding: 6px 8px; background: #fff; color: var(--text); }
|
||
|
||
/* launch-aware additions */
|
||
.uat-banner { display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:#fff8ef; border:1px solid #f3c18f; color:#7a4d12; border-radius:12px; padding:12px 16px; margin:14px 0; font-size:14px; font-weight:600; }
|
||
.uat-banner .b-sub { font-weight:400; font-size:12.5px; color:#a06a20; }
|
||
.launch-cards { display:flex; gap:12px; flex-wrap:wrap; margin:16px 0 18px; }
|
||
.lcard { background:var(--card); border:1px solid var(--border); border-radius:14px; padding:12px 16px; min-width:230px; flex:1; box-shadow:0 1px 3px rgba(20,30,60,.05); }
|
||
.lcard h3 { font-size:13.5px; margin-bottom:2px; }
|
||
.lcard .rule { font-size:11.5px; color:var(--muted); margin-bottom:8px; }
|
||
.lcard .lnext { font-size:14.5px; font-weight:700; }
|
||
.lcard .lnext .fz { color:#b0721f; }
|
||
.lcard .lcount { margin-top:6px; font-size:12px; color:var(--muted); }
|
||
.lcard .lcount b { color:var(--text); }
|
||
.lcard .lmore { margin-top:4px; font-size:11.5px; color:var(--muted); }
|
||
.lcard.hot { border-color:#f3c18f; background:linear-gradient(180deg,#fffaf2,#fff); }
|
||
.bottombtn { width:26px; height:26px; border-radius:50%; padding:0; border:1.5px solid var(--border); background:#fff; color:var(--muted); font-size:11px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .12s; }
|
||
.bottombtn:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
|
||
.bottombtn.on { background:#4a5266; border-color:#4a5266; color:#fff; }
|
||
.bsec { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
|
||
.bsec .blaunch { font-size:13.5px; font-weight:700; color:var(--text); }
|
||
.bsec .bfreeze { font-size:12.5px; font-weight:600; color:#b0721f; background:#fff3e0; border-radius:999px; padding:3px 10px; }
|
||
.bsec .bdays { font-size:11.5px; font-weight:700; border-radius:999px; padding:3px 10px; }
|
||
.bdays.urgent { background:#fdecea; color:#c0392b; }
|
||
.bdays.soon { background:#fff3e0; color:#b0721f; }
|
||
.bdays.later { background:#eef1f8; color:#5a6478; }
|
||
.bsec .bsub { font-size:11.5px; color:var(--muted); }
|
||
.bsec .count { margin-left:auto; font-weight:500; color:var(--muted); font-size:11px; }
|
||
.bottom-zone { margin-top:8px; border-top:1.5px dashed #e3e6ef; padding-top:2px; }
|
||
.bottom-zone .bz-label { font-size:10.5px; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); padding:8px 10px 0; }
|
||
.secbody .row.dimmed { opacity:.82; }
|
||
/* nearest-launch section = most prominent */
|
||
.section.next { border:1.5px solid #f3c18f; background:linear-gradient(180deg,#fffaf2 0%,#fff 55%); box-shadow:0 2px 12px rgba(180,110,20,.14); }
|
||
.bnext { font-size:10.5px; font-weight:800; letter-spacing:.06em; color:#b0721f; background:#fff3e0; border:1px solid #f3c18f; border-radius:999px; padding:3px 10px; }
|
||
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<div class="hubbar">
|
||
<div class="hub-title">🐱 ServiceMeow HQ</div>
|
||
<div class="hub-date" id="hubDate"></div>
|
||
<div class="hub-actions">
|
||
<button class="mini-btn" onclick="exportBackup()" title="Download all ServiceMeow browser-saved data as a JSON file">⬇ Export backup</button>
|
||
<label class="mini-btn" title="Restore saved data from an exported JSON file (overwrites matching keys)">⬆ Import backup<input type="file" accept="application/json,.json" hidden onchange="if(this.files[0]){importBackup(this.files[0]);} this.value=''"></label>
|
||
</div>
|
||
<div class="tabbar">
|
||
<button class="tabbtn" id="tabbtn-roadmap" onclick="switchTab('roadmap')">📋 Roadmap & Daily</button>
|
||
<button class="tabbtn" id="tabbtn-uat" onclick="switchTab('uat')">🧪 UAT Launches <span class="tbadge" id="uatBadge">🚀</span></button>
|
||
<button class="tabbtn" id="tabbtn-wa" onclick="switchTab('wa')">🤝 Web Alignment <span class="tbadge" id="waBadge">—</span></button>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div id="tab-roadmap" class="tabpane">
|
||
|
||
<div class="page">
|
||
<div class="page-header">
|
||
<div>
|
||
<span class="wk-pill" id="wkPill"></span>
|
||
<div class="date" id="today" hidden></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layout">
|
||
|
||
<!-- ================= LEFT ================= -->
|
||
<div>
|
||
|
||
<!-- MY DAILY TASKS (user-managed) -->
|
||
<div class="card">
|
||
<div class="card-head">
|
||
<div>
|
||
<h2>📋 My Daily Tasks</h2>
|
||
<div class="hint">Your tasks for today — resets each day. Didn't get to one? Hover it and hit → to push it to tomorrow.</div>
|
||
</div>
|
||
<button class="mini-btn" onclick="clearDaily()">Clear today</button>
|
||
</div>
|
||
<div id="dailyList"></div>
|
||
<div class="add-row">
|
||
<input type="text" id="dailyInput" placeholder="Add a task for today…"
|
||
onkeydown="if(event.key==='Enter') addDaily()">
|
||
<button onclick="addDaily()">Add</button>
|
||
</div>
|
||
<div id="tomorrowWrap" style="margin-top:6px"></div>
|
||
</div>
|
||
|
||
<!-- ROADMAP IMPACTS / FLAGS -->
|
||
<div class="card">
|
||
<div class="card-head">
|
||
<div>
|
||
<h2>🚩 Impacts & Flags</h2>
|
||
<div class="hint">Things that come up and impact the roadmap or your tasks. 💡 Click a flag to edit it and add the tasks to resolve it. Persists until you resolve/remove it.</div>
|
||
</div>
|
||
</div>
|
||
<div id="flagList"></div>
|
||
<div class="flag-add">
|
||
<input type="text" class="f-desc" id="flagDesc" placeholder="What came up? (impact, blocker, decision, risk…)">
|
||
<select id="flagRel">
|
||
<option value="">Related area (optional)</option>
|
||
</select>
|
||
<input type="date" id="flagDate" title="Date (optional)">
|
||
<button onclick="addFlag()" style="grid-column:1/-1">Add flag</button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ROADMAP TASKS -->
|
||
<div class="card">
|
||
<div class="card-head">
|
||
<div>
|
||
<h2>✅ Roadmap Tasks</h2>
|
||
<div class="hint">Web27 Roadmap (updated) — progress saves in this browser · click a section to expand / collapse · click a week badge to move / update a task</div>
|
||
</div>
|
||
<div>
|
||
<button class="mini-btn" onclick="expandAllSections(false)">Expand all</button>
|
||
<button class="mini-btn" onclick="expandAllSections(true)">Collapse all</button>
|
||
</div>
|
||
</div>
|
||
<div class="prog"><div class="bar"><i id="rbar"></i></div><span id="rlabel"></span></div>
|
||
<div id="todoList"></div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<!-- ================= RIGHT ================= -->
|
||
<div>
|
||
|
||
<!-- FOCUS: what you need to be aware of now -->
|
||
<div class="card focus-card">
|
||
<div class="card-head">
|
||
<div>
|
||
<h2 class="now" id="focusTitle">🎯 Due This Week</h2>
|
||
<div class="hint" id="focusHint"></div>
|
||
<div class="hint" style="margin-top:1px">💡 Click a bubble to mark it in progress / complete / delayed, or move it to a different week</div>
|
||
</div>
|
||
</div>
|
||
<div id="focusChips"></div>
|
||
|
||
<div class="subhead" style="margin-top:14px">🚩 Your flags (open) <span style="font-weight:500;text-transform:none;letter-spacing:0;color:var(--muted);font-size:11px">· click a flag to edit it</span></div>
|
||
<div class="chip-row" id="flagChips"></div>
|
||
|
||
<div class="subhead" style="margin-top:14px">📅 Up Next (following weeks) <span style="font-weight:500;text-transform:none;letter-spacing:0;color:var(--muted);font-size:11px">· click a bubble to update</span></div>
|
||
<div id="upcomingChips"></div>
|
||
</div>
|
||
|
||
<!-- FULL GANTT -->
|
||
<div class="card">
|
||
<div class="card-head">
|
||
<div>
|
||
<h2>🗺️ Roadmap Timeline</h2>
|
||
<div class="hint">WK 1–33 · amber column = current week · 💡 drag a bubble <b>or a task row</b> to another week to move it · click for a note</div>
|
||
</div>
|
||
<div class="zoom-row" id="zoomRow">
|
||
<button class="zoom-btn active" data-view="month" onclick="setGanttView('month', this)">This month</button>
|
||
<button class="zoom-btn" data-view="2mo" onclick="setGanttView('2mo', this)">2 months</button>
|
||
<button class="zoom-btn" data-view="3mo" onclick="setGanttView('3mo', this)">3 months</button>
|
||
<button class="zoom-btn" data-view="full" onclick="setGanttView('full', this)">Full</button>
|
||
<span class="zoom-label" id="zoomLabel"></span>
|
||
</div>
|
||
</div>
|
||
<div class="gantt-scroll" id="gantt"></div>
|
||
<div class="legend" id="legend"></div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<!-- task note modal -->
|
||
<div class="modal-ov" id="noteModal" style="display:none" onclick="if(event.target===this) closeNote()">
|
||
<div class="modal">
|
||
<h3 id="noteTitle"></h3>
|
||
<div class="m-sub" id="noteSub"></div>
|
||
<textarea id="noteText" placeholder="Add a note… (context, blocker, decision, link, owner)"></textarea>
|
||
<div class="m-actions">
|
||
<button class="danger" onclick="deleteNote()">Delete note</button>
|
||
<span class="spacer"></span>
|
||
<button onclick="closeNote()">Cancel</button>
|
||
<button class="primary" onclick="saveNote()">Save note</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- task update modal (due-this-week bubbles) -->
|
||
<div class="modal-ov" id="taskModal" style="display:none" onclick="if(event.target===this) closeTaskUpdate()">
|
||
<div class="modal">
|
||
<h3 id="tuTitle"></h3>
|
||
<div class="m-sub" id="tuSub"></div>
|
||
<div style="display:flex;flex-direction:column;gap:10px;margin-top:6px">
|
||
<div style="display:flex;gap:8px">
|
||
<button id="stInprog" onclick="tuSetStatus('inprog')" class="st-btn">▶ In progress</button>
|
||
<button id="stDone" onclick="tuSetStatus('done')" class="st-btn">✓ Complete</button>
|
||
<button id="stDelayed" onclick="tuSetStatus('delayed')" class="st-btn">⏳ Delayed</button>
|
||
</div>
|
||
<div id="stClearRow" style="display:none"><button class="st-clear" onclick="tuSetStatus(null)">clear status</button></div>
|
||
<div style="display:flex;gap:8px">
|
||
<select id="tuWk" style="flex:1;padding:8px 10px;border:1px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit;color:var(--text);background:#fff"></select>
|
||
<button id="tuMoveBtn" onclick="tuMoveWeek()" style="padding:8px 14px;background:var(--accent);border:none;color:#fff;border-radius:8px;font-size:13px;cursor:pointer">Move to…</button>
|
||
</div>
|
||
<div style="font-size:11.5px;color:var(--muted)">Changes apply to the Roadmap Tasks list and the Timeline above, and save in this browser.</div>
|
||
</div>
|
||
<div class="m-actions">
|
||
<span class="spacer"></span>
|
||
<button onclick="closeTaskUpdate()">Close</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- flag edit modal -->
|
||
<div class="modal-ov" id="flagModal" style="display:none" onclick="if(event.target===this) closeFlagEdit()">
|
||
<div class="modal">
|
||
<h3>🚩 Edit flag</h3>
|
||
<div class="m-sub">Update the flag and add the tasks needed to resolve it.</div>
|
||
<textarea id="feText" placeholder="What's this flag about?" style="min-height:70px"></textarea>
|
||
<div style="display:flex;gap:8px;margin-top:10px">
|
||
<select id="feRel" style="flex:1;padding:8px 10px;border:1px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit;color:var(--text);background:#fff"></select>
|
||
<input type="date" id="feDate" style="padding:8px 10px;border:1px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit">
|
||
</div>
|
||
<div class="subhead" style="margin-top:14px">🔧 Tasks to resolve <span style="font-weight:500;text-transform:none;letter-spacing:0;color:var(--muted);font-size:11px">· double-click a task to edit it</span></div>
|
||
<div id="feTasks" class="fe-tasks"></div>
|
||
<div class="fe-add">
|
||
<input type="text" id="feTaskInput" placeholder="Add a task to resolve this flag…" onkeydown="if(event.key==='Enter') addFlagTask()">
|
||
<button onclick="addFlagTask()">Add</button>
|
||
</div>
|
||
<div class="m-actions">
|
||
<button class="danger" onclick="deleteFlag()">Remove flag</button>
|
||
<span class="spacer"></span>
|
||
<button onclick="closeFlagEdit()">Cancel</button>
|
||
<button class="primary" onclick="saveFlagEdit()">Save</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- hover tooltip: task note reader -->
|
||
<div id="noteTip" class="note-tip" style="display:none"></div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
<div id="tab-uat" class="tabpane">
|
||
|
||
<div class="container">
|
||
<header>
|
||
<div>
|
||
<h1>UAT Outreach Tracker</h1>
|
||
<div class="sub" id="loadLabel">Stories to reach out about for UAT testing</div>
|
||
</div>
|
||
<div class="toolbar">
|
||
<select id="statusFilter">
|
||
<option value="">All statuses</option>
|
||
<option value="0">☐ Not reached out</option>
|
||
<option value="1">📤 Reached out</option>
|
||
<option value="2">⏳ Waiting on response</option>
|
||
<option value="3">✅ Approved</option>
|
||
<option value="4">⏸ On hold</option>
|
||
</select>
|
||
<select id="stateFilter">
|
||
<option value="">All ticket states</option>
|
||
</select>
|
||
<button id="showDoneToggle" title="Show or hide approved tickets">Hide approved</button>
|
||
<button id="hiddenToggle" title="Show tickets hidden because they're Approved / Awaiting Deployment / Complete / Cancelled">Show hidden</button>
|
||
<button id="resetAll" title="Clear every outreach status">Reset all</button>
|
||
<button id="backup" title="Download your statuses as a JSON file">Backup</button>
|
||
<label class="filebtn" title="Restore statuses from a backup JSON">Restore
|
||
<input type="file" id="restoreInput" accept=".json,application/json">
|
||
</label>
|
||
<label class="filebtn">📂 Load weekly CSV
|
||
<input type="file" id="csvInput" accept=".csv,text/csv">
|
||
</label>
|
||
</div>
|
||
</header>
|
||
|
||
<div id="dropHint" class="drop-hint active">📂 Drag & drop your weekly export CSV here, or use the <b>"📂 Load weekly CSV"</b> button above.</div>
|
||
|
||
<div class="uat-banner" id="uatBanner" style="display:none"></div>
|
||
<div class="launch-cards" id="launchCards"></div>
|
||
|
||
<div class="summary">
|
||
<div class="summary-grid">
|
||
<div class="uchip s0"><span class="n" id="cnt0">0</span><span class="l">Not reached out</span></div>
|
||
<div class="uchip s1"><span class="n" id="cnt1">0</span><span class="l">Reached out</span></div>
|
||
<div class="uchip s2"><span class="n" id="cnt2">0</span><span class="l">Waiting on response</span></div>
|
||
<div class="uchip s3"><span class="n" id="cnt3">0</span><span class="l">Approved</span></div>
|
||
<div class="uchip s4"><span class="n" id="cnt4">0</span><span class="l">On hold</span></div>
|
||
</div>
|
||
<div class="progress-wrap"><div class="progress-bar" id="prog"></div></div>
|
||
<div class="progress-label" id="progLabel"></div>
|
||
</div>
|
||
|
||
<div class="filters">
|
||
<div class="search"><input type="text" id="search" placeholder="Search ticket #, description, person…"></div>
|
||
<select id="epicFilter">
|
||
<option value="">All epics</option>
|
||
</select>
|
||
</div>
|
||
|
||
<div id="list"></div>
|
||
|
||
<footer>Use ⬇ to send a story to the bottom of its launch section (⬆ brings it back). Statuses and field edits are saved in this browser per ticket ID — they carry over when you load next week's export. Click a State / Tester / Dev field to edit it in place (Enter saves, Esc cancels). Use Backup/Restore to move or safeguard your data.</footer>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
<div id="tab-wa" class="tabpane">
|
||
<div class="page">
|
||
<div class="wa-wrap">
|
||
<div class="card">
|
||
<div class="card-head">
|
||
<div>
|
||
<h2>🤝 Web Alignment Team — bring up at Monday's sync</h2>
|
||
<div class="hint">Mondays 9:00 AM MT · check an item off once it's been raised — it moves to Covered until you clear it</div>
|
||
</div>
|
||
<button class="mini-btn" onclick="waClearCovered()" title="Remove all covered items">Clear covered</button>
|
||
</div>
|
||
<div class="wa-when" id="waWhen"></div>
|
||
<div class="add-row">
|
||
<input type="text" id="waInput" placeholder="What do you need to raise with the Web Alignment Team? (decision, blocker, ask, alignment needed…)" onkeydown="if(event.key==='Enter') addWaItem()">
|
||
<button onclick="addWaItem()">Add</button>
|
||
</div>
|
||
<div id="waList"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<script>
|
||
|
||
/* ================= DATA (from Web Team ServiceMeow(updated).pdf — Web27 Roadmap) ================= */
|
||
const TOTAL_WEEKS = 33;
|
||
|
||
// WK1 starts Monday Sep 22, 2026 (roadmap "9/22 launch")
|
||
const WK1_MONDAY = new Date(2026, 8, 22);
|
||
// Month blocks exactly as printed in the updated roadmap PDF (4-week blocks,
|
||
// WK1 = Sep 22). WK 25–33 are beyond the labeled months in the roadmap.
|
||
const MONTHS = [
|
||
{ name: "September", start: 1, end: 4 },
|
||
{ name: "October", start: 5, end: 8 },
|
||
{ name: "November", start: 9, end: 12 },
|
||
{ name: "December", start: 13, end: 16 },
|
||
{ name: "January", start: 17, end: 20 },
|
||
{ name: "February", start: 21, end: 24 },
|
||
{ name: "TBD", start: 25, end: 33 }
|
||
];
|
||
const monthOf = wk => MONTHS.find(mb => wk >= mb.start && wk <= mb.end);
|
||
|
||
function currentWeek() {
|
||
const t = new Date(); t.setHours(0,0,0,0);
|
||
const diffDays = Math.round((t - WK1_MONDAY) / 86400000);
|
||
const wk = diffDays >= 0 ? Math.floor(diffDays / 7) + 1 : 1;
|
||
return Math.max(1, Math.min(TOTAL_WEEKS, wk));
|
||
}
|
||
const NOW_WK = currentWeek();
|
||
|
||
const DATA = [
|
||
{ project:"New Site Build & SBD", sections:[
|
||
{ name:"Core", color:"#4a6cf7", tasks:[
|
||
["Initial Drupal Environment Setup",1],["Internationalization",3],
|
||
["Migrate Tier 1 Dev Modules",3],["SSO",2]
|
||
]},
|
||
{ name:"Theming", color:"#5b8def", tasks:[["Site Theme",2]]},
|
||
{ name:"Content", color:"#0ca678", tasks:[
|
||
["Text Formats and Editors",4],["Translations",6],
|
||
["Initial Content Creation System Migration",6],["Mega Menu and Header",8],
|
||
["Remaining Content Type Migration",12],["New Content Blocks",10],
|
||
["Custom Content Tools ((Link Replacement, Cloning + Cloning for Translations))",13],
|
||
["myComet Customer Portal",17],["Migrate Views",17]
|
||
]},
|
||
{ name:"Commerce", color:"#e8590c", tasks:[
|
||
["Controller API",1],["Cart",5],["Checkout",10],
|
||
["Share Cart Across Domains",15],["Pricing",17],
|
||
["Bulk Order / Quick Order",18],["Quote Integration",19],
|
||
["Distributor Ordering",20],["Share Cart By Email",21]
|
||
]},
|
||
{ name:"Products", color:"#7048e8", tasks:[
|
||
["Product_index",1],["Basic Search",3],["Probes",5],["Assays",13],
|
||
["Antibodies",14],["Ancillary Products",13],
|
||
["Product Alerts / Ads",16],["Product Documents / 3E SDS",16],
|
||
["Bioz Citations",17],["Citation Hub",18],["Global Document Finder",21],
|
||
["Spectra Viewer",21],["Ancillaries",9]
|
||
]},
|
||
{ name:"Search", color:"#f59f00", tasks:[
|
||
["Polished Search",7],["Search Bar and Redirects",9],
|
||
["Compare Tool",10],["Gene Pages",11],["Custom Probe Request Form",21]
|
||
]},
|
||
{ name:"FSS", color:"#0c8599", tasks:[
|
||
["Meilisearch Development",17],["Initial Module & Service Configuration",18],
|
||
["Integration into Site Search",19],["Styling",20],["SEO",21]
|
||
]},
|
||
{ name:"SEO", color:"#e64980", tasks:[
|
||
["Initial SEO Module Setup",5],["Custom SEO Module Migration",7],
|
||
["Integration with Spoke Site",9],["DataLayer",14],["Live Chat",21],["Baidu",23]
|
||
]}
|
||
]},
|
||
{ project:"Quote Tool", sections:[
|
||
{ name:"Quote Tool", color:"#37b24d", tasks:[
|
||
["Print Quote Btn changes on RndSystems",1],
|
||
["Registration Update for Business Acct.",2],
|
||
["Request Quote Functionality",3],["Redeem Quote",5]
|
||
]}
|
||
]},
|
||
{ project:"JP on Web", sections:[
|
||
{ name:"JP on Web", color:"#1098ad", tasks:[["9/22 launch final pieces",1]]}
|
||
]},
|
||
{ project:"Distributors", sections:[
|
||
{ name:"Distributors", color:"#ae3ec9", tasks:[["Distributors finalization",2]]}
|
||
]},
|
||
{ project:"3E SDS", sections:[
|
||
{ name:"3E SDS", color:"#c2255c", tasks:[
|
||
["Finalize 3E flag update to current process",3],
|
||
["Update Request language form",4],["Styling",5]
|
||
]}
|
||
]},
|
||
{ project:"BDD", sections:[
|
||
{ name:"BDD (planned — not scheduled yet)", color:"#868e96", tasks:[] }
|
||
]}
|
||
];
|
||
|
||
/* ---- due-week overrides (tasks moved around the roadmap) ---- */
|
||
const wKey = "sm-roadmap-wk-v1";
|
||
let wkOverride = {};
|
||
try { wkOverride = JSON.parse(localStorage.getItem(wKey) || "{}"); } catch(e) { wkOverride = {}; }
|
||
function saveWkOverride() { localStorage.setItem(wKey, JSON.stringify(wkOverride)); }
|
||
(function applyWkOverrides() {
|
||
DATA.forEach((p, pi) => p.sections.forEach((s, si) => s.tasks.forEach((t, ti) => {
|
||
const id = pi + "-" + si + "-" + ti;
|
||
if (wkOverride[id] && t[2] !== "ongoing") t[1] = wkOverride[id];
|
||
})));
|
||
})();
|
||
|
||
// flat list of all dated tasks: {id, name, wk, color, section, project}
|
||
const ALL_TASKS = [];
|
||
DATA.forEach((p, pi) => p.sections.forEach((s, si) => s.tasks.forEach(([name, wk, end], ti) =>
|
||
ALL_TASKS.push({ id: pi + "-" + si + "-" + ti, name, wk, ongoing: end === "ongoing", color: s.color, section: s.name, project: p.project }))));
|
||
|
||
// task id map (same ids as the roadmap todo list: pi-si-ti)
|
||
const TASK_MAP = {};
|
||
DATA.forEach((p, pi) => p.sections.forEach((s, si) => s.tasks.forEach(([name, wk, end], ti) => {
|
||
TASK_MAP[pi + "-" + si + "-" + ti] = { name, wk, ongoing: end === "ongoing", section: s.name, project: p.project };
|
||
})));
|
||
|
||
// notes store
|
||
const nKey = "sm-tasknotes-v1";
|
||
let notes = {};
|
||
try { notes = JSON.parse(localStorage.getItem(nKey) || "{}"); } catch(e) { notes = {}; }
|
||
let noteTask = null;
|
||
|
||
/* ================= LEFT: MY DAILY TASKS ================= */
|
||
const todayKey = new Date().toISOString().slice(0, 10);
|
||
const dKey = "sm-mydaily-" + todayKey;
|
||
let daily = JSON.parse(localStorage.getItem(dKey) || "[]");
|
||
|
||
function saveDaily() { localStorage.setItem(dKey, JSON.stringify(daily)); }
|
||
|
||
function renderDaily() {
|
||
const wrap = document.getElementById("dailyList");
|
||
wrap.innerHTML = "";
|
||
if (!daily.length) {
|
||
wrap.innerHTML = '<div class="empty">Nothing yet — add your tasks for today below 👇</div>';
|
||
return;
|
||
}
|
||
daily.forEach((t, i) => {
|
||
const row = document.createElement("label");
|
||
row.className = "item" + (t.done ? " checked" : "");
|
||
const cb = document.createElement("input");
|
||
cb.type = "checkbox"; cb.checked = t.done;
|
||
cb.onchange = () => { t.done = cb.checked; saveDaily(); renderDaily(); };
|
||
const span = document.createElement("span");
|
||
span.className = "txt"; span.textContent = t.text;
|
||
if (t.carried) {
|
||
const b = document.createElement("span");
|
||
b.className = "carry-badge"; b.textContent = "carried over";
|
||
span.appendChild(b);
|
||
}
|
||
const carry = document.createElement("button");
|
||
carry.className = "carry"; carry.textContent = "→";
|
||
carry.title = "Move to tomorrow";
|
||
carry.style.marginLeft = "auto";
|
||
carry.onclick = (e) => { e.preventDefault(); moveDailyTomorrow(i); };
|
||
const del = document.createElement("button");
|
||
del.className = "del"; del.textContent = "✕";
|
||
del.title = "Remove";
|
||
del.onclick = (e) => { e.preventDefault(); daily.splice(i, 1); saveDaily(); renderDaily(); };
|
||
row.append(cb, span, carry, del);
|
||
wrap.appendChild(row);
|
||
});
|
||
}
|
||
function moveDailyTomorrow(i) {
|
||
const t = daily[i];
|
||
const tm = new Date(); tm.setDate(tm.getDate() + 1);
|
||
const k = "sm-mydaily-" + tm.toISOString().slice(0, 10);
|
||
let arr = [];
|
||
try { arr = JSON.parse(localStorage.getItem(k) || "[]"); } catch(e) { arr = []; }
|
||
t.carried = true;
|
||
arr.push(t);
|
||
localStorage.setItem(k, JSON.stringify(arr));
|
||
daily.splice(i, 1);
|
||
saveDaily(); renderDaily(); renderTomorrow();
|
||
}
|
||
|
||
/* -------- Tomorrow view (carried-over tasks) -------- */
|
||
const tmDate = new Date(); tmDate.setDate(tmDate.getDate() + 1);
|
||
const tmLabel = tmDate.toLocaleDateString(undefined, { weekday: "long", month: "short", day: "numeric" });
|
||
const tKey = "sm-mydaily-" + tmDate.toISOString().slice(0, 10);
|
||
let tomorrow = [];
|
||
function loadTomorrow() { try { tomorrow = JSON.parse(localStorage.getItem(tKey) || "[]"); } catch(e) { tomorrow = []; } }
|
||
function saveTomorrow() { localStorage.setItem(tKey, JSON.stringify(tomorrow)); }
|
||
|
||
function renderTomorrow() {
|
||
loadTomorrow();
|
||
const wrap = document.getElementById("tomorrowWrap");
|
||
if (!wrap) return;
|
||
wrap.innerHTML = '';
|
||
const head = document.createElement("div");
|
||
head.className = "subhead";
|
||
head.style.marginTop = "12px";
|
||
head.innerHTML = `🌅 Tomorrow <span style="font-weight:500;text-transform:none;letter-spacing:0;color:var(--muted)">(${tmLabel})</span>`;
|
||
const count = document.createElement("span");
|
||
count.className = "count"; count.textContent = tomorrow.length;
|
||
head.appendChild(count);
|
||
wrap.appendChild(head);
|
||
|
||
if (!tomorrow.length) {
|
||
const em = document.createElement("div");
|
||
em.className = "empty";
|
||
em.textContent = "Nothing carried over yet — use → on a task above to push it here.";
|
||
wrap.appendChild(em);
|
||
return;
|
||
}
|
||
tomorrow.forEach((t, i) => {
|
||
const row = document.createElement("label");
|
||
row.className = "item" + (t.done ? " checked" : "");
|
||
const cb = document.createElement("input");
|
||
cb.type = "checkbox"; cb.checked = t.done;
|
||
cb.onchange = () => { t.done = cb.checked; saveTomorrow(); renderTomorrow(); };
|
||
const span = document.createElement("span");
|
||
span.className = "txt"; span.textContent = t.text;
|
||
const back = document.createElement("button");
|
||
back.className = "carry-back"; back.textContent = "←";
|
||
back.title = "Bring back to today";
|
||
back.style.marginLeft = "auto";
|
||
back.onclick = (e) => {
|
||
e.preventDefault();
|
||
const idx = tomorrow.indexOf(t);
|
||
if (idx !== -1) tomorrow.splice(idx, 1);
|
||
t.carried = false;
|
||
saveTomorrow();
|
||
daily.push(t); saveDaily();
|
||
renderDaily(); renderTomorrow();
|
||
};
|
||
const del = document.createElement("button");
|
||
del.className = "del"; del.textContent = "✕";
|
||
del.title = "Remove";
|
||
del.onclick = (e) => {
|
||
e.preventDefault();
|
||
const idx = tomorrow.indexOf(t);
|
||
if (idx !== -1) tomorrow.splice(idx, 1);
|
||
saveTomorrow(); renderTomorrow();
|
||
};
|
||
row.append(cb, span, back, del);
|
||
wrap.appendChild(row);
|
||
});
|
||
}
|
||
function addDaily() {
|
||
const inp = document.getElementById("dailyInput");
|
||
const text = inp.value.trim();
|
||
if (!text) return;
|
||
daily.push({ text, done: false });
|
||
inp.value = ""; saveDaily(); renderDaily(); inp.focus();
|
||
}
|
||
function clearDaily() {
|
||
if (!daily.length) return;
|
||
if (!confirm("Remove all tasks for today?")) return;
|
||
daily = [];
|
||
saveDaily(); renderDaily();
|
||
}
|
||
// cleanup old days (only remove days strictly before today, so tomorrow's carried-over tasks survive)
|
||
for (const k of Object.keys(localStorage)) {
|
||
const m = k.match(/^sm-mydaily-(\d{4}-\d{2}-\d{2})$/);
|
||
if (m && m[1] < todayKey) localStorage.removeItem(k);
|
||
}
|
||
renderDaily();
|
||
renderTomorrow();
|
||
|
||
/* ================= LEFT: ROADMAP IMPACTS / FLAGS ================= */
|
||
const fKey = "sm-flags-v1";
|
||
let flags = [];
|
||
try { flags = JSON.parse(localStorage.getItem(fKey) || "[]"); } catch(e) { flags = []; }
|
||
function saveFlags() { localStorage.setItem(fKey, JSON.stringify(flags)); }
|
||
|
||
// populate the related-area dropdown with all sections
|
||
(function() {
|
||
const sel = document.getElementById("flagRel");
|
||
const seen = new Set();
|
||
DATA.forEach(p => p.sections.forEach(s => {
|
||
if (seen.has(s.name)) return; seen.add(s.name);
|
||
const o = document.createElement("option");
|
||
o.value = s.name; o.textContent = s.name;
|
||
sel.appendChild(o);
|
||
}));
|
||
})();
|
||
|
||
function renderFlags() {
|
||
const wrap = document.getElementById("flagList");
|
||
wrap.innerHTML = "";
|
||
const open = flags.filter(f => !f.resolved);
|
||
if (!flags.length) {
|
||
wrap.innerHTML = '<div class="empty">No flags yet — add anything that impacts the roadmap or your day 👇</div>';
|
||
} else {
|
||
flags.slice().reverse().forEach(f => {
|
||
const div = document.createElement("div");
|
||
div.className = "flag-item" + (f.resolved ? " resolved" : "");
|
||
const body = document.createElement("div");
|
||
body.className = "f-body";
|
||
body.onclick = () => openFlagEdit(f);
|
||
body.title = "Click to edit / add resolution tasks";
|
||
const txt = document.createElement("div");
|
||
txt.className = "f-text"; txt.textContent = f.text;
|
||
body.appendChild(txt);
|
||
const meta = document.createElement("div");
|
||
meta.className = "f-meta";
|
||
if ((f.tasks || []).length) {
|
||
const doneN = f.tasks.filter(t => t.done).length;
|
||
const tc = document.createElement("span"); tc.className = "f-taskcount";
|
||
tc.textContent = doneN + "/" + f.tasks.length + " tasks";
|
||
meta.appendChild(tc);
|
||
}
|
||
if (f.rel) { const t = document.createElement("span"); t.className = "f-tag"; t.textContent = f.rel; meta.appendChild(t); }
|
||
if (f.date) { const d = document.createElement("span"); d.className = "f-date"; d.textContent = f.date; meta.appendChild(d); }
|
||
meta.appendChild(document.createTextNode("added " + f.added));
|
||
body.appendChild(meta);
|
||
const btns = document.createElement("div");
|
||
const res = document.createElement("button");
|
||
res.className = "flag-btn"; res.textContent = f.resolved ? "Reopen" : "Resolve";
|
||
res.onclick = () => { f.resolved = !f.resolved; saveFlags(); renderFlags(); };
|
||
const del = document.createElement("button");
|
||
del.className = "flag-btn del"; del.textContent = "✕"; del.title = "Remove";
|
||
del.onclick = () => { if (confirm("Remove this flag?")) { flags = flags.filter(x => x !== f); saveFlags(); renderFlags(); } };
|
||
btns.append(res, del);
|
||
div.append(body, btns);
|
||
wrap.appendChild(div);
|
||
});
|
||
}
|
||
// mirror open flags into the right-side focus card
|
||
const chipWrap = document.getElementById("flagChips");
|
||
const openNow = flags.filter(f => !f.resolved);
|
||
chipWrap.innerHTML = openNow.length
|
||
? openNow.map(f => {
|
||
const idx = flags.indexOf(f);
|
||
const doneN = (f.tasks || []).filter(t => t.done).length;
|
||
const tc = f.tasks && f.tasks.length ? ` · ${doneN}/${f.tasks.length}✓` : "";
|
||
return `<span class="flag" title="Click to edit / add resolution tasks" onclick="openFlagEdit(flags[${idx}])"><span class="sw"></span>${f.text.replace(/</g,"<")}${f.rel?" · "+f.rel.replace(/</g,"<"):""}${tc}</span>`;
|
||
}).join("")
|
||
: '<div class="focus-empty">✅ No open flags.</div>';
|
||
}
|
||
|
||
/* ---- flag edit modal: edit flag + resolution tasks ---- */
|
||
let feFlag = null;
|
||
let feTasks = [];
|
||
function openFlagEdit(f) {
|
||
if (!f) return;
|
||
feFlag = f;
|
||
feTasks = (f.tasks || []).map(t => ({ text: t.text, done: !!t.done }));
|
||
document.getElementById("feText").value = f.text;
|
||
document.getElementById("feDate").value = f.date || "";
|
||
const relSel = document.getElementById("feRel");
|
||
relSel.innerHTML = document.getElementById("flagRel").innerHTML;
|
||
relSel.value = f.rel || "";
|
||
document.getElementById("feTaskInput").value = "";
|
||
renderFeTasks();
|
||
document.getElementById("flagModal").style.display = "grid";
|
||
document.getElementById("feText").focus();
|
||
}
|
||
function closeFlagEdit() {
|
||
document.getElementById("flagModal").style.display = "none";
|
||
feFlag = null; feTasks = [];
|
||
}
|
||
function renderFeTasks() {
|
||
const wrap = document.getElementById("feTasks");
|
||
wrap.innerHTML = "";
|
||
if (!feTasks.length) {
|
||
wrap.innerHTML = '<div class="fe-empty">No tasks yet — add the steps needed to resolve this flag.</div>';
|
||
return;
|
||
}
|
||
feTasks.forEach((t, i) => {
|
||
const row = document.createElement("div");
|
||
row.className = "fe-task";
|
||
const cb = document.createElement("input");
|
||
cb.type = "checkbox"; cb.checked = t.done; cb.title = "Mark task done";
|
||
cb.onchange = () => { t.done = cb.checked; renderFeTasks(); };
|
||
const sp = document.createElement("span");
|
||
sp.className = "ft-text" + (t.done ? " done" : "");
|
||
sp.textContent = t.text;
|
||
sp.title = "Double-click to edit";
|
||
sp.ondblclick = () => {
|
||
const v = prompt("Edit task", t.text);
|
||
if (v !== null && v.trim()) { t.text = v.trim(); renderFeTasks(); }
|
||
};
|
||
const del = document.createElement("button");
|
||
del.className = "ft-del"; del.textContent = "✕"; del.title = "Remove task";
|
||
del.onclick = () => { feTasks.splice(i, 1); renderFeTasks(); };
|
||
row.append(cb, sp, del);
|
||
wrap.appendChild(row);
|
||
});
|
||
}
|
||
function addFlagTask() {
|
||
const inp = document.getElementById("feTaskInput");
|
||
const v = inp.value.trim();
|
||
if (!v) return;
|
||
feTasks.push({ text: v, done: false });
|
||
inp.value = "";
|
||
renderFeTasks();
|
||
inp.focus();
|
||
}
|
||
function saveFlagEdit() {
|
||
if (!feFlag) return;
|
||
const txt = document.getElementById("feText").value.trim();
|
||
if (!txt) { alert("Flag text can't be empty."); return; }
|
||
feFlag.text = txt;
|
||
feFlag.rel = document.getElementById("feRel").value;
|
||
feFlag.date = document.getElementById("feDate").value;
|
||
feFlag.tasks = feTasks;
|
||
saveFlags(); renderFlags(); closeFlagEdit();
|
||
}
|
||
function deleteFlag() {
|
||
if (!feFlag) return;
|
||
if (!confirm("Remove this flag?")) return;
|
||
flags = flags.filter(x => x !== feFlag);
|
||
saveFlags(); renderFlags(); closeFlagEdit();
|
||
}
|
||
function addFlag() {
|
||
const desc = document.getElementById("flagDesc").value.trim();
|
||
if (!desc) return;
|
||
flags.push({
|
||
text: desc,
|
||
rel: document.getElementById("flagRel").value,
|
||
date: document.getElementById("flagDate").value,
|
||
added: new Date().toLocaleDateString(undefined, { month: "short", day: "numeric" }),
|
||
resolved: false
|
||
});
|
||
document.getElementById("flagDesc").value = "";
|
||
document.getElementById("flagDate").value = "";
|
||
saveFlags(); renderFlags();
|
||
document.getElementById("flagDesc").focus();
|
||
}
|
||
renderFlags();
|
||
|
||
/* ================= LEFT: ROADMAP TASKS ================= */
|
||
const rKey = "sm-roadmap-done-v1";
|
||
let rdone = {};
|
||
try { rdone = JSON.parse(localStorage.getItem(rKey) || "{}"); } catch(e) { rdone = {}; }
|
||
|
||
/* ---- task status ("inprog" | "delayed" — "done" lives in rdone) ---- */
|
||
const sKey = "sm-taskstatus-v1";
|
||
let tstatus = {};
|
||
try { tstatus = JSON.parse(localStorage.getItem(sKey) || "{}"); } catch(e) { tstatus = {}; }
|
||
function saveTStatus() { localStorage.setItem(sKey, JSON.stringify(tstatus)); }
|
||
function statusOf(id) { if (rdone[id]) return "done"; return tstatus[id] || null; }
|
||
function setStatus(id, st) {
|
||
if (st === "done") { rdone[id] = true; delete tstatus[id]; }
|
||
else { delete rdone[id]; if (st) tstatus[id] = st; else delete tstatus[id]; }
|
||
localStorage.setItem(rKey, JSON.stringify(rdone));
|
||
saveTStatus();
|
||
refreshAll();
|
||
if (tuTask === id) highlightTuStatus();
|
||
}
|
||
|
||
/* collapsible sections */
|
||
const cSecKey = "sm-sec-collapsed-v1";
|
||
function getCollapsed() { try { return JSON.parse(localStorage.getItem(cSecKey) || "{}"); } catch(e) { return {}; } }
|
||
function toggleSection(el, key) {
|
||
const collapsed = getCollapsed();
|
||
collapsed[key] = !collapsed[key];
|
||
localStorage.setItem(cSecKey, JSON.stringify(collapsed));
|
||
const items = document.querySelector('.sec-items[data-sec="' + key + '"]');
|
||
if (items) items.style.display = collapsed[key] ? "none" : "";
|
||
const caret = el.querySelector(".caret");
|
||
if (caret) caret.textContent = collapsed[key] ? "▸" : "▾";
|
||
}
|
||
function expandAllSections(collapse) {
|
||
const collapsed = {};
|
||
if (collapse) {
|
||
DATA.forEach((p, pi) => p.sections.forEach((s, si) => { collapsed[pi + "-" + si] = true; }));
|
||
}
|
||
localStorage.setItem(cSecKey, JSON.stringify(collapsed));
|
||
document.querySelectorAll("#todoList .sec-items").forEach(d => { d.style.display = collapse ? "none" : ""; });
|
||
document.querySelectorAll("#todoList .subhead .caret").forEach(c => { c.textContent = collapse ? "▸" : "▾"; });
|
||
}
|
||
|
||
function renderRoadmapTodos() {
|
||
const wrap = document.getElementById("todoList");
|
||
let collapsed = {};
|
||
try { collapsed = JSON.parse(localStorage.getItem(cSecKey) || "{}"); } catch(e) { collapsed = {}; }
|
||
const html = [];
|
||
let total = 0;
|
||
DATA.forEach((p, pi) => {
|
||
p.sections.forEach((s, si) => {
|
||
const key = pi + "-" + si;
|
||
const isC = !!collapsed[key];
|
||
html.push(`<div class="subhead tog" data-key="${key}" onclick="toggleSection(this, '${key}')"><span class="caret">${isC?"▸":"▾"}</span><span class="dot" style="background:${s.color}"></span>${s.name}<span class="count">${s.tasks.length}</span></div>`);
|
||
html.push(`<div class="sec-items" data-sec="${key}" style="${isC?"display:none;":""}">`);
|
||
s.tasks.forEach(([name, wk, end], ti) => {
|
||
const id = `${pi}-${si}-${ti}`;
|
||
const inprog = end === "ongoing";
|
||
const st = statusOf(id);
|
||
total++;
|
||
let bCls = inprog ? "inprog" : (wk ? "" : "undated");
|
||
let bTxt = inprog ? "in progress" : (wk ? ("WK " + wk) : "TBD");
|
||
if (st === "inprog") { bCls = "inprog"; bTxt = "in progress"; }
|
||
else if (st === "delayed") { bCls = "delayed"; bTxt = "delayed" + (wk ? (" · WK " + wk) : ""); }
|
||
html.push(
|
||
`<label class="item ${rdone[id]?"checked":""}" data-id="${id}">
|
||
<input type="checkbox" ${rdone[id]?"checked":""}>
|
||
<span class="txt">${name}</span>
|
||
<span class="note-ico" data-nid="${id}" onclick="openNote('${id}')" onmousedown="event.preventDefault()" style="display:${notes[id]?"inline":"none"}" title="View / edit note">📝</span>
|
||
<button class="wk-badge ${bCls}" onclick="openTaskUpdate('${id}')" onmousedown="event.preventDefault()" title="Click to set status or move to another week">${bTxt}</button>
|
||
</label>`);
|
||
});
|
||
html.push(`</div>`);
|
||
});
|
||
});
|
||
wrap.innerHTML = html.join("");
|
||
|
||
if (!wrap._chBound) {
|
||
wrap._chBound = true;
|
||
wrap.addEventListener("change", e => {
|
||
if (e.target.type !== "checkbox") return;
|
||
const label = e.target.closest("label.item");
|
||
rdone[label.dataset.id] = e.target.checked;
|
||
if (e.target.checked) delete tstatus[label.dataset.id];
|
||
saveTStatus();
|
||
label.classList.toggle("checked", e.target.checked);
|
||
progress();
|
||
});
|
||
}
|
||
function progress() {
|
||
let d = 0;
|
||
wrap.querySelectorAll("input[type=checkbox]").forEach(cb => { if (cb.checked) d++; });
|
||
document.getElementById("rbar").style.width = (d/total*100) + "%";
|
||
document.getElementById("rlabel").textContent = d + " / " + total + " done";
|
||
localStorage.setItem(rKey, JSON.stringify(rdone));
|
||
}
|
||
progress();
|
||
}
|
||
renderRoadmapTodos();
|
||
|
||
/* ================= RIGHT: FOCUS CHIPS ================= */
|
||
function renderFocus() {
|
||
// weeks of the current week range (Mon-Sun) for display
|
||
const mon = new Date(WK1_MONDAY); mon.setDate(mon.getDate() + (NOW_WK - 1) * 7);
|
||
const sun = new Date(mon); sun.setDate(sun.getDate() + 6);
|
||
const fmt = d => d.toLocaleDateString(undefined, { month: "short", day: "numeric" });
|
||
document.getElementById("wkPill").textContent = "WK " + NOW_WK;
|
||
document.getElementById("focusHint").textContent =
|
||
"Week of " + fmt(mon) + " – " + fmt(sun) + " · " + TOTAL_WEEKS + " week roadmap (WK1 = Sep 22)";
|
||
|
||
const due = ALL_TASKS.filter(t => (t.wk === NOW_WK) || t.ongoing).sort((a,b) => a.project.localeCompare(b.project));
|
||
|
||
const dueWrap = document.getElementById("focusChips");
|
||
if (due.length) {
|
||
dueWrap.innerHTML = due.map(t => {
|
||
const st = statusOf(t.id);
|
||
const done = st === "done";
|
||
const tag = done
|
||
? '<span class="done-tag">✓ DONE</span>'
|
||
: st === "delayed" ? '<span class="delayed-tag">⏳ DELAYED</span>'
|
||
: (st === "inprog" || t.ongoing) ? '<span class="inprog-tag">▶ IN PROGRESS</span>'
|
||
: '<span class="due-tag">DUE</span>';
|
||
return `<span class="chip due${done?" done":""}" onclick="openTaskUpdate('${t.id}')" title="Click to set status or move this task">
|
||
<span class="sw" style="background:${t.color}"></span><span class="chip-name">${t.name}</span>${tag}</span>`;
|
||
}).join("");
|
||
} else {
|
||
dueWrap.innerHTML = '<div class="focus-empty">✅ No roadmap tasks due this week.</div>';
|
||
}
|
||
|
||
const up = ALL_TASKS
|
||
.filter(t => t.wk > NOW_WK && t.wk <= NOW_WK + 3)
|
||
.sort((a,b) => a.wk - b.wk);
|
||
const upWrap = document.getElementById("upcomingChips");
|
||
if (up.length) {
|
||
upWrap.innerHTML = up.map(t => {
|
||
const st = statusOf(t.id);
|
||
const done = st === "done";
|
||
const tag = done
|
||
? '<span class="done-tag">✓ DONE</span>'
|
||
: st === "delayed" ? `<span class="delayed-tag">⏳ DELAYED · WK ${t.wk}</span>`
|
||
: st === "inprog" ? `<span class="inprog-tag">▶ IN PROGRESS · WK ${t.wk}</span>`
|
||
: `<span class="soon-tag">WK ${t.wk}</span>`;
|
||
return `<span class="chip upcoming${done?" done":""}" onclick="openTaskUpdate('${t.id}')" title="Click to set status or move this task">
|
||
<span class="sw" style="background:${t.color}"></span><span class="chip-name">${t.name}</span>${tag}</span>`;
|
||
}).join("");
|
||
} else {
|
||
upWrap.innerHTML = '<div class="focus-empty">Nothing scheduled in the next 3 weeks.</div>';
|
||
}
|
||
}
|
||
renderFocus();
|
||
|
||
/* -------- Due-this-week bubble: mark done / move week -------- */
|
||
let tuTask = null;
|
||
function openTaskUpdate(id) {
|
||
const t = TASK_MAP[id]; if (!t) return;
|
||
tuTask = id;
|
||
document.getElementById("tuTitle").textContent = t.name;
|
||
document.getElementById("tuSub").textContent =
|
||
t.project + " · " + t.section + " · currently " + (t.ongoing ? ("in progress since WK " + t.wk) : ("due WK " + t.wk));
|
||
highlightTuStatus();
|
||
const sel = document.getElementById("tuWk");
|
||
sel.innerHTML = "";
|
||
for (let w = 1; w <= TOTAL_WEEKS; w++) {
|
||
const o = document.createElement("option");
|
||
o.value = w; o.textContent = "WK " + w;
|
||
sel.appendChild(o);
|
||
}
|
||
sel.value = t.wk;
|
||
sel.disabled = !!t.ongoing;
|
||
document.getElementById("tuMoveBtn").disabled = !!t.ongoing;
|
||
document.getElementById("tuMoveBtn").title = t.ongoing ? "In-progress tasks can't be moved" : "Move this task to the selected week";
|
||
const inprogBtn = document.getElementById("stInprog");
|
||
inprogBtn.disabled = !!t.ongoing;
|
||
inprogBtn.title = t.ongoing ? "Already marked in progress" : "Mark as in progress";
|
||
document.getElementById("taskModal").style.display = "grid";
|
||
}
|
||
function highlightTuStatus() {
|
||
if (!tuTask) return;
|
||
const st = statusOf(tuTask);
|
||
const map = { inprog: "stInprog", done: "stDone", delayed: "stDelayed" };
|
||
["stInprog", "stDone", "stDelayed"].forEach(bid => {
|
||
const b = document.getElementById(bid);
|
||
b.classList.remove("active", "done", "inprog", "delayed");
|
||
if (st && map[st] === bid) b.classList.add("active", st);
|
||
});
|
||
document.getElementById("stClearRow").style.display = st ? "" : "none";
|
||
}
|
||
function closeTaskUpdate() {
|
||
tuTask = null;
|
||
document.getElementById("taskModal").style.display = "none";
|
||
}
|
||
function tuSetStatus(st) {
|
||
if (!tuTask) return;
|
||
setStatus(tuTask, st);
|
||
}
|
||
function tuMoveWeek() {
|
||
if (!tuTask) return;
|
||
const wk = parseInt(document.getElementById("tuWk").value, 10);
|
||
closeTaskUpdate();
|
||
moveTaskToWeek(tuTask, wk);
|
||
}
|
||
|
||
// shared "move task to week" — used by the update modal AND Gantt drag & drop
|
||
function moveTaskToWeek(id, wk) {
|
||
const t = TASK_MAP[id]; if (!t) return;
|
||
if (t.ongoing || !wk || wk === t.wk) return;
|
||
const parts = id.split("-").map(Number);
|
||
DATA[parts[0]].sections[parts[1]].tasks[parts[2]][1] = wk;
|
||
t.wk = wk;
|
||
const at = ALL_TASKS.find(x => x.id === id); if (at) at.wk = wk;
|
||
wkOverride[id] = wk; saveWkOverride();
|
||
refreshAll();
|
||
}
|
||
function refreshAll() {
|
||
renderRoadmapTodos();
|
||
renderFocus();
|
||
renderGantt();
|
||
}
|
||
|
||
/* ================= RIGHT: GANTT (zoomable) + TASK NOTES ================= */
|
||
const esc = s => String(s).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'");
|
||
|
||
|
||
|
||
function openNote(id) {
|
||
const t = TASK_MAP[id]; if (!t) return;
|
||
noteTask = id;
|
||
document.getElementById("noteTitle").textContent = t.name;
|
||
document.getElementById("noteSub").textContent =
|
||
t.project + " · " + t.section + " · " + (t.ongoing ? ("WK " + t.wk + " · in progress") : (t.wk ? ("WK " + t.wk) : "unscheduled"));
|
||
document.getElementById("noteText").value = notes[id] || "";
|
||
document.getElementById("noteModal").style.display = "grid";
|
||
document.getElementById("noteText").focus();
|
||
}
|
||
function closeNote() {
|
||
noteTask = null;
|
||
document.getElementById("noteModal").style.display = "none";
|
||
}
|
||
function saveNote() {
|
||
if (!noteTask) return;
|
||
const v = document.getElementById("noteText").value.trim();
|
||
if (v) notes[noteTask] = v; else delete notes[noteTask];
|
||
localStorage.setItem(nKey, JSON.stringify(notes));
|
||
closeNote(); refreshNoteIcons();
|
||
}
|
||
function deleteNote() {
|
||
if (!noteTask) return;
|
||
if (!confirm("Delete the note for this task?")) return;
|
||
delete notes[noteTask];
|
||
localStorage.setItem(nKey, JSON.stringify(notes));
|
||
closeNote(); refreshNoteIcons();
|
||
}
|
||
function refreshNoteIcons() {
|
||
renderGantt();
|
||
document.querySelectorAll("#todoList .note-ico").forEach(el => {
|
||
el.style.display = notes[el.dataset.nid] ? "inline" : "none";
|
||
});
|
||
}
|
||
|
||
// bar click → open note (delegated)
|
||
document.getElementById("gantt").addEventListener("click", e => {
|
||
const bar = e.target.closest(".bar");
|
||
if (bar && bar.dataset.task) openNote(bar.dataset.task);
|
||
});
|
||
|
||
// drag & drop → move a task to the week it's dropped on (delegated)
|
||
const ganttEl = document.getElementById("gantt");
|
||
const clearDropHi = () => ganttEl.querySelectorAll("td.cell.drop-hi").forEach(x => x.classList.remove("drop-hi"));
|
||
ganttEl.addEventListener("dragstart", e => {
|
||
const src = e.target.closest("[draggable][data-task]");
|
||
if (!src || src.classList.contains("ongoing")) { e.preventDefault(); return; }
|
||
hideNoteTip();
|
||
e.dataTransfer.setData("text/task", src.dataset.task);
|
||
e.dataTransfer.effectAllowed = "move";
|
||
});
|
||
ganttEl.addEventListener("dragover", e => {
|
||
const td = e.target.closest("td.cell[data-wk]");
|
||
if (!td) return;
|
||
e.preventDefault();
|
||
e.dataTransfer.dropEffect = "move";
|
||
clearDropHi();
|
||
td.classList.add("drop-hi");
|
||
});
|
||
ganttEl.addEventListener("dragleave", e => {
|
||
const td = e.target.closest("td.cell"); if (td) td.classList.remove("drop-hi");
|
||
});
|
||
ganttEl.addEventListener("drop", e => {
|
||
const td = e.target.closest("td.cell[data-wk]");
|
||
if (!td) return;
|
||
e.preventDefault();
|
||
clearDropHi();
|
||
const id = e.dataTransfer.getData("text/task");
|
||
if (id) moveTaskToWeek(id, parseInt(td.dataset.wk, 10));
|
||
});
|
||
ganttEl.addEventListener("dragend", clearDropHi);
|
||
|
||
// hover tooltip → read a task's note instantly (delegated)
|
||
const noteTip = document.getElementById("noteTip");
|
||
function hideNoteTip() { if (noteTip) noteTip.style.display = "none"; }
|
||
function showNoteTip(taskId, anchor) {
|
||
const t = TASK_MAP[taskId]; if (!t) return;
|
||
const st = statusOf(taskId);
|
||
const stTxt = st === "delayed" ? "DELAYED" : (st === "inprog" ? "in progress" : (st === "done" ? "complete" : null));
|
||
const wkTxt = t.ongoing ? "in progress" : ("WK " + t.wk);
|
||
noteTip.textContent = "";
|
||
const head = document.createElement("div");
|
||
head.className = "nt-head";
|
||
const b = document.createElement("b"); b.textContent = t.name;
|
||
const sub = document.createElement("span");
|
||
sub.textContent = " · " + wkTxt + (stTxt ? " · " + stTxt : "") + " · " + t.project + " / " + t.section;
|
||
head.appendChild(b); head.appendChild(sub);
|
||
noteTip.appendChild(head);
|
||
const body = document.createElement("div");
|
||
const note = notes[taskId];
|
||
body.className = note ? "nt-note" : "nt-note nt-none";
|
||
body.textContent = note || "No note yet — click the task to add one.";
|
||
noteTip.appendChild(body);
|
||
noteTip.style.display = "block";
|
||
const r = anchor.getBoundingClientRect();
|
||
const tw = noteTip.offsetWidth, th = noteTip.offsetHeight;
|
||
const left = Math.min(Math.max(8, r.left + r.width / 2 - tw / 2), (window.innerWidth || 1024) - tw - 8);
|
||
let top = r.top - th - 8;
|
||
if (top < 8) top = r.bottom + 8;
|
||
noteTip.style.left = left + "px";
|
||
noteTip.style.top = top + "px";
|
||
}
|
||
ganttEl.addEventListener("mouseover", e => {
|
||
const src = e.target.closest("[data-task]");
|
||
if (src && src.dataset.task) showNoteTip(src.dataset.task, src);
|
||
else hideNoteTip();
|
||
});
|
||
ganttEl.addEventListener("mouseleave", hideNoteTip);
|
||
window.addEventListener("scroll", hideNoteTip, true);
|
||
window.addEventListener("resize", hideNoteTip);
|
||
|
||
// zoomable view state (defaults to the current month)
|
||
const viewRange = k => {
|
||
const cur = monthOf(NOW_WK);
|
||
const idx = MONTHS.indexOf(cur);
|
||
const last = MONTHS[Math.min(idx + k - 1, MONTHS.length - 1)];
|
||
return { start: cur.start, len: last.end - cur.start + 1 };
|
||
};
|
||
let gView = viewRange(1);
|
||
|
||
function setGanttView(v, btn) {
|
||
if (v === "month") gView = viewRange(1);
|
||
else if (v === "2mo") gView = viewRange(2);
|
||
else if (v === "3mo") gView = viewRange(3);
|
||
else gView = { start: 1, len: TOTAL_WEEKS };
|
||
document.querySelectorAll(".zoom-btn[data-view]").forEach(b => b.classList.toggle("active", b === btn));
|
||
renderGantt();
|
||
}
|
||
function navGantt(dir) {
|
||
const step = gView.len;
|
||
gView.start = Math.max(1, Math.min(TOTAL_WEEKS - gView.len + 1, gView.start + dir * step));
|
||
renderGantt();
|
||
}
|
||
|
||
function renderGantt() {
|
||
const s = Math.max(1, Math.min(TOTAL_WEEKS, gView.start));
|
||
const e = Math.min(TOTAL_WEEKS, s + gView.len - 1);
|
||
const n = e - s + 1;
|
||
const colw = n <= 4 ? "84px" : (n <= 8 ? "56px" : (n <= 12 ? "42px" : ""));
|
||
|
||
let cols = "";
|
||
for (let i = 0; i < n; i++) cols += colw ? `<col style='width:${colw}'>` : "<col>";
|
||
|
||
let html = "<table class='gantt'><colgroup><col style='width:215px'>" + cols + "</colgroup>";
|
||
|
||
// month header (only visible months, partial colspan)
|
||
html += "<tr><th class='corner'></th>";
|
||
MONTHS.forEach(mb => {
|
||
const os = Math.max(s, mb.start), oe = Math.min(e, mb.end);
|
||
if (os <= oe) html += `<th class='month' colspan="${oe - os + 1}">${mb.name}</th>`;
|
||
});
|
||
html += "</tr>";
|
||
|
||
// week header
|
||
html += "<tr><th class='corner' style='font-size:10.5px;color:var(--muted)'>Task</th>";
|
||
for (let w = s; w <= e; w++)
|
||
html += `<th class='week${w===NOW_WK?" now":""}'>W${w}${w===NOW_WK?" ◀":""}</th>`;
|
||
html += "</tr>";
|
||
|
||
DATA.forEach((p, pi) => {
|
||
html += `<tr class='proj-row'><td colspan="${n+1}"><span class='dot' style='background:${p.sections[0].color}'></span>${p.project}</td></tr>`;
|
||
if (!p.sections.some(sec => sec.tasks.length)) {
|
||
html += `<tr><td colspan="${n+1}" style="padding:3px 10px 8px 26px;font-size:11px;color:var(--muted);font-style:italic">no tasks scheduled yet</td></tr>`;
|
||
}
|
||
p.sections.forEach((sec, si) => {
|
||
sec.tasks.forEach(([name, wk, end], ti) => {
|
||
const id = pi + "-" + si + "-" + ti;
|
||
const ongoing = end === "ongoing";
|
||
const st = statusOf(id);
|
||
const spanEnd = ongoing ? NOW_WK : null;
|
||
const hasNote = !!notes[id];
|
||
const noteBadge = hasNote ? "<span class='bar-note'>✎</span>" : "";
|
||
const stTip = st === "delayed" ? " — DELAYED" : (st === "inprog" ? " — in progress" : (st === "done" ? " — complete" : ""));
|
||
const tip = ongoing ? (" — in progress since WK " + wk) : (wk ? (" — WK " + wk) : " (unscheduled)") + stTip;
|
||
const stMark = st === "delayed" ? " ⏳" : (st === "inprog" && !ongoing ? " ▶" : "");
|
||
html += `<tr><td class='task-name'${ongoing ? "" : " draggable='true' data-task='" + id + "'"}>${esc(name)}${ongoing ? " ▶" : ""}${stMark}${hasNote ? " 📝" : ""}</td>`;
|
||
for (let w = s; w <= e; w++) {
|
||
const cellCls = `cell${w===NOW_WK?" nowcol":""}`;
|
||
if (ongoing && w >= wk && w <= spanEnd) {
|
||
const cls = "bar ongoing" + (w === wk ? " span-first" : (w === spanEnd ? " span-last" : " span"));
|
||
html += `<td class='${cellCls}' data-wk='${w}'><div class='${cls}' data-task='${id}' style='background:${sec.color}'>${noteBadge}</div></td>`;
|
||
} else if (!ongoing && wk === w) {
|
||
html += `<td class='${cellCls}' data-wk='${w}'><div class='bar' data-task='${id}' draggable='true' style='background:${sec.color}'>${noteBadge}</div></td>`;
|
||
} else {
|
||
html += `<td class='${cellCls}' data-wk='${w}'></td>`;
|
||
}
|
||
}
|
||
html += "</tr>";
|
||
});
|
||
});
|
||
});
|
||
html += "</table>";
|
||
document.getElementById("gantt").innerHTML = html;
|
||
|
||
const zl = document.getElementById("zoomLabel");
|
||
if (zl) zl.textContent = "WK " + s + " – WK " + e;
|
||
|
||
const seen = new Set();
|
||
let leg = "";
|
||
DATA.forEach(p => p.sections.forEach(sec => {
|
||
if (seen.has(sec.name)) return; seen.add(sec.name);
|
||
leg += `<span><i style="background:${sec.color}"></i>${sec.name}</span>`;
|
||
}));
|
||
leg += `<span style="margin-left:auto"><i style="background:#ffe9c8"></i>current week</span>`;
|
||
leg += `<span>📝 = has note · click any bar to add / edit</span>`;
|
||
document.getElementById("legend").innerHTML = leg;
|
||
}
|
||
renderGantt();
|
||
|
||
|
||
document.getElementById("today").textContent =
|
||
new Date().toLocaleDateString(undefined, { weekday: "long", year: "numeric", month: "long", day: "numeric" });
|
||
|
||
</script>
|
||
<script>
|
||
|
||
const STATUS_LABELS = ["Not reached out", "Reached out", "Waiting on response", "Approved", "On hold"];
|
||
const IGNORED_STATES = new Set(["Approved", "Awaiting Deployment", "Complete", "Cancelled"]);
|
||
// these are removed entirely — not even shown via "Show hidden"
|
||
const HARD_EXCLUDED = new Set(["Complete", "Cancelled"]);
|
||
const STORAGE_KEY = "uat-outreach-statuses-v1";
|
||
const OVERRIDE_KEY = "uat-outreach-overrides-v1";
|
||
|
||
// No data is built in — load the weekly ServiceNow export CSV to populate the tracker.
|
||
const INITIAL_TICKETS = [];
|
||
let INITIAL_SOURCE = "No CSV loaded yet — upload the weekly export";
|
||
|
||
let tickets = [];
|
||
|
||
function loadStatuses() {
|
||
try { return JSON.parse(localStorage.getItem(STORAGE_KEY) || "{}"); }
|
||
catch { return {}; }
|
||
}
|
||
let statuses = loadStatuses();
|
||
|
||
function loadOverrides() {
|
||
try { return JSON.parse(localStorage.getItem(OVERRIDE_KEY) || "{}"); }
|
||
catch { return {}; }
|
||
}
|
||
let overrides = loadOverrides();
|
||
function saveOverrides() {
|
||
localStorage.setItem(OVERRIDE_KEY, JSON.stringify(overrides));
|
||
}
|
||
|
||
function saveStatuses() {
|
||
localStorage.setItem(STORAGE_KEY, JSON.stringify(statuses));
|
||
}
|
||
|
||
function uatStatusOf(t) {
|
||
const id = typeof t === "string" ? t : t.ticket;
|
||
return statuses[id] ? statuses[id].status : 0;
|
||
}
|
||
|
||
function setUatStatus(ticketId, s) {
|
||
statuses[ticketId] = { status: s, updatedAt: new Date().toISOString() };
|
||
saveStatuses();
|
||
uatRender();
|
||
}
|
||
|
||
// ---------- CSV parsing ----------
|
||
function parseCSV(s) {
|
||
const rows = []; let row = [], cur = "", inQ = false;
|
||
for (let i = 0; i < s.length; i++) {
|
||
const c = s[i];
|
||
if (inQ) {
|
||
if (c === '"') { if (s[i+1] === '"') { cur += '"'; i++; } else inQ = false; }
|
||
else cur += c;
|
||
} else {
|
||
if (c === '"') inQ = true;
|
||
else if (c === ",") { row.push(cur); cur = ""; }
|
||
else if (c === "\n") { row.push(cur); rows.push(row); row = []; cur = ""; }
|
||
else if (c === "\r") {}
|
||
else cur += c;
|
||
}
|
||
}
|
||
if (cur.length || row.length) { row.push(cur); rows.push(row); }
|
||
return rows;
|
||
}
|
||
|
||
function csvToTickets(text) {
|
||
const rows = parseCSV(text);
|
||
if (rows.length < 2) throw new Error("CSV appears to be empty");
|
||
const hdr = rows[0];
|
||
const idx = name => hdr.indexOf(name);
|
||
const iT = idx("original_task"), iD = idx("original_task.short_description"),
|
||
iS = idx("state"), iE = idx("epic"), iA = idx("assigned_to"),
|
||
iO = idx("opened_by");
|
||
if (iT === -1) throw new Error("Couldn't find the 'original_task' column — is this a ServiceNow story export?");
|
||
const out = [];
|
||
for (const r of rows.slice(1)) {
|
||
const ticket = (r[iT] || "").trim();
|
||
if (!ticket) continue;
|
||
out.push({
|
||
ticket,
|
||
desc: iD !== -1 ? (r[iD] || "").replace(/\s+/g, " ").trim() : "",
|
||
state: iS !== -1 ? (r[iS] || "").trim() : "",
|
||
epic: iE !== -1 ? (r[iE] || "").trim() : "",
|
||
assigned_to: iA !== -1 ? (r[iA] || "").trim() : "",
|
||
opened_by: iO !== -1 ? (r[iO] || "").trim() : ""
|
||
});
|
||
}
|
||
return out;
|
||
}
|
||
|
||
// ---------- Launch calendar ----------
|
||
// RNDSystems launches every 2nd & 4th Tuesday · BT launches every 3rd Tuesday.
|
||
// Code freeze: Friday at 10:00 AM, the week of the launch (Friday before launch day).
|
||
const UAT_NOW = new Date(); UAT_NOW.setHours(0, 0, 0, 0);
|
||
function nthTuesday(y, m, n) {
|
||
const d = new Date(y, m, 1);
|
||
const first = ((2 - d.getDay()) + 7) % 7; // offset to first Tuesday
|
||
return new Date(y, m, 1 + first + (n - 1) * 7);
|
||
}
|
||
function upcomingLaunches(ordinals, count) {
|
||
const out = [];
|
||
for (let i = 0; i < 18 && out.length < count; i++) {
|
||
const m = UAT_NOW.getMonth() + i;
|
||
const y = UAT_NOW.getFullYear() + Math.floor(m / 12);
|
||
const mm = m % 12;
|
||
for (const n of ordinals) {
|
||
const launch = nthTuesday(y, mm, n);
|
||
if (launch >= UAT_NOW) out.push({ launch, freeze: new Date(launch.getTime() - 4 * 86400000) });
|
||
}
|
||
}
|
||
return out.sort((a, b) => a.launch - b.launch).slice(0, count);
|
||
}
|
||
const RDNS_LAUNCHES = upcomingLaunches([2, 4], 3);
|
||
const BT_LAUNCHES = upcomingLaunches([3], 3);
|
||
const fmtD = d => d.toLocaleDateString(undefined, { weekday: "short", month: "short", day: "numeric" });
|
||
const fmtDy = d => d.toLocaleDateString(undefined, { month: "short", day: "numeric", year: "numeric" });
|
||
const daysUntil = d => Math.round((d - UAT_NOW) / 86400000);
|
||
// global next freeze (whichever comes first)
|
||
const NEXT_FREEZE = RDNS_LAUNCHES[0].freeze < BT_LAUNCHES[0].freeze
|
||
? { ...RDNS_LAUNCHES[0], site: "RNDSystems" }
|
||
: { ...BT_LAUNCHES[0], site: "BT" };
|
||
|
||
// ---------- Grouping (by launch cycle) ----------
|
||
function siteOf(t) {
|
||
const first = ((t.desc || "").split("|")[0] || "").trim().toLowerCase();
|
||
if (/^rnd|^r&d/.test(first)) return "RNDSystems";
|
||
if (/^bt\b|^bio/.test(first)) return "BT";
|
||
if (/^wms/.test(first)) return "WMS";
|
||
if (/^sbd|^spd|^spatial/.test(first)) return "SBD";
|
||
return "Other";
|
||
}
|
||
const SITE_ORDER = { "RNDSystems": 10, "BT": 11, "WMS": 12, "SBD": 13 };
|
||
const STATE_OPTIONS = ["Draft", "Ready", "Work in Progress", "Peer Review", "QA Testing", "UAT Testing", "Approved", "Awaiting Deployment", "Complete", "Cancelled"];
|
||
// priority within a launch section: outreach action needed first, then state readiness
|
||
const ACTION_ORDER = { 0: 0, 1: 1, 2: 2, 4: 3, 3: 4 };
|
||
const STATE_ORDER = { "UAT Testing": 0, "Work in Progress": 1, "Peer Review": 2, "QA Testing": 3, "Draft": 4, "Ready": 5 };
|
||
|
||
// "sent to bottom" memory (order matters — the order you sent them down)
|
||
const BOTTOM_KEY = "uat-outreach-bottom-v1";
|
||
let bottomOrder = [];
|
||
try { bottomOrder = JSON.parse(localStorage.getItem(BOTTOM_KEY) || "[]"); } catch { bottomOrder = []; }
|
||
function saveBottom() { localStorage.setItem(BOTTOM_KEY, JSON.stringify(bottomOrder)); }
|
||
function moveBottom(id) {
|
||
if (bottomOrder.includes(id)) bottomOrder = bottomOrder.filter(x => x !== id);
|
||
else bottomOrder.push(id);
|
||
saveBottom();
|
||
uatRender();
|
||
}
|
||
|
||
// ---------- Filters ----------
|
||
const els = {
|
||
statusFilter: document.getElementById("statusFilter"),
|
||
stateFilter: document.getElementById("stateFilter"),
|
||
epicFilter: document.getElementById("epicFilter"),
|
||
search: document.getElementById("search"),
|
||
showDone: document.getElementById("showDoneToggle"),
|
||
list: document.getElementById("list"),
|
||
};
|
||
let hideApproved = false;
|
||
let showHidden = false;
|
||
const isVisibleState = t => !HARD_EXCLUDED.has(t.state) && (showHidden || !IGNORED_STATES.has(t.state));
|
||
|
||
function populateFilters() {
|
||
const states = [...new Set(tickets.map(t => t.state).filter(s => s && !HARD_EXCLUDED.has(s) && (showHidden || !IGNORED_STATES.has(s))))].sort();
|
||
const epics = [...new Set(tickets.map(t => t.epic).filter(Boolean))].sort();
|
||
const prevState = els.stateFilter.value;
|
||
const prevEpic = els.epicFilter.value;
|
||
els.stateFilter.innerHTML = '<option value="">All ticket states</option>' +
|
||
states.map(s => `<option>${s}</option>`).join("");
|
||
els.epicFilter.innerHTML = '<option value="">All epics</option>' +
|
||
epics.map(s => `<option>${s}</option>`).join("");
|
||
if (states.includes(prevState)) els.stateFilter.value = prevState;
|
||
if (epics.includes(prevEpic)) els.epicFilter.value = prevEpic;
|
||
}
|
||
|
||
function visibleTickets() {
|
||
const sf = els.statusFilter.value;
|
||
const ts = els.stateFilter.value;
|
||
const ep = els.epicFilter.value;
|
||
const q = els.search.value.trim().toLowerCase();
|
||
return tickets.filter(t => {
|
||
if (!isVisibleState(t)) return false;
|
||
if (hideApproved && uatStatusOf(t) === 3 && sf === "") return false;
|
||
if (sf !== "" && uatStatusOf(t) !== Number(sf)) return false;
|
||
if (ts && t.state !== ts) return false;
|
||
if (ep && t.epic !== ep) return false;
|
||
if (q && !(t.ticket + " " + t.desc + " " + t.assigned_to + " " + t.opened_by + " " + t.epic + " " + (t.watch_list || "")).toLowerCase().includes(q)) return false;
|
||
return true;
|
||
});
|
||
}
|
||
|
||
// ---------- Render (organized by next launch per site) ----------
|
||
function escUat(s) {
|
||
return (s || "").replace(/[&<>"']/g, c =>
|
||
({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c]));
|
||
}
|
||
|
||
function uatRender() {
|
||
const vis = visibleTickets();
|
||
vis.forEach(t => { t.site = siteOf(t); });
|
||
|
||
// summary (counts over all tickets)
|
||
const counts = [0, 0, 0, 0, 0];
|
||
const active = tickets.filter(t => isVisibleState(t));
|
||
active.forEach(t => counts[uatStatusOf(t)]++);
|
||
for (let i = 0; i < 5; i++) document.getElementById("cnt" + i).textContent = counts[i];
|
||
const done = counts[3], total = active.length;
|
||
const pct = total ? Math.round((done / total) * 100) : 0;
|
||
document.getElementById("prog").style.width = pct + "%";
|
||
document.getElementById("progLabel").textContent =
|
||
total ? `${done} of ${total} approved (${pct}%) · ${counts[2]} waiting on a response` : "";
|
||
|
||
// freeze banner (top of page)
|
||
const bf = document.getElementById("uatBanner");
|
||
if (bf) {
|
||
const n = daysUntil(NEXT_FREEZE.freeze);
|
||
if (n >= 0 && n <= 7) {
|
||
bf.style.display = "flex";
|
||
bf.innerHTML = `⚠️ <span>Code freeze: <b>${fmtD(NEXT_FREEZE.freeze)} at 10:00 AM</b> (${n === 0 ? "TODAY" : n + " day" + (n === 1 ? "" : "s") + " from now"})</span>
|
||
<span class="b-sub">→ launch ${escUat(NEXT_FREEZE.site)} on ${fmtD(NEXT_FREEZE.launch)} · make sure testers are booked & approved stories are ready</span>`;
|
||
} else bf.style.display = "none";
|
||
}
|
||
|
||
// launch calendar cards
|
||
const lc = document.getElementById("launchCards");
|
||
if (lc) {
|
||
const siteCount = s => vis.filter(t => t.site === s).length;
|
||
const card = (name, rule, launches, count) => {
|
||
const hot = daysUntil(launches[0].freeze) <= 7;
|
||
return `<div class="lcard${hot ? " hot" : ""}">
|
||
<h3>${name}</h3>
|
||
<div class="rule">${rule}</div>
|
||
<div class="lnext">🚀 ${fmtDy(launches[0].launch)} · <span class="fz">🧊 freeze ${fmtD(launches[0].freeze)} 10 AM</span></div>
|
||
<div class="lcount"><b>${count}</b> open ticket${count === 1 ? "" : "s"} in queue · next in ${daysUntil(launches[0].launch)} days</div>
|
||
<div class="lmore">then ${launches.slice(1).map(l => fmtD(l.launch)).join(" · ")}</div>
|
||
</div>`;
|
||
};
|
||
const both = [ { name: "🖥 RNDSystems", rule: "launches 2nd & 4th Tuesday", launches: RDNS_LAUNCHES, count: siteCount("RNDSystems") },
|
||
{ name: "🧬 BT", rule: "launches 3rd Tuesday", launches: BT_LAUNCHES, count: siteCount("BT") } ]
|
||
.sort((a, b) => a.launches[0].launch - b.launches[0].launch);
|
||
lc.innerHTML = both.map(c => card(c.name, c.rule, c.launches, c.count)).join("");
|
||
}
|
||
|
||
if (!vis.length) {
|
||
els.list.innerHTML = tickets.length
|
||
? '<div class="uempty">No tickets match the current filters.</div>'
|
||
: '<div class="uempty">📂 No data loaded yet.<br>Click <b>"📂 Load weekly CSV"</b> in the toolbar (or drag & drop your weekly ServiceNow export anywhere on this tab) to get started.</div>';
|
||
updateUatBadge();
|
||
return;
|
||
}
|
||
|
||
// priority sort inside a section: normal order first, "sent to bottom" tickets last
|
||
const cmp = (a, b) => {
|
||
const ab = bottomOrder.indexOf(a.ticket), bb = bottomOrder.indexOf(b.ticket);
|
||
const aB = ab === -1 ? 1 : 0, bB = bb === -1 ? 1 : 0;
|
||
if (aB !== bB) return aB - bB;
|
||
if (ab !== -1 && bb !== -1) return ab - bb;
|
||
const sa = ACTION_ORDER[uatStatusOf(a)], sb = ACTION_ORDER[uatStatusOf(b)];
|
||
if (sa !== sb) return sa - sb;
|
||
const ta = STATE_ORDER[a.state] ?? 99, tb = STATE_ORDER[b.state] ?? 99;
|
||
if (ta !== tb) return ta - tb;
|
||
return a.ticket.localeCompare(b.ticket);
|
||
};
|
||
|
||
const bucketLaunch = site =>
|
||
site === "RNDSystems" ? RDNS_LAUNCHES[0] : (site === "BT" ? BT_LAUNCHES[0] : null);
|
||
const siteRule = { RNDSystems: "2nd & 4th Tuesday", BT: "3rd Tuesday" };
|
||
|
||
const withLaunch = [], without = [];
|
||
for (const s of new Set(vis.map(t => t.site))) (bucketLaunch(s) ? withLaunch : without).push(s);
|
||
// nearest launch first — the section you have to worry about now comes on top
|
||
withLaunch.sort((a, b) => daysUntil(bucketLaunch(a).launch) - daysUntil(bucketLaunch(b).launch) || (SITE_ORDER[a] ?? 98) - (SITE_ORDER[b] ?? 98));
|
||
without.sort((a, b) => (SITE_ORDER[a] ?? 98) - (SITE_ORDER[b] ?? 98) || a.localeCompare(b));
|
||
const keys = [...withLaunch, ...without];
|
||
const nextSite = withLaunch[0] || null;
|
||
|
||
const colhead = `<div class="colhead"><span>Ticket</span><span>Description</span><span>State</span><span>Tester (watch list)</span><span>Dev</span><span style="text-align:right">Outreach status</span></div>`;
|
||
const row = t => {
|
||
const s = uatStatusOf(t);
|
||
const btnLabels = ["Reached out", "Waiting", "Approved"];
|
||
const isUAT = /^UAT/i.test(t.state || "");
|
||
const isBottom = bottomOrder.includes(t.ticket);
|
||
return `<div class="rowwrap">
|
||
<button class="holdbtn${s === 4 ? " on" : ""}" data-hold="${escUat(t.ticket)}" title="On hold — not ready for UAT yet (waiting on something). Click again to clear.">⏸</button>
|
||
<button class="bottombtn${isBottom ? " on" : ""}" data-bottom="${escUat(t.ticket)}" title="${isBottom ? "Bring back to priority order" : "Send to bottom of this section"}">${isBottom ? "⬆" : "⬇"}</button>
|
||
<div class="row st-${s}${isBottom ? " dimmed" : ""}" data-ticket="${escUat(t.ticket)}">
|
||
<span class="ticket" title="${escUat(t.ticket)}">${escUat(t.ticket)}</span>
|
||
<span class="desc" title="${escUat(t.desc)}">${escUat(t.desc) || "—"}</span>
|
||
<span class="cell editable" data-field="state" title="Click to edit"><span class="tag">${escUat(t.state) || "—"}</span></span>
|
||
<span class="cell tester editable" data-field="watch_list" title="${escUat(t.watch_list)} — click to edit">${t.watch_list ? `<span class="tag tester">${escUat(t.watch_list)}</span>` : "—"}</span>
|
||
<span class="cell editable" data-field="assigned_to" title="${escUat(t.assigned_to)} — click to edit">${t.assigned_to ? `→ ${escUat(t.assigned_to)}` : "—"}</span>
|
||
<span class="status-btns">
|
||
${[1, 2, 3].map(i =>
|
||
`<button class="sbtn${i === s ? " on" : ""}" data-s="${i}" data-ticket="${escUat(t.ticket)}">${btnLabels[i - 1]}</button>`
|
||
).join("")}
|
||
</span>
|
||
</div>
|
||
${(isUAT || t.note) ? `
|
||
<div class="uat-line">
|
||
<button class="mini" data-note="${escUat(t.ticket)}">📝 ${t.note ? "Edit feedback note" : "Add feedback note"}</button>
|
||
${isUAT ? `<button class="mini wip" data-wip="${escUat(t.ticket)}" title="Sets the state to Work in Progress">↩ Send back to Work in Progress</button>` : ""}
|
||
${t.note ? `<span class="notetext" title="${escUat(t.note)}">“${escUat(t.note)}”</span>` : ""}
|
||
</div>` : ""}
|
||
</div>`;
|
||
};
|
||
|
||
const section = site => {
|
||
const list = vis.filter(t => t.site === site).sort(cmp);
|
||
if (!list.length) return "";
|
||
const launch = bucketLaunch(site);
|
||
let head = `<div class="section-head">
|
||
<div class="bsec"><span style="font-size:15px">${site === "RNDSystems" ? "🖥" : (site === "BT" ? "🧬" : "📦")}</span>
|
||
<span style="font-size:13px;font-weight:700;letter-spacing:.05em;text-transform:uppercase">${escUat(site)}</span>${site === nextSite ? '<span class="bnext">⏭ NEXT UP</span>' : ""}`;
|
||
if (launch) {
|
||
const n = daysUntil(launch.launch);
|
||
const cls = n <= 7 ? "urgent" : (n <= 21 ? "soon" : "later");
|
||
head += `<span class="blaunch">→ launch ${fmtDy(launch.launch)}</span>
|
||
<span class="bfreeze">🧊 freeze ${fmtD(launch.freeze)} · 10 AM</span>
|
||
<span class="bdays ${cls}">${n === 0 ? "LAUNCH TODAY" : n + " day" + (n === 1 ? "" : "s") + " out"}</span>
|
||
<span class="bsub">${siteRule[site]}</span>`;
|
||
} else {
|
||
head += `<span class="bsub">no launch cycle tracked here — keep as a separate queue</span>`;
|
||
}
|
||
head += `<span class="count">${list.length} ticket${list.length === 1 ? "" : "s"}</span></div></div>`;
|
||
const main = list.filter(t => !bottomOrder.includes(t.ticket)).map(row).join("");
|
||
const bots = list.filter(t => bottomOrder.includes(t.ticket));
|
||
const bot = bots.length
|
||
? `<div class="bottom-zone"><div class="bz-label">⬇ sent to bottom · ${bots.length}</div>${bots.map(row).join("")}</div>`
|
||
: "";
|
||
return `<div class="section secbody${site === nextSite ? " next" : ""}">
|
||
${head}
|
||
${colhead}
|
||
${main}
|
||
${bot}
|
||
</div>`;
|
||
};
|
||
|
||
els.list.innerHTML = keys.map(section).join("");
|
||
updateUatBadge();
|
||
}
|
||
|
||
function updateUatBadge() {
|
||
const b = document.getElementById("uatBadge");
|
||
if (!b) return;
|
||
if (!tickets.length) { b.textContent = "🚀"; return; }
|
||
const action = tickets.filter(t => {
|
||
const s = siteOf(t);
|
||
return isVisibleState(t) && (s === "RNDSystems" || s === "BT") && uatStatusOf(t) === 0;
|
||
}).length;
|
||
b.textContent = action > 0 ? `⚠ ${action}` : "🚀";
|
||
}
|
||
|
||
// ---------- Events ----------
|
||
els.list.addEventListener("click", e => {
|
||
if (e.target.closest(".inline-edit") || e.target.closest(".note-edit")) return;
|
||
const editable = e.target.closest(".editable");
|
||
if (editable) { startEdit(editable); return; }
|
||
const noteBtn = e.target.closest("[data-note]");
|
||
if (noteBtn) { startNoteEdit(noteBtn); return; }
|
||
const botBtn = e.target.closest("[data-bottom]");
|
||
if (botBtn) { moveBottom(botBtn.dataset.bottom); return; }
|
||
const holdBtn = e.target.closest("[data-hold]");
|
||
if (holdBtn) {
|
||
const id = holdBtn.dataset.hold;
|
||
setUatStatus(id, uatStatusOf(id) === 4 ? 0 : 4);
|
||
return;
|
||
}
|
||
const wipBtn = e.target.closest("[data-wip]");
|
||
if (wipBtn) {
|
||
const id = wipBtn.dataset.wip;
|
||
if (confirm(`Move ${id} back to "Work in Progress"?`)) setField(id, "state", "Work in Progress");
|
||
return;
|
||
}
|
||
const btn = e.target.closest(".sbtn");
|
||
if (!btn) return;
|
||
const s = Number(btn.dataset.s);
|
||
// clicking the already-selected button unchecks it
|
||
setUatStatus(btn.dataset.ticket, s === uatStatusOf(btn.dataset.ticket) ? 0 : s);
|
||
});
|
||
|
||
// ---------- Inline field editing ----------
|
||
function setField(id, field, value) {
|
||
const base = rawByTicket[id] || {};
|
||
let diff = { ...(overrides[id] || {}) };
|
||
if (value === (base[field] ?? "")) delete diff[field];
|
||
else diff[field] = value;
|
||
if (Object.keys(diff).length) overrides[id] = diff;
|
||
else delete overrides[id];
|
||
saveOverrides();
|
||
const idx = tickets.findIndex(x => x.ticket === id);
|
||
if (idx !== -1) tickets[idx] = { ...base, ...(overrides[id] || {}) };
|
||
populateFilters();
|
||
uatRender();
|
||
}
|
||
|
||
function startEdit(cell) {
|
||
if (cell.querySelector("input, select")) return;
|
||
const row = cell.closest(".row");
|
||
const id = row.dataset.ticket;
|
||
const field = cell.dataset.field;
|
||
const t = tickets.find(x => x.ticket === id);
|
||
if (!t) return;
|
||
const finishWith = (get) => {
|
||
let done = false;
|
||
const finish = save => {
|
||
if (done) return;
|
||
done = true;
|
||
if (save) setField(id, field, get());
|
||
else uatRender();
|
||
};
|
||
return finish;
|
||
};
|
||
if (field === "state") {
|
||
const sel = document.createElement("select");
|
||
sel.className = "inline-edit";
|
||
STATE_OPTIONS.forEach(v => {
|
||
const o = document.createElement("option");
|
||
o.value = v;
|
||
o.textContent = v;
|
||
sel.appendChild(o);
|
||
});
|
||
if (STATE_OPTIONS.includes(t.state)) sel.value = t.state;
|
||
cell.textContent = "";
|
||
cell.appendChild(sel);
|
||
sel.focus();
|
||
const finish = finishWith(() => sel.value);
|
||
sel.addEventListener("change", () => finish(true));
|
||
sel.addEventListener("blur", () => finish(true));
|
||
return;
|
||
}
|
||
const input = document.createElement("input");
|
||
input.className = "inline-edit";
|
||
input.value = t[field] || "";
|
||
cell.textContent = "";
|
||
cell.appendChild(input);
|
||
input.focus();
|
||
input.select();
|
||
let done = false;
|
||
const finish = save => {
|
||
if (done) return;
|
||
done = true;
|
||
if (save) setField(id, field, input.value.trim());
|
||
else uatRender();
|
||
};
|
||
input.addEventListener("keydown", e => {
|
||
if (e.key === "Enter") finish(true);
|
||
else if (e.key === "Escape") finish(false);
|
||
});
|
||
input.addEventListener("blur", () => finish(true));
|
||
}
|
||
|
||
function startNoteEdit(btn) {
|
||
const line = btn.closest(".uat-line");
|
||
if (line.querySelector("textarea")) return;
|
||
const id = btn.dataset.note;
|
||
const t = tickets.find(x => x.ticket === id);
|
||
if (!t) return;
|
||
line.innerHTML = "";
|
||
const ta = document.createElement("textarea");
|
||
ta.className = "note-edit";
|
||
ta.rows = 2;
|
||
ta.placeholder = "Feedback to work back into the ticket…";
|
||
ta.value = t.note || "";
|
||
const save = document.createElement("button");
|
||
save.className = "mini";
|
||
save.textContent = "Save note";
|
||
const cancel = document.createElement("button");
|
||
cancel.className = "mini";
|
||
cancel.textContent = "Cancel";
|
||
line.append(ta, save, cancel);
|
||
ta.focus();
|
||
let done = false;
|
||
const finish = saveIt => {
|
||
if (done) return;
|
||
done = true;
|
||
if (saveIt) setField(id, "note", ta.value.trim());
|
||
else uatRender();
|
||
};
|
||
save.addEventListener("click", () => finish(true));
|
||
cancel.addEventListener("click", () => finish(false));
|
||
ta.addEventListener("keydown", e => {
|
||
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) { e.preventDefault(); finish(true); }
|
||
else if (e.key === "Escape") finish(false);
|
||
});
|
||
}
|
||
["statusFilter", "stateFilter", "epicFilter"].forEach(id =>
|
||
els[id === "statusFilter" ? "statusFilter" : id].addEventListener("change", uatRender));
|
||
els.search.addEventListener("input", uatRender);
|
||
els.showDone.addEventListener("click", () => {
|
||
hideApproved = !hideApproved;
|
||
els.showDone.textContent = hideApproved ? "Hide approved" : "Show approved";
|
||
uatRender();
|
||
});
|
||
document.getElementById("hiddenToggle").addEventListener("click", e => {
|
||
showHidden = !showHidden;
|
||
const n = tickets.filter(t => !HARD_EXCLUDED.has(t.state) && IGNORED_STATES.has(t.state)).length;
|
||
e.target.textContent = showHidden ? `Hiding ${n} approved/awaiting` : `Show ${n} hidden`;
|
||
populateFilters();
|
||
uatRender();
|
||
});
|
||
document.getElementById("resetAll").addEventListener("click", () => {
|
||
if (!confirm("Clear the outreach status on ALL tickets? This can't be undone.")) return;
|
||
statuses = {};
|
||
saveStatuses();
|
||
uatRender();
|
||
});
|
||
|
||
// ---------- Backup / restore ----------
|
||
document.getElementById("backup").addEventListener("click", () => {
|
||
const blob = new Blob([JSON.stringify({ exported: new Date().toISOString(), statuses, overrides }, null, 2)], { type: "application/json" });
|
||
const a = document.createElement("a");
|
||
a.href = URL.createObjectURL(blob);
|
||
a.download = "uat-outreach-statuses-" + new Date().toISOString().slice(0, 10) + ".json";
|
||
a.click();
|
||
URL.revokeObjectURL(a.href);
|
||
});
|
||
document.getElementById("restoreInput").addEventListener("change", e => {
|
||
const file = e.target.files[0];
|
||
if (!file) return;
|
||
const reader = new FileReader();
|
||
reader.onload = () => {
|
||
try {
|
||
const obj = JSON.parse(reader.result);
|
||
if (typeof obj !== "object" || obj === null) throw new Error("unrecognized format");
|
||
const st = obj.statuses ? obj.statuses : {};
|
||
const ov = obj.overrides ? obj.overrides : {};
|
||
const n = Object.keys(st).length;
|
||
if (!confirm(`Restore ${n} saved statuses (${Object.keys(ov).length} card edits)? This replaces your current selections.`)) return;
|
||
statuses = st;
|
||
overrides = ov;
|
||
saveStatuses();
|
||
saveOverrides();
|
||
// re-apply card edits to the current list
|
||
tickets.forEach((t, i) => { const raw = rawByTicket[t.ticket]; if (raw) tickets[i] = { ...raw, ...(overrides[t.ticket] || {}) }; });
|
||
uatRender();
|
||
} catch (err) {
|
||
alert("Could not restore: " + err.message);
|
||
}
|
||
};
|
||
reader.readAsText(file);
|
||
e.target.value = "";
|
||
});
|
||
|
||
function loadTickets(list, sourceLabel) {
|
||
// apply any local edits (tester/desc/state/dev changes) on top of the CSV data
|
||
rawByTicket = {};
|
||
tickets = list.map(t => {
|
||
// trim stray whitespace (e.g. "Quoting ") so filters and matching work
|
||
const clean = { ...t };
|
||
for (const k in clean) if (typeof clean[k] === "string") clean[k] = clean[k].trim();
|
||
rawByTicket[clean.ticket] = clean;
|
||
return { ...clean, ...(overrides[clean.ticket] || {}) };
|
||
});
|
||
const active = tickets.filter(t => isVisibleState(t)).length;
|
||
document.getElementById("loadLabel").textContent =
|
||
`${active} tickets to track (${list.length - active} not shown) · ${sourceLabel}`;
|
||
const dh = document.getElementById("dropHint");
|
||
if (dh) { dh.style.display = "none"; dh.classList.remove("active"); }
|
||
populateFilters();
|
||
uatRender();
|
||
}
|
||
let rawByTicket = {};
|
||
|
||
document.getElementById("csvInput").addEventListener("change", e => {
|
||
const file = e.target.files[0];
|
||
if (!file) return;
|
||
const reader = new FileReader();
|
||
reader.onload = () => {
|
||
try {
|
||
loadTickets(csvToTickets(reader.result), file.name);
|
||
} catch (err) {
|
||
alert("Could not load that CSV: " + err.message);
|
||
}
|
||
};
|
||
reader.readAsText(file);
|
||
e.target.value = "";
|
||
});
|
||
|
||
// drag & drop
|
||
const dropHint = document.getElementById("dropHint");
|
||
const uatPane = document.getElementById("tab-uat");
|
||
["dragenter", "dragover"].forEach(ev => uatPane.addEventListener(ev, e => {
|
||
e.preventDefault(); dropHint.classList.add("active"); dropHint.style.display="block";
|
||
}));
|
||
["dragleave", "drop"].forEach(ev => document.addEventListener(ev, e => {
|
||
e.preventDefault(); dropHint.classList.remove("active"); dropHint.style.display="none";
|
||
}));
|
||
uatPane.addEventListener("drop", e => {
|
||
const file = e.dataTransfer.files && e.dataTransfer.files[0];
|
||
if (!file) return;
|
||
const reader = new FileReader();
|
||
reader.onload = () => {
|
||
try { loadTickets(csvToTickets(reader.result), file.name); }
|
||
catch (err) { alert("Could not load that CSV: " + err.message); }
|
||
};
|
||
reader.readAsText(file);
|
||
});
|
||
|
||
// init
|
||
loadTickets(INITIAL_TICKETS, INITIAL_SOURCE);
|
||
|
||
</script>
|
||
<script>
|
||
|
||
/* ================= HUB TABS ================= */
|
||
const HUB_TABS = ["roadmap", "uat", "wa"];
|
||
function switchTab(name) {
|
||
HUB_TABS.forEach(t => {
|
||
const pane = document.getElementById("tab-" + t), btn = document.getElementById("tabbtn-" + t);
|
||
if (pane) pane.classList.toggle("active", t === name);
|
||
if (btn) btn.classList.toggle("active", t === name);
|
||
});
|
||
localStorage.setItem("sm-hub-tab", name);
|
||
if (name === "roadmap" && window.refreshAll) refreshAll();
|
||
if (name === "uat" && window.uatRender) uatRender();
|
||
if (name === "wa" && window.renderWa) renderWa();
|
||
}
|
||
document.getElementById("hubDate").textContent =
|
||
new Date().toLocaleDateString(undefined, { weekday: "long", year: "numeric", month: "long", day: "numeric" });
|
||
// the week pill used to sit alone under a removed page header — pull it into the hub bar
|
||
const wkPill = document.getElementById("wkPill");
|
||
if (wkPill) { wkPill.classList.add("hub-wk"); document.getElementById("hubDate").insertAdjacentElement("afterend", wkPill); }
|
||
switchTab(localStorage.getItem("sm-hub-tab") || "roadmap");
|
||
|
||
/* ================= BACKUP / RESTORE ================= */
|
||
// All app data lives under these key prefixes (covers date-stamped keys too,
|
||
// e.g. sm-mydaily-YYYY-MM-DD and ba-checklist-v3-YYYY-MM-DD).
|
||
const BACKUP_PREFIXES = ["sm-", "smh-", "uat-", "ba-"];
|
||
function exportBackup() {
|
||
const data = {};
|
||
for (let i = 0; i < localStorage.length; i++) {
|
||
const k = localStorage.key(i);
|
||
if (BACKUP_PREFIXES.some(p => k.startsWith(p))) data[k] = localStorage.getItem(k);
|
||
}
|
||
const payload = {
|
||
app: "ServiceMeow-HQ",
|
||
version: 1,
|
||
exportedAt: new Date().toISOString(),
|
||
keyCount: Object.keys(data).length,
|
||
data
|
||
};
|
||
const blob = new Blob([JSON.stringify(payload, null, 2)], { type: "application/json" });
|
||
const a = document.createElement("a");
|
||
a.href = URL.createObjectURL(blob);
|
||
const d = new Date(), p2 = n => String(n).padStart(2, "0");
|
||
a.download = "servicemow-backup-" + d.getFullYear() + p2(d.getMonth() + 1) + p2(d.getDate()) + "-" + p2(d.getHours()) + p2(d.getMinutes()) + ".json";
|
||
document.body.appendChild(a);
|
||
a.click();
|
||
a.remove();
|
||
setTimeout(() => URL.revokeObjectURL(a.href), 5000);
|
||
}
|
||
function importBackup(file) {
|
||
const reader = new FileReader();
|
||
reader.onerror = () => alert("Could not read that file.");
|
||
reader.onload = () => {
|
||
let payload;
|
||
try { payload = JSON.parse(reader.result); } catch (e) { alert("That file is not valid JSON."); return; }
|
||
const data = (payload && typeof payload === "object" && payload.data && typeof payload.data === "object") ? payload.data : payload;
|
||
if (!data || typeof data !== "object") { alert("No backup data found in that file."); return; }
|
||
// Resolve values: strings pass through, objects get re-stringified (raw
|
||
// localStorage values are strings, so both shapes round-trip safely).
|
||
const resolved = {};
|
||
Object.keys(data).forEach(k => {
|
||
const v = data[k];
|
||
if (v === null || v === undefined) return;
|
||
if (typeof v === "string") resolved[k] = v;
|
||
else { try { resolved[k] = JSON.stringify(v); } catch (e) { /* skip unserializable */ } }
|
||
});
|
||
const keys = Object.keys(resolved).filter(k => BACKUP_PREFIXES.some(p => k.startsWith(p))).sort();
|
||
if (!keys.length) { alert("No ServiceMeow keys found in that backup file."); return; }
|
||
if (!confirm("Restore " + keys.length + " saved values from " + file.name + "?\n\nValues with matching keys will be overwritten with the backup. New keys will be added. Unrelated data is left untouched.")) return;
|
||
keys.forEach(k => localStorage.setItem(k, resolved[k]));
|
||
alert("Restored " + keys.length + " values. Reloading to pick up the changes…");
|
||
location.reload();
|
||
};
|
||
reader.readAsText(file);
|
||
}
|
||
|
||
</script>
|
||
<script>
|
||
/* ================= WEB ALIGNMENT TEAM (Mondays 9:00 AM MT) ================= */
|
||
const WA_KEY = "sm-webalign-items-v1";
|
||
let waItems = [];
|
||
try { waItems = JSON.parse(localStorage.getItem(WA_KEY) || "[]"); } catch { waItems = []; }
|
||
function waSave() { localStorage.setItem(WA_KEY, JSON.stringify(waItems)); }
|
||
function waNextMeeting() {
|
||
const now = new Date();
|
||
const m = new Date(now); m.setHours(9, 0, 0, 0);
|
||
let add = (1 - now.getDay() + 7) % 7; // days until Monday
|
||
if (add === 0 && now >= m) add = 7; // Monday but the 9 AM slot is gone → next week
|
||
m.setDate(m.getDate() + add);
|
||
return m;
|
||
}
|
||
function renderWa() {
|
||
const now = new Date();
|
||
const m = waNextMeeting();
|
||
const tStr = m.toLocaleTimeString(undefined, { hour: "numeric", minute: "2-digit" });
|
||
const dStr = m.toLocaleDateString(undefined, { weekday: "long", month: "long", day: "numeric" });
|
||
const sameDay = m.toDateString() === now.toDateString();
|
||
const dayOnly = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
||
const days = Math.round((m - dayOnly) / 86400000);
|
||
const when = sameDay
|
||
? `TODAY at ${tStr} (in ${Math.max(1, Math.round((m - now) / 60000))} min)`
|
||
: `${dStr} at ${tStr} · in ${days} day${days === 1 ? "" : "s"}`;
|
||
const el = document.getElementById("waWhen");
|
||
if (el) {
|
||
el.innerHTML = `🗓 <b>Next sync: ${when}</b> <span class="wa-sub">· Mondays 9:00 AM MT</span>`;
|
||
el.classList.toggle("today", sameDay);
|
||
}
|
||
const wrap = document.getElementById("waList");
|
||
const open = waItems.filter(i => !i.done);
|
||
const covered = waItems.filter(i => i.done);
|
||
const row = i => {
|
||
const idx = waItems.indexOf(i);
|
||
const subs = i.subs || [];
|
||
const subDone = subs.filter(s => s.done).length;
|
||
const subsRows = subs.map((s, si) =>
|
||
`<label class="item wa-subrow">
|
||
<input type="checkbox" ${s.done ? "checked" : ""} onchange="waSubToggle(${idx}, ${si})">
|
||
<span class="txt">${esc(s.text)}</span>
|
||
<button class="del" onclick="waSubRemove(${idx}, ${si})" onmousedown="event.preventDefault()" title="Remove sub-item">✕</button>
|
||
</label>`).join("");
|
||
return `
|
||
<label class="item${i.done ? " checked" : ""}">
|
||
<input type="checkbox" ${i.done ? "checked" : ""} onchange="waToggle(${idx})">
|
||
<span class="txt">${esc(i.text)}</span>
|
||
${subs.length ? `<span class="wa-subcnt">${subDone}/${subs.length}</span>` : ""}
|
||
<span class="wa-added">added ${esc(i.added)}</span>
|
||
<button class="wa-addsub" onclick="waShowSubInput(${idx})" onmousedown="event.preventDefault()" title="Add a sub-item / talking point">+ sub</button>
|
||
<button class="del" onclick="waRemove(${idx})" onmousedown="event.preventDefault()" title="Remove">✕</button>
|
||
</label>
|
||
<div class="wa-subs" id="waSubs${idx}">${subsRows}</div>`;
|
||
};
|
||
let html = open.length
|
||
? open.map(row).join("")
|
||
: '<div class="empty">Nothing queued for Monday yet — add what you need to raise above 👇</div>';
|
||
if (covered.length) html += `<div class="subhead">✅ Covered <span class="count">${covered.length}</span></div>` + covered.map(row).join("");
|
||
wrap.innerHTML = html;
|
||
const b = document.getElementById("waBadge");
|
||
if (b) b.textContent = open.length ? String(open.length) : "—";
|
||
}
|
||
function addWaItem() {
|
||
const inp = document.getElementById("waInput");
|
||
const text = inp.value.trim();
|
||
if (!text) return;
|
||
waItems.push({ text, done: false, added: new Date().toLocaleDateString(undefined, { month: "short", day: "numeric" }) });
|
||
inp.value = "";
|
||
waSave(); renderWa(); inp.focus();
|
||
}
|
||
function waToggle(idx) { waItems[idx].done = !waItems[idx].done; waSave(); renderWa(); }
|
||
function waSubToggle(idx, si) { waItems[idx].subs[si].done = !waItems[idx].subs[si].done; waSave(); renderWa(); }
|
||
function waSubRemove(idx, si) { waItems[idx].subs.splice(si, 1); waSave(); renderWa(); }
|
||
function waShowSubInput(idx) {
|
||
const wrap = document.getElementById("waSubs" + idx);
|
||
if (!wrap || wrap.querySelector(".wa-subadd input")) return;
|
||
const d = document.createElement("div");
|
||
d.className = "wa-subadd";
|
||
const inp = document.createElement("input");
|
||
inp.type = "text";
|
||
inp.placeholder = "Sub-item / talking point… (Enter to add, Esc to cancel)";
|
||
d.appendChild(inp);
|
||
wrap.appendChild(d);
|
||
inp.focus();
|
||
let done = false;
|
||
inp.addEventListener("keydown", e => {
|
||
if (e.key === "Enter") {
|
||
const v = inp.value.trim();
|
||
done = true;
|
||
if (v) {
|
||
if (!waItems[idx].subs) waItems[idx].subs = [];
|
||
waItems[idx].subs.push({ text: v, done: false });
|
||
waSave(); renderWa(); waShowSubInput(idx); // stay open for the next one
|
||
}
|
||
} else if (e.key === "Escape") { done = true; d.remove(); }
|
||
});
|
||
inp.addEventListener("blur", () => { setTimeout(() => { if (!done && d.parentNode) d.remove(); }, 150); });
|
||
}
|
||
function waRemove(idx) { if (confirm("Remove this item?")) { waItems.splice(idx, 1); waSave(); renderWa(); } }
|
||
function waClearCovered() {
|
||
const n = waItems.filter(i => i.done).length;
|
||
if (!n) return;
|
||
if (!confirm(`Remove the ${n} covered item${n === 1 ? "" : "s"}?`)) return;
|
||
waItems = waItems.filter(i => !i.done);
|
||
waSave(); renderWa();
|
||
}
|
||
renderWa();
|
||
|
||
</script>
|
||
</body>
|
||
</html>
|