mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-06-07 13:46:19 +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>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div className="text-sm font-mono px-2 p-1 bg-green-500/10 text-green-900 dark:text-green-400">
|
<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">
|
<span className="font-semibold">
|
||||||
{session?.user?.first_name} {session?.user?.last_name}
|
{session?.user?.first_name} {session?.user?.last_name}
|
||||||
</span>
|
</span>
|
||||||
|
@ -101,26 +101,11 @@ export default function DevicesToPay({
|
|||||||
disabled={verifying}
|
disabled={verifying}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
setVerifying(true);
|
setVerifying(true);
|
||||||
// const res = await verifyPayment({
|
const res = await verifyPayment({
|
||||||
// userId: user?.id ?? "",
|
id: payment?.id ?? "",
|
||||||
// paymentId: payment?.id,
|
method: "TRANSFER",
|
||||||
// benefName: user?.name ?? "",
|
});
|
||||||
// accountNo: user?.accNo ?? "",
|
|
||||||
// absAmount: String(payment?.amount),
|
|
||||||
// type: "TRANSFER",
|
|
||||||
// time: formatDate(new Date(payment?.createdAt || "")),
|
|
||||||
// });
|
|
||||||
setVerifying(false);
|
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"}
|
size={"lg"}
|
||||||
className="mb-4"
|
className="mb-4"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user