# Conflicts: # src/pages/DemandNote/Search/index.js # src/pages/Payment/index.jsmaster
| @@ -203,3 +203,36 @@ export const SetupAxiosInterceptors = () => { | |||||
| ) | ) | ||||
| } | } | ||||
| export const handleRefreshTokenFunction = () => { | |||||
| // const token = localStorage.getItem('accessToken'); | |||||
| let isRefresh = false; | |||||
| if (!isRefresh) { | |||||
| const refreshToken = localStorage.getItem('refreshToken'); | |||||
| isRefresh = true; | |||||
| axios.post(`${apiPath}${REFRESH_TOKEN}`, { | |||||
| refreshToken: refreshToken | |||||
| }).then((response) => { | |||||
| if (response.status === 200) { | |||||
| const newAccessToken = response.data.accessToken; | |||||
| const newRefreshToken = response.data.refreshToken; | |||||
| localStorage.setItem('accessToken', newAccessToken); | |||||
| localStorage.setItem('refreshToken', newRefreshToken); | |||||
| // token = newAccessToken; | |||||
| isRefresh = false; | |||||
| } else { | |||||
| // token = null; | |||||
| isRefresh = false; | |||||
| } | |||||
| }) | |||||
| .catch((refreshError) => { | |||||
| console.log('Failed to refresh token'); | |||||
| console.log(refreshError) | |||||
| // token = null | |||||
| isRefresh = false; | |||||
| }); | |||||
| } | |||||
| return isRefresh; | |||||
| } | |||||
| @@ -14,6 +14,7 @@ const AutoLogoutProvider = ({ children }) => { | |||||
| const [lastRequestTime, setLastRequestTime] = useState(Date.now()); | const [lastRequestTime, setLastRequestTime] = useState(Date.now()); | ||||
| const navigate = useNavigate(); | const navigate = useNavigate(); | ||||
| const [logoutInterval, setLogoutInterval] = useState(1); | const [logoutInterval, setLogoutInterval] = useState(1); | ||||
| // const [remainingInterval] = useState(5); | |||||
| const [state, setState] = useState('Active'); | const [state, setState] = useState('Active'); | ||||
| const dispatch = useDispatch() | const dispatch = useDispatch() | ||||
| @@ -28,7 +29,7 @@ const AutoLogoutProvider = ({ children }) => { | |||||
| } | } | ||||
| const { | const { | ||||
| getRemainingTime, | |||||
| // getRemainingTime, | |||||
| //getTabId, | //getTabId, | ||||
| isLastActiveTab, | isLastActiveTab, | ||||
| } = useIdleTimer({ | } = useIdleTimer({ | ||||
| @@ -80,11 +81,13 @@ const AutoLogoutProvider = ({ children }) => { | |||||
| // console.log(logoutInterval) | // console.log(logoutInterval) | ||||
| const interval = setInterval(async () => { | const interval = setInterval(async () => { | ||||
| const currentTime = Date.now(); | const currentTime = Date.now(); | ||||
| getRemainingTime(); | |||||
| // getRemainingTime(); | |||||
| if(state !== "Active" && lastActiveTab){ | if(state !== "Active" && lastActiveTab){ | ||||
| const timeElapsed = currentTime - lastRequestTime; | const timeElapsed = currentTime - lastRequestTime; | ||||
| // console.log(parseInt(timeElapsed/1000)); | // console.log(parseInt(timeElapsed/1000)); | ||||
| // console.log(logoutInterval* 60); | // console.log(logoutInterval* 60); | ||||
| // console.log(remainingInterval * 60); | |||||
| // console.log(logoutInterval * 60 * 1000 - timeElapsed) | |||||
| if (timeElapsed >= logoutInterval * 60 * 1000) { | if (timeElapsed >= logoutInterval * 60 * 1000) { | ||||
| if(isUserLoggedIn()){ | if(isUserLoggedIn()){ | ||||
| alert("登入驗證已過期,請重新登入。") | alert("登入驗證已過期,請重新登入。") | ||||
| @@ -94,9 +97,13 @@ const AutoLogoutProvider = ({ children }) => { | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else if(state === "Active"){ | |||||
| //TODO: if is active and remaining time < 5 min then refresh token | |||||
| } | |||||
| // else if(state === "Active"){ | |||||
| // const timeElapsed = currentTime - lastRequestTime; | |||||
| // if ( (logoutInterval * 60 * 1000 - timeElapsed) <= remainingInterval * 60 * 1000){ | |||||
| // } | |||||
| // //TODO: if is active and remaining time < 5 min then refresh token | |||||
| // } | |||||
| }, 1000); // Check every second | }, 1000); // Check every second | ||||
| return () => { | return () => { | ||||
| @@ -11,28 +11,109 @@ import * as DateUtils from "utils/DateUtils"; | |||||
| import {ThemeProvider} from "@emotion/react"; | import {ThemeProvider} from "@emotion/react"; | ||||
| import { useNavigate } from "react-router-dom"; | import { useNavigate } from "react-router-dom"; | ||||
| import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; | import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; | ||||
| import { makeStyles } from '@mui/styles'; | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
| const useStyles = makeStyles(() => ({ | |||||
| root: { | |||||
| position: "relative" | |||||
| }, | |||||
| display: { | |||||
| position: "absolute", | |||||
| top: 2, | |||||
| left: 12, | |||||
| bottom: 2, | |||||
| background: "white", | |||||
| pointerEvents: "none", | |||||
| right: 50, | |||||
| display: "flex", | |||||
| alignItems: "center" | |||||
| }, | |||||
| })); | |||||
| const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | ||||
| const navigate = useNavigate() | const navigate = useNavigate() | ||||
| const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); | const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); | ||||
| const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); | const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); | ||||
| const [fromDateValue, setFromDateValue] = React.useState("dd / mm / yyyy"); | |||||
| const [toDateValue, setToDateValue] = React.useState("dd / mm / yyyy"); | |||||
| React.useEffect(() => { | |||||
| // console.log(minDate) | |||||
| setFromDateValue(minDate); | |||||
| }, [minDate]); | |||||
| React.useEffect(() => { | |||||
| setToDateValue(maxDate); | |||||
| }, [maxDate]); | |||||
| function FormDateInputComponent({inputRef, ...props }) { | |||||
| const classes = useStyles(); | |||||
| return ( | |||||
| <> | |||||
| <div className={classes.display}> | |||||
| {DateUtils.dateStr(fromDateValue)=="Invalid Date"? | |||||
| fromDateValue | |||||
| : | |||||
| DateUtils.dateStr(fromDateValue)} | |||||
| </div> | |||||
| <input | |||||
| // className={classes.input} | |||||
| ref={inputRef} | |||||
| {...props} | |||||
| // onChange={handleChange} | |||||
| value={fromDateValue} | |||||
| max= {maxDate} | |||||
| /> | |||||
| </> | |||||
| ); | |||||
| } | |||||
| function ToDateInputComponent({inputRef, ...props }) { | |||||
| const classes = useStyles(); | |||||
| return ( | |||||
| <> | |||||
| <div className={classes.display}> | |||||
| {DateUtils.dateStr(toDateValue)=="Invalid Date"? | |||||
| toDateValue | |||||
| : | |||||
| DateUtils.dateStr(toDateValue)} | |||||
| </div> | |||||
| <input | |||||
| // className={classes.input} | |||||
| ref={inputRef} | |||||
| {...props} | |||||
| // onChange={handleChange} | |||||
| value={toDateValue} | |||||
| min = {minDate} | |||||
| /> | |||||
| </> | |||||
| ); | |||||
| } | |||||
| const marginBottom = 2.5; | const marginBottom = 2.5; | ||||
| const { reset, register, handleSubmit } = useForm() | const { reset, register, handleSubmit } = useForm() | ||||
| const onSubmit = (data) => { | const onSubmit = (data) => { | ||||
| let sentDateFrom = ""; | |||||
| let sentDateTo = ""; | |||||
| if( fromDateValue!="dd / mm / yyyy"&&toDateValue!="dd / mm / yyyy"){ | |||||
| sentDateFrom = DateUtils.dateValue(fromDateValue) | |||||
| sentDateTo = DateUtils.dateValue(toDateValue) | |||||
| } | |||||
| const temp = { | const temp = { | ||||
| key: data.key, | key: data.key, | ||||
| dateFrom: data.dateFrom, | |||||
| dateTo: data.dateTo, | |||||
| dateFrom: sentDateFrom, | |||||
| dateTo: sentDateTo, | |||||
| }; | }; | ||||
| applySearch(temp); | applySearch(temp); | ||||
| }; | }; | ||||
| function resetForm() { | function resetForm() { | ||||
| setMinDate(DateUtils.dateValue(new Date().setDate(new Date().getDate()-14))) | |||||
| setMaxDate(DateUtils.dateValue(new Date())) | |||||
| reset(); | reset(); | ||||
| } | } | ||||
| @@ -54,7 +135,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| </Grid> | </Grid> | ||||
| {/*row 2*/} | {/*row 2*/} | ||||
| <Grid container display="flex" alignItems={"center"}> | <Grid container display="flex" alignItems={"center"}> | ||||
| <Grid item xs={9} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: marginBottom }}> | |||||
| <Grid item xs={12} s={6} md={5} lg={3} sx={{ ml: 3, mr: 3, mb: marginBottom }}> | |||||
| <TextField | <TextField | ||||
| fullWidth | fullWidth | ||||
| {...register("key")} | {...register("key")} | ||||
| @@ -67,7 +148,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={9} s={6} md={5} lg={3} sx={{ml:3, mr:3, mb:marginBottom}}> | |||||
| <Grid item xs={12} s={6} md={5} lg={3} sx={{ml:3, mr:3, mb:marginBottom}}> | |||||
| <Grid container spacing={1}> | <Grid container spacing={1}> | ||||
| <Grid item xs={6}> | <Grid item xs={6}> | ||||
| <TextField | <TextField | ||||
| @@ -77,14 +158,18 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| type="date" | type="date" | ||||
| label={"Submit Date (From)"} | label={"Submit Date (From)"} | ||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | |||||
| InputProps={{ | |||||
| inputComponent: FormDateInputComponent, | |||||
| }} | |||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -95,15 +180,19 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria}) => { | |||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | |||||
| InputProps={{ | |||||
| inputComponent: ToDateInputComponent, | |||||
| }} | |||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| label={"Submit Date (To)"} | label={"Submit Date (To)"} | ||||
| defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -9,33 +9,113 @@ import { useForm } from "react-hook-form"; | |||||
| import * as React from "react"; | import * as React from "react"; | ||||
| import * as DateUtils from "utils/DateUtils"; | import * as DateUtils from "utils/DateUtils"; | ||||
| import { ThemeProvider } from "@emotion/react"; | import { ThemeProvider } from "@emotion/react"; | ||||
| import { useNavigate } from "react-router-dom"; | |||||
| // import { useNavigate } from "react-router-dom"; | |||||
| import { PNSPS_BUTTON_THEME } from "../../../themes/buttonConst"; | import { PNSPS_BUTTON_THEME } from "../../../themes/buttonConst"; | ||||
| import { FormattedMessage, useIntl } from "react-intl"; | import { FormattedMessage, useIntl } from "react-intl"; | ||||
| import { makeStyles } from '@mui/styles'; | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
| const useStyles = makeStyles(() => ({ | |||||
| root: { | |||||
| position: "relative" | |||||
| }, | |||||
| display: { | |||||
| position: "absolute", | |||||
| top: 2, | |||||
| left: 12, | |||||
| bottom: 2, | |||||
| background: "white", | |||||
| pointerEvents: "none", | |||||
| right: 50, | |||||
| display: "flex", | |||||
| alignItems: "center" | |||||
| }, | |||||
| })); | |||||
| const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | ||||
| const navigate = useNavigate() | |||||
| // const navigate = useNavigate() | |||||
| const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); | const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); | ||||
| const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); | const [maxDate, setMaxDate] = React.useState(searchCriteria.dateTo); | ||||
| const [fromDateValue, setFromDateValue] = React.useState("dd / mm / yyyy"); | |||||
| const [toDateValue, setToDateValue] = React.useState("dd / mm / yyyy"); | |||||
| const intl = useIntl(); | const intl = useIntl(); | ||||
| React.useEffect(() => { | |||||
| // console.log(minDate) | |||||
| setFromDateValue(minDate); | |||||
| }, [minDate]); | |||||
| React.useEffect(() => { | |||||
| setToDateValue(maxDate); | |||||
| }, [maxDate]); | |||||
| function FormDateInputComponent({inputRef, ...props }) { | |||||
| const classes = useStyles(); | |||||
| return ( | |||||
| <> | |||||
| <div className={classes.display}> | |||||
| {DateUtils.dateStr(fromDateValue)=="Invalid Date"? | |||||
| fromDateValue | |||||
| : | |||||
| DateUtils.dateStr(fromDateValue)} | |||||
| </div> | |||||
| <input | |||||
| // className={classes.input} | |||||
| ref={inputRef} | |||||
| {...props} | |||||
| // onChange={handleChange} | |||||
| value={fromDateValue} | |||||
| max= {maxDate} | |||||
| /> | |||||
| </> | |||||
| ); | |||||
| } | |||||
| function ToDateInputComponent({inputRef, ...props }) { | |||||
| const classes = useStyles(); | |||||
| return ( | |||||
| <> | |||||
| <div className={classes.display}> | |||||
| {DateUtils.dateStr(toDateValue)=="Invalid Date"? | |||||
| toDateValue | |||||
| : | |||||
| DateUtils.dateStr(toDateValue)} | |||||
| </div> | |||||
| <input | |||||
| // className={classes.input} | |||||
| ref={inputRef} | |||||
| {...props} | |||||
| // onChange={handleChange} | |||||
| value={toDateValue} | |||||
| min = {minDate} | |||||
| /> | |||||
| </> | |||||
| ); | |||||
| } | |||||
| const marginBottom = 2.5; | const marginBottom = 2.5; | ||||
| const { reset, register, handleSubmit } = useForm() | const { reset, register, handleSubmit } = useForm() | ||||
| const onSubmit = (data) => { | const onSubmit = (data) => { | ||||
| let sentDateFrom = ""; | |||||
| let sentDateTo = ""; | |||||
| if( fromDateValue!="dd / mm / yyyy"&&toDateValue!="dd / mm / yyyy"){ | |||||
| sentDateFrom = DateUtils.dateValue(fromDateValue)!="Invalid Date"?DateUtils.dateValue(fromDateValue):"" | |||||
| sentDateTo = DateUtils.dateValue(toDateValue)!="Invalid Date"?DateUtils.dateValue(toDateValue):"" | |||||
| } | |||||
| const temp = { | const temp = { | ||||
| key: data.key, | key: data.key, | ||||
| dateFrom: data.dateFrom, | |||||
| dateTo: data.dateTo, | |||||
| dateFrom: sentDateFrom, | |||||
| dateTo: sentDateTo, | |||||
| }; | }; | ||||
| applySearch(temp); | applySearch(temp); | ||||
| }; | }; | ||||
| function resetForm() { | function resetForm() { | ||||
| setMinDate(DateUtils.dateValue(new Date().setDate(new Date().getDate()-14))) | |||||
| setMaxDate(DateUtils.dateValue(new Date())) | |||||
| reset(); | reset(); | ||||
| } | } | ||||
| @@ -80,13 +160,18 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| type="date" | type="date" | ||||
| label={intl.formatMessage({ id: 'dateFrom' }) + ":"} | label={intl.formatMessage({ id: 'dateFrom' }) + ":"} | ||||
| defaultValue={searchCriteria.dateFrom} | defaultValue={searchCriteria.dateFrom} | ||||
| InputProps={{ inputProps: { max: maxDate } }} | |||||
| InputProps={{ | |||||
| inputComponent: FormDateInputComponent, | |||||
| }} | |||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(DateUtils.dateValue(newValue)); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -101,14 +186,19 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| {...register("dateTo")} | {...register("dateTo")} | ||||
| InputProps={{ inputProps: { min: minDate } }} | |||||
| InputProps={{ | |||||
| inputComponent: ToDateInputComponent, | |||||
| }} | |||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(DateUtils.dateValue(newValue)); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| //label={"Submit Date(To)"} | //label={"Submit Date(To)"} | ||||
| defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -119,7 +209,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| {/*last row*/} | {/*last row*/} | ||||
| <Grid container maxWidth justifyContent="flex-end"> | <Grid container maxWidth justifyContent="flex-end"> | ||||
| <ThemeProvider theme={PNSPS_BUTTON_THEME}> | <ThemeProvider theme={PNSPS_BUTTON_THEME}> | ||||
| <Grid item sx={{ ml: 3 }}> | |||||
| {/* <Grid item sx={{ ml: 3 }}> | |||||
| <Button | <Button | ||||
| variant="contained" | variant="contained" | ||||
| color="green" | color="green" | ||||
| @@ -129,7 +219,7 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| > | > | ||||
| <FormattedMessage id="create"></FormattedMessage> | <FormattedMessage id="create"></FormattedMessage> | ||||
| </Button> | </Button> | ||||
| </Grid> | |||||
| </Grid> */} | |||||
| <Grid item sx={{ ml: 3 }}> | <Grid item sx={{ ml: 3 }}> | ||||
| <Button | <Button | ||||
| variant="contained" | variant="contained" | ||||
| @@ -189,12 +189,14 @@ const AuditLogSearchForm = ({ applySearch, searchCriteria}) => { | |||||
| inputComponent: FormDateInputComponent, | inputComponent: FormDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -213,13 +215,15 @@ const AuditLogSearchForm = ({ applySearch, searchCriteria}) => { | |||||
| inputComponent: ToDateInputComponent, | inputComponent: ToDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| id="modifiedTo" | id="modifiedTo" | ||||
| type="date" | type="date" | ||||
| label="Modified To" | label="Modified To" | ||||
| defaultValue={searchCriteria.modifiedTo} | defaultValue={searchCriteria.modifiedTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -340,7 +340,7 @@ export default function SearchDemandNote({ searchCriteria, applySearch }) { | |||||
| getRowHeight={() => 'auto'} | getRowHeight={() => 'auto'} | ||||
| onRowDoubleClick={handleRowDoubleClick} | onRowDoubleClick={handleRowDoubleClick} | ||||
| doLoad={React.useMemo(() => ({ | doLoad={React.useMemo(() => ({ | ||||
| url: UrlUtils.DEMAND_NOTE_LIST, | |||||
| url: UrlUtils.DEMAND_NOTE_LIST_ALL, | |||||
| params: _searchCriteria, | params: _searchCriteria, | ||||
| callback: function (responseData) { | callback: function (responseData) { | ||||
| setRows(responseData?.records); | setRows(responseData?.records); | ||||
| @@ -361,12 +361,14 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| inputComponent: FormDateInputComponent, | inputComponent: FormDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -381,13 +383,15 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| inputComponent: ToDateInputComponent, | inputComponent: ToDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| label={"Issue Date (To)"} | label={"Issue Date (To)"} | ||||
| defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -412,7 +416,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -434,7 +438,7 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| type="date" | type="date" | ||||
| label={"Due Date (To)"} | label={"Due Date (To)"} | ||||
| defaultValue={searchCriteria.dueDateTo} | defaultValue={searchCriteria.dueDateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -256,7 +256,9 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData | |||||
| inputComponent: FormDateInputComponent, | inputComponent: FormDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| @@ -275,7 +277,9 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData | |||||
| inputComponent: ToDateInputComponent, | inputComponent: ToDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| @@ -30,7 +30,7 @@ const BackgroundHead = { | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
| const UserSearchPage_Individual = () => { | |||||
| const SearchPage_DemandNote_Pub = () => { | |||||
| const [orgCombo, setOrgCombo] = React.useState([]); | const [orgCombo, setOrgCombo] = React.useState([]); | ||||
| const [issueCombo, setIssueCombo] = React.useState([]); | const [issueCombo, setIssueCombo] = React.useState([]); | ||||
| @@ -117,4 +117,4 @@ const UserSearchPage_Individual = () => { | |||||
| </Grid> | </Grid> | ||||
| ); | ); | ||||
| } | } | ||||
| export default UserSearchPage_Individual; | |||||
| export default SearchPage_DemandNote_Pub; | |||||
| @@ -134,12 +134,14 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria }) => | |||||
| inputComponent: FormDateInputComponent, | inputComponent: FormDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -440,7 +440,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| disabled={(!editMode && !createMode)} | disabled={(!editMode && !createMode)} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -70,7 +70,7 @@ const PaymentDetails = ({ formData,doPrint,onDownload }) => { | |||||
| <Grid container > | <Grid container > | ||||
| <Grid item xs={6} md={6} sx={{ml:-5, textAlign: "right" }}> | <Grid item xs={6} md={6} sx={{ml:-5, textAlign: "right" }}> | ||||
| <FormLabel sx={{ color: "#000000" }}> | <FormLabel sx={{ color: "#000000" }}> | ||||
| Transaction No.: | |||||
| Payment No.: | |||||
| </FormLabel> | </FormLabel> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={6} md={5} sx={{ml:5, textAlign: "left" }}> | <Grid item xs={6} md={5} sx={{ml:5, textAlign: "left" }}> | ||||
| @@ -84,7 +84,7 @@ const PaymentDetails = ({ formData,doPrint,onDownload }) => { | |||||
| <Grid container > | <Grid container > | ||||
| <Grid item xs={6} md={6} sx={{ml:-5, textAlign: "right" }}> | <Grid item xs={6} md={6} sx={{ml:-5, textAlign: "right" }}> | ||||
| <FormLabel sx={{ color: "#000000" }}> | <FormLabel sx={{ color: "#000000" }}> | ||||
| Transaction Date: | |||||
| Payment Date: | |||||
| </FormLabel> | </FormLabel> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={6} md={5} sx={{ml:5, textAlign: "left" }}> | <Grid item xs={6} md={5} sx={{ml:5, textAlign: "left" }}> | ||||
| @@ -98,7 +98,7 @@ const PaymentDetails = ({ formData,doPrint,onDownload }) => { | |||||
| <Grid container > | <Grid container > | ||||
| <Grid item xs={6} md={6} sx={{ml:-5, textAlign: "right" }}> | <Grid item xs={6} md={6} sx={{ml:-5, textAlign: "right" }}> | ||||
| <FormLabel sx={{ color: "#000000" }}> | <FormLabel sx={{ color: "#000000" }}> | ||||
| Transaction Time: | |||||
| Payment Time: | |||||
| </FormLabel> | </FormLabel> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={6} md={5} sx={{ml:5, textAlign: "left" }}> | <Grid item xs={6} md={5} sx={{ml:5, textAlign: "left" }}> | ||||
| @@ -58,7 +58,7 @@ const Index = () => { | |||||
| // window.print(); | // window.print(); | ||||
| setOnDownload(true) | setOnDownload(true) | ||||
| HttpUtils.fileDownload({ | HttpUtils.fileDownload({ | ||||
| url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id, | |||||
| url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id+"/"+"en", | |||||
| onResponse:()=>{ | onResponse:()=>{ | ||||
| setOnDownload(false) | setOnDownload(false) | ||||
| }, | }, | ||||
| @@ -80,7 +80,7 @@ const PaymentDetails = ({ formData,doPrint,onDownload }) => { | |||||
| <Grid container spacing={5} > | <Grid container spacing={5} > | ||||
| <Grid item xs={6} md={6} sx={{ textAlign: "right" }}> | <Grid item xs={6} md={6} sx={{ textAlign: "right" }}> | ||||
| <FormLabel sx={{ fontSize: "16px", color: "#000000" }}> | <FormLabel sx={{ fontSize: "16px", color: "#000000" }}> | ||||
| <FormattedMessage id="transactionNo" />: | |||||
| <FormattedMessage id="paymentNo" />: | |||||
| </FormLabel> | </FormLabel> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={6} md={6} sx={{ textAlign: "left" }}> | <Grid item xs={6} md={6} sx={{ textAlign: "left" }}> | ||||
| @@ -94,7 +94,7 @@ const PaymentDetails = ({ formData,doPrint,onDownload }) => { | |||||
| <Grid container spacing={5}> | <Grid container spacing={5}> | ||||
| <Grid item xs={6} md={6} sx={{textAlign: "right" }}> | <Grid item xs={6} md={6} sx={{textAlign: "right" }}> | ||||
| <FormLabel sx={{ fontSize: "16px", color: "#000000" }}> | <FormLabel sx={{ fontSize: "16px", color: "#000000" }}> | ||||
| <FormattedMessage id="transactionDate" />: | |||||
| <FormattedMessage id="paymentDate" />: | |||||
| </FormLabel> | </FormLabel> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={6} md={6} sx={{textAlign: "left" }}> | <Grid item xs={6} md={6} sx={{textAlign: "left" }}> | ||||
| @@ -108,7 +108,7 @@ const PaymentDetails = ({ formData,doPrint,onDownload }) => { | |||||
| <Grid container spacing={5}> | <Grid container spacing={5}> | ||||
| <Grid item xs={6} md={6} sx={{ textAlign: "right" }}> | <Grid item xs={6} md={6} sx={{ textAlign: "right" }}> | ||||
| <FormLabel sx={{ fontSize: "16px", color: "#000000" }}> | <FormLabel sx={{ fontSize: "16px", color: "#000000" }}> | ||||
| <FormattedMessage id="transactionTime" />: | |||||
| <FormattedMessage id="paymentTime" />: | |||||
| </FormLabel> | </FormLabel> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={6} md={6} sx={{textAlign: "left" }}> | <Grid item xs={6} md={6} sx={{textAlign: "left" }}> | ||||
| @@ -136,7 +136,7 @@ const PaymentDetails = ({ formData,doPrint,onDownload }) => { | |||||
| <Grid container spacing={5} > | <Grid container spacing={5} > | ||||
| <Grid item xs={6} md={6} sx={{ textAlign: "right" }}> | <Grid item xs={6} md={6} sx={{ textAlign: "right" }}> | ||||
| <FormLabel sx={{ fontSize: "16px", color: "#000000" }}> | <FormLabel sx={{ fontSize: "16px", color: "#000000" }}> | ||||
| <FormattedMessage id="payTotalDeatail"/>: | |||||
| <FormattedMessage id="payDeatail"/>: | |||||
| </FormLabel> | </FormLabel> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={6} md={6} sx={{textAlign: "left" }}> | <Grid item xs={6} md={6} sx={{textAlign: "left" }}> | ||||
| @@ -150,7 +150,7 @@ const PaymentDetails = ({ formData,doPrint,onDownload }) => { | |||||
| <Grid container spacing={5} > | <Grid container spacing={5} > | ||||
| <Grid item xs={6} md={6} sx={{ textAlign: "right" }}> | <Grid item xs={6} md={6} sx={{ textAlign: "right" }}> | ||||
| <FormLabel sx={{ fontSize: "16px", color: "#000000" }}> | <FormLabel sx={{ fontSize: "16px", color: "#000000" }}> | ||||
| <FormattedMessage id="payMethod"/>: | |||||
| <FormattedMessage id="epayMethod"/>: | |||||
| </FormLabel> | </FormLabel> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={6} md={6} sx={{textAlign: "left" }}> | <Grid item xs={6} md={6} sx={{textAlign: "left" }}> | ||||
| @@ -42,6 +42,7 @@ const Index = () => { | |||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| const [onDownload, setOnDownload] = React.useState(false); | const [onDownload, setOnDownload] = React.useState(false); | ||||
| // const [detailsOrder, setDetailsOrder] = React.useState(2); | // const [detailsOrder, setDetailsOrder] = React.useState(2); | ||||
| const { locale } = intl; | |||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| loadForm(); | loadForm(); | ||||
| @@ -60,8 +61,10 @@ const Index = () => { | |||||
| const doPrint = () => { | const doPrint = () => { | ||||
| // window.print(); | // window.print(); | ||||
| setOnDownload(true) | setOnDownload(true) | ||||
| const local = locale | |||||
| // console.log(local) | |||||
| HttpUtils.fileDownload({ | HttpUtils.fileDownload({ | ||||
| url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id, | |||||
| url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.id+"/"+local, | |||||
| onResponse:()=>{ | onResponse:()=>{ | ||||
| setOnDownload(false) | setOnDownload(false) | ||||
| }, | }, | ||||
| @@ -23,7 +23,7 @@ const PaymentDetails = Loadable(React.lazy(() => import('../Details_Public/Payme | |||||
| const DataGrid = Loadable(React.lazy(() => import('../Details_Public/DataGrid'))); | const DataGrid = Loadable(React.lazy(() => import('../Details_Public/DataGrid'))); | ||||
| import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | ||||
| import {FormattedMessage} from "react-intl"; | |||||
| import {FormattedMessage,useIntl} from "react-intl"; | |||||
| const BackgroundHead = { | const BackgroundHead = { | ||||
| backgroundImage: `url(${titleBackgroundImg})`, | backgroundImage: `url(${titleBackgroundImg})`, | ||||
| width: '100%', | width: '100%', | ||||
| @@ -52,6 +52,8 @@ const AckPage = () => { | |||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| const paymentStatusApi = "/api/payment/status/"; | const paymentStatusApi = "/api/payment/status/"; | ||||
| const [onDownload, setOnDownload] = React.useState(false); | const [onDownload, setOnDownload] = React.useState(false); | ||||
| const intl = useIntl(); | |||||
| const { locale } = intl; | |||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| loadForm(); | loadForm(); | ||||
| @@ -143,8 +145,9 @@ const AckPage = () => { | |||||
| const doPrint = () => { | const doPrint = () => { | ||||
| // window.print(); | // window.print(); | ||||
| setOnDownload(true) | setOnDownload(true) | ||||
| const local = locale | |||||
| HttpUtils.fileDownload({ | HttpUtils.fileDownload({ | ||||
| url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId"), | |||||
| url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId")+"/"+local, | |||||
| onResponse:()=>{ | onResponse:()=>{ | ||||
| setOnDownload(false) | setOnDownload(false) | ||||
| }, | }, | ||||
| @@ -23,7 +23,7 @@ const PaymentDetails = Loadable(React.lazy(() => import('../Details_Public/Payme | |||||
| const DataGrid = Loadable(React.lazy(() => import('../Details_Public/DataGrid'))); | const DataGrid = Loadable(React.lazy(() => import('../Details_Public/DataGrid'))); | ||||
| import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | ||||
| import {FormattedMessage} from "react-intl"; | |||||
| import {FormattedMessage,useIntl} from "react-intl"; | |||||
| const BackgroundHead = { | const BackgroundHead = { | ||||
| backgroundImage: `url(${titleBackgroundImg})`, | backgroundImage: `url(${titleBackgroundImg})`, | ||||
| width: '100%', | width: '100%', | ||||
| @@ -52,7 +52,8 @@ const Fpscallback = () => { | |||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| // const paymentStatusApi = "/api/payment/status/"; | // const paymentStatusApi = "/api/payment/status/"; | ||||
| const [onDownload, setOnDownload] = React.useState(false); | const [onDownload, setOnDownload] = React.useState(false); | ||||
| const intl = useIntl(); | |||||
| const { locale } = intl; | |||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| loadForm(); | loadForm(); | ||||
| @@ -162,8 +163,9 @@ const Fpscallback = () => { | |||||
| const params = new URLSearchParams(window.location.search); | const params = new URLSearchParams(window.location.search); | ||||
| // window.print(); | // window.print(); | ||||
| setOnDownload(true) | setOnDownload(true) | ||||
| const local = locale | |||||
| HttpUtils.fileDownload({ | HttpUtils.fileDownload({ | ||||
| url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.get("PAYMENT_ID"), | |||||
| url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+params.get("PAYMENT_ID")+"/"+local, | |||||
| onResponse:()=>{ | onResponse:()=>{ | ||||
| setOnDownload(false) | setOnDownload(false) | ||||
| }, | }, | ||||
| @@ -20,7 +20,7 @@ const PaymentDetails = Loadable(React.lazy(() => import('./Details_Public/Paymen | |||||
| const DataGrid = Loadable(React.lazy(() => import('./Details_Public/DataGrid'))); | const DataGrid = Loadable(React.lazy(() => import('./Details_Public/DataGrid'))); | ||||
| import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' | ||||
| import {FormattedMessage} from "react-intl"; | |||||
| import {FormattedMessage,useIntl} from "react-intl"; | |||||
| const BackgroundHead = { | const BackgroundHead = { | ||||
| backgroundImage: `url(${titleBackgroundImg})`, | backgroundImage: `url(${titleBackgroundImg})`, | ||||
| width: '100%', | width: '100%', | ||||
| @@ -48,6 +48,8 @@ const Index = () => { | |||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| const updatePaymentApi = "/api/payment/updatepayment"; | const updatePaymentApi = "/api/payment/updatepayment"; | ||||
| const paymentStatusApi = "/api/payment/status/"; | const paymentStatusApi = "/api/payment/status/"; | ||||
| const intl = useIntl(); | |||||
| const { locale } = intl; | |||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| @@ -146,8 +148,10 @@ const Index = () => { | |||||
| const doPrint = () => { | const doPrint = () => { | ||||
| // window.print(); | // window.print(); | ||||
| setOnDownload(true) | setOnDownload(true) | ||||
| const local = locale | |||||
| // console.log(local) | |||||
| HttpUtils.fileDownload({ | HttpUtils.fileDownload({ | ||||
| url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId"), | |||||
| url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId")+"/"+local, | |||||
| onResponse:()=>{ | onResponse:()=>{ | ||||
| setOnDownload(false) | setOnDownload(false) | ||||
| }, | }, | ||||
| @@ -167,12 +167,14 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| inputComponent: FormDateInputComponent, | inputComponent: FormDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={6}> | <Grid item xs={6}> | ||||
| @@ -186,13 +188,15 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| inputComponent: ToDateInputComponent, | inputComponent: ToDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| label="Transaction Date (To)" | label="Transaction Date (To)" | ||||
| defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -184,12 +184,14 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| inputComponent: FormDateInputComponent, | inputComponent: FormDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -204,13 +206,15 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| inputComponent: ToDateInputComponent, | inputComponent: ToDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| label={intl.formatMessage({id: 'payDateTo'})} | label={intl.formatMessage({id: 'payDateTo'})} | ||||
| defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -292,12 +292,14 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| inputComponent: FormDateInputComponent, | inputComponent: FormDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -312,13 +314,15 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| inputComponent: ToDateInputComponent, | inputComponent: ToDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| label="Proof Issue Date (To)" | label="Proof Issue Date (To)" | ||||
| defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -292,12 +292,14 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData | |||||
| inputComponent: FormDateInputComponent, | inputComponent: FormDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -312,13 +314,15 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData | |||||
| inputComponent: ToDateInputComponent, | inputComponent: ToDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| label={intl.formatMessage({id: 'proofDateTo'})} | label={intl.formatMessage({id: 'proofDateTo'})} | ||||
| defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -179,12 +179,14 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| inputComponent: FormDateInputComponent, | inputComponent: FormDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -205,9 +207,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria }) => { | |||||
| inputComponent: ToDateInputComponent, | inputComponent: ToDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| {isORGLoggedIn()? | {isORGLoggedIn()? | ||||
| @@ -227,12 +227,14 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| inputComponent: FormDateInputComponent, | inputComponent: FormDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMinDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMinDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -247,13 +249,15 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| inputComponent: ToDateInputComponent, | inputComponent: ToDateInputComponent, | ||||
| }} | }} | ||||
| onChange={(newValue) => { | onChange={(newValue) => { | ||||
| setMaxDate(newValue.target.value); | |||||
| if(newValue.target.value!=""){ | |||||
| setMaxDate(newValue.target.value); | |||||
| } | |||||
| }} | }} | ||||
| id="dateTo" | id="dateTo" | ||||
| type="date" | type="date" | ||||
| label={"Submit Date (To)"} | label={"Submit Date (To)"} | ||||
| defaultValue={searchCriteria.dateTo} | defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -286,6 +286,23 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| generateReport(temp); | generateReport(temp); | ||||
| } | } | ||||
| const clearHandler = () => () => { | |||||
| setSysTxnMinDate(searchCriteria.dateFrom) | |||||
| setsysTxnMaxDate(searchCriteria.dateTo) | |||||
| setTxnMinDate(searchCriteria.dateFrom) | |||||
| setTxnMaxDate(searchCriteria.dateTo) | |||||
| setCollMinDate(searchCriteria.dateFrom) | |||||
| setCollMaxDate(searchCriteria.dateTo) | |||||
| setSysTxnFromDateValue("") | |||||
| setSysTxnToDateValue("") | |||||
| setTxnFromDateValue("") | |||||
| setTxnToDateValue("") | |||||
| setCollFromDateValue("") | |||||
| setCollToDateValue("") | |||||
| setStatus(ComboData.paymentStatus[0]) | |||||
| setMethod(ComboData.paymentMethod[0]) | |||||
| } | |||||
| return ( | return ( | ||||
| <MainCard xs={12} md={12} lg={12} | <MainCard xs={12} md={12} lg={12} | ||||
| border={false} | border={false} | ||||
| @@ -382,7 +399,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={4}> | <Grid item xs={4}> | ||||
| @@ -402,7 +419,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| type="date" | type="date" | ||||
| label="PNSPS Transaction Date (To)" | label="PNSPS Transaction Date (To)" | ||||
| ////defaultValue={searchCriteria.dateTo} | ////defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -430,7 +447,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={4}> | <Grid item xs={4}> | ||||
| @@ -450,7 +467,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| type="date" | type="date" | ||||
| label="FI Transaction Date (To)" | label="FI Transaction Date (To)" | ||||
| //defaultValue={searchCriteria.dateTo} | //defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -478,7 +495,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| InputLabelProps={{ | InputLabelProps={{ | ||||
| shrink: true | shrink: true | ||||
| }} | }} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={4}> | <Grid item xs={4}> | ||||
| @@ -498,65 +515,92 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, searchCriteria, o | |||||
| type="date" | type="date" | ||||
| label="Bank Credit Date (To)" | label="Bank Credit Date (To)" | ||||
| //defaultValue={searchCriteria.dateTo} | //defaultValue={searchCriteria.dateTo} | ||||
| sx={{ "& .MuiInputBase-input": {display:"block"} }} | |||||
| sx={{ "& .MuiInputBase-input": {display:"block", textIndent: "-9999px"} }} | |||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| <Grid container justifyContent="flex-end" direction="row" alignItems="center" spacing={3}> | |||||
| {onLoad? | |||||
| <Grid item sx={{ ml: 3, mb: 3, mr:6 }} > | |||||
| <LoadingComponent disableText={true} alignItems="flex-start"/> | |||||
| </Grid> | |||||
| : | |||||
| <ThemeProvider theme={PNSPS_BUTTON_THEME}> | |||||
| <Grid container direction="row" justifyContent="space-between"> | |||||
| <Grid item> | |||||
| <Grid container justifyContent="flex-Start" direction="row" alignItems="center" spacing={3}> | |||||
| <Grid item sx={{ ml: 3, mb: 3, }} > | <Grid item sx={{ ml: 3, mb: 3, }} > | ||||
| {/* <ThemeProvider theme={PNSPS_BUTTON_THEME}> | |||||
| <Button | <Button | ||||
| variant="contained" | variant="contained" | ||||
| type="submit" | |||||
| color="cancel" | |||||
| onClick={clearHandler()} | |||||
| > | > | ||||
| View | |||||
| </Button> | |||||
| Reset | |||||
| </Button> | |||||
| </ThemeProvider> */} | |||||
| </Grid> | </Grid> | ||||
| <Grid item sx={{ ml: 3, mb: 3, }} > | |||||
| <Grid container spacing={3}> | |||||
| <Grid item sx={{ ml: 3, mr:3 }} > | |||||
| </Grid> | |||||
| </Grid> | |||||
| <Grid item> | |||||
| <Grid container justifyContent="flex-end" direction="row" alignItems="center" spacing={3}> | |||||
| {onLoad? | |||||
| <Grid item sx={{ ml: 3, mb: 3, mr:6 }} > | |||||
| <LoadingComponent disableText={true} alignItems="flex-start"/> | |||||
| </Grid> | |||||
| : | |||||
| <ThemeProvider theme={PNSPS_BUTTON_THEME}> | |||||
| <Grid item sx={{ mr: 3, mb: 3, }} > | |||||
| <Button | <Button | ||||
| variant="contained" | variant="contained" | ||||
| onClick={generateFileHandler("csv")} | |||||
| color="cancel" | |||||
| onClick={clearHandler()} | |||||
| > | > | ||||
| Generate CSV | |||||
| </Button> | |||||
| Reset | |||||
| </Button> | |||||
| </Grid> | </Grid> | ||||
| <Grid item sx={{ ml: 3, }} > | |||||
| <Button | |||||
| variant="contained" | |||||
| onClick={generateFileHandler("pdf")} | |||||
| > | |||||
| Generate PDF | |||||
| </Button> | |||||
| <Grid item sx={{ ml: 3, mb: 3, }} > | |||||
| <Button | |||||
| variant="contained" | |||||
| type="submit" | |||||
| > | |||||
| View | |||||
| </Button> | |||||
| </Grid> | </Grid> | ||||
| </Grid> | |||||
| </Grid> | |||||
| {/* <Grid item sx={{ ml: 3, mr: 3, mb: 3, }} > | |||||
| {onDownload? | |||||
| <LoadingComponent disableText={true} alignItems="flex-start"/> | |||||
| : | |||||
| <Button | |||||
| variant="contained" | |||||
| onClick={generatePDFHandler} | |||||
| > | |||||
| Generate PDF | |||||
| </Button> | |||||
| } | |||||
| </Grid> */} | |||||
| </ThemeProvider> | |||||
| } | |||||
| <Grid item sx={{ ml: 3, mb: 3, }} > | |||||
| <Grid container spacing={3}> | |||||
| <Grid item sx={{ ml: 3, mr:3 }} > | |||||
| <Button | |||||
| variant="contained" | |||||
| onClick={generateFileHandler("csv")} | |||||
| > | |||||
| Generate CSV | |||||
| </Button> | |||||
| </Grid> | |||||
| <Grid item sx={{ ml: 3, }} > | |||||
| <Button | |||||
| variant="contained" | |||||
| onClick={generateFileHandler("pdf")} | |||||
| > | |||||
| Generate PDF | |||||
| </Button> | |||||
| </Grid> | |||||
| </Grid> | |||||
| </Grid> | |||||
| {/* <Grid item sx={{ ml: 3, mr: 3, mb: 3, }} > | |||||
| {onDownload? | |||||
| <LoadingComponent disableText={true} alignItems="flex-start"/> | |||||
| : | |||||
| <Button | |||||
| variant="contained" | |||||
| onClick={generatePDFHandler} | |||||
| > | |||||
| Generate PDF | |||||
| </Button> | |||||
| } | |||||
| </Grid> */} | |||||
| </ThemeProvider> | |||||
| } | |||||
| </Grid> | |||||
| </Grid> | |||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| </form> | </form> | ||||
| @@ -1,7 +1,9 @@ | |||||
| // material-ui | // material-ui | ||||
| import { | import { | ||||
| Grid, Button, Typography, | Grid, Button, Typography, | ||||
| FormHelperText | |||||
| FormHelperText, | |||||
| Stack, | |||||
| IconButton | |||||
| } from '@mui/material'; | } from '@mui/material'; | ||||
| import MainCard from "components/MainCard"; | import MainCard from "components/MainCard"; | ||||
| import * as React from "react"; | import * as React from "react"; | ||||
| @@ -20,6 +22,7 @@ import { notifyActiveSuccess, notifyLockSuccess, notifySaveSuccess, notifyVerify | |||||
| import {useIntl} from "react-intl"; | import {useIntl} from "react-intl"; | ||||
| import {PNSPS_BUTTON_THEME} from "themes/buttonConst"; | import {PNSPS_BUTTON_THEME} from "themes/buttonConst"; | ||||
| import {ThemeProvider} from "@emotion/react"; | import {ThemeProvider} from "@emotion/react"; | ||||
| import { EyeInvisibleOutlined, EyeOutlined } from '@ant-design/icons'; | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
| @@ -31,7 +34,16 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||||
| const [locked, setLocked] = useState(false); | const [locked, setLocked] = useState(false); | ||||
| const [onReady, setOnReady] = useState(false); | const [onReady, setOnReady] = useState(false); | ||||
| const [errorMsg, setErrorMsg] = useState(""); | const [errorMsg, setErrorMsg] = useState(""); | ||||
| const [showId, setshowId] = useState(false); | |||||
| const handleClickShowId = () => { | |||||
| setshowId(!showId); | |||||
| }; | |||||
| const handleMouseDownId = (event) => { | |||||
| event.preventDefault(); | |||||
| }; | |||||
| useEffect(() => { | useEffect(() => { | ||||
| //if state data are ready and assign to different field | //if state data are ready and assign to different field | ||||
| // console.log(currentApplicationDetailData) | // console.log(currentApplicationDetailData) | ||||
| @@ -359,39 +371,78 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||||
| <Grid item xs={12} sm={12} md={9} lg={6}> | <Grid item xs={12} sm={12} md={9} lg={6}> | ||||
| <Grid container> | <Grid container> | ||||
| {formik.values.idDocType === "HKID" ? | {formik.values.idDocType === "HKID" ? | ||||
| <> | |||||
| <Grid item xs={6} sm={6} md={6} lg={7.5} sx={{mr:1}}> | |||||
| editMode? | |||||
| <> | |||||
| <Grid item xs={6} sm={6} md={6} lg={7.5} sx={{mr:1}}> | |||||
| {FieldUtils.initField({ | |||||
| valueName: "identification", | |||||
| disabled: (!editMode), | |||||
| form: formik, | |||||
| placeholder: intl.formatMessage({id: 'idDocNumber'}), | |||||
| inputProps: { | |||||
| maxLength: 7, | |||||
| onKeyDown: (e) => { | |||||
| if (e.key === 'Enter') { | |||||
| e.preventDefault(); | |||||
| } | |||||
| }, | |||||
| } | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item xs={2} sm={2} md={2} lg={2} style={{minWidth:40}}> | |||||
| {FieldUtils.initField({ | |||||
| valueName: "checkDigit", | |||||
| disabled: (!editMode), | |||||
| form: formik, | |||||
| })} | |||||
| </Grid> | |||||
| </> | |||||
| : | |||||
| <Stack direction="row"> | |||||
| <Typography variant="h5" mt={1}> | |||||
| {formik.values.identification.slice(0, 4)} | |||||
| </Typography> | |||||
| <Typography variant="h5"mt={1}> | |||||
| {showId ?formik.values.identification.slice(4):"****"}{showId ? '(' + formik.values.checkDigit + ')' :null} | |||||
| </Typography> | |||||
| <IconButton | |||||
| aria-label="toggle id visibility" | |||||
| onClick={handleClickShowId} | |||||
| onMouseDown={handleMouseDownId} | |||||
| edge="end" | |||||
| size="large" | |||||
| > | |||||
| {showId ? <EyeOutlined /> : <EyeInvisibleOutlined />} | |||||
| </IconButton> | |||||
| </Stack> | |||||
| : | |||||
| editMode? | |||||
| <Grid item xs={10} sm={4} md={4} lg={10}> | |||||
| {FieldUtils.initField({ | {FieldUtils.initField({ | ||||
| valueName: "identification", | valueName: "identification", | ||||
| disabled: (!editMode), | disabled: (!editMode), | ||||
| form: formik, | |||||
| placeholder: intl.formatMessage({id: 'idDocNumber'}), | |||||
| inputProps: { | |||||
| maxLength: 7, | |||||
| onKeyDown: (e) => { | |||||
| if (e.key === 'Enter') { | |||||
| e.preventDefault(); | |||||
| } | |||||
| }, | |||||
| } | |||||
| })} | |||||
| </Grid> | |||||
| <Grid item xs={2} sm={2} md={2} lg={2}> | |||||
| {FieldUtils.initField({ | |||||
| valueName: "checkDigit", | |||||
| disabled: (!editMode), | |||||
| form: formik | form: formik | ||||
| })} | })} | ||||
| </Grid> | </Grid> | ||||
| </> : | |||||
| <Grid item xs={12} sm={6} md={6} lg={12}> | |||||
| {FieldUtils.initField({ | |||||
| valueName: "identification", | |||||
| disabled: (!editMode), | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| : | |||||
| <Stack direction="row"> | |||||
| <Typography variant="h5" mt={1}> | |||||
| {formik.values.identification.slice(0, 4)} | |||||
| </Typography> | |||||
| <Typography variant="h5"mt={1}> | |||||
| {showId ?formik.values.identification.slice(4):"****"} | |||||
| </Typography> | |||||
| <IconButton | |||||
| aria-label="toggle id visibility" | |||||
| onClick={handleClickShowId} | |||||
| onMouseDown={handleMouseDownId} | |||||
| edge="end" | |||||
| size="large" | |||||
| > | |||||
| {showId ? <EyeOutlined /> : <EyeInvisibleOutlined />} | |||||
| </IconButton> | |||||
| </Stack> | |||||
| } | } | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -1,7 +1,9 @@ | |||||
| // material-ui | // material-ui | ||||
| import { | import { | ||||
| Grid, Button, Typography, | Grid, Button, Typography, | ||||
| FormHelperText | |||||
| FormHelperText, | |||||
| Stack, | |||||
| IconButton | |||||
| } from '@mui/material'; | } from '@mui/material'; | ||||
| import MainCard from "components/MainCard"; | import MainCard from "components/MainCard"; | ||||
| import * as React from "react"; | import * as React from "react"; | ||||
| @@ -20,6 +22,7 @@ import {notifySaveSuccess,} from 'utils/CommonFunction'; | |||||
| import {FormattedMessage, useIntl} from "react-intl"; | import {FormattedMessage, useIntl} from "react-intl"; | ||||
| import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; | import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; | ||||
| import {ThemeProvider} from "@emotion/react"; | import {ThemeProvider} from "@emotion/react"; | ||||
| import { EyeInvisibleOutlined, EyeOutlined } from '@ant-design/icons'; | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
| @@ -30,6 +33,15 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => { | |||||
| const [editMode, setEditMode] = useState(false); | const [editMode, setEditMode] = useState(false); | ||||
| const [onReady, setOnReady] = useState(false); | const [onReady, setOnReady] = useState(false); | ||||
| const [errorMsg, setErrorMsg] = useState(""); | const [errorMsg, setErrorMsg] = useState(""); | ||||
| const [showId, setshowId] = useState(false); | |||||
| const handleClickShowId = () => { | |||||
| setshowId(!showId); | |||||
| }; | |||||
| const handleMouseDownId = (event) => { | |||||
| event.preventDefault(); | |||||
| }; | |||||
| useEffect(() => { | useEffect(() => { | ||||
| if (Object.keys(formData).length > 0) { | if (Object.keys(formData).length > 0) { | ||||
| @@ -226,39 +238,74 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => { | |||||
| <Grid item xs={12} sm={12} md={9} lg={6}> | <Grid item xs={12} sm={12} md={9} lg={6}> | ||||
| <Grid container> | <Grid container> | ||||
| {formik.values.idDocType === "HKID" ? | {formik.values.idDocType === "HKID" ? | ||||
| <> | |||||
| <Grid item xs={6} sm={6} md={6} lg={7.5} sx={{mr:1}}> | |||||
| {FieldUtils.initField({ | |||||
| valueName: "identification", | |||||
| disabled: true, | |||||
| form: formik, | |||||
| placeholder: intl.formatMessage({id: 'idDocNumber'}), | |||||
| inputProps: { | |||||
| maxLength: 7, | |||||
| onKeyDown: (e) => { | |||||
| if (e.key === 'Enter') { | |||||
| e.preventDefault(); | |||||
| } | |||||
| }, | |||||
| } | |||||
| })} | |||||
| // <> | |||||
| // <Grid item xs={6} sm={6} md={6} lg={7.5} sx={{mr:1}}> | |||||
| // {FieldUtils.initField({ | |||||
| // valueName: "identification", | |||||
| // disabled: true, | |||||
| // form: formik, | |||||
| // placeholder: intl.formatMessage({id: 'idDocNumber'}), | |||||
| // inputProps: { | |||||
| // maxLength: 7, | |||||
| // onKeyDown: (e) => { | |||||
| // if (e.key === 'Enter') { | |||||
| // e.preventDefault(); | |||||
| // } | |||||
| // }, | |||||
| // } | |||||
| // })} | |||||
| </Grid> | |||||
| <Grid item xs={2} sm={2} md={2} lg={2} style={{minWidth:50}}> | |||||
| {FieldUtils.initField({ | |||||
| valueName: "checkDigit", | |||||
| disabled: true, | |||||
| form: formik, | |||||
| })} | |||||
| </Grid> | |||||
| </> : | |||||
| <Grid item xs={12} sm={6} md={6} lg={12}> | |||||
| {FieldUtils.initField({ | |||||
| valueName: "identification", | |||||
| disabled: true, | |||||
| form: formik | |||||
| })} | |||||
| </Grid> | |||||
| // </Grid> | |||||
| // <Grid item xs={2} sm={2} md={2} lg={2} style={{minWidth:40}}> | |||||
| // {FieldUtils.initField({ | |||||
| // valueName: "checkDigit", | |||||
| // disabled: true, | |||||
| // form: formik, | |||||
| // })} | |||||
| // </Grid> | |||||
| // </> | |||||
| <Stack direction="row"> | |||||
| <Typography variant="h5" mt={1}> | |||||
| {formik.values.identification.slice(0, 4)} | |||||
| </Typography> | |||||
| <Typography variant="h5"mt={1}> | |||||
| {showId ?formik.values.identification.slice(4):"****"}{showId ? '(' + formik.values.checkDigit + ')' :null} | |||||
| </Typography> | |||||
| <IconButton | |||||
| aria-label="toggle id visibility" | |||||
| onClick={handleClickShowId} | |||||
| onMouseDown={handleMouseDownId} | |||||
| edge="end" | |||||
| size="large" | |||||
| > | |||||
| {showId ? <EyeOutlined /> : <EyeInvisibleOutlined />} | |||||
| </IconButton> | |||||
| </Stack> | |||||
| : | |||||
| // <Grid item xs={10} sm={4} md={4} lg={10}> | |||||
| // {FieldUtils.initField({ | |||||
| // valueName: "identification", | |||||
| // disabled: true, | |||||
| // form: formik | |||||
| // })} | |||||
| // </Grid> | |||||
| <Stack direction="row"> | |||||
| <Typography variant="h5" mt={1}> | |||||
| {formik.values.identification.slice(0, 4)} | |||||
| </Typography> | |||||
| <Typography variant="h5"mt={1}> | |||||
| {showId ?formik.values.identification.slice(4):"****"} | |||||
| </Typography> | |||||
| <IconButton | |||||
| aria-label="toggle id visibility" | |||||
| onClick={handleClickShowId} | |||||
| onMouseDown={handleMouseDownId} | |||||
| edge="end" | |||||
| size="large" | |||||
| > | |||||
| {showId ? <EyeOutlined /> : <EyeInvisibleOutlined />} | |||||
| </IconButton> | |||||
| </Stack> | |||||
| } | } | ||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| @@ -59,6 +59,7 @@ const CustomFormWizard = (props) => { | |||||
| const [level, setLevel] = useState(); | const [level, setLevel] = useState(); | ||||
| const [showPassword, setShowPassword] = useState(false); | const [showPassword, setShowPassword] = useState(false); | ||||
| const [showConfirmPassword, setshowConfirmPassword] = useState(false); | const [showConfirmPassword, setshowConfirmPassword] = useState(false); | ||||
| const [showId, setshowId] = useState(false); | |||||
| const [fileList, setFileList] = useState([]); | const [fileList, setFileList] = useState([]); | ||||
| const [fileListData, setFileListData] = useState([]); | const [fileListData, setFileListData] = useState([]); | ||||
| const [checkUpload, setCheckUpload] = useState(false); | const [checkUpload, setCheckUpload] = useState(false); | ||||
| @@ -70,6 +71,7 @@ const CustomFormWizard = (props) => { | |||||
| const handleClickShowPassword = () => { | const handleClickShowPassword = () => { | ||||
| setShowPassword(!showPassword); | setShowPassword(!showPassword); | ||||
| }; | }; | ||||
| const handleClickShowConfirmPassword = () => { | const handleClickShowConfirmPassword = () => { | ||||
| setshowConfirmPassword(!showConfirmPassword); | setshowConfirmPassword(!showConfirmPassword); | ||||
| }; | }; | ||||
| @@ -78,6 +80,14 @@ const CustomFormWizard = (props) => { | |||||
| event.preventDefault(); | event.preventDefault(); | ||||
| }; | }; | ||||
| const handleClickShowId = () => { | |||||
| setshowId(!showId); | |||||
| }; | |||||
| const handleMouseDownId = (event) => { | |||||
| event.preventDefault(); | |||||
| }; | |||||
| const changePassword = (value) => { | const changePassword = (value) => { | ||||
| const temp = strengthIndicator(value); | const temp = strengthIndicator(value); | ||||
| setLevel(strengthColorChi(temp)); | setLevel(strengthColorChi(temp)); | ||||
| @@ -969,7 +979,7 @@ const CustomFormWizard = (props) => { | |||||
| inputProps={{ | inputProps={{ | ||||
| maxLength: selectedIdDocType.type === 'HKID' ? 8 : 18, | maxLength: selectedIdDocType.type === 'HKID' ? 8 : 18, | ||||
| onKeyDown: (e) => { | onKeyDown: (e) => { | ||||
| console.log(e) | |||||
| // console.log(e) | |||||
| if (e.key === 'Enter') { | if (e.key === 'Enter') { | ||||
| e.preventDefault(); | e.preventDefault(); | ||||
| } | } | ||||
| @@ -1683,7 +1693,7 @@ const CustomFormWizard = (props) => { | |||||
| </Grid> */} | </Grid> */} | ||||
| <Grid item xs={12} md={6} > | <Grid item xs={12} md={6} > | ||||
| <Stack spacing={1} direction="row"> | |||||
| <Stack spacing={1} direction="row" > | |||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | ||||
| <FormattedMessage id="idDocType" />: | <FormattedMessage id="idDocType" />: | ||||
| </Typography> | </Typography> | ||||
| @@ -1694,13 +1704,29 @@ const CustomFormWizard = (props) => { | |||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={6}> | <Grid item xs={12} md={6}> | ||||
| <Stack spacing={1} direction="row"> | |||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]}> | |||||
| <Stack direction="row" > | |||||
| <Typography variant="pnspsFormHeader" color={theme.palette.grey[600]} sx={{mr:1}}> | |||||
| <FormattedMessage id="idDocNumber" />: | <FormattedMessage id="idDocNumber" />: | ||||
| </Typography> | </Typography> | ||||
| <Typography variant="pnspsFormHeader" id="idNo-login"> | |||||
| {formik.values.idNo} {selectedIdDocType.type == "HKID" ? '(' + formik.values.checkDigit + ')' : null} | |||||
| <Typography variant="pnspsFormHeader" id="idNo-f4-login"> | |||||
| {formik.values.idNo.slice(0, 4)} | |||||
| </Typography> | |||||
| <Typography variant="pnspsFormHeader" id="idNo-exf4-login" | |||||
| type={showId ? "text" : "password"} | |||||
| > | |||||
| {showId ?formik.values.idNo.slice(4):"****"}{showId ?selectedIdDocType.type == "HKID" ? '(' + formik.values.checkDigit + ')' : null:null} | |||||
| </Typography> | </Typography> | ||||
| <IconButton | |||||
| aria-label="toggle id visibility" | |||||
| onClick={handleClickShowId} | |||||
| onMouseDown={handleMouseDownId} | |||||
| edge="end" | |||||
| size="medium" | |||||
| > | |||||
| {showId ? <EyeOutlined /> : <EyeInvisibleOutlined />} | |||||
| </IconButton> | |||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| @@ -32,6 +32,7 @@ const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingCo | |||||
| import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline'; | import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline'; | ||||
| import CancelOutlinedIcon from '@mui/icons-material/CancelOutlined'; | import CancelOutlinedIcon from '@mui/icons-material/CancelOutlined'; | ||||
| import iAmSmartICon from 'assets/images/icons/icon_iAmSmart.png'; | import iAmSmartICon from 'assets/images/icons/icon_iAmSmart.png'; | ||||
| import { EyeInvisibleOutlined, EyeOutlined } from '@ant-design/icons'; | |||||
| import { Link } from 'react-router-dom'; | import { Link } from 'react-router-dom'; | ||||
| import * as HttpUtils from "../../../utils/HttpUtils"; | import * as HttpUtils from "../../../utils/HttpUtils"; | ||||
| @@ -67,7 +68,8 @@ const CustomFormWizard = (props) => { | |||||
| const address4ComboList = ComboData.district; | const address4ComboList = ComboData.district; | ||||
| const address5ComboList = ComboData.country; | const address5ComboList = ComboData.country; | ||||
| const [showId, setshowId] = useState(false); | |||||
| const [showComId, setshowComId] = useState(false); | |||||
| useEffect(() => { | useEffect(() => { | ||||
| location.state?.responseData ?? {} | location.state?.responseData ?? {} | ||||
| @@ -76,6 +78,22 @@ const CustomFormWizard = (props) => { | |||||
| responseToData(); | responseToData(); | ||||
| }, []); | }, []); | ||||
| const handleClickShowId = () => { | |||||
| setshowId(!showId); | |||||
| }; | |||||
| const handleMouseDownId = (event) => { | |||||
| event.preventDefault(); | |||||
| }; | |||||
| const handleClickShowComId = () => { | |||||
| setshowComId(!showId); | |||||
| }; | |||||
| const handleMouseDownComId = (event) => { | |||||
| event.preventDefault(); | |||||
| }; | |||||
| useEffect(() => { | useEffect(() => { | ||||
| setDistrictErrStr(""); | setDistrictErrStr(""); | ||||
| if (selectedAddress5?.type === "hongKong") { | if (selectedAddress5?.type === "hongKong") { | ||||
| @@ -155,7 +173,7 @@ const CustomFormWizard = (props) => { | |||||
| add += str.trim() ? str.trim() + ", " : ""; | add += str.trim() ? str.trim() + ", " : ""; | ||||
| }); | }); | ||||
| add = add.trim(); | add = add.trim(); | ||||
| if (add.slice(- 1) == ",") { | |||||
| if (add?.slice(- 1) == ",") { | |||||
| add = add.substring(0, add.length - 1); | add = add.substring(0, add.length - 1); | ||||
| } | } | ||||
| return add; | return add; | ||||
| @@ -424,11 +442,27 @@ const CustomFormWizard = (props) => { | |||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12} > | <Grid item xs={12} md={12} > | ||||
| <Grid container sx={{ mb: 1 }}> | <Grid container sx={{ mb: 1 }}> | ||||
| <Stack spacing={1}> | |||||
| <Stack direction="row"> | |||||
| <InputLabel htmlFor="idDocType-signup"> | <InputLabel htmlFor="idDocType-signup"> | ||||
| <Typography variant="h5" sx={{mr:1}}> | |||||
| <FormattedMessage id="HKIDcard" />: | |||||
| {/* {iAmSmartData.idNo + "(" + iAmSmartData.checkDigit + ")"} */} | |||||
| </Typography> | |||||
| <Typography variant="h5"> | |||||
| {iAmSmartData?.idNo?.slice(0, 4)} | |||||
| </Typography> | |||||
| <Typography variant="h5"> | <Typography variant="h5"> | ||||
| <FormattedMessage id="HKIDcard" />: {iAmSmartData.idNo + "(" + iAmSmartData.checkDigit + ")"} | |||||
| {showId ?iAmSmartData?.idNo?.slice(4):"****"}{showId ? '(' + iAmSmartData.checkDigit + ')' :null} | |||||
| </Typography> | </Typography> | ||||
| <IconButton | |||||
| aria-label="toggle id visibility" | |||||
| onClick={handleClickShowId} | |||||
| onMouseDown={handleMouseDownId} | |||||
| edge="end" | |||||
| size="medium" | |||||
| > | |||||
| {showId ? <EyeOutlined /> : <EyeInvisibleOutlined />} | |||||
| </IconButton> | |||||
| </InputLabel> | </InputLabel> | ||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| @@ -933,13 +967,27 @@ const CustomFormWizard = (props) => { | |||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12} > | <Grid item xs={12} md={12} > | ||||
| <Stack spacing={1}> | |||||
| <Typography variant="h5" color={theme.palette.grey[600]}> | |||||
| <Stack direction="row"> | |||||
| <Typography variant="h5" color={theme.palette.grey[600]} sx={{mr:1}}> | |||||
| <FormattedMessage id="userIdDoc" /> | <FormattedMessage id="userIdDoc" /> | ||||
| </Typography> | </Typography> | ||||
| <Typography variant="h5" name="preview-idDocType"> | |||||
| {formik.values.idNo + "(" + formik.values.checkDigit + ")"} | |||||
| <Typography variant="h5" name="preview-idDocType-1"> | |||||
| {formik?.values?.idNo?.slice(0, 4)} | |||||
| {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */} | |||||
| </Typography> | |||||
| <Typography variant="h5" name="preview-idDocType-2"> | |||||
| {showComId ?formik?.values?.idNo?.slice(4):"****"}{showComId ? '(' + formik.values.checkDigit + ')' : null} | |||||
| {/* {formik.values.idNo + "(" + formik.values.checkDigit + ")"} */} | |||||
| </Typography> | </Typography> | ||||
| <IconButton | |||||
| aria-label="toggle id visibility" | |||||
| onClick={handleClickShowComId} | |||||
| onMouseDown={handleMouseDownComId} | |||||
| edge="end" | |||||
| size="medium" | |||||
| > | |||||
| {showComId ? <EyeOutlined /> : <EyeInvisibleOutlined />} | |||||
| </IconButton> | |||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| @@ -70,16 +70,22 @@ const Index = () => { | |||||
| navigate('/dashboard'); | navigate('/dashboard'); | ||||
| }, | }, | ||||
| onFail: (response)=>{ | onFail: (response)=>{ | ||||
| console.log("Fail"); | |||||
| console.log("onFail"); | |||||
| console.log(response); | console.log(response); | ||||
| window.location.assign("/iamsmart/loginFail"); | window.location.assign("/iamsmart/loginFail"); | ||||
| }, | }, | ||||
| onError:(error)=>{ | onError:(error)=>{ | ||||
| console.log("onError"); | |||||
| console.log(error); | console.log(error); | ||||
| window.location.assign("/iamsmart/loginFail"); | |||||
| if(error?.response?.data?.exception == "msg: please verify email."){ | |||||
| window.location.assign("/iamsmart/notverify"); | |||||
| }else{ | |||||
| window.location.assign("/iamsmart/loginFail"); | |||||
| } | |||||
| } | } | ||||
| }); | }); | ||||
| }else{ | }else{ | ||||
| console.log("Fail"); | |||||
| window.location.assign("/iamsmart/loginFail"); | window.location.assign("/iamsmart/loginFail"); | ||||
| } | } | ||||
| } | } | ||||
| @@ -57,8 +57,13 @@ const Index = () => { | |||||
| window.location.assign("/iamsmart/loginFail"); | window.location.assign("/iamsmart/loginFail"); | ||||
| }, | }, | ||||
| onError:(error)=>{ | onError:(error)=>{ | ||||
| console.log("onError"); | |||||
| console.log(error); | console.log(error); | ||||
| window.location.assign("/iamsmart/loginFail"); | |||||
| if(error?.response?.data?.exception == "msg: please verify email."){ | |||||
| window.location.assign("/iamsmart/notverify"); | |||||
| }else{ | |||||
| window.location.assign("/iamsmart/loginFail"); | |||||
| } | |||||
| } | } | ||||
| }); | }); | ||||
| }else{ | }else{ | ||||
| @@ -6,7 +6,7 @@ import { | |||||
| } from '@mui/material'; | } from '@mui/material'; | ||||
| import * as React from "react"; | import * as React from "react"; | ||||
| import { useNavigate } from "react-router-dom"; | import { useNavigate } from "react-router-dom"; | ||||
| import { FormattedMessage } from "react-intl"; | |||||
| import Loadable from 'components/Loadable'; | import Loadable from 'components/Loadable'; | ||||
| const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | ||||
| @@ -30,32 +30,42 @@ const Index = () => { | |||||
| </Grid> | </Grid> | ||||
| </Grid> | </Grid> | ||||
| : | : | ||||
| <Grid container sx={{ height: '100%', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||||
| <Grid item xs={12} md={12} > | |||||
| <Grid container justifyContent="flex-start" alignItems="center" > | |||||
| <center> | |||||
| <Grid item xs={12} md={12} > | |||||
| <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> | |||||
| 登入失敗,請重試。 | |||||
| </Typography> | |||||
| <Button | |||||
| component="span" | |||||
| variant="contained" | |||||
| size="large" | |||||
| sx={{ m: 4 }} | |||||
| onClick={() => { | |||||
| navigate("/login"); | |||||
| }} | |||||
| >返回登入</Button> | |||||
| </Grid> | |||||
| </center> | |||||
| </Grid> | |||||
| <Grid container sx={{ height: '100%', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||||
| <Grid item xs={12} md={12} > | |||||
| <Grid container justifyContent="flex-start" alignItems="center" > | |||||
| <center> | |||||
| <Grid item xs={12} md={12} > | |||||
| <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> | |||||
| <FormattedMessage id="loginErrorMessage6" /> | |||||
| </Typography> | |||||
| <Button | |||||
| component="span" | |||||
| variant="contained" | |||||
| size="large" | |||||
| sx={{ m: 4 }} | |||||
| onClick={() => { | |||||
| navigate("/login"); | |||||
| }} | |||||
| ><FormattedMessage id="backToLogin" /></Button> | |||||
| <Button | |||||
| component="span" | |||||
| variant="contained" | |||||
| size="large" | |||||
| sx={{ m: 4 }} | |||||
| onClick={() => { | |||||
| navigate("/register"); | |||||
| }} | |||||
| ><FormattedMessage id="goRegister" /></Button> | |||||
| </Grid> | |||||
| </center> | |||||
| </Grid> | </Grid> | ||||
| {/*row 2*/} | |||||
| </Grid > | |||||
| </Grid> | |||||
| {/*row 2*/} | |||||
| </Grid > | |||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -0,0 +1,69 @@ | |||||
| // material-ui | |||||
| import { | |||||
| Grid, | |||||
| Typography, | |||||
| Button | |||||
| } from '@mui/material'; | |||||
| import * as React from "react"; | |||||
| import { useNavigate } from "react-router-dom"; | |||||
| import { FormattedMessage } from "react-intl"; | |||||
| import Loadable from 'components/Loadable'; | |||||
| const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | |||||
| const Index = () => { | |||||
| const navigate = useNavigate() | |||||
| const [onReady, setOnReady] = React.useState(false); | |||||
| React.useEffect(() => { | |||||
| setOnReady(true); | |||||
| }, []); | |||||
| return ( | |||||
| !onReady ? | |||||
| <Grid container sx={{ minHeight: '87vh', mb: 3 }} direction="column" justifyContent="center" alignItems="center"> | |||||
| <Grid item> | |||||
| <LoadingComponent /> | |||||
| </Grid> | |||||
| </Grid> | |||||
| : | |||||
| <Grid container sx={{ height: '100%', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||||
| <Grid item xs={12} md={12} > | |||||
| <Grid container justifyContent="flex-start" alignItems="center" > | |||||
| <center> | |||||
| <Grid item xs={12} md={12} > | |||||
| <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> | |||||
| <FormattedMessage id="loginErrorMessage3" /> | |||||
| </Typography> | |||||
| </Grid> | |||||
| <Grid item xs={12} md={12} > | |||||
| <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> | |||||
| <FormattedMessage id="sentSecurityCode2" /> | |||||
| </Typography> | |||||
| </Grid> | |||||
| <Grid item xs={12} md={12} > | |||||
| <Button | |||||
| component="span" | |||||
| variant="contained" | |||||
| size="large" | |||||
| sx={{ m: 4 }} | |||||
| onClick={() => { | |||||
| navigate("/login"); | |||||
| }} | |||||
| ><FormattedMessage id="backToLogin" /></Button> | |||||
| </Grid> | |||||
| </center> | |||||
| </Grid> | |||||
| </Grid> | |||||
| {/*row 2*/} | |||||
| </Grid > | |||||
| ); | |||||
| }; | |||||
| export default Index; | |||||
| @@ -26,6 +26,7 @@ const ForgotUsername_Success = Loadable(lazy(() => import('pages/authentication/ | |||||
| const IAmSmart_DirectLoginCallback = Loadable(lazy(() => import('pages/iAmSmart/DirectLoginCallback'))); | const IAmSmart_DirectLoginCallback = Loadable(lazy(() => import('pages/iAmSmart/DirectLoginCallback'))); | ||||
| //const IAmSmart_FallCallback = Loadable(lazy(() => import('pages/iAmSmart/FallCallback'))); | //const IAmSmart_FallCallback = Loadable(lazy(() => import('pages/iAmSmart/FallCallback'))); | ||||
| const IAmSmart_FailCallback = Loadable(lazy(() => import('pages/iAmSmart/FailCallback'))); | const IAmSmart_FailCallback = Loadable(lazy(() => import('pages/iAmSmart/FailCallback'))); | ||||
| const FailCallback_VerifyMail = Loadable(lazy(() => import('pages/iAmSmart/FailCallback_VerifyMail'))); | |||||
| const IAmSmart_SuccessCallback = Loadable(lazy(() => import('pages/iAmSmart/SuccessCallback'))); | const IAmSmart_SuccessCallback = Loadable(lazy(() => import('pages/iAmSmart/SuccessCallback'))); | ||||
| const IAmSmart_AuthCallback = Loadable(lazy(() => import('pages/iAmSmart/AuthCallback'))); | const IAmSmart_AuthCallback = Loadable(lazy(() => import('pages/iAmSmart/AuthCallback'))); | ||||
| const IAmSmart_RegistryCallback = Loadable(lazy(() => import('pages/iAmSmart/RegistryCallback'))); | const IAmSmart_RegistryCallback = Loadable(lazy(() => import('pages/iAmSmart/RegistryCallback'))); | ||||
| @@ -73,6 +74,10 @@ const LoginRoutes = { | |||||
| path: 'iamsmart/loginfallback', | path: 'iamsmart/loginfallback', | ||||
| element: <IAmSmart_FailCallback/> | element: <IAmSmart_FailCallback/> | ||||
| }, | }, | ||||
| { | |||||
| path: 'iamsmart/notverify', | |||||
| element: <FailCallback_VerifyMail/> | |||||
| }, | |||||
| { | { | ||||
| path: 'iamsmart/authcallback', | path: 'iamsmart/authcallback', | ||||
| element: <IAmSmart_AuthCallback/> | element: <IAmSmart_AuthCallback/> | ||||
| @@ -84,6 +84,7 @@ | |||||
| "continue": "Continue", | "continue": "Continue", | ||||
| "submit": "Submit", | "submit": "Submit", | ||||
| "backToLogin": "Return to login page", | "backToLogin": "Return to login page", | ||||
| "goRegister": "Register an account", | |||||
| "registerSubmitted": "Account application submitted successfully.", | "registerSubmitted": "Account application submitted successfully.", | ||||
| "registerFail": "Application failed, please try again later", | "registerFail": "Application failed, please try again later", | ||||
| "iAmSmartNoIdNoMsg": "Invalid information, please return to the registration page.", | "iAmSmartNoIdNoMsg": "Invalid information, please return to the registration page.", | ||||
| @@ -125,6 +126,7 @@ | |||||
| "loginErrorMessage3":"Account has not been Verified", | "loginErrorMessage3":"Account has not been Verified", | ||||
| "loginErrorMessage4":"System Connection Failed", | "loginErrorMessage4":"System Connection Failed", | ||||
| "loginErrorMessage5":"Incorrect Username or Password", | "loginErrorMessage5":"Incorrect Username or Password", | ||||
| "loginErrorMessage6":"Login fail, please try again", | |||||
| "newPassword": "New Password", | "newPassword": "New Password", | ||||
| "setNewPassword": "Please enter new password", | "setNewPassword": "Please enter new password", | ||||
| @@ -323,9 +325,11 @@ | |||||
| "payConfirm": "Confirm payment", | "payConfirm": "Confirm payment", | ||||
| "payCancel": "Cancel payment", | "payCancel": "Cancel payment", | ||||
| "payTotalDeatail": "Total Payment Amount", | "payTotalDeatail": "Total Payment Amount", | ||||
| "payDeatail": "Total Amount", | |||||
| "payTotal": "Total", | "payTotal": "Total", | ||||
| "payDetail": "Payment Details", | "payDetail": "Payment Details", | ||||
| "payMethod": "Payment method", | "payMethod": "Payment method", | ||||
| "epayMethod": " e-Payment Method", | |||||
| "selectPaymentMethod": "Please select a payment method", | "selectPaymentMethod": "Please select a payment method", | ||||
| "payReceipt": "Payment receipt", | "payReceipt": "Payment receipt", | ||||
| "contactPerson": "Contact Person", | "contactPerson": "Contact Person", | ||||
| @@ -393,9 +397,9 @@ | |||||
| "singleCol":"Single Column", | "singleCol":"Single Column", | ||||
| "doubleCol":"Double Column", | "doubleCol":"Double Column", | ||||
| "transactionNo": "Transaction number", | |||||
| "transactionDate": "Transaction Date", | |||||
| "transactionTime": "Transaction Time", | |||||
| "paymentNo": "Payment No.", | |||||
| "paymentDate": "Payment Date", | |||||
| "paymentTime": "Payment Time", | |||||
| "paymentRefCode": "Payment Reference Number", | "paymentRefCode": "Payment Reference Number", | ||||
| "paymentInfoRecord": "Payment Notice Record", | "paymentInfoRecord": "Payment Notice Record", | ||||
| @@ -83,6 +83,7 @@ | |||||
| "continue": "继续", | "continue": "继续", | ||||
| "submit": "提交", | "submit": "提交", | ||||
| "backToLogin": "返回登入页面", | "backToLogin": "返回登入页面", | ||||
| "goRegister": "帐户申请", | |||||
| "registerSubmitted": "帐户申请已成功提交。", | "registerSubmitted": "帐户申请已成功提交。", | ||||
| "registerFail": "申请失败,请稍后尝试", | "registerFail": "申请失败,请稍后尝试", | ||||
| "iAmSmartNoIdNoMsg": "无效资料,请返回注册页面。", | "iAmSmartNoIdNoMsg": "无效资料,请返回注册页面。", | ||||
| @@ -123,6 +124,7 @@ | |||||
| "loginErrorMessage3":"帐户尚未验证", | "loginErrorMessage3":"帐户尚未验证", | ||||
| "loginErrorMessage4":"系统连接失败", | "loginErrorMessage4":"系统连接失败", | ||||
| "loginErrorMessage5":"用户名或密码错误", | "loginErrorMessage5":"用户名或密码错误", | ||||
| "loginErrorMessage6":"登入失败,请重试", | |||||
| "newPassword": "新密码", | "newPassword": "新密码", | ||||
| "setNewPassword": "请输入新密码", | "setNewPassword": "请输入新密码", | ||||
| @@ -316,9 +318,11 @@ | |||||
| "payConfirm": "确认付款", | "payConfirm": "确认付款", | ||||
| "payCancel": "取消付款", | "payCancel": "取消付款", | ||||
| "payTotalDeatail": "付款总额", | "payTotalDeatail": "付款总额", | ||||
| "payDeatail": "总额", | |||||
| "payTotal": "付款总额", | "payTotal": "付款总额", | ||||
| "payDetail": "付款详情", | "payDetail": "付款详情", | ||||
| "payMethod": "付款方式", | "payMethod": "付款方式", | ||||
| "epayMethod": "电子付款方法", | |||||
| "selectPaymentMethod": "请选择付款方式", | "selectPaymentMethod": "请选择付款方式", | ||||
| "payReceipt": "付款收据", | "payReceipt": "付款收据", | ||||
| "contactPerson": "联络人", | "contactPerson": "联络人", | ||||
| @@ -386,9 +390,9 @@ | |||||
| "singleCol":"一格位", | "singleCol":"一格位", | ||||
| "doubleCol":"二格位", | "doubleCol":"二格位", | ||||
| "transactionNo": "交易号码", | |||||
| "transactionDate": "交易日期", | |||||
| "transactionTime": "交易时间", | |||||
| "paymentNo": "付款编号", | |||||
| "paymentDate": "付款日期", | |||||
| "paymentTime": "付款时间", | |||||
| "paymentRefCode": "付款参考号码", | "paymentRefCode": "付款参考号码", | ||||
| "paymentInfoRecord": "缴款通知记录", | "paymentInfoRecord": "缴款通知记录", | ||||
| @@ -83,6 +83,7 @@ | |||||
| "continue": "繼續", | "continue": "繼續", | ||||
| "submit": "提交", | "submit": "提交", | ||||
| "backToLogin": "返回登入頁面", | "backToLogin": "返回登入頁面", | ||||
| "goRegister": "帳戶申請", | |||||
| "registerSubmitted": "帳戶申請已成功提交。", | "registerSubmitted": "帳戶申請已成功提交。", | ||||
| "registerFail": "申請失敗,請稍後嘗試", | "registerFail": "申請失敗,請稍後嘗試", | ||||
| "iAmSmartNoIdNoMsg": "無效資料,請返回注冊頁面。", | "iAmSmartNoIdNoMsg": "無效資料,請返回注冊頁面。", | ||||
| @@ -123,6 +124,7 @@ | |||||
| "loginErrorMessage3":"帳戶尚未驗證", | "loginErrorMessage3":"帳戶尚未驗證", | ||||
| "loginErrorMessage4":"系統連接失敗", | "loginErrorMessage4":"系統連接失敗", | ||||
| "loginErrorMessage5":"用戶名或密碼錯誤", | "loginErrorMessage5":"用戶名或密碼錯誤", | ||||
| "loginErrorMessage6":"登入失敗,請重試", | |||||
| "newPassword": "新密碼", | "newPassword": "新密碼", | ||||
| "setNewPassword": "請輸入新密碼", | "setNewPassword": "請輸入新密碼", | ||||
| @@ -319,9 +321,11 @@ | |||||
| "payConfirm": "確認付款", | "payConfirm": "確認付款", | ||||
| "payCancel": "取消付款", | "payCancel": "取消付款", | ||||
| "payTotalDeatail": "付款總額", | "payTotalDeatail": "付款總額", | ||||
| "payDeatail": "總額", | |||||
| "payTotal": "付款總額", | "payTotal": "付款總額", | ||||
| "payDetail": "付款詳情", | "payDetail": "付款詳情", | ||||
| "payMethod": "付款方式", | "payMethod": "付款方式", | ||||
| "epayMethod": "電子付款方法", | |||||
| "selectPaymentMethod": "請選擇付款方式", | "selectPaymentMethod": "請選擇付款方式", | ||||
| "payReceipt": "付款收據", | "payReceipt": "付款收據", | ||||
| "contactPerson": "聯絡人", | "contactPerson": "聯絡人", | ||||
| @@ -389,9 +393,9 @@ | |||||
| "singleCol":"一格位", | "singleCol":"一格位", | ||||
| "doubleCol":"二格位", | "doubleCol":"二格位", | ||||
| "transactionNo": "交易號碼", | |||||
| "transactionDate": "交易日期", | |||||
| "transactionTime": "交易時間", | |||||
| "paymentNo": "付款編號", | |||||
| "paymentDate": "付款日期", | |||||
| "paymentTime": "付款時間", | |||||
| "paymentRefCode": "付款參考號碼", | "paymentRefCode": "付款參考號碼", | ||||
| "paymentInfoRecord": "繳款通知記錄", | "paymentInfoRecord": "繳款通知記錄", | ||||
| @@ -161,7 +161,8 @@ export const PAYMENT_STATUS_API = paymentPath+'/api/payment/status/';//GET | |||||
| export const DEMAND_NOTE_PREVIEW = apiPath+'/demandNote/preview';//GET | export const DEMAND_NOTE_PREVIEW = apiPath+'/demandNote/preview';//GET | ||||
| export const DEMAND_NOTE_CREATE = apiPath+'/demandNote/create';//POST | export const DEMAND_NOTE_CREATE = apiPath+'/demandNote/create';//POST | ||||
| export const DEMAND_NOTE_LIST = apiPath+'/demandNote/list';//GET | |||||
| export const DEMAND_NOTE_LIST = apiPath+'/demandNote/list';//GET pub | |||||
| export const DEMAND_NOTE_LIST_ALL = apiPath+'/demandNote/listAll';//GET gld | |||||
| export const DEMAND_NOTE_LOAD = apiPath+'/demandNote/load';//GET | export const DEMAND_NOTE_LOAD = apiPath+'/demandNote/load';//GET | ||||
| export const DEMAND_NOTE_SEND = apiPath+'/demandNote/send-dn';//POST | export const DEMAND_NOTE_SEND = apiPath+'/demandNote/send-dn';//POST | ||||
| export const DEMAND_NOTE_MARK_PAID = apiPath+'/demandNote/mark-as-paid';//POST | export const DEMAND_NOTE_MARK_PAID = apiPath+'/demandNote/mark-as-paid';//POST | ||||