feat: add custom card component for sparepart display in ListSparepart

This commit is contained in:
2025-11-25 16:49:46 +07:00
parent 7e5105392c
commit 309d191bce
3 changed files with 130 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ import { NotifAlert, NotifOk, NotifConfirmDialog } from '../../../../components/
import { useNavigate } from 'react-router-dom';
import { deleteSparepart, getAllSparepart } from '../../../../api/sparepart';
import TableList from '../../../../components/Global/TableList';
import SparepartCardList from './SparepartCardList'; // Import the new custom card component
const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [
{
@@ -265,6 +266,7 @@ const ListSparepart = memo(function ListSparepart(props) {
queryParams={formDataFilter}
columns={columns(showPreviewModal, showEditModal, showDeleteDialog)}
triger={trigerFilter}
cardComponent={SparepartCardList} // Pass the custom component here
/>
</Col>
</Row>