fix dual action

This commit is contained in:
2025-11-24 15:57:12 +07:00
parent 908788f41d
commit 1cd9cf765c

View File

@@ -58,34 +58,34 @@ const CardList = ({
style={getCardStyle(fieldColor ? item[fieldColor] : cardColor)}
actions={[
showPreviewModal && (
<EyeOutlined
style={{ color: '#1890ff' }}
key="preview"
onClick={() => showPreviewModal(item)}
/>
<EyeOutlined
style={{ color: '#1890ff' }}
key="preview"
onClick={() => showPreviewModal(item)}
/>
),
showEditModal && (
<EditOutlined
style={{ color: '#faad14' }}
key="edit"
onClick={() => showEditModal(item)}
/>
<EditOutlined
style={{ color: '#faad14' }}
key="edit"
onClick={() => showEditModal(item)}
/>
),
showDeleteDialog && (
<DeleteOutlined
style={{ color: '#ff1818' }}
key="delete"
onClick={() => showDeleteDialog(item)}
/>
<DeleteOutlined
style={{ color: '#ff1818' }}
key="delete"
onClick={() => showDeleteDialog(item)}
/>
),
].filter(Boolean)} // <== Hapus elemen yang undefined
].filter(Boolean)} // <== Hapus elemen yang undefined
>
<div style={{ textAlign: 'left' }}>
{column.map((itemCard, index) => (
<React.Fragment key={index}>
{!itemCard.hidden &&
itemCard.title !== 'No' &&
itemCard.title !== 'Aksi' && (
itemCard.title !== 'Action' && (
<p style={{ margin: '8px 0' }}>
<Text strong>{itemCard.title}:</Text>{' '}
{itemCard.render