diff --git a/src/auth/index.js b/src/auth/index.js index b053a3e..5ee7c76 100644 --- a/src/auth/index.js +++ b/src/auth/index.js @@ -92,11 +92,12 @@ export const handleLogoutFunction = () => { localStorage.removeItem('webtoken') localStorage.removeItem('transactionid') //localStorage.removeItem(config.storageUserRoleKeyName) + localStorage.removeItem('expiredAlertShown') localStorage.removeItem(refreshIntervalName) localStorage.removeItem(windowCount) localStorage.removeItem(predictProductionQty) localStorage.removeItem(predictUsageCount) - setTimeout(()=> localStorage.removeItem("expiredAlertShown"), 5000) + // setTimeout(()=> localStorage.removeItem("expiredAlertShown"), 5000) } } @@ -161,9 +162,10 @@ export const SetupAxiosInterceptors = () => { }); } else { if (error.response.status === 401) { - await dispatch(handleLogoutFunction()); - await navigate('/login'); - await window.location.reload(); + if (localStorage.getItem("expiredAlertShown") === null) { + localStorage.setItem("expiredAlertShown", true) + alert("登入驗證已過期,請重新登入。") + } } // ** if (status === 401) { @@ -181,11 +183,11 @@ export const SetupAxiosInterceptors = () => { // } // } - // if (localStorage.getItem("expiredAlertShown")) { - // await dispatch(handleLogoutFunction()); - // await navigate('/login'); - // await window.location.reload(); - // } + if (localStorage.getItem("expiredAlertShown")) { + await dispatch(handleLogoutFunction()); + await navigate('/login'); + await window.location.reload(); + } if (error.response.status === 500){ //setIsUploading(false); diff --git a/src/pages/Payment/FPS/AckPage.js b/src/pages/Payment/FPS/AckPage.js index 60e2b68..bd8b9f9 100644 --- a/src/pages/Payment/FPS/AckPage.js +++ b/src/pages/Payment/FPS/AckPage.js @@ -165,7 +165,7 @@ const AckPage = () => { const local = locale HttpUtils.fileDownload({ // url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId")+"/"+local, - url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+paymentData.data.id+"/"+local, + url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+paymentData.id+"/"+local, onResponse:()=>{ setOnDownload(false) }, diff --git a/src/pages/Payment/PaymentCallback.js b/src/pages/Payment/PaymentCallback.js index d0344f2..d06928f 100644 --- a/src/pages/Payment/PaymentCallback.js +++ b/src/pages/Payment/PaymentCallback.js @@ -160,10 +160,10 @@ const Index = () => { // window.print(); setOnDownload(true) const local = locale - // console.log(local) + console.log(local) HttpUtils.fileDownload({ // url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId")+"/"+local, - url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+paymentData.data.id+"/"+local, + url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+paymentData.id+"/"+local, onResponse:()=>{ setOnDownload(false) }, diff --git a/src/pages/PublicNotice/Search_GLD/DataGrid.js b/src/pages/PublicNotice/Search_GLD/DataGrid.js index 6e6ed13..cb216da 100644 --- a/src/pages/PublicNotice/Search_GLD/DataGrid.js +++ b/src/pages/PublicNotice/Search_GLD/DataGrid.js @@ -95,7 +95,7 @@ export default function SearchPublicNoticeTable({ searchCriteria }) { { id: 'contactPerson', field: 'contactPerson', - headerName: 'Client / Payment Method', + headerName: 'Client / Payment Means', sortable: false, minWidth: 250, flex: 2, diff --git a/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/DataGrid.js b/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/DataGrid.js index b86bad4..c48f439 100644 --- a/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/DataGrid.js +++ b/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/DataGrid.js @@ -77,7 +77,7 @@ export default function SearchPublicNoticeTable({ searchCriteria }) { company = params.row.contactPerson } return