@@ -68,10 +68,10 @@ const AutoLogoutProvider = ({ children }) => { | |||||
getRemainingTime(); | getRemainingTime(); | ||||
if(state !== "Active" && lastActiveTab){ | if(state !== "Active" && lastActiveTab){ | ||||
const timeElapsed = currentTime - lastRequestTime; | const timeElapsed = currentTime - lastRequestTime; | ||||
console.log(timeElapsed); | |||||
// console.log(timeElapsed); | |||||
if (timeElapsed >= logoutInterval * 60 * 1000) { | if (timeElapsed >= logoutInterval * 60 * 1000) { | ||||
//TODO: auto logout here | //TODO: auto logout here | ||||
console.log("logout"); | |||||
// console.log("logout"); | |||||
//await dispatch(handleLogoutFunction()); | //await dispatch(handleLogoutFunction()); | ||||
//await navigate('/login'); | //await navigate('/login'); | ||||
//await window.location.reload(); | //await window.location.reload(); | ||||
@@ -61,6 +61,7 @@ const OrganizationDetailPage = () => { | |||||
HttpUtils.get({ | HttpUtils.get({ | ||||
url: UrlUtils.GET_ORG_PATH + "/" + params.id, | url: UrlUtils.GET_ORG_PATH + "/" + params.id, | ||||
onSuccess: function (response) { | onSuccess: function (response) { | ||||
console.log(response) | |||||
response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.address?.country); | response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.address?.country); | ||||
response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.address?.district); | response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.address?.district); | ||||
response.data["addressLine1"] = response.data.addressTemp?.addressLine1; | response.data["addressLine1"] = response.data.addressTemp?.addressLine1; | ||||
@@ -81,28 +82,27 @@ const OrganizationDetailPage = () => { | |||||
} | } | ||||
} | } | ||||
if(isPrimaryLoggedIn()){ | if(isPrimaryLoggedIn()){ | ||||
if (params.id > 0) { | |||||
HttpUtils.get({ | |||||
url: UrlUtils.GET_PUB_ORG_PATH, | |||||
onSuccess: function (response) { | |||||
response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.address?.country); | |||||
response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.address?.district); | |||||
response.data["addressLine1"] = response.data.addressTemp?.addressLine1; | |||||
response.data["addressLine2"] = response.data.addressTemp?.addressLine2; | |||||
response.data["addressLine3"] = response.data.addressTemp?.addressLine3; | |||||
response.data["phoneNumber"] = response.data.contactTel?.phoneNumber; | |||||
response.data["tel_countryCode"] = response.data.contactTel?.countryCode; | |||||
response.data["faxNumber"] = response.data.faxNo?.faxNumber; | |||||
response.data["fax_countryCode"] = response.data.faxNo?.countryCode; | |||||
response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : ""; | |||||
setFormData(response.data) | |||||
setList(response.historyList) | |||||
} | |||||
}); | |||||
} | |||||
HttpUtils.get({ | |||||
url: UrlUtils.GET_PUB_ORG_PATH, | |||||
onSuccess: function (response) { | |||||
console.log(response) | |||||
response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.address?.country); | |||||
response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.address?.district); | |||||
response.data["addressLine1"] = response.data.addressTemp?.addressLine1; | |||||
response.data["addressLine2"] = response.data.addressTemp?.addressLine2; | |||||
response.data["addressLine3"] = response.data.addressTemp?.addressLine3; | |||||
response.data["phoneNumber"] = response.data.contactTel?.phoneNumber; | |||||
response.data["tel_countryCode"] = response.data.contactTel?.countryCode; | |||||
response.data["faxNumber"] = response.data.faxNo?.faxNumber; | |||||
response.data["fax_countryCode"] = response.data.faxNo?.countryCode; | |||||
response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : ""; | |||||
setFormData(response.data) | |||||
setList(response.historyList) | |||||
} | |||||
}); | |||||
} | } | ||||
}; | }; | ||||
@@ -77,7 +77,7 @@ const Index = () => { | |||||
url: paymentPath+loadPaymentUrl+(paymentData.type=="PPS"?"pps":"creditcard"), | url: paymentPath+loadPaymentUrl+(paymentData.type=="PPS"?"pps":"creditcard"), | ||||
params:{ | params:{ | ||||
"transactionid": paymentData.transactionid, | "transactionid": paymentData.transactionid, | ||||
"apprefid:": paymentData.transactionid, | |||||
//"apprefid:": paymentData.transactionid, | |||||
"webtoken": paymentData.webtoken, | "webtoken": paymentData.webtoken, | ||||
"paymentmethod":paymentData.paymentMethod, | "paymentmethod":paymentData.paymentMethod, | ||||
"order": { | "order": { | ||||
@@ -100,7 +100,7 @@ const AckPage = () => { | |||||
params: { | params: { | ||||
id: localStorage.getItem("paymentId"), | id: localStorage.getItem("paymentId"), | ||||
transNo: responseData.transactionid, | transNo: responseData.transactionid, | ||||
transDateTime: responseData.paymentdetail.time.replace("[UTC]", ""), | |||||
transDateTime: new Date(responseData.paymentdetail.time).toISOString(), | |||||
egisRefNo: responseData.paymentdetail.paymentid, | egisRefNo: responseData.paymentdetail.paymentid, | ||||
status: responseData.paymentdetail.result.paymentstatuscode, | status: responseData.paymentdetail.result.paymentstatuscode, | ||||
payload: responseData | payload: responseData | ||||
@@ -99,7 +99,7 @@ const Fpscallback = () => { | |||||
params: { | params: { | ||||
id: paymentId, | id: paymentId, | ||||
transNo: responseData.transactionid, | transNo: responseData.transactionid, | ||||
transDateTime: responseData.paymentdetail.time.replace("[UTC]", ""), | |||||
transDateTime: new Date(responseData.paymentdetail.time).toISOString(), | |||||
egisRefNo: responseData.paymentdetail.paymentid, | egisRefNo: responseData.paymentdetail.paymentid, | ||||
status: responseData.paymentdetail.result.paymentstatuscode, | status: responseData.paymentdetail.result.paymentstatuscode, | ||||
payload: responseData | payload: responseData | ||||
@@ -122,7 +122,7 @@ const Index = () => { | |||||
params: { | params: { | ||||
id: localStorage.getItem("paymentId"), | id: localStorage.getItem("paymentId"), | ||||
transNo: responseData.transactionid, | transNo: responseData.transactionid, | ||||
transDateTime: responseData.paymentdetail.time.replace("[UTC]", ""), | |||||
transDateTime: new Date(responseData.paymentdetail.time).toISOString(), | |||||
egisRefNo: responseData.paymentdetail.paymentid, | egisRefNo: responseData.paymentdetail.paymentid, | ||||
status: responseData.paymentdetail.result.paymentstatuscode, | status: responseData.paymentdetail.result.paymentstatuscode, | ||||
payload: responseData | payload: responseData | ||||
@@ -29,7 +29,6 @@ export const GET_PUB_ORG_USER_PATH = apiPath+'/user/pubOrg'; | |||||
export const POST_PUB_ORG_USER = apiPath+'/user/pubOrg'; | export const POST_PUB_ORG_USER = apiPath+'/user/pubOrg'; | ||||
export const GET_ORG_PATH = apiPath+'/org'; | export const GET_ORG_PATH = apiPath+'/org'; | ||||
export const GET_PUB_ORG_PATH = apiPath+'/org/pub'; | |||||
export const GET_ORG_FROM_USER_PATH = apiPath+'/org/from-user'; | export const GET_ORG_FROM_USER_PATH = apiPath+'/org/from-user'; | ||||
export const POST_ORG_SAVE_PATH = apiPath+'/org/save'; | export const POST_ORG_SAVE_PATH = apiPath+'/org/save'; | ||||
export const GET_ORG_COMBO = apiPath+'/org/combo'; | export const GET_ORG_COMBO = apiPath+'/org/combo'; | ||||
@@ -38,6 +37,12 @@ export const GET_ORG_MARK_AS_CREDITOR = apiPath+'/org/mark-as-creditor'; | |||||
export const GET_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/mark-as-non-creditor'; | export const GET_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/mark-as-non-creditor'; | ||||
export const GET_ORG_EXPORT = apiPath+'/org/export'; | export const GET_ORG_EXPORT = apiPath+'/org/export'; | ||||
//public | |||||
export const GET_PUB_ORG_PATH = apiPath+'/org/pub'; | |||||
export const POST_PUB_ORG_SAVE_PATH = apiPath+'/org/pub/save'; | |||||
export const GET_PUB_ORG_MARK_AS_CREDITOR = apiPath+'/org/pub/mark-as-creditor'; | |||||
export const GET_PUB_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/pub/mark-as-non-creditor'; | |||||
export const GET_MSG_DETAILS = apiPath+'/msg/details'; | export const GET_MSG_DETAILS = apiPath+'/msg/details'; | ||||
export const GET_MSG_LIST = apiPath+'/msg/list'; | export const GET_MSG_LIST = apiPath+'/msg/list'; | ||||
export const GET_MSG_DESHBOARD = apiPath+'/msg/list/deshboard'; | export const GET_MSG_DESHBOARD = apiPath+'/msg/list/deshboard'; | ||||