TP-74655 | hotfix (#1114)

This commit is contained in:
Ashish Deo
2024-09-13 18:51:30 +05:30
committed by GitHub
parent 96dd131288
commit b9c113357d

View File

@@ -2,6 +2,8 @@ import axiosInstance, { ApiKeys, getApiUrl, logError } from '@cp/src/utils/ApiHe
import { isFunction } from '@cp/src/utils/commonUtils';
import { setBankStatementStatus } from './reducer/bankStatementSlice';
import { Dispatch } from '@reduxjs/toolkit';
import store from '@cp/src/store';
import { Roles } from '@cp/src/pages/auth/constants/AuthConstants';
export const getBankStatementResponse = async (
lan: string,
@@ -28,6 +30,10 @@ export const getBankStatementResponse = async (
export const getBankStatementStatus = (lan: string, customerId: string) => (dispatch: Dispatch) => {
const url = getApiUrl(ApiKeys.GET_BANK_STATEMENT_STATUS);
const isBankStatementAccessible = store.getState().common?.userData?.roles?.includes(Roles.ROLE_BANK_STATEMENT_ACCESS);
if (!isBankStatementAccessible) {
return;
}
axiosInstance
.get(url, {
headers: {