UNPKG

company-cafeteria-shared-demo

Version:

Package partagé pour l'écosystème Cafétéria Entreprise

61 lines 1.8 kB
/** * Statuts possibles pour une commande */ export declare const ORDER_STATUS: { readonly PENDING: "pending"; readonly CONFIRMED: "confirmed"; readonly PREPARING: "preparing"; readonly READY: "ready"; readonly COMPLETED: "completed"; readonly CANCELLED: "cancelled"; }; export type OrderStatus = typeof ORDER_STATUS[keyof typeof ORDER_STATUS]; /** * Transitions de statut autorisées */ export declare const ORDER_STATUS_TRANSITIONS: Record<OrderStatus, OrderStatus[]>; /** * Statuts où l'utilisateur peut annuler sa commande */ export declare const CANCELLABLE_STATUSES: OrderStatus[]; /** * Statuts indiquant une commande active */ export declare const ACTIVE_STATUSES: OrderStatus[]; /** * Statuts finaux (commande terminée) */ export declare const FINAL_STATUSES: OrderStatus[]; /** * Messages d'affichage pour chaque statut */ export declare const ORDER_STATUS_MESSAGES: Record<OrderStatus, string>; /** * Icônes pour chaque statut */ export declare const ORDER_STATUS_ICONS: Record<OrderStatus, string>; /** * Couleurs pour chaque statut (Tailwind CSS) */ export declare const ORDER_STATUS_COLORS: Record<OrderStatus, { bg: string; text: string; border: string; }>; /** * Vérifie si une transition de statut est autorisée */ export declare function isValidStatusTransition(currentStatus: OrderStatus, newStatus: OrderStatus): boolean; /** * Vérifie si une commande peut être annulée */ export declare function canCancelOrder(status: OrderStatus): boolean; /** * Vérifie si une commande est active */ export declare function isActiveOrder(status: OrderStatus): boolean; /** * Vérifie si une commande est terminée */ export declare function isFinalOrder(status: OrderStatus): boolean; //# sourceMappingURL=orderStatus.d.ts.map