@@ -9,7 +9,7 @@ import { | |||||
// Grid, | // Grid, | ||||
Stack, | Stack, | ||||
Typography, | Typography, | ||||
Button, | |||||
Button, StepLabel, | |||||
} from '@mui/material'; | } from '@mui/material'; | ||||
import VisibilityIcon from '@mui/icons-material/Visibility'; | import VisibilityIcon from '@mui/icons-material/Visibility'; | ||||
@@ -22,34 +22,11 @@ const CustomFormWizard = Loadable(lazy(() => import('./auth-forms/BusCustomFormW | |||||
const AuthWrapper = Loadable(lazy(() => import('./AuthWrapperCustom'))); | const AuthWrapper = Loadable(lazy(() => import('./AuthWrapperCustom'))); | ||||
import axios from "axios"; | import axios from "axios"; | ||||
import { GET_USERNAME, POST_VERIFY_CAPTCHA } from "utils/ApiPathConst"; | import { GET_USERNAME, POST_VERIFY_CAPTCHA } from "utils/ApiPathConst"; | ||||
import {useTheme} from "@emotion/react"; | |||||
// import CustomFormWizard from './auth-forms/BusCustomFormWizard'; | // import CustomFormWizard from './auth-forms/BusCustomFormWizard'; | ||||
// import AuthWrapper from './AuthWrapperCustom'; | // import AuthWrapper from './AuthWrapperCustom'; | ||||
// ================================|| REGISTER ||================================ // | // ================================|| REGISTER ||================================ // | ||||
const stepStyle = { | |||||
width: "40%", | |||||
boxShadow: 2, | |||||
backgroundColor: "#FFFFFF", | |||||
padding: 2, | |||||
"& .Mui-active": { | |||||
"&.MuiStepIcon-root": { | |||||
color: "warning.main", | |||||
fontSize: "2rem", | |||||
}, | |||||
"& .MuiStepConnector-line": { | |||||
borderColor: "warning.main" | |||||
} | |||||
}, | |||||
"& .Mui-completed": { | |||||
"&.MuiStepIcon-root": { | |||||
color: "secondary.main", | |||||
fontSize: "2rem", | |||||
}, | |||||
"& .MuiStepConnector-line": { | |||||
borderColor: "secondary.main" | |||||
} | |||||
} | |||||
} | |||||
const steps = ['個人資料', '預覽', '完成提交']; | const steps = ['個人資料', '預覽', '完成提交']; | ||||
const BusRegister = () => { | const BusRegister = () => { | ||||
@@ -59,6 +36,39 @@ const BusRegister = () => { | |||||
const [username, setUsername] = useState("") | const [username, setUsername] = useState("") | ||||
const [base64Url, setBase64Url] = useState("") | const [base64Url, setBase64Url] = useState("") | ||||
const [checkCode, setCheckCode] = useState("") | const [checkCode, setCheckCode] = useState("") | ||||
const theme = useTheme(); | |||||
const stepStyle = { | |||||
[theme.breakpoints.up('lg')]: { | |||||
width: '40%', | |||||
}, | |||||
[theme.breakpoints.up('md')]: { | |||||
width: '70%', | |||||
}, | |||||
[theme.breakpoints.up('xs')]: { | |||||
width: '95%', | |||||
}, | |||||
boxShadow: 1, | |||||
backgroundColor: "#FFFFFF", | |||||
padding: 2, | |||||
"& .Mui-active": { | |||||
"&.MuiStepIcon-root": { | |||||
color: "warning.main", | |||||
fontSize: "2rem", | |||||
}, | |||||
"& .MuiStepConnector-line": { | |||||
borderColor: "warning.main" | |||||
} | |||||
}, | |||||
"& .Mui-completed": { | |||||
"&.MuiStepIcon-root": { | |||||
color: "secondary.main", | |||||
fontSize: "2rem", | |||||
}, | |||||
"& .MuiStepConnector-line": { | |||||
borderColor: "secondary.main" | |||||
} | |||||
} | |||||
} | |||||
const totalSteps = () => { | const totalSteps = () => { | ||||
return steps.length; | return steps.length; | ||||
@@ -131,7 +141,7 @@ const BusRegister = () => { | |||||
return ( | return ( | ||||
// <AuthWrapper> | // <AuthWrapper> | ||||
<Stack sx={{ width: '100%', fontSize: '2rem', paddingTop: '65px', bgcolor: 'backgroundColor.default' }} alignItems="center"> | |||||
<Stack sx={{ width: '100%', fontSize: '2rem', paddingTop: '35px', bgcolor: 'backgroundColor.default' }} alignItems="center"> | |||||
<Stepper activeStep={activeStep} sx={stepStyle}> | <Stepper activeStep={activeStep} sx={stepStyle}> | ||||
{steps.map((label, index) => ( | {steps.map((label, index) => ( | ||||
<Step key={label} completed={completed[index]} readOnly={true}> | <Step key={label} completed={completed[index]} readOnly={true}> | ||||
@@ -140,14 +150,26 @@ const BusRegister = () => { | |||||
(<StepButton | (<StepButton | ||||
// onClick={handleStep(index)} | // onClick={handleStep(index)} | ||||
> | > | ||||
<Typography variant="step1">{label}</Typography> | |||||
<StepLabel sx={{ | |||||
flexDirection: 'column', | |||||
"& .MuiStepLabel-iconContainer": { | |||||
paddingRight: 0 | |||||
}}}> | |||||
<Typography variant="step1">{label}</Typography> | |||||
</StepLabel> | |||||
</StepButton>) : | </StepButton>) : | ||||
(<StepButton | (<StepButton | ||||
sx={activeStep === 2 ? { "& .MuiSvgIcon-root": { color: "warning.main", fontSize: "2rem" } } : allStepsCompleted() ? { "& .MuiSvgIcon-root": { color: "secondary.main", fontSize: "2rem" } } : { color: "rgba(0, 0, 0, 0.38)" }} | sx={activeStep === 2 ? { "& .MuiSvgIcon-root": { color: "warning.main", fontSize: "2rem" } } : allStepsCompleted() ? { "& .MuiSvgIcon-root": { color: "secondary.main", fontSize: "2rem" } } : { color: "rgba(0, 0, 0, 0.38)" }} | ||||
icon={<VisibilityIcon />} | icon={<VisibilityIcon />} | ||||
// onClick={handleStep(index)} | // onClick={handleStep(index)} | ||||
> | > | ||||
<Typography variant="step1">{label}</Typography> | |||||
<StepLabel sx={{ | |||||
flexDirection: 'column', | |||||
"& .MuiStepLabel-iconContainer": { | |||||
paddingRight: 0 | |||||
}}}> | |||||
<Typography variant="step1">{label}</Typography> | |||||
</StepLabel> | |||||
</StepButton>) | </StepButton>) | ||||
} | } | ||||
@@ -12,7 +12,7 @@ import { | |||||
// Grid, | // Grid, | ||||
Stack, | Stack, | ||||
Typography, | Typography, | ||||
Button, | |||||
Button, StepLabel, | |||||
} from '@mui/material'; | } from '@mui/material'; | ||||
import VisibilityIcon from '@mui/icons-material/Visibility'; | import VisibilityIcon from '@mui/icons-material/Visibility'; | ||||
import { GET_USERNAME, POST_VERIFY_CAPTCHA } from "utils/ApiPathConst"; | import { GET_USERNAME, POST_VERIFY_CAPTCHA } from "utils/ApiPathConst"; | ||||
@@ -22,33 +22,11 @@ import Loadable from 'components/Loadable'; | |||||
import { lazy } from 'react'; | import { lazy } from 'react'; | ||||
import { notifyActionError } from 'utils/CommonFunction'; | import { notifyActionError } from 'utils/CommonFunction'; | ||||
import axios from "axios"; | import axios from "axios"; | ||||
import {useTheme} from "@emotion/react"; | |||||
const CustomFormWizard = Loadable(lazy(() => import('./auth-forms/CustomFormWizard'))); | const CustomFormWizard = Loadable(lazy(() => import('./auth-forms/CustomFormWizard'))); | ||||
const AuthWrapper = Loadable(lazy(() => import('./AuthWrapperCustom'))); | const AuthWrapper = Loadable(lazy(() => import('./AuthWrapperCustom'))); | ||||
// ================================|| REGISTER ||================================ // | // ================================|| REGISTER ||================================ // | ||||
const stepStyle = { | |||||
width: "40%", | |||||
boxShadow: 1, | |||||
backgroundColor: "#FFFFFF", | |||||
padding: 2, | |||||
"& .Mui-active": { | |||||
"&.MuiStepIcon-root": { | |||||
color: "warning.main", | |||||
fontSize: "2rem", | |||||
}, | |||||
"& .MuiStepConnector-line": { | |||||
borderColor: "warning.main" | |||||
} | |||||
}, | |||||
"& .Mui-completed": { | |||||
"&.MuiStepIcon-root": { | |||||
color: "secondary.main", | |||||
fontSize: "2rem", | |||||
}, | |||||
"& .MuiStepConnector-line": { | |||||
borderColor: "secondary.main" | |||||
} | |||||
} | |||||
} | |||||
const steps = ['個人資料', '預覽', '完成提交']; | const steps = ['個人資料', '預覽', '完成提交']; | ||||
const Register = () => { | const Register = () => { | ||||
@@ -58,6 +36,39 @@ const Register = () => { | |||||
const [username, setUsername] = useState(""); | const [username, setUsername] = useState(""); | ||||
const [base64Url, setBase64Url] = useState("") | const [base64Url, setBase64Url] = useState("") | ||||
const [checkCode, setCheckCode] = useState("") | const [checkCode, setCheckCode] = useState("") | ||||
const theme = useTheme(); | |||||
const stepStyle = { | |||||
[theme.breakpoints.up('lg')]: { | |||||
width: '40%', | |||||
}, | |||||
[theme.breakpoints.up('md')]: { | |||||
width: '70%', | |||||
}, | |||||
[theme.breakpoints.up('xs')]: { | |||||
width: '95%', | |||||
}, | |||||
boxShadow: 1, | |||||
backgroundColor: "#FFFFFF", | |||||
padding: 2, | |||||
"& .Mui-active": { | |||||
"&.MuiStepIcon-root": { | |||||
color: "warning.main", | |||||
fontSize: "2rem", | |||||
}, | |||||
"& .MuiStepConnector-line": { | |||||
borderColor: "warning.main" | |||||
} | |||||
}, | |||||
"& .Mui-completed": { | |||||
"&.MuiStepIcon-root": { | |||||
color: "secondary.main", | |||||
fontSize: "2rem", | |||||
}, | |||||
"& .MuiStepConnector-line": { | |||||
borderColor: "secondary.main" | |||||
} | |||||
} | |||||
} | |||||
const totalSteps = () => { | const totalSteps = () => { | ||||
return steps.length; | return steps.length; | ||||
@@ -132,27 +143,39 @@ const Register = () => { | |||||
return ( | return ( | ||||
// <AuthWrapper> | // <AuthWrapper> | ||||
<Stack sx={{ width: '100%', fontSize: '2rem', paddingTop: '65px', bgcolor: 'backgroundColor.default' }} alignItems="center"> | |||||
<Stack sx={{ width: '100%', fontSize: '2rem', paddingTop: '35px', bgcolor: 'backgroundColor.default' }} alignItems="center"> | |||||
<Stepper activeStep={activeStep} sx={stepStyle}> | <Stepper activeStep={activeStep} sx={stepStyle}> | ||||
{steps.map((label, index) => ( | {steps.map((label, index) => ( | ||||
<Step key={label} completed={completed[index]} readOnly={true}> | |||||
{ | |||||
index < 2 ? | |||||
(<StepButton | |||||
// onClick={handleStep(index)} | |||||
> | |||||
<Typography variant="step1">{label}</Typography> | |||||
</StepButton>) : | |||||
(<StepButton | |||||
sx={activeStep === 2 ? { "& .MuiSvgIcon-root": { color: "warning.main", fontSize: "2rem" } } : allStepsCompleted() ? { "& .MuiSvgIcon-root": { color: "secondary.main", fontSize: "2rem" } } : { color: "rgba(0, 0, 0, 0.38)" }} | |||||
icon={<VisibilityIcon />} | |||||
// onClick={handleStep(index)} | |||||
> | |||||
<Typography variant="step1">{label}</Typography> | |||||
</StepButton>) | |||||
} | |||||
<Step key={label} completed={completed[index]} readOnly={true}> | |||||
{ | |||||
index < 2 ? | |||||
(<StepButton | |||||
// onClick={handleStep(index)} | |||||
> | |||||
<StepLabel sx={{ | |||||
flexDirection: 'column', | |||||
"& .MuiStepLabel-iconContainer": { | |||||
paddingRight: 0 | |||||
}}}> | |||||
<Typography variant="step1">{label}</Typography> | |||||
</StepLabel> | |||||
</StepButton>) : | |||||
(<StepButton | |||||
sx={activeStep === 2 ? { "& .MuiSvgIcon-root": { color: "warning.main", fontSize: "2rem" } } : allStepsCompleted() ? { "& .MuiSvgIcon-root": { color: "secondary.main", fontSize: "2rem" } } : { color: "rgba(0, 0, 0, 0.38)" }} | |||||
icon={<VisibilityIcon />} | |||||
// onClick={handleStep(index)} | |||||
> | |||||
<StepLabel sx={{ | |||||
flexDirection: 'column', | |||||
"& .MuiStepLabel-iconContainer": { | |||||
paddingRight: 0 | |||||
}}}> | |||||
<Typography variant="step1">{label}</Typography> | |||||
</StepLabel> | |||||
</StepButton>) | |||||
} | |||||
</Step> | |||||
</Step> | |||||
))} | ))} | ||||
</Stepper> | </Stepper> | ||||
{allStepsCompleted() ? ( | {allStepsCompleted() ? ( | ||||
@@ -832,7 +832,7 @@ const BusCustomFormWizard = (props) => { | |||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={6}> | <Grid item xs={12} md={6}> | ||||
<Stack spacing={1}> | <Stack spacing={1}> | ||||
<InputLabel htmlFor="brNo-signup"> | |||||
<InputLabel htmlFor="brNo-signup" sx={{ whiteSpace: 'pre-wrap', wordWrap: 'break-word' }}> | |||||
<Typography variant="pnspsFormHeader"> | <Typography variant="pnspsFormHeader"> | ||||
商業登記證號碼 (e.g. 12341234-123-12-12-1) | 商業登記證號碼 (e.g. 12341234-123-12-12-1) | ||||
<span style={{ color: '#f10000' }}>*</span> | <span style={{ color: '#f10000' }}>*</span> | ||||
@@ -970,6 +970,11 @@ const CustomFormWizard = (props) => { | |||||
// sx={{height:"53px"}} | // sx={{height:"53px"}} | ||||
startAdornment={<InputAdornment position="start">(</InputAdornment>} | startAdornment={<InputAdornment position="start">(</InputAdornment>} | ||||
endAdornment={<InputAdornment position="end">)</InputAdornment>} | endAdornment={<InputAdornment position="end">)</InputAdornment>} | ||||
sx={{ | |||||
'& .MuiOutlinedInput-input': { | |||||
padding: '5px 5px 5px 5px', // Set the desired padding inline | |||||
}, | |||||
}} | |||||
inputProps={{ | inputProps={{ | ||||
maxLength: 1, | maxLength: 1, | ||||
onKeyDown: (e) => { | onKeyDown: (e) => { | ||||
@@ -77,7 +77,7 @@ export default function UploadFileTable({ recordList, setUpdateRows, }) { | |||||
id: 'name', | id: 'name', | ||||
field: 'name', | field: 'name', | ||||
headerName: <Typography variant="h6">檔案名稱</Typography>, | headerName: <Typography variant="h6">檔案名稱</Typography>, | ||||
flex: 5, | |||||
flex: 4, | |||||
}, | }, | ||||
{ | { | ||||
id: 'size', | id: 'size', | ||||
@@ -87,7 +87,7 @@ export default function UploadFileTable({ recordList, setUpdateRows, }) { | |||||
// console.log(params) | // console.log(params) | ||||
return Math.ceil(params.value / 1024) + " KB"; | return Math.ceil(params.value / 1024) + " KB"; | ||||
}, | }, | ||||
flex: 1, | |||||
flex: 2, | |||||
}, | }, | ||||
]; | ]; | ||||
@@ -128,7 +128,7 @@ export const PNSPS_LONG_BUTTON_THEME = createTheme({ | |||||
root: { | root: { | ||||
fontSize: '1.0rem', | fontSize: '1.0rem', | ||||
height: '40px', | height: '40px', | ||||
width: '40vw', // Default width for xs screen sizes | |||||
width: '70vw', // Default width for xs screen sizes | |||||
'@media (min-width: 600px)': { // sm breakpoint | '@media (min-width: 600px)': { // sm breakpoint | ||||
width: '30vw', | width: '30vw', | ||||
}, | }, | ||||
@@ -136,7 +136,7 @@ export const PNSPS_LONG_BUTTON_THEME = createTheme({ | |||||
width: '25vw', | width: '25vw', | ||||
}, | }, | ||||
'@media (min-width: 1280px)': { // lg breakpoint | '@media (min-width: 1280px)': { // lg breakpoint | ||||
width: '14vw', | |||||
width: '19vw', | |||||
}, | }, | ||||
textTransform: "none", | textTransform: "none", | ||||
alignItems: 'center' | alignItems: 'center' | ||||