feat(scanner): expose assigned scan categories

This commit is contained in:
2026-09-08 10:01:18 -03:00
parent 0c49bae752
commit a885a2fc0e
3 changed files with 75 additions and 0 deletions

View File

@@ -24,6 +24,11 @@ class UserResource extends JsonResource
'telefono' => $this->telefono,
'rol_codigo' => $this->rol_codigo,
'tenant_codigo' => $this->tenant_codigo,
'categories' => $this->whenLoaded('scanCategories', fn () => $this->scanCategories
->map(fn ($category) => [
'id' => $category->id,
'nombre' => $category->nombre,
])->values()),
];
}
}