Download CSV is now also allowed for Agent and Corporates

This commit is contained in:
Joao Ramos
2024-01-11 14:18:04 +00:00
parent 14d8c1e294
commit a91539ec61

View File

@@ -784,18 +784,20 @@ export default function PaymentRecord() {
<div className="w-full flex flex-end justify-between p-2">
<h1 className="text-2xl font-semibold">Payment Record</h1>
{(user.type === "developer" || user.type === "admin") && (
<div className="flex justify-end gap-2">
<div className="flex justify-end gap-2">
{(user.type === "developer" || user.type === "admin" || user.type === 'agent' || user.type === 'corporate') && (
<Button className="max-w-[200px]" variant="outline">
<CSVLink data={csvRows} headers={csvColumns} filename="payment-records.csv">
Download CSV
</CSVLink>
</Button>
)}
{(user.type === "developer" || user.type === "admin") && (
<Button className="max-w-[200px]" variant="outline" onClick={() => setIsCreatingPayment(true)}>
New Payment
</Button>
</div>
)}
)}
</div>
</div>
<div className={clsx("grid grid-cols-1 md:grid-cols-2 gap-8 w-full", user.type !== "corporate" && "lg:grid-cols-3")}>
<div className="flex flex-col gap-3 w-full">