Skip to content

Commit 37c0faa

Browse files
committed
feat: updating frontend after deletion
1 parent 93f4fc0 commit 37c0faa

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

assets/js/Components/ReviewFilesPage.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ const getSectionPostOptions = (newFile, sectionReferences) => {
866866
}
867867

868868
for(const id of fileIds){
869-
tempReport.files = tempReport.files.filter((file) => parseInt(file.lmsFileI) != id)
869+
tempReport.files = tempReport.files.filter((file) => parseInt(file.lmsFileId) != id)
870870
}
871871

872872
return tempReport
@@ -893,15 +893,17 @@ const getSectionPostOptions = (newFile, sectionReferences) => {
893893
const response = await respone_str.json()
894894
console.log(response)
895895
for(const r of response){
896-
reomovedFileId.push(r.id)
896+
reomovedFileId.push(r?.content?.id)
897897
}
898898
}
899899
}
900900
catch(e){
901901
console.error(e)
902902
}
903903

904+
console.log(reomovedFileId)
904905
const newReport = removeFileFromReport(reomovedFileId)
906+
setDeleteFileQueue(tempQueue)
905907
processNewReport(newReport)
906908

907909
}

0 commit comments

Comments
 (0)