diff --git a/src/assets/style/styles.css b/src/assets/style/styles.css
index ff77584..0a6da19 100644
--- a/src/assets/style/styles.css
+++ b/src/assets/style/styles.css
@@ -1,5 +1,5 @@
body{
- padding-top: 43px;
+ padding-top: 53px;
font-family: 微軟正黑體;
}
/* main{
diff --git a/src/layout/MainLayout/index.js b/src/layout/MainLayout/index.js
index 061fb11..d046c5b 100644
--- a/src/layout/MainLayout/index.js
+++ b/src/layout/MainLayout/index.js
@@ -4,7 +4,7 @@ import { useDispatch, useSelector } from 'react-redux';
// material-ui
import { useTheme } from '@mui/material/styles';
-import { Box, Toolbar, useMediaQuery } from '@mui/material';
+import { Box, useMediaQuery } from '@mui/material';
// import { Toolbar, useMediaQuery } from '@mui/material';
// project import
@@ -17,7 +17,7 @@ import Footer from 'components/cards/AuthFooter';
// types
import { openDrawer } from 'store/reducers/menu';
-// import "assets/style/styles.css";
+import "assets/style/styles.css";
// ==============================|| MAIN LAYOUT ||============================== //
@@ -54,7 +54,7 @@ const MainLayout = () => {
{/* */}
-
+ {/* */}
{/* */}
diff --git a/src/pages/authentication/AuthWrapper.js b/src/pages/authentication/AuthWrapper.js
index 0f12b49..4c51d31 100644
--- a/src/pages/authentication/AuthWrapper.js
+++ b/src/pages/authentication/AuthWrapper.js
@@ -20,7 +20,7 @@ const BackgroundHead = {
width: '100%',
height: '100%',
backgroundSize:'cover'
- }
+}
// ==============================|| AUTHENTICATION - WRAPPER ||============================== //
diff --git a/src/pages/authentication/auth-forms/AuthLoginCustom.js b/src/pages/authentication/auth-forms/AuthLoginCustom.js
index ae54206..f1c9584 100644
--- a/src/pages/authentication/auth-forms/AuthLoginCustom.js
+++ b/src/pages/authentication/auth-forms/AuthLoginCustom.js
@@ -57,6 +57,7 @@ const AuthLoginCustom = () => {
const [isValid, setisValid] = useState(false);
const [open, setOpen] = React.useState(false);
const [isButtonDisabled, setIsButtonDisabled] = useState(true);
+ const [errorMassage, setErrorMassage] = useState('');
const handleMouseDownPassword = (event) => {
event.preventDefault();
@@ -68,7 +69,7 @@ const AuthLoginCustom = () => {
useJwt
.login({username: values.username, password: values.password})
.then((response) => {
- console.log("123")
+ // console.log("123")
const userData = {
id: response.data.id,
fullenName: response.data.name,
@@ -87,8 +88,10 @@ const AuthLoginCustom = () => {
})
.catch((error) => {
// setSuccess(false)
- setOpen(true)
console.error(error)
+ console.error(error.response.data.error)
+ setErrorMassage(error.response.data.error)
+ setOpen(true)
console.log("321")
});
}else{
@@ -271,7 +274,7 @@ const AuthLoginCustom = () => {
-
+
);
diff --git a/src/pages/authentication/auth-forms/BusCustomFormWizard.js b/src/pages/authentication/auth-forms/BusCustomFormWizard.js
index d5046c6..b0d08c3 100644
--- a/src/pages/authentication/auth-forms/BusCustomFormWizard.js
+++ b/src/pages/authentication/auth-forms/BusCustomFormWizard.js
@@ -117,7 +117,8 @@ const BusCustomFormWizard = (props) => {
fileList.length!==0&&
handlePassword(data.password)&&
handleEmail(data.email)&&
- handlePhone(data.phone)
+ handlePhone(data.phone)&&
+ handleUserName(data.username)
)
{
setisValid(true)
@@ -307,6 +308,14 @@ const BusCustomFormWizard = (props) => {
}
}
+ function handleUserName(username) {
+ if (username.length < 6) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
function handlePassword(password) {
let new_pass = password;
// regular expressions to validate password
diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js
index e66b921..2b59e6e 100644
--- a/src/pages/authentication/auth-forms/CustomFormWizard.js
+++ b/src/pages/authentication/auth-forms/CustomFormWizard.js
@@ -122,7 +122,7 @@ const CustomFormWizard = (props) => {
handleEmail(data.email)&&
handleIdNo(data.idNo,selectedIdDocType.type)&&
handle8Digi(data.phone)&&
- handle8Digi(data.username)
+ handle6Digi(data.username)
)
{
setisValid(true)
@@ -316,6 +316,14 @@ const CustomFormWizard = (props) => {
}
}
+ function handle6Digi(value) {
+ if (value.length < 6) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
function handleIdNo(idNo,selectedIdDocType) {
var upperCase = /[A-Z]/g;
if (!idNo.match(upperCase)&&selectedIdDocType=="HKID") {
diff --git a/src/pages/authentication/auth-forms/PasswordAlertDialog.js b/src/pages/authentication/auth-forms/PasswordAlertDialog.js
index e5d68c7..60ef811 100644
--- a/src/pages/authentication/auth-forms/PasswordAlertDialog.js
+++ b/src/pages/authentication/auth-forms/PasswordAlertDialog.js
@@ -28,7 +28,19 @@ const PasswordAlertDialog = (props) => {
- 用戶名或密碼錯誤
+ {props.errorMassage==='ACCOUNT_LOCKED_ERROR'?
+
+
+ 帳戶將被封鎖
+
+
+ 帳戶連續五次登入錯誤,請與系統管理員聯絡
+
+ :
+
+ 用戶名或密碼錯誤
+
+ }
diff --git a/src/pages/gldDashboard/index.js b/src/pages/gldDashboard/index.js
index 7047bad..e50c9e3 100644
--- a/src/pages/gldDashboard/index.js
+++ b/src/pages/gldDashboard/index.js
@@ -17,22 +17,33 @@ import {
// TextField,
Typography
} from '@mui/material';
+import { Stack } from '../../../node_modules/@mui/material/index';
// project import
// import Loadable from 'components/Loadable';
// import { lazy } from 'react';
+// import backbroundImg from 'assets/images/bg_ml.jpg'
// ==============================|| DASHBOARD - DEFAULT ||============================== //
const DashboardDefault = () => {
const userData = JSON.parse(localStorage.getItem("userData"));
-
+ const BackgroundHead = {
+ backgroundColor: '#0d47a1',
+ width: '100%',
+ height: '100%',
+ backgroundSize:'cover'
+ }
return (
-
-
- Moring, {userData.fullenName}
-
+
+
+
+
+ Moring, {userData.fullenName}
+
+
+
);