Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide whitespace changes
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Text styles
Change appearance
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Fresh Redux Snapshot Access - 2
Created
3 months ago
Diff never expires
Clear
Export
Share
Explain
11 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
35 lines
Copy
8 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
33 lines
Copy
export function serializeTask(t: GanttTask): SerializedTask {
export function serializeTask(t: GanttTask): SerializedTask {
Copy
Copied
Copy
Copied
const startDate =
t.start_date instanceof Date
const startDate =
dateToISO(
t.start_date
as Date |
string
|
null
| undefined);
? t.start_date.toISOString()
: typeof
t.start_date
=== "
string
"
? t.start_date
:
null
;
return {
return {
id: t.id,
id: t.id,
text: t.text,
text: t.text,
start_date: startDate,
start_date: startDate,
duration: t.duration ?? 1,
duration: t.duration ?? 1,
progress: Number(t.progress) || 0,
progress: Number(t.progress) || 0,
parent: t.parent ?? 0,
parent: t.parent ?? 0,
type: t.type ?? "task",
type: t.type ?? "task",
open: t.open,
open: t.open,
sortorder: (t as any).sortorder ?? 0,
sortorder: (t as any).sortorder ?? 0,
assignee_user_id: (t as any).assignee_user_id ?? null,
assignee_user_id: (t as any).assignee_user_id ?? null,
};
};
}
}
Copy
Copied
Copy
Copied
/** Convert a serialized task back to a Gantt Task (with Date objects). */
/** Convert a serialized task back to a Gantt Task (with Date objects). */
export function deserializeTask(s: SerializedTask): GanttTask & { sortorder: number; assignee_user_id?: string | null } {
export function deserializeTask(s: SerializedTask): GanttTask & { sortorder: number; assignee_user_id?: string | null } {
return {
return {
id: s.id,
id: s.id,
text: s.text,
text: s.text,
Copy
Copied
Copy
Copied
start_date:
s.start_date ? new Date
(s.start_date)
: new Date()
,
start_date:
isoToDate
(s.start_date)
,
duration: s.duration,
duration: s.duration,
progress: s.progress,
progress: s.progress,
parent: s.parent,
parent: s.parent,
type: s.type as GanttTask["type"],
type: s.type as GanttTask["type"],
open: s.open,
open: s.open,
sortorder: s.sortorder,
sortorder: s.sortorder,
assignee_user_id: s.assignee_user_id,
assignee_user_id: s.assignee_user_id,
} as any;
} as any;
Copy
Copied
Copy
Copied
}
Saved diffs
Original text
Open file
export function serializeTask(t: GanttTask): SerializedTask { const startDate = t.start_date instanceof Date ? t.start_date.toISOString() : typeof t.start_date === "string" ? t.start_date : null; return { id: t.id, text: t.text, start_date: startDate, duration: t.duration ?? 1, progress: Number(t.progress) || 0, parent: t.parent ?? 0, type: t.type ?? "task", open: t.open, sortorder: (t as any).sortorder ?? 0, assignee_user_id: (t as any).assignee_user_id ?? null, }; } /** Convert a serialized task back to a Gantt Task (with Date objects). */ export function deserializeTask(s: SerializedTask): GanttTask & { sortorder: number; assignee_user_id?: string | null } { return { id: s.id, text: s.text, start_date: s.start_date ? new Date(s.start_date) : new Date(), duration: s.duration, progress: s.progress, parent: s.parent, type: s.type as GanttTask["type"], open: s.open, sortorder: s.sortorder, assignee_user_id: s.assignee_user_id, } as any; }
Changed text
Open file
export function serializeTask(t: GanttTask): SerializedTask { const startDate = dateToISO(t.start_date as Date | string | null | undefined); return { id: t.id, text: t.text, start_date: startDate, duration: t.duration ?? 1, progress: Number(t.progress) || 0, parent: t.parent ?? 0, type: t.type ?? "task", open: t.open, sortorder: (t as any).sortorder ?? 0, assignee_user_id: (t as any).assignee_user_id ?? null, }; } /** Convert a serialized task back to a Gantt Task (with Date objects). */ export function deserializeTask(s: SerializedTask): GanttTask & { sortorder: number; assignee_user_id?: string | null } { return { id: s.id, text: s.text, start_date: isoToDate(s.start_date), duration: s.duration, progress: s.progress, parent: s.parent, type: s.type as GanttTask["type"], open: s.open, sortorder: s.sortorder, assignee_user_id: s.assignee_user_id, } as any;
Find difference