1ca019fa48
Phase 1 MVP implementation: - PostgreSQL database schema for tasks, agents, executions, time tracking - Backend API: task CRUD, agent management, automatic time tracking - Frontend: Kanban board with drag-and-drop (Parking Lot → In Progress → Done) - Task modal for creating/editing tasks with tags, priority, assignee - 3 core agents seeded: PM, CTO, COO - Agent approval workflow: CxO level requires approval, others auto-execute - Automatic time tracking: starts on in_progress, stops on done - RBAC integration: OPC page accessible to admin/member roles Features: - Drag-and-drop tasks between columns - Assign tasks to humans or AI agents - Priority badges (low, medium, high, urgent) - Tags and due dates - Task history tracking - Time entry tracking with automatic timer - Agent execution records with approval workflow Next steps: - Initialize OPC database on NAS - Implement agent executor service - Add WebSocket for real-time updates - Add email notifications - Add PDF invoice generation
41 lines
1.0 KiB
Svelte
41 lines
1.0 KiB
Svelte
<script>
|
|
import KanbanColumn from "./KanbanColumn.svelte";
|
|
import { moveTask } from "../../lib/opc-api.js";
|
|
|
|
let { tasks = [], agents = [], onEdit, onDelete, onAssign, onTaskMoved } = $props();
|
|
|
|
const columns = [
|
|
{ id: "parking_lot", title: "Parking Lot", status: "parking_lot" },
|
|
{ id: "in_progress", title: "In Progress", status: "in_progress" },
|
|
{ id: "done", title: "Done", status: "done" }
|
|
];
|
|
|
|
function getTasksByStatus(status) {
|
|
return tasks.filter(t => t.status === status);
|
|
}
|
|
|
|
async function handleDrop(taskId, newStatus) {
|
|
try {
|
|
await moveTask(taskId, newStatus);
|
|
onTaskMoved?.(taskId, newStatus);
|
|
} catch (e) {
|
|
alert("Failed to move task: " + e.message);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 h-full">
|
|
{#each columns as column}
|
|
<KanbanColumn
|
|
title={column.title}
|
|
status={column.status}
|
|
tasks={getTasksByStatus(column.status)}
|
|
{agents}
|
|
{onEdit}
|
|
{onDelete}
|
|
{onAssign}
|
|
onDrop={handleDrop}
|
|
/>
|
|
{/each}
|
|
</div>
|