Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
data.convention.reports.event_provided_tickets,
({ provided_by_event: event, tickets }) => tickets.map((ticket) => ({ ticket, event })),
);
return sortByLocaleString(unsortedRows, (row) => row.ticket.user_con_profile.name_inverted);
},
[data],
);
return (
{sortedRows.map(({ ticket, event }) => (
))}
<table>
<thead>
<tr>
<th>User</th>
<th>Event</th>
<th>{capitalize(data.convention.ticket_name)}</th>
</tr>
</thead>
<tbody><tr>
<td>{ticket.user_con_profile.name_inverted}</td>
<td>{event.title}</td>
<td>{ticket.ticket_type.description}</td>
</tr></tbody>
</table>
);
}
return a.ticket_type.name.localeCompare(b.ticket_type.name, { sensitivity: 'base' });
}
return (a.payment_amount.fractional || 0) - (b.payment_amount.fractional || 0);
},
);
return (
<>
<h1>Attendance by payment amount</h1>
{sortedRows.map(({ ticket_type: ticketType, payment_amount: paymentAmount, count }) => (
{descriptionCell(ticketType, paymentAmount)}
<table>
<thead>
<tr>
<th>
{capitalize(data.convention.ticket_name)}
{' type'}
</th>
<th>Count</th>
<th>Revenue</th>
</tr>
</thead>
<tbody><tr><td>
<a href="{`/user_con_profiles?columns=name,email,ticket,privileges,payment_amount&filters.ticket=${ticketType.id}&filters.payment_amount=${paymentAmount.fractional">
{count}
</a></td></tr></tbody></table>
disabled={disabled}
/>
)}
/>
function describeTicketTypeOptions(ticketType, ticketName) {
let eventProvidedDescription;
if (ticketType.maximum_event_provided_tickets > 0) {
eventProvidedDescription = `events can provide up to ${pluralizeWithCount(ticketName, ticketType.maximum_event_provided_tickets)}`;
}
if (ticketType.publicly_available) {
if (eventProvidedDescription != null) {
return `Available for purchase by the general public and ${eventProvidedDescription}`;
}
return 'Available for purchase by the general public';
}
if (eventProvidedDescription != null) {
return capitalize(eventProvidedDescription);
}
return 'Private ticket type (cannot be purchased through the web)';
}
'text-monospace',
{ 'bg-warning-light': inputProps.onFocus != null },
)}
value={
inputProps.onFocus
? (inputProps.value || maskedStripeSecretKey)
: inputProps.value
}
disabled={disabled}
/>
)}
/>
caption=""
choices={[
{ label: `Don't provide a ${ticketName} at this time`, value: '' },
...choices,
]}
value={this.state.provideTicketTypeId == null ? '' : this.state.provideTicketTypeId.toString()}
onChange={this.provideTicketTypeIdChanged}
/>
);
}
}
return (
<section>
<div>
<h5>{capitalize(pluralize(this.props.data.convention.ticket_name))}</h5>
<p>{statusDescription}</p>
{ticketingControls}
</div>
</section>
);
}
eventId: event.id,
userConProfileId: teamMember.user_con_profile.id,
ticketTypeId,
},
});
onClose();
};
if (getProvidableTicketTypes(convention).length < 1) {
return null;
}
return (
<div>
{capitalize(pluralize(convention.ticket_name))}
</div>
<div>
{
teamMember
? (
<>
<p>
</p>
{
teamMember && !teamMember.user_con_profile.ticket</div>
}) => {
const { myProfile } = useContext(AppRootContext);
const formResponse = JSON.parse(event.form_response_attrs_json);
const metadataItems = [];
const rateEvent = useRateEvent();
const displayTeamMembers = useMemo(
() => teamMembersForDisplay(event),
[event],
);
const teamMemberNames = displayTeamMembers
.map((teamMember) => teamMember.user_con_profile.name_without_nickname).join(', ');
if (teamMemberNames) {
const teamMemberDescription = pluralizeWithCount(
capitalize(event.event_category.team_member_name),
event.team_members.length,
true,
);
metadataItems.push({
key: 'team_members',
content: (
<>
<strong>
{teamMemberDescription}
{':'}
</strong>
{' '}
{teamMemberNames}
),
.map((state) => `${capitalize(state)}: ${choiceData[state] || 0}`)
.join(' ');
<div>
{renderPricingSchedule(ticketType, timezoneName)}
</div>
);
const sortedTicketTypes = useMemo(
() => sortTicketTypes(ticketTypes),
[ticketTypes],
);
return (
<div>
<h1>
{capitalize(ticketName)}
{' '}
types
</h1>
{sortedTicketTypes.map(renderTicketTypeDisplay)}
New
{' '}
{ticketName}
{' '}
type
</div>
);
}