Skip to content

Commit 84f9521

Browse files
committed
Style updates
1 parent e7dfc50 commit 84f9521

File tree

3 files changed

+62
-35
lines changed

3 files changed

+62
-35
lines changed

frontend/src/components/common/AttendeeTable/AttendeeTable.module.scss

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,32 @@
115115
}
116116
}
117117

118+
.statusBadge {
119+
display: inline-flex;
120+
align-items: center;
121+
gap: 4px;
122+
padding: 6px 12px;
123+
border-radius: 6px;
124+
font-size: 12px;
125+
font-weight: 600;
126+
white-space: nowrap;
127+
128+
&[data-status="ACTIVE"] {
129+
background: var(--mantine-color-green-1);
130+
color: var(--mantine-color-green-9);
131+
}
132+
133+
&[data-status="AWAITING_PAYMENT"] {
134+
background: var(--mantine-color-yellow-1);
135+
color: var(--mantine-color-yellow-9);
136+
}
137+
138+
&[data-status="CANCELLED"] {
139+
background: var(--mantine-color-red-1);
140+
color: var(--mantine-color-red-9);
141+
}
142+
}
143+
118144
.actionsMenu {
119145
display: flex;
120146
align-items: center;

frontend/src/components/common/AttendeeTable/index.tsx

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ import {ActionIcon, Anchor, Avatar, Button, Group, Popover, Tooltip} from '@mant
22
import {Attendee, IdParam, MessageType} from "../../../types.ts";
33
import {
44
IconCheck,
5+
IconClock,
56
IconClipboardList,
67
IconCopy,
78
IconMailForward,
89
IconNote,
910
IconPlus,
1011
IconSend,
1112
IconTrash,
12-
IconUserCog
13+
IconUserCog,
14+
IconX
1315
} from "@tabler/icons-react";
1416
import {getInitials, getProductFromEvent} from "../../../utilites/helpers.ts";
1517
import {useClipboard, useDisclosure} from "@mantine/hooks";
@@ -29,7 +31,6 @@ import {useResendAttendeeTicket} from "../../../mutations/useResendAttendeeTicke
2931
import {ManageAttendeeModal} from "../../modals/ManageAttendeeModal";
3032
import {ManageOrderModal} from "../../modals/ManageOrderModal";
3133
import {ActionMenu} from '../ActionMenu';
32-
import {AttendeeStatusBadge} from "../AttendeeStatusBadge";
3334
import {CheckInStatusModal} from "../CheckInStatusModal";
3435
import {prettyDate} from "../../../utilites/dates.ts";
3536
import {TanStackTable, TanStackTableColumn} from "../TanStackTable";
@@ -292,7 +293,31 @@ export const AttendeeTable = ({attendees, openCreateModal}: AttendeeTableProps)
292293
id: 'status',
293294
header: t`Status`,
294295
enableHiding: true,
295-
cell: (info: CellContext<Attendee, unknown>) => <AttendeeStatusBadge attendee={info.row.original}/>,
296+
cell: (info: CellContext<Attendee, unknown>) => {
297+
const attendee = info.row.original;
298+
return (
299+
<div className={classes.statusBadge} data-status={attendee.status}>
300+
{attendee.status === 'ACTIVE' && (
301+
<>
302+
<IconCheck size={14}/>
303+
{t`Active`}
304+
</>
305+
)}
306+
{attendee.status === 'AWAITING_PAYMENT' && (
307+
<>
308+
<IconClock size={14}/>
309+
{t`Awaiting Payment`}
310+
</>
311+
)}
312+
{attendee.status === 'CANCELLED' && (
313+
<>
314+
<IconX size={14}/>
315+
{t`Cancelled`}
316+
</>
317+
)}
318+
</div>
319+
);
320+
},
296321
meta: {
297322
headerStyle: {minWidth: 120},
298323
},

frontend/src/components/common/TanStackTable/TanStackTable.module.scss

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -66,28 +66,18 @@
6666
bottom: 0;
6767
width: 1px;
6868
background: linear-gradient(
69-
to right,
70-
rgba(0, 0, 0, 0.1),
71-
rgba(0, 0, 0, 0)
69+
to right,
70+
rgba(255, 255, 255, 0.1),
71+
rgba(255, 255, 255, 0)
7272
);
7373
pointer-events: none;
7474
}
75-
76-
@media (prefers-color-scheme: dark) {
77-
&::after {
78-
background: linear-gradient(
79-
to right,
80-
rgba(255, 255, 255, 0.1),
81-
rgba(255, 255, 255, 0)
82-
);
83-
}
84-
}
8575
}
8676

8777
.stickyRight {
8878
position: sticky;
8979
right: 0;
90-
z-index: 9;
80+
z-index: 2;
9181
background: var(--mantine-color-body);
9282

9383
&::before {
@@ -98,29 +88,15 @@
9888
bottom: 0;
9989
width: 1px;
10090
background: linear-gradient(
101-
to left,
102-
rgba(0, 0, 0, 0.1),
103-
rgba(0, 0, 0, 0)
91+
to left,
92+
rgba(255, 255, 255, 0.1),
93+
rgba(255, 255, 255, 0)
10494
);
10595
pointer-events: none;
10696
}
107-
108-
@media (prefers-color-scheme: dark) {
109-
&::before {
110-
background: linear-gradient(
111-
to left,
112-
rgba(255, 255, 255, 0.1),
113-
rgba(255, 255, 255, 0)
114-
);
115-
}
116-
}
11797
}
11898

11999
.tableHead .stickyLeft,
120100
.tableHead .stickyRight {
121-
background-color: #462e7812;
122-
123-
@media (prefers-color-scheme: dark) {
124-
background-color: #f2f0f5;
125-
}
101+
background-color: #f2f0f5;
126102
}

0 commit comments

Comments
 (0)