TP-23684 | added clickstream events -2 (#204)
This commit is contained in:
committed by
GitHub Enterprise
parent
6e1b1ce0a5
commit
37745bd694
@@ -21,6 +21,8 @@ import { setAddresses, setAddressLoading } from '../reducer/addressSlice';
|
||||
import { IFeedback } from '../types/feedback.types';
|
||||
import { allSettled } from '../components/utlis/commonFunctions';
|
||||
import { GenericType } from '../common/GenericTypes';
|
||||
import { addClickstreamEvent } from "../services/clickstreamEventService";
|
||||
import { CLICKSTREAM_EVENT_NAMES } from "../common/Constants";
|
||||
|
||||
// TODO: Need to add respective interfaces instead of any
|
||||
interface IUnifiedData {
|
||||
@@ -106,7 +108,8 @@ export const getCaseUnifiedData =
|
||||
for (const key of infoToGet) {
|
||||
queryParams[key] = true;
|
||||
}
|
||||
dispatch(setUnifiedDataLoading(queryParams, loanAccountNumbers));
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_UNIFIED_ENTITY_REQUESTED, {lans: JSON.stringify(loanAccountNumbers || []), requestedEntities: JSON.stringify(infoToGet || [])})
|
||||
dispatch(setUnifiedDataLoading(queryParams, loanAccountNumbers));
|
||||
const promisesList: Promise<AxiosResponse<any, any>>[] = [];
|
||||
loanAccountNumbers.forEach(loanAccountNumber => {
|
||||
const url = getApiUrl(
|
||||
@@ -118,7 +121,10 @@ export const getCaseUnifiedData =
|
||||
promisesList.push(promise);
|
||||
});
|
||||
allSettled?.(promisesList).then((res: GenericType) => {
|
||||
dispatch(setUnifiedData(queryParams, loanAccountNumbers, res));
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_UNIFIED_ENTITY_REQUEST_SUCCESS, {lans: JSON.stringify(loanAccountNumbers || []), requestedEntities: JSON.stringify(infoToGet || [])})
|
||||
dispatch(setUnifiedData(queryParams, loanAccountNumbers, res));
|
||||
}).catch(e=>{
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_UNIFIED_ENTITY_REQUEST_FAILED, {lans: JSON.stringify(loanAccountNumbers || []), requestedEntities: JSON.stringify(infoToGet || [])})
|
||||
}).finally(() => {
|
||||
dispatch(setEmiScheduleLoading({isLoading:false, loanAccountNumbers}));
|
||||
dispatch(setFeedbackHistoryLoading({isLoading:false, loanAccountNumbers}));
|
||||
|
||||
@@ -173,7 +173,10 @@ export const CLICKSTREAM_EVENT_NAMES = {
|
||||
FA_VIEW_PAST_FEEDBACK_NEXT_PAGE_CLICKED: {name: 'FA_VIEW_PAST_FEEDBACK_NEXT_PAGE_CLICKED', description: 'FA_VIEW_PAST_FEEDBACK_NEXT_PAGE_CLICKED'},
|
||||
FA_VIEW_PAST_FEEDBACK_PREV_PAGE_CLICKED: {name: 'FA_VIEW_PAST_FEEDBACK_PREV_PAGE_CLICKED', description: 'FA_VIEW_PAST_FEEDBACK_PREV_PAGE_CLICKED'},
|
||||
FA_VIEW_PAST_FEEDBACK_NAVIGATION_PAGE_FAILED: {name: 'FA_VIEW_PAST_FEEDBACK_PREV_PAGE_FAILED', description: 'FA_VIEW_PAST_FEEDBACK_PREV_PAGE_FAILED'},
|
||||
FA_VIEW_PHOTO_CLICKED: {name: 'FA_VIEW_PHOTO_CLICKED', description: 'FA_VIEW_PHOTO_CLICKED'}
|
||||
FA_VIEW_PHOTO_CLICKED: {name: 'FA_VIEW_PHOTO_CLICKED', description: 'FA_VIEW_PHOTO_CLICKED'},
|
||||
FA_UNIFIED_ENTITY_REQUESTED: {name: 'FA_UNIFIED_ENTITY_REQUESTED', description: 'FA_UNIFIED_ENTITY_REQUESTED'},
|
||||
FA_UNIFIED_ENTITY_REQUEST_SUCCESS: {name: 'FA_UNIFIED_ENTITY_REQUEST_SUCCESS', description: 'FA_UNIFIED_ENTITY_REQUEST_SUCCESS'},
|
||||
FA_UNIFIED_ENTITY_REQUEST_FAILED: {name: 'FA_UNIFIED_ENTITY_REQUEST_FAILED', description: 'FA_UNIFIED_ENTITY_REQUEST_FAILED'}
|
||||
} as const;
|
||||
|
||||
export enum MimeType {
|
||||
|
||||
Reference in New Issue
Block a user