Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | 8x 8x 24x 8x 8x 8x 8x 8x | /**
* PayBuilder 032-c (Tickets tab) — the row shape the table renders. The API
* payload is mapped into this in `useEventTickets`' parser so cell renderers
* stay independent of backend field names.
*/
export type TicketInvalidReason = "voided" | "refunded" | "chargeback";
export type EventTicketRow = {
id: string | number;
/**
* The event these tickets belong to. Carried on the row so the detail panel can
* check the ticket in on its own: the panel is opened by `componentsV2/Table`,
* whose modal arguments are fixed, and it renders outside the route that knows
* the id.
*/
eventId?: string;
/**
* Whether this event offers printed tickets, so the panel shows its "Ticket
* Picked Up" row. On the row for the same reason as `eventId` — it is the only
* thing the table hands the panel.
*/
showPickup?: boolean;
/** Formatted ticket code, e.g. "GCS-4327823". */
displayId: string;
/** Epoch seconds. */
purchasedAt?: number | null;
holderName?: string;
holderEmail?: string;
/** Variant name, e.g. "General Admission". */
ticketName?: string;
/** Seated events only: "A1 - Early Bird" (seat row + label). */
seatLabel?: string | null;
/** Epoch seconds when checked in, null/undefined when not. */
checkedInAt?: number | null;
/**
* True when the ticket can no longer be admitted because its purchase was
* reversed. The ticket's own status decides this, NOT the payment: an
* amount-based partial refund leaves its tickets valid.
*/
doNotAdmit?: boolean;
/**
* Why, when the server has it on record. `doNotAdmit` can be true with no
* reason (e.g. a reversal that was itself undone) — then the row shows the
* red text with no tooltip.
*/
invalidReason?: TicketInvalidReason | null;
/** The event ended before this ticket was used: no check-in action. */
isExpired?: boolean;
/** What the holder paid for THIS ticket, in minor units. */
ticketPrice?: number;
/** How the ticket was admitted; unset when it never was (or predates the column). */
checkInMethod?: TicketCheckInMethod | null;
/** The staff member who admitted the holder — the panel's "Host" row. */
hostName?: string;
hostEmail?: string;
/** Physical-ticket fulfilment — the "Ticket Picked Up" column. */
pickupStatus?: TicketPickupStatus;
/**
* The purchase this ticket came from, which the panel's "Transaction detail"
* link opens. The transaction's OBJECT id (`GS_TXN_…`) — not the numeric id —
* null from the server when there is none (a free or legacy order).
*/
transactionId?: string;
};
export type TicketPickupStatus = "pending" | "collected" | "delivered";
/**
* The "Ticket Picked Up" options, in the order the dropdown lists them
* (frame 7594-66313). Colours follow the frame: Delivered on the success chip,
* Collected on the blue one, Pending neutral.
*/
export const TICKET_PICKUP_OPTIONS: {
value: TicketPickupStatus;
label: string;
color: "default" | "blue" | "success";
}[] = [
{ value: "pending", label: "Pending", color: "default" },
{ value: "collected", label: "Collected", color: "blue" },
{ value: "delivered", label: "Delivered", color: "success" },
];
export const TICKET_PICKUP_LABELS: Record<TicketPickupStatus, string> =
TICKET_PICKUP_OPTIONS.reduce(
(acc, option) => ({ ...acc, [option.value]: option.label }),
{} as Record<TicketPickupStatus, string>,
);
export type TicketCheckInMethod = "scan" | "manual";
/** Check-in Method values, per frames 7397-91001 (scan) / 7397-99399 (manual). */
export const TICKET_CHECKIN_METHOD_LABELS: Record<TicketCheckInMethod, string> =
{
scan: "Scan",
manual: "Manual Check-in",
};
/**
* What a do-not-admit ticket reads wherever it is shown as a status of its own:
* the table's Check-in Status column, its mobile equivalent, and the detail
* panel's summary chip (frame 7397-100885). Deliberately NOT the wording of the
* panel's "Check-in Status > Status" row, which says "Prohibited" — see
* `TICKET_PANEL_STATUS`.
*/
export const TICKET_DO_NOT_ADMIT_LABEL = "Do not admit";
/**
* The Check-in Status ROW value in the detail panel. "Prohibited" is what a
* do-not-admit ticket reads there (frame 7397-100885) — everywhere else the
* state is spelled `TICKET_DO_NOT_ADMIT_LABEL`, so the two are deliberately
* different words for the same state.
*/
export const TICKET_PANEL_STATUS = {
prohibited: "Prohibited",
checkedIn: "Checked in",
expired: "Expired",
pending: "Pending",
} as const;
/**
* The panel's red banner, per frame 7420-209617 — a DIFFERENT copy set from the
* table's tooltips (`TICKET_INVALID_TOOLTIPS`): the Void line explains that the
* payment was voided before settling rather than declined. Refunded and
* Chargeback happen to read the same as their tooltips.
*/
export const TICKET_INVALID_BANNERS: Record<TicketInvalidReason, string> = {
voided:
"The payment was voided before it settled, so this ticket was never issued as valid for entry.",
refunded:
"This ticket was refunded to the original payment method and is no longer valid for entry.",
chargeback:
"The cardholder disputed this payment. The ticket stays invalid while the dispute is open.",
};
/** Tooltip copy per frame 7420-209772 — headings and body text are spec. */
export const TICKET_INVALID_TOOLTIPS: Record<
TicketInvalidReason,
{ heading: string; body: string }
> = {
voided: {
heading: "Voided",
body: "The payment was declined, this ticket was never issued as valid for entry.",
},
refunded: {
heading: "Refunded",
body: "This ticket was refunded to the original payment method and is no longer valid for entry.",
},
chargeback: {
heading: "Chargeback Issued",
body: "The cardholder disputed this payment. The ticket stays invalid while the dispute is open.",
},
};
|