feat: extend task management with new statuses and centralized configuration
- Added `cancelled` and `freeze` statuses to `TasksResponse`, `HomePageClientProps`, and `useTasks` for comprehensive task tracking. - Updated task forms to dynamically load statuses using `getAllStatuses`, enhancing maintainability and reducing hardcoded values. - Refactored Kanban components to utilize centralized status configuration, improving consistency across the application. - Adjusted visibility toggle and swimlanes to reflect new status options, ensuring a seamless user experience.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { TaskStatus } from '@/lib/types';
|
||||
import { userPreferencesService } from '@/services/user-preferences';
|
||||
import { getAllStatuses } from '@/lib/status-config';
|
||||
|
||||
export function useColumnVisibility() {
|
||||
const [hiddenStatuses, setHiddenStatuses] = useState<Set<TaskStatus>>(new Set());
|
||||
@@ -37,10 +38,15 @@ export function useColumnVisibility() {
|
||||
return !hiddenStatuses.has(status);
|
||||
};
|
||||
|
||||
const getAllAvailableStatuses = () => {
|
||||
return getAllStatuses();
|
||||
};
|
||||
|
||||
return {
|
||||
hiddenStatuses,
|
||||
toggleStatusVisibility,
|
||||
getVisibleStatuses,
|
||||
isStatusVisible
|
||||
isStatusVisible,
|
||||
getAllAvailableStatuses
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user