mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Merge pull request #9889 from ncareau/api-licenses
Add licenses api parameters and fix a missing variable in license view.
This commit is contained in:
commit
645529ba78
|
@ -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'));
|
||||
}
|
||||
|
|
|
@ -338,6 +338,17 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<strong>
|
||||
{{ trans('admin/licenses/form.maintained') }}
|
||||
</strong>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ $license->maintained ? 'Yes' : 'No' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (($license->seats) && ($license->seats) > 0)
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
|
|
Loading…
Reference in a new issue