mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-13 06:47:46 -08:00
Merge branch 'integrations/rc5-4-2020-08-31-dev-into-master' into develop
This commit is contained in:
commit
97743160ef
|
@ -36,6 +36,7 @@ class LicensesTransformer
|
||||||
'free_seats_count' => (int) $license->free_seats_count,
|
'free_seats_count' => (int) $license->free_seats_count,
|
||||||
'license_name' => e($license->license_name),
|
'license_name' => e($license->license_name),
|
||||||
'license_email' => e($license->license_email),
|
'license_email' => e($license->license_email),
|
||||||
|
'reassignable' => ($license->reassignable == 1) ? true : false,
|
||||||
'maintained' => ($license->maintained == 1) ? true : false,
|
'maintained' => ($license->maintained == 1) ? true : false,
|
||||||
'supplier' => ($license->supplier) ? ['id' => (int) $license->supplier->id,'name'=> e($license->supplier->name)] : null,
|
'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,
|
'category' => ($license->category) ? ['id' => (int) $license->category->id,'name'=> e($license->category->name)] : null,
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace App\Models;
|
||||||
|
|
||||||
use App\Notifications\AuditNotification;
|
use App\Notifications\AuditNotification;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use App\Models\Setting;
|
||||||
|
|
||||||
trait Loggable
|
trait Loggable
|
||||||
{
|
{
|
||||||
|
@ -90,6 +91,7 @@ trait Loggable
|
||||||
*/
|
*/
|
||||||
public function logCheckin($target, $note, $action_date = null)
|
public function logCheckin($target, $note, $action_date = null)
|
||||||
{
|
{
|
||||||
|
$settings = Setting::getSettings();
|
||||||
$log = new Actionlog;
|
$log = new Actionlog;
|
||||||
$log->target_type = get_class($target);
|
$log->target_type = get_class($target);
|
||||||
$log->target_id = $target->id;
|
$log->target_id = $target->id;
|
||||||
|
|
|
@ -98,6 +98,21 @@ class LicensePresenter extends Presenter
|
||||||
"title" => trans('general.purchase_date'),
|
"title" => trans('general.purchase_date'),
|
||||||
'formatter' => 'dateDisplayFormatter'
|
'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",
|
"field" => "purchase_cost",
|
||||||
"searchable" => true,
|
"searchable" => true,
|
||||||
"sortable" => true,
|
"sortable" => true,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||||
|
|
||||||
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
|
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
|
||||||
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" data-placeholder="{{ trans('general.select_category') }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id" aria-label="{{ $fieldname }}" {!! (\App\Helpers\Helper::checkIfRequired($item, $fieldname)) ? ' data-validation="required" required' : '' !!}>
|
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" data-placeholder="{{ trans('general.select_category') }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (\App\Helpers\Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}>
|
||||||
@if ($category_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
@if ($category_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||||
<option value="{{ $category_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
<option value="{{ $category_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||||
{{ (\App\Models\Category::find($category_id)) ? \App\Models\Category::find($category_id)->name : '' }}
|
{{ (\App\Models\Category::find($category_id)) ? \App\Models\Category::find($category_id)->name : '' }}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||||
<div class="col-md-6{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
|
<div class="col-md-6{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
|
||||||
<select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('general.select_location') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select" aria-label="{{ $fieldname }}" {!! (\App\Helpers\Helper::checkIfRequired($item, $fieldname)) ? ' data-validation="required" required' : '' !!}>
|
<select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('general.select_location') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (\App\Helpers\Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}>
|
||||||
@if ($location_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
@if ($location_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||||
<option value="{{ $location_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
<option value="{{ $location_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||||
{{ (\App\Models\Location::find($location_id)) ? \App\Models\Location::find($location_id)->name : '' }}
|
{{ (\App\Models\Location::find($location_id)) ? \App\Models\Location::find($location_id)->name : '' }}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||||
|
|
||||||
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
|
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
|
||||||
<select class="js-data-ajax" data-endpoint="manufacturers" data-placeholder="{{ trans('general.select_manufacturer') }}" name="{{ $fieldname }}" style="width: 100%" id="manufacturer_select_id" aria-label="{{ $fieldname }}" {!! (\App\Helpers\Helper::checkIfRequired($item, $fieldname)) ? ' data-validation="required" required' : '' !!}>
|
<select class="js-data-ajax" data-endpoint="manufacturers" data-placeholder="{{ trans('general.select_manufacturer') }}" name="{{ $fieldname }}" style="width: 100%" id="manufacturer_select_id" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (\App\Helpers\Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}>
|
||||||
@if ($manufacturer_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
@if ($manufacturer_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||||
<option value="{{ $manufacturer_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
<option value="{{ $manufacturer_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||||
{{ (\App\Models\Manufacturer::find($manufacturer_id)) ? \App\Models\Manufacturer::find($manufacturer_id)->name : '' }}
|
{{ (\App\Models\Manufacturer::find($manufacturer_id)) ? \App\Models\Manufacturer::find($manufacturer_id)->name : '' }}
|
||||||
|
|
Loading…
Reference in a new issue