Change user_id to created_by

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2024-09-17 22:16:41 +01:00
parent 6c996b7759
commit 1582d81e5b
115 changed files with 572 additions and 270 deletions
@@ -47,6 +47,10 @@ class ComponentsTransformer
'name' => e($component->company->name),
] : null,
'notes' => ($component->notes) ? Helper::parseEscapedMarkedownInline($component->notes) : null,
'created_by' => ($component->adminuser) ? [
'id' => (int) $component->adminuser->id,
'name'=> e($component->adminuser->present()->fullName()),
] : null,
'created_at' => Helper::getFormattedDateObject($component->created_at, 'datetime'),
'updated_at' => Helper::getFormattedDateObject($component->updated_at, 'datetime'),
'user_can_checkout' => ($component->numRemaining() > 0) ? 1 : 0,