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
+1 -1
View File
@@ -191,7 +191,7 @@ export async function FileAnAppeal(fileId: string, appealReason: string, additio
let parsed = await response.json();
if (parsed.message_code === 0) {
return parsed.message_body;
return parsed;
} else {
throw parsed;
}
@@ -709,6 +709,7 @@ export default function TanstakFilesTable({ fileType, showFileLink }: { fileType
};
const handleAppeal = async (file: FileItem) => {
console.log(file);
setOpenWindowChildren(() => {
return (
@@ -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);
+2 -1
View File
@@ -492,7 +492,8 @@
"additional-info": "Additional information",
"enter-additional-info": "Any additional information that may help...",
"submit-appeal": "Submit appeal",
"submitting": "Submitting..."
"submitting": "Submitting...",
"active-appeal-already-exists-for-this-file": "Active appeal already exists for this file"
},
"Login-register-form": {
"and": "and",
+2 -1
View File
@@ -492,7 +492,8 @@
"additional-info": "Дополнительная информация",
"enter-additional-info": "Любая дополнительная информация, которая может помочь...",
"submit-appeal": "Отправить апелляцию",
"submitting": "Отправка..."
"submitting": "Отправка...",
"active-appeal-already-exists-for-this-file": "По данному делу уже подана активная апелляция"
},
"Login-register-form": {
"and": "и",