Skip to content

TaskView is a self-hosted project and task management platform focused on clarity, ownership, and control. TaskView is built for teams that want a transparent, self-hosted alternative to SaaS task managers.

1.1 KB
Raw Blame
import type { GoalItem, GoalListItem, Task, TaskFilters, TaskSortBy } from 'taskview-api'

export type TaskItem = Task;

export type TaskItems = TaskItem[];

export type TasksApplyRemoteArgs = {
    task: Task;
    created: boolean;
};

export type PartialSome<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;

export type PartialFetchRules = PartialSome<TasksStoreState['fetchRules'], 'currentPage' | 'endOfTasks'>;

export type TasksStoreState = {
    selectedTask?: Task | null;
    tasks: Task[];
    fetchRules: {
        goalId: GoalItem['id'];
        showCompleted: 1 | 0;
        currentListId: GoalListItem['id'];
        endOfTasks: boolean;
        currentPage: number;
        searchText: string;
        firstNew: 1 | 0;
        sortBy: TaskSortBy;
        filters: TaskFilters;
    };
    loading: boolean;
};

export const PRIORITY_COLORS = {
  '1': { color: '#38D681', t: 'priority.low' },
  '2': { color: '#FF9100', t: 'priority.medium' },
  '3': { color: '#FF1744', t: 'priority.high' },
}

/**@deprecated use ALL_TASKS_LIST_ID from taskview-api */
export const ALL_TASKS_LIST_ID = -1401