ci: Update the login and home screen

This commit is contained in:
2025-06-30 13:07:53 +05:30
parent bc75470d33
commit 6028ed9f5a
12 changed files with 80 additions and 254 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,39 +0,0 @@
import { Entity, Column, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm"
@Entity({ name: 'ticket' })
export class Ticket {
@PrimaryGeneratedColumn()
// @PrimaryColumn("int")
id!: number
@PrimaryColumn()
ticket_id! : number
@Column("varchar")
category_of_request! : string
@Column("varchar")
nature_of_request! : string
// @Column({type: 'jsonb',nullable:true})
// issue: any
@Column({type: 'text',nullable:true})
additional_info: any
@Column("varchar")
message!: string
@Column('varchar')
created_by! : string
@Column('bigint')
customer_account_no! : number
@Column('varchar')
created_date! : string
@Column({type: 'varchar',nullable:true})
assign_by! :string
}

View File

@@ -1,27 +0,0 @@
import { Entity, Column, PrimaryColumn } from "typeorm"
@Entity({ name: 'user' })
export class User {
@PrimaryColumn("int")
id!: number
@Column("bigint")
bank_account_no!: number
@Column("varchar")
title!: string
@Column("varchar")
first_name!: string
@Column("varchar")
middle_name!: string
@Column("varchar")
last_name!: string
@Column("bigint",{nullable:true})
mobile_number!: number
}

View File

@@ -1,3 +0,0 @@
id,bank_account_no,title,first_name,middle_name,last_name,mobile_number
6000,30022497139,Mr.,Rajat,Kumar,Maharana,7890544527
6001,30022497138,Ms.,Tomosa,,Sarkar,7890544527
1 id bank_account_no title first_name middle_name last_name mobile_number
2 6000 30022497139 Mr. Rajat Kumar Maharana 7890544527
3 6001 30022497138 Ms. Tomosa Sarkar 7890544527

View File

@@ -1,44 +0,0 @@
import { DataSource } from "typeorm"
import { User } from "../entities/User"
import { Ticket } from "../entities/Ticket";
class AppDataSource {
private static dataSource = new DataSource({
type: 'postgres',
host: process.env.DB_HOST,
port: parseInt(process.env.DB_PORT ?? '1521'),
username: process.env.DB_USER_NAME,
password: process.env.DB_USER_PASS,
database: process.env.DB_NAME,
// dropSchema: process.env.NODE_ENV === 'development',
synchronize: process.env.NODE_ENV === 'development',
logging: false,
entities: [User,Ticket],
subscribers: [],
migrations: []
})
private static dataSource_MantisBT = new DataSource({
type: 'postgres',
host: process.env.DB_HOST,
port: parseInt(process.env.DB_PORT ?? '1521'),
username: process.env.DB_USER_NAME,
password: process.env.DB_USER_PASS,
database: "kccb_ticket_tracker",
synchronize: process.env.NODE_ENV === 'development',
logging: false,
subscribers: [],
migrations: []
})
static async getConnection(): Promise<DataSource> {
if (!this.dataSource.isInitialized)
await this.dataSource.initialize()
return this.dataSource;
}
static async getMantisConnection(): Promise<DataSource> {
if (!this.dataSource_MantisBT.isInitialized)
await this.dataSource_MantisBT.initialize()
return this.dataSource_MantisBT;
}
}
export default AppDataSource;

View File

@@ -1,80 +0,0 @@
.title {
color: light-dark(var(--mantine-color-black), var(--mantine-color-white));
font-family:
Greycliff CF,
var(--mantine-font-family);
}
.navbar {
flex-grow: 1;
padding: var(--mantine-spacing-md);
display: flex;
flex-direction: column;
}
.navbarMain {
flex: 1;
}
.header {
padding-bottom: var(--mantine-spacing-md);
margin-bottom: calc(var(--mantine-spacing-md) * 1.5);
border-bottom: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
}
.user {
padding: var(--mantine-spacing-md);
color: light-dark(var(--mantine-color-black), var(--mantine-color-dark-0));
border-radius: var(--mantine-radius-sm);
@mixin hover {
background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-8));
}
}
.footer {
padding-top: var(--mantine-spacing-md);
margin-top: var(--mantine-spacing-md);
border-top: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
}
.link {
cursor: pointer;
display: flex;
align-items: center;
text-decoration: none;
font-size: var(--mantine-font-size-sm);
color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
padding: var(--mantine-spacing-xs) var(--mantine-spacing-sm);
border-radius: var(--mantine-radius-sm);
font-weight: 500;
@mixin hover {
background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6));
color: light-dark(var(--mantine-color-black), var(--mantine-color-white));
.linkIcon {
color: light-dark(var(--mantine-color-black), var(--mantine-color-white));
}
}
&[data-active] {
&,
&:hover {
background-color: var(--mantine-primary-color-light);
color: var(--mantine-primary-color-light-color);
.linkIcon {
color: var(--mantine-primary-color-light-color);
}
}
}
}
.linkIcon {
color: light-dark(var(--mantine-color-gray-6), var(--mantine-color-dark-2));
margin-right: var(--mantine-spacing-sm);
width: rem(25px);
height: rem(25px);
}

