NTP-50551 | Side NavBar Revamp Hotfix (#1429)
This commit is contained in:
@@ -33,11 +33,12 @@ export const handleReportDownload = (reportType: string, payload?: IFeedbackLeve
|
||||
if (response?.data) {
|
||||
const fileUrl = response?.data?.data;
|
||||
getFileDownload(fileUrl, true);
|
||||
toast.success('You will receive an email shortly!');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
logError(error);
|
||||
const errorMessage = error?.response?.data?.message || 'Failed to generate report';
|
||||
const errorMessage = error?.response?.data?.message || 'Email not sent';
|
||||
toast.error(errorMessage);
|
||||
});
|
||||
};
|
||||
@@ -50,6 +51,7 @@ export const handleDownloadButtonClick = (reportType: string, requestId: string)
|
||||
if (response?.data) {
|
||||
const fileUrl = response?.data;
|
||||
getFileDownload(fileUrl, true);
|
||||
toast.success('Report downloaded successfully');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -66,10 +68,11 @@ export const getUnallocatedCases = (agencyCode: string) => {
|
||||
if (response?.data) {
|
||||
const fileUrl = response?.data;
|
||||
getFileDownload(fileUrl, true);
|
||||
toast.success('You will receive an email shortly within 10 to 15 minutes!');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
logError(error);
|
||||
toast.error('Error occurred while generating file');
|
||||
toast.error('Failed to download excel');
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user