Compare commits
5 Commits
c3d7d2f640
...
98493111c0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
98493111c0 | ||
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>
|
||||
|
@ -26,7 +26,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
"@types/node": "20.14.8",
|
||||
"@types/node": "20.14.15",
|
||||
"@types/react": "18.3.3",
|
||||
"@types/react-dom": "18.3.0"
|
||||
},
|
||||
|
14
pnpm-lock.yaml
generated
14
pnpm-lock.yaml
generated
@ -64,8 +64,8 @@ importers:
|
||||
specifier: ^5.0.2
|
||||
version: 5.0.2
|
||||
'@types/node':
|
||||
specifier: 20.14.8
|
||||
version: 20.14.8
|
||||
specifier: 20.14.15
|
||||
version: 20.14.15
|
||||
'@types/react':
|
||||
specifier: 18.3.3
|
||||
version: 18.3.3
|
||||
@ -337,8 +337,8 @@ packages:
|
||||
'@types/cookie@0.6.0':
|
||||
resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
|
||||
|
||||
'@types/node@20.14.8':
|
||||
resolution: {integrity: sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA==}
|
||||
'@types/node@20.14.15':
|
||||
resolution: {integrity: sha512-Fz1xDMCF/B00/tYSVMlmK7hVeLh7jE5f3B7X1/hmV0MJBwE27KlS7EvD/Yp+z1lm8mVhwV5w+n8jOZG8AfTlKw==}
|
||||
|
||||
'@types/pg@8.6.6':
|
||||
resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==}
|
||||
@ -1410,17 +1410,17 @@ snapshots:
|
||||
|
||||
'@types/bcrypt@5.0.2':
|
||||
dependencies:
|
||||
'@types/node': 20.14.8
|
||||
'@types/node': 20.14.15
|
||||
|
||||
'@types/cookie@0.6.0': {}
|
||||
|
||||
'@types/node@20.14.8':
|
||||
'@types/node@20.14.15':
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
|
||||
'@types/pg@8.6.6':
|
||||
dependencies:
|
||||
'@types/node': 20.14.8
|
||||
'@types/node': 20.14.15
|
||||
pg-protocol: 1.6.1
|
||||
pg-types: 2.2.0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user