fix: approve balance in loan

This commit is contained in:
2025-12-26 13:48:49 +05:30
parent 1a57f18d40
commit 6c153b6421
5 changed files with 85 additions and 31 deletions

View File

@@ -106,12 +106,13 @@ export default function App() {
});
const data: accountData[] = await response.json();
console.log(data);
if (response.ok && Array.isArray(data)) {
const matched = data.find((acc) => acc.stAccountNo === accNo);
if (matched) {
if (matched.stAccountType.toUpperCase().includes("LN")) {
matched.stApprovedAmount = (
parseFloat(matched.stAvailableBalance) + 20000
parseFloat(matched.stApprovedAmount ?? "0")
).toFixed(2);
}
setAccountDetails(matched);

View File

@@ -0,0 +1,74 @@
.header {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 100;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.8rem 2rem;
background: linear-gradient(
15deg,
rgba(10, 114, 40, 1) 55%,
rgba(101, 101, 184, 1) 100%
);
flex-wrap: wrap;
}
.headerLogo {
width: 60px;
}
.headerText {
display: flex;
flex-direction: column;
flex: 1;
}
.desktopText {
color: white;
font-family: Roboto, sans-serif;
font-size: 1.5rem;
line-height: 1.2;
}
.desktopAddress {
font-family: Roboto, sans-serif;
color: white;
font-size: 0.9rem;
margin-top: 0.25rem;
}
.mobileText {
display: none;
color: white;
font-family: Roboto, sans-serif;
font-size: 0.9rem;
text-align: center;
}
@media screen and (max-width: 768px) {
.header {
justify-content: center;
padding: 0.5rem 0.75rem;
}
.headerLogo {
width: 50px;
margin-bottom: 0.5rem;
}
.headerText {
text-align: center;
}
.desktopText,
.desktopAddress {
display: none;
}
.mobileText {
display: block;
}
}

View File

@@ -120,19 +120,20 @@ export default function ValidateUser() {
<div style={{ backgroundColor: "#f8f9fa", width: "100%", paddingTop: "5%" }}>
<Box
style={{
position: 'fixed', width: '100%', height: '12%', top: 0, left: 0, zIndex: 100,
position: 'fixed', width: '100%', height: '15%', top: 0, left: 0, zIndex: 100,
display: "flex",
justifyContent: "flex-start",
background: "linear-gradient(15deg,rgba(10, 114, 40, 1) 55%, rgba(101, 101, 184, 1) 100%)",
background: "linear-gradient(15deg, rgba(10, 114, 40, 1) 55%, rgba(101, 101, 184, 1) 100%)",
}}>
<Image
src={logo}
component={NextImage}
fit="contain"
alt="ebanking"
style={{ width: "100%", height: "auto", flexShrink: 0 }}
style={{ width: "80px", height: "auto" ,padding:"10px"}}
/>
<Title ref={headerRef}
<Title
// ref={headerRef}
order={2}
style={{
fontFamily: 'Roboto',
@@ -145,27 +146,6 @@ export default function ValidateUser() {
>
THE KANGRA CENTRAL CO-OPERATIVE BANK LTD.
</Title>
<Text size="sm" c="white"
style={{
backgroundColor: '#1f1f14',
fontFamily: 'Roboto',
position: 'absolute',
top: '59%',
left: '72%',
color: 'white',
textShadow: '1px 1px 2px blue',
}}
>
Head Office : Dharmshala, District: Kangra(H.P), Pin: 176215
</Text>
{/* <Box style={{ position: "absolute", right: "1rem", top: "50%", transform: 'translateY(-50%)' }}>
<Tooltip
label='Head Office : Dharmshala, District: Kangra(H.P), Pin: 176215'
position="right"
withArrow>
<IconBuildingBank size={40} style={{ cursor: "pointer", color: "white" }} />
</Tooltip>
</Box> */}
</Box>
<Box style={{ display: "flex", justifyContent: "center", alignItems: "center", columnGap: "5rem" }} bg="#c1e0f0">
<Image h="85vh" fit="contain" component={NextImage} src={changePwdImage} alt="Change Password Image" />
@@ -242,7 +222,6 @@ export default function ValidateUser() {
</Card>
</Box>
</Box>
<Box
style={{
flexShrink: 0,
@@ -257,7 +236,6 @@ export default function ValidateUser() {
© 2025 Kangra Central Co-Operative Bank
</Text>
</Box>
</div>
</Providers>
);

View File

@@ -166,6 +166,7 @@ function LoginEmandate() {
data: localStorage.getItem("Emendate_data"),
mandateRequest: localStorage.getItem("Emendate_req_doc"),
mandateType: localStorage.getItem("Emendate_type"),
// customer_no:CIF
}),
});
const result = await response.json();

View File

@@ -470,7 +470,7 @@ export default function Login() {
style={{ width: "60px", height: "auto" }}
/>
<div>
<Title order={3} style={{ fontFamily: "Roboto", color: "white", marginBottom: 2 }}>
<Title order={3} ref={headerRef} style={{ fontFamily: "Roboto", color: "white", marginBottom: 2 }}>
THE KANGRA CENTRAL CO-OPERATIVE BANK LTD.
</Title>
<Text size="xs" c="white" style={{ opacity: 0.85 }}>
@@ -585,12 +585,12 @@ export default function Login() {
// mt="sm"
/>
<Box style={{ textAlign: "right" }}>
{/* <Anchor
<Anchor
style={{ fontSize: "14px", color: "#1c7ed6", cursor: "pointer" }}
onClick={() => router.push("/ValidateUser")}
>
Forgot Password?
</Anchor> */}
</Anchor>
</Box>
<Group align="center">
<Box style={{