diff --git a/app/Http/Controllers/Api/LicensesController.php b/app/Http/Controllers/Api/LicensesController.php index b8ea3b03e3..ad6e75ab77 100644 --- a/app/Http/Controllers/Api/LicensesController.php +++ b/app/Http/Controllers/Api/LicensesController.php @@ -76,6 +76,18 @@ class LicensesController extends Controller $licenses->where('supplier_id', '=', $request->input('supplier_id')); } + if (($request->filled('maintained')) && ($request->input('maintained')=='true')) { + $licenses->where('maintained','=',1); + } elseif (($request->filled('maintained')) && ($request->input('maintained')=='false')) { + $licenses->where('maintained','=',0); + } + + if (($request->filled('expires')) && ($request->input('expires')=='true')) { + $licenses->whereNotNull('expiration_date'); + } elseif (($request->filled('expires')) && ($request->input('expires')=='false')) { + $licenses->whereNull('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 a29b20f043..f09d600198 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -338,6 +338,17 @@ @endif +
+
+ + {{ trans('admin/licenses/form.maintained') }} + +
+
+ {{ $license->maintained ? 'Yes' : 'No' }} +
+
+ @if (($license->seats) && ($license->seats) > 0)