fixing card list master status
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user