farmcontrol-ui/src/components/Dashboard/common/ObjectKanbanHeader.jsx
Tom Butcher ab7919122a Add Kanban and Timeline Icons, Enhance Kanban Component Styles
- Introduced new SVG icons for Kanban and Timeline to enhance visual representation in the dashboard.
- Expanded App.css with new styles for the Kanban component, improving layout and responsiveness.
- Updated various dashboard components to integrate the new ObjectListViewPageContent for better view management and consistency across the application.
2026-09-03 01:30:44 +01:00

47 lines
1.3 KiB
JavaScript

import { Flex } from 'antd'
import PropTypes from 'prop-types'
import ObjectProperty from './ObjectProperty'
import { getCategoryValueKey } from './viewModeUtils'
const ObjectKanbanHeader = ({
categoryValues,
categoryProperty,
categoryPropertyDef,
trackRef
}) => {
return (
<div className='objectKanbanHeader'>
<div className='objectKanbanHeaderTrack' ref={trackRef}>
<Flex gap='middle' className='objectKanbanHeaderRow'>
{categoryValues.map((categoryValue) => {
const columnKey = getCategoryValueKey(categoryValue)
return (
<div key={columnKey} className='objectKanbanHeaderCell'>
{categoryPropertyDef ? (
<ObjectProperty
{...categoryPropertyDef}
value={categoryValue}
objectData={{ [categoryProperty]: categoryValue }}
name={categoryProperty}
/>
) : null}
</div>
)
})}
</Flex>
</div>
</div>
)
}
ObjectKanbanHeader.displayName = 'ObjectKanbanHeader'
ObjectKanbanHeader.propTypes = {
categoryValues: PropTypes.array.isRequired,
categoryProperty: PropTypes.string.isRequired,
categoryPropertyDef: PropTypes.object,
trackRef: PropTypes.object
}
export default ObjectKanbanHeader