Display the name of the tables simulations #79

Merged
bustikiller merged 1 commits from arrangement-names into main 2024-11-03 07:54:10 +00:00
2 changed files with 4 additions and 2 deletions

View File

@ -37,6 +37,7 @@ export type Banana = {
export type TableArrangement = { export type TableArrangement = {
id: string; id: string;
number: number; number: number;
name: string;
guests?: Guest[]; guests?: Guest[];
discomfort?: number discomfort?: number
} }

View File

@ -16,6 +16,7 @@ export default function ArrangementsTable ({onArrangementSelected}: {onArrangeme
setArrangements(data.map((record: any) => { setArrangements(data.map((record: any) => {
return ({ return ({
id: record.id, id: record.id,
name: record.name,
discomfort: record.discomfort discomfort: record.discomfort
}); });
})); }));
@ -42,7 +43,7 @@ export default function ArrangementsTable ({onArrangementSelected}: {onArrangeme
<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">
ID Name
</th> </th>
<th scope="col" className="px-6 py-3"> <th scope="col" className="px-6 py-3">
Discomfort Discomfort
@ -56,7 +57,7 @@ export default function ArrangementsTable ({onArrangementSelected}: {onArrangeme
{arrangements.map((arrangement) => ( {arrangements.map((arrangement) => (
<tr key={arrangement.id} className="bg-white border-b odd:bg-white odd:dark:bg-gray-900 even:bg-gray-50 even:dark:bg-gray-800"> <tr key={arrangement.id} className="bg-white border-b odd:bg-white odd:dark:bg-gray-900 even:bg-gray-50 even:dark:bg-gray-800">
<th scope="row" className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"> <th scope="row" className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
{arrangement.id} {arrangement.name}
</th> </th>
<td className="px-6 py-4"> <td className="px-6 py-4">
{arrangement.discomfort} {arrangement.discomfort}