mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-06-07 07:36:20 +00:00
fix: update welcome message in ApplicationLayout and simplify payment verification logic in DevicesToPay
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m41s
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m41s
This commit is contained in:
parent
0c093f1303
commit
a093ab1666
@ -46,7 +46,7 @@ export async function ApplicationLayout({
|
||||
</div>
|
||||
</header>
|
||||
<div className="text-sm font-mono px-2 p-1 bg-green-500/10 text-green-900 dark:text-green-400">
|
||||
Logged in as,{" "}
|
||||
Welcome,{" "}
|
||||
<span className="font-semibold">
|
||||
{session?.user?.first_name} {session?.user?.last_name}
|
||||
</span>
|
||||
|
@ -101,26 +101,11 @@ export default function DevicesToPay({
|
||||
disabled={verifying}
|
||||
onClick={async () => {
|
||||
setVerifying(true);
|
||||
// const res = await verifyPayment({
|
||||
// userId: user?.id ?? "",
|
||||
// paymentId: payment?.id,
|
||||
// benefName: user?.name ?? "",
|
||||
// accountNo: user?.accNo ?? "",
|
||||
// absAmount: String(payment?.amount),
|
||||
// type: "TRANSFER",
|
||||
// time: formatDate(new Date(payment?.createdAt || "")),
|
||||
// });
|
||||
const res = await verifyPayment({
|
||||
id: payment?.id ?? "",
|
||||
method: "TRANSFER",
|
||||
});
|
||||
setVerifying(false);
|
||||
// switch (true) {
|
||||
// case res?.success === true:
|
||||
// toast.success(res.message);
|
||||
// break;
|
||||
// case res?.success === false:
|
||||
// toast.error(res?.message);
|
||||
// break;
|
||||
// default:
|
||||
// toast.error("Unexpected error occurred.");
|
||||
// }
|
||||
}}
|
||||
size={"lg"}
|
||||
className="mb-4"
|
||||
|
Loading…
x
Reference in New Issue
Block a user