💄 filter by approval state

This commit is contained in:
Fred KISSIE
2026-01-14 02:24:11 +01:00
parent 4c78e93143
commit d5b6a426a9
4 changed files with 61 additions and 19 deletions

View File

@@ -36,15 +36,11 @@ export function ApprovalFeed({ orgId }: ApprovalFeedProps) {
);
const { data, isFetching, refetch } = useQuery(
approvalQueries.listApprovals(orgId)
approvalQueries.listApprovals(orgId, filters)
);
const approvals = data?.approvals ?? [];
console.log({
approvals
});
return (
<div className="flex flex-col gap-5">
<Card className="">
@@ -75,11 +71,16 @@ export function ApprovalFeed({ orgId }: ApprovalFeedProps) {
/>
</SelectTrigger>
<SelectContent className="w-full">
<SelectItem value="pending">Pending</SelectItem>
<SelectItem value="approved">
Approved
<SelectItem value="pending">
{t("pending")}
</SelectItem>
<SelectItem value="all">All</SelectItem>
<SelectItem value="approved">
{t("approved")}
</SelectItem>
<SelectItem value="denied">
{t("denied")}
</SelectItem>
<SelectItem value="all">{t("all")}</SelectItem>
</SelectContent>
</Select>
</div>