Compare commits
1 Commits
bca0ae54f4
...
7c0409deb5
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7c0409deb5 |
@ -9,6 +9,7 @@ import React, { useState, useEffect } from 'react';
|
|||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
|
<h1 className={`${lusitana.className} text-2xl py-4`}>Groups</h1>
|
||||||
<AffinityGroupsTree />
|
<AffinityGroupsTree />
|
||||||
|
|
||||||
<h1 className={`${lusitana.className} text-2xl py-4`}>Guests</h1>
|
<h1 className={`${lusitana.className} text-2xl py-4`}>Guests</h1>
|
||||||
|
@ -21,7 +21,6 @@ export type Guest = {
|
|||||||
name: string;
|
name: string;
|
||||||
email: string;
|
email: string;
|
||||||
group_name: string;
|
group_name: string;
|
||||||
status: 'Considered' | 'Invited' | 'Confirmed' | 'Declined';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Group = {
|
export type Group = {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import { Guest } from '@/app/lib/definitions';
|
import { Guest } from '@/app/lib/definitions';
|
||||||
import { useState, Suspense, useEffect } from 'react';
|
import { useState, Suspense, useEffect } from 'react';
|
||||||
import clsx from 'clsx';
|
|
||||||
|
|
||||||
export default function guestsTable() {
|
export default function guestsTable() {
|
||||||
|
|
||||||
@ -20,8 +19,7 @@ export default function guestsTable() {
|
|||||||
id: record.id,
|
id: record.id,
|
||||||
name: record.attributes.name,
|
name: record.attributes.name,
|
||||||
email: record.attributes.email,
|
email: record.attributes.email,
|
||||||
group_name: record.attributes.group_name,
|
group_name: record.attributes.group_name
|
||||||
status: record.attributes.status
|
|
||||||
});
|
});
|
||||||
}))
|
}))
|
||||||
});
|
});
|
||||||
@ -29,13 +27,8 @@ export default function guestsTable() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full relative overflow-x-auto shadow-md sm:rounded-lg">
|
<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">
|
<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">
|
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" className="px-6 py-3">
|
<th scope="col" className="px-6 py-3">
|
||||||
@ -47,9 +40,6 @@ export default function guestsTable() {
|
|||||||
<th scope="col" className="px-6 py-3">
|
<th scope="col" className="px-6 py-3">
|
||||||
Group
|
Group
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-6 py-3">
|
|
||||||
Status
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -65,22 +55,6 @@ export default function guestsTable() {
|
|||||||
<td className="px-6 py-4">
|
<td className="px-6 py-4">
|
||||||
{guest.group_name}
|
{guest.group_name}
|
||||||
</td>
|
</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>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user