rework issue system

This commit is contained in:
Matthias Hochmeister
2026-03-24 15:30:24 +01:00
parent 65994286b2
commit d8d2730547
9 changed files with 316 additions and 186 deletions

View File

@@ -653,7 +653,7 @@ class VehicleService {
async getStatusHistory(fahrzeugId: string) {
try {
const result = await pool.query(
`SELECT h.*, u.display_name AS geaendert_von_name
`SELECT h.*, COALESCE(u.name, u.preferred_username, u.email) AS geaendert_von_name
FROM fahrzeug_status_historie h
LEFT JOIN users u ON u.id = h.geaendert_von
WHERE h.fahrzeug_id = $1