Compare commits
5 Commits
5d1c9d75bc
...
29eb84e484
Author | SHA1 | Date | |
---|---|---|---|
![]() |
29eb84e484 | ||
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>
|
||||
|
@ -9,7 +9,7 @@
|
||||
"@heroicons/react": "^2.1.4",
|
||||
"@tailwindcss/forms": "^0.5.7",
|
||||
"@vercel/postgres": "^0.8.0",
|
||||
"autoprefixer": "10.4.19",
|
||||
"autoprefixer": "10.4.20",
|
||||
"bcrypt": "^5.1.1",
|
||||
"clsx": "^2.1.1",
|
||||
"next": "15.0.0-canary.56",
|
||||
|
53
pnpm-lock.yaml
generated
53
pnpm-lock.yaml
generated
@ -18,8 +18,8 @@ importers:
|
||||
specifier: ^0.8.0
|
||||
version: 0.8.0
|
||||
autoprefixer:
|
||||
specifier: 10.4.19
|
||||
version: 10.4.19(postcss@8.4.38)
|
||||
specifier: 10.4.20
|
||||
version: 10.4.20(postcss@8.4.38)
|
||||
bcrypt:
|
||||
specifier: ^5.1.1
|
||||
version: 5.1.1
|
||||
@ -400,8 +400,8 @@ packages:
|
||||
arg@5.0.2:
|
||||
resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==}
|
||||
|
||||
autoprefixer@10.4.19:
|
||||
resolution: {integrity: sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==}
|
||||
autoprefixer@10.4.20:
|
||||
resolution: {integrity: sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==}
|
||||
engines: {node: ^10 || ^12 || >=14}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@ -428,8 +428,8 @@ packages:
|
||||
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
browserslist@4.23.0:
|
||||
resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==}
|
||||
browserslist@4.23.3:
|
||||
resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==}
|
||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||
hasBin: true
|
||||
|
||||
@ -448,6 +448,9 @@ packages:
|
||||
caniuse-lite@1.0.30001632:
|
||||
resolution: {integrity: sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==}
|
||||
|
||||
caniuse-lite@1.0.30001651:
|
||||
resolution: {integrity: sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==}
|
||||
|
||||
chokidar@3.6.0:
|
||||
resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
|
||||
engines: {node: '>= 8.10.0'}
|
||||
@ -535,8 +538,8 @@ packages:
|
||||
eastasianwidth@0.2.0:
|
||||
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
||||
|
||||
electron-to-chromium@1.4.789:
|
||||
resolution: {integrity: sha512-0VbyiaXoT++Fi2vHGo2ThOeS6X3vgRCWrjPeO2FeIAWL6ItiSJ9BqlH8LfCXe3X1IdcG+S0iLoNaxQWhfZoGzQ==}
|
||||
electron-to-chromium@1.5.6:
|
||||
resolution: {integrity: sha512-jwXWsM5RPf6j9dPYzaorcBSUg6AiqocPEyMpkchkvntaH9HGfOOMZwxMJjDY/XEs3T5dM7uyH1VhRMkqUU9qVw==}
|
||||
|
||||
emoji-regex@8.0.0:
|
||||
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
||||
@ -794,8 +797,8 @@ packages:
|
||||
resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==}
|
||||
hasBin: true
|
||||
|
||||
node-releases@2.0.14:
|
||||
resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==}
|
||||
node-releases@2.0.18:
|
||||
resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==}
|
||||
|
||||
nopt@5.0.0:
|
||||
resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==}
|
||||
@ -1135,8 +1138,8 @@ packages:
|
||||
undici-types@5.26.5:
|
||||
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
||||
|
||||
update-browserslist-db@1.0.16:
|
||||
resolution: {integrity: sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==}
|
||||
update-browserslist-db@1.1.0:
|
||||
resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
browserslist: '>= 4.21.0'
|
||||
@ -1480,10 +1483,10 @@ snapshots:
|
||||
|
||||
arg@5.0.2: {}
|
||||
|
||||
autoprefixer@10.4.19(postcss@8.4.38):
|
||||
autoprefixer@10.4.20(postcss@8.4.38):
|
||||
dependencies:
|
||||
browserslist: 4.23.0
|
||||
caniuse-lite: 1.0.30001632
|
||||
browserslist: 4.23.3
|
||||
caniuse-lite: 1.0.30001651
|
||||
fraction.js: 4.3.7
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.0.1
|
||||
@ -1515,12 +1518,12 @@ snapshots:
|
||||
dependencies:
|
||||
fill-range: 7.1.1
|
||||
|
||||
browserslist@4.23.0:
|
||||
browserslist@4.23.3:
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001632
|
||||
electron-to-chromium: 1.4.789
|
||||
node-releases: 2.0.14
|
||||
update-browserslist-db: 1.0.16(browserslist@4.23.0)
|
||||
caniuse-lite: 1.0.30001651
|
||||
electron-to-chromium: 1.5.6
|
||||
node-releases: 2.0.18
|
||||
update-browserslist-db: 1.1.0(browserslist@4.23.3)
|
||||
|
||||
bufferutil@4.0.8:
|
||||
dependencies:
|
||||
@ -1534,6 +1537,8 @@ snapshots:
|
||||
|
||||
caniuse-lite@1.0.30001632: {}
|
||||
|
||||
caniuse-lite@1.0.30001651: {}
|
||||
|
||||
chokidar@3.6.0:
|
||||
dependencies:
|
||||
anymatch: 3.1.3
|
||||
@ -1609,7 +1614,7 @@ snapshots:
|
||||
|
||||
eastasianwidth@0.2.0: {}
|
||||
|
||||
electron-to-chromium@1.4.789: {}
|
||||
electron-to-chromium@1.5.6: {}
|
||||
|
||||
emoji-regex@8.0.0: {}
|
||||
|
||||
@ -1843,7 +1848,7 @@ snapshots:
|
||||
|
||||
node-gyp-build@4.8.1: {}
|
||||
|
||||
node-releases@2.0.14: {}
|
||||
node-releases@2.0.18: {}
|
||||
|
||||
nopt@5.0.0:
|
||||
dependencies:
|
||||
@ -2187,9 +2192,9 @@ snapshots:
|
||||
|
||||
undici-types@5.26.5: {}
|
||||
|
||||
update-browserslist-db@1.0.16(browserslist@4.23.0):
|
||||
update-browserslist-db@1.1.0(browserslist@4.23.3):
|
||||
dependencies:
|
||||
browserslist: 4.23.0
|
||||
browserslist: 4.23.3
|
||||
escalade: 3.1.2
|
||||
picocolors: 1.0.1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user