Files
worklenz/worklenz-frontend/src/components/task-management/grouping-selector.tsx
chamikaJ 5221061241 feat(task-management): implement new task management features with BulkActionBar and task grouping
- Introduced BulkActionBar component for bulk actions on selected tasks, including status, priority, and assignee changes.
- Added TaskGroup and TaskRow components to enhance task organization and display.
- Implemented grouping functionality with GroupingSelector for improved task categorization.
- Enhanced drag-and-drop capabilities for task reordering within groups.
- Updated styling and responsiveness across task management components for better user experience.
2025-06-20 10:56:48 +05:30

43 lines
1.1 KiB
TypeScript

import React from 'react';
import { Select, Typography } from 'antd';
import { IGroupBy } from '@/features/tasks/tasks.slice';
import { IGroupByOption } from '@/types/tasks/taskList.types';
const { Text } = Typography;
const { Option } = Select;
interface GroupingSelectorProps {
currentGrouping: IGroupBy;
onChange: (groupBy: IGroupBy) => void;
options: IGroupByOption[];
disabled?: boolean;
}
const GroupingSelector: React.FC<GroupingSelectorProps> = ({
currentGrouping,
onChange,
options,
disabled = false,
}) => {
return (
<div className="flex items-center space-x-2">
<Text className="text-sm text-gray-600">Group by:</Text>
<Select
value={currentGrouping}
onChange={onChange}
disabled={disabled}
size="small"
style={{ minWidth: 100 }}
className="capitalize"
>
{options.map((option) => (
<Option key={option.value} value={option.value} className="capitalize">
{option.label}
</Option>
))}
</Select>
</div>
);
};
export default GroupingSelector;