fix send appeals
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -492,7 +492,8 @@
|
||||
"additional-info": "Дополнительная информация",
|
||||
"enter-additional-info": "Любая дополнительная информация, которая может помочь...",
|
||||
"submit-appeal": "Отправить апелляцию",
|
||||
"submitting": "Отправка..."
|
||||
"submitting": "Отправка...",
|
||||
"active-appeal-already-exists-for-this-file": "По данному делу уже подана активная апелляция"
|
||||
},
|
||||
"Login-register-form": {
|
||||
"and": "и",
|
||||
|
||||
Reference in New Issue
Block a user