* fix: replace filter implementations on /insights * add authorization for teamIds * replace all the implementations * provide eventTypeId * remove log * fix teamId for isAll * fix Download button * remove legacy implementations * clean up * nullish check * remove unusable filters * revert style * fix type error * fix e2e test * fix type error * fix type error * fix e2e * extract util method * fix type error * fix type error * fix type error --------- Co-authored-by: Benny Joo <sldisek783@gmail.com>
30 lines
833 B
TypeScript
30 lines
833 B
TypeScript
import { useId } from "react";
|
|
|
|
import { Badge } from "@calcom/ui";
|
|
|
|
import type { RoutingFormTableRow } from "../lib/types";
|
|
import { CellWithOverflowX } from "./CellWithOverflowX";
|
|
|
|
export function BookedByCell({
|
|
attendees,
|
|
rowId,
|
|
}: {
|
|
attendees: RoutingFormTableRow["bookingAttendees"] | undefined;
|
|
rowId: number;
|
|
}) {
|
|
const cellId = useId();
|
|
if (!attendees || attendees.length === 0) return <div className="min-w-[200px]" />;
|
|
|
|
return (
|
|
<div className="flex min-w-[200px] flex-wrap gap-1">
|
|
{attendees.map((attendee) => (
|
|
<CellWithOverflowX key={`${cellId}-${attendee.email}-${rowId}`} className="w-[200px]">
|
|
<Badge variant="gray" className="whitespace-nowrap" title={attendee.email}>
|
|
{attendee.name}
|
|
</Badge>
|
|
</CellWithOverflowX>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|