fix logic and tests, update docker CI file

This commit is contained in:
root
2026-03-09 15:58:44 -04:00
parent 1cb3573d4b
commit 79e44fe037
188 changed files with 1776 additions and 524 deletions
@@ -69,16 +69,20 @@ class IncidentLookupService
}
$rows = DB::table('users')
->select('id, firstname, lastname')
->select('id', 'firstname', 'lastname')
->whereIn('id', $userIds)
->get()
->map(fn ($row) => (array) $row)
->map(fn ($row) => $row instanceof \Illuminate\Contracts\Support\Arrayable ? $row->toArray() : (array) $row)
->all();
$map = [];
foreach ($rows as $row) {
$id = $row['id'] ?? $row['user_id'] ?? null;
if ($id === null) {
continue;
}
$name = trim((string) ($row['firstname'] ?? '') . ' ' . (string) ($row['lastname'] ?? ''));
$map[(int) $row['id']] = $name !== '' ? $name : ('User #' . $row['id']);
$map[(int) $id] = $name !== '' ? $name : ('User #' . $id);
}
return $map;