From 55d6218dd3a865f8d2d0da7c4de5d7af447784f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Bregar?= Date: Mon, 4 May 2026 00:32:59 +0200 Subject: [PATCH] Redesign recent changes section: add grid-based layout, tone classes, stock transitions, and context normalization. Improve stock entry handling with fallback for inactive items. --- src/features/dashboard/dashboard-page.js | 365 +++++++++++++++++++++-- src/features/stock/stock-detail-page.js | 14 +- src/styles/app.css | 159 ++++++++++ 3 files changed, 508 insertions(+), 30 deletions(-) diff --git a/src/features/dashboard/dashboard-page.js b/src/features/dashboard/dashboard-page.js index 11e6282..87a60f9 100644 --- a/src/features/dashboard/dashboard-page.js +++ b/src/features/dashboard/dashboard-page.js @@ -1,7 +1,10 @@ import { fetchLocations } from '../../api/locations.js'; -import { getStockEntry, listKitchenChanges } from '../../api/stock.js'; +import { getStockEntry, listKitchenChanges, listStockEvents } from '../../api/stock.js'; import { createAsyncState, runAsyncState } from '../shared/ui-state.js'; +const RECENT_CHANGE_FETCH_LIMIT = 200; +const RECENT_CHANGE_DISPLAY_LIMIT = 50; + export function renderDashboardPage() { return `
@@ -93,8 +96,7 @@ export function renderDashboardPage() {

Recent changes

-

Latest item and stock updates from the kitchen change feed.

-

Saved means the backend created or updated a record.

+

Latest item and stock updates, including used and inactive stock.