added import export feature
This commit is contained in:
parent
3c23084c8f
commit
73f39e0219
|
|
@ -250,6 +250,9 @@
|
||||||
.wa-addsub:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
.wa-addsub:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
||||||
.wa-subadd { margin: 2px 0 4px; }
|
.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; }
|
.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; }
|
||||||
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
|
|
@ -392,10 +395,6 @@
|
||||||
.tag.epic { background: #f0f2f8; color: var(--muted); }
|
.tag.epic { background: #f0f2f8; color: var(--muted); }
|
||||||
.tag.tester { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
|
.tag.tester { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
|
||||||
.status-btns { display: flex; gap: 3px; justify-content: flex-end; }
|
.status-btns { display: flex; gap: 3px; justify-content: flex-end; }
|
||||||
.status-btns .st-ghost { font-size: 11px; font-weight: 600; color: var(--muted); background: #f2f4fa; border: 1px dashed var(--border); border-radius: 8px; padding: 4px 10px; }
|
|
||||||
.status-btns .st-ghost.g1 { background: var(--st1bg); border: 1.5px solid var(--st1); color: #2f4fd0; font-weight: 700; }
|
|
||||||
.status-btns .st-ghost.g2 { background: var(--st2bg); border: 1.5px solid var(--st2); color: #9a6206; font-weight: 700; }
|
|
||||||
.status-btns .st-ghost.g3 { background: var(--st3bg); border: 1.5px solid var(--st3); color: #1a7a45; font-weight: 700; }
|
|
||||||
.sbtn {
|
.sbtn {
|
||||||
font-size: 11.5px; font-weight: 600;
|
font-size: 11.5px; font-weight: 600;
|
||||||
border: 1.5px solid transparent; border-radius: 8px;
|
border: 1.5px solid transparent; border-radius: 8px;
|
||||||
|
|
@ -404,7 +403,6 @@
|
||||||
transition: all .12s;
|
transition: all .12s;
|
||||||
}
|
}
|
||||||
.sbtn:hover { background: #eef0f6; }
|
.sbtn:hover { background: #eef0f6; }
|
||||||
.sbtn.on { font-weight: 700; box-shadow: 0 1px 4px rgba(20,30,60,.25); }
|
|
||||||
.sbtn[data-s="0"].on { background: var(--st0bg); border-color: var(--st0); color: var(--st0); }
|
.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="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="2"].on { background: var(--st2); border-color: var(--st2); color: #fff; }
|
||||||
|
|
@ -419,12 +417,6 @@
|
||||||
}
|
}
|
||||||
.clearbtn:hover { background: #fdecec; color: #d64545; }
|
.clearbtn:hover { background: #fdecec; color: #d64545; }
|
||||||
.uempty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14.5px; }
|
.uempty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14.5px; }
|
||||||
.rowwrap .row.flash { animation: rowflash 1.8s ease; }
|
|
||||||
@keyframes rowflash { 0%, 55% { box-shadow: 0 0 0 3px #f5c518; background: #fff9d6; } 100% { box-shadow: none; } }
|
|
||||||
.flash-scroll { scroll-margin: 20px; }
|
|
||||||
.roadsyn { cursor:pointer; color:#2e7d4f !important; background:#eefaf2; border:1px solid #bfe3cd; border-radius:8px; display:inline-block; padding:3px 10px; margin-top:6px; max-width:100%; }
|
|
||||||
.roadsyn:hover { background:#e0f4e8; }
|
|
||||||
.roadsyn b { font-weight:700; }
|
|
||||||
@media (max-width: 960px) {
|
@media (max-width: 960px) {
|
||||||
.colhead { display: none; }
|
.colhead { display: none; }
|
||||||
.row { grid-template-columns: 96px minmax(0,1fr) auto; }
|
.row { grid-template-columns: 96px minmax(0,1fr) auto; }
|
||||||
|
|
@ -448,12 +440,8 @@
|
||||||
.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); }
|
.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 */
|
/* 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; cursor:pointer; user-select:none; transition:background .15s,border-color .15s,box-shadow .15s; }
|
.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; }
|
.uat-banner .b-sub { font-weight:400; font-size:12.5px; color:#a06a20; }
|
||||||
.uat-banner:hover { box-shadow:0 2px 10px rgba(180,110,20,.18); }
|
|
||||||
.uat-banner.frozen { background:#eaf1ff; border-color:#9db9ee; color:#1d3f7d; }
|
|
||||||
.uat-banner.frozen .b-sub { color:#3a62ad; }
|
|
||||||
.uat-banner.frozen:hover { box-shadow:0 2px 10px rgba(40,80,180,.2); }
|
|
||||||
.launch-cards { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
|
.launch-cards { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
|
||||||
.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 { 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 h3 { font-size:13.5px; margin-bottom:2px; }
|
||||||
|
|
@ -464,20 +452,9 @@
|
||||||
.lcard .lcount b { color:var(--text); }
|
.lcard .lcount b { color:var(--text); }
|
||||||
.lcard .lmore { margin-top:4px; font-size:11.5px; color:var(--muted); }
|
.lcard .lmore { margin-top:4px; font-size:11.5px; color:var(--muted); }
|
||||||
.lcard.hot { border-color:#f3c18f; background:linear-gradient(180deg,#fffaf2,#fff); }
|
.lcard.hot { border-color:#f3c18f; background:linear-gradient(180deg,#fffaf2,#fff); }
|
||||||
.lcard { cursor:pointer; user-select:none; transition:box-shadow .15s,border-color .15s; }
|
.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; }
|
||||||
.lcard:hover { box-shadow:0 2px 10px rgba(40,80,180,.15); }
|
.bottombtn:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
|
||||||
.lcard.frozen { border-color:#9db9ee; background:linear-gradient(180deg,#eaf1ff 0%,#fff 55%); }
|
.bottombtn.on { background:#4a5266; border-color:#4a5266; color:#fff; }
|
||||||
.lcard.frozen .lnext .fz { color:#1d3f7d; }
|
|
||||||
.frozenbadge { display:inline-block; font-size:10.5px; font-weight:800; letter-spacing:.06em; color:#1d3f7d; background:#dbe7ff; border:1px solid #9db9ee; border-radius:999px; padding:2px 10px; margin-left:8px; vertical-align:middle; }
|
|
||||||
.ldate { cursor:pointer; border-bottom:1.5px dotted #9aa7bd; transition:all .12s; }
|
|
||||||
.ldate:hover { color:#3b6fe0; border-bottom-color:#3b6fe0; background:#eef3ff; border-radius:4px; }
|
|
||||||
.ladj { font-size:10px; font-weight:800; letter-spacing:.05em; color:#8a5a00; background:#fff3d6; border:1px solid #ecc25f; border-radius:999px; padding:1px 7px; vertical-align:middle; }
|
|
||||||
.removebtn { width:26px; height:26px; border-radius:50%; padding:0; border:1.5px solid var(--border); background:#fff; color:var(--muted); font-size:15px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .12s; }
|
|
||||||
.removebtn:hover { border-color:#c0392b; color:#c0392b; background:#fdecea; }
|
|
||||||
.restorebtn { width:26px; height:26px; border-radius:50%; padding:0; border:1.5px solid var(--border); background:#fff; color:var(--muted); font-size:13px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .12s; }
|
|
||||||
.restorebtn:hover { border-color:#2e7d4f; color:#2e7d4f; background:#eefaf2; }
|
|
||||||
.section.notneeded { border-style:dashed; background:#fafbfd; }
|
|
||||||
.section.notneeded .row { opacity:.82; }
|
|
||||||
.bsec { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
|
.bsec { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
|
||||||
.bsec .blaunch { font-size:13.5px; font-weight:700; color:var(--text); }
|
.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 .bfreeze { font-size:12.5px; font-weight:600; color:#b0721f; background:#fff3e0; border-radius:999px; padding:3px 10px; }
|
||||||
|
|
@ -487,12 +464,11 @@
|
||||||
.bdays.later { background:#eef1f8; color:#5a6478; }
|
.bdays.later { background:#eef1f8; color:#5a6478; }
|
||||||
.bsec .bsub { font-size:11.5px; color:var(--muted); }
|
.bsec .bsub { font-size:11.5px; color:var(--muted); }
|
||||||
.bsec .count { margin-left:auto; font-weight:500; color:var(--muted); font-size:11px; }
|
.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; }
|
.secbody .row.dimmed { opacity:.82; }
|
||||||
/* nearest-launch section = most prominent */
|
/* 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); }
|
.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); }
|
||||||
.section.frozen { border:1.5px solid #9db9ee; background:linear-gradient(180deg,#eaf1ff 0%,#fff 55%); box-shadow:0 2px 12px rgba(40,80,180,.14); }
|
|
||||||
.section.frozen .bfreeze { background:#dbe7ff; color:#1d3f7d; border:1px solid #9db9ee; }
|
|
||||||
.section.frozen .bnext { color:#1d3f7d; background:#dbe7ff; border-color:#9db9ee; }
|
|
||||||
.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; }
|
.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>
|
</style>
|
||||||
|
|
@ -500,12 +476,16 @@
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="hubbar">
|
<div class="hubbar">
|
||||||
<div class="hub-title">ServiceMeow HQ</div>
|
<div class="hub-title">🐱 ServiceMeow HQ</div>
|
||||||
<div class="hub-date" id="hubDate"></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">
|
<div class="tabbar">
|
||||||
<button class="tabbtn" id="tabbtn-roadmap" onclick="switchTab('roadmap')">Roadmap & Daily</button>
|
<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-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>
|
<button class="tabbtn" id="tabbtn-wa" onclick="switchTab('wa')">🤝 Web Alignment <span class="tbadge" id="waBadge">—</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -515,7 +495,7 @@
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div>
|
<div>
|
||||||
<h1>ServiceMeow — Daily & Roadmap <span class="wk-pill" id="wkPill"></span></h1>
|
<h1>📋 ServiceMeow — Daily & Roadmap <span class="wk-pill" id="wkPill"></span></h1>
|
||||||
<div class="date" id="today"></div>
|
<div class="date" id="today"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -529,7 +509,7 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-head">
|
<div class="card-head">
|
||||||
<div>
|
<div>
|
||||||
<h2>My Daily Tasks</h2>
|
<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 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>
|
</div>
|
||||||
<button class="mini-btn" onclick="clearDaily()">Clear today</button>
|
<button class="mini-btn" onclick="clearDaily()">Clear today</button>
|
||||||
|
|
@ -547,8 +527,8 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-head">
|
<div class="card-head">
|
||||||
<div>
|
<div>
|
||||||
<h2>Impacts & Flags</h2>
|
<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 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>
|
</div>
|
||||||
<div id="flagList"></div>
|
<div id="flagList"></div>
|
||||||
|
|
@ -566,7 +546,7 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-head">
|
<div class="card-head">
|
||||||
<div>
|
<div>
|
||||||
<h2>Roadmap Tasks</h2>
|
<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 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>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -587,17 +567,17 @@
|
||||||
<div class="card focus-card">
|
<div class="card focus-card">
|
||||||
<div class="card-head">
|
<div class="card-head">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="now" id="focusTitle">Due This Week</h2>
|
<h2 class="now" id="focusTitle">🎯 Due This Week</h2>
|
||||||
<div class="hint" id="focusHint"></div>
|
<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 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>
|
</div>
|
||||||
<div id="focusChips"></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="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="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 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 id="upcomingChips"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -605,8 +585,8 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-head">
|
<div class="card-head">
|
||||||
<div>
|
<div>
|
||||||
<h2>Roadmap Timeline</h2>
|
<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 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>
|
||||||
<div class="zoom-row" id="zoomRow">
|
<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 active" data-view="month" onclick="setGanttView('month', this)">This month</button>
|
||||||
|
|
@ -648,7 +628,7 @@
|
||||||
<div style="display:flex;gap:8px">
|
<div style="display:flex;gap:8px">
|
||||||
<button id="stInprog" onclick="tuSetStatus('inprog')" class="st-btn">▶ In progress</button>
|
<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="stDone" onclick="tuSetStatus('done')" class="st-btn">✓ Complete</button>
|
||||||
<button id="stDelayed" onclick="tuSetStatus('delayed')" class="st-btn">Delayed</button>
|
<button id="stDelayed" onclick="tuSetStatus('delayed')" class="st-btn">⏳ Delayed</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="stClearRow" style="display:none"><button class="st-clear" onclick="tuSetStatus(null)">clear status</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">
|
<div style="display:flex;gap:8px">
|
||||||
|
|
@ -667,14 +647,14 @@
|
||||||
<!-- flag edit modal -->
|
<!-- flag edit modal -->
|
||||||
<div class="modal-ov" id="flagModal" style="display:none" onclick="if(event.target===this) closeFlagEdit()">
|
<div class="modal-ov" id="flagModal" style="display:none" onclick="if(event.target===this) closeFlagEdit()">
|
||||||
<div class="modal">
|
<div class="modal">
|
||||||
<h3>Edit flag</h3>
|
<h3>🚩 Edit flag</h3>
|
||||||
<div class="m-sub">Update the flag and add the tasks needed to resolve it.</div>
|
<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>
|
<textarea id="feText" placeholder="What's this flag about?" style="min-height:70px"></textarea>
|
||||||
<div style="display:flex;gap:8px;margin-top:10px">
|
<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>
|
<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">
|
<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>
|
||||||
<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 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 id="feTasks" class="fe-tasks"></div>
|
||||||
<div class="fe-add">
|
<div class="fe-add">
|
||||||
<input type="text" id="feTaskInput" placeholder="Add a task to resolve this flag…" onkeydown="if(event.key==='Enter') addFlagTask()">
|
<input type="text" id="feTaskInput" placeholder="Add a task to resolve this flag…" onkeydown="if(event.key==='Enter') addFlagTask()">
|
||||||
|
|
@ -703,16 +683,15 @@
|
||||||
<div>
|
<div>
|
||||||
<h1>UAT Outreach Tracker</h1>
|
<h1>UAT Outreach Tracker</h1>
|
||||||
<div class="sub" id="loadLabel">Stories to reach out about for UAT testing</div>
|
<div class="sub" id="loadLabel">Stories to reach out about for UAT testing</div>
|
||||||
<div class="sub roadsyn" id="roadmapSyncNote" style="display:none"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<select id="statusFilter">
|
<select id="statusFilter">
|
||||||
<option value="">All statuses</option>
|
<option value="">All statuses</option>
|
||||||
<option value="0">Not reached out</option>
|
<option value="0">☐ Not reached out</option>
|
||||||
<option value="1">Reached out</option>
|
<option value="1">📤 Reached out</option>
|
||||||
<option value="2">Waiting on response</option>
|
<option value="2">⏳ Waiting on response</option>
|
||||||
<option value="3">Approved</option>
|
<option value="3">✅ Approved</option>
|
||||||
<option value="4">On hold</option>
|
<option value="4">⏸ On hold</option>
|
||||||
</select>
|
</select>
|
||||||
<select id="stateFilter">
|
<select id="stateFilter">
|
||||||
<option value="">All ticket states</option>
|
<option value="">All ticket states</option>
|
||||||
|
|
@ -724,15 +703,15 @@
|
||||||
<label class="filebtn" title="Restore statuses from a backup JSON">Restore
|
<label class="filebtn" title="Restore statuses from a backup JSON">Restore
|
||||||
<input type="file" id="restoreInput" accept=".json,application/json">
|
<input type="file" id="restoreInput" accept=".json,application/json">
|
||||||
</label>
|
</label>
|
||||||
<label class="filebtn">Load weekly CSV
|
<label class="filebtn">📂 Load weekly CSV
|
||||||
<input type="file" id="csvInput" accept=".csv,text/csv">
|
<input type="file" id="csvInput" accept=".csv,text/csv">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</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 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" onclick="toggleSiteFrozen(NEXT_FREEZE.site)" title="Click to toggle code freeze status"></div>
|
<div class="uat-banner" id="uatBanner" style="display:none"></div>
|
||||||
<div class="launch-cards" id="launchCards"></div>
|
<div class="launch-cards" id="launchCards"></div>
|
||||||
|
|
||||||
<div class="summary">
|
<div class="summary">
|
||||||
|
|
@ -756,7 +735,7 @@
|
||||||
|
|
||||||
<div id="list"></div>
|
<div id="list"></div>
|
||||||
|
|
||||||
<footer>Click the code-freeze banner (top) or a site's launch card to mark that launch's code FROZEN (blue) or unfrozen (orange) — the status sticks in this browser. Click any launch date to set an out-of-cadence launch date (leave blank to restore the cadence date; the freeze follows 4 days earlier). Use − on any ticket to set it aside under "Not needing test yet" (bring it back with ↩). 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). The day's CSV upload is remembered in this browser until the next day. Use Backup/Restore to move or safeguard your data.</footer>
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -769,7 +748,7 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-head">
|
<div class="card-head">
|
||||||
<div>
|
<div>
|
||||||
<h2>Web Alignment Team — bring up at Monday's sync</h2>
|
<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 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>
|
</div>
|
||||||
<button class="mini-btn" onclick="waClearCovered()" title="Remove all covered items">Clear covered</button>
|
<button class="mini-btn" onclick="waClearCovered()" title="Remove all covered items">Clear covered</button>
|
||||||
|
|
@ -918,7 +897,7 @@ function renderDaily() {
|
||||||
const wrap = document.getElementById("dailyList");
|
const wrap = document.getElementById("dailyList");
|
||||||
wrap.innerHTML = "";
|
wrap.innerHTML = "";
|
||||||
if (!daily.length) {
|
if (!daily.length) {
|
||||||
wrap.innerHTML = '<div class="empty">Nothing yet — add your tasks for today below</div>';
|
wrap.innerHTML = '<div class="empty">Nothing yet — add your tasks for today below 👇</div>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
daily.forEach((t, i) => {
|
daily.forEach((t, i) => {
|
||||||
|
|
@ -976,7 +955,7 @@ function renderTomorrow() {
|
||||||
const head = document.createElement("div");
|
const head = document.createElement("div");
|
||||||
head.className = "subhead";
|
head.className = "subhead";
|
||||||
head.style.marginTop = "12px";
|
head.style.marginTop = "12px";
|
||||||
head.innerHTML = `Tomorrow <span style="font-weight:500;text-transform:none;letter-spacing:0;color:var(--muted)">(${tmLabel})</span>`;
|
head.innerHTML = `🌅 Tomorrow <span style="font-weight:500;text-transform:none;letter-spacing:0;color:var(--muted)">(${tmLabel})</span>`;
|
||||||
const count = document.createElement("span");
|
const count = document.createElement("span");
|
||||||
count.className = "count"; count.textContent = tomorrow.length;
|
count.className = "count"; count.textContent = tomorrow.length;
|
||||||
head.appendChild(count);
|
head.appendChild(count);
|
||||||
|
|
@ -1067,7 +1046,7 @@ function renderFlags() {
|
||||||
wrap.innerHTML = "";
|
wrap.innerHTML = "";
|
||||||
const open = flags.filter(f => !f.resolved);
|
const open = flags.filter(f => !f.resolved);
|
||||||
if (!flags.length) {
|
if (!flags.length) {
|
||||||
wrap.innerHTML = '<div class="empty">No flags yet — add anything that impacts the roadmap or your day</div>';
|
wrap.innerHTML = '<div class="empty">No flags yet — add anything that impacts the roadmap or your day 👇</div>';
|
||||||
} else {
|
} else {
|
||||||
flags.slice().reverse().forEach(f => {
|
flags.slice().reverse().forEach(f => {
|
||||||
const div = document.createElement("div");
|
const div = document.createElement("div");
|
||||||
|
|
@ -1113,7 +1092,7 @@ function renderFlags() {
|
||||||
const tc = f.tasks && f.tasks.length ? ` · ${doneN}/${f.tasks.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>`;
|
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("")
|
}).join("")
|
||||||
: '<div class="focus-empty">No open flags.</div>';
|
: '<div class="focus-empty">✅ No open flags.</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---- flag edit modal: edit flag + resolution tasks ---- */
|
/* ---- flag edit modal: edit flag + resolution tasks ---- */
|
||||||
|
|
@ -1274,7 +1253,7 @@ function renderRoadmapTodos() {
|
||||||
`<label class="item ${rdone[id]?"checked":""}" data-id="${id}">
|
`<label class="item ${rdone[id]?"checked":""}" data-id="${id}">
|
||||||
<input type="checkbox" ${rdone[id]?"checked":""}>
|
<input type="checkbox" ${rdone[id]?"checked":""}>
|
||||||
<span class="txt">${name}</span>
|
<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>
|
<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>
|
<button class="wk-badge ${bCls}" onclick="openTaskUpdate('${id}')" onmousedown="event.preventDefault()" title="Click to set status or move to another week">${bTxt}</button>
|
||||||
</label>`);
|
</label>`);
|
||||||
});
|
});
|
||||||
|
|
@ -1325,14 +1304,14 @@ function renderFocus() {
|
||||||
const done = st === "done";
|
const done = st === "done";
|
||||||
const tag = done
|
const tag = done
|
||||||
? '<span class="done-tag">✓ DONE</span>'
|
? '<span class="done-tag">✓ DONE</span>'
|
||||||
: st === "delayed" ? '<span class="delayed-tag">DELAYED</span>'
|
: st === "delayed" ? '<span class="delayed-tag">⏳ DELAYED</span>'
|
||||||
: (st === "inprog" || t.ongoing) ? '<span class="inprog-tag">▶ IN PROGRESS</span>'
|
: (st === "inprog" || t.ongoing) ? '<span class="inprog-tag">▶ IN PROGRESS</span>'
|
||||||
: '<span class="due-tag">DUE</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">
|
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>`;
|
<span class="sw" style="background:${t.color}"></span><span class="chip-name">${t.name}</span>${tag}</span>`;
|
||||||
}).join("");
|
}).join("");
|
||||||
} else {
|
} else {
|
||||||
dueWrap.innerHTML = '<div class="focus-empty">No roadmap tasks due this week.</div>';
|
dueWrap.innerHTML = '<div class="focus-empty">✅ No roadmap tasks due this week.</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
const up = ALL_TASKS
|
const up = ALL_TASKS
|
||||||
|
|
@ -1345,7 +1324,7 @@ function renderFocus() {
|
||||||
const done = st === "done";
|
const done = st === "done";
|
||||||
const tag = done
|
const tag = done
|
||||||
? '<span class="done-tag">✓ DONE</span>'
|
? '<span class="done-tag">✓ DONE</span>'
|
||||||
: st === "delayed" ? `<span class="delayed-tag">DELAYED · WK ${t.wk}</span>`
|
: st === "delayed" ? `<span class="delayed-tag">⏳ DELAYED · WK ${t.wk}</span>`
|
||||||
: st === "inprog" ? `<span class="inprog-tag">▶ IN PROGRESS · WK ${t.wk}</span>`
|
: st === "inprog" ? `<span class="inprog-tag">▶ IN PROGRESS · WK ${t.wk}</span>`
|
||||||
: `<span class="soon-tag">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">
|
return `<span class="chip upcoming${done?" done":""}" onclick="openTaskUpdate('${t.id}')" title="Click to set status or move this task">
|
||||||
|
|
@ -1604,8 +1583,8 @@ function renderGantt() {
|
||||||
const noteBadge = hasNote ? "<span class='bar-note'>✎</span>" : "";
|
const noteBadge = hasNote ? "<span class='bar-note'>✎</span>" : "";
|
||||||
const stTip = st === "delayed" ? " — DELAYED" : (st === "inprog" ? " — in progress" : (st === "done" ? " — complete" : ""));
|
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 tip = ongoing ? (" — in progress since WK " + wk) : (wk ? (" — WK " + wk) : " (unscheduled)") + stTip;
|
||||||
const stMark = st === "delayed" ? " DELAYED" : (st === "inprog" && !ongoing ? " ▶" : "");
|
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>`;
|
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++) {
|
for (let w = s; w <= e; w++) {
|
||||||
const cellCls = `cell${w===NOW_WK?" nowcol":""}`;
|
const cellCls = `cell${w===NOW_WK?" nowcol":""}`;
|
||||||
if (ongoing && w >= wk && w <= spanEnd) {
|
if (ongoing && w >= wk && w <= spanEnd) {
|
||||||
|
|
@ -1634,7 +1613,7 @@ function renderGantt() {
|
||||||
leg += `<span><i style="background:${sec.color}"></i>${sec.name}</span>`;
|
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 style="margin-left:auto"><i style="background:#ffe9c8"></i>current week</span>`;
|
||||||
leg += `<span>✎ = has note · click any bar to add / edit</span>`;
|
leg += `<span>📝 = has note · click any bar to add / edit</span>`;
|
||||||
document.getElementById("legend").innerHTML = leg;
|
document.getElementById("legend").innerHTML = leg;
|
||||||
}
|
}
|
||||||
renderGantt();
|
renderGantt();
|
||||||
|
|
@ -1751,115 +1730,20 @@ function upcomingLaunches(ordinals, count) {
|
||||||
const mm = m % 12;
|
const mm = m % 12;
|
||||||
for (const n of ordinals) {
|
for (const n of ordinals) {
|
||||||
const launch = nthTuesday(y, mm, n);
|
const launch = nthTuesday(y, mm, n);
|
||||||
if (launch >= UAT_NOW) out.push({ launch, freeze: new Date(launch.getTime() - 4 * 86400000), pos: out.length + 1 });
|
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);
|
return out.sort((a, b) => a.launch - b.launch).slice(0, count);
|
||||||
}
|
}
|
||||||
let RDNS_LAUNCHES = [];
|
const RDNS_LAUNCHES = upcomingLaunches([2, 4], 3);
|
||||||
let BT_LAUNCHES = [];
|
const BT_LAUNCHES = upcomingLaunches([3], 3);
|
||||||
const fmtD = d => d.toLocaleDateString(undefined, { weekday: "short", month: "short", day: "numeric" });
|
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 fmtDy = d => d.toLocaleDateString(undefined, { month: "short", day: "numeric", year: "numeric" });
|
||||||
const daysUntil = d => Math.round((d - UAT_NOW) / 86400000);
|
const daysUntil = d => Math.round((d - UAT_NOW) / 86400000);
|
||||||
|
|
||||||
// ---------- Out-of-cadence launch overrides ----------
|
|
||||||
// { site: { position(1-based): "YYYY-MM-DD" } } — per site, per launch slot.
|
|
||||||
const LAUNCH_OVR_KEY = "smh-launch-overrides-v1";
|
|
||||||
function loadLaunchOverrides() {
|
|
||||||
try { return JSON.parse(localStorage.getItem(LAUNCH_OVR_KEY) || "{}"); } catch { return {}; }
|
|
||||||
}
|
|
||||||
function saveLaunchOverrides(o) { localStorage.setItem(LAUNCH_OVR_KEY, JSON.stringify(o)); }
|
|
||||||
function parseLaunchDate(s) {
|
|
||||||
s = (s || "").trim();
|
|
||||||
let m = s.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);
|
|
||||||
if (m) return new Date(+m[1], +m[2] - 1, +m[3]);
|
|
||||||
m = s.match(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})$/);
|
|
||||||
if (m) { let y = +m[3]; if (y < 100) y += 2000; return new Date(y, +m[1] - 1, +m[2]); }
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
let NEXT_FREEZE = null;
|
|
||||||
function refreshLaunches() {
|
|
||||||
const ov = loadLaunchOverrides();
|
|
||||||
const apply = (site, list) => list.map(l => {
|
|
||||||
const raw = ov[site] && ov[site][l.pos];
|
|
||||||
const d = raw ? parseLaunchDate(raw) : null;
|
|
||||||
if (d && !isNaN(d.getTime())) {
|
|
||||||
d.setHours(0, 0, 0, 0);
|
|
||||||
return { ...l, launch: d, freeze: new Date(d.getTime() - 4 * 86400000), adjusted: true };
|
|
||||||
}
|
|
||||||
return l;
|
|
||||||
}).sort((a, b) => a.launch - b.launch);
|
|
||||||
RDNS_LAUNCHES = apply("RNDSystems", upcomingLaunches([2, 4], 3));
|
|
||||||
BT_LAUNCHES = apply("BT", upcomingLaunches([3], 3));
|
|
||||||
// global next freeze (whichever comes first)
|
// global next freeze (whichever comes first)
|
||||||
const r = RDNS_LAUNCHES[0], b = BT_LAUNCHES[0];
|
const NEXT_FREEZE = RDNS_LAUNCHES[0].freeze < BT_LAUNCHES[0].freeze
|
||||||
NEXT_FREEZE = r.freeze < b.freeze ? { ...r, site: "RNDSystems" } : { ...b, site: "BT" };
|
? { ...RDNS_LAUNCHES[0], site: "RNDSystems" }
|
||||||
}
|
: { ...BT_LAUNCHES[0], site: "BT" };
|
||||||
refreshLaunches();
|
|
||||||
function editLaunch(ev, site, pos) {
|
|
||||||
ev.stopPropagation();
|
|
||||||
const list = site === "RNDSystems" ? RDNS_LAUNCHES : BT_LAUNCHES;
|
|
||||||
const cur = list[pos - 1];
|
|
||||||
if (!cur) return;
|
|
||||||
const inp = prompt(
|
|
||||||
`${site} — this slot currently shows launch ${fmtDy(cur.launch)}${cur.adjusted ? " (adjusted from cadence)" : " (cadence)"}.\nEnter a new launch date (e.g. 10/28/2026), or leave blank to restore the cadence date. The freeze follows (4 days earlier).`,
|
|
||||||
""
|
|
||||||
);
|
|
||||||
if (inp === null) return;
|
|
||||||
const ov = loadLaunchOverrides();
|
|
||||||
ov[site] = ov[site] || {};
|
|
||||||
const val = inp.trim();
|
|
||||||
if (val) {
|
|
||||||
const d = parseLaunchDate(val);
|
|
||||||
if (!d || isNaN(d.getTime())) { alert("Couldn't read that date — try 10/28/2026 or 2026-10-28."); return; }
|
|
||||||
ov[site][pos] = d.getFullYear() + "-" + String(d.getMonth() + 1).padStart(2, "0") + "-" + String(d.getDate()).padStart(2, "0");
|
|
||||||
} else {
|
|
||||||
delete ov[site][pos];
|
|
||||||
if (!Object.keys(ov[site]).length) delete ov[site];
|
|
||||||
}
|
|
||||||
saveLaunchOverrides(ov);
|
|
||||||
refreshLaunches();
|
|
||||||
uatRender();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- Code-frozen status tile (click to toggle) ----------
|
|
||||||
const FROZEN_KEY = "smh-code-frozen-v2";
|
|
||||||
let frozenState = { RNDSystems: false, BT: false };
|
|
||||||
try {
|
|
||||||
const saved = JSON.parse(localStorage.getItem(FROZEN_KEY) || "null");
|
|
||||||
if (saved) {
|
|
||||||
frozenState.RNDSystems = !!saved.RNDSystems;
|
|
||||||
frozenState.BT = !!saved.BT;
|
|
||||||
} else if (JSON.parse(localStorage.getItem("smh-code-frozen-v1") || "false") === true) {
|
|
||||||
// one-time migration from the old global flag
|
|
||||||
frozenState[NEXT_FREEZE.site] = true;
|
|
||||||
localStorage.setItem(FROZEN_KEY, JSON.stringify(frozenState));
|
|
||||||
localStorage.removeItem("smh-code-frozen-v1");
|
|
||||||
}
|
|
||||||
} catch {}
|
|
||||||
function isFrozen(site) { return !!frozenState[site]; }
|
|
||||||
function saveFrozen() { localStorage.setItem(FROZEN_KEY, JSON.stringify(frozenState)); }
|
|
||||||
function toggleSiteFrozen(site) {
|
|
||||||
frozenState[site] = !frozenState[site];
|
|
||||||
saveFrozen();
|
|
||||||
uatRender();
|
|
||||||
}
|
|
||||||
function renderFreezeBanner() {
|
|
||||||
const bf = document.getElementById("uatBanner");
|
|
||||||
if (!bf) return;
|
|
||||||
const site = NEXT_FREEZE.site;
|
|
||||||
bf.style.display = "flex";
|
|
||||||
if (isFrozen(site)) {
|
|
||||||
bf.classList.add("frozen");
|
|
||||||
bf.innerHTML = `<span>Code is <b>FROZEN</b> for ${escUat(site)} — launch ${fmtD(NEXT_FREEZE.launch)}</span>
|
|
||||||
<span class="b-sub">no more code changes · click the tile to unfreeze</span>`;
|
|
||||||
} else {
|
|
||||||
bf.classList.remove("frozen");
|
|
||||||
const n = daysUntil(NEXT_FREEZE.freeze);
|
|
||||||
bf.innerHTML = `<span>${escUat(site)} code is <b>unfrozen</b> · freeze: <b>${fmtD(NEXT_FREEZE.freeze)} at 10:00 AM</b> (${n < 0 ? "already passed" : n === 0 ? "TODAY" : n + " day" + (n === 1 ? "" : "s") + " from now"})</span>
|
|
||||||
<span class="b-sub">→ launch ${fmtD(NEXT_FREEZE.launch)} · make sure testers are booked & approved stories are ready · click the tile (or the site card) to mark code frozen</span>`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- Grouping (by launch cycle) ----------
|
// ---------- Grouping (by launch cycle) ----------
|
||||||
function siteOf(t) {
|
function siteOf(t) {
|
||||||
|
|
@ -1872,21 +1756,19 @@ function siteOf(t) {
|
||||||
}
|
}
|
||||||
const SITE_ORDER = { "RNDSystems": 10, "BT": 11, "WMS": 12, "SBD": 13 };
|
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"];
|
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 };
|
||||||
|
|
||||||
// ---------- Removed tickets (the − button on each row) ----------
|
// "sent to bottom" memory (order matters — the order you sent them down)
|
||||||
const REMOVED_KEY = "uat-outreach-removed-v1";
|
const BOTTOM_KEY = "uat-outreach-bottom-v1";
|
||||||
let removedTickets = [];
|
let bottomOrder = [];
|
||||||
try { removedTickets = JSON.parse(localStorage.getItem(REMOVED_KEY) || "[]"); } catch { removedTickets = []; }
|
try { bottomOrder = JSON.parse(localStorage.getItem(BOTTOM_KEY) || "[]"); } catch { bottomOrder = []; }
|
||||||
function saveRemoved() { localStorage.setItem(REMOVED_KEY, JSON.stringify(removedTickets)); }
|
function saveBottom() { localStorage.setItem(BOTTOM_KEY, JSON.stringify(bottomOrder)); }
|
||||||
function removeTicket(id) {
|
function moveBottom(id) {
|
||||||
if (!confirm(`Move ${id} to the "not needing test yet" list?\n\nIt drops out of the main queue and the counts, but its outreach status is kept — bring it back any time with the ↩ button.`)) return;
|
if (bottomOrder.includes(id)) bottomOrder = bottomOrder.filter(x => x !== id);
|
||||||
if (!removedTickets.includes(id)) removedTickets.push(id);
|
else bottomOrder.push(id);
|
||||||
saveRemoved();
|
saveBottom();
|
||||||
uatRender();
|
|
||||||
}
|
|
||||||
function restoreTicket(id) {
|
|
||||||
removedTickets = removedTickets.filter(x => x !== id);
|
|
||||||
saveRemoved();
|
|
||||||
uatRender();
|
uatRender();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1904,9 +1786,8 @@ let showHidden = false;
|
||||||
const isVisibleState = t => !HARD_EXCLUDED.has(t.state) && (showHidden || !IGNORED_STATES.has(t.state));
|
const isVisibleState = t => !HARD_EXCLUDED.has(t.state) && (showHidden || !IGNORED_STATES.has(t.state));
|
||||||
|
|
||||||
function populateFilters() {
|
function populateFilters() {
|
||||||
const tracked = tickets.filter(t => !removedTickets.includes(t.ticket));
|
const states = [...new Set(tickets.map(t => t.state).filter(s => s && !HARD_EXCLUDED.has(s) && (showHidden || !IGNORED_STATES.has(s))))].sort();
|
||||||
const states = [...new Set(tracked.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 epics = [...new Set(tracked.map(t => t.epic).filter(Boolean))].sort();
|
|
||||||
const prevState = els.stateFilter.value;
|
const prevState = els.stateFilter.value;
|
||||||
const prevEpic = els.epicFilter.value;
|
const prevEpic = els.epicFilter.value;
|
||||||
els.stateFilter.innerHTML = '<option value="">All ticket states</option>' +
|
els.stateFilter.innerHTML = '<option value="">All ticket states</option>' +
|
||||||
|
|
@ -1923,7 +1804,6 @@ function visibleTickets() {
|
||||||
const ep = els.epicFilter.value;
|
const ep = els.epicFilter.value;
|
||||||
const q = els.search.value.trim().toLowerCase();
|
const q = els.search.value.trim().toLowerCase();
|
||||||
return tickets.filter(t => {
|
return tickets.filter(t => {
|
||||||
if (removedTickets.includes(t.ticket)) return false;
|
|
||||||
if (!isVisibleState(t)) return false;
|
if (!isVisibleState(t)) return false;
|
||||||
if (hideApproved && uatStatusOf(t) === 3 && sf === "") return false;
|
if (hideApproved && uatStatusOf(t) === 3 && sf === "") return false;
|
||||||
if (sf !== "" && uatStatusOf(t) !== Number(sf)) return false;
|
if (sf !== "" && uatStatusOf(t) !== Number(sf)) return false;
|
||||||
|
|
@ -1946,7 +1826,7 @@ function uatRender() {
|
||||||
|
|
||||||
// summary (counts over all tickets)
|
// summary (counts over all tickets)
|
||||||
const counts = [0, 0, 0, 0, 0];
|
const counts = [0, 0, 0, 0, 0];
|
||||||
const active = tickets.filter(t => !removedTickets.includes(t.ticket) && isVisibleState(t));
|
const active = tickets.filter(t => isVisibleState(t));
|
||||||
active.forEach(t => counts[uatStatusOf(t)]++);
|
active.forEach(t => counts[uatStatusOf(t)]++);
|
||||||
for (let i = 0; i < 5; i++) document.getElementById("cnt" + i).textContent = counts[i];
|
for (let i = 0; i < 5; i++) document.getElementById("cnt" + i).textContent = counts[i];
|
||||||
const done = counts[3], total = active.length;
|
const done = counts[3], total = active.length;
|
||||||
|
|
@ -1955,64 +1835,57 @@ function uatRender() {
|
||||||
document.getElementById("progLabel").textContent =
|
document.getElementById("progLabel").textContent =
|
||||||
total ? `${done} of ${total} approved (${pct}%) · ${counts[2]} waiting on a response` : "";
|
total ? `${done} of ${total} approved (${pct}%) · ${counts[2]} waiting on a response` : "";
|
||||||
|
|
||||||
// freeze banner (top of page) — click to toggle frozen / unfrozen
|
// freeze banner (top of page)
|
||||||
renderFreezeBanner();
|
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
|
// launch calendar cards
|
||||||
const lc = document.getElementById("launchCards");
|
const lc = document.getElementById("launchCards");
|
||||||
if (lc) {
|
if (lc) {
|
||||||
const siteCount = s => vis.filter(t => t.site === s).length;
|
const siteCount = s => vis.filter(t => t.site === s).length;
|
||||||
const card = (name, rule, site, launches, count) => {
|
const card = (name, rule, launches, count) => {
|
||||||
const hot = daysUntil(launches[0].freeze) <= 7;
|
const hot = daysUntil(launches[0].freeze) <= 7;
|
||||||
const fr = isFrozen(site);
|
return `<div class="lcard${hot ? " hot" : ""}">
|
||||||
const clickDate = (pos, d) => `<span class="ldate" onclick="editLaunch(event,'${site}',${pos})" title="Click to set an out-of-cadence launch date (blank = back to cadence)">${d}</span>`;
|
<h3>${name}</h3>
|
||||||
const adjTag = l => l.adjusted ? " <span class='ladj'>adj</span>" : "";
|
<div class="rule">${rule}</div>
|
||||||
return `<div class="lcard${hot ? " hot" : ""}${fr ? " frozen" : ""}" onclick="toggleSiteFrozen('${site}')" title="Click to toggle code freeze for ${site}">
|
<div class="lnext">🚀 ${fmtDy(launches[0].launch)} · <span class="fz">🧊 freeze ${fmtD(launches[0].freeze)} 10 AM</span></div>
|
||||||
<h3>${name}${fr ? " <span class='frozenbadge'>FROZEN</span>" : ""}</h3>
|
|
||||||
<div class="rule">${rule}${launches.some(l => l.adjusted) ? " · <span class='ladj'>adjusted below</span>" : ""}</div>
|
|
||||||
<div class="lnext">Launch ${clickDate(1, fmtDy(launches[0].launch))}${adjTag(launches[0])} · <span class="fz">${fr ? "code FROZEN — no more changes" : "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="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, i) => clickDate(i + 2, fmtD(l.launch)) + adjTag(l)).join(" · ")}</div>
|
<div class="lmore">then ${launches.slice(1).map(l => fmtD(l.launch)).join(" · ")}</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
};
|
};
|
||||||
const both = [ { name: "RNDSystems", rule: "launches 2nd & 4th Tuesday", site: "RNDSystems", launches: RDNS_LAUNCHES, count: siteCount("RNDSystems") },
|
const both = [ { name: "🖥 RNDSystems", rule: "launches 2nd & 4th Tuesday", launches: RDNS_LAUNCHES, count: siteCount("RNDSystems") },
|
||||||
{ name: "BT", rule: "launches 3rd Tuesday", site: "BT", launches: BT_LAUNCHES, count: siteCount("BT") } ]
|
{ name: "🧬 BT", rule: "launches 3rd Tuesday", launches: BT_LAUNCHES, count: siteCount("BT") } ]
|
||||||
.sort((a, b) => a.launches[0].launch - b.launches[0].launch);
|
.sort((a, b) => a.launches[0].launch - b.launches[0].launch);
|
||||||
lc.innerHTML = both.map(c => card(c.name, c.rule, c.site, c.launches, c.count)).join("");
|
lc.innerHTML = both.map(c => card(c.name, c.rule, c.launches, c.count)).join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
// "not needing test yet" list (set aside with the − button)
|
|
||||||
const removedVis = tickets
|
|
||||||
.filter(t => removedTickets.includes(t.ticket) && !HARD_EXCLUDED.has(t.state))
|
|
||||||
.sort((a, b) => (SITE_ORDER[siteOf(a)] ?? 98) - (SITE_ORDER[siteOf(b)] ?? 98) || a.ticket.localeCompare(b.ticket));
|
|
||||||
const notNeededSummary = removedVis.length
|
|
||||||
? `<div class="section secbody notneeded">
|
|
||||||
<div class="section-head">
|
|
||||||
<div class="bsec">
|
|
||||||
<span style="font-size:13px;font-weight:700;letter-spacing:.05em;text-transform:uppercase">Not needing test yet</span>
|
|
||||||
<span class="bsub">set aside from the test queue</span>
|
|
||||||
<span class="count">${removedVis.length} ticket${removedVis.length === 1 ? "" : "s"}</span></div></div>
|
|
||||||
${removedVis.map(t => `<div class="rowwrap">
|
|
||||||
<button class="restorebtn" data-restore="${escUat(t.ticket)}" title="Bring back to the test queue">↩</button>
|
|
||||||
<div class="row">
|
|
||||||
<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"><span class="tag">${escUat(t.state) || "—"}</span></span>
|
|
||||||
</div>
|
|
||||||
</div>`).join("")}
|
|
||||||
</div>`
|
|
||||||
: "";
|
|
||||||
|
|
||||||
if (!vis.length) {
|
if (!vis.length) {
|
||||||
els.list.innerHTML = (tickets.length
|
els.list.innerHTML = tickets.length
|
||||||
? '<div class="uempty">No tickets match the current filters.</div>'
|
? '<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>') + notNeededSummary;
|
: '<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();
|
updateUatBadge();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep tickets in the order the CSV loaded them — changing a status never moves a ticket
|
// priority sort inside a section: normal order first, "sent to bottom" tickets last
|
||||||
const cmp = () => 0;
|
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 =>
|
const bucketLaunch = site =>
|
||||||
site === "RNDSystems" ? RDNS_LAUNCHES[0] : (site === "BT" ? BT_LAUNCHES[0] : null);
|
site === "RNDSystems" ? RDNS_LAUNCHES[0] : (site === "BT" ? BT_LAUNCHES[0] : null);
|
||||||
|
|
@ -2027,37 +1900,29 @@ function uatRender() {
|
||||||
const nextSite = withLaunch[0] || null;
|
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 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, removed) => {
|
const row = t => {
|
||||||
const s = uatStatusOf(t);
|
const s = uatStatusOf(t);
|
||||||
const btnLabels = ["Reached out", "Waiting", "Approved"];
|
const btnLabels = ["Reached out", "Waiting", "Approved"];
|
||||||
const isUAT = /^UAT/i.test(t.state || "");
|
const isUAT = /^UAT/i.test(t.state || "");
|
||||||
|
const isBottom = bottomOrder.includes(t.ticket);
|
||||||
return `<div class="rowwrap">
|
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="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>
|
||||||
${removed
|
<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>
|
||||||
? `<button class="restorebtn" data-restore="${escUat(t.ticket)}" title="Bring back to the test queue">↩</button>`
|
<div class="row st-${s}${isBottom ? " dimmed" : ""}" data-ticket="${escUat(t.ticket)}">
|
||||||
: `<button class="removebtn" data-remove="${escUat(t.ticket)}" title="Not needing test yet — move to the set-aside list">−</button>`}
|
|
||||||
<div class="row st-${s}" data-ticket="${escUat(t.ticket)}">
|
|
||||||
<span class="ticket" title="${escUat(t.ticket)}">${escUat(t.ticket)}</span>
|
<span class="ticket" title="${escUat(t.ticket)}">${escUat(t.ticket)}</span>
|
||||||
<span class="desc" title="${escUat(t.desc)}">${escUat(t.desc) || "—"}</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 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 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="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">
|
<span class="status-btns">
|
||||||
${isUAT
|
${[1, 2, 3].map(i =>
|
||||||
? [1, 2, 3].map(i => {
|
`<button class="sbtn${i === s ? " on" : ""}" data-s="${i}" data-ticket="${escUat(t.ticket)}">${btnLabels[i - 1]}</button>`
|
||||||
const on = i === s;
|
).join("")}
|
||||||
const c = { 1: "#4a6cf7", 2: "#d98b0b", 3: "#22a45d" }[i];
|
|
||||||
return `<button class="sbtn${on ? " on" : ""}" style="${on ? `background:${c};border-color:${c};color:#fff;font-weight:700` : ""}" data-s="${i}" data-ticket="${escUat(t.ticket)}">${btnLabels[i - 1]}</button>`;
|
|
||||||
}).join("")
|
|
||||||
: (s >= 1 && s <= 3
|
|
||||||
? (() => { const c = { 1: "#e8edff", 2: "#fdf3df", 3: "#e4f6ec" }[s], b = { 1: "#4a6cf7", 2: "#d98b0b", 3: "#22a45d" }[s], t2 = { 1: "#2f4fd0", 2: "#9a6206", 3: "#1a7a45" }[s];
|
|
||||||
return `<span class="st-ghost" style="background:${c};border:1.5px solid ${b};color:${t2};font-weight:700" title="Story is not in UAT state — options appear once it's in UAT">${btnLabels[s - 1]}</span>`; })()
|
|
||||||
: `<span style="color:var(--muted)">—</span>`)}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
${(isUAT || t.note) ? `
|
${(isUAT || t.note) ? `
|
||||||
<div class="uat-line">
|
<div class="uat-line">
|
||||||
<button class="mini" data-note="${escUat(t.ticket)}">${t.note ? "Edit feedback note" : "Add feedback note"}</button>
|
<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>` : ""}
|
${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>` : ""}
|
${t.note ? `<span class="notetext" title="${escUat(t.note)}">“${escUat(t.note)}”</span>` : ""}
|
||||||
</div>` : ""}
|
</div>` : ""}
|
||||||
|
|
@ -2069,54 +1934,45 @@ function uatRender() {
|
||||||
if (!list.length) return "";
|
if (!list.length) return "";
|
||||||
const launch = bucketLaunch(site);
|
const launch = bucketLaunch(site);
|
||||||
let head = `<div class="section-head">
|
let head = `<div class="section-head">
|
||||||
<div class="bsec">
|
<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>' : ""}`;
|
<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) {
|
if (launch) {
|
||||||
const n = daysUntil(launch.launch);
|
const n = daysUntil(launch.launch);
|
||||||
const cls = n <= 7 ? "urgent" : (n <= 21 ? "soon" : "later");
|
const cls = n <= 7 ? "urgent" : (n <= 21 ? "soon" : "later");
|
||||||
head += `<span class="blaunch">→ launch ${fmtDy(launch.launch)}</span>
|
head += `<span class="blaunch">→ launch ${fmtDy(launch.launch)}</span>
|
||||||
<span class="bfreeze">${isFrozen(site) ? "code FROZEN — no more changes" : "freeze " + fmtD(launch.freeze) + " · 10 AM"}</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="bdays ${cls}">${n === 0 ? "LAUNCH TODAY" : n + " day" + (n === 1 ? "" : "s") + " out"}</span>
|
||||||
<span class="bsub">${siteRule[site]}</span>`;
|
<span class="bsub">${siteRule[site]}</span>`;
|
||||||
} else {
|
} else {
|
||||||
head += `<span class="bsub">no launch cycle tracked here — keep as a separate queue</span>`;
|
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>`;
|
head += `<span class="count">${list.length} ticket${list.length === 1 ? "" : "s"}</span></div></div>`;
|
||||||
return `<div class="section secbody${site === nextSite ? " next" : ""}${isFrozen(site) ? " frozen" : ""}">
|
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}
|
${head}
|
||||||
${colhead}
|
${colhead}
|
||||||
${list.map(t => row(t)).join("")}
|
${main}
|
||||||
|
${bot}
|
||||||
</div>`;
|
</div>`;
|
||||||
};
|
};
|
||||||
|
|
||||||
// full "not needing test yet" section (needs colhead + row, so built here)
|
els.list.innerHTML = keys.map(section).join("");
|
||||||
const notNeeded = removedVis.length
|
|
||||||
? `<div class="section secbody notneeded">
|
|
||||||
<div class="section-head">
|
|
||||||
<div class="bsec">
|
|
||||||
<span style="font-size:13px;font-weight:700;letter-spacing:.05em;text-transform:uppercase">Not needing test yet</span>
|
|
||||||
<span class="bsub">set aside from the test queue · click ↩ to bring one back</span>
|
|
||||||
<span class="count">${removedVis.length} ticket${removedVis.length === 1 ? "" : "s"}</span></div></div>
|
|
||||||
${colhead}
|
|
||||||
${removedVis.map(t => row(t, true)).join("")}
|
|
||||||
</div>`
|
|
||||||
: "";
|
|
||||||
|
|
||||||
els.list.innerHTML = keys.map(section).join("") + notNeeded;
|
|
||||||
updateUatBadge();
|
updateUatBadge();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateUatBadge() {
|
function updateUatBadge() {
|
||||||
const b = document.getElementById("uatBadge");
|
const b = document.getElementById("uatBadge");
|
||||||
if (!b) return;
|
if (!b) return;
|
||||||
if (!tickets.length) { b.textContent = ""; b.style.display = "none"; return; }
|
if (!tickets.length) { b.textContent = "🚀"; return; }
|
||||||
const action = tickets.filter(t => {
|
const action = tickets.filter(t => {
|
||||||
if (removedTickets.includes(t.ticket)) return false;
|
|
||||||
const s = siteOf(t);
|
const s = siteOf(t);
|
||||||
return isVisibleState(t) && (s === "RNDSystems" || s === "BT") && uatStatusOf(t) === 0;
|
return isVisibleState(t) && (s === "RNDSystems" || s === "BT") && uatStatusOf(t) === 0;
|
||||||
}).length;
|
}).length;
|
||||||
b.textContent = action > 0 ? `${action}` : "";
|
b.textContent = action > 0 ? `⚠ ${action}` : "🚀";
|
||||||
b.style.display = action > 0 ? "" : "none";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- Events ----------
|
// ---------- Events ----------
|
||||||
|
|
@ -2126,10 +1982,8 @@ els.list.addEventListener("click", e => {
|
||||||
if (editable) { startEdit(editable); return; }
|
if (editable) { startEdit(editable); return; }
|
||||||
const noteBtn = e.target.closest("[data-note]");
|
const noteBtn = e.target.closest("[data-note]");
|
||||||
if (noteBtn) { startNoteEdit(noteBtn); return; }
|
if (noteBtn) { startNoteEdit(noteBtn); return; }
|
||||||
const rmBtn = e.target.closest("[data-remove]");
|
const botBtn = e.target.closest("[data-bottom]");
|
||||||
if (rmBtn) { removeTicket(rmBtn.dataset.remove); return; }
|
if (botBtn) { moveBottom(botBtn.dataset.bottom); return; }
|
||||||
const rsBtn = e.target.closest("[data-restore]");
|
|
||||||
if (rsBtn) { restoreTicket(rsBtn.dataset.restore); return; }
|
|
||||||
const holdBtn = e.target.closest("[data-hold]");
|
const holdBtn = e.target.closest("[data-hold]");
|
||||||
if (holdBtn) {
|
if (holdBtn) {
|
||||||
const id = holdBtn.dataset.hold;
|
const id = holdBtn.dataset.hold;
|
||||||
|
|
@ -2312,69 +2166,6 @@ document.getElementById("restoreInput").addEventListener("change", e => {
|
||||||
e.target.value = "";
|
e.target.value = "";
|
||||||
});
|
});
|
||||||
|
|
||||||
// ---------- Roadmap auto-sync from the weekly CSV ----------
|
|
||||||
// If a ticket is actively being worked (state = Work in Progress / Peer Review /
|
|
||||||
// QA Testing / UAT Testing) and its text points at a roadmap task, mark that
|
|
||||||
// roadmap task as in progress. Manual roadmap statuses are never overwritten.
|
|
||||||
const ROADMAP_WORK_STATES = new Set(["Work in Progress", "Peer Review", "QA Testing", "UAT Testing"]);
|
|
||||||
const STOPWORDS = new Set(["a","an","the","and","or","for","to","of","in","on","is","are","was","be","by","at","as","it","its","with","via","from","into","upon","per","rd","rnd","rndsystems"]);
|
|
||||||
function tokenize(s) {
|
|
||||||
return (s || "").toLowerCase().replace(/[^a-z0-9\s]/g, " ")
|
|
||||||
.split(/\s+/).filter(w => w.length >= 4 && !STOPWORDS.has(w));
|
|
||||||
}
|
|
||||||
function matchRoadmapTask(text, task) {
|
|
||||||
const flat = " " + text.toLowerCase().replace(/[^a-z0-9\s]/g, " ") + " ";
|
|
||||||
const phrase = " " + task.name.toLowerCase().replace(/[^a-z0-9\s]/g, " ") + " ";
|
|
||||||
if (task.name.length >= 6 && flat.includes(phrase)) return 100; // task name appears as a phrase
|
|
||||||
const hay = new Set(tokenize(text));
|
|
||||||
const nameTokens = tokenize(task.name);
|
|
||||||
if (!nameTokens.length) return 0;
|
|
||||||
let shared = 0, strong = 0;
|
|
||||||
for (const w of nameTokens) {
|
|
||||||
if (hay.has(w)) { shared++; if (w.length >= 6) strong++; }
|
|
||||||
}
|
|
||||||
if (strong >= 2) return 30 + strong * 5 + shared; // two distinctive words
|
|
||||||
if (shared >= 2 && strong >= 1) return 15 + shared * 3 + strong; // a strong word + another match
|
|
||||||
if (strong === 1 && shared === 1 && nameTokens[0].length >= 7) return 8; // one very distinctive word
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
function roadmapTasks() {
|
|
||||||
const out = [];
|
|
||||||
DATA.forEach((p, pi) => p.sections.forEach((sec, si) => sec.tasks.forEach(([name, wk], ti) => {
|
|
||||||
out.push({ id: `${pi}-${si}-${ti}`, name, section: sec.name, project: p.project });
|
|
||||||
})));
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
function syncRoadmapFromTickets() {
|
|
||||||
const note = document.getElementById("roadmapSyncNote");
|
|
||||||
if (!note || typeof setStatus !== "function") return [];
|
|
||||||
const working = tickets.filter(t => ROADMAP_WORK_STATES.has(t.state));
|
|
||||||
const tasks = roadmapTasks();
|
|
||||||
const updates = [];
|
|
||||||
for (const t of working) {
|
|
||||||
const text = `${t.desc || ""} ${t.epic || ""}`;
|
|
||||||
let best = null, bestScore = 0;
|
|
||||||
for (const task of tasks) {
|
|
||||||
if (statusOf(task.id)) continue; // respect manual done / inprog / delayed
|
|
||||||
const sc = matchRoadmapTask(text, task);
|
|
||||||
if (sc > bestScore) { bestScore = sc; best = task; }
|
|
||||||
}
|
|
||||||
if (best && bestScore >= 8) {
|
|
||||||
setStatus(best.id, "inprog");
|
|
||||||
updates.push(`<b>${escUat(best.project)}</b> › ${escUat(best.name)} ← ${escUat(t.ticket)} (${escUat(t.state)})`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (updates.length) {
|
|
||||||
note.style.display = "inline-block";
|
|
||||||
note.innerHTML = `Roadmap auto-updated from CSV: <b>${updates.length}</b> item${updates.length === 1 ? "" : "s"} marked in progress — ${updates.join(" · ")} <i>(click to view roadmap; manual statuses were never overwritten)</i>`;
|
|
||||||
note.onclick = () => switchTab("roadmap");
|
|
||||||
} else {
|
|
||||||
note.style.display = "none";
|
|
||||||
note.innerHTML = "";
|
|
||||||
}
|
|
||||||
return updates;
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadTickets(list, sourceLabel) {
|
function loadTickets(list, sourceLabel) {
|
||||||
// apply any local edits (tester/desc/state/dev changes) on top of the CSV data
|
// apply any local edits (tester/desc/state/dev changes) on top of the CSV data
|
||||||
rawByTicket = {};
|
rawByTicket = {};
|
||||||
|
|
@ -2385,35 +2176,16 @@ function loadTickets(list, sourceLabel) {
|
||||||
rawByTicket[clean.ticket] = clean;
|
rawByTicket[clean.ticket] = clean;
|
||||||
return { ...clean, ...(overrides[clean.ticket] || {}) };
|
return { ...clean, ...(overrides[clean.ticket] || {}) };
|
||||||
});
|
});
|
||||||
const active = tickets.filter(t => !removedTickets.includes(t.ticket) && isVisibleState(t)).length;
|
const active = tickets.filter(t => isVisibleState(t)).length;
|
||||||
const setAside = list.filter(t => removedTickets.includes(t.ticket)).length;
|
|
||||||
document.getElementById("loadLabel").textContent =
|
document.getElementById("loadLabel").textContent =
|
||||||
`${active} tickets to track (${list.length - active} not shown${setAside ? ` · ${setAside} set aside` : ""}) · ${sourceLabel}`;
|
`${active} tickets to track (${list.length - active} not shown) · ${sourceLabel}`;
|
||||||
const dh = document.getElementById("dropHint");
|
const dh = document.getElementById("dropHint");
|
||||||
if (dh) { dh.style.display = "none"; dh.classList.remove("active"); }
|
if (dh) { dh.style.display = "none"; dh.classList.remove("active"); }
|
||||||
populateFilters();
|
populateFilters();
|
||||||
uatRender();
|
uatRender();
|
||||||
syncRoadmapFromTickets();
|
|
||||||
}
|
}
|
||||||
let rawByTicket = {};
|
let rawByTicket = {};
|
||||||
|
|
||||||
// ---------- Daily CSV cache: remember today's upload across refreshes ----------
|
|
||||||
const CSV_CACHE_KEY = "smh-csv-cache-v1";
|
|
||||||
function localDateKey() {
|
|
||||||
const d = new Date();
|
|
||||||
return d.getFullYear() + "-" + String(d.getMonth() + 1).padStart(2, "0") + "-" + String(d.getDate()).padStart(2, "0");
|
|
||||||
}
|
|
||||||
function cacheCSV(text, name) {
|
|
||||||
try { localStorage.setItem(CSV_CACHE_KEY, JSON.stringify({ date: localDateKey(), name, text })); }
|
|
||||||
catch (err) { console.warn("Couldn't cache CSV (storage full?)", err); }
|
|
||||||
}
|
|
||||||
function cachedCSV() {
|
|
||||||
try {
|
|
||||||
const c = JSON.parse(localStorage.getItem(CSV_CACHE_KEY) || "null");
|
|
||||||
return (c && c.date === localDateKey() && c.text) ? c : null; // only today's upload counts
|
|
||||||
} catch { return null; }
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById("csvInput").addEventListener("change", e => {
|
document.getElementById("csvInput").addEventListener("change", e => {
|
||||||
const file = e.target.files[0];
|
const file = e.target.files[0];
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
|
|
@ -2421,7 +2193,6 @@ document.getElementById("csvInput").addEventListener("change", e => {
|
||||||
reader.onload = () => {
|
reader.onload = () => {
|
||||||
try {
|
try {
|
||||||
loadTickets(csvToTickets(reader.result), file.name);
|
loadTickets(csvToTickets(reader.result), file.name);
|
||||||
cacheCSV(reader.result, file.name);
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert("Could not load that CSV: " + err.message);
|
alert("Could not load that CSV: " + err.message);
|
||||||
}
|
}
|
||||||
|
|
@ -2444,28 +2215,14 @@ uatPane.addEventListener("drop", e => {
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.onload = () => {
|
reader.onload = () => {
|
||||||
try {
|
try { loadTickets(csvToTickets(reader.result), file.name); }
|
||||||
loadTickets(csvToTickets(reader.result), file.name);
|
|
||||||
cacheCSV(reader.result, file.name);
|
|
||||||
}
|
|
||||||
catch (err) { alert("Could not load that CSV: " + err.message); }
|
catch (err) { alert("Could not load that CSV: " + err.message); }
|
||||||
};
|
};
|
||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
});
|
});
|
||||||
|
|
||||||
// init — restore today's CSV if it was already uploaded (survives refreshes),
|
// init
|
||||||
// otherwise start empty until a new CSV is loaded.
|
|
||||||
const cached = cachedCSV();
|
|
||||||
if (cached) {
|
|
||||||
try {
|
|
||||||
loadTickets(csvToTickets(cached.text), cached.name + " (saved today)");
|
|
||||||
} catch (err) {
|
|
||||||
localStorage.removeItem(CSV_CACHE_KEY);
|
|
||||||
loadTickets(INITIAL_TICKETS, INITIAL_SOURCE);
|
loadTickets(INITIAL_TICKETS, INITIAL_SOURCE);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
loadTickets(INITIAL_TICKETS, INITIAL_SOURCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -2487,6 +2244,60 @@ document.getElementById("hubDate").textContent =
|
||||||
new Date().toLocaleDateString(undefined, { weekday: "long", year: "numeric", month: "long", day: "numeric" });
|
new Date().toLocaleDateString(undefined, { weekday: "long", year: "numeric", month: "long", day: "numeric" });
|
||||||
switchTab(localStorage.getItem("sm-hub-tab") || "roadmap");
|
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>
|
||||||
<script>
|
<script>
|
||||||
/* ================= WEB ALIGNMENT TEAM (Mondays 9:00 AM MT) ================= */
|
/* ================= WEB ALIGNMENT TEAM (Mondays 9:00 AM MT) ================= */
|
||||||
|
|
@ -2515,7 +2326,7 @@ function renderWa() {
|
||||||
: `${dStr} at ${tStr} · in ${days} day${days === 1 ? "" : "s"}`;
|
: `${dStr} at ${tStr} · in ${days} day${days === 1 ? "" : "s"}`;
|
||||||
const el = document.getElementById("waWhen");
|
const el = document.getElementById("waWhen");
|
||||||
if (el) {
|
if (el) {
|
||||||
el.innerHTML = `<b>Next sync: ${when}</b> <span class="wa-sub">· Mondays 9:00 AM MT</span>`;
|
el.innerHTML = `🗓 <b>Next sync: ${when}</b> <span class="wa-sub">· Mondays 9:00 AM MT</span>`;
|
||||||
el.classList.toggle("today", sameDay);
|
el.classList.toggle("today", sameDay);
|
||||||
}
|
}
|
||||||
const wrap = document.getElementById("waList");
|
const wrap = document.getElementById("waList");
|
||||||
|
|
@ -2544,8 +2355,8 @@ function renderWa() {
|
||||||
};
|
};
|
||||||
let html = open.length
|
let html = open.length
|
||||||
? open.map(row).join("")
|
? open.map(row).join("")
|
||||||
: '<div class="empty">Nothing queued for Monday yet — add what you need to raise above</div>';
|
: '<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("");
|
if (covered.length) html += `<div class="subhead">✅ Covered <span class="count">${covered.length}</span></div>` + covered.map(row).join("");
|
||||||
wrap.innerHTML = html;
|
wrap.innerHTML = html;
|
||||||
const b = document.getElementById("waBadge");
|
const b = document.getElementById("waBadge");
|
||||||
if (b) b.textContent = open.length ? String(open.length) : "—";
|
if (b) b.textContent = open.length ? String(open.length) : "—";
|
||||||
|
|
|
||||||
|
|
@ -127,11 +127,18 @@ const tabCss = `
|
||||||
.wa-addsub:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
.wa-addsub:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
||||||
.wa-subadd { margin: 2px 0 4px; }
|
.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; }
|
.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; }
|
||||||
`;
|
`;
|
||||||
const tabHtml = `
|
const tabHtml = `
|
||||||
<div class="hubbar">
|
<div class="hubbar">
|
||||||
<div class="hub-title">🐱 ServiceMeow HQ</div>
|
<div class="hub-title">🐱 ServiceMeow HQ</div>
|
||||||
<div class="hub-date" id="hubDate"></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">
|
<div class="tabbar">
|
||||||
<button class="tabbtn" id="tabbtn-roadmap" onclick="switchTab('roadmap')">📋 Roadmap & Daily</button>
|
<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-uat" onclick="switchTab('uat')">🧪 UAT Launches <span class="tbadge" id="uatBadge">🚀</span></button>
|
||||||
|
|
@ -156,6 +163,60 @@ function switchTab(name) {
|
||||||
document.getElementById("hubDate").textContent =
|
document.getElementById("hubDate").textContent =
|
||||||
new Date().toLocaleDateString(undefined, { weekday: "long", year: "numeric", month: "long", day: "numeric" });
|
new Date().toLocaleDateString(undefined, { weekday: "long", year: "numeric", month: "long", day: "numeric" });
|
||||||
switchTab(localStorage.getItem("sm-hub-tab") || "roadmap");
|
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);
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
const waHtml = `
|
const waHtml = `
|
||||||
<div id="tab-wa" class="tabpane">
|
<div id="tab-wa" class="tabpane">
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue