mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fixed #8428 - Added purchase cost column to user tabs
This commit is contained in:
parent
2f435a57c1
commit
0f22cf6807
|
@ -399,28 +399,50 @@
|
||||||
|
|
||||||
<div class="tab-pane" id="licenses">
|
<div class="tab-pane" id="licenses">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="display table table-hover">
|
<table
|
||||||
|
data-cookie-id-table="userLicenseTable"
|
||||||
|
data-id-table="userLicenseTable"
|
||||||
|
id="userLicenseTable"
|
||||||
|
data-search="true"
|
||||||
|
data-pagination="true"
|
||||||
|
data-side-pagination="client"
|
||||||
|
data-show-columns="true"
|
||||||
|
data-show-export="true"
|
||||||
|
data-show-footer="true"
|
||||||
|
data-show-refresh="true"
|
||||||
|
data-sort-order="asc"
|
||||||
|
data-sort-name="name"
|
||||||
|
class="table table-striped snipe-table table-hover"
|
||||||
|
data-export-options='{
|
||||||
|
"fileName": "export-license-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
|
||||||
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
|
||||||
|
}'>
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-md-5">{{ trans('general.name') }}</th>
|
<th class="col-md-5">{{ trans('general.name') }}</th>
|
||||||
<th class="col-md-6">{{ trans('admin/hardware/form.serial') }}</th>
|
<th class="col-md-6">{{ trans('admin/hardware/form.serial') }}</th>
|
||||||
|
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||||
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($user->licenses as $license)
|
@foreach ($user->licenses as $license)
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td class="col-md-4">
|
||||||
{!! $license->present()->nameUrl() !!}
|
{!! $license->present()->nameUrl() !!}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="col-md-4">
|
||||||
@can('viewKeys', $license)
|
@can('viewKeys', $license)
|
||||||
{!! $license->present()->serialUrl() !!}
|
{!! $license->present()->serialUrl() !!}
|
||||||
@else
|
@else
|
||||||
------------
|
------------
|
||||||
@endcan
|
@endcan
|
||||||
</td>
|
</td>
|
||||||
<td class="hidden-print">
|
<td class="col-md-2">
|
||||||
|
{!! $license->purchase_cost !!}
|
||||||
|
</td>
|
||||||
|
<td class="hidden-print col-md-2">
|
||||||
@can('update', $license)
|
@can('update', $license)
|
||||||
<a href="{{ route('licenses.checkin', array('licenseSeatId'=> $license->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
<a href="{{ route('licenses.checkin', array('licenseSeatId'=> $license->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
||||||
@endcan
|
@endcan
|
||||||
|
@ -434,10 +456,28 @@
|
||||||
|
|
||||||
<div class="tab-pane" id="accessories">
|
<div class="tab-pane" id="accessories">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="display table table-hover">
|
<table
|
||||||
|
data-cookie-id-table="userAccessoryTable"
|
||||||
|
data-id-table="userAccessoryTable"
|
||||||
|
id="userAccessoryTable"
|
||||||
|
data-search="true"
|
||||||
|
data-pagination="true"
|
||||||
|
data-side-pagination="client"
|
||||||
|
data-show-columns="true"
|
||||||
|
data-show-export="true"
|
||||||
|
data-show-footer="true"
|
||||||
|
data-show-refresh="true"
|
||||||
|
data-sort-order="asc"
|
||||||
|
data-sort-name="name"
|
||||||
|
class="table table-striped snipe-table table-hover"
|
||||||
|
data-export-options='{
|
||||||
|
"fileName": "export-accessory-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
|
||||||
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
|
||||||
|
}'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-md-5">{{ trans('general.name') }}</th>
|
<th class="col-md-5">{{ trans('general.name') }}</th>
|
||||||
|
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||||
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -445,6 +485,9 @@
|
||||||
@foreach ($user->accessories as $accessory)
|
@foreach ($user->accessories as $accessory)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{!!$accessory->present()->nameUrl()!!}</td>
|
<td>{!!$accessory->present()->nameUrl()!!}</td>
|
||||||
|
<td>
|
||||||
|
{!! $accessory->purchase_cost !!}
|
||||||
|
</td>
|
||||||
<td class="hidden-print">
|
<td class="hidden-print">
|
||||||
@can('checkin', $accessory)
|
@can('checkin', $accessory)
|
||||||
<a href="{{ route('checkin/accessory', array('accessoryID'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
<a href="{{ route('checkin/accessory', array('accessoryID'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
||||||
|
@ -459,10 +502,28 @@
|
||||||
|
|
||||||
<div class="tab-pane" id="consumables">
|
<div class="tab-pane" id="consumables">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="display table table-striped">
|
<table
|
||||||
|
data-cookie-id-table="userConsumableTable"
|
||||||
|
data-id-table="userConsumableTable"
|
||||||
|
id="userConsumableTable"
|
||||||
|
data-search="true"
|
||||||
|
data-pagination="true"
|
||||||
|
data-side-pagination="client"
|
||||||
|
data-show-columns="true"
|
||||||
|
data-show-export="true"
|
||||||
|
data-show-footer="true"
|
||||||
|
data-show-refresh="true"
|
||||||
|
data-sort-order="asc"
|
||||||
|
data-sort-name="name"
|
||||||
|
class="table table-striped snipe-table table-hover"
|
||||||
|
data-export-options='{
|
||||||
|
"fileName": "export-consumable-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
|
||||||
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
|
||||||
|
}'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-md-8">{{ trans('general.name') }}</th>
|
<th class="col-md-6">{{ trans('general.name') }}</th>
|
||||||
|
<th class="col-md-2" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||||
<th class="col-md-4">{{ trans('general.date') }}</th>
|
<th class="col-md-4">{{ trans('general.date') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -470,6 +531,9 @@
|
||||||
@foreach ($user->consumables as $consumable)
|
@foreach ($user->consumables as $consumable)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{!! $consumable->present()->nameUrl() !!}</td>
|
<td>{!! $consumable->present()->nameUrl() !!}</td>
|
||||||
|
<td>
|
||||||
|
{!! $consumable->purchase_cost !!}
|
||||||
|
</td>
|
||||||
<td>{{ $consumable->created_at }}</td>
|
<td>{{ $consumable->created_at }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
Loading…
Reference in a new issue