/* Copyright (C) 2024 Manuel Bustillo*/ 'use client'; import { Group, GroupSerializer } from '@/app/lib/group'; import TableOfContents from '../components/table-of-contents'; import { PencilIcon, TrashIcon } from '@heroicons/react/24/outline'; import { AbstractApi } from '@/app/api/abstract-api'; export default function GroupsTable({ groups, onUpdate, onEdit }: { groups: Group[], onUpdate: () => void, onEdit: (group: Group) => void, }) { const api = new AbstractApi(); const serializer = new GroupSerializer(); return ( ( {group.name}
{group.attendance?.confirmed} {group.attendance?.tentative} {group.attendance?.invited} {group.attendance?.declined} {group.attendance?.considered} {group.attendance?.total}
{ api.destroy(serializer, group, onUpdate) }} /> onEdit(group)} />
)} /> ) }