This commit is contained in:
Brennan Wilkes (Text Groove) 2026-02-02 20:02:50 -08:00
parent 21d74c525d
commit 7bc61f7efb
3 changed files with 42 additions and 34 deletions

View file

@ -109,6 +109,8 @@ const BC_STORE_KEYS = new Set([
"legacy", "legacy",
"legacyliquor", "legacyliquor",
"tudor", "tudor",
"vessel",
"vintage",
]); ]);
function groupAllowsStore(group, storeKey) { function groupAllowsStore(group, storeKey) {

View file

@ -284,44 +284,35 @@ export async function renderStats($app) {
const pref = loadPrefs(); const pref = loadPrefs();
$app.innerHTML = ` $app.innerHTML = `
<div class="container"> <div class="headerRow1">
<div class="header"> <div class="statsHeaderLeft">
<div class="headerRow1"> <button id="back" class="btn"> Back</button>
<div class="headerLeft">
<div class="headerButtons" style="margin-top:10px;">
<button id="back" class="btn"> Back</button>
</div>
<h1 class="h1">Store Price Index</h1>
<div class="small" id="statsStatus">Loading</div>
</div>
<div class="headerRight"> <div class="statsTitleStack">
<div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-end;"> <h1 class="h1">Store Price Index</h1>
<label class="small" style="display:flex; gap:8px; align-items:center;"> <div class="small" id="statsStatus">Loading</div>
Stores
<select id="statsGroup" class="selectSmall" aria-label="Store group">
<option value="all">All Stores</option>
<option value="bc">BC Only</option>
<option value="ab">Alberta Only</option>
</select>
</label>
<label class="small" style="display:flex; gap:8px; align-items:center;">
Index Size
<select id="statsSize" class="selectSmall" aria-label="Index size">
<option value="50">50</option>
<option value="250">250</option>
<option value="1000">1000</option>
</select>
</label>
</div>
</div>
</div> </div>
</div> </div>
<div class="card"> <div class="headerRight">
<div style="height:420px;"> <div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-end;">
<canvas id="statsChart" aria-label="Statistics chart" role="img"></canvas> <label class="small" style="display:flex; gap:8px; align-items:center;">
Stores
<select id="statsGroup" class="selectSmall" aria-label="Store group">
<option value="all">All Stores</option>
<option value="bc">BC Only</option>
<option value="ab">Alberta Only</option>
</select>
</label>
<label class="small" style="display:flex; gap:8px; align-items:center;">
Index Size
<select id="statsSize" class="selectSmall" aria-label="Index size">
<option value="50">50</option>
<option value="250">250</option>
<option value="1000">1000</option>
</select>
</label>
</div> </div>
</div> </div>
</div> </div>

View file

@ -428,6 +428,21 @@ a.skuLink:hover { text-decoration: underline; cursor: pointer; }
bottom: 0; bottom: 0;
} }
/* Stats page only */
.statsHeaderLeft {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.statsTitleStack {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
/* --- Store page: two-column results (new; isolated to store page) --- */ /* --- Store page: two-column results (new; isolated to store page) --- */
.storeGrid { .storeGrid {
margin-top: 12px; margin-top: 12px;