View File

@@ -19,9 +19,9 @@ export default function Home() {
{ "stAccountNo": "60078975412", "stAccountType": "LN", "stAvailableBalance": "100000.0" },
{ "stAccountNo": "60078975413", "stAccountType": "LN", "stAvailableBalance": "120000.0" }
]
const savingsAccounts = accountData.filter(acc => acc.stAccountType === "SA");
const [selectedSA, setSelectedSA] = useState(savingsAccounts[0]?.stAccountNo || "");
const selectedSAData = savingsAccounts.find(acc => acc.stAccountNo === selectedSA);
const depositAccounts = accountData.filter(acc => acc.stAccountType === "SA");
const [selectedDA, setSelectedDA] = useState(depositAccounts[0]?.stAccountNo || "");
const selectedDAData = depositAccounts.find(acc => acc.stAccountNo === selectedDA);
const loanAccounts = accountData.filter(acc => acc.stAccountType === "LN");
const [selectedLN, setSelectedLN] = useState(loanAccounts[0]?.stAccountNo || "");
const selectedLNData = loanAccounts.find(acc => acc.stAccountNo === selectedLN);
@@ -47,14 +47,31 @@ export default function Home() {
return (
<Providers>
<div style={{ backgroundColor: "#f8f9fa", width: "100%", height: '100vh' }}>
<Image
// radius="md"
fit="cover"
src={myImage}
component={NextImage}
alt="ebanking"
style={{ width: "100%", height: "12%" }}
/>
<Box style={{ position: 'relative', width: '100%', height: '12%' }}>
<Image
// radius="md"
fit="cover"
src={myImage}
component={NextImage}
alt="ebanking"
style={{ width: "100%", height: "100%" }}
/>
<Text
style={{
position: 'absolute',
top: '60%',
left: '80%',
// transform: 'translate(-50%, -50%)',
color: 'yellow',
// fontSize: '24px',
// fontWeight: 'bold',
textShadow: '1px 1px 2px black',
}}
>
Toll Free No : 1800-180-8008
</Text>
</Box>
<div
style={{
flex: 1,
@@ -75,7 +92,7 @@ export default function Home() {
<div
style={{
flex: 1,
marginLeft:'20px',
marginLeft: '20px',
display: "flex",
flexDirection: "column",
justifyContent: "left",
@@ -85,26 +102,26 @@ export default function Home() {
<Text size="xs" c="gray">Last logged in at 29/06/25, 05:35 PM</Text>
</div>
<Group
style={{ flex: 1, padding: "10px 10px 4px 10px", marginLeft:'20px',display: "flex", alignItems: "center", justifyContent: "left", height: "5vh" }}>
style={{ flex: 1, padding: "10px 10px 4px 10px", marginLeft: '20px', display: "flex", alignItems: "center", justifyContent: "left", height: "5vh" }}>
<Text fw={700}>Show Balance </Text>
<Switch size="md" onLabel="ON" offLabel="OFF" checked={showBalance}
onChange={(event) => setShowBalance(event.currentTarget.checked)} />
</Group>
<div style={{ flex: 1, display: "flex", alignItems: "center", justifyContent: "flex-start" ,marginLeft:'20px'}}>
<div style={{ flex: 1, display: "flex", alignItems: "center", justifyContent: "flex-start", marginLeft: '20px' }}>
<Group grow gap="lg">
<Paper p="md" radius="md" style={{ backgroundColor: '#c1e0f0', width: 300 }}>
<Paper p="md" radius="md" style={{ backgroundColor: '#c1e0f0', width: 350 }}>
{/* <IconBuildingBank /> */}
<Group justify="space-between">
<Text size="sm">Savings Account</Text>
<Text size="sm">Deposit Account</Text>
<Select
placeholder="Select A/C No"
data={savingsAccounts.map(acc => ({
data={depositAccounts.map(acc => ({
value: acc.stAccountNo,
label: acc.stAccountNo
}))}
value={selectedSA}
value={selectedDA}
// @ts-ignore
onChange={setSelectedSA}
onChange={setSelectedDA}
size="xs"
styles={{
input: {
@@ -115,16 +132,16 @@ export default function Home() {
}}
/>
</Group>
<Text c="dimmed">{Number(selectedSAData?.stAccountNo || 0)}</Text>
<Text c="dimmed">{Number(selectedDAData?.stAccountNo || 0)}</Text>
<Title order={2} mt="md">
{showBalance ? `${Number(selectedSAData?.stAvailableBalance || 0).toLocaleString('en-IN')}` : "****"}
{showBalance ? `${Number(selectedDAData?.stAvailableBalance || 0).toLocaleString('en-IN')}` : "****"}
</Title>
<Button fullWidth mt="xs">Get Statement</Button>
</Paper>
<Paper p="md" radius="md" style={{ backgroundColor: '#c1e0f0' }}>
<Paper p="md" radius="md" style={{ backgroundColor: '#c1e0f0', width: 350 }}>
{/* <IconCoinRupee /> */}
<Group justify="space-between">
<Text size="sm">Current Account</Text>
<Text size="sm">Loan Account</Text>
<Select
placeholder="Select A/C No"
data={loanAccounts.map(acc => ({
@@ -150,7 +167,7 @@ export default function Home() {
</Title>
<Button fullWidth mt="xs">Get Statement</Button>
</Paper>
<Paper p="md" radius="md" style={{ width: 250, backgroundColor: '#f5f5f5',marginLeft:'170px'}}>
<Paper p="md" radius="md" style={{ width: 250, backgroundColor: '#f5f5f5', marginLeft: '170px' }}>
<Title order={5} mb="sm">Important Links</Title>
<Stack gap="xs">
<Button variant="light" color="blue" fullWidth>Loan EMI Calculator</Button>
@@ -161,10 +178,10 @@ export default function Home() {
</Paper>
</Group>
</div>
<div
style={{
flex: 1,
marginTop: 0,
padding: "20px",
display: "flex",
alignItems: "center",

View File

@@ -2,21 +2,7 @@
"use client";
import React, { useState, useEffect } from "react";
import {
Text,
Button,
Paper,
TextInput,
PasswordInput,
Title,
Card,
Group,
Flex,
Box,
Image,
Anchor,
Stack
} from "@mantine/core";
import {Text,Button,TextInput,PasswordInput,Title,Card,Group,Flex,Box,Image,Anchor,Stack} from "@mantine/core";
import { notifications } from "@mantine/notifications";
import myImage from '@/app/image/ebanking.jpg';
import frontPage from '@/app/image/ib_front_page.jpg';
@@ -48,6 +34,10 @@ export default function Login() {
async function handleLogin(e: React.FormEvent) {
e.preventDefault();
const onlyDigit = /^\d{11}$/;
if (!onlyDigit.test(CIF)) {
setError('Input value must be 11 digit');
}
if (inputCaptcha !== captcha) {
notifications.show({
@@ -61,7 +51,7 @@ export default function Login() {
}
if (CIF === "30022497139" && psw === "SecurePass123!") {
const token ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30";
const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30";
localStorage.setItem("customerNumber", CIF);
localStorage.setItem("password", psw);
localStorage.setItem("access_token", token);
@@ -82,18 +72,21 @@ export default function Login() {
return (
<Providers>
<div style={{ backgroundColor: "#f8f9fa", width: "100%", height: "100vh" }}>
<Image
fit="cover"
src={myImage}
component={NextImage}
alt="ebanking"
style={{ width: "100%", height: "12%" }}
/>
<div style={{ backgroundColor: "#f8f9fa", width: "100%", height: "100vh", paddingTop: "5%" }}>
<Box style={{ position: 'fixed', width: '100%', height: '12%', top: 0 }}>
<Image
// radius="md"
fit="cover"
src={myImage}
component={NextImage}
alt="ebanking"
style={{ width: "100%", height: "100%" }}
/>
</Box>
<Box
style={{
width: "100%",
height: "10%",
overflow: "hidden",
whiteSpace: "nowrap",
padding: "8px 0",
@@ -109,7 +102,13 @@ export default function Login() {
color: "#004d99",
}}
>
Always login to our Net Banking site directly or through Banks website...
Always login to our Net Banking site directly or through Banks website.
Do not disclose your UserId and Password to any third party and keep Your UserId and Password strictly confidential.
KCC Bank never asks for UserId,Passwords and Pins through email or phone.
Be ware of Phishing mails with links to fake bank's websites asking for personal information are in circulation.
⚠️ Please DO NOT Click on the links given in the emails asking for personal details like bank account number, userID and password.
⚠️ If you had shard your UserId and Password through such mails or links, please change your Password immediately.
⚠️ Inform the Bank/branch in which your account is maintained for resetting your password.
</Text>
<style>
{`
@@ -149,7 +148,7 @@ export default function Login() {
maxWidth: 480,
height: 380,
marginTop: 0,
paddingTop: 20,
paddingTop: 5,
backgroundColor: "#f0f0f0",
borderRadius: "12px",
boxShadow: "0 2px 10px rgba(0,0,0,0.1)",
@@ -164,8 +163,9 @@ export default function Login() {
<Box
style={{
width: 370,
height: 4500,
padding: "20px",
marginTop: 0,
paddingTop: 5,
padding: "10px",
border: "1px solid #e0e0d1",
}}
>
@@ -185,6 +185,7 @@ export default function Login() {
}
}}
required
error={error}
/>
<PasswordInput
@@ -198,10 +199,10 @@ export default function Login() {
<Group >
<Box
style={{
padding: "10px 5px",
padding: "5px 5px",
backgroundColor: "#ffffff",
fontFamily: "'UnifrakturCook',cursive",
textDecoration:"line-through",
textDecoration: "line-through",
userSelect: "none",
}}
>
@@ -229,7 +230,6 @@ export default function Login() {
</Card>
</div>
</div>
<Box
component="footer"
style={{
@@ -245,8 +245,10 @@ export default function Login() {
>
<Text>
© 2025 KCC Bank. All rights reserved. |{" "}
<Anchor href="/disclaimer">Disclaimer</Anchor> |{" "}
<Anchor href="/privacy">Privacy Policy</Anchor>
<Anchor href="document/disclaimer.pdf" target="_blank" rel="noopener noreferrer">Disclaimer</Anchor> |{" "}
<Anchor href="document/privacy_policy.pdf" target="_blank" rel="noopener noreferrer">Privacy Policy</Anchor> |{" "}
<Anchor href="document/phishing.pdf" target="_blank" rel="noopener noreferrer">Phishing</Anchor> |{" "}
<Anchor href="document/security_tips.pdf" target="_blank" rel="noopener noreferrer">Security Tips</Anchor>
</Text>
</Box>
</div>

View File

@@ -53,9 +53,9 @@ export default function Register() {
return (
<Providers>
<Box maw={600} mx="auto" p="md">
<Title order={2} align="center" mb="md">Internet Banking Registration</Title>
<Title order={2} mb="md"style={{align: "center"}}>Internet Banking Registration</Title>
<Paper shadow="xs" p="md">
<Stack spacing="sm">
<Stack gap="sm">
<TextInput
label="CIF Number"
placeholder="Enter 10-digit CIF"