fixing card list master status

This commit is contained in:
2025-10-22 15:53:22 +07:00
parent 784ffc5e87
commit 6e256e3c42
3 changed files with 170 additions and 164 deletions

View File

@@ -54,43 +54,42 @@ const CardList = ({
}
style={getCardStyle()}
actions={[
<Space
size="middle"
style={{ display: 'flex', justifyContent: 'center' }}
>
<Button
type="text"
style={{ color: '#1890ff' }}
icon={<EyeOutlined />}
onClick={() => showPreviewModal(item)}
/>
<Button
type="text"
style={{ color: '#faad14' }}
icon={<EditOutlined />}
onClick={() => showEditModal(item)}
/>
<Button
type="text"
danger
icon={<DeleteOutlined />}
onClick={() => showDeleteDialog(item)}
/>
</Space>,
<EyeOutlined
style={{ color: '#1890ff' }}
key="preview"
onClick={() => showPreviewModal(item)}
/>,
<EditOutlined
style={{ color: '#faad14' }}
key="edit"
onClick={() => showEditModal(item)}
/>,
<DeleteOutlined
style={{ color: '#ff1818' }}
key="delete"
onClick={() => showDeleteDialog(item)}
/>,
]}
>
<div style={{ textAlign: 'left' }}>
{column.map((itemCard, index) => (
<React.Fragment key={index}>
{!itemCard.hidden && itemCard.title !== 'No' && itemCard.title !== 'Aksi' && (
<p style={{ margin: '8px 0' }}>
<Text strong>{itemCard.title}:</Text>{' '}
{itemCard.render
? itemCard.render(item[itemCard.dataIndex], item, index)
: item[itemCard.dataIndex] || item[itemCard.key] || '-'
}
</p>
)}
{!itemCard.hidden &&
itemCard.title !== 'No' &&
itemCard.title !== 'Aksi' && (
<p style={{ margin: '8px 0' }}>
<Text strong>{itemCard.title}:</Text>{' '}
{itemCard.render
? itemCard.render(
item[itemCard.dataIndex],
item,
index
)
: item[itemCard.dataIndex] ||
item[itemCard.key] ||
'-'}
</p>
)}
</React.Fragment>
))}
</div>