diff --git a/src/app/(main)/accounts/account_details/page.tsx b/src/app/(main)/accounts/account_details/page.tsx index 3116567..cfe1ead 100644 --- a/src/app/(main)/accounts/account_details/page.tsx +++ b/src/app/(main)/accounts/account_details/page.tsx @@ -162,7 +162,7 @@ export default function AccountDetails() { ) : ( - Balance + Available Balance ₹{parseFloat(accountDetails.stAvailableBalance).toLocaleString("en-IN", { minimumFractionDigits: 2, diff --git a/src/app/(main)/accounts/account_statement/accountStatement.tsx b/src/app/(main)/accounts/account_statement/accountStatement.tsx index a7f37e2..7601cb1 100644 --- a/src/app/(main)/accounts/account_statement/accountStatement.tsx +++ b/src/app/(main)/accounts/account_statement/accountStatement.tsx @@ -203,7 +203,7 @@ export default function AccountStatementPage() { {parseFloat(txn.amount).toLocaleString("en-IN", { minimumFractionDigits: 2, - })} + })} {txn.type==="DR"?"Dr.":"Cr."} ))} diff --git a/src/app/(main)/accounts/page.tsx b/src/app/(main)/accounts/page.tsx index 748a82f..9cc6bda 100644 --- a/src/app/(main)/accounts/page.tsx +++ b/src/app/(main)/accounts/page.tsx @@ -105,7 +105,10 @@ export default function AccountSummary() { Account Type Account No. - Book Balance + {title.includes("Deposit Accounts (INR)") ? + ( Credit Book Balance) + : (Debit Book Balance)} + {rows} diff --git a/src/app/(main)/funds_transfer/add_beneficary/page.tsx b/src/app/(main)/funds_transfer/add_beneficary/page.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/(main)/funds_transfer/page.tsx b/src/app/(main)/funds_transfer/page.tsx index 07b85c5..da91d5e 100644 --- a/src/app/(main)/funds_transfer/page.tsx +++ b/src/app/(main)/funds_transfer/page.tsx @@ -4,7 +4,7 @@ import React, { useEffect, useRef, useState } from "react"; import { Button, Group, Modal, Paper, Radio, ScrollArea, Select, Stack, Text, TextInput, Title } from "@mantine/core"; import { notifications } from "@mantine/notifications"; import { useRouter } from "next/navigation"; -import { generateOTP } from'@/app/OTPGenerator'; +import { generateOTP } from '@/app/OTPGenerator'; interface accountData { stAccountNo: string; @@ -94,7 +94,7 @@ export default function QuickPay() { }, [authorized]); - async function handleValidate(){ + async function handleValidate() { if (!selectedAccNo || !beneficiaryAcc || !confirmBeneficiaryAcc ) { @@ -149,7 +149,7 @@ export default function QuickPay() { } }; - async function handleProceed(){ + async function handleProceed() { if (!selectedAccNo || !beneficiaryAcc || !confirmBeneficiaryAcc || !beneficiaryType || !amount || !remarks) { notifications.show({ title: "Validation Error", @@ -167,6 +167,16 @@ export default function QuickPay() { }); return; } + if (parseInt(amount) <= 0) { + notifications.show({ + title: "Invalid amount", + message: "Amount Can not be less than Zero", + color: "red", + }); + return; + + } + if (!showOtpField && !showTxnPassword && !showConfirmModel) { setConfirmModel(true); return; @@ -218,7 +228,7 @@ export default function QuickPay() { toAccountType: beneficiaryType, amount: amount, narration: remarks, - tpassword:txnPassword, + tpassword: txnPassword, }), }); const result = await res.json(); @@ -268,7 +278,7 @@ export default function QuickPay() { Payee Account: {beneficiaryAcc} Payee Name: {beneficiaryName} Amount: ₹ {amount} - Remarks: ₹ {remarks} + Remarks: {remarks} @@ -303,137 +313,137 @@ export default function QuickPay() { {bankType === "own" ? ( -
- - - + { + const value = e.currentTarget.value; + if (/^\d*$/.test(value)) { + setBeneficiaryAcc(value); + setShowPayeeAcc(true); + } + }} + onBlur={() => setShowPayeeAcc(false)} + onFocus={() => setShowPayeeAcc(true)} + withAsterisk + readOnly={isVisibilityLocked} + /> - { - const value = e.currentTarget.value; - if (/^\d*$/.test(value)) { - setConfirmBeneficiaryAcc(value); - } - }} - // onCopy={(e) => e.preventDefault()} - // onPaste={(e) => e.preventDefault()} - // onCut={(e) => e.preventDefault()} - withAsterisk - readOnly={isVisibilityLocked} - /> + { + const value = e.currentTarget.value; + if (/^\d*$/.test(value)) { + setConfirmBeneficiaryAcc(value); + } + }} + // onCopy={(e) => e.preventDefault()} + // onPaste={(e) => e.preventDefault()} + // onCut={(e) => e.preventDefault()} + withAsterisk + readOnly={isVisibilityLocked} + /> + + + Available Balance : + {selectedAccount ? selectedAccount.stAvailableBalance : 0} + + + {validationStatus === "error" && {beneficiaryName}} - - Available Balance : - {selectedAccount ? selectedAccount.stAvailableBalance : 0} - - - {validationStatus === "error" && {beneficiaryName}} - - - - + + + - + setAmount(e.currentTarget.value)} + error={ + selectedAccount && Number(amount) > Number(selectedAccount.stAvailableBalance) ? + "Amount exceeds available balance" : false} + withAsterisk + readOnly={showOtpField} + /> + + setRemarks(e.currentTarget.value)} + withAsterisk + readOnly={showOtpField} + /> + + + {showOtpField && ( setAmount(e.currentTarget.value)} - error={ - selectedAccount && Number(amount) > Number(selectedAccount.stAvailableBalance) ? - "Amount exceeds available balance" : false} + label="OTP" + placeholder="Enter OTP" + type="otp" + value={otp} + onChange={(e) => setOtp(e.currentTarget.value)} withAsterisk - readOnly={showOtpField} + disabled={showTxnPassword} /> - + )} + {showTxnPassword && ( setRemarks(e.currentTarget.value)} + label="Transaction Password" + placeholder="Enter transaction password" + type="password" + value={txnPassword} + onChange={(e) => setTxnPassword(e.currentTarget.value)} withAsterisk - readOnly={showOtpField} /> - - - {showOtpField && ( - setOtp(e.currentTarget.value)} - withAsterisk - disabled={showTxnPassword} - /> - )} - {showTxnPassword && ( - setTxnPassword(e.currentTarget.value)} - withAsterisk - /> - )} - + )} + - - - - - -
+ + + + + + ) : ( hii diff --git a/src/app/image/DICGC_image.jpg b/src/app/image/DICGC_image.jpg index 0a7c6b0..1c08d2e 100644 Binary files a/src/app/image/DICGC_image.jpg and b/src/app/image/DICGC_image.jpg differ diff --git a/src/app/image/ib_front_page.jpg b/src/app/image/ib_front_page.jpg index ca0c13f..2c045b4 100644 Binary files a/src/app/image/ib_front_page.jpg and b/src/app/image/ib_front_page.jpg differ diff --git a/src/app/image/objective.jpg b/src/app/image/objective.jpg index 95e023a..872da70 100644 Binary files a/src/app/image/objective.jpg and b/src/app/image/objective.jpg differ diff --git a/src/app/login/clientCarousel.tsx b/src/app/login/clientCarousel.tsx index 023ccd4..9f901d1 100644 --- a/src/app/login/clientCarousel.tsx +++ b/src/app/login/clientCarousel.tsx @@ -40,7 +40,7 @@ export default function CustomCarousel() { }, [currentIndex]); return ( - + {/* Scrollable container */}
+ {/* Header */}
+ {/* Movable text */} -
+ {/* Main */} +
- - - - <Text fs="italic">Welcome To KCC Bank</Text> - <Text fw={700} style={{ fontSize: "18px", color: "#000066" }}>Internet Banking</Text> - - - -
- { - const input = e.currentTarget.value.replace(/\D/g, ""); - if (input.length <= 11) { - SetCIF(input); - } - }} - required - error={error} - /> - - SetPsw(e.currentTarget.value)} - required - /> - - - {captcha} - - - - setInputCaptcha(e.currentTarget.value)} - required - /> - - -
-
-
-
- {/*
*/} -
- - - - Security Notes : -

- When you Login,Your User Id and Password travels in an encrypted and highly secured mode . -

- For more information on Products and Services, Please Visit - http://www.kccb.in/ + + +
+ { + const input = e.currentTarget.value.replace(/\D/g, ""); + if (input.length <= 11) SetCIF(input); + }} + error={error} + required + /> + SetPsw(e.currentTarget.value)} + required + mt="sm" + /> + + {captcha} + + + setInputCaptcha(e.currentTarget.value)} + required + mt="sm" + /> + + +
-
+
+ {/* Carousel and Notes */} + + + + + + Security Notes : + When you Login, Your User Id and Password travels in an encrypted and highly secured mode. + For more information on Products and Services, Please Visit + http://www.kccb.in/ + + + {/* Footer */}