From d40fdcb4a4faccc7652b030ba08e02e7d4577bc3 Mon Sep 17 00:00:00 2001 From: Kunal Sharma Date: Mon, 25 Sep 2023 20:24:51 +0530 Subject: [PATCH] TP-42732|Kunal| added campaign in /accept api (#583) * TP-42732|Kunal|added campaign id in accept api * TP-42732|Kunal|added campaign id in accept api * TP-42732|Kunal|added campaign id in accept api --- src/pages/Dashboard/HrDashBoard.tsx | 3 ++- .../Dashboard/dc-97/HumanReminderAction.ts | 21 +++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/pages/Dashboard/HrDashBoard.tsx b/src/pages/Dashboard/HrDashBoard.tsx index c42768c2..ac1c43ad 100644 --- a/src/pages/Dashboard/HrDashBoard.tsx +++ b/src/pages/Dashboard/HrDashBoard.tsx @@ -242,7 +242,8 @@ const HrDashBoard = () => { type: 'error', autoClose: 6500 }); - } + }, + campaignId ) ); dispatch(setShowMainScreen(true)); diff --git a/src/pages/Dashboard/dc-97/HumanReminderAction.ts b/src/pages/Dashboard/dc-97/HumanReminderAction.ts index 8b707098..63d5f2f1 100644 --- a/src/pages/Dashboard/dc-97/HumanReminderAction.ts +++ b/src/pages/Dashboard/dc-97/HumanReminderAction.ts @@ -17,10 +17,11 @@ export const setCallStatus = ( accountNumber: string, crtObjectId: string, callAcceptedTime: number, - errorCallback: (e: any) => void + errorCallback: (e: any) => void, + campaignId: string | null ) => { const url = getApiUrl(ApiKeys.HUMAN_REMINDER_ACCEPT); - const data = { connectedPhoneNumber, accountNumber, crtObjectId, callAcceptedTime }; + const data = { connectedPhoneNumber, accountNumber, crtObjectId, callAcceptedTime, campaignId }; addClickstreamEvent(HRC_CLICKSTREAM[HRC_EVENTS.HRC_ACCEPT_CALL_MADE], { connectedPhoneNumber, accountNumber, @@ -41,8 +42,12 @@ export const setCallStatus = ( response: response.data.body, currentCallStatus: ExtensionHandler.currentCallStatus() }); - dispatch(getCustomerImage(response.data.body?.customerDetails?.customerReferenceId, - response.data.body?.loanDetails?.loanAccountNumber)); + dispatch( + getCustomerImage( + response.data.body?.customerDetails?.customerReferenceId, + response.data.body?.loanDetails?.loanAccountNumber + ) + ); dispatch(setHumanReminderCustomerDetails({ humanReminderResponse: response.data.body })); dispatch(setHumanReminderCustomerDetailsLoading(false)); dispatch(setReminderRefId(response.data.body?.reminderRefId)); @@ -111,8 +116,12 @@ export const getCustomerDetails = (humanReferenceId: string) => { .then(response => { if (response?.data?.body) { dispatch(setHumanReminderCustomerDetailsLoading(false)); - dispatch(getCustomerImage(response.data.body.customerDetails.customerReferenceId, - response.data.body.loanDetails.loanAccountNumber)); + dispatch( + getCustomerImage( + response.data.body.customerDetails.customerReferenceId, + response.data.body.loanDetails.loanAccountNumber + ) + ); dispatch(setHumanReminderCustomerDetails({ humanReminderResponse: response.data.body })); } })