jason.lam 1 年之前
父節點
當前提交
e852a09a10
共有 3 個文件被更改,包括 8 次插入7 次删除
  1. +4
    -4
      src/components/AutoLogoutProvider.js
  2. +1
    -1
      src/pages/authentication/auth-forms/BusCustomFormWizard.js
  3. +3
    -2
      src/pages/authentication/auth-forms/CustomFormWizard.js

+ 4
- 4
src/components/AutoLogoutProvider.js 查看文件

@@ -1,8 +1,8 @@
import React, { createContext, useState, useEffect } from 'react'; import React, { createContext, useState, useEffect } from 'react';
import {useNavigate} from "react-router-dom"; import {useNavigate} from "react-router-dom";
//import axios from "axios"; //import axios from "axios";
import {getUserData} from "../auth/utils";
import {isObjEmpty} from "../utils/Utils";
// import {getUserData} from "../auth/utils";
// import {isObjEmpty} from "../utils/Utils";
import {useIdleTimer} from "react-idle-timer"; import {useIdleTimer} from "react-idle-timer";
import { handleLogoutFunction } from 'auth/index'; import { handleLogoutFunction } from 'auth/index';
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
@@ -52,8 +52,8 @@ const AutoLogoutProvider = ({ children }) => {
//const tabId = getTabId() === null ? 'loading' : getTabId().toString() //const tabId = getTabId() === null ? 'loading' : getTabId().toString()


useEffect(() => { useEffect(() => {
const userData = getUserData();
if(!isObjEmpty(userData)){
// const userData = getUserData();
if(isUserLoggedIn()){
//TODO: get auto logout time here //TODO: get auto logout time here
if(isGLDLoggedIn()){ if(isGLDLoggedIn()){
setLogoutInterval(240); setLogoutInterval(240);


+ 1
- 1
src/pages/authentication/auth-forms/BusCustomFormWizard.js 查看文件

@@ -323,7 +323,7 @@ const BusCustomFormWizard = (props) => {
const { handleSubmit } = useForm({}) const { handleSubmit } = useForm({})
const _onSubmit = () => { const _onSubmit = () => {
setLoding(true); setLoding(true);
values.address4 = selectedAddress4.key
values.address4 = selectedAddress4==null?"":selectedAddress4.key
values.address5 = selectedAddress5.key values.address5 = selectedAddress5.key
// console.log(values) // console.log(values)
const busUserAddress = { const busUserAddress = {


+ 3
- 2
src/pages/authentication/auth-forms/CustomFormWizard.js 查看文件

@@ -89,7 +89,7 @@ const CustomFormWizard = (props) => {
const [selectedIdDocInputType, setSelectedIdDocInputType] = useState(""); const [selectedIdDocInputType, setSelectedIdDocInputType] = useState("");
// const [selectedIdDocLabel, setSelectedIdDocLabel] = useState(null); // const [selectedIdDocLabel, setSelectedIdDocLabel] = useState(null);
const [selectedAddress4, setSelectedAddress4] = useState(null); const [selectedAddress4, setSelectedAddress4] = useState(null);
console.log(ComboData.country[0]);
// console.log(ComboData.country[0]);
const [selectedAddress5, setSelectedAddress5] = useState(ComboData.country[0]); const [selectedAddress5, setSelectedAddress5] = useState(ComboData.country[0]);
const [termsAndConAccept, setTermsAndConAccept] = useState(false); const [termsAndConAccept, setTermsAndConAccept] = useState(false);
const [termsAndConNotAccept, setTermsAndConNotAccept] = useState(false); const [termsAndConNotAccept, setTermsAndConNotAccept] = useState(false);
@@ -314,8 +314,9 @@ const CustomFormWizard = (props) => {
const _onSubmit = () => { const _onSubmit = () => {
setLoding(true); setLoding(true);
values.idDocType = selectedIdDocType.type values.idDocType = selectedIdDocType.type
values.address4 = selectedAddress4.key
values.address4 = selectedAddress4==null?"":selectedAddress4.key
values.address5 = selectedAddress5.key values.address5 = selectedAddress5.key
console.log(values)
const userAddress = { const userAddress = {
"addressLine1": "", "addressLine1": "",
"addressLine2": "", "addressLine2": "",


Loading…
取消
儲存