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:
1 parent
92726568b7
commit
846af02851
50 files changed
+4434
-233
No files matched your search
@@ -10,6 +10,7 @@ import { useSelection } from "../hooks/useSelection";
|
||||
import { confirmDialog, promptDialog } from "../utils/dialogs";
|
||||
import { ErrorNotice } from "../components/Notice";
|
||||
import TableToolbar from "../components/TableToolbar";
|
||||
import { EmptyRow, LoadingRow } from "../components/EmptyState";
|
||||
|
||||
const emptyForm: IpamInput = { ipAddress: "", label: "", vendor: "", location: "", notes: "" };
|
||||
|
||||
@@ -464,14 +465,9 @@ export default function Ipam({ user }: { user: CurrentUser }) {
|
||||
)}
|
||||
</tr>
|
||||
))}
|
||||
{(sorted ?? []).length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={canEdit ? 7 : 5} className="text-secondary text-center">
|
||||
{entries && entries.length > 0
|
||||
? "Every tracked address is currently excluded or filtered out — turn off “Hide excluded addresses”, or adjust your search, to see them."
|
||||
: "No IP addresses tracked yet."}
|
||||
</td>
|
||||
</tr>
|
||||
{entries === null && <LoadingRow colSpan={canEdit ? 7 : 5} />}
|
||||
{entries !== null && (sorted ?? []).length === 0 && (
|
||||
<EmptyRow colSpan={canEdit ? 7 : 5} {...(entries && entries.length > 0 ? { filtered: () => { setSearch(""); setHideExcluded(false); }, hint: "Every tracked address is excluded or filtered out. Show the excluded ones, or clear the search, to see them." } : { title: "No IP addresses tracked yet", hint: "Track the addresses you hand out, so you can see what is taken, what is free and what clashes.", action: canEdit ? { label: "Add an address", onClick: startAdd } : undefined })} />
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in new issue
Block a user