mirror of
https://github.com/fosrl/pangolin.git
synced 2026-10-02 10:49:08 +02:00
Display the quantities again
This commit is contained in:
@@ -112,6 +112,54 @@ export function LicenseKeysDataTable({
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorKey: "quantity",
|
||||
friendlyName: t("users"),
|
||||
header: ({ column }) => {
|
||||
return (
|
||||
<Button
|
||||
variant="ghost"
|
||||
onClick={() =>
|
||||
column.toggleSorting(column.getIsSorted() === "asc")
|
||||
}
|
||||
>
|
||||
{t("users")}
|
||||
<ArrowUpDown className="ml-2 h-4 w-4" />
|
||||
</Button>
|
||||
);
|
||||
},
|
||||
cell: ({ row }) => {
|
||||
const quantity = row.original.quantity;
|
||||
if (quantity === undefined) {
|
||||
return "-";
|
||||
}
|
||||
return quantity < 0 ? t("licenseUnlimited") : quantity;
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorKey: "quantity_2",
|
||||
friendlyName: t("sites"),
|
||||
header: ({ column }) => {
|
||||
return (
|
||||
<Button
|
||||
variant="ghost"
|
||||
onClick={() =>
|
||||
column.toggleSorting(column.getIsSorted() === "asc")
|
||||
}
|
||||
>
|
||||
{t("sites")}
|
||||
<ArrowUpDown className="ml-2 h-4 w-4" />
|
||||
</Button>
|
||||
);
|
||||
},
|
||||
cell: ({ row }) => {
|
||||
const quantity = row.original.quantity_2;
|
||||
if (quantity === undefined) {
|
||||
return "-";
|
||||
}
|
||||
return quantity < 0 ? t("licenseUnlimited") : quantity;
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorKey: "terminateAt",
|
||||
friendlyName: t("licenseTableValidUntil"),
|
||||
|
||||
Reference in New Issue
Block a user