Browse Source

Merge branch 'Paging_Enhancement' of https://git.2fi-solutions.com/alex/PNSPS-frontend-MaterialUI into Paging_Enhancement

master
Jason Chuang 1 year ago
parent
commit
4f6d5630e1
5 changed files with 17 additions and 15 deletions
  1. +11
    -9
      src/auth/index.js
  2. +1
    -1
      src/pages/Payment/FPS/AckPage.js
  3. +2
    -2
      src/pages/Payment/PaymentCallback.js
  4. +1
    -1
      src/pages/PublicNotice/Search_GLD/DataGrid.js
  5. +2
    -2
      src/pages/PublicNotice/Search_Mark_As_Paid_GLD/DataGrid.js

+ 11
- 9
src/auth/index.js View File

@@ -92,11 +92,12 @@ export const handleLogoutFunction = () => {
localStorage.removeItem('webtoken') localStorage.removeItem('webtoken')
localStorage.removeItem('transactionid') localStorage.removeItem('transactionid')
//localStorage.removeItem(config.storageUserRoleKeyName) //localStorage.removeItem(config.storageUserRoleKeyName)
localStorage.removeItem('expiredAlertShown')
localStorage.removeItem(refreshIntervalName) localStorage.removeItem(refreshIntervalName)
localStorage.removeItem(windowCount) localStorage.removeItem(windowCount)
localStorage.removeItem(predictProductionQty) localStorage.removeItem(predictProductionQty)
localStorage.removeItem(predictUsageCount) localStorage.removeItem(predictUsageCount)
setTimeout(()=> localStorage.removeItem("expiredAlertShown"), 5000)
// setTimeout(()=> localStorage.removeItem("expiredAlertShown"), 5000)
} }
} }


@@ -161,9 +162,10 @@ export const SetupAxiosInterceptors = () => {
}); });
} else { } else {
if (error.response.status === 401) { 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) { // ** 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){ if (error.response.status === 500){
//setIsUploading(false); //setIsUploading(false);


+ 1
- 1
src/pages/Payment/FPS/AckPage.js View File

@@ -165,7 +165,7 @@ const AckPage = () => {
const local = locale const local = locale
HttpUtils.fileDownload({ HttpUtils.fileDownload({
// url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId")+"/"+local, // 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:()=>{ onResponse:()=>{
setOnDownload(false) setOnDownload(false)
}, },


+ 2
- 2
src/pages/Payment/PaymentCallback.js View File

@@ -160,10 +160,10 @@ const Index = () => {
// window.print(); // window.print();
setOnDownload(true) setOnDownload(true)
const local = locale const local = locale
// console.log(local)
console.log(local)
HttpUtils.fileDownload({ HttpUtils.fileDownload({
// url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId")+"/"+local, // 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:()=>{ onResponse:()=>{
setOnDownload(false) setOnDownload(false)
}, },


+ 1
- 1
src/pages/PublicNotice/Search_GLD/DataGrid.js View File

@@ -95,7 +95,7 @@ export default function SearchPublicNoticeTable({ searchCriteria }) {
{ {
id: 'contactPerson', id: 'contactPerson',
field: 'contactPerson', field: 'contactPerson',
headerName: 'Client / Payment Method',
headerName: 'Client / Payment Means',
sortable: false, sortable: false,
minWidth: 250, minWidth: 250,
flex: 2, flex: 2,


+ 2
- 2
src/pages/PublicNotice/Search_Mark_As_Paid_GLD/DataGrid.js View File

@@ -77,7 +77,7 @@ export default function SearchPublicNoticeTable({ searchCriteria }) {
company = params.row.contactPerson company = params.row.contactPerson
} }
return <div> return <div>
{company}
{params?.value}<br />{company}
</div>; </div>;
} }
}, },
@@ -99,7 +99,7 @@ export default function SearchPublicNoticeTable({ searchCriteria }) {
{ {
id: 'paymentMethod', id: 'paymentMethod',
field: 'paymentMethod', field: 'paymentMethod',
headerName: 'Payment Method',
headerName: 'Payment Means',
sortable: false, sortable: false,
minWidth: 250, minWidth: 250,
flex: 2, flex: 2,


Loading…
Cancel
Save