diff --git a/src/app/admin/carbets/_components/CarbetForm.tsx b/src/app/admin/carbets/_components/CarbetForm.tsx index 11d8460..6a4f7e4 100644 --- a/src/app/admin/carbets/_components/CarbetForm.tsx +++ b/src/app/admin/carbets/_components/CarbetForm.tsx @@ -6,7 +6,7 @@ import { ACCESS_TYPE_OPTIONS, STATUS_OPTIONS, TRANSPORT_MODE_OPTIONS, -} from "@/lib/admin/carbets"; +} from "@/lib/admin/carbet-options"; export type CarbetFormInitial = { ownerId?: string; diff --git a/src/lib/admin/carbet-options.ts b/src/lib/admin/carbet-options.ts new file mode 100644 index 0000000..b6271e7 --- /dev/null +++ b/src/lib/admin/carbet-options.ts @@ -0,0 +1,23 @@ +/** + * Options enum pour les selects du formulaire Carbet — fichier neutre + * (pas server-only, importable depuis les composants client). + */ + +import { AccessType, CarbetStatus, TransportMode } from "@/generated/prisma/enums"; + +export const ACCESS_TYPE_OPTIONS: { value: AccessType; label: string }[] = [ + { value: AccessType.ROAD_AND_RIVER, label: "🛣️ Route + fleuve" }, + { value: AccessType.RIVER_ONLY, label: "🛶 Expédition fleuve" }, +]; + +export const TRANSPORT_MODE_OPTIONS: { value: TransportMode; label: string }[] = [ + { value: TransportMode.SELF_ARRANGE, label: "🗺️ À organiser par le voyageur" }, + { value: TransportMode.OWNER_PROVIDES, label: "👤 Le loueur fournit" }, + { value: TransportMode.PARTNER_PROVIDER, label: "🤝 Partenaire référencé" }, +]; + +export const STATUS_OPTIONS: { value: CarbetStatus; label: string }[] = [ + { value: CarbetStatus.DRAFT, label: "Brouillon" }, + { value: CarbetStatus.PUBLISHED, label: "Publié" }, + { value: CarbetStatus.ARCHIVED, label: "Archivé" }, +];