Add task drag-and-drop reordering
Order tasks by priority (ASC) by default. Enable drag-and-drop on the TODO and DONE tabs using native HTML5 drag events, following the compliance external URLs pattern. The "All" tab remains read-only since priority is scoped per state. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -6,16 +6,17 @@ import {
|
||||
} from "@probo/routes";
|
||||
import { loadQuery } from "react-relay";
|
||||
|
||||
import type { TaskGraphQuery } from "#/__generated__/core/TaskGraphQuery.graphql";
|
||||
import type { TasksPageQuery } from "#/__generated__/core/TasksPageQuery.graphql";
|
||||
import { PageSkeleton } from "#/components/skeletons/PageSkeleton";
|
||||
import { coreEnvironment } from "#/environments";
|
||||
import { tasksQuery } from "#/hooks/graph/TaskGraph";
|
||||
import { tasksPageQuery } from "#/pages/organizations/tasks/TasksPage";
|
||||
|
||||
export const taskRoutes = [
|
||||
{
|
||||
path: "tasks",
|
||||
Fallback: PageSkeleton,
|
||||
loader: loaderFromQueryLoader(({ organizationId }) =>
|
||||
loadQuery<TaskGraphQuery>(coreEnvironment, tasksQuery, {
|
||||
loadQuery<TasksPageQuery>(coreEnvironment, tasksPageQuery, {
|
||||
organizationId,
|
||||
}),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user