From 87878e70fcfa921cb5cd26c41328159d2e39860c Mon Sep 17 00:00:00 2001 From: ponzischeme89 Date: Sun, 21 Jun 2026 11:57:14 +1200 Subject: [PATCH] v0.1.32 - Mix Calculator search, ingredient categories, throughput tidy-up Mix Calculator: searchable Mix Name picker (mirrors Throughput search) Ingredients Editor: add manual Category column; used to order Mix Calculator output Mix Calculator: surface formula-only mixes (no product yet) via -mix_id sentinel Throughput: remove unused For order / For stock destination controls from composer Editor change history: show timestamps in local time (stored UTC) instead of raw UTC --- .../components/editor/CategoryCombobox.svelte | 301 ++++++++++++++++++ .../navigation/ClientPrimaryRail.svelte | 6 +- .../throughput/ThroughputComposer.svelte | 64 ---- .../throughput/ThroughputHistory.svelte | 56 +--- frontend/src/routes/ingredients/+page.svelte | 11 +- frontend/src/routes/throughput/+page.svelte | 24 -- 6 files changed, 313 insertions(+), 149 deletions(-) create mode 100644 frontend/src/lib/components/editor/CategoryCombobox.svelte diff --git a/frontend/src/lib/components/editor/CategoryCombobox.svelte b/frontend/src/lib/components/editor/CategoryCombobox.svelte new file mode 100644 index 0000000..255a16c --- /dev/null +++ b/frontend/src/lib/components/editor/CategoryCombobox.svelte @@ -0,0 +1,301 @@ + + +
+ + + + {#if open && !disabled} + + {/if} +
+ + diff --git a/frontend/src/lib/components/navigation/ClientPrimaryRail.svelte b/frontend/src/lib/components/navigation/ClientPrimaryRail.svelte index 1eb96d6..694df08 100644 --- a/frontend/src/lib/components/navigation/ClientPrimaryRail.svelte +++ b/frontend/src/lib/components/navigation/ClientPrimaryRail.svelte @@ -349,6 +349,7 @@ {@const subActive = subGroupActive(child)} + {@const ChildIcon = child.icon}
openSubGroup(key)} > + {child.label} {#if child.badge}{child.badge}{/if} @@ -374,12 +376,12 @@ {#if subOpen}
{#each child.children as grandchild} - {@render leafLink(grandchild, false)} + {@render leafLink(grandchild, true)} {/each}
{/if} {:else} - {@render leafLink(child, false)} + {@render leafLink(child, true)} {/if} {/each}
diff --git a/frontend/src/lib/components/throughput/ThroughputComposer.svelte b/frontend/src/lib/components/throughput/ThroughputComposer.svelte index 76187ce..680e680 100644 --- a/frontend/src/lib/components/throughput/ThroughputComposer.svelte +++ b/frontend/src/lib/components/throughput/ThroughputComposer.svelte @@ -251,68 +251,6 @@ font-variant-numeric: tabular-nums; } - .add-dest { - gap: 0.4rem; - } - - .dest-rows { - display: flex; - flex-direction: column; - gap: 0.4rem; - } - - .dest-line { - display: flex; - align-items: center; - gap: 0.5rem; - } - - .dest-line .dest-toggle { - flex: 0 0 auto; - min-width: 8.5rem; - } - - .dest-line .dest-input { - flex: 1 1 auto; - min-width: 0; - width: auto; - } - - .dest-toggle { - display: inline-flex; - align-items: center; - gap: 0.4rem; - padding: 0.4rem 0.68rem; - border: 1px solid color-mix(in srgb, var(--color-brand) 14%, var(--color-border)); - border-radius: 0.72rem; - background: var(--color-bg-surface); - font-size: 0.88rem; - font-weight: 600; - color: var(--color-text-secondary); - cursor: pointer; - user-select: none; - } - - .dest-toggle input { - width: 1.2rem; - height: 1.2rem; - min-height: 0; - margin: 0; - flex-shrink: 0; - accent-color: var(--color-brand); - cursor: pointer; - } - - .dest-toggle.on { - border-color: var(--color-brand); - background: var(--color-brand-tint); - color: var(--color-success); - } - - .dest-input { - width: 100%; - } - .add-action { justify-content: center; } @@ -459,7 +397,6 @@ .add-cell:nth-child(2), .add-cell:nth-child(3), - .add-dest, .add-action { grid-column: 1 / -1; } @@ -490,7 +427,6 @@ } .add-cell:nth-child(2), - .add-dest, .add-action { grid-column: 1 / -1; } diff --git a/frontend/src/lib/components/throughput/ThroughputHistory.svelte b/frontend/src/lib/components/throughput/ThroughputHistory.svelte index acc102b..024fb98 100644 --- a/frontend/src/lib/components/throughput/ThroughputHistory.svelte +++ b/frontend/src/lib/components/throughput/ThroughputHistory.svelte @@ -29,7 +29,6 @@ formatNumber, packedMain, packedDetail, - destinationOf, onApplyFilters, onClearFilters, onToggleSort, @@ -59,7 +58,6 @@ formatNumber: (value: number | null | undefined, digits?: number) => string; packedMain: (entry: ThroughputEntry) => string; packedDetail: (entry: ThroughputEntry) => string; - destinationOf: (entry: ThroughputEntry) => { label: string; detail: string | null }; onApplyFilters: () => void; onClearFilters: () => void; onToggleSort: (key: SortKey) => void; @@ -171,10 +169,6 @@ Packed by -