Compare commits
5 Commits
0b1d65a9bf
...
29ff68e532
Author | SHA1 | Date | |
---|---|---|---|
![]() |
29ff68e532 | ||
36f8e63c4a | |||
ef8fb9c7f3 | |||
34c92e758d | |||
a9613711eb |
@ -9,7 +9,6 @@ import React, { useState, useEffect } from 'react';
|
||||
export default function Page() {
|
||||
return (
|
||||
<div className="w-full">
|
||||
<h1 className={`${lusitana.className} text-2xl py-4`}>Groups</h1>
|
||||
<AffinityGroupsTree />
|
||||
|
||||
<h1 className={`${lusitana.className} text-2xl py-4`}>Guests</h1>
|
||||
|
@ -21,6 +21,7 @@ export type Guest = {
|
||||
name: string;
|
||||
email: string;
|
||||
group_name: string;
|
||||
status: 'Considered' | 'Invited' | 'Confirmed' | 'Declined';
|
||||
}
|
||||
|
||||
export type Group = {
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
import { Guest } from '@/app/lib/definitions';
|
||||
import { useState, Suspense, useEffect } from 'react';
|
||||
import clsx from 'clsx';
|
||||
|
||||
export default function guestsTable() {
|
||||
|
||||
@ -19,7 +20,8 @@ export default function guestsTable() {
|
||||
id: record.id,
|
||||
name: record.attributes.name,
|
||||
email: record.attributes.email,
|
||||
group_name: record.attributes.group_name
|
||||
group_name: record.attributes.group_name,
|
||||
status: record.attributes.status
|
||||
});
|
||||
}))
|
||||
});
|
||||
@ -27,8 +29,13 @@ export default function guestsTable() {
|
||||
|
||||
return (
|
||||
<div className="w-full relative overflow-x-auto shadow-md sm:rounded-lg">
|
||||
<p className="py-3">There are {guests.length} guests in the list</p>
|
||||
<table className="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
||||
<caption className="p-5 text-lg font-semibold text-left rtl:text-right text-gray-900 bg-white dark:text-white dark:bg-gray-800">
|
||||
Guests
|
||||
<p className="mt-1 text-sm font-normal text-gray-500 dark:text-gray-400">
|
||||
There are {guests.length} guests in the list
|
||||
</p>
|
||||
</caption>
|
||||
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||
<tr>
|
||||
<th scope="col" className="px-6 py-3">
|
||||
@ -40,6 +47,9 @@ export default function guestsTable() {
|
||||
<th scope="col" className="px-6 py-3">
|
||||
Group
|
||||
</th>
|
||||
<th scope="col" className="px-6 py-3">
|
||||
Status
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -55,6 +65,22 @@ export default function guestsTable() {
|
||||
<td className="px-6 py-4">
|
||||
{guest.group_name}
|
||||
</td>
|
||||
<td className="px-6 py-4">
|
||||
<span className="flex items-center text-sm dark:text-white me-3">
|
||||
<span className={clsx(
|
||||
'flex w-2.5 h-2.5 rounded-full me-1.5 flex-shrink-0',
|
||||
{
|
||||
'bg-gray-400': guest.status === 'Considered',
|
||||
'bg-blue-400': guest.status === 'Invited',
|
||||
'bg-green-600': guest.status === 'Confirmed',
|
||||
'bg-red-400': guest.status === 'Declined',
|
||||
}
|
||||
)}>
|
||||
{/* <span className="flex w-2.5 h-2.5 rounded-full me-1.5 flex-shrink-0 bg-blue-600"> */}
|
||||
</span>
|
||||
{guest.status}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</Suspense>
|
||||
|
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@ -10,7 +10,7 @@ importers:
|
||||
dependencies:
|
||||
'@heroicons/react':
|
||||
specifier: ^2.1.4
|
||||
version: 2.1.4(react@19.0.0-rc-f38c22b244-20240704)
|
||||
version: 2.1.5(react@19.0.0-rc-f38c22b244-20240704)
|
||||
'@tailwindcss/forms':
|
||||
specifier: ^0.5.7
|
||||
version: 0.5.7(tailwindcss@3.4.4)
|
||||
@ -100,8 +100,8 @@ packages:
|
||||
'@emnapi/runtime@1.2.0':
|
||||
resolution: {integrity: sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ==}
|
||||
|
||||
'@heroicons/react@2.1.4':
|
||||
resolution: {integrity: sha512-ju0wj0wwrUTMQ2Yceyrma7TKuI3BpSjp+qKqV81K9KGcUHdvTMdiwfRc2cwXBp3uXtKuDZkh0v03nWOQnJFv2Q==}
|
||||
'@heroicons/react@2.1.5':
|
||||
resolution: {integrity: sha512-FuzFN+BsHa+7OxbvAERtgBTNeZpUjgM/MIizfVkSCL2/edriN0Hx/DWRCR//aPYwO5QX/YlgLGXk+E3PcfZwjA==}
|
||||
peerDependencies:
|
||||
react: '>= 16'
|
||||
|
||||
@ -1229,7 +1229,7 @@ snapshots:
|
||||
tslib: 2.6.3
|
||||
optional: true
|
||||
|
||||
'@heroicons/react@2.1.4(react@19.0.0-rc-f38c22b244-20240704)':
|
||||
'@heroicons/react@2.1.5(react@19.0.0-rc-f38c22b244-20240704)':
|
||||
dependencies:
|
||||
react: 19.0.0-rc-f38c22b244-20240704
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user