From 5f5b80acae8250007bf8a1983fdb1c8b84e689c4 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 4 Sep 2020 10:02:04 -0700 Subject: [PATCH] Added maintained and reassignable to license listing --- app/Http/Transformers/LicensesTransformer.php | 1 + app/Presenters/LicensePresenter.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/app/Http/Transformers/LicensesTransformer.php b/app/Http/Transformers/LicensesTransformer.php index 344213f939..dfce3d42b4 100644 --- a/app/Http/Transformers/LicensesTransformer.php +++ b/app/Http/Transformers/LicensesTransformer.php @@ -36,6 +36,7 @@ class LicensesTransformer 'free_seats_count' => (int) $license->free_seats_count, 'license_name' => e($license->license_name), 'license_email' => e($license->license_email), + 'reassignable' => ($license->reassignable == 1) ? true : false, 'maintained' => ($license->maintained == 1) ? true : false, 'supplier' => ($license->supplier) ? ['id' => (int) $license->supplier->id,'name'=> e($license->supplier->name)] : null, 'category' => ($license->category) ? ['id' => (int) $license->category->id,'name'=> e($license->category->name)] : null, diff --git a/app/Presenters/LicensePresenter.php b/app/Presenters/LicensePresenter.php index 32053dd79c..520b27e13f 100644 --- a/app/Presenters/LicensePresenter.php +++ b/app/Presenters/LicensePresenter.php @@ -98,6 +98,21 @@ class LicensePresenter extends Presenter "title" => trans('general.purchase_date'), 'formatter' => 'dateDisplayFormatter' ], [ + "field" => "maintained", + "searchable" => false, + "sortable" => true, + "visible" => false, + "title" => trans('admin/licenses/form.maintained'), + "formatter" => "trueFalseFormatter" + ], [ + "field" => "reassignable", + "searchable" => false, + "sortable" => true, + "visible" => false, + "title" => trans('admin/licenses/form.reassignable'), + "formatter" => "trueFalseFormatter" + ], + [ "field" => "purchase_cost", "searchable" => true, "sortable" => true,