Merge pull request 'chore: split options client/server' (#42) from chore/admin-carbet-options-split into main
This commit is contained in:
commit
00a5533bea
2 changed files with 24 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
23
src/lib/admin/carbet-options.ts
Normal file
23
src/lib/admin/carbet-options.ts
Normal file
|
|
@ -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é" },
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue