fix send appeals
This commit is contained in:
@@ -29,11 +29,14 @@ export function FileAppealModalWindow({ fileId, setWindowClose, setWindowChildre
|
||||
try {
|
||||
const result = await FileAnAppeal(fileId, appealReason, additionalInfo);
|
||||
|
||||
if (result && result.status === 'success') {
|
||||
if (result?.message_desc === 'Appeal submitted successfully') {
|
||||
toast.success(t('appeal-submitted-successfully'));
|
||||
setWindowClose(false);
|
||||
} else {
|
||||
toast.error(result?.message || t('appeal-submission-failed'));
|
||||
} else if (result?.message_desc === 'Active appeal already exists for this file') {
|
||||
toast.error(t('active-appeal-already-exists-for-this-file'));
|
||||
}
|
||||
else {
|
||||
toast.error(result?.message_desc || t('appeal-submission-failed'));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Appeal submission error:', error);
|
||||
|
||||
Reference in New Issue
Block a user