From 5de4bb91008b2365d1d9d190bc0ee6667c5f76cb Mon Sep 17 00:00:00 2001 From: i701 Date: Sat, 5 Jul 2025 20:16:39 +0500 Subject: [PATCH] =?UTF-8?q?refactor:=20add=20topup=20expiry=20filter=20to?= =?UTF-8?q?=20the=20Topups=20component=20and=20simplify=20expired=20badge?= =?UTF-8?q?=20display=20in=20TopupsTable=20=F0=9F=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(dashboard)/top-ups/page.tsx | 19 +++++++++++++++++++ components/topups-table.tsx | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/app/(dashboard)/top-ups/page.tsx b/app/(dashboard)/top-ups/page.tsx index ad41ebc..6aaf80d 100644 --- a/app/(dashboard)/top-ups/page.tsx +++ b/app/(dashboard)/top-ups/page.tsx @@ -48,6 +48,25 @@ export default async function Topups({ }, ], }, + { + label: "Topup Expiry", + name: "is_expired", + type: "radio-group", + options: [ + { + label: "All", + value: "", + }, + { + label: "Expired", + value: "true", + }, + { + label: "Not Expired", + value: "false", + }, + ], + }, { label: "Topup Amount", name: "amount", diff --git a/components/topups-table.tsx b/components/topups-table.tsx index 24aad7b..739388e 100644 --- a/components/topups-table.tsx +++ b/components/topups-table.tsx @@ -125,7 +125,7 @@ export async function TopupsTable({ {topup.paid ? ( {topup.status} ) : topup.is_expired ? ( - Expired + Expired ) : ( {topup.status} )}