From 39633838e0f6ae2f213f9e163f001d5486288c8d Mon Sep 17 00:00:00 2001 From: David Date: Sat, 3 Oct 2026 09:59:11 +0200 Subject: [PATCH] Plant: default the register's status filter to Active The register is a working list of the machines currently in the fleet, so retired rows were noise until someone asked for them. Rows with an unsaved toggle staged stay visible, so an edit is never hidden mid-change. (Change made in the working tree alongside the invoice layout work; committed separately so it keeps its own message.) --- components/PlantRegisterTable.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/PlantRegisterTable.tsx b/components/PlantRegisterTable.tsx index 68c8b05..b0a56f6 100644 --- a/components/PlantRegisterTable.tsx +++ b/components/PlantRegisterTable.tsx @@ -55,7 +55,10 @@ export function PlantRegisterTable({ const [query, setQuery] = useState(""); const [typeFilter, setTypeFilter] = useState("All"); const [siteFilter, setSiteFilter] = useState("All"); - const [statusFilter, setStatusFilter] = useState("all"); + // Defaults to Active: the register is a working list of machines currently in + // the fleet, and retired rows are noise until someone asks for them. Rows with + // an unsaved toggle staged stay visible so an edit is never hidden mid-change. + const [statusFilter, setStatusFilter] = useState("active"); const [sortKey, setSortKey] = useState("type"); const [sortDir, setSortDir] = useState<"asc" | "desc">("asc"); const [editing, setEditing] = useState(false);