NTP-12177 | Feedback history fix

This commit is contained in:
Aman Chaturvedi
2024-11-19 12:08:37 +05:30
parent 68ebe5188c
commit 0f67062381
3 changed files with 4 additions and 16 deletions

View File

@@ -70,6 +70,7 @@ const CollectionCaseDetails: React.FC<ICaseDetails> = (props) => {
if (loanAccountNumber) {
dispatch(getAddressesAndGeolocations(loanAccountNumber));
dispatch(getUngroupedAddress(loanAccountNumber));
dispatch(getFeedbackHistory(loanAccountNumber));
}
}, [loanAccountNumber])
);

View File

@@ -93,7 +93,7 @@ const FeedbackListContainer: React.FC<IFeedbackListContainer> = ({
return <OfflineFeedbackListContainer handleRetryEvent={handleRetryEvent} />;
}
if (!feedbackList?.length) {
if (!feedbackList?.length && !feedbackListLoading) {
return <NoFeedbackFoundContainer />;
}

View File

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