mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-27 23:30:21 +00:00
feat(admin): add admin payment tables + filters✨
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Has been cancelled
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Has been cancelled
This commit is contained in:
@ -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: {
|
||||
|
Reference in New Issue
Block a user