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
This commit is contained in:
Kunal Sharma
2023-09-25 20:24:51 +05:30
committed by GitHub
parent 5ed84fac28
commit d40fdcb4a4
2 changed files with 17 additions and 7 deletions

View File

@@ -242,7 +242,8 @@ const HrDashBoard = () => {
type: 'error',
autoClose: 6500
});
}
},
campaignId
)
);
dispatch(setShowMainScreen(true));

View File

@@ -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 }));
}
})