How to use the inflected.capitalize function in inflected

To help you get started, we’ve selected a few inflected examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neinteractiveliterature / intercode / app / javascript / Reports / EventProvidedTickets.jsx View on Github external
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>
  );
}
github neinteractiveliterature / intercode / app / javascript / Reports / AttendanceByPaymentAmount.jsx View on Github external
return a.ticket_type.name.localeCompare(b.ticket_type.name, { sensitivity: 'base' });
      }

      return (a.payment_amount.fractional || 0) - (b.payment_amount.fractional || 0);
    },
  );

  return (
    &lt;&gt;
      <h1>Attendance by payment amount</h1>

      
          {sortedRows.map(({ ticket_type: ticketType, payment_amount: paymentAmount, count }) =&gt; (
            
              {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&amp;filters.ticket=${ticketType.id}&amp;filters.payment_amount=${paymentAmount.fractional">
                  {count}
                </a></td></tr></tbody></table>
github neinteractiveliterature / intercode / app / javascript / TicketTypeAdmin / TicketTypesList.jsx View on Github external
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)';
}
github neinteractiveliterature / intercode / app / javascript / ConventionAdmin / ConventionFormBillingSection.jsx View on Github external
'text-monospace',
                { 'bg-warning-light': inputProps.onFocus != null },
              )}
              value={
                inputProps.onFocus
                  ? (inputProps.value || maskedStripeSecretKey)
                  : inputProps.value
              }
              disabled={disabled}
            /&gt;
          )}
        /&gt;
      

      
github neinteractiveliterature / intercode / app / javascript / BuiltInForms / TeamMemberForm.jsx View on Github external
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}
          /&gt;
        );
      }
    }

    return (
      <section>
        <div>
          <h5>{capitalize(pluralize(this.props.data.convention.ticket_name))}</h5>

          <p>{statusDescription}</p>

          {ticketingControls}
        </div>
      </section>
    );
  }
github neinteractiveliterature / intercode / app / javascript / EventsApp / TeamMemberAdmin / ProvideTicketModal.jsx View on Github external
eventId: event.id,
        userConProfileId: teamMember.user_con_profile.id,
        ticketTypeId,
      },
    });
    onClose();
  };

  if (getProvidableTicketTypes(convention).length &lt; 1) {
    return null;
  }

  return (
    
      <div>
        {capitalize(pluralize(convention.ticket_name))}
      </div>

      <div>
        {
          teamMember
            ? (
              &lt;&gt;
                <p>
                  
                </p>

                {
                  teamMember &amp;&amp; !teamMember.user_con_profile.ticket</div>
github neinteractiveliterature / intercode / app / javascript / EventsApp / EventList / EventCard.jsx View on Github external
}) =&gt; {
  const { myProfile } = useContext(AppRootContext);
  const formResponse = JSON.parse(event.form_response_attrs_json);
  const metadataItems = [];
  const rateEvent = useRateEvent();

  const displayTeamMembers = useMemo(
    () =&gt; teamMembersForDisplay(event),
    [event],
  );
  const teamMemberNames = displayTeamMembers
    .map((teamMember) =&gt; 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: (
        &lt;&gt;
          <strong>
            {teamMemberDescription}
            {':'}
          </strong>
          {' '}
          {teamMemberNames}
        
      ),
github neinteractiveliterature / intercode / app / javascript / Reports / EventsByChoice.jsx View on Github external
    .map((state) => `${capitalize(state)}: ${choiceData[state] || 0}`)
    .join('  ');
github neinteractiveliterature / intercode / app / javascript / TicketTypeAdmin / TicketTypesList.jsx View on Github external
<div>
        {renderPricingSchedule(ticketType, timezoneName)}
      </div>
    
  );

  const sortedTicketTypes = useMemo(
    () =&gt; sortTicketTypes(ticketTypes),
    [ticketTypes],
  );

  return (
    <div>
      <h1>
        {capitalize(ticketName)}
        {' '}
        types
      </h1>

      {sortedTicketTypes.map(renderTicketTypeDisplay)}

      
        New
        {' '}
        {ticketName}
        {' '}
        type
      
    </div>
  );
}