Diff
checker
Texto
Texto
Imágenes
Documentos
Excel
Carpetas
Legal
Enterprise
Aplicación de escritorio
Precios
Iniciar sesión
Descargar Diffchecker Desktop
Comparar texto
Encuentra la diferencia entre dos archivos de texto
Herramientas
Historial
Editor live
Ocultar espacios en blanco
Ocultar sin cambios
Sin ajuste de línea
Vista
Dividido
Unificado
Nivel de detalle
Inteligente
Palabra
Letra
Estilos de texto
Cambiar apariencia
Resaltado de sintaxis
Elegir sintaxis
Ignorar
Transformar texto
Ir al primer cambio
Editar entrada
Diffchecker Desktop
La forma más segura de usar Diffchecker. ¡Obtén la app de Diffchecker Desktop: tus diffs nunca salen de tu computadora!
Obtener Desktop
Fresh Redux Snapshot Access - 2
Creado
hace 3 meses
El diff nunca expira
Borrar
Exportar
Compartir
Explicar
11 eliminaciones
Líneas
Total
Eliminado
Caracteres
Total
Eliminado
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
35 líneas
Copiar todo
8 adiciones
Líneas
Total
Añadido
Caracteres
Total
Añadido
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
33 líneas
Copiar todo
export function serializeTask(t: GanttTask): SerializedTask {
export function serializeTask(t: GanttTask): SerializedTask {
Copiar
Copiado
Copiar
Copiado
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,
};
};
}
}
Copiar
Copiado
Copiar
Copiado
/** 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,
Copiar
Copiado
Copiar
Copiado
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;
Copiar
Copiado
Copiar
Copiado
}
Diferencias guardadas
Texto original
Abrir archivo
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; }
Texto modificado
Abrir archivo
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;
Encontrar la diferencia