Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

687 B
Raw Blame
import type { ColumnDetail } from "../api/columns.js";

export type ColumnJson = {
  readonly id: string;
  readonly projectId: string;
  readonly name: string;
  readonly slug: string;
  readonly position: number;
  readonly icon: string | null;
  readonly color: string | null;
  readonly isFinal: boolean;
  readonly taskCount: number | null;
};

export function toColumnJson(
  column: ColumnDetail,
  taskCount: number | null,
): ColumnJson {
  return {
    id: column.id,
    projectId: column.projectId,
    name: column.name,
    slug: column.slug,
    position: column.position,
    icon: column.icon,
    color: column.color,
    isFinal: column.isFinal,
    taskCount,
  };
}