mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 23:54:12 -08:00
Merge branch 'develop'
# Conflicts: # upgrade.php
This commit is contained in:
commit
c61887da21
|
@ -182,7 +182,6 @@ class AssetModelsController extends Controller
|
|||
*/
|
||||
public function selectlist(Request $request)
|
||||
{
|
||||
$this->authorize('view', AssetModel::class);
|
||||
|
||||
$assetmodels = AssetModel::select([
|
||||
'models.id',
|
||||
|
|
|
@ -153,7 +153,6 @@ class CompaniesController extends Controller
|
|||
*/
|
||||
public function selectlist(Request $request)
|
||||
{
|
||||
$this->authorize('view', Company::class);
|
||||
|
||||
$companies = Company::select([
|
||||
'companies.id',
|
||||
|
|
|
@ -122,7 +122,6 @@ class DepartmentsController extends Controller
|
|||
*/
|
||||
public function selectlist(Request $request)
|
||||
{
|
||||
$this->authorize('view', Department::class);
|
||||
|
||||
$departments = Department::select([
|
||||
'id',
|
||||
|
|
|
@ -132,7 +132,6 @@ class ManufacturersController extends Controller
|
|||
*/
|
||||
public function selectlist(Request $request)
|
||||
{
|
||||
$this->authorize('view', Manufacturers::class);
|
||||
|
||||
$manufacturers = Manufacturer::select([
|
||||
'id',
|
||||
|
|
|
@ -146,7 +146,6 @@ class SuppliersController extends Controller
|
|||
*/
|
||||
public function selectlist(Request $request)
|
||||
{
|
||||
$this->authorize('view', Supplier::class);
|
||||
|
||||
$suppliers = Supplier::select([
|
||||
'id',
|
||||
|
|
|
@ -748,6 +748,7 @@ class SettingsController extends Controller
|
|||
$setting->labels_fontsize = $request->input('labels_fontsize');
|
||||
$setting->labels_pagewidth = $request->input('labels_pagewidth');
|
||||
$setting->labels_pageheight = $request->input('labels_pageheight');
|
||||
$setting->labels_display_company_name = $request->input('labels_display_company_name', '0');
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ class Asset extends Depreciable
|
|||
*/
|
||||
protected $injectUniqueIdentifier = true;
|
||||
|
||||
// We set these as protected dates so that they will be easily accessible via Carbon
|
||||
protected $dates = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
|
@ -138,7 +139,7 @@ class Asset extends Depreciable
|
|||
* @param User $user
|
||||
* @param User $admin
|
||||
* @param Carbon $checkout_at
|
||||
* @param null $expected_checkin
|
||||
* @param Carbon $expected_checkin
|
||||
* @param string $note
|
||||
* @param null $name
|
||||
* @return bool
|
||||
|
@ -710,7 +711,7 @@ class Asset extends Depreciable
|
|||
*/
|
||||
public function scopeInModelList($query, array $modelIdListing)
|
||||
{
|
||||
return $query->whereIn('model_id', $modelIdListing);
|
||||
return $query->whereIn('assets.model_id', $modelIdListing);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -93,7 +93,7 @@ class CheckoutNotification extends Notification
|
|||
'first_name' => $target->present()->fullName(),
|
||||
'item_name' => $item->present()->name(),
|
||||
'checkout_date' => $item->last_checkout,
|
||||
'expected_checkin' => $item->expected_checkin,
|
||||
'expected_checkin' => $item->expected_checkin->format('Y-m-d'),
|
||||
'item_tag' => $item->asset_tag,
|
||||
'note' => $this->params['note'],
|
||||
'item_serial' => $item->serial,
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class LabelsDisplayCompanyName extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->boolean('labels_display_company_name')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->dropColumn(
|
||||
'labels_display_company_name'
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
|
@ -112,28 +112,32 @@
|
|||
@endif
|
||||
|
||||
<div class="qr_text">
|
||||
<div class="pull-left">
|
||||
@if ($settings->qr_text!='')
|
||||
<div class="pull-left">
|
||||
<strong>{{ $settings->qr_text }}</strong>
|
||||
<br>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@if (($settings->labels_display_company_name=='1') && ($asset->company))
|
||||
<div class="pull-left">
|
||||
C: {{ $asset->company->name }}
|
||||
</div>
|
||||
@endif
|
||||
@if (($settings->labels_display_name=='1') && ($asset->name!=''))
|
||||
<div class="pull-left">
|
||||
N: {{ $asset->name }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
@endif
|
||||
@if (($settings->labels_display_tag=='1') && ($asset->asset_tag!=''))
|
||||
T: {{ $asset->asset_tag }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
@if (($settings->labels_display_serial=='1') && ($asset->serial!=''))
|
||||
S: {{ $asset->serial }}
|
||||
@endif
|
||||
T: {{ $asset->asset_tag }}
|
||||
</div>
|
||||
|
||||
@endif
|
||||
@if (($settings->labels_display_serial=='1') && ($asset->serial!=''))
|
||||
<div class="pull-left">
|
||||
S: {{ $asset->serial }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ((($settings->alt_barcode_enabled=='1') && $settings->alt_barcode!=''))
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<!-- Purchase Cost -->
|
||||
<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
|
||||
<label for="purchase_cost" class="col-md-3 control-label">{{ trans('general.purchase_cost') }} </label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<label for="purchase_cost" class="col-md-3 control-label">{{ trans('general.purchase_cost') }}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group col-md-3" style="padding-left: 0px;">
|
||||
<input class="form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($item->purchase_cost)) }}" />
|
||||
<span class="input-group-addon">
|
||||
@if (isset($currency_type))
|
||||
{{ $currency_type }}
|
||||
|
@ -10,8 +11,10 @@
|
|||
{{ $snipeSettings->default_currency }}
|
||||
@endif
|
||||
</span>
|
||||
<input class="col-md-2 form-control" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', \App\Helpers\Helper::formatCurrencyOutput($item->purchase_cost)) }}" />
|
||||
</div>
|
||||
<div class="col-md-9" style="padding-left: 0px;">
|
||||
{!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<label for="purchase_date" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
|
||||
<div class="input-group col-md-3">
|
||||
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $item->purchase_date) }}">
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $item->purchase_date->format('Y-m-d')) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
{{ Form::label('labels_per_page', trans('admin/settings/general.labels_per_page')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::text('labels_per_page', Input::old('labels_per_page', $setting->labels_per_page), array('class' => 'form-control','style' => 'width: 100px;')) }}
|
||||
{{ Form::text('labels_per_page', Input::old('labels_per_page', $setting->labels_per_page), ['class' => 'form-control','style' => 'width: 100px;']) }}
|
||||
{!! $errors->first('labels_per_page', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -56,7 +56,7 @@
|
|||
</div>
|
||||
<div class="col-md-2 form-group">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_fontsize', Input::old('labels_fontsize', $setting->labels_fontsize), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_fontsize', Input::old('labels_fontsize', $setting->labels_fontsize), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.text_pt') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -71,13 +71,13 @@
|
|||
</div>
|
||||
<div class="col-md-3 form-group">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_width', Input::old('labels_width', $setting->labels_width), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_width', Input::old('labels_width', $setting->labels_width), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.width_w') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 form-group" style="margin-left: 10px">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_height', Input::old('labels_height', $setting->labels_height), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_height', Input::old('labels_height', $setting->labels_height), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.height_h') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -93,13 +93,13 @@
|
|||
</div>
|
||||
<div class="col-md-3 form-group">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_display_sgutter', Input::old('labels_display_sgutter', $setting->labels_display_sgutter), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_display_sgutter', Input::old('labels_display_sgutter', $setting->labels_display_sgutter), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.horizontal') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 form-group" style="margin-left: 10px">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_display_bgutter', Input::old('labels_display_bgutter', $setting->labels_display_bgutter), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_display_bgutter', Input::old('labels_display_bgutter', $setting->labels_display_bgutter), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.vertical') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -115,21 +115,21 @@
|
|||
</div>
|
||||
<div class="col-md-3 form-group">
|
||||
<div class="input-group" style="margin-bottom: 15px;">
|
||||
{{ Form::text('labels_pmargin_top', Input::old('labels_pmargin_top', $setting->labels_pmargin_top), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_pmargin_top', Input::old('labels_pmargin_top', $setting->labels_pmargin_top), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.top') }}</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_pmargin_right', Input::old('labels_pmargin_right', $setting->labels_pmargin_right), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_pmargin_right', Input::old('labels_pmargin_right', $setting->labels_pmargin_right), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.right') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 form-group" style="margin-left: 10px; ">
|
||||
<div class="input-group" style="margin-bottom: 15px;">
|
||||
{{ Form::text('labels_pmargin_bottom', Input::old('labels_pmargin_bottom', $setting->labels_pmargin_bottom), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_pmargin_bottom', Input::old('labels_pmargin_bottom', $setting->labels_pmargin_bottom), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.bottom') }}</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_pmargin_left', Input::old('labels_pmargin_left', $setting->labels_pmargin_left), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_pmargin_left', Input::old('labels_pmargin_left', $setting->labels_pmargin_left), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.left') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -145,13 +145,13 @@
|
|||
</div>
|
||||
<div class="col-md-3 form-group">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_pagewidth', Input::old('labels_pagewidth', $setting->labels_pagewidth), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_pagewidth', Input::old('labels_pagewidth', $setting->labels_pagewidth), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.width_w') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 form-group" style="margin-left: 10px">
|
||||
<div class="input-group">
|
||||
{{ Form::text('labels_pageheight', Input::old('labels_pageheight', $setting->labels_pageheight), array('class' => 'form-control')) }}
|
||||
{{ Form::text('labels_pageheight', Input::old('labels_pageheight', $setting->labels_pageheight), ['class' => 'form-control']) }}
|
||||
<div class="input-group-addon">{{ trans('admin/settings/general.height_h') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -168,17 +168,21 @@
|
|||
<div class="col-md-9">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{{ Form::checkbox('labels_display_name', '1', Input::old('labels_display_name', $setting->labels_display_name),array('class' => 'minimal')) }}
|
||||
{{ Form::checkbox('labels_display_name', '1', Input::old('labels_display_name', $setting->labels_display_name),['class' => 'minimal']) }}
|
||||
{{ trans('admin/hardware/form.name') }}
|
||||
</label>
|
||||
<label>
|
||||
{{ Form::checkbox('labels_display_serial', '1', Input::old('labels_display_serial', $setting->labels_display_serial),array('class' => 'minimal')) }}
|
||||
{{ Form::checkbox('labels_display_serial', '1', Input::old('labels_display_serial', $setting->labels_display_serial),['class' => 'minimal']) }}
|
||||
{{ trans('admin/hardware/form.serial') }}
|
||||
</label>
|
||||
<label>
|
||||
{{ Form::checkbox('labels_display_tag', '1', Input::old('labels_display_tag', $setting->labels_display_tag),array('class' => 'minimal')) }}
|
||||
{{ Form::checkbox('labels_display_tag', '1', Input::old('labels_display_tag', $setting->labels_display_tag),['class' => 'minimal']) }}
|
||||
{{ trans('admin/hardware/form.tag') }}
|
||||
</label>
|
||||
<label>
|
||||
{{ Form::checkbox('labels_display_company_name', '1', Input::old('labels_display_company_name', $setting->labels_display_company_name),['class' => 'minimal']) }}
|
||||
{{ trans('admin/companies/table.name') }}
|
||||
</label>
|
||||
</div> <!--/.CHECKBOX-->
|
||||
</div> <!--/.col-md-9-->
|
||||
</div> <!--/.form-group-->
|
||||
|
|
Loading…
Reference in a new issue