-
-
Notifications
You must be signed in to change notification settings - Fork 594
Expand file tree
/
Copy pathindex.tsx
More file actions
38 lines (36 loc) · 1.68 KB
/
index.tsx
File metadata and controls
38 lines (36 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import {ActionIcon, Avatar, Tooltip} from "@mantine/core";
import {getInitials} from "../../../utilites/helpers.ts";
import Truncate from "../Truncate";
import {NavLink} from "react-router-dom";
import {IconEye} from "@tabler/icons-react";
import classes from './AttendeeList.module.scss';
import {Order, Ticket} from "../../../types.ts";
import {t} from "@lingui/macro";
export const AttendeeList = ({order, tickets}: { order: Order, tickets: Ticket[] }) => {
return (
<div className={classes.attendeeList}>
{order.attendees?.map(attendee => (
<div className={classes.attendee} key={`${attendee.id}`}>
<Avatar size={40}>
{getInitials(attendee.first_name + ' ' + attendee.last_name)}
</Avatar>
<div className={classes.attendeeName}>
{attendee.first_name + ' ' + attendee.last_name}
<div className={classes.ticketName}>
<Truncate text={tickets?.find(ticket => ticket.id === attendee.ticket_id)?.title}/>
</div>
</div>
<div className={classes.viewAttendee}>
<Tooltip label={t`Navigate to Attendee`} position={'bottom'} withArrow>
<NavLink to={`../attendees?query=${attendee.public_id}`}>
<ActionIcon variant={'light'}>
<IconEye/>
</ActionIcon>
</NavLink>
</Tooltip>
</div>
</div>
))}
</div>
)
}