feat: add batch operations for document list (#302)

### What problem does this PR solve?

document list needs to be batch operated


Issue link: #301

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-04-10 17:17:41 +08:00
committed by GitHub
parent 1ff5d9d55b
commit 533ac3b534
16 changed files with 341 additions and 143 deletions

View File

@ -30,12 +30,12 @@ const ParsingActionCell = ({
const documentId = record.id;
const isRunning = isParserRunning(record.run);
const { t } = useTranslate('knowledgeDetails');
const removeDocument = useRemoveDocument(documentId);
const removeDocument = useRemoveDocument();
const showDeleteConfirm = useShowDeleteConfirm();
const onRmDocument = () => {
if (!isRunning) {
showDeleteConfirm({ onOk: removeDocument });
showDeleteConfirm({ onOk: () => removeDocument(documentId) });
}
};