TP-74655 | hotfix (#1114)
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user