Added byod to API transformer

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-01-18 13:04:02 -08:00
parent b80d52a9c3
commit f626413502

View file

@ -35,6 +35,8 @@ class AssetsTransformer
'id' => (int) $asset->model->id, 'id' => (int) $asset->model->id,
'name'=> e($asset->model->name), 'name'=> e($asset->model->name),
] : null, ] : null,
'byod' => ($asset->byod ? true : false),
'model_number' => (($asset->model) && ($asset->model->model_number)) ? e($asset->model->model_number) : null, 'model_number' => (($asset->model) && ($asset->model->model_number)) ? e($asset->model->model_number) : null,
'eol' => ($asset->purchase_date != '') ? Helper::getFormattedDateObject($asset->present()->eol_date(), 'date') : null, 'eol' => ($asset->purchase_date != '') ? Helper::getFormattedDateObject($asset->present()->eol_date(), 'date') : null,
'status_label' => ($asset->assetstatus) ? [ 'status_label' => ($asset->assetstatus) ? [