fix(assets): restore classic UI while retaining inventory subsets and AI
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
shishengliang
2026-09-23 14:44:12 +08:00
parent b33e965ec3
commit 3d4749f28f
65 changed files with 3915 additions and 12116 deletions
@@ -0,0 +1,12 @@
import type { RegionalInventoryStats } from '../../types';
/** Status counts are subsets of these filtered inventory rows, never extra stock. */
export function InventoryStatusCounts({ rows }: { rows: RegionalInventoryStats[] }) {
const abnormal = rows.reduce((sum, row) => sum + (row.abnormal ?? 0), 0);
const pending = rows.reduce((sum, row) => sum + (row.pending ?? 0), 0);
if (abnormal === 0 && pending === 0) return null;
return <span className="inline-flex flex-wrap gap-x-3 gap-y-1 text-[11px] font-normal" data-testid="inventory-status-counts">
{abnormal > 0 && <span className="text-amber-700">其中异动 <strong>{abnormal}</strong> 台</span>}
{pending > 0 && <span className="text-blue-700">其中待交车 <strong>{pending}</strong> 台</span>}
</span>;
}