refactor(task-list): unify date handling and enhance column widths
- Updated TaskRow component to handle both camelCase and snake_case date fields for created and updated timestamps. - Adjusted column widths for due date, start date, completed date, created date, and last updated fields for better layout consistency. - Ensured whitespace handling in date display spans for improved UI presentation.
This commit is contained in:
@@ -171,10 +171,10 @@ export const fetchTasks = createAsyncThunk(
|
||||
logged: convertTimeValue(task.time_spent),
|
||||
},
|
||||
customFields: {},
|
||||
createdAt: task.created_at || new Date().toISOString(),
|
||||
updatedAt: task.updated_at || new Date().toISOString(),
|
||||
created_at: task.created_at || new Date().toISOString(),
|
||||
updated_at: task.updated_at || new Date().toISOString(),
|
||||
createdAt: task.createdAt || task.created_at || new Date().toISOString(),
|
||||
updatedAt: task.updatedAt || task.updated_at || new Date().toISOString(),
|
||||
created_at: task.createdAt || task.created_at || new Date().toISOString(),
|
||||
updated_at: task.updatedAt || task.updated_at || new Date().toISOString(),
|
||||
order: typeof task.sort_order === 'number' ? task.sort_order : 0,
|
||||
// Ensure all Task properties are mapped, even if undefined in API response
|
||||
sub_tasks: task.sub_tasks || [],
|
||||
@@ -285,10 +285,10 @@ export const fetchTasksV3 = createAsyncThunk(
|
||||
},
|
||||
customFields: {},
|
||||
custom_column_values: task.custom_column_values || {},
|
||||
createdAt: task.created_at || now,
|
||||
updatedAt: task.updated_at || now,
|
||||
created_at: task.created_at || now,
|
||||
updated_at: task.updated_at || now,
|
||||
createdAt: task.createdAt || task.created_at || now,
|
||||
updatedAt: task.updatedAt || task.updated_at || now,
|
||||
created_at: task.createdAt || task.created_at || now,
|
||||
updated_at: task.updatedAt || task.updated_at || now,
|
||||
order: typeof task.sort_order === 'number' ? task.sort_order : 0,
|
||||
sub_tasks: task.sub_tasks || [],
|
||||
sub_tasks_count: task.sub_tasks_count || 0,
|
||||
|
||||
Reference in New Issue
Block a user