mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-10-05 09:55:25 +00:00
fix: payment info display logic condition 🐛
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 15m16s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 15m16s
This commit is contained in:
@@ -61,50 +61,50 @@ export default function TopupToPay({
|
|||||||
<div className="m-2 flex items-end justify-end p-2 text-sm text-foreground border rounded">
|
<div className="m-2 flex items-end justify-end p-2 text-sm text-foreground border rounded">
|
||||||
<Table>
|
<Table>
|
||||||
<TableCaption>
|
<TableCaption>
|
||||||
{!topup?.paid ||
|
{(!topup?.paid ||
|
||||||
topup?.is_expired ||
|
!topup?.is_expired ||
|
||||||
(topup?.status !== "CANCELLED" && (
|
topup?.status !== "CANCELLED") && (
|
||||||
<div className="max-w-sm mx-auto">
|
<div className="max-w-sm mx-auto">
|
||||||
<p>Please send the following amount to the payment address</p>
|
<p>Please send the following amount to the payment address</p>
|
||||||
<AccountInfomation
|
<AccountInfomation
|
||||||
accName="Baraveli Dev"
|
accName="Baraveli Dev"
|
||||||
accountNo="90101400028321000"
|
accountNo="90101400028321000"
|
||||||
/>
|
/>
|
||||||
{topup?.paid ? (
|
{topup?.paid ? (
|
||||||
<Button
|
<Button
|
||||||
size={"lg"}
|
size={"lg"}
|
||||||
variant={"secondary"}
|
variant={"secondary"}
|
||||||
disabled
|
disabled
|
||||||
className="dark:text-green-200 text-green-900 bg-green-500/20 uppercase font-semibold"
|
className="dark:text-green-200 text-green-900 bg-green-500/20 uppercase font-semibold"
|
||||||
>
|
>
|
||||||
Topup Payment Verified
|
Topup Payment Verified
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<form action={formAction}>
|
<form action={formAction}>
|
||||||
<input
|
<input
|
||||||
type="hidden"
|
type="hidden"
|
||||||
name="topupId"
|
name="topupId"
|
||||||
value={topup?.id ?? ""}
|
value={topup?.id ?? ""}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
disabled={disabled || isPending}
|
disabled={disabled || isPending}
|
||||||
type="submit"
|
type="submit"
|
||||||
size={"lg"}
|
size={"lg"}
|
||||||
className="mb-4 w-full"
|
className="mb-4 w-full"
|
||||||
>
|
>
|
||||||
{isPending ? "Processing payment..." : "I have paid"}
|
{isPending ? "Processing payment..." : "I have paid"}
|
||||||
{isPending ? (
|
{isPending ? (
|
||||||
<Loader2 className="animate-spin" />
|
<Loader2 className="animate-spin" />
|
||||||
) : (
|
) : (
|
||||||
<BadgeDollarSign />
|
<BadgeDollarSign />
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
)}
|
||||||
</TableCaption>
|
</TableCaption>
|
||||||
<TableBody className="">
|
<TableBody className="">
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
Reference in New Issue
Block a user