Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

493 B
Raw Blame
import {Attendee, EventOccurrenceStatus, Order} from "../../../../types.ts";

export const canAttendeeChangeSeat = (
    attendee: Attendee,
    orderStatus: Order['status'],
    selfServiceEnabled: boolean,
): boolean => selfServiceEnabled
    && orderStatus === 'COMPLETED'
    && !!attendee.seat_uid
    && attendee.status === 'ACTIVE'
    && !attendee.is_checked_in
    && !!attendee.event_occurrence?.is_future
    && attendee.event_occurrence.status !== EventOccurrenceStatus.CANCELLED;