NTP-12177 | Feedback history fix
This commit is contained in:
@@ -70,6 +70,7 @@ const CollectionCaseDetails: React.FC<ICaseDetails> = (props) => {
|
||||
if (loanAccountNumber) {
|
||||
dispatch(getAddressesAndGeolocations(loanAccountNumber));
|
||||
dispatch(getUngroupedAddress(loanAccountNumber));
|
||||
dispatch(getFeedbackHistory(loanAccountNumber));
|
||||
}
|
||||
}, [loanAccountNumber])
|
||||
);
|
||||
|
||||
@@ -93,7 +93,7 @@ const FeedbackListContainer: React.FC<IFeedbackListContainer> = ({
|
||||
return <OfflineFeedbackListContainer handleRetryEvent={handleRetryEvent} />;
|
||||
}
|
||||
|
||||
if (!feedbackList?.length) {
|
||||
if (!feedbackList?.length && !feedbackListLoading) {
|
||||
return <NoFeedbackFoundContainer />;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,21 +33,13 @@ const interactionsHandler = () => {
|
||||
|
||||
const inProgressCaseIds = useRef<string[]>([]);
|
||||
|
||||
const handleSuccessSubmit = (
|
||||
caseKey: string,
|
||||
interactionId: string,
|
||||
caseId: string,
|
||||
loanAccountNumber: string
|
||||
) => {
|
||||
const handleSuccessSubmit = (caseKey: string, interactionId: string, caseId: string) => {
|
||||
const docs = docsToBeUploaded?.[caseKey]?.documents;
|
||||
if (!docs) {
|
||||
return;
|
||||
}
|
||||
dispatch(setDocumentInteractionId({ caseKey, interactionId, caseId }));
|
||||
dispatch(uploadImages(caseKey, docs, interactionId));
|
||||
if (loanAccountNumber) {
|
||||
dispatch(getFeedbackHistory(loanAccountNumber));
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
@@ -83,12 +75,7 @@ const interactionsHandler = () => {
|
||||
dispatch(
|
||||
syncCaseDetail(modifiedCaseItem, {
|
||||
onSuccessCB: (_, interactionId) =>
|
||||
handleSuccessSubmit(
|
||||
caseKey,
|
||||
interactionId,
|
||||
caseItem.caseId,
|
||||
caseItem.loanAccountNumber
|
||||
),
|
||||
handleSuccessSubmit(caseKey, interactionId, caseItem.caseId),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user