diff --git a/src/pages/authentication/auth-forms/AuthLoginCustom.js b/src/pages/authentication/auth-forms/AuthLoginCustom.js
index 1fd633f..cb0efdf 100644
--- a/src/pages/authentication/auth-forms/AuthLoginCustom.js
+++ b/src/pages/authentication/auth-forms/AuthLoginCustom.js
@@ -97,7 +97,7 @@ const AuthLoginCustom = () => {
submit: null
}),
validationSchema:yup.object().shape({
- username: yup.string().min(6,'用戶名稱最少6位').required('請輸入用戶名稱'),
+ // username: yup.string().min(6,'用戶名稱最少6位').required('請輸入用戶名稱'),
password: yup.string().min(8,'請輸入最少8位密碼').required('請輸入密碼')
.matches(/^(?=.*[a-z])/, '請包括最少1個小寫字母')
.matches(/^(?=.*[A-Z])/, '請包括最少1個大寫字母')
@@ -109,8 +109,8 @@ const AuthLoginCustom = () => {
const checkDataField = (data)=> {
if (data.username !==""&&
data.password !==""&&
- handlePassword(data.password)&&
- handle8Digi(data.username)
+ handlePassword(data.password)
+ // &&handle6Digi(data.username)
)
{
setisValid(true)
@@ -140,13 +140,13 @@ const AuthLoginCustom = () => {
}
}
- function handle8Digi(value) {
- if (value.length < 8) {
- return false;
- } else {
- return true;
- }
- }
+ // function handle6Digi(value) {
+ // if (value.length < 6) {
+ // return false;
+ // } else {
+ // return true;
+ // }
+ // }
const { values } = formik
useEffect(() => {
diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js
index 27e9ea8..bc71198 100644
--- a/src/pages/authentication/auth-forms/CustomFormWizard.js
+++ b/src/pages/authentication/auth-forms/CustomFormWizard.js
@@ -147,6 +147,8 @@ const CustomFormWizard = (props) => {
const uploadFileList = event.target.files;
const saveFileList = [];
var currentIndex = 0;
+ // console.log("uploadFileList")
+ // console.log(uploadFileList)
if (currentFileList.length!=null){
currentIndex = currentFileList.length;
@@ -156,10 +158,14 @@ const CustomFormWizard = (props) => {
saveFileList.push(file);
}
}
+ // console.log("saveFileList")
+ // console.log(saveFileList)
- for (let i = 0; i < uploadFileList.length && currentIndex>5; i++){
+ for (let i = 0; i < uploadFileList.length && currentIndex<5; i++){
const file = event.target.files[i]
let isDuplicate = false;
+ // console.log("file 1")
+ // console.log(file)
// Check if the file name already exists in saveFileList
for (let j = 0; j < saveFileList.length; j++) {
if (saveFileList[j].name === file.name) {
@@ -168,6 +174,8 @@ const CustomFormWizard = (props) => {
}
}
if (!isDuplicate) {
+ // console.log("file2")
+ // console.log(file)
file.id = currentIndex+i
saveFileList.push(file)
updateList.items.add(file);
@@ -178,6 +186,8 @@ const CustomFormWizard = (props) => {
setFileListData(saveFileList)
setFileList(updatedFileList);
+ // console.log("saveFileList2")
+ // console.log(saveFileList)
};
useEffect(() => {
@@ -370,7 +380,8 @@ const CustomFormWizard = (props) => {
const handleReset = (resetForm) => {
resetForm();
setSelectedAddress4("")
- setSelectedIdDocType("")
+ setSelectedIdDocType({})
+
// setSelectedIdDocLabel("")
};
@@ -1254,6 +1265,18 @@ const CustomFormWizard = (props) => {
:null}
+
+
+
+
+ 身份證明文件
+ {fileList !=null?
+ :null}
+
+
+
+
+
diff --git a/src/pages/authentication/auth-forms/UploadFileTable.js b/src/pages/authentication/auth-forms/UploadFileTable.js
index ed8f8e4..ff1ae4b 100644
--- a/src/pages/authentication/auth-forms/UploadFileTable.js
+++ b/src/pages/authentication/auth-forms/UploadFileTable.js
@@ -2,13 +2,16 @@
import * as React from 'react';
import {
DataGrid,
- // GridActionsCellItem,
+ GridActionsCellItem,
} from "@mui/x-data-grid";
-// import EditIcon from '@mui/icons-material/Edit';
+import RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline';
import {useEffect} from "react";
// import {useNavigate} from "react-router-dom";
// import { useTheme } from '@mui/material/styles';
-import {Box} from '@mui/material';
+import {
+ // Box,
+ Stack
+} from '@mui/material';
// ==============================|| EVENT TABLE ||============================== //
export default function UploadFileTable({recordList}) {
@@ -22,29 +25,38 @@ export default function UploadFileTable({recordList}) {
setRows(recordList);
}, [recordList]);
- // const handleEditClick = (id) => () => {
- // navigate('/user/'+ id);
- // };
+ function NoRowsOverlay() {
+ return (
+
+ 沒有上傳檔案
+ {/* (rows={[]})
*/}
+
+ );
+ }
+
+ const handleEditClick = () => () => {
+ // navigate('/user/'+ id);
+ };
const columns = [
- // {
- // field: 'actions',
- // type: 'actions',
- // headerName: 'Actions',
- // width: 100,
- // cellClassName: 'actions',
- // getActions: ({id}) => {
- // return [
- // }
- // label="Edit"
- // className="textPrimary"
- // onClick={handleEditClick(id)}
- // color="primary"
- // />]
- // },
- // },
+ {
+ field: 'actions',
+ type: 'actions',
+ headerName: '',
+ width: 30,
+ cellClassName: 'actions',
+ getActions: ({id}) => {
+ return [
+ }
+ label="delete"
+ className="textPrimary"
+ onClick={handleEditClick(id)}
+ color="error"
+ />]
+ },
+ },
{
id: 'name',
field: 'name',
@@ -56,7 +68,7 @@ export default function UploadFileTable({recordList}) {
field: 'size',
headerName: '檔案大小',
valueGetter: (params) => {
- console.log(params)
+ // console.log(params)
return Math.ceil(params.value/1024)+" KB";
},
flex: 1,
@@ -64,7 +76,7 @@ export default function UploadFileTable({recordList}) {
];
return (
-
+
-
+
);
}