mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-23 23:05:46 +00:00
refactor(FE-114): remove bulk delete functionality from RecordingTable
This commit is contained in:
@@ -183,7 +183,6 @@ const RecordingTable = () => {
|
|||||||
const [isBulkRejectLoading, setIsBulkRejectLoading] = useState(false);
|
const [isBulkRejectLoading, setIsBulkRejectLoading] = useState(false);
|
||||||
|
|
||||||
const singleDeleteModal = useModal();
|
const singleDeleteModal = useModal();
|
||||||
const bulkDeleteModal = useModal();
|
|
||||||
const bulkApproveModal = useModal();
|
const bulkApproveModal = useModal();
|
||||||
const bulkRejectModal = useModal();
|
const bulkRejectModal = useModal();
|
||||||
|
|
||||||
@@ -249,19 +248,6 @@ const RecordingTable = () => {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
};
|
||||||
|
|
||||||
const bulkDeleteHandler = async () => {
|
|
||||||
setIsDeleteLoading(true);
|
|
||||||
console.log(
|
|
||||||
'Deleted recordings:',
|
|
||||||
paginatedData.filter((_, idx) => selectedRecordings.includes(idx))
|
|
||||||
);
|
|
||||||
setTimeout(() => {
|
|
||||||
setIsDeleteLoading(false);
|
|
||||||
setSelectedRecordings([]);
|
|
||||||
bulkDeleteModal.closeModal();
|
|
||||||
}, 1000);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-col gap-4'>
|
<div className='flex flex-col gap-4'>
|
||||||
<div className='flex flex-col gap-2 mb-4'>
|
<div className='flex flex-col gap-2 mb-4'>
|
||||||
@@ -313,20 +299,6 @@ const RecordingTable = () => {
|
|||||||
/>
|
/>
|
||||||
Reject ({selectedRecordings.length})
|
Reject ({selectedRecordings.length})
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
type='button'
|
|
||||||
color='error'
|
|
||||||
variant='outline'
|
|
||||||
onClick={() => bulkDeleteModal.openModal()}
|
|
||||||
className='flex items-center gap-2'
|
|
||||||
>
|
|
||||||
<Icon
|
|
||||||
icon='material-symbols:delete-outline'
|
|
||||||
width={20}
|
|
||||||
height={20}
|
|
||||||
/>
|
|
||||||
Delete Selected ({selectedRecordings.length})
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -359,21 +331,6 @@ const RecordingTable = () => {
|
|||||||
onClick: bulkRejectHandler,
|
onClick: bulkRejectHandler,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ConfirmationModal
|
|
||||||
ref={bulkDeleteModal.ref}
|
|
||||||
type='error'
|
|
||||||
text={`Apakah anda yakin ingin menghapus ${selectedRecordings.length} data Recording yang dipilih?`}
|
|
||||||
secondaryButton={{
|
|
||||||
text: 'Tidak',
|
|
||||||
}}
|
|
||||||
primaryButton={{
|
|
||||||
text: 'Ya',
|
|
||||||
color: 'error',
|
|
||||||
isLoading: isDeleteLoading,
|
|
||||||
onClick: bulkDeleteHandler,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Table
|
<Table
|
||||||
|
|||||||
Reference in New Issue
Block a user