-
Notifications
You must be signed in to change notification settings - Fork 67
feat: Enable drag-and-drop tasks to agenda to create timed and all-day events #1398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
f2ea0b6
d1d7223
e1f9339
2bc3ae7
1f89668
4b49359
81ebc37
dc5a0b8
abaed15
68a730a
a23883e
12a1430
c89b828
5af5d6e
ee85d21
35691f3
2be21b3
dbec324
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { faker } from "@faker-js/faker"; | ||
| import { Task } from "@web/common/types/task.types"; | ||
|
|
||
| /** | ||
| * Creates a mock task with optional overrides | ||
| * @param overrides - Partial task properties to override defaults | ||
| * @returns A complete Task object | ||
| */ | ||
| export function createMockTask(overrides: Partial<Task> = {}): Task { | ||
| return { | ||
| id: faker.string.uuid(), | ||
| title: faker.lorem.sentence({ min: 3, max: 5 }), | ||
| status: "todo", | ||
| order: faker.number.int({ min: 0, max: 100 }), | ||
| createdAt: faker.date.recent().toISOString(), | ||
| ...overrides, | ||
| }; | ||
| } |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. restore this file, it's used by other tests
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Restored from main branch. (commit ee85d21) |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,12 +17,17 @@ import { | |
| import { CSS } from "@dnd-kit/utilities"; | ||
| import { useMergeRefs } from "@floating-ui/react"; | ||
| import { Categories_Event } from "@core/types/event.types"; | ||
| import { Task } from "@web/common/types/task.types"; | ||
| import { Schema_GridEvent } from "@web/common/types/web.event.types"; | ||
|
|
||
| export type DraggableDataType = Categories_Event | "task"; | ||
|
|
||
| export interface DraggableDNDData { | ||
| type: Categories_Event; | ||
| event: Schema_GridEvent | null; | ||
| type: DraggableDataType; | ||
| event?: Schema_GridEvent | null; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Strong type, don't let these be optional
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed all fields to required. Components now explicitly provide null values when fields don't apply (e.g., |
||
| task?: Task | null; | ||
| view: "day" | "week" | "now"; | ||
| deleteTask?: () => void; | ||
| } | ||
|
|
||
| export interface DNDChildProps | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to packages/core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to
packages/core/src/__tests__/helpers/task.factory.tsalongside other factory utilities. (commit 68a730a)