From 1af1b1ff78c16940ca60bcbc22ea14567ba5aef7 Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Mon, 1 Sep 2025 04:32:50 +0800 Subject: [PATCH] add suspension mode, add allow login, update gfmis --- src/auth/index.js | 4 +- src/components/RefreshTokenProvider.js | 4 +- src/components/SysSettingProvider.js | 1 + src/pages/GFMIS/SearchForm.js | 67 ++++++++++----- src/pages/GFMIS/index.js | 85 +++++++++++++++++-- src/pages/Proof/Payment/Pay_Online.js | 64 ++++++++------ .../Proof/Reply_Public/ApplicationDetails.js | 74 ++++++++-------- src/pages/Proof/Reply_Public/ProofForm.js | 13 +-- src/pages/Setting/SystemSetting/Table.js | 4 +- src/pages/Setting/SystemSetting/index.js | 82 +++++++++++++++++- src/pages/authentication/AuthWrapper.js | 36 +++++--- src/pages/dashboard/Public/index.js | 44 +++++++++- src/translations/en.json | 1 + src/translations/zh-CN.json | 1 + src/translations/zh-HK.json | 1 + src/utils/ApiPathConst.js | 2 + src/utils/Utils.js | 6 ++ 17 files changed, 366 insertions(+), 123 deletions(-) diff --git a/src/auth/index.js b/src/auth/index.js index abb2c55..c1b69d5 100644 --- a/src/auth/index.js +++ b/src/auth/index.js @@ -227,7 +227,9 @@ export const handleRefreshTokenFunction = () => { }) .catch((refreshError) => { console.log('Failed to refresh token'); - console.log(refreshError) + if (refreshError != undefined){ + console.log(refreshError) + } // token = null isRefresh = false; }); diff --git a/src/components/RefreshTokenProvider.js b/src/components/RefreshTokenProvider.js index fa73be8..c1485a3 100644 --- a/src/components/RefreshTokenProvider.js +++ b/src/components/RefreshTokenProvider.js @@ -35,7 +35,9 @@ const RefreshTokenProvider = ({ children }) => { }) .catch((refreshError) => { console.log('Failed to refresh token'); - console.log(refreshError) + if (refreshError != undefined){ + console.log(refreshError) + } token.current = null isRefresh.current = false; }); diff --git a/src/components/SysSettingProvider.js b/src/components/SysSettingProvider.js index ac7dbbc..2f0176c 100644 --- a/src/components/SysSettingProvider.js +++ b/src/components/SysSettingProvider.js @@ -21,6 +21,7 @@ const SysSettingProvider = ({ children }) => { // console.log(responseData) setSysSetting(responseData); localStorage.setItem('sysEnv', responseData.sysEnv) + localStorage.setItem('paymentSuspention', responseData.suspensionMode) } }); } diff --git a/src/pages/GFMIS/SearchForm.js b/src/pages/GFMIS/SearchForm.js index 44cc85a..83fe25b 100644 --- a/src/pages/GFMIS/SearchForm.js +++ b/src/pages/GFMIS/SearchForm.js @@ -25,11 +25,12 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria, onGr // const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); const [minDate, setMinDate] = React.useState(searchCriteria.dateFrom); - const [maxDate] = React.useState(searchCriteria.dateFrom); - // const [status, setStatus] = React.useState(ComboData.paymentStatus[0]); + const [maxDate,setMaxDate] = React.useState(searchCriteria.dateFrom); const [fromDateValue, setFromDateValue] = React.useState("dd / mm / yyyy"); + const [toDateValue, setToDateValue] = React.useState("dd / mm / yyyy"); + // const [status, setStatus] = React.useState(ComboData.paymentStatus[0]); - const { + const { // register, handleSubmit, } = useForm() @@ -37,19 +38,27 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria, onGr React.useEffect(() => { setFromDateValue(minDate); }, [minDate]); + + React.useEffect(() => { + setToDateValue(maxDate); + }, [maxDate]); const onSubmit = () => { let sentDateFrom = ""; + let sentDateTo = ""; if (fromDateValue != "dd / mm / yyyy") { sentDateFrom = DateUtils.dateValue(fromDateValue) } + if (toDateValue != "dd / mm / yyyy") { + sentDateTo = DateUtils.dateValue(toDateValue) + } const temp = { // code: data.code, // transNo: data.transNo, dateFrom: sentDateFrom, - // dateTo: data.dateTo, + dateTo: sentDateTo, // status : (status?.type && status?.type != 'all') ? status?.type : "", }; applySearch(temp); @@ -57,16 +66,20 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria, onGr const generateHandler = () => { let sentDateFrom = ""; + let sentDateTo = ""; if (fromDateValue != "dd / mm / yyyy") { sentDateFrom = DateUtils.dateValue(fromDateValue) } + if (toDateValue != "dd / mm / yyyy") { + sentDateTo = DateUtils.dateValue(toDateValue) + } // const dateTo = getValues("dateTo") const temp = { // code: data.code, // transNo: data.transNo, dateFrom: sentDateFrom, - dateTo: "", + dateTo: sentDateTo, // status : (status?.type && status?.type != 'all') ? status?.type : "", }; generateXML(temp); @@ -90,8 +103,7 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria, onGr {/*row 2*/} - - + { @@ -119,21 +131,30 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria, onGr - {/* { - setMaxDate(DateUtils.dateValue(newValue)); - }} - id="dateTo" - type="date" - label="To" - defaultValue={searchCriteria.dateTo} - /> */} + + + setReceiptFromError(newError)} + slotProps={{ + field: { readOnly: true, }, + // textField: { + // helperText: receiptFromErrorMessage, + // }, + }} + format="DD/MM/YYYY" + label="To Date" + value={maxDate === null ? null : dayjs(maxDate)} + minDate={minDate === null ? null : dayjs(minDate)} + onChange={(newValue) => { + // console.log(newValue) + if(newValue!=null){ + setMaxDate(newValue); + } + }} + /> + + {/* diff --git a/src/pages/GFMIS/index.js b/src/pages/GFMIS/index.js index 68870b4..73977a6 100644 --- a/src/pages/GFMIS/index.js +++ b/src/pages/GFMIS/index.js @@ -2,7 +2,9 @@ import { Grid, Typography, - Stack + Stack, + Button, + Dialog, DialogTitle, DialogContent, DialogActions, } from '@mui/material'; import MainCard from "components/MainCard"; import {GEN_GFMIS_XML} from "utils/ApiPathConst"; @@ -10,6 +12,12 @@ import * as React from "react"; import * as HttpUtils from "utils/HttpUtils"; import * as DateUtils from "utils/DateUtils"; +import {DatePicker} from "@mui/x-date-pickers/DatePicker"; +import dayjs from "dayjs"; +import {DemoItem} from "@mui/x-date-pickers/internals/demo"; +import {LocalizationProvider} from "@mui/x-date-pickers/LocalizationProvider"; +import {AdapterDayjs} from "@mui/x-date-pickers/AdapterDayjs"; + import Loadable from 'components/Loadable'; const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); const SearchForm = Loadable(React.lazy(() => import('./SearchForm'))); @@ -31,24 +39,41 @@ const BackgroundHead = { const Index = () => { const [searchCriteria, setSearchCriteria] = React.useState({ - dateFrom: DateUtils.dateValue(new Date()), - // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), + dateTo: DateUtils.dateValue(new Date()), + dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [onReady, setOnReady] = React.useState(false); const [onGridReady, setGridOnReady] = React.useState(false); + const [isPopUp, setIsPopUp] = React.useState(false); + const [downloadInput, setDownloadInput] = React.useState(); + + + const [inputDate, setInputDate] = React.useState(searchCriteria.dateTo); + const [inputDateValue, setInputDateValue] = React.useState("dd / mm / yyyy"); + + React.useEffect(() => { + setInputDateValue(inputDate); + }, [inputDate]); React.useEffect(() => { setOnReady(true); }, [searchCriteria]); - function downloadXML(input) { + function downloadXML() { // console.log(input) + setIsPopUp(false) + let sentDateFrom = ""; + + if (inputDateValue != "dd / mm / yyyy") { + sentDateFrom = DateUtils.dateValue(inputDateValue) + } HttpUtils.get({ url: GEN_GFMIS_XML + "/today", params:{ - // dateTo: input.dateTo, - dateFrom: input.dateFrom, + dateTo: downloadInput.dateTo, + dateFrom: downloadInput.dateFrom, + inputDate: sentDateFrom }, onSuccess: (responseData) => { // console.log(responseData) @@ -100,6 +125,7 @@ const Index = () => { function applySearch(input) { setGridOnReady(true) setSearchCriteria(input); + setInputDate(input.dateFrom) } function applyGridOnReady(input) { @@ -107,7 +133,8 @@ const Index = () => { } function generateXML(input) { - downloadXML(input); + setDownloadInput(input); + setIsPopUp(true) } return ( @@ -147,6 +174,50 @@ const Index = () => { /> + setIsPopUp(false)} + PaperProps={{ + sx: { + minWidth: '40vw', + maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, + maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } + } + }} + > + Bank Statement Collection Date + + + + setReceiptFromError(newError)} + slotProps={{ + field: { readOnly: true, }, + // textField: { + // helperText: receiptFromErrorMessage, + // }, + }} + format="DD/MM/YYYY" + // label="Credit Date" + value={inputDate === null ? null : dayjs(inputDate)} + maxDate={searchCriteria.dateTo === null ? null : dayjs(searchCriteria.dateTo)} + minDate={searchCriteria.dateFrom === null ? null : dayjs(searchCriteria.dateFrom)} + onChange={(newValue) => { + // console.log(newValue) + if(newValue!=null){ + setInputDate(newValue); + } + }} + /> + + + + + + + + ); }; diff --git a/src/pages/Proof/Payment/Pay_Online.js b/src/pages/Proof/Payment/Pay_Online.js index 30e76ea..b710b2c 100644 --- a/src/pages/Proof/Payment/Pay_Online.js +++ b/src/pages/Proof/Payment/Pay_Online.js @@ -13,6 +13,7 @@ import { useParams } from "react-router-dom"; import { useNavigate } from "react-router-dom"; import * as DateUtils from "utils/DateUtils" import * as FormatUtils from "utils/FormatUtils"; +import { checkPaymentSuspention } from "utils/Utils"; import Loadable from 'components/Loadable'; const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); @@ -150,7 +151,6 @@ const Index = () => { -
{ ) }} />
+ {checkPaymentSuspention()? +
+ +
+ +
+
:null + }
- - - - + {!checkPaymentSuspention()? + + + + - + - - - - + + + + :null + }
{ - - { - data.creditor == true ? - <> - - - - : - - - -   - {locale === 'en' ? - `${intl.formatMessage({ id: 'before' })} ${DateUtils.dateFormat(data?.reviseDeadline, intl.formatMessage({ id: "paymentMethodDatetimeStrFormat" }))?.replace("am", "a.m.")?.replace("pm", "p.m.")} ` - : - `${DateUtils.dateFormat(data?.reviseDeadline, intl.formatMessage({ id: "paymentMethodDatetimeStrFormat" }))?.replace("am", "上午")?.replace("pm", "下午")}${intl.formatMessage({ id: 'before' })}` - } - - + {data.creditor == true ? + <> + + + : + + + +   + {locale === 'en' ? + `${intl.formatMessage({ id: 'before' })} ${DateUtils.dateFormat(data?.reviseDeadline, intl.formatMessage({ id: "paymentMethodDatetimeStrFormat" }))?.replace("am", "a.m.")?.replace("pm", "p.m.")} ` + : + `${DateUtils.dateFormat(data?.reviseDeadline, intl.formatMessage({ id: "paymentMethodDatetimeStrFormat" }))?.replace("am", "上午")?.replace("pm", "下午")}${intl.formatMessage({ id: 'before' })}` + } + + - - - : - - - -   - {locale === 'en' ? - `${intl.formatMessage({ id: 'before' })} ${DateUtils.dateFormat(data?.proofPaymentDeadline, intl.formatMessage({ id: "paymentMethodDatetimeStrFormat" }))?.replace("am", "a.m.")?.replace("pm", "p.m.")} ` - : - `${DateUtils.dateFormat(data?.proofPaymentDeadline, intl.formatMessage({ id: "paymentMethodDatetimeStrFormat" }))?.replace("am", "上午")?.replace("pm", "下午")}${intl.formatMessage({ id: 'before' })}` - } - - - + + + : + + + +   + {locale === 'en' ? + `${intl.formatMessage({ id: 'before' })} ${DateUtils.dateFormat(data?.proofPaymentDeadline, intl.formatMessage({ id: "paymentMethodDatetimeStrFormat" }))?.replace("am", "a.m.")?.replace("pm", "p.m.")} ` + : + `${DateUtils.dateFormat(data?.proofPaymentDeadline, intl.formatMessage({ id: "paymentMethodDatetimeStrFormat" }))?.replace("am", "上午")?.replace("pm", "下午")}${intl.formatMessage({ id: 'before' })}` + } + + + : - <> - } - + <> + } diff --git a/src/pages/Proof/Reply_Public/ProofForm.js b/src/pages/Proof/Reply_Public/ProofForm.js index df3919e..19b3f47 100644 --- a/src/pages/Proof/Reply_Public/ProofForm.js +++ b/src/pages/Proof/Reply_Public/ProofForm.js @@ -28,7 +28,8 @@ import { ThemeProvider } from "@emotion/react"; import { FormattedMessage, useIntl } from "react-intl"; import { isDummyLoggedIn, - checkIsOnlyOnlinePaymentByIssueDate + checkIsOnlyOnlinePaymentByIssueDate, + checkPaymentSuspention } from "utils/Utils" const UploadFileTable = Loadable(React.lazy(() => import('./UploadFileTable'))); @@ -320,8 +321,6 @@ const FormPanel = ({ formData }) => { } label={intl.formatMessage({ id: 'proofWithError' })} /> - - { actionValue && formData.creditor == false ? isDummyLoggedIn() ? @@ -436,6 +435,11 @@ const FormPanel = ({ formData }) => { + {checkPaymentSuspention()? + +
+ :null + }
{ setWarningTitle(intl.formatMessage({ id: "paymentMeans" }) + ": " + intl.formatMessage({ id: "payOnline" })) setWarningText( @@ -661,8 +665,6 @@ const FormPanel = ({ formData }) => { } - - - ) diff --git a/src/pages/Setting/SystemSetting/Table.js b/src/pages/Setting/SystemSetting/Table.js index 3fc6d16..8d4f966 100644 --- a/src/pages/Setting/SystemSetting/Table.js +++ b/src/pages/Setting/SystemSetting/Table.js @@ -10,7 +10,7 @@ import { GET_SYS_PARAMS } from "utils/ApiPathConst"; // ==============================|| DASHBOARD - DEFAULT ||============================== // -const Table = ({onRowClick, searchCriteria}) => { +const Table = ({onRowClick, searchCriteria, refreshTrigger}) => { const [_searchCriteria, set_searchCriteria] = React.useState(searchCriteria); React.useEffect(() => { @@ -70,7 +70,7 @@ const Table = ({onRowClick, searchCriteria}) => { doLoad={React.useMemo(() => ({ url:GET_SYS_PARAMS, params:_searchCriteria - }), [_searchCriteria])} + }), [_searchCriteria, refreshTrigger])} /> {/* */}
diff --git a/src/pages/Setting/SystemSetting/index.js b/src/pages/Setting/SystemSetting/index.js index 0c644c1..c64851c 100644 --- a/src/pages/Setting/SystemSetting/index.js +++ b/src/pages/Setting/SystemSetting/index.js @@ -3,11 +3,13 @@ import { Grid, Typography, Stack, + Button, + Dialog, DialogTitle, DialogContent, DialogActions, // Box, } from '@mui/material'; import * as React from "react"; -import { GET_SYS_PARAMS } from "utils/ApiPathConst"; +import { GET_SYS_PARAMS, GET_PAYMENT_SUSPENSION_MODE, UPDATE_PAYMENT_SUSPENSION_MODE } from "utils/ApiPathConst"; import Loadable from 'components/Loadable'; import MainCard from "components/MainCard"; @@ -36,11 +38,24 @@ const SystemSetting = () => { const [searchCriteria, setSearchCriteria] = React.useState({}); const [selectedItem, setSelectedItem] = React.useState({}); const [reloadTime, setReloadTime] = React.useState(new Date()) + const [isPopUp, setIsPopUp] = React.useState(false); + const [refreshTrigger, setRefreshTrigger] = React.useState(0); + const [suspensionMode, setSuspensionMode] = React.useState(); + const [onReady, setOnReady] = React.useState(false); + + const forceRefresh = () => { + setRefreshTrigger(prev => prev + 1); + }; React.useEffect(()=>{ setSearchCriteria({}) + loadPaymentSuspension() }, []); + React.useEffect(() => { + setOnReady(true); + }, [suspensionMode]); + const onRowClick = (param) => { setSelectedItem(param.row); } @@ -60,6 +75,29 @@ const SystemSetting = () => { onSuccess: () => { notifyActionSuccess(); setReloadTime(new Date()); + // forceRefresh() + } + }); + } + + const loadPaymentSuspension = () => { + HttpUtils.get({ + url: GET_PAYMENT_SUSPENSION_MODE, + onSuccess: (responseData) => { + setSuspensionMode(responseData) + } + }); + } + + const onPaymentSuspension = () => { + setIsPopUp(false); + HttpUtils.post({ + url: UPDATE_PAYMENT_SUSPENSION_MODE, + onSuccess: (responseData) => { + setSuspensionMode(responseData) + notifyActionSuccess(); + setReloadTime(new Date()); + forceRefresh() } }); } @@ -90,13 +128,14 @@ const SystemSetting = () => { - + { + + {onReady? + + + + + :null + } + {/*col 2*/} +
+ setIsPopUp(false)} + PaperProps={{ + sx: { + minWidth: '40vw', + maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, + maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } + } + }} + > + Payment Suspension Mode + + {suspensionMode?"Cancel payment suspension mode?":"Enable payment suspension mode?"} + + + + + + +
); diff --git a/src/pages/authentication/AuthWrapper.js b/src/pages/authentication/AuthWrapper.js index 8623d9e..55f932d 100644 --- a/src/pages/authentication/AuthWrapper.js +++ b/src/pages/authentication/AuthWrapper.js @@ -2,11 +2,12 @@ import PropTypes from 'prop-types'; import { Box, Grid, Typography } from '@mui/material'; // import { Stack } from '@mui/material'; import Loadable from 'components/Loadable'; -import { lazy } from 'react'; +import { lazy, useContext } from 'react'; import { FormattedMessage, useIntl } from "react-intl"; -import { checkSysEnv } from "utils/Utils"; +import { checkSysEnv, checkPaymentSuspention } from "utils/Utils"; import backbroundImg from 'assets/images/bg_ml.jpg'; import 'assets/style/loginStyles.css'; +import { SysContext } from "components/SysSettingProvider" const AuthCard = Loadable(lazy(() => import('./AuthCardCustom'))); @@ -20,6 +21,7 @@ const BackgroundHead = { const AuthWrapper = ({ children }) => { // Move useIntl inside component const intl = useIntl(); + const { sysSetting } = useContext(SysContext); return ( @@ -41,9 +43,15 @@ const AuthWrapper = ({ children }) => { sx={{ minHeight: { md: 'calc(87vh)' } }} > + {checkPaymentSuspention()? + +
+ + :
+ } { - - - - {children} + {sysSetting?.publicLogin? + + + + {children} + - - + :null + }
diff --git a/src/pages/dashboard/Public/index.js b/src/pages/dashboard/Public/index.js index 1c1f201..590796e 100644 --- a/src/pages/dashboard/Public/index.js +++ b/src/pages/dashboard/Public/index.js @@ -6,7 +6,8 @@ import { Typography, Stack, Button, - Box + Box, + Dialog, DialogTitle, DialogContent, DialogActions, } from '@mui/material'; import { isORGLoggedIn, } from "utils/Utils"; import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' @@ -17,6 +18,7 @@ import Loadable from 'components/Loadable'; import * as HttpUtils from "utils/HttpUtils"; import * as UrlUtils from "utils/ApiPathConst"; import * as DateUtils from "utils/DateUtils"; +import { checkPaymentSuspention } from "utils/Utils"; const Message = Loadable(React.lazy(() => import('./Message'))); const Notice = Loadable(React.lazy(() => import('./Notice'))); @@ -49,10 +51,13 @@ const DashboardDefault = () => { const [isLoading, setLoding] = useState(true); const [itemList, setItemList] = React.useState([]); const [listData, setListData] = React.useState([]); - + const [paymentSuspention, setPaymentSuspention] = useState(false); + const [isPopUp, setIsPopUp] = React.useState(false); + React.useEffect(() => { loadMessageData() loadNoticeData() + checkPaymentSuspention()?setPaymentSuspention(true):setPaymentSuspention(false) localStorage.setItem('searchCriteria',"") }, []); @@ -70,6 +75,14 @@ const DashboardDefault = () => { } } + React.useEffect(() => { + // console.log(messageOnReady) + // console.log(onNoticeReady) + if(paymentSuspention){ + setIsPopUp(true); + } + }, [paymentSuspention]); + React.useEffect(() => { // console.log(messageOnReady) // console.log(onNoticeReady) @@ -214,6 +227,33 @@ const DashboardDefault = () => { +
+ setIsPopUp(false)} + PaperProps={{ + sx: { + minWidth: '40vw', + maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, + maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } + } + }} + > + + + + + + + +
+ + + + + +
+
); }; diff --git a/src/translations/en.json b/src/translations/en.json index 61470f1..40b4b04 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -21,6 +21,7 @@ "gazetteLength": "Length", "gazetteSampleName": "Gazette Supplement No. 6", "reason": "Reason", + "systemNotice": "System Notice", "payInstantly": "Pay now", "payLater": "Pay later", diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index 297fb37..f3acb4b 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -21,6 +21,7 @@ "gazetteLength": "长度", "gazetteSampleName": "宪报第6号副刊公共启事", "reason": "原因", + "systemNotice": "系统公告", "payInstantly": "即时付款", "payLater": "稍后付款", diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index 0240cc5..28e1c21 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -21,6 +21,7 @@ "gazetteLength": "長度", "gazetteSampleName": "憲報第6號副刊公共啟事", "reason": "原因", + "systemNotice": "系統公告", "payInstantly": "即時付款", "payLater": "稍後付款", diff --git a/src/utils/ApiPathConst.js b/src/utils/ApiPathConst.js index 401ae6d..fa87b7a 100644 --- a/src/utils/ApiPathConst.js +++ b/src/utils/ApiPathConst.js @@ -9,6 +9,8 @@ export const CHANGE_PASSWORD_PATH = "/user/change-password" export const GET_SYS_PARAMS = apiPath+'/settings'; export const PRIVACY_POLICY_PATH = apiPath+'/privacyPolicy'; +export const UPDATE_PAYMENT_SUSPENSION_MODE = apiPath+'/settings/update-payment-suspension'; +export const GET_PAYMENT_SUSPENSION_MODE = apiPath+'/settings/get-payment-suspension'; export const I_AM_SMART_PATH = apiPath+'/smart/call/iAmSmart'; export const I_AM_SMART_APP_PATH = apiPath+'/smart/call/app/iAmSmart'; diff --git a/src/utils/Utils.js b/src/utils/Utils.js index c979821..5c5d529 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -111,6 +111,12 @@ export const checkSysEnv = () =>{ return localStorage.getItem('sysEnv') } } +export const checkPaymentSuspention = () =>{ + if (localStorage.getItem('paymentSuspention') != null){ + // console.log(localStorage.getItem('sysEnv')) + return localStorage.getItem('paymentSuspention') + } +} /** ** This function is used for demo purpose route navigation ** In real app you won't need this function because your app will navigate to same route for each users regardless of ability