| @@ -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); | ||||
| @@ -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) | ||||
| }, | }, | ||||
| @@ -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) | ||||
| }, | }, | ||||
| @@ -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, | ||||
| @@ -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, | ||||