feat:EMandate login page create
This commit is contained in:
@@ -6,7 +6,7 @@ import { Providers } from "@/app/providers";
|
||||
import { useRouter } from "next/navigation";
|
||||
import NextImage from "next/image";
|
||||
import logo from '@/app/image/logo1.jpg';
|
||||
import frontPage from '@/app/image/ib_front_1.jpg';
|
||||
import frontPage from '@/app/image/EMandate.jpg';
|
||||
import { generateCaptcha } from '@/app/captcha';
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ export default function Login() {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const response = await fetch('api/auth/login', {
|
||||
const response = await fetch('/api/auth/login', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -113,19 +113,19 @@ export default function Login() {
|
||||
if (response.ok) {
|
||||
console.log(data);
|
||||
const token = data.token;
|
||||
localStorage.setItem("access_token", token);
|
||||
localStorage.setItem("pswExpiryDate", data.loginPswExpiry);
|
||||
localStorage.setItem("emandate_token", token);
|
||||
// localStorage.setItem("pswExpiryDate", data.loginPswExpiry);
|
||||
if (data.FirstTimeLogin === true) {
|
||||
notifications.show({
|
||||
withBorder: true,
|
||||
color: "red",
|
||||
title: "Error",
|
||||
message: "Please set your credential into Internet Banking before login.",
|
||||
autoClose: 5000,
|
||||
});
|
||||
notifications.show({
|
||||
withBorder: true,
|
||||
color: "red",
|
||||
title: "Error",
|
||||
message: "Please set your credential into Internet Banking before login.",
|
||||
autoClose: 5000,
|
||||
});
|
||||
}
|
||||
else {
|
||||
router.push("/home");
|
||||
router.push("/mandate_page");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -241,7 +241,7 @@ export default function Login() {
|
||||
<div style={{
|
||||
display: "flex", height: "75vh", overflow: "hidden", position: "relative",
|
||||
// background: 'linear-gradient(to right, #02081eff, #0a3d91)'
|
||||
background: 'linear-gradient(179deg,rgba(1, 13, 18, 1) 49%, rgba(77, 82, 79, 1) 87%)'
|
||||
background: 'linear-gradient(179deg, #3faa56ff 49%, #3aa760ff 80%)'
|
||||
}}>
|
||||
<div style={{ flex: 1, backgroundColor: "#c1e0f0", position: "relative" }}>
|
||||
<Image
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 48 KiB |
Reference in New Issue
Block a user