Improvements for certificates table, adds expansion object to certificates

This commit is contained in:
Jamie Curnow
2023-01-14 09:45:08 +10:00
parent 6c76c041c4
commit 456c59c746
9 changed files with 95 additions and 22 deletions

View File

@ -3,7 +3,10 @@ import { useEffect, useMemo } from "react";
import {
tableEvents,
ActionsFormatter,
CertificateStatusFormatter,
GravatarFormatter,
IDFormatter,
MonospaceFormatter,
TableFilter,
TableLayout,
TablePagination,
@ -41,6 +44,11 @@ function CertificatesTable({
}: CertificatesTableProps) {
const [columns, tableData] = useMemo(() => {
const columns = [
{
accessor: "user.gravatarUrl",
Cell: GravatarFormatter(),
className: "w-80",
},
{
Header: intl.formatMessage({ id: "column.id" }),
accessor: "id",
@ -53,6 +61,7 @@ function CertificatesTable({
accessor: "name",
sortable: true,
Filter: TextFilter,
Cell: MonospaceFormatter(),
},
{
Header: intl.formatMessage({ id: "column.validation-type" }),
@ -65,6 +74,7 @@ function CertificatesTable({
accessor: "status",
sortable: true,
Filter: TextFilter,
Cell: CertificateStatusFormatter(),
},
{
id: "actions",