fix send appeals

This commit is contained in:
smanylov
2026-05-29 13:05:49 +07:00
parent f04ce348ae
commit 0935e8cbc7
5 changed files with 12 additions and 6 deletions
@@ -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);