Fixed Projects/Proposals/Time
This commit is contained in:
@@ -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],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user