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