Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function formatBucket(signup, event) {
const { bucket_key: bucketKey } = signup;
if (!signup.counted) {
if (bucketKey) {
return `${findBucket(bucketKey, event.registration_policy).name} (not counted)`;
}
if (event.team_members
.some((teamMember) => teamMember.user_con_profile.id === signup.user_con_profile.id)
) {
return `${humanize(underscore(event.event_category.team_member_name))} (not counted)`;
}
if (signup.state === 'waitlisted') {
const requestedBucket = findBucket(signup.requested_bucket_key, event.registration_policy);
if (requestedBucket) {
return `Waitlisted (requested ${requestedBucket.name})`;
}
return 'Waitlisted (no preference)';
}
return 'Not counted';
}
const bucket = findBucket(bucketKey, event.registration_policy);
const requestedBucket = findBucket(signup.requested_bucket_key, event.registration_policy);
return (
{signup.user_con_profile.name_inverted}
{
isTeamMember(signup, teamMembers)
? (
<strong>
{' ('}
{humanize(underscore(teamMemberName))}
{')'}
</strong>
)
: null
}
{humanize(signup.state)}
{waitlistPosition}
{suffix}
);
};
export function formatSignupStatus(signup, event) {
if (signup.state === 'confirmed') {
return formatBucket(signup, event);
}
const requestedBucket = findBucket(signup.requested_bucket_key, event.registration_policy);
if (requestedBucket) {
return `${humanize(signup.state)} (requested ${requestedBucket.name})`;
}
return humanize(signup.state);
}
function TicketStatusCell({ value }) {
if (!value) {
return 'Unpaid';
}
return humanize(value.ticket_type.name);
}
<dt>{item.public_description}</dt>
<dd>
</dd>
))}
{
displayTeamMembers.length > 0
? (
<>
<dt>{pluralize(humanize(underscore(event.event_category.team_member_name)))}</dt>
<dd>
<ul>
{displayTeamMembers.map((teamMember) => (
<li>
{teamMember.user_con_profile.name_without_nickname}
{
teamMember.email
? (
<>
{' '}
(
<a href="{`mailto:${teamMember.email}`}">
{teamMember.email}
</a>
)
</li></ul></dd>
{product.payment_options.map((paymentOption) => (
<i title="{humanize(paymentOption)}">
))}
</i>
function StandardItemMetadata() {
const { formType } = useContext(FormEditorContext);
const { standardItem } = useContext(FormItemEditorContext);
return (
<>
<div>
<i>
{' '}
<strong>{standardItem.description || humanize(standardItem.identifier)}</strong>
</i></div><i>
<div>
<small>
Standard item for
{' '}
{pluralize(formType.description)}
</small>
</div>
);
}
</i>
.map((category) => (
<option value="{category.id}">{humanize(category.name)}</option>
));
return [...currentIncludes].sort().map((include) => {
if (include === 'teamMembers') {
return humanize(underscore(pluralize(
data.event.event_category.team_member_name,
)));
}
return humanize(underscore(include));
}).join(', ');
}}
if (!ticketTypes.some((ticketType) => ticketType.publicly_available)) {
return null;
}
return (
<li>
<span>
Buy a
{' '}
{ticketName}
!
</span>
<span>
{humanize(ticketName)}
!
</span>
</li>
);
}