|
@@ -14,10 +14,12 @@ import { |
|
|
Typography, |
|
|
Typography, |
|
|
Select, |
|
|
Select, |
|
|
FormGroup, |
|
|
FormGroup, |
|
|
|
|
|
TextField, |
|
|
// Paper |
|
|
// Paper |
|
|
// MenuItem |
|
|
// MenuItem |
|
|
} from '@mui/material'; |
|
|
} from '@mui/material'; |
|
|
import {useForm,} from 'react-hook-form' |
|
|
import {useForm,} from 'react-hook-form' |
|
|
|
|
|
import Autocomplete from "@mui/material/Autocomplete"; |
|
|
|
|
|
|
|
|
// third party |
|
|
// third party |
|
|
import { Formik } from 'formik'; |
|
|
import { Formik } from 'formik'; |
|
@@ -58,6 +60,19 @@ const CustomFormWizard = (props) => { |
|
|
setLevel(strengthColorChi(temp)); |
|
|
setLevel(strengthColorChi(temp)); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const [selectedIdDocType, setSelectedIdDocType] = useState(null); |
|
|
|
|
|
// const [idDocTypeComboList, setIdDocTypeComboList] = useState([]); |
|
|
|
|
|
|
|
|
|
|
|
const idDocTypeComboList = ["passport","HKID","CNID","BR","otherCert"]; |
|
|
|
|
|
// function updateUserList (){ |
|
|
|
|
|
// const idList = getIdList(groupUserData); |
|
|
|
|
|
// if(!idList.includes(selectedUser.id)){ |
|
|
|
|
|
// const userList = [...groupUserData, selectedUser]; |
|
|
|
|
|
// setGroupUserData(userList); |
|
|
|
|
|
// console.log(userList); |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
// const checkFormData = (data) =>{ |
|
|
// const checkFormData = (data) =>{ |
|
|
// const dataStatus = false; |
|
|
// const dataStatus = false; |
|
|
// if (data.username) |
|
|
// if (data.username) |
|
@@ -339,24 +354,18 @@ const CustomFormWizard = (props) => { |
|
|
<Grid container> |
|
|
<Grid container> |
|
|
<Grid item xs={12} md={6} > |
|
|
<Grid item xs={12} md={6} > |
|
|
<Stack spacing={1} sx={{mr:{md:1},mb:{xs:1}}}> |
|
|
<Stack spacing={1} sx={{mr:{md:1},mb:{xs:1}}}> |
|
|
<Select |
|
|
|
|
|
name = "idDocType" |
|
|
|
|
|
multiple |
|
|
|
|
|
displayEmpty |
|
|
|
|
|
value={""} |
|
|
|
|
|
onChange={handleChange} |
|
|
|
|
|
input={<OutlinedInput />} |
|
|
|
|
|
{...register("idDocType")} |
|
|
|
|
|
renderValue={(selected) => { |
|
|
|
|
|
if (selected.length === 0) { |
|
|
|
|
|
return "證件類別"; |
|
|
|
|
|
} |
|
|
|
|
|
return selected.join(', '); |
|
|
|
|
|
|
|
|
<Autocomplete |
|
|
|
|
|
disablePortal |
|
|
|
|
|
id="idDocType-combo" |
|
|
|
|
|
value={selectedIdDocType === null ? null : selectedIdDocType} |
|
|
|
|
|
options={idDocTypeComboList} |
|
|
|
|
|
onChange={(event, newValue) => { |
|
|
|
|
|
setSelectedIdDocType(newValue); |
|
|
}} |
|
|
}} |
|
|
// MenuProps={MenuProps} |
|
|
|
|
|
inputProps={{ 'aria-label': 'Without label' }} |
|
|
|
|
|
> |
|
|
|
|
|
</Select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sx={{"& .MuiInputBase-root": { height: "41px" }}} |
|
|
|
|
|
renderInput={(params) => <TextField {...params} placeholder="證件類別" sx={{ height: "41px" }}/>} |
|
|
|
|
|
/> |
|
|
</Stack> |
|
|
</Stack> |
|
|
</Grid> |
|
|
</Grid> |
|
|
<Grid item xs={12} md={5}> |
|
|
<Grid item xs={12} md={5}> |
|
@@ -397,6 +406,7 @@ const CustomFormWizard = (props) => { |
|
|
{...register("checkDigit")} |
|
|
{...register("checkDigit")} |
|
|
onChange={handleChange} |
|
|
onChange={handleChange} |
|
|
placeholder="( )" |
|
|
placeholder="( )" |
|
|
|
|
|
// sx={{height:"53px"}} |
|
|
inputProps={{ |
|
|
inputProps={{ |
|
|
maxLength: 1, |
|
|
maxLength: 1, |
|
|
onKeyDown: (e) => { |
|
|
onKeyDown: (e) => { |
|
|