refactor: Change codebase as per requirement
This commit is contained in:
@@ -15,7 +15,7 @@ For database:
|
|||||||
- aws ssm start-session --target i-0c850dcf8b85b1447 --profile kccb
|
- aws ssm start-session --target i-0c850dcf8b85b1447 --profile kccb
|
||||||
- psql -U postgres
|
- psql -U postgres
|
||||||
- \l
|
- \l
|
||||||
- psql -U kmobile_db_owner -d kmobile_banking
|
- psql -U admin -d kmobile
|
||||||
- password : kmobile
|
- password : kmobile
|
||||||
- SELECT * FROM users;
|
- SELECT * FROM users;
|
||||||
- \x
|
- \x
|
||||||
|
@@ -44,7 +44,7 @@ export default function AccountStatementPage() {
|
|||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (Array.isArray(data)) {
|
if (Array.isArray(data)) {
|
||||||
const last5 = data.slice(-5).reverse();
|
const last5 = data.slice(0,5);
|
||||||
setTransactions(last5);
|
setTransactions(last5);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@@ -16,7 +16,7 @@ interface accountData {
|
|||||||
|
|
||||||
export default function QuickPay() {
|
export default function QuickPay() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [bankType, setBankType] = useState("own");
|
// const [bankType, setBankType] = useState("own");
|
||||||
const [authorized, setAuthorized] = useState<boolean | null>(null);
|
const [authorized, setAuthorized] = useState<boolean | null>(null);
|
||||||
const [accountData, setAccountData] = useState<accountData[]>([]);
|
const [accountData, setAccountData] = useState<accountData[]>([]);
|
||||||
const [selectedAccNo, setSelectedAccNo] = useState<string | null>(null);
|
const [selectedAccNo, setSelectedAccNo] = useState<string | null>(null);
|
||||||
@@ -150,7 +150,7 @@ export default function QuickPay() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function handleProceed() {
|
async function handleProceed() {
|
||||||
if (!selectedAccNo || !beneficiaryAcc || !confirmBeneficiaryAcc || !beneficiaryType || !amount ) {
|
if (!selectedAccNo || !beneficiaryAcc || !confirmBeneficiaryAcc || !beneficiaryType || !amount || !remarks) {
|
||||||
notifications.show({
|
notifications.show({
|
||||||
title: "Validation Error",
|
title: "Validation Error",
|
||||||
message: "Please fill all required fields",
|
message: "Please fill all required fields",
|
||||||
@@ -174,7 +174,6 @@ export default function QuickPay() {
|
|||||||
color: "red",
|
color: "red",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!showOtpField && !showTxnPassword && !showConfirmModel) {
|
if (!showOtpField && !showTxnPassword && !showConfirmModel) {
|
||||||
@@ -316,14 +315,7 @@ export default function QuickPay() {
|
|||||||
<Title order={3} mb="md">
|
<Title order={3} mb="md">
|
||||||
Quick Pay
|
Quick Pay
|
||||||
</Title>
|
</Title>
|
||||||
<Radio.Group value={bankType} onChange={setBankType} name="bankType" withAsterisk mb="md">
|
|
||||||
<Group justify="center">
|
|
||||||
<Radio value="own" label="Own Bank" />
|
|
||||||
<Radio value="outside" label="Outside Bank" />
|
|
||||||
</Group>
|
|
||||||
</Radio.Group>
|
|
||||||
|
|
||||||
{bankType === "own" ? (
|
|
||||||
<div style={{ maxHeight: "320px", overflowY: "auto" }}>
|
<div style={{ maxHeight: "320px", overflowY: "auto" }}>
|
||||||
<Stack gap="xs">
|
<Stack gap="xs">
|
||||||
<Group grow>
|
<Group grow>
|
||||||
@@ -414,6 +406,7 @@ export default function QuickPay() {
|
|||||||
onChange={(e) => setRemarks(e.currentTarget.value)}
|
onChange={(e) => setRemarks(e.currentTarget.value)}
|
||||||
// withAsterisk
|
// withAsterisk
|
||||||
readOnly={showOtpField}
|
readOnly={showOtpField}
|
||||||
|
withAsterisk
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group grow>
|
<Group grow>
|
||||||
@@ -456,11 +449,11 @@ export default function QuickPay() {
|
|||||||
</Group>
|
</Group>
|
||||||
</Stack>
|
</Stack>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
{/* ) : (
|
||||||
<div>
|
<div>
|
||||||
<OutsideQuickPay />
|
<OutsideQuickPay />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)} */}
|
||||||
</Paper>
|
</Paper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@@ -81,7 +81,7 @@ export default function SendToBeneficiaryOwn() {
|
|||||||
bankType === 'own' ? ben_acc.stBankName === 'Kangra Central Co-operative Bank' : true)
|
bankType === 'own' ? ben_acc.stBankName === 'Kangra Central Co-operative Bank' : true)
|
||||||
.map((ben_acc) => ({
|
.map((ben_acc) => ({
|
||||||
value: ben_acc.stBenAccountNo,
|
value: ben_acc.stBenAccountNo,
|
||||||
label: ben_acc.stBenAccountNo,
|
label: `${ben_acc.stBenAccountNo}-${ben_acc.stBenName}`,
|
||||||
|
|
||||||
}));
|
}));
|
||||||
const handleBeneficiary = (benAcc: string | null) => {
|
const handleBeneficiary = (benAcc: string | null) => {
|
||||||
@@ -317,7 +317,7 @@ export default function SendToBeneficiaryOwn() {
|
|||||||
readOnly={isVisibilityLocked}
|
readOnly={isVisibilityLocked}
|
||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
label="Beneficiary Account No"
|
label="Select Beneficiary Account No"
|
||||||
placeholder="Choose beneficiary account number"
|
placeholder="Choose beneficiary account number"
|
||||||
data={benAccountOption}
|
data={benAccountOption}
|
||||||
value={beneficiaryAcc}
|
value={beneficiaryAcc}
|
||||||
|
@@ -192,7 +192,7 @@ export default function Home() {
|
|||||||
|
|
||||||
{/* Important Links Card */}
|
{/* Important Links Card */}
|
||||||
<Paper p="md" radius="md" style={{ width: 300, backgroundColor: '#FFFFFF', marginLeft: '130px', border: '1px solid grey' }}>
|
<Paper p="md" radius="md" style={{ width: 300, backgroundColor: '#FFFFFF', marginLeft: '130px', border: '1px solid grey' }}>
|
||||||
<Title order={5} mb="sm">Important Links</Title>
|
<Title order={5} mb="sm">Quick Links</Title>
|
||||||
<Stack gap="xs">
|
<Stack gap="xs">
|
||||||
<Button variant="light" color="blue" fullWidth>Loan EMI Calculator</Button>
|
<Button variant="light" color="blue" fullWidth>Loan EMI Calculator</Button>
|
||||||
<Button variant="light" color="blue" fullWidth>Branch Locator</Button>
|
<Button variant="light" color="blue" fullWidth>Branch Locator</Button>
|
||||||
@@ -205,7 +205,7 @@ export default function Home() {
|
|||||||
|
|
||||||
{/* Send Money Section */}
|
{/* Send Money Section */}
|
||||||
<div style={{ padding: "20px", display: "flex", justifyContent: "left" }}>
|
<div style={{ padding: "20px", display: "flex", justifyContent: "left" }}>
|
||||||
<Box>
|
{/* <Box>
|
||||||
<Title order={4}>Send Money</Title>
|
<Title order={4}>Send Money</Title>
|
||||||
<Group mt="sm">
|
<Group mt="sm">
|
||||||
<Select
|
<Select
|
||||||
@@ -221,7 +221,13 @@ export default function Home() {
|
|||||||
<Input placeholder="₹0.00" style={{ width: 100 }} />
|
<Input placeholder="₹0.00" style={{ width: 100 }} />
|
||||||
<Button>Proceed</Button>
|
<Button>Proceed</Button>
|
||||||
</Group>
|
</Group>
|
||||||
</Box>
|
</Box> */}
|
||||||
|
<Stack>
|
||||||
|
<Text fw={700}> ** Book Balance includes uncleared effect.</Text>
|
||||||
|
<Text fw={700}> ** Click on the "Show Balance" to display balance for the Deposit and Loan account.</Text>
|
||||||
|
{/* <Text fw={700}> ** Click on the "Get Statement" to display last 5 transactions.</Text> */}
|
||||||
|
<Text></Text>
|
||||||
|
</Stack>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Providers>
|
</Providers>
|
||||||
|
BIN
src/app/image/ib_front.jpg
Normal file
BIN
src/app/image/ib_front.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
@@ -6,7 +6,7 @@ import { Providers } from "@/app/providers";
|
|||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import NextImage from "next/image";
|
import NextImage from "next/image";
|
||||||
import logo from '@/app/image/logo.jpg';
|
import logo from '@/app/image/logo.jpg';
|
||||||
import frontPage from '@/app/image/ib_front_page.jpg';
|
import frontPage from '@/app/image/ib_front.jpg';
|
||||||
import dynamic from 'next/dynamic';
|
import dynamic from 'next/dynamic';
|
||||||
import { generateCaptcha } from '@/app/captcha';
|
import { generateCaptcha } from '@/app/captcha';
|
||||||
|
|
||||||
@@ -163,7 +163,9 @@ export default function Login() {
|
|||||||
{/* Main */}
|
{/* Main */}
|
||||||
<div style={{
|
<div style={{
|
||||||
display: "flex", height: "75vh", overflow: "hidden", position: "relative",
|
display: "flex", height: "75vh", overflow: "hidden", position: "relative",
|
||||||
background: 'linear-gradient(to right, #02081eff, #0a3d91)'
|
// background: 'linear-gradient(to right, #02081eff, #0a3d91)'
|
||||||
|
background:'linear-gradient(179deg,rgba(1, 13, 18, 1) 49%, rgba(181, 196, 187, 1) 87%)'
|
||||||
|
// background:'linear-gradient(179deg,rgba(1, 7, 10, 1) 48%, rgba(87, 94, 89, 1) 87%)'
|
||||||
}}>
|
}}>
|
||||||
<div style={{ flex: 1, backgroundColor: "#c1e0f0", position: "relative" }}>
|
<div style={{ flex: 1, backgroundColor: "#c1e0f0", position: "relative" }}>
|
||||||
<Image
|
<Image
|
||||||
@@ -233,7 +235,7 @@ export default function Login() {
|
|||||||
<Title order={2}>Security Notes :</Title>
|
<Title order={2}>Security Notes :</Title>
|
||||||
<Text mt="sm" size="md">When you Login, Your User Id and Password travels in an encrypted and highly secured mode.</Text>
|
<Text mt="sm" size="md">When you Login, Your User Id and Password travels in an encrypted and highly secured mode.</Text>
|
||||||
<Text mt="sm" fs="italic">For more information on Products and Services, Please Visit</Text>
|
<Text mt="sm" fs="italic">For more information on Products and Services, Please Visit</Text>
|
||||||
<Anchor> http://www.kccb.in/</Anchor>
|
<Anchor href="http://www.kccb.in/"> http://www.kccb.in/</Anchor>
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
{/* Footer */}
|
{/* Footer */}
|
||||||
|
Reference in New Issue
Block a user