From 960624f934fed6c744662d0c501cea2f213d6cc2 Mon Sep 17 00:00:00 2001 From: "tomosa.sarkar" Date: Wed, 24 Sep 2025 13:23:07 +0530 Subject: [PATCH] wip: E-mandate home screen --- TODO.md | 2 +- instruction.md | 38 ++- .../account_statement/accountStatement.tsx | 8 +- src/app/eMandate/mandate_page/page.tsx | 255 ++++++++++++++++++ 4 files changed, 297 insertions(+), 6 deletions(-) create mode 100644 src/app/eMandate/mandate_page/page.tsx diff --git a/TODO.md b/TODO.md index e3f34cf..ba72956 100644 --- a/TODO.md +++ b/TODO.md @@ -22,6 +22,6 @@ - >view rights - Forget Password - >For Migration if user not have password - +- E-mandate diff --git a/instruction.md b/instruction.md index 4b6d9e4..fd03323 100644 --- a/instruction.md +++ b/instruction.md @@ -5,14 +5,46 @@ - Download **AWS Session Manager Plugin** - Generate **Key for KCCB** +____________________________________________________________ +### Production: (Run in systemctl) + - cd /etc/systemd/system + + - vi IB.service + ``` + [Unit] + Description= Internet Banking Frontened Application in Node + After=network.target + + [Service] + # Use absolute path for node or npm + User=ib + Group=ib + ExecStart=/usr/bin/npm start + WorkingDirectory=/home/ib/IB + Restart=on-failure + RestartSec=5 + Environment=NODE_ENV=production + Environment=PORT=3000 + SuccessExitStatus=143 + + [Install] + WantedBy=multi-user.target + + + ``` + - sudo systemctl status IB + - sudo systemctl start IB + - sudo systemctl stop IB + - sudo systemctl restart IB + --- ## Machine ```bash -UAT (IB- frontend) : i-0b55435e15425f1c3 -Linux : i-0c850dcf8b85b1447 -Prod : i-088e64c3435cb5078 +UAT (IB- frontend Test) : i-0b55435e15425f1c3 +Linux : i-0c850dcf8b85b1447 (Test) +Prod : i-088e64c3435cb5078 (For IB & MB) ``` ## 2. Port Forwarding diff --git a/src/app/(main)/accounts/account_statement/accountStatement.tsx b/src/app/(main)/accounts/account_statement/accountStatement.tsx index 054e235..23869cf 100644 --- a/src/app/(main)/accounts/account_statement/accountStatement.tsx +++ b/src/app/(main)/accounts/account_statement/accountStatement.tsx @@ -108,12 +108,12 @@ export default function AccountStatementPage() { }); return; } - if (end.diff(start, "day") > 90) { + if (end.diff(start, "day") > 30) { notifications.show({ withBorder: true, color: "red", title: "Invalid Date range", - message: "End date must be within 90 days from start date", + message: "End date must be within 30 days from start date", autoClose: 4000, }); return; @@ -179,12 +179,16 @@ export default function AccountStatementPage() { value={startDate} onChange={setStartDate} placeholder="Enter start date" + minDate={dayjs("1920-01-01").toDate()} + maxDate={dayjs().toDate()} /> + + + + ); +}; + +export default function MandatePage() { + const router = useRouter(); + const [mandates] = useState([ + { + id: "1", + category: "Insurance Premium", + amount: 11743, + maxAmount: 11743, + name: "LIFE INSURANCE CORPORATION", + frequency: "YEAR", + firstCollection: "2025-09-20", + finalCollection: "2038-03-28", + }, + { + id: "2", + category: "Loan EMI", + amount: 8500, + maxAmount: 8500, + name: "XYZ BANK", + frequency: "MONTH", + firstCollection: "2025-10-01", + finalCollection: "2030-10-01", + }, + + ]); + + const handleAccept = (id: string) => { + alert(`Accepted mandate ${id}`); + }; + + const handleReject = (id: string) => { + alert(`Rejected mandate ${id}`); + }; + const handleLogout = () => { + localStorage.removeItem("access_token"); + router.push("/eMandate/login"); // redirect to login page + }; + + return ( + +
+ {/* HEADER */} + + + ebanking + + THE KANGRA CENTRAL CO-OPERATIVE BANK LTD. + + + + {/* Logout Icon */} + + + + + + {/* WELCOME BAR */} + + + Welcome, John Doe + + + Login Time: 9/24/2025, 12:52:05 PM + + + KCCB E-Mandate + + + + + {/* CONTENT */} + + + + {mandates.map((mandate) => ( + + + + ))} + + + + + {/* FOOTER */} + + + © 2025 The Kangra Central Co-Operative Bank + + +
+
+ ); +}