mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-11 06:44:13 +00:00
✨ policies table
This commit is contained in:
@@ -20,6 +20,7 @@ import { MoreHorizontal, ArrowRight } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { ControlledDataTable } from "./ui/controlled-data-table";
|
||||
import { useDebouncedCallback } from "use-debounce";
|
||||
import { Badge } from "./ui/badge";
|
||||
|
||||
type ResourcePolicyRow = ListResourcePoliciesResponse["policies"][number];
|
||||
|
||||
@@ -70,7 +71,25 @@ export function ResourcePoliciesTable({
|
||||
accessorKey: "name",
|
||||
enableHiding: false,
|
||||
friendlyName: t("name"),
|
||||
header: () => <span className="p-3">{t("name")}</span>
|
||||
header: () => <span className="p-3">{t("name")}</span>,
|
||||
cell({ row }) {
|
||||
const r = row.original;
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
<span>{r.name}</span>
|
||||
{r.isDefault && (
|
||||
<>
|
||||
<Badge
|
||||
variant="outlinePrimary"
|
||||
className="flex items-center gap-1"
|
||||
>
|
||||
{t("resourcePoliciesDefaultBadgeText")}
|
||||
</Badge>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "niceId",
|
||||
|
||||
Reference in New Issue
Block a user