Files
panel/src/app/api/all-project-tasks/route.js
Chop 35569846bc feat: Implement project search functionality and task management features
- Added search functionality to the Project List page, allowing users to filter projects by name, WP, plot, or investment number.
- Created a new Project Tasks page to manage tasks across all projects, including filtering by status and priority.
- Implemented task status updates and deletion functionality.
- Added a new Task Template Edit page for modifying existing task templates.
- Enhanced Task Template Form to include a description field and loading state during submission.
- Updated UI components for better user experience, including badges for task status and priority.
- Introduced new database queries for managing contracts and projects, including fetching tasks related to projects.
- Added migrations to the database for new columns and improved data handling.
2025-06-02 23:21:04 +02:00

16 lines
390 B
JavaScript

import { getAllProjectTasks } from "@/lib/queries/tasks";
import { NextResponse } from "next/server";
// GET: Get all project tasks across all projects
export async function GET() {
try {
const tasks = getAllProjectTasks();
return NextResponse.json(tasks);
} catch (error) {
return NextResponse.json(
{ error: "Failed to fetch all project tasks" },
{ status: 500 }
);
}
}