feat: update cancelTopup API call to use PATCH method and enhance success message with topup details

This commit is contained in:
2025-07-06 19:59:27 +05:00
parent d4993530f7
commit b9d8e56c3c
3 changed files with 20 additions and 24 deletions

View File

@ -203,16 +203,18 @@ function MobileTopupDetails({ topup }: { topup: Topup }) {
View Details
</Button>
</Link>
<Badge
className={cn(
topup?.paid
? "text-green-500 bg-green-500/20"
: "text-yellow-500 bg-yellow-500/20",
)}
variant={topup.paid ? "outline" : "secondary"}
>
{topup.paid ? "Paid" : "Unpaid"}
</Badge>
{topup.status !== "CANCELLED" && (
<Badge
className={cn(
topup?.paid
? "text-green-500 bg-green-500/20"
: "text-yellow-500 bg-yellow-500/20",
)}
variant={topup.paid ? "outline" : "secondary"}
>
{topup.paid ? "Paid" : "Unpaid"}
</Badge>
)}
</div>
<div className="bg-white dark:bg-black p-2 rounded mt-2 w-full border">
<div className="block sm:hidden">