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 ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
import {Attendee, Product, ProductPriceType} from "../types.ts";
export const getAttendeeProductTitle = (attendee: Attendee, product: Product): string => {
if (product.type !== ProductPriceType.Tiered) {
return product.title;
}
const productPrice = product.prices
?.find(price => price.id === attendee.product_price_id);
return product.title + (productPrice?.label ? ` - ${productPrice.label}` : '');
}
export const getAttendeeProductPrice = (attendee: Attendee, product: Product): number => {
const productPrice = product.prices
?.find(price => price.id === attendee.product_price_id);
return productPrice?.price ?? 0;
}