Diff
checker
Testo
Testo
Immagini
Documenti
Excel
Cartelle
Legal
Enterprise
Applicazione per desktop
Prezzi
Accedi
Scarica Diffchecker Desktop
Confronta il testo
Trova la differenza tra due file di testo
Strumenti
Cronologia
Editor live
Nascondi spazi bianchi
Comprimi invariate
Senza a capo
Layout
Diviso
Unificato
Livello di dettaglio
Intelligente
Parola
Carattere
Stili testo
Modifica aspetto
Evidenziazione sintassi
Scegli sintassi
Ignora
Trasforma testo
Vai alla prima modifica
Modifica input
Diffchecker Desktop
Il modo più sicuro per usare Diffchecker. Ottieni l'app Diffchecker Desktop: i tuoi diff non lasciano mai il tuo computer!
Ottieni Desktop
Fresh Redux Snapshot Access - 2
Creato
3 mesi fa
Il diff non scade mai
Eliminare
Esporta
Condividere
Spiegare
11 rimozioni
Linee
Totale
Rimosso
Caratteri
Totale
Rimosso
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
35 linee
Copia tutti
8 aggiunte
Linee
Totale
Aggiunto
Caratteri
Totale
Aggiunto
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
33 linee
Copia tutti
export function serializeTask(t: GanttTask): SerializedTask {
export function serializeTask(t: GanttTask): SerializedTask {
Copia
Copiato
Copia
Copiato
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,
};
};
}
}
Copia
Copiato
Copia
Copiato
/** 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,
Copia
Copiato
Copia
Copiato
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;
Copia
Copiato
Copia
Copiato
}
Diff salvati
Testo originale
Apri 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; }
Testo modificato
Apri 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;
Trovare la differenza