mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -08:00
Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net> # Conflicts: # resources/views/locations/print.blade.php
This commit is contained in:
commit
b0e66ae445
|
@ -2662,8 +2662,17 @@
|
|||
"avatar_url": "https://avatars.githubusercontent.com/u/7991086?v=4",
|
||||
"profile": "https://github.com/reederda",
|
||||
"contributions": [
|
||||
"translations",
|
||||
"translation",
|
||||
"translation",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "vickyjaura183",
|
||||
"name": "vickyjaura183",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/109422491?v=4",
|
||||
"profile": "https://github.com/vickyjaura183",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
![Build Status](https://app.chipperci.com/projects/0e5f8979-31eb-4ee6-9abf-050b76ab0383/status/master) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeitapp.svg?style=social)](https://twitter.com/snipeitapp) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade)
|
||||
[![All Contributors](https://img.shields.io/badge/all_contributors-292-orange.svg?style=flat-square)](#contributors) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk) [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev)
|
||||
[![All Contributors](https://img.shields.io/badge/all_contributors-294-orange.svg?style=flat-square)](#contributors) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk) [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev)
|
||||
|
||||
## Snipe-IT - Open Source Asset Management System
|
||||
|
||||
|
@ -134,7 +134,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
|
|||
| [<img src="https://avatars.githubusercontent.com/u/84392209?v=4" width="110px;"/><br /><sub>Toreg87</sub>](https://github.com/Toreg87)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Toreg87 "Code") | [<img src="https://avatars.githubusercontent.com/u/67638596?v=4" width="110px;"/><br /><sub>Matthew Nickson</sub>](https://github.com/Computroniks)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Computroniks "Code") | [<img src="https://avatars.githubusercontent.com/u/1646397?v=4" width="110px;"/><br /><sub>Jethro Nederhof</sub>](https://jethron.id.au)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jethron "Code") | [<img src="https://avatars.githubusercontent.com/u/23289826?v=4" width="110px;"/><br /><sub>Oskar Stenberg</sub>](https://github.com/01ste02)<br />[💻](https://github.com/snipe/snipe-it/commits?author=01ste02 "Code") | [<img src="https://avatars.githubusercontent.com/u/82208283?v=4" width="110px;"/><br /><sub>Robert-Azelis</sub>](https://github.com/Robert-Azelis)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Robert-Azelis "Code") | [<img src="https://avatars.githubusercontent.com/u/60648387?v=4" width="110px;"/><br /><sub>Alexander William Smith</sub>](https://github.com/alwism)<br />[💻](https://github.com/snipe/snipe-it/commits?author=alwism "Code") | [<img src="https://avatars.githubusercontent.com/u/24418301?v=4" width="110px;"/><br /><sub>LEITWERK AG</sub>](https://www.leitwerk.de/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=leitwerk-ag "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/1911435?v=4" width="110px;"/><br /><sub>Adam</sub>](http://www.aboutcher.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adamboutcher "Code") | [<img src="https://avatars.githubusercontent.com/u/16104273?v=4" width="110px;"/><br /><sub>Ian</sub>](https://snksrv.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sneak-it "Code") | [<img src="https://avatars.githubusercontent.com/u/4023909?v=4" width="110px;"/><br /><sub>Shao Yu-Lung (Allen)</sub>](http://blog.bestlong.idv.tw/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bestlong "Code") | [<img src="https://avatars.githubusercontent.com/u/76475453?v=4" width="110px;"/><br /><sub>Haxatron</sub>](https://github.com/Haxatron)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Haxatron "Code") | [<img src="https://avatars.githubusercontent.com/u/88776392?v=4" width="110px;"/><br /><sub>PlaneNuts</sub>](https://github.com/PlaneNuts)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PlaneNuts "Code") | [<img src="https://avatars.githubusercontent.com/u/3842948?v=4" width="110px;"/><br /><sub>Bradley Coudriet</sub>](http://bjcpgd.cias.rit.edu)<br />[💻](https://github.com/snipe/snipe-it/commits?author=exula "Code") | [<img src="https://avatars.githubusercontent.com/u/21966173?v=4" width="110px;"/><br /><sub>Dalton Durst</sub>](https://daltondur.st)<br />[💻](https://github.com/snipe/snipe-it/commits?author=UniversalSuperBox "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/38761237?v=4" width="110px;"/><br /><sub>Alex Janes</sub>](https://adagiohealth.org)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adagioajanes "Code") | [<img src="https://avatars.githubusercontent.com/u/32387849?v=4" width="110px;"/><br /><sub>Nuraeil</sub>](https://github.com/nuraeil)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nuraeil "Code") | [<img src="https://avatars.githubusercontent.com/u/48162670?v=4" width="110px;"/><br /><sub>TenOfTens</sub>](https://github.com/TenOfTens)<br />[💻](https://github.com/snipe/snipe-it/commits?author=TenOfTens "Code") | [<img src="https://avatars.githubusercontent.com/u/9415391?v=4" width="110px;"/><br /><sub>waffle</sub>](https://ditisjens.be/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=insert-waffle "Code") | [<img src="https://avatars.githubusercontent.com/u/19945501?v=4" width="110px;"/><br /><sub>Yevhenii Huzii</sub>](https://github.com/QveenSi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=QveenSi "Code") | [<img src="https://avatars.githubusercontent.com/u/3839381?v=4" width="110px;"/><br /><sub>Achmad Fienan Rahardianto</sub>](https://github.com/veenone)<br />[💻](https://github.com/snipe/snipe-it/commits?author=veenone "Code") | [<img src="https://avatars.githubusercontent.com/u/19945501?v=4" width="110px;"/><br /><sub>Yevhenii Huzii</sub>](https://github.com/QveenSi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=QveenSi "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/97299851?v=4" width="110px;"/><br /><sub>Christian Weirich</sub>](https://github.com/chrisweirich)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chrisweirich "Code") | [<img src="https://avatars.githubusercontent.com/u/1294403?v=4" width="110px;"/><br /><sub>denzfarid</sub>](https://github.com/denzfarid)<br /> | [<img src="https://avatars.githubusercontent.com/u/94018771?v=4" width="110px;"/><br /><sub>ntbutler-nbcs</sub>](https://github.com/ntbutler-nbcs)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ntbutler-nbcs "Code") | [<img src="https://avatars.githubusercontent.com/u/172697?v=4" width="110px;"/><br /><sub>Naveen</sub>](https://naveensrinivasan.dev)<br />[💻](https://github.com/snipe/snipe-it/commits?author=naveensrinivasan "Code") | [<img src="https://avatars.githubusercontent.com/u/55674383?v=4" width="110px;"/><br /><sub>Mike Roquemore</sub>](https://github.com/mikeroq)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mikeroq "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/97299851?v=4" width="110px;"/><br /><sub>Christian Weirich</sub>](https://github.com/chrisweirich)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chrisweirich "Code") | [<img src="https://avatars.githubusercontent.com/u/1294403?v=4" width="110px;"/><br /><sub>denzfarid</sub>](https://github.com/denzfarid)<br /> | [<img src="https://avatars.githubusercontent.com/u/94018771?v=4" width="110px;"/><br /><sub>ntbutler-nbcs</sub>](https://github.com/ntbutler-nbcs)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ntbutler-nbcs "Code") | [<img src="https://avatars.githubusercontent.com/u/172697?v=4" width="110px;"/><br /><sub>Naveen</sub>](https://naveensrinivasan.dev)<br />[💻](https://github.com/snipe/snipe-it/commits?author=naveensrinivasan "Code") | [<img src="https://avatars.githubusercontent.com/u/55674383?v=4" width="110px;"/><br /><sub>Mike Roquemore</sub>](https://github.com/mikeroq)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mikeroq "Code") | [<img src="https://avatars.githubusercontent.com/u/7991086?v=4" width="110px;"/><br /><sub>Daniel Reeder</sub>](https://github.com/reederda)<br />[🌍](#translation-reederda "Translation") [🌍](#translation-reederda "Translation") [💻](https://github.com/snipe/snipe-it/commits?author=reederda "Code") | [<img src="https://avatars.githubusercontent.com/u/109422491?v=4" width="110px;"/><br /><sub>vickyjaura183</sub>](https://github.com/vickyjaura183)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vickyjaura183 "Code") |
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
|
|
@ -63,7 +63,7 @@ class AccessoryCheckoutController extends Controller
|
|||
$this->authorize('checkout', $accessory);
|
||||
|
||||
if (! $user = User::find($request->input('assigned_to'))) {
|
||||
return redirect()->route('checkout/accessory', $accessory->id)->with('error', trans('admin/accessories/message.checkout.user_does_not_exist'));
|
||||
return redirect()->route('accessories.checkout.show', $accessory->id)->with('error', trans('admin/accessories/message.checkout.user_does_not_exist'));
|
||||
}
|
||||
|
||||
// Update the accessory data
|
||||
|
|
|
@ -12,6 +12,7 @@ use Illuminate\Http\Request;
|
|||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use App\Http\Requests\AssetCheckoutRequest;
|
||||
|
||||
class BulkAssetsController extends Controller
|
||||
{
|
||||
|
@ -239,7 +240,7 @@ class BulkAssetsController extends Controller
|
|||
* Process Multiple Checkout Request
|
||||
* @return View
|
||||
*/
|
||||
public function storeCheckout(Request $request)
|
||||
public function storeCheckout(AssetCheckoutRequest $request)
|
||||
{
|
||||
|
||||
$this->authorize('checkout', Asset::class);
|
||||
|
@ -250,7 +251,7 @@ class BulkAssetsController extends Controller
|
|||
$target = $this->determineCheckoutTarget();
|
||||
|
||||
if (! is_array($request->get('selected_assets'))) {
|
||||
return redirect()->route('hardware/bulkcheckout')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected'));
|
||||
return redirect()->route('hardware.bulkcheckout.show')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected'));
|
||||
}
|
||||
|
||||
$asset_ids = array_filter($request->get('selected_assets'));
|
||||
|
@ -297,9 +298,9 @@ class BulkAssetsController extends Controller
|
|||
return redirect()->to('hardware')->with('success', trans('admin/hardware/message.checkout.success'));
|
||||
}
|
||||
// Redirect to the asset management page with error
|
||||
return redirect()->to('hardware/bulk-checkout')->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($errors);
|
||||
return redirect()->route('hardware.bulkcheckout.show')->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($errors);
|
||||
} catch (ModelNotFoundException $e) {
|
||||
return redirect()->to('hardware/bulk-checkout')->with('error', $e->getErrors());
|
||||
return redirect()->route('hardware.bulkcheckout.show')->with('error', $e->getErrors());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,6 +142,6 @@ class SamlController extends Controller
|
|||
return view('errors.403');
|
||||
}
|
||||
|
||||
return redirect()->route('logout')->with(['saml_logout' => true,'saml_slo_redirect_url' => $sloUrl]);
|
||||
return redirect()->route('logout.get')->with(['saml_logout' => true,'saml_slo_redirect_url' => $sloUrl]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ class ConsumableCheckoutController extends Controller
|
|||
// Check if the user exists
|
||||
if (is_null($user = User::find($assigned_to))) {
|
||||
// Redirect to the consumable management page with error
|
||||
return redirect()->route('checkout/consumable', $consumable)->with('error', trans('admin/consumables/message.checkout.user_does_not_exist'));
|
||||
return redirect()->route('consumables.checkout.show', $consumable)->with('error', trans('admin/consumables/message.checkout.user_does_not_exist'));
|
||||
}
|
||||
|
||||
// Update the consumable data
|
||||
|
|
|
@ -645,6 +645,12 @@ class ReportsController extends Controller
|
|||
if($request->filled('exclude_archived')){
|
||||
$assets->notArchived();
|
||||
}
|
||||
if($request->input('deleted_assets') == '1'){
|
||||
$assets->withTrashed();
|
||||
}
|
||||
if($request->input('deleted_assets') == '0'){
|
||||
$assets->onlyTrashed();
|
||||
}
|
||||
|
||||
$assets->orderBy('assets.id', 'ASC')->chunk(20, function ($assets) use ($handle, $customfields, $request) {
|
||||
|
||||
|
@ -783,7 +789,7 @@ class ReportsController extends Controller
|
|||
|
||||
if ($request->filled('warranty')) {
|
||||
$row[] = ($asset->warranty_months) ? $asset->warranty_months : '';
|
||||
$row[] = $asset->present()->warrantee_expires();
|
||||
$row[] = $asset->present()->warranty_expires();
|
||||
}
|
||||
|
||||
if ($request->filled('depreciation')) {
|
||||
|
|
|
@ -87,7 +87,7 @@ class CustomFieldset extends Model
|
|||
}
|
||||
|
||||
if ($field->is_unique == '1') {
|
||||
$rule[] = 'unique';
|
||||
$rule[] = 'unique_undeleted';
|
||||
}
|
||||
|
||||
array_push($rule, $field->attributes['format']);
|
||||
|
|
|
@ -498,10 +498,10 @@ class AssetPresenter extends Presenter
|
|||
}
|
||||
|
||||
/**
|
||||
* Date the warantee expires.
|
||||
* Date the warranty expires.
|
||||
* @return false|string
|
||||
*/
|
||||
public function warrantee_expires()
|
||||
public function warranty_expires()
|
||||
{
|
||||
if (($this->purchase_date) && ($this->warranty_months)) {
|
||||
$date = date_create($this->purchase_date);
|
||||
|
|
|
@ -371,7 +371,7 @@ class DepreciationReportPresenter extends Presenter
|
|||
* Date the warantee expires.
|
||||
* @return false|string
|
||||
*/
|
||||
public function warrantee_expires()
|
||||
public function warranty_expires()
|
||||
{
|
||||
if (($this->purchase_date) && ($this->warranty_months)) {
|
||||
$date = date_create($this->purchase_date);
|
||||
|
|
|
@ -102,6 +102,7 @@ return [
|
|||
'email_domain_help' => 'This is used to generate email addresses when importing',
|
||||
'error' => 'Error',
|
||||
'exclude_archived' => 'Exclude Archived Assets',
|
||||
'exclude_deleted' => 'Exclude Deleted Assets',
|
||||
'example' => 'Example: ',
|
||||
'filastname_format' => 'First Initial Last Name (jsmith@example.com)',
|
||||
'firstname_lastname_format' => 'First Name Last Name (jane.smith@example.com)',
|
||||
|
@ -132,6 +133,7 @@ return [
|
|||
'id' => 'ID',
|
||||
'image' => 'Image',
|
||||
'image_delete' => 'Delete Image',
|
||||
'include_deleted' => 'Include Deleted Assets',
|
||||
'image_upload' => 'Upload Image',
|
||||
'filetypes_accepted_help' => 'Accepted filetype is :types. Max upload size allowed is :size.|Accepted filetypes are :types. Max upload size allowed is :size.',
|
||||
'filetypes_size_help' => 'Max upload size allowed is :size.',
|
||||
|
@ -185,6 +187,7 @@ return [
|
|||
'no' => 'No',
|
||||
'notes' => 'Notes',
|
||||
'order_number' => 'Order Number',
|
||||
'only_deleted' => 'Only Deleted Assets',
|
||||
'page_menu' => 'Showing _MENU_ items',
|
||||
'pagination_info' => 'Showing _START_ to _END_ of _TOTAL_ items',
|
||||
'pending' => 'Pending',
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
@if ($accessory->assigned_to != '')
|
||||
@can('checkin', \App\Models\Accessory::class)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('checkin/accessory', $accessory->id) }}">{{ trans('admin/accessories/general.checkin') }}</a>
|
||||
<a href="{{ route('accessories.checkin.show', $accessory->id) }}">{{ trans('admin/accessories/general.checkin') }}</a>
|
||||
</li>
|
||||
@endcan
|
||||
@else
|
||||
@can('checkout', \App\Models\Accessory::class)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('checkout/accessory', $accessory->id) }}">{{ trans('admin/accessories/general.checkout') }}</a>
|
||||
<a href="{{ route('accessories.checkout.show', $accessory->id) }}">{{ trans('admin/accessories/general.checkout') }}</a>
|
||||
</li>
|
||||
@endcan
|
||||
@endif
|
||||
|
@ -171,7 +171,7 @@
|
|||
@can('checkout', \App\Models\Accessory::class)
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<a href="{{ route('checkout/accessory', $accessory->id) }}" style="margin-right:5px;" class="btn btn-primary btn-sm" {{ (($accessory->numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }}</a>
|
||||
<a href="{{ route('accessories.checkout.show', $accessory->id) }}" style="margin-right:5px;" class="btn btn-primary btn-sm" {{ (($accessory->numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
|
|
@ -42,13 +42,13 @@
|
|||
<button class="btn btn-lg btn-primary btn-block">{{ trans('general.submit') }}</button>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 text-right" style="padding-top: 10px;">
|
||||
<a href="{{ route('logout') }}" onclick="document.getElementById('logout-form').submit(); return false;">
|
||||
<a href="{{ route('logout.get') }}" onclick="document.getElementById('logout-form').submit(); return false;">
|
||||
{{ trans('general.cancel') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
||||
<form id="logout-form" action="{{ route('logout.post') }}" method="POST" style="display: none;">
|
||||
{{ csrf_field() }}
|
||||
</form>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-7">
|
||||
<form class="form-horizontal" method="post" action="{{ route('component.checkin.save', $component_assets->id) }}" autocomplete="off">
|
||||
<form class="form-horizontal" method="post" action="{{ route('components.checkin.store', $component_assets->id) }}" autocomplete="off">
|
||||
{{csrf_field()}}
|
||||
|
||||
<div class="box box-default">
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
@if ($component->assigned_to != '')
|
||||
@can('checkin', $component)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('checkin/component', $component->id) }}">
|
||||
<a href="{{ route('components.checkin.show', $component->id) }}">
|
||||
{{ trans('admin/components/general.checkin') }}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -29,7 +29,7 @@
|
|||
@else
|
||||
@can('checkout', $component)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('checkout/component', $component->id) }}">
|
||||
<a href="{{ route('components.checkout.show', $component->id) }}">
|
||||
{{ trans('admin/components/general.checkout') }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -126,10 +126,21 @@
|
|||
@endif
|
||||
|
||||
@can('checkout', \App\Models\Consumable::class)
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('checkout/consumable', $consumable->id) }}" style="padding-bottom:5px;" class="btn btn-primary btn-sm" {{ (($consumable->numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }}</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
@if ($consumable->numRemaining() > 0)
|
||||
<a href="{{ route('consumables.checkout.show', $consumable->id) }}" style="padding-bottom:5px;" class="btn btn-primary btn-sm">
|
||||
{{ trans('general.checkout') }}
|
||||
</a>
|
||||
@else
|
||||
<button style="padding-bottom:5px;" class="btn btn-primary btn-sm disabled">
|
||||
{{ trans('general.checkout') }}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endcan
|
||||
|
||||
@if ($consumable->notes)
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
<div class="col-md-12">
|
||||
@if ($backto=='user')
|
||||
<form class="form-horizontal" method="post"
|
||||
action="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}"
|
||||
action="{{ route('hardware.checkin.store', array('assetId'=> $asset->id, 'backto'=>'user')) }}"
|
||||
autocomplete="off">
|
||||
@else
|
||||
<form class="form-horizontal" method="post"
|
||||
action="{{ route('checkin/hardware', $asset->id) }}" autocomplete="off">
|
||||
action="{{ route('hardware.checkin.store', array('assetId'=> $asset->id)) }}" autocomplete="off">
|
||||
@endif
|
||||
{{csrf_field()}}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
@if (($asset->assigned_to != '') && ($asset->deleted_at==''))
|
||||
@can('checkin', \App\Models\Asset::class)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('checkin/hardware', $asset->id) }}">
|
||||
<a href="{{ route('hardware.checkin.create', $asset->id) }}">
|
||||
{{ trans('admin/hardware/general.checkin') }}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -30,7 +30,7 @@
|
|||
@elseif (($asset->assigned_to == '') && ($asset->deleted_at==''))
|
||||
@can('checkout', \App\Models\Asset::class)
|
||||
<li role="menuitem">
|
||||
<a href="{{ route('checkout/hardware', $asset->id) }}">
|
||||
<a href="{{ route('hardware.checkout.create', $asset->id) }}">
|
||||
{{ trans('admin/hardware/general.checkout') }}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -574,7 +574,7 @@
|
|||
|
||||
|
||||
@if ($asset->warranty_months)
|
||||
<div class="row{!! $asset->present()->warrantee_expires() < date("Y-m-d") ? ' warning' : '' !!}">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<strong>
|
||||
{{ trans('admin/hardware/form.warranty') }}
|
||||
|
@ -584,10 +584,26 @@
|
|||
{{ $asset->warranty_months }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
|
||||
({{ trans('admin/hardware/form.expires') }}
|
||||
{{ $asset->present()->warrantee_expires() }})
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<strong>
|
||||
{{ trans('admin/hardware/form.warranty_expires') }}
|
||||
{!! $asset->present()->warranty_expires() < date("Y-m-d") ? '<i class="fas fa-exclamation-triangle text-orange" aria-hidden="true"></i>' : '' !!}
|
||||
</strong>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
{{ Helper::getFormattedDateObject($asset->present()->warranty_expires(), 'date', false) }}
|
||||
-
|
||||
{{ Carbon::parse($asset->present()->warranty_expires())->diffForHumans() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
@if (($asset->model) && ($asset->depreciation))
|
||||
|
@ -600,8 +616,7 @@
|
|||
<div class="col-md-6">
|
||||
{{ $asset->depreciation->name }}
|
||||
({{ $asset->depreciation->months }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
)
|
||||
{{ trans('admin/hardware/form.months') }})
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -611,13 +626,10 @@
|
|||
</strong>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@if ($asset->time_until_depreciated()->y > 0)
|
||||
{{ $asset->time_until_depreciated()->y }}
|
||||
{{ trans('admin/hardware/form.years') }},
|
||||
@endif
|
||||
{{ $asset->time_until_depreciated()->m }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
({{ $asset->depreciated_date()->format('Y-m-d') }})
|
||||
{{ Helper::getFormattedDateObject($asset->depreciated_date()->format('Y-m-d'), 'date', false) }}
|
||||
-
|
||||
{{ Carbon::parse($asset->depreciated_date())->diffForHumans() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
@ -644,20 +656,9 @@
|
|||
</div>
|
||||
<div class="col-md-6">
|
||||
{{ Helper::getFormattedDateObject($asset->present()->eol_date(), 'date', false) }}
|
||||
|
||||
|
||||
@if ($asset->present()->months_until_eol())
|
||||
-
|
||||
@if ($asset->present()->months_until_eol()->y > 0)
|
||||
{{ $asset->present()->months_until_eol()->y }}
|
||||
{{ trans('general.years') }},
|
||||
@endif
|
||||
|
||||
{{ $asset->present()->months_until_eol()->m }}
|
||||
{{ trans('general.months') }}
|
||||
|
||||
@endif
|
||||
|
||||
-
|
||||
{{ Carbon::parse($asset->present()->eol_date())->diffForHumans() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
@ -316,11 +316,14 @@
|
|||
{{ trans('general.viewassets') }}
|
||||
</a></li>
|
||||
|
||||
@can('viewRequestable', \App\Models\Asset::class)
|
||||
<li {!! (Request::is('account/requested') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('account.requested') }}">
|
||||
<i class="fas fa-check fa-disk fa-fw" aria-hidden="true"></i>
|
||||
{{ trans('general.requested_assets_menu') }}
|
||||
</a></li>
|
||||
@endcan
|
||||
|
||||
<li {!! (Request::is('account/accept') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('account.accept') }}">
|
||||
<i class="fas fa-check fa-disk fa-fw"></i>
|
||||
|
@ -354,11 +357,11 @@
|
|||
<li class="divider"></li>
|
||||
<li>
|
||||
|
||||
<a href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
|
||||
<a href="{{ route('logout.get') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
|
||||
<i class="fa fa-sign-out fa-fw"></i> {{ trans('general.logout') }}
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
||||
<form id="logout-form" action="{{ route('logout.post') }}" method="POST" style="display: none;">
|
||||
{{ csrf_field() }}
|
||||
</form>
|
||||
|
||||
|
@ -486,7 +489,7 @@
|
|||
|
||||
@can('checkout', \App\Models\Asset::class)
|
||||
<li{!! (Request::is('hardware/bulkcheckout') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('hardware/bulkcheckout') }}">
|
||||
<a href="{{ route('hardware.bulkcheckout.show') }}">
|
||||
{{ trans('general.bulk_checkout') }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -7,21 +7,6 @@
|
|||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Right header --}}
|
||||
@section('header_right')
|
||||
<div class="btn-group pull-right">
|
||||
@can('update', $license)
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ trans('button.actions') }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li role="menuitem"><a href="{{ route('licenses.edit', ['license' => $license->id]) }}">{{ trans('admin/licenses/general.edit') }}</a></li>
|
||||
<li role="menuitem"><a href="{{ route('clone/license', $license->id) }}">{{ trans('admin/licenses/general.clone') }}</a></li>
|
||||
</ul>
|
||||
@endcan
|
||||
</div>
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
|
@ -78,8 +63,8 @@
|
|||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ route('licenses.edit', $user->id) }}">{{ trans('admin/users/general.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/license', $user->id) }}">{{ trans('admin/users/general.clone') }}</a></li>
|
||||
<li><a href="{{ route('licenses.edit', $license->id) }}">{{ trans('admin/licenses/general.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/license', $license->id) }}">{{ trans('admin/licenses/general.clone') }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@endcan
|
||||
|
@ -575,4 +560,4 @@
|
|||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table')
|
||||
@stop
|
||||
@stop
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
@if ($manager)
|
||||
<b>{{ trans('admin/locations/general.manager') }}</b> {{ $manager->present()->fullName() }}<br>
|
||||
@endif
|
||||
<b>{{ trans('admin/locations/general.date') }}</b> {{ \App\Helpers\Helper::getFormattedDateObject(now(), 'datetime', false) }}<br><br>
|
||||
<b>{{ trans('admin/locations/general.date') }}</b> {{ \App\Helpers\Helper::getFormattedDateObject(now(), 'datetime', false) }}<br><br>
|
||||
|
||||
@if ($users->count() > 0)
|
||||
@php
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
<ul class="dropdown-menu">
|
||||
@if ($model->deleted_at=='')
|
||||
<li><a href="{{ route('models.edit', $model->id) }}">{{ trans('admin/models/table.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/model', $model->id) }}">{{ trans('admin/models/table.clone') }}</a></li>
|
||||
<li><a href="{{ route('models.clone.create', $model->id) }}">{{ trans('admin/models/table.clone') }}</a></li>
|
||||
<li><a href="{{ route('hardware.create', ['model_id' => $model->id]) }}">{{ trans('admin/hardware/form.create') }}</a></li>
|
||||
@else
|
||||
<li><a href="{{ route('restore/model', $model->id) }}">{{ trans('admin/models/general.restore') }}</a></li>
|
||||
<li><a href="{{ route('models.restore.store', $model->id) }}">{{ trans('admin/models/general.restore') }}</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -316,7 +316,7 @@
|
|||
|
||||
@can('create', \App\Models\AssetModel::class)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<a href="{{ route('clone/model', $model->id) }}" style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('admin/models/table.clone') }}</a>
|
||||
<a href="{{ route('models.clone.create', $model->id) }}" style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('admin/models/table.clone') }}</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<tr><td> </td><td>{{ trans('mail.name') }}</td><td>{{ trans('mail.Days') }}</td><td>{{ trans('mail.expires') }}</td><td>{{ trans('mail.supplier') }}</td><td>{{ trans('mail.assigned_to') }}</td></tr>
|
||||
@foreach ($assets as $asset)
|
||||
@php
|
||||
$expires = Helper::getFormattedDateObject($asset->present()->warrantee_expires, 'date');
|
||||
$diff = round(abs(strtotime($asset->present()->warrantee_expires) - strtotime(date('Y-m-d')))/86400);
|
||||
$expires = Helper::getFormattedDateObject($asset->present()->warranty_expires, 'date');
|
||||
$diff = round(abs(strtotime($asset->present()->warranty_expires) - strtotime(date('Y-m-d')))/86400);
|
||||
$icon = ($diff <= ($threshold / 2)) ? '🚨' : (($diff <= $threshold) ? '⚠️' : ' ');
|
||||
@endphp
|
||||
<tr><td>{{ $icon }} </td><td> <a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->present()->name }}</a> </td><td> {{ $diff }} {{ trans('mail.Days') }} </td><td> {{ $expires['formatted'] }} </td><td> {{ ($asset->supplier ? e($asset->supplier->name) : '') }} </td><td> {{ ($asset->assignedTo ? e($asset->assignedTo->present()->name()) : '') }} </td></tr>
|
||||
|
|
|
@ -352,6 +352,20 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<br>
|
||||
<label for= "deleted_assets">
|
||||
{{ Form::radio('deleted_assets', '', true, ['aria-label'=>'deleted_assets', 'class'=>'minimal'])}}
|
||||
{{ trans('general.exclude_deleted') }}
|
||||
<br>
|
||||
{{ Form::radio('deleted_assets', '1', old('deleted_assets'), ['aria-label'=>'deleted_assets','class' => 'minimal']) }}
|
||||
{{ trans('general.include_deleted') }}
|
||||
<br>
|
||||
{{ Form::radio('deleted_assets', '0', old('deleted_assets'), ['aria-label'=>'deleted_assets','class' => 'minimal']) }}
|
||||
{{ trans('general.only_deleted') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ route('users.edit', $user->id) }}">{{ trans('admin/users/general.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/user', $user->id) }}">{{ trans('admin/users/general.clone') }}</a></li>
|
||||
<li><a href="{{ route('users.clone.show', $user->id) }}">{{ trans('admin/users/general.clone') }}</a></li>
|
||||
@if ((Auth::user()->id !== $user->id) && (!config('app.lock_passwords')) && ($user->deleted_at==''))
|
||||
<li><a href="{{ route('users.destroy', $user->id) }}">{{ trans('button.delete') }}</a></li>
|
||||
@endif
|
||||
|
@ -173,7 +173,7 @@
|
|||
|
||||
@can('create', $user)
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('clone/user', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('admin/users/general.clone') }}</a>
|
||||
<a href="{{ route('users.clone.show', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('admin/users/general.clone') }}</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
|
@ -228,7 +228,7 @@
|
|||
</div>
|
||||
@else
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<form method="POST" action="{{ route('restore/user', $user->id) }}">
|
||||
<form method="POST" action="{{ route('users.restore.store', $user->id) }}">
|
||||
@csrf
|
||||
<button style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('button.restore') }}</button>
|
||||
</form>
|
||||
|
@ -730,7 +730,7 @@
|
|||
</td>
|
||||
<td class="hidden-print">
|
||||
@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('accessories.checkin.show', array('accessoryID'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -467,12 +467,12 @@ Route::group(['middleware' => 'web'], function () {
|
|||
Route::get(
|
||||
'logout',
|
||||
[LoginController::class, 'logout']
|
||||
)->name('logout');
|
||||
)->name('logout.get');
|
||||
|
||||
Route::post(
|
||||
'logout',
|
||||
[LoginController::class, 'logout']
|
||||
)->name('logout');
|
||||
)->name('logout.post');
|
||||
});
|
||||
|
||||
//Auth::routes();
|
||||
|
|
|
@ -10,22 +10,22 @@ Route::group(['prefix' => 'accessories', 'middleware' => ['auth']], function ()
|
|||
Route::get(
|
||||
'{accessoryID}/checkout',
|
||||
[Accessories\AccessoryCheckoutController::class, 'create']
|
||||
)->name('checkout/accessory');
|
||||
)->name('accessories.checkout.show');
|
||||
|
||||
Route::post(
|
||||
'{accessoryID}/checkout',
|
||||
[Accessories\AccessoryCheckoutController::class, 'store']
|
||||
)->name('checkout/accessory');
|
||||
)->name('accessories.checkout.store');
|
||||
|
||||
Route::get(
|
||||
'{accessoryID}/checkin/{backto?}',
|
||||
[Accessories\AccessoryCheckinController::class, 'create']
|
||||
)->name('checkin/accessory');
|
||||
)->name('accessories.checkin.show');
|
||||
|
||||
Route::post(
|
||||
'{accessoryID}/checkin/{backto?}',
|
||||
[Accessories\AccessoryCheckinController::class, 'store']
|
||||
)->name('checkin/accessory');
|
||||
)->name('accessories.checkin.store');
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -8,22 +8,22 @@ Route::group(['prefix' => 'components', 'middleware' => ['auth']], function () {
|
|||
Route::get(
|
||||
'{componentID}/checkout',
|
||||
[Components\ComponentCheckoutController::class, 'create']
|
||||
)->name('checkout/component');
|
||||
)->name('components.checkout.show');
|
||||
|
||||
Route::post(
|
||||
'{componentID}/checkout',
|
||||
[Components\ComponentCheckoutController::class, 'store']
|
||||
)->name('checkout/component');
|
||||
)->name('components.checkout.store');
|
||||
|
||||
Route::get(
|
||||
'{componentID}/checkin/{backto?}',
|
||||
[Components\ComponentCheckinController::class, 'create']
|
||||
)->name('checkin/component');
|
||||
)->name('components.checkin.show');
|
||||
|
||||
Route::post(
|
||||
'{componentID}/checkin/{backto?}',
|
||||
[Components\ComponentCheckinController::class, 'store']
|
||||
)->name('component.checkin.save');
|
||||
)->name('components.checkin.store');
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@ Route::group(['prefix' => 'consumables', 'middleware' => ['auth']], function ()
|
|||
Route::get(
|
||||
'{consumablesID}/checkout',
|
||||
[Consumables\ConsumableCheckoutController::class, 'create']
|
||||
)->name('checkout/consumable');
|
||||
)->name('consumables.checkout.show');
|
||||
|
||||
Route::post(
|
||||
'{consumablesID}/checkout',
|
||||
[Consumables\ConsumableCheckoutController::class, 'store']
|
||||
)->name('checkout/consumable');
|
||||
)->name('consumables.checkout.store');
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -108,19 +108,19 @@ Route::group(
|
|||
|
||||
Route::get('{assetId}/checkout',
|
||||
[AssetCheckoutController::class, 'create']
|
||||
)->name('checkout/hardware');
|
||||
)->name('hardware.checkout.create');
|
||||
|
||||
Route::post('{assetId}/checkout',
|
||||
[AssetCheckoutController::class, 'store']
|
||||
)->name('checkout/hardware');
|
||||
)->name('hardware.checkout.store');
|
||||
|
||||
Route::get('{assetId}/checkin/{backto?}',
|
||||
[AssetCheckinController::class, 'create']
|
||||
)->name('checkin/hardware');
|
||||
)->name('hardware.checkin.create');
|
||||
|
||||
Route::post('{assetId}/checkin/{backto?}',
|
||||
[AssetCheckinController::class, 'store']
|
||||
)->name('checkin/hardware');
|
||||
)->name('hardware.checkin.store');
|
||||
|
||||
Route::get('{assetId}/view',
|
||||
[AssetsController::class, 'show']
|
||||
|
@ -168,11 +168,11 @@ Route::group(
|
|||
// Bulk checkout / checkin
|
||||
Route::get('bulkcheckout',
|
||||
[BulkAssetsController::class, 'showCheckout']
|
||||
)->name('hardware/bulkcheckout');
|
||||
)->name('hardware.bulkcheckout.show');
|
||||
|
||||
Route::post('bulkcheckout',
|
||||
[BulkAssetsController::class, 'storeCheckout']
|
||||
)->name('hardware/bulkcheckout');
|
||||
)->name('hardware.bulkcheckout.store');
|
||||
});
|
||||
|
||||
Route::resource('hardware',
|
||||
|
|
|
@ -28,7 +28,7 @@ Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
|
|||
AssetModelsController::class,
|
||||
'getClone'
|
||||
]
|
||||
)->name('clone/model');
|
||||
)->name('models.clone.create');
|
||||
|
||||
Route::post(
|
||||
'{modelId}/clone',
|
||||
|
@ -36,7 +36,7 @@ Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
|
|||
AssetModelsController::class,
|
||||
'postCreate'
|
||||
]
|
||||
)->name('clone/model');
|
||||
)->name('models.clone.store');
|
||||
|
||||
Route::get(
|
||||
'{modelId}/view',
|
||||
|
@ -52,7 +52,7 @@ Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
|
|||
AssetModelsController::class,
|
||||
'getRestore'
|
||||
]
|
||||
)->name('restore/model');
|
||||
)->name('models.restore.store');
|
||||
|
||||
Route::get(
|
||||
'{modelId}/custom_fields',
|
||||
|
|
|
@ -38,7 +38,7 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
|
|||
Users\UsersController::class,
|
||||
'getClone'
|
||||
]
|
||||
)->name('clone/user');
|
||||
)->name('users.clone.show');
|
||||
|
||||
Route::post(
|
||||
'{userId}/clone',
|
||||
|
@ -46,7 +46,7 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
|
|||
Users\UsersController::class,
|
||||
'postCreate'
|
||||
]
|
||||
)->name('clone/user');
|
||||
)->name('users.clone.store');
|
||||
|
||||
Route::post(
|
||||
'{userId}/restore',
|
||||
|
@ -54,7 +54,7 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
|
|||
Users\UsersController::class,
|
||||
'getRestore'
|
||||
]
|
||||
)->name('restore/user');
|
||||
)->name('users.restore.store');
|
||||
|
||||
Route::get(
|
||||
'{userId}/unsuspend',
|
||||
|
|
Loading…
Reference in a new issue