diff --git a/solvway-admin-portal/app/companyScope.forms.test.tsx b/solvway-admin-portal/app/companyScope.forms.test.tsx
index a17926c..7efb4aa 100644
--- a/solvway-admin-portal/app/companyScope.forms.test.tsx
+++ b/solvway-admin-portal/app/companyScope.forms.test.tsx
@@ -107,6 +107,13 @@ describe("UserForm company", () => {
await user.click(screen.getByRole("button", { name: /create|save/i }));
expect(await screen.findByText("Choose a company.")).toBeInTheDocument();
});
+ it("lists only the company codes and Super admin in the Company menu, with no blank option", async () => {
+ mocks.useCompanyScope.mockReturnValue(scope(undefined));
+ const user = userEvent.setup();
+ render();
+ await user.click(await screen.findByRole("combobox", { name: "Company" }));
+ expect((await screen.findAllByRole("option")).map((o) => o.textContent)).toEqual(["INS", "CV", "Super admin (no company)"]);
+ });
});
describe("EventForm company", () => {
@@ -163,4 +170,12 @@ describe("EventForm company required", () => {
expect(onSubmit).not.toHaveBeenCalled();
expect(await screen.findByText("Choose a company.")).toBeInTheDocument();
});
+
+ it("lists only the company codes in the Company menu, with no blank option", async () => {
+ mocks.useCompanyScope.mockReturnValue(scope(undefined));
+ const user = userEvent.setup();
+ render();
+ await user.click(await screen.findByRole("combobox", { name: "Company" }));
+ expect((await screen.findAllByRole("option")).map((o) => o.textContent)).toEqual(["INS", "CV"]);
+ });
});
diff --git a/solvway-admin-portal/app/components/events/EventForm.tsx b/solvway-admin-portal/app/components/events/EventForm.tsx
index b6118a3..52cd5f6 100644
--- a/solvway-admin-portal/app/components/events/EventForm.tsx
+++ b/solvway-admin-portal/app/components/events/EventForm.tsx
@@ -16,8 +16,6 @@ import { useT } from "@/app/lib/i18n/MessagesProvider";
import type { AdminEvent, AdminEventPayload, SalespersonOption } from "@/app/lib/types";
import type { ApiError } from "@/app/lib/clientApi";
-// Radix Select rejects "" as an item value, so "no company" is this sentinel, mapped back to "".
-const NONE = "none";
interface SalespersonOptionExtended extends SalespersonOption {
active: boolean;
@@ -184,9 +182,9 @@ export function EventForm({ initial, onSubmit, submitLabel }: EventFormProps) {