--- // Sortable on a kanban board, drawn in the middle of a drag. The card being // moved has left the Upcoming column and shows twice, as SortableJS renders it: // a dashed slot in In Progress where it will land, and the copy that follows the // pointer, lifted with a shadow and an outline. Both carry the real state classes // (`.sortable-ghost`, `.sortable-drag`), so the picture shows the shipped styles. // The fake cursor rests on the floating card. import ScreenshotLayout from '../layouts/ScreenshotLayout.astro' import Avatar from '@ui/Avatar.astro' import Card from '@ui/Card.astro' import CardBody from '@ui/CardBody.astro' import Signal from '@ui/Signal.astro' import { personById } from '@shared/lib/people' import tasks from '@data/tasks.json' interface Task { name: string assigned_to: number priority: string } interface Column { name: string tasks: Task[] } const [upcoming, progress, completed] = tasks.columns as Column[] as [Column, Column, Column] const priorities: Record = { High: { value: 3, color: 'red' }, Medium: { value: 2, color: 'orange' }, Low: { value: 1, color: 'blue' }, } const moving = upcoming.tasks[2]! const columns = [ { name: upcoming.name, cards: [upcoming.tasks[0]!, upcoming.tasks[1]!] }, { name: progress.name, cards: [progress.tasks[0]!, moving, progress.tasks[1]!] }, { name: completed.name, cards: [completed.tasks[0]!, completed.tasks[1]!, completed.tasks[2]!] }, ] ---
{ columns.map((column) => (

{column.name}

{column.cards.map((task) => (
{task.name}
{task.priority}
))}
)) }
{moving.name}
{moving.priority}