diff --git a/openspec/changes/add-visual-foundation/tasks.md b/openspec/changes/add-visual-foundation/tasks.md
index 14186ca..af177b3 100644
--- a/openspec/changes/add-visual-foundation/tasks.md
+++ b/openspec/changes/add-visual-foundation/tasks.md
@@ -20,7 +20,7 @@ Serial. One implementer at a time, Opus review gate per task.
## 3. Form dropdowns
-- [ ] 3.1 Replace the native selects in the event form, user form, company status, and the new and edit event-lead pages with the styled select; values save as before.
+- [x] 3.1 Replace the native selects in the event form, user form, company status, and the new and edit event-lead pages with the styled select; values save as before.
- Depends on: 2.1
- Tests first: each dropdown opens a menu, choosing an option sends that value on save; keyboard opens and chooses.
- Scope: `solvway-admin-portal/app/components/events/**`, `solvway-admin-portal/app/components/users/**`, `solvway-admin-portal/app/companies/**`, `solvway-admin-portal/app/event-leads/**`, `solvway-admin-portal/app/companyScope.forms.test.tsx`
diff --git a/solvway-admin-portal/app/companies/page.test.tsx b/solvway-admin-portal/app/companies/page.test.tsx
index be61ac8..18037fc 100644
--- a/solvway-admin-portal/app/companies/page.test.tsx
+++ b/solvway-admin-portal/app/companies/page.test.tsx
@@ -46,6 +46,19 @@ describe("CompaniesPage", () => {
);
});
+ it("saves the status chosen in the styled dropdown", async () => {
+ mocks.apiPost.mockResolvedValue({ id: 1 });
+ render(
{fieldErrors.company} diff --git a/solvway-admin-portal/app/components/users/UserForm.tsx b/solvway-admin-portal/app/components/users/UserForm.tsx index 3eafbf3..a3a5457 100644 --- a/solvway-admin-portal/app/components/users/UserForm.tsx +++ b/solvway-admin-portal/app/components/users/UserForm.tsx @@ -7,6 +7,7 @@ import { Button } from "@/app/components/ui/button"; import { Checkbox } from "@/app/components/ui/checkbox"; import { Input } from "@/app/components/ui/input"; import { Label } from "@/app/components/ui/label"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/app/components/ui/select"; import { Switch } from "@/app/components/ui/switch"; import { ErrorState } from "@/app/components/ui/states"; import { roleLabel } from "@/app/lib/roleLabel"; @@ -22,6 +23,9 @@ import { PasswordFields } from "./PasswordFields"; // add/edit-user form"). The Roles picker is populated from the admin roles list // endpoint; the backend sets the branch from the creating admin. +// Radix Select rejects "" as an item value, so "no company" is this sentinel, mapped back to "". +const NONE = "none"; + // Deliberately basic (RFC-exhaustive email validation is out of scope) — mirrors // the "basic email validation" requirement in the plan. const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; @@ -220,20 +224,18 @@ export function UserForm({ initial, onSubmit, submitLabel, withPassword }: UserF {showCompany && (
{fieldErrors.company}
diff --git a/solvway-admin-portal/app/event-leads/[eventUuid]/[eventLeadUuid]/page.test.tsx b/solvway-admin-portal/app/event-leads/[eventUuid]/[eventLeadUuid]/page.test.tsx
index 93d3a74..7dbf5ff 100644
--- a/solvway-admin-portal/app/event-leads/[eventUuid]/[eventLeadUuid]/page.test.tsx
+++ b/solvway-admin-portal/app/event-leads/[eventUuid]/[eventLeadUuid]/page.test.tsx
@@ -59,6 +59,12 @@ beforeEach(() => {
mocks.useAdminAuth.mockReset().mockReturnValue({ loading: false, hasModule: () => true });
});
+// Radix selects: open the combobox, then click the option (a native selectOptions no longer applies).
+const pick = async (user: ReturnType