Fixed Projects/Proposals/Time

This commit is contained in:
JCBSComputer
2026-07-01 12:08:22 +02:00
parent b75351112e
commit cb1944a9ea
14 changed files with 50 additions and 45 deletions
+6 -5
View File
@@ -11,11 +11,12 @@ export async function GET() {
}
const result = await query(
`SELECT id, name, description, status, start_date, end_date, budget, currency,
created_at, updated_at
FROM projects
WHERE customer_id = $1 AND deleted_at IS NULL
ORDER BY created_at DESC`,
`SELECT p.id, p.name, p.description, p.start_date, p.target_end_date as end_date,
p.budget, p.created_at, p.updated_at, s.name as status_name, s.color as status_color
FROM projects p
LEFT JOIN project_statuses s ON s.id = p.status_id
WHERE p.customer_id = $1 AND p.deleted_at IS NULL
ORDER BY p.created_at DESC`,
[session.customerId],
)