feat: update Topup interface with status and paid_at fields; modify table display for topup details

This commit is contained in:
2025-07-05 17:53:32 +05:00
parent a41be97cdf
commit ef7121f247
3 changed files with 18 additions and 25 deletions

View File

@ -93,7 +93,7 @@ export default function TopupToPay({ topup, disabled }: { topup?: Topup, disable
</TableCaption>
<TableBody className="">
<TableRow>
<TableCell>Topup created at</TableCell>
<TableCell>Topup created</TableCell>
<TableCell className="text-right text-muted-foreground">
{new Date(topup?.created_at ?? "").toLocaleDateString("en-US", {
month: "short",
@ -106,22 +106,24 @@ export default function TopupToPay({ topup, disabled }: { topup?: Topup, disable
</TableCell>
</TableRow>
<TableRow>
<TableCell>Topup expires at</TableCell>
<TableCell>Payment received</TableCell>
<TableCell className="text-right text-sarLinkOrange">
{new Date(topup?.expires_at ?? "").toLocaleDateString("en-US", {
month: "short",
day: "2-digit",
year: "numeric",
minute: "2-digit",
hour: "2-digit",
second: "2-digit",
})}
{topup?.paid_at
? new Date(topup.paid_at).toLocaleDateString("en-US", {
month: "short",
day: "2-digit",
year: "numeric",
minute: "2-digit",
hour: "2-digit",
second: "2-digit",
})
: "-"}
</TableCell>
</TableRow>
<TableRow>
<TableCell>MIB Reference</TableCell>
<TableCell className="text-right">
{topup?.mib_reference ? topup.mib_reference : "N/A"}
{topup?.mib_reference ? topup.mib_reference : "-"}
</TableCell>
</TableRow>
</TableBody>