diff --git a/packages/~/app/urls/src/pattern.d.ts b/packages/~/app/urls/src/pattern.d.ts index 5cb71c4f..78efba03 100644 --- a/packages/~/app/urls/src/pattern.d.ts +++ b/packages/~/app/urls/src/pattern.d.ts @@ -54,19 +54,6 @@ declare const app: import("hono/hono-base").HonoBase< }; }; "/organizations/:id/domains/:domain_id": { - $delete: { - input: { - param: { - id: string; - domain_id: string; - } & { - id: string; - }; - }; - output: "OK"; - outputFormat: "text"; - status: 200; - }; $patch: { input: { param: { @@ -116,11 +103,11 @@ declare const app: import("hono/hono-base").HonoBase< id: string; }; form: { - is_external?: + verification_type?: | import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined; - verification_type?: + is_external?: | import("hono/types").ParsedFormValue | import("hono/types").ParsedFormValue[] | undefined; diff --git a/packages/~/infra/moncomptepro/lib/src/email_domain.ts b/packages/~/infra/moncomptepro/lib/src/email_domain.ts index cd2ffcec..aee2a8be 100644 --- a/packages/~/infra/moncomptepro/lib/src/email_domain.ts +++ b/packages/~/infra/moncomptepro/lib/src/email_domain.ts @@ -6,10 +6,12 @@ import { z } from "zod"; export const EmailDomain_Type_Schema = z .enum([ + "authorized", // legacy ? "blacklisted", "external", "official_contact", - "trackdechet_postal_mail", + "refused", + "trackdechets_postal_mail", "verified", ]) .nullable(); diff --git a/packages/~/organizations/api/src/:id/domains/Table.tsx b/packages/~/organizations/api/src/:id/domains/Table.tsx index 86b74827..42d8d929 100644 --- a/packages/~/organizations/api/src/:id/domains/Table.tsx +++ b/packages/~/organizations/api/src/:id/domains/Table.tsx @@ -5,6 +5,7 @@ import { GoogleSearchButton } from "@~/app.ui/button/components/search"; import { menu_item } from "@~/app.ui/menu"; import { Horizontal_Menu } from "@~/app.ui/menu/components/Horizontal_Menu"; import { hx_urls } from "@~/app.urls"; +import type { EmailDomain_Type } from "@~/moncomptepro.lib/email_domain"; import type { MCP_EmailDomain_Type } from "@~/moncomptepro.lib/moncomptepro.d"; import type { get_orginization_domains_dto } from "@~/organizations.repository/get_orginization_domains"; import { match } from "ts-pattern"; @@ -75,38 +76,43 @@ async function Add_Domain() { ); } -function TypeToEmoji({ type }: { type: MCP_EmailDomain_Type }) { +function TypeToEmoji({ type }: { type: EmailDomain_Type }) { return match(type) - .with("verified", () => ( - - ✅ - - )) .with("authorized", () => ( 🔓 )) - .with("external", () => ( - - ❎ - - )) .with("blacklisted", () => ( ☠️ )) + .with("external", () => ( + + ❎ + + )) .with("official_contact", () => ( )) + .with("refused", () => ( + + 🚫 + + )) .with("trackdechets_postal_mail", () => ( )) + .with("verified", () => ( + + ✅ + + )) .otherwise(() => ( ❓ @@ -155,12 +161,6 @@ async function Row_Actions({ }) { const { id, organization_id } = organization_domain; - const hx_delete_domain_props = await hx_urls.organizations[":id"].domains[ - ":domain_id" - ].$delete({ - param: { id: organization_id.toString(), domain_id: id.toString() }, - }); - const hx_change_type_props = (type: MCP_EmailDomain_Type) => hx_urls.organizations[":id"].domains[":domain_id"].$patch({ param: { id: organization_id.toString(), domain_id: id.toString() }, @@ -192,7 +192,7 @@ async function Row_Actions({