diff --git a/README.md b/README.md
index 071e69e..5d7f9a0 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,7 @@ This is a web portal for SAR Link customers.
## Admin Controls
### Users
- [x] Show users table
+- [ ] handle verify api no response case
- [ ] Add all relavant filters for users table
- [x] Verify or reject users with a custom message
- [ ] Add functionality to send custom sms to users in user:id page
@@ -40,6 +41,6 @@ This is a web portal for SAR Link customers.
- [x] Add all relevant filters for user devices table
### User Payments
-- [ ] Show user payments table
-- [ ] Add relevant filters for user payments table
+- [x] Show user payments table
+- [x] Add relevant filters for user payments table
- [ ] Add computation of total value for filtered results
\ No newline at end of file
diff --git a/actions/payment.ts b/actions/payment.ts
index f21e3f2..1a35f27 100644
--- a/actions/payment.ts
+++ b/actions/payment.ts
@@ -93,7 +93,7 @@ type GetPaymentProps = {
[key: string]: string | number | undefined; // Allow additional properties for flexibility
};
-export async function getPayments(params: GetPaymentProps) {
+export async function getPayments(params: GetPaymentProps, allPayments = false) {
// Build query string from all defined params
const query = Object.entries(params)
.filter(([_, value]) => value !== undefined && value !== "")
@@ -101,7 +101,7 @@ export async function getPayments(params: GetPaymentProps) {
.join("&");
const session = await getServerSession(authOptions);
const response = await fetch(
- `${process.env.SARLINK_API_BASE_URL}/api/billing/payment/?${query}`,
+ `${process.env.SARLINK_API_BASE_URL}/api/billing/payment/?${query}&all_payments=${allPayments}`,
{
method: "GET",
headers: {
diff --git a/app/(dashboard)/user-payments/page.tsx b/app/(dashboard)/user-payments/page.tsx
index ccd08b5..788b390 100644
--- a/app/(dashboard)/user-payments/page.tsx
+++ b/app/(dashboard)/user-payments/page.tsx
@@ -1,5 +1,6 @@
import { Suspense } from "react";
import { UsersPaymentsTable } from "@/components/admin/user-payments-table";
+import DynamicFilter from "@/components/generic-filter";
export default async function UserPayments({
searchParams,
@@ -18,6 +19,62 @@ export default async function UserPayments({