Add email in assigned_to on asset transformer

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-12-09 16:07:17 -08:00
parent 1017148bad
commit 4ac09ff4e4

View file

@ -185,6 +185,7 @@ class AssetsTransformer
'name' => e($asset->assigned->getFullNameAttribute()),
'first_name'=> e($asset->assigned->first_name),
'last_name'=> ($asset->assigned->last_name) ? e($asset->assigned->last_name) : null,
'email'=> ($asset->assigned->email) ? e($asset->assigned->email) : null,
'employee_number' => ($asset->assigned->employee_num) ? e($asset->assigned->employee_num) : null,
'type' => 'user',
] : null;