mirror of
https://github.com/samsonjs/spirit-tracker.git
synced 2026-03-25 09:25:51 +00:00
fixes
This commit is contained in:
parent
21d74c525d
commit
7bc61f7efb
3 changed files with 42 additions and 34 deletions
|
|
@ -109,6 +109,8 @@ const BC_STORE_KEYS = new Set([
|
|||
"legacy",
|
||||
"legacyliquor",
|
||||
"tudor",
|
||||
"vessel",
|
||||
"vintage",
|
||||
]);
|
||||
|
||||
function groupAllowsStore(group, storeKey) {
|
||||
|
|
|
|||
|
|
@ -284,44 +284,35 @@ export async function renderStats($app) {
|
|||
const pref = loadPrefs();
|
||||
|
||||
$app.innerHTML = `
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="headerRow1">
|
||||
<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="headerRow1">
|
||||
<div class="statsHeaderLeft">
|
||||
<button id="back" class="btn">← Back</button>
|
||||
|
||||
<div class="headerRight">
|
||||
<div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-end;">
|
||||
<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 class="statsTitleStack">
|
||||
<h1 class="h1">Store Price Index</h1>
|
||||
<div class="small" id="statsStatus">Loading…</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div style="height:420px;">
|
||||
<canvas id="statsChart" aria-label="Statistics chart" role="img"></canvas>
|
||||
<div class="headerRight">
|
||||
<div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-end;">
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -428,6 +428,21 @@ a.skuLink:hover { text-decoration: underline; cursor: pointer; }
|
|||
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) --- */
|
||||
.storeGrid {
|
||||
margin-top: 12px;
|
||||
|
|
|
|||
Loading…
Reference in a new issue