refactor(task-list): update subtask and indicator visibility logic
- Modified subtask visibility conditions across TaskCard, EnhancedKanbanTaskCard, KanbanTaskCard, and TaskRow components to only display when the count is greater than 1. - Enhanced task indicators for comments and attachments to follow the same visibility logic. - Added new dependencies for task management types to support subscriber and attachment features.
This commit is contained in:
@@ -284,7 +284,7 @@ const TaskCard: React.FC<taskProps> = ({ task }) => {
|
||||
format={value => formatDate(value)}
|
||||
/>
|
||||
</div>
|
||||
{task.sub_tasks_count && task.sub_tasks_count > 0 && (
|
||||
{task.sub_tasks_count && task.sub_tasks_count > 1 && (
|
||||
<Button
|
||||
onClick={() => setIsSubTaskShow(!isSubTaskShow)}
|
||||
size="small"
|
||||
@@ -306,7 +306,7 @@ const TaskCard: React.FC<taskProps> = ({ task }) => {
|
||||
|
||||
{isSubTaskShow &&
|
||||
task.sub_tasks_count &&
|
||||
task.sub_tasks_count > 0 &&
|
||||
task.sub_tasks_count > 1 &&
|
||||
task.sub_tasks?.map(subtask => <SubTaskCard subtask={subtask} />)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user