Lifecycle planning, and consistent empty and loading states

- Inventory: end of support and replacement cost per asset; a Lifecycle page showing what ages out year by year and what replacing it will cost; support ending within 90 days in the weekly digest
- Lists: a shared empty state saying what is missing, why, and the one thing to do; "nothing matches" with a clear button; skeleton rows instead of empty-looking lists while loading

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-18 23:18:42 +02:00
1 parent 92726568b7
commit 846af02851
50 files changed
+4434 -233

No files matched your search

+3 -5
View File
@@ -7,6 +7,7 @@ import { toast } from "../utils/toast";
import TimeAgo from "./TimeAgo";
import { ErrorNotice } from "./Notice";
import ExportTableButton from "./ExportTableButton";
import { EmptyRow, LoadingRow } from "./EmptyState";
// Monday first, as a week reads; the numbers are what the server keeps (0 = Sunday).
const DAYS: { value: number; short: string }[] = [
@@ -339,12 +340,9 @@ export default function RecurringMaintenance({ canEdit, targets, onChanged }: {
)}
</tr>
))}
{schedules === null && <LoadingRow colSpan={canEdit ? 5 : 4} />}
{schedules?.length === 0 && (
<tr>
<td colSpan={canEdit ? 5 : 4} className="text-secondary text-center">
Nothing repeats yet. Add one for the night you patch, and its windows appear a week ahead.
</td>
</tr>
<EmptyRow colSpan={canEdit ? 5 : 4} title="No recurring maintenance" hint="Add one for the night you patch, and its windows appear a week ahead, so alerts stay quiet without anyone remembering to." action={canEdit ? { label: "Add recurring maintenance", onClick: () => { setError(null); setAdding(true); } } : undefined} />
)}
</tbody>
</table>