diff --git a/src/app/project/board/BoardColumn.tsx b/src/app/project/board/BoardColumn.tsx deleted file mode 100644 index aa32d39..0000000 --- a/src/app/project/board/BoardColumn.tsx +++ /dev/null @@ -1,96 +0,0 @@ -import { Plus, X, User } from "lucide-react"; -import { BOARD_PAGE } from "@/css/app/board-styles"; -import type { CardResponse } from "@/client/model"; - -interface BoardColumnProps { - column: { - column: { id: string; name: string }; - cards: CardResponse[]; - }; - allColumns: { column: { id: string; name: string } }[]; - onAddCard: (columnId: string) => void; - onDeleteColumn: (columnId: string) => void; - onCardClick: (card: CardResponse) => void; - onMoveCard: (cardId: string, targetColumnId: string) => void; -} - -export function BoardColumn({ - column, - allColumns, - onAddCard, - onDeleteColumn, - onCardClick, - onMoveCard, -}: BoardColumnProps) { - return ( -
-
-
- {column.column.name} - {column.cards.length} -
-
- - -
-
- -
- {column.cards.map((card) => ( -
onCardClick(card)} - > -

{card.title}

- {card.description && ( -

- {card.description} -

- )} -
-
- - Assignee -
-
- {allColumns.map((targetCol) => - targetCol.column.id !== column.column.id ? ( - - ) : null, - )} -
-
-
- ))} - -
-
- ); -} diff --git a/src/app/project/board/BoardHeader.tsx b/src/app/project/board/BoardHeader.tsx deleted file mode 100644 index 23e734c..0000000 --- a/src/app/project/board/BoardHeader.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { useNavigate } from "react-router-dom" -import { Plus, Trash2, ArrowLeft } from "lucide-react" -import { Button } from "@/components/ui/button" - -interface BoardHeaderProps { - projectName: string - boardName: string - boardDescription?: string - onDeleteBoard: () => void - onAddColumn: () => void -} - -export function BoardHeader({ - projectName, - boardName, - boardDescription, - onDeleteBoard, - onAddColumn, -}: BoardHeaderProps) { - const navigate = useNavigate() - - return ( -
-
-
-
- -
-
-

- {boardName} -

- - /{projectName} - -
- {boardDescription && ( -

- {boardDescription} -

- )} -
-
- - -
-
-
- ) -} diff --git a/src/app/project/board/BoardListView.tsx b/src/app/project/board/BoardListView.tsx deleted file mode 100644 index 0f6477f..0000000 --- a/src/app/project/board/BoardListView.tsx +++ /dev/null @@ -1,168 +0,0 @@ -import { useState } from "react"; -import { useNavigate } from "react-router-dom"; -import { useBoardsQuery } from "@/hooks/useBoardsQuery"; -import { useBoardOperations } from "@/hooks/useBoardOperations"; -import { LoadingState } from "@/components/ui/LoadingState"; -import { EmptyState } from "@/components/ui/EmptyState"; -import { - LayoutGrid, - Plus, - X, - Trash2, - Clock, -} from "lucide-react"; -import { BOARD_PAGE } from "@/css/app/board-styles"; - -interface BoardListViewProps { - projectName: string; -} - -export function BoardListView({ projectName }: BoardListViewProps) { - const navigate = useNavigate(); - const { data: boards = [], isLoading } = useBoardsQuery(projectName); - const ops = useBoardOperations(projectName); - const [isCreateBoardOpen, setIsCreateBoardOpen] = useState(false); - const [newBoard, setNewBoard] = useState({ name: "", description: "" }); - - const handleCreateBoard = async () => { - if (!newBoard.name.trim()) return; - await ops.createBoard.mutateAsync({ - name: newBoard.name.trim(), - description: newBoard.description.trim() || undefined, - }); - setIsCreateBoardOpen(false); - setNewBoard({ name: "", description: "" }); - }; - - const handleDeleteBoard = async (id: string) => { - if (confirm("Are you sure you want to delete this board?")) { - await ops.deleteBoard.mutateAsync(id); - } - }; - - if (isLoading) return ; - - return ( - <> -
-
-
-

Boards

-

- Organize and track your project tasks -

-
- -
- - {boards.length === 0 ? ( - } - title="No boards yet" - description="Create a Kanban board to start managing your workflow." - /> - ) : ( -
- {boards.map((board) => ( -
navigate(`/${projectName}/board/${board.id}`)} - className={BOARD_PAGE.boardCard} - > -
- -
-

{board.name}

-

- {board.description || "No description provided."} -

-
- - - Created {new Date(board.created_at).toLocaleDateString()} - - -
-
- ))} -
- )} -
- - {/* Create Board Modal */} - {isCreateBoardOpen && ( -
-
-
-

New Board

- -
-
-
- - - setNewBoard((b) => ({ ...b, name: e.target.value })) - } - /> -
-
- -