From 976957ddd453db3035b0cf04864694ad886b126f Mon Sep 17 00:00:00 2001 From: NMC Date: Sun, 1 Aug 2021 14:30:16 -0400 Subject: [PATCH] Add Maintained filed in licenses view and api. + Expires in API --- app/Http/Controllers/Api/LicensesController.php | 7 +++++++ resources/views/licenses/view.blade.php | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/app/Http/Controllers/Api/LicensesController.php b/app/Http/Controllers/Api/LicensesController.php index 268248ab77..fc153f0ac4 100644 --- a/app/Http/Controllers/Api/LicensesController.php +++ b/app/Http/Controllers/Api/LicensesController.php @@ -77,6 +77,13 @@ class LicensesController extends Controller $licenses->where('supplier_id','=',$request->input('supplier_id')); } + if (($request->filled('maintained')) && ($request->input('maintained')=='true')) { + $licenses->where('maintained','=',1); + } + + if (($request->filled('expires')) && ($request->input('expires')=='true')) { + $licenses->whereNotNull('expiration_date'); + } if ($request->filled('search')) { $licenses = $licenses->TextSearch($request->input('search')); diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index 96b426d3dd..990e5e90bc 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -285,6 +285,17 @@ @endif +
+
+ + {{ trans('admin/licenses/form.maintained') }} + +
+
+ {{ $license->maintained ? 'Yes' : 'No' }} +
+
+ @if (($license->seats) && ($license->seats) > 0)