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 | 3x 3x 3x 2x 3x 2x 3x | /**
* @param {RideOrder} order
* @return {string}
*/
export function ridesSummary(order) {
let shortDescription = '';
let people = 'people';
if (order.ride.minHeight) {
shortDescription = ` (>= ${order.people.reduce((acc, person) => (acc.height < person.height ? acc : person)).height} cm)`;
}
if (order.people.length === 1) {
people = 'person';
}
return `${order.people.length} ${people} ${shortDescription} for the ${order.ride.name}, have fun!`;
}
|