feat(task-list): add tooltips for task indicators and enhance localization
- Introduced tooltips for subtasks, comments, attachments, subscribers, dependencies, and recurring tasks across various components to improve user experience. - Enhanced localization by adding new translation keys for these indicators in multiple languages, ensuring consistent messaging for users. - Updated components such as TaskRow, KanbanTaskCard, and EnhancedKanbanTaskCard to utilize the new tooltip functionality, improving clarity and accessibility.
This commit is contained in:
@@ -908,6 +908,38 @@ const taskManagementSlice = createSlice({
|
||||
return column;
|
||||
});
|
||||
},
|
||||
// Add action to update task counts (comments, attachments, etc.)
|
||||
updateTaskCounts: (state, action: PayloadAction<{
|
||||
taskId: string;
|
||||
counts: {
|
||||
comments_count?: number;
|
||||
attachments_count?: number;
|
||||
has_subscribers?: boolean;
|
||||
has_dependencies?: boolean;
|
||||
schedule_id?: string | null; // Add schedule_id for recurring tasks
|
||||
};
|
||||
}>) => {
|
||||
const { taskId, counts } = action.payload;
|
||||
const task = state.entities[taskId];
|
||||
if (task) {
|
||||
// Update only the provided count fields
|
||||
if (counts.comments_count !== undefined) {
|
||||
task.comments_count = counts.comments_count;
|
||||
}
|
||||
if (counts.attachments_count !== undefined) {
|
||||
task.attachments_count = counts.attachments_count;
|
||||
}
|
||||
if (counts.has_subscribers !== undefined) {
|
||||
task.has_subscribers = counts.has_subscribers;
|
||||
}
|
||||
if (counts.has_dependencies !== undefined) {
|
||||
task.has_dependencies = counts.has_dependencies;
|
||||
}
|
||||
if (counts.schedule_id !== undefined) {
|
||||
task.schedule_id = counts.schedule_id;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
extraReducers: builder => {
|
||||
builder
|
||||
@@ -1100,6 +1132,7 @@ export const {
|
||||
updateCustomColumn,
|
||||
deleteCustomColumn,
|
||||
syncColumnsWithFields,
|
||||
updateTaskCounts,
|
||||
} = taskManagementSlice.actions;
|
||||
|
||||
// Export the selectors
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { createSlice, PayloadAction, createAsyncThunk } from '@reduxjs/toolkit';
|
||||
import { updateColumnVisibility } from './task-management.slice';
|
||||
import { ITaskListColumn } from '@/types/tasks/taskList.types';
|
||||
import logger from '@/utils/errorLogger';
|
||||
|
||||
export interface TaskListField {
|
||||
key: string;
|
||||
@@ -39,7 +40,7 @@ function loadFields(): TaskListField[] {
|
||||
const parsed = JSON.parse(stored);
|
||||
return parsed;
|
||||
} catch (error) {
|
||||
console.warn('Failed to parse stored fields, using defaults:', error);
|
||||
logger.error('Failed to parse stored fields, using defaults:', error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +48,6 @@ function loadFields(): TaskListField[] {
|
||||
}
|
||||
|
||||
function saveFields(fields: TaskListField[]) {
|
||||
console.log('Saving fields to localStorage:', fields);
|
||||
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(fields));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user