feat(web): /fields two-pane screen (grouped list + create form) + nav (no stubs left)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 14:22:57 +02:00
parent 6ad1304efd
commit 37c80121ed
9 changed files with 369 additions and 14 deletions
+2 -2
View File
@@ -29,9 +29,9 @@ test("shows active and disabled nav and renders the outlet", async () => {
renderApp(tree(), { route: "/objects" });
expect(await screen.findByText("objects outlet")).toBeInTheDocument();
expect(screen.getByRole("link", { name: /objects/i })).toBeInTheDocument();
// fields is still disabled; search is now a link
// fields and search are now links
expect(screen.getByRole("link", { name: /search/i })).toBeInTheDocument();
expect(screen.getByRole("button", { name: /fields/i })).toBeDisabled();
expect(screen.getByRole("link", { name: /fields/i })).toBeInTheDocument();
});
test("language switch toggles to Swedish", async () => {
+8 -12
View File
@@ -5,8 +5,6 @@ import { useLogout } from "../api/queries";
import { Button } from "@/components/ui/button";
import { LangSwitch } from "./lang-switch";
const DISABLED_NAV = ["fields"] as const;
export function AppShell() {
const { t } = useTranslation();
const navigate = useNavigate();
@@ -54,16 +52,14 @@ export function AppShell() {
>
{t("nav.search")}
</NavLink>
{DISABLED_NAV.map((key) => (
<button
key={key}
disabled
title={t("nav.soon")}
className="block w-full cursor-not-allowed rounded px-2 py-1 text-left text-neutral-400"
>
{t(`nav.${key}`)}
</button>
))}
<NavLink
to="/fields"
className={({ isActive }) =>
`block rounded px-2 py-1 ${isActive ? "bg-neutral-200 font-medium" : ""}`
}
>
{t("nav.fields")}
</NavLink>
</nav>
</aside>
<div className="flex flex-1 flex-col">