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:
snipe 2022-08-02 19:41:17 -07:00
commit b0e66ae445
32 changed files with 145 additions and 112 deletions

View file

@ -2662,8 +2662,17 @@
"avatar_url": "https://avatars.githubusercontent.com/u/7991086?v=4", "avatar_url": "https://avatars.githubusercontent.com/u/7991086?v=4",
"profile": "https://github.com/reederda", "profile": "https://github.com/reederda",
"contributions": [ "contributions": [
"translations",
"translation", "translation",
"translation",
"code"
]
},
{
"login": "vickyjaura183",
"name": "vickyjaura183",
"avatar_url": "https://avatars.githubusercontent.com/u/109422491?v=4",
"profile": "https://github.com/vickyjaura183",
"contributions": [
"code" "code"
] ]
} }

View file

@ -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&amp;utm_medium=referral&amp;utm_content=snipe/snipe-it&amp;utm_campaign=Badge_Grade) ![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&amp;utm_medium=referral&amp;utm_content=snipe/snipe-it&amp;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 ## 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/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/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/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 --> <!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

View file

@ -63,7 +63,7 @@ class AccessoryCheckoutController extends Controller
$this->authorize('checkout', $accessory); $this->authorize('checkout', $accessory);
if (! $user = User::find($request->input('assigned_to'))) { 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 // Update the accessory data

View file

@ -12,6 +12,7 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Session;
use App\Http\Requests\AssetCheckoutRequest;
class BulkAssetsController extends Controller class BulkAssetsController extends Controller
{ {
@ -239,7 +240,7 @@ class BulkAssetsController extends Controller
* Process Multiple Checkout Request * Process Multiple Checkout Request
* @return View * @return View
*/ */
public function storeCheckout(Request $request) public function storeCheckout(AssetCheckoutRequest $request)
{ {
$this->authorize('checkout', Asset::class); $this->authorize('checkout', Asset::class);
@ -250,7 +251,7 @@ class BulkAssetsController extends Controller
$target = $this->determineCheckoutTarget(); $target = $this->determineCheckoutTarget();
if (! is_array($request->get('selected_assets'))) { 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')); $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')); return redirect()->to('hardware')->with('success', trans('admin/hardware/message.checkout.success'));
} }
// Redirect to the asset management page with error // 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) { } catch (ModelNotFoundException $e) {
return redirect()->to('hardware/bulk-checkout')->with('error', $e->getErrors()); return redirect()->route('hardware.bulkcheckout.show')->with('error', $e->getErrors());
} }
} }
} }

View file

@ -142,6 +142,6 @@ class SamlController extends Controller
return view('errors.403'); 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]);
} }
} }

View file

@ -56,7 +56,7 @@ class ConsumableCheckoutController extends Controller
// Check if the user exists // Check if the user exists
if (is_null($user = User::find($assigned_to))) { if (is_null($user = User::find($assigned_to))) {
// Redirect to the consumable management page with error // 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 // Update the consumable data

View file

@ -645,6 +645,12 @@ class ReportsController extends Controller
if($request->filled('exclude_archived')){ if($request->filled('exclude_archived')){
$assets->notArchived(); $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) { $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')) { if ($request->filled('warranty')) {
$row[] = ($asset->warranty_months) ? $asset->warranty_months : ''; $row[] = ($asset->warranty_months) ? $asset->warranty_months : '';
$row[] = $asset->present()->warrantee_expires(); $row[] = $asset->present()->warranty_expires();
} }
if ($request->filled('depreciation')) { if ($request->filled('depreciation')) {

View file

@ -87,7 +87,7 @@ class CustomFieldset extends Model
} }
if ($field->is_unique == '1') { if ($field->is_unique == '1') {
$rule[] = 'unique'; $rule[] = 'unique_undeleted';
} }
array_push($rule, $field->attributes['format']); array_push($rule, $field->attributes['format']);

View file

@ -498,10 +498,10 @@ class AssetPresenter extends Presenter
} }
/** /**
* Date the warantee expires. * Date the warranty expires.
* @return false|string * @return false|string
*/ */
public function warrantee_expires() public function warranty_expires()
{ {
if (($this->purchase_date) && ($this->warranty_months)) { if (($this->purchase_date) && ($this->warranty_months)) {
$date = date_create($this->purchase_date); $date = date_create($this->purchase_date);

View file

@ -371,7 +371,7 @@ class DepreciationReportPresenter extends Presenter
* Date the warantee expires. * Date the warantee expires.
* @return false|string * @return false|string
*/ */
public function warrantee_expires() public function warranty_expires()
{ {
if (($this->purchase_date) && ($this->warranty_months)) { if (($this->purchase_date) && ($this->warranty_months)) {
$date = date_create($this->purchase_date); $date = date_create($this->purchase_date);

View file

@ -102,6 +102,7 @@ return [
'email_domain_help' => 'This is used to generate email addresses when importing', 'email_domain_help' => 'This is used to generate email addresses when importing',
'error' => 'Error', 'error' => 'Error',
'exclude_archived' => 'Exclude Archived Assets', 'exclude_archived' => 'Exclude Archived Assets',
'exclude_deleted' => 'Exclude Deleted Assets',
'example' => 'Example: ', 'example' => 'Example: ',
'filastname_format' => 'First Initial Last Name (jsmith@example.com)', 'filastname_format' => 'First Initial Last Name (jsmith@example.com)',
'firstname_lastname_format' => 'First Name Last Name (jane.smith@example.com)', 'firstname_lastname_format' => 'First Name Last Name (jane.smith@example.com)',
@ -132,6 +133,7 @@ return [
'id' => 'ID', 'id' => 'ID',
'image' => 'Image', 'image' => 'Image',
'image_delete' => 'Delete Image', 'image_delete' => 'Delete Image',
'include_deleted' => 'Include Deleted Assets',
'image_upload' => 'Upload Image', '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_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.', 'filetypes_size_help' => 'Max upload size allowed is :size.',
@ -185,6 +187,7 @@ return [
'no' => 'No', 'no' => 'No',
'notes' => 'Notes', 'notes' => 'Notes',
'order_number' => 'Order Number', 'order_number' => 'Order Number',
'only_deleted' => 'Only Deleted Assets',
'page_menu' => 'Showing _MENU_ items', 'page_menu' => 'Showing _MENU_ items',
'pagination_info' => 'Showing _START_ to _END_ of _TOTAL_ items', 'pagination_info' => 'Showing _START_ to _END_ of _TOTAL_ items',
'pending' => 'Pending', 'pending' => 'Pending',

View file

@ -24,13 +24,13 @@
@if ($accessory->assigned_to != '') @if ($accessory->assigned_to != '')
@can('checkin', \App\Models\Accessory::class) @can('checkin', \App\Models\Accessory::class)
<li role="menuitem"> <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> </li>
@endcan @endcan
@else @else
@can('checkout', \App\Models\Accessory::class) @can('checkout', \App\Models\Accessory::class)
<li role="menuitem"> <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> </li>
@endcan @endcan
@endif @endif
@ -171,7 +171,7 @@
@can('checkout', \App\Models\Accessory::class) @can('checkout', \App\Models\Accessory::class)
<div class="row"> <div class="row">
<div class="col-md-12 text-center"> <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>
</div> </div>
@endcan @endcan

View file

@ -42,13 +42,13 @@
<button class="btn btn-lg btn-primary btn-block">{{ trans('general.submit') }}</button> <button class="btn btn-lg btn-primary btn-block">{{ trans('general.submit') }}</button>
</div> </div>
<div class="col-md-12 col-sm-12 col-xs-12 text-right" style="padding-top: 10px;"> <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') }} {{ trans('general.cancel') }}
</a> </a>
</div> </div>
</div> </div>
</form> </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() }} {{ csrf_field() }}
</form> </form>

View file

@ -17,7 +17,7 @@
<div class="row"> <div class="row">
<!-- left column --> <!-- left column -->
<div class="col-md-7"> <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()}} {{csrf_field()}}
<div class="box box-default"> <div class="box box-default">

View file

@ -21,7 +21,7 @@
@if ($component->assigned_to != '') @if ($component->assigned_to != '')
@can('checkin', $component) @can('checkin', $component)
<li role="menuitem"> <li role="menuitem">
<a href="{{ route('checkin/component', $component->id) }}"> <a href="{{ route('components.checkin.show', $component->id) }}">
{{ trans('admin/components/general.checkin') }} {{ trans('admin/components/general.checkin') }}
</a> </a>
</li> </li>
@ -29,7 +29,7 @@
@else @else
@can('checkout', $component) @can('checkout', $component)
<li role="menuitem"> <li role="menuitem">
<a href="{{ route('checkout/component', $component->id) }}"> <a href="{{ route('components.checkout.show', $component->id) }}">
{{ trans('admin/components/general.checkout') }} {{ trans('admin/components/general.checkout') }}
</a> </a>
</li> </li>

View file

@ -126,9 +126,20 @@
@endif @endif
@can('checkout', \App\Models\Consumable::class) @can('checkout', \App\Models\Consumable::class)
<div class="col-md-12"> <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>
@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> </div>
@endcan @endcan
@if ($consumable->notes) @if ($consumable->notes)

View file

@ -28,11 +28,11 @@
<div class="col-md-12"> <div class="col-md-12">
@if ($backto=='user') @if ($backto=='user')
<form class="form-horizontal" method="post" <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"> autocomplete="off">
@else @else
<form class="form-horizontal" method="post" <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 @endif
{{csrf_field()}} {{csrf_field()}}

View file

@ -22,7 +22,7 @@
@if (($asset->assigned_to != '') && ($asset->deleted_at=='')) @if (($asset->assigned_to != '') && ($asset->deleted_at==''))
@can('checkin', \App\Models\Asset::class) @can('checkin', \App\Models\Asset::class)
<li role="menuitem"> <li role="menuitem">
<a href="{{ route('checkin/hardware', $asset->id) }}"> <a href="{{ route('hardware.checkin.create', $asset->id) }}">
{{ trans('admin/hardware/general.checkin') }} {{ trans('admin/hardware/general.checkin') }}
</a> </a>
</li> </li>
@ -30,7 +30,7 @@
@elseif (($asset->assigned_to == '') && ($asset->deleted_at=='')) @elseif (($asset->assigned_to == '') && ($asset->deleted_at==''))
@can('checkout', \App\Models\Asset::class) @can('checkout', \App\Models\Asset::class)
<li role="menuitem"> <li role="menuitem">
<a href="{{ route('checkout/hardware', $asset->id) }}"> <a href="{{ route('hardware.checkout.create', $asset->id) }}">
{{ trans('admin/hardware/general.checkout') }} {{ trans('admin/hardware/general.checkout') }}
</a> </a>
</li> </li>
@ -574,7 +574,7 @@
@if ($asset->warranty_months) @if ($asset->warranty_months)
<div class="row{!! $asset->present()->warrantee_expires() < date("Y-m-d") ? ' warning' : '' !!}"> <div class="row">
<div class="col-md-2"> <div class="col-md-2">
<strong> <strong>
{{ trans('admin/hardware/form.warranty') }} {{ trans('admin/hardware/form.warranty') }}
@ -584,10 +584,26 @@
{{ $asset->warranty_months }} {{ $asset->warranty_months }}
{{ trans('admin/hardware/form.months') }} {{ trans('admin/hardware/form.months') }}
({{ trans('admin/hardware/form.expires') }}
{{ $asset->present()->warrantee_expires() }})
</div> </div>
</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 @endif
@if (($asset->model) && ($asset->depreciation)) @if (($asset->model) && ($asset->depreciation))
@ -600,8 +616,7 @@
<div class="col-md-6"> <div class="col-md-6">
{{ $asset->depreciation->name }} {{ $asset->depreciation->name }}
({{ $asset->depreciation->months }} ({{ $asset->depreciation->months }}
{{ trans('admin/hardware/form.months') }} {{ trans('admin/hardware/form.months') }})
)
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -611,13 +626,10 @@
</strong> </strong>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@if ($asset->time_until_depreciated()->y > 0) {{ Helper::getFormattedDateObject($asset->depreciated_date()->format('Y-m-d'), 'date', false) }}
{{ $asset->time_until_depreciated()->y }} -
{{ trans('admin/hardware/form.years') }}, {{ Carbon::parse($asset->depreciated_date())->diffForHumans() }}
@endif
{{ $asset->time_until_depreciated()->m }}
{{ trans('admin/hardware/form.months') }}
({{ $asset->depreciated_date()->format('Y-m-d') }})
</div> </div>
</div> </div>
@endif @endif
@ -644,19 +656,8 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
{{ Helper::getFormattedDateObject($asset->present()->eol_date(), 'date', false) }} {{ Helper::getFormattedDateObject($asset->present()->eol_date(), 'date', false) }}
@if ($asset->present()->months_until_eol())
- -
@if ($asset->present()->months_until_eol()->y > 0) {{ Carbon::parse($asset->present()->eol_date())->diffForHumans() }}
{{ $asset->present()->months_until_eol()->y }}
{{ trans('general.years') }},
@endif
{{ $asset->present()->months_until_eol()->m }}
{{ trans('general.months') }}
@endif
</div> </div>
</div> </div>

View file

@ -316,11 +316,14 @@
{{ trans('general.viewassets') }} {{ trans('general.viewassets') }}
</a></li> </a></li>
@can('viewRequestable', \App\Models\Asset::class)
<li {!! (Request::is('account/requested') ? ' class="active"' : '') !!}> <li {!! (Request::is('account/requested') ? ' class="active"' : '') !!}>
<a href="{{ route('account.requested') }}"> <a href="{{ route('account.requested') }}">
<i class="fas fa-check fa-disk fa-fw" aria-hidden="true"></i> <i class="fas fa-check fa-disk fa-fw" aria-hidden="true"></i>
{{ trans('general.requested_assets_menu') }} {{ trans('general.requested_assets_menu') }}
</a></li> </a></li>
@endcan
<li {!! (Request::is('account/accept') ? ' class="active"' : '') !!}> <li {!! (Request::is('account/accept') ? ' class="active"' : '') !!}>
<a href="{{ route('account.accept') }}"> <a href="{{ route('account.accept') }}">
<i class="fas fa-check fa-disk fa-fw"></i> <i class="fas fa-check fa-disk fa-fw"></i>
@ -354,11 +357,11 @@
<li class="divider"></li> <li class="divider"></li>
<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') }} <i class="fa fa-sign-out fa-fw"></i> {{ trans('general.logout') }}
</a> </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() }} {{ csrf_field() }}
</form> </form>
@ -486,7 +489,7 @@
@can('checkout', \App\Models\Asset::class) @can('checkout', \App\Models\Asset::class)
<li{!! (Request::is('hardware/bulkcheckout') ? ' class="active"' : '') !!}> <li{!! (Request::is('hardware/bulkcheckout') ? ' class="active"' : '') !!}>
<a href="{{ route('hardware/bulkcheckout') }}"> <a href="{{ route('hardware.bulkcheckout.show') }}">
{{ trans('general.bulk_checkout') }} {{ trans('general.bulk_checkout') }}
</a> </a>
</li> </li>

View file

@ -7,21 +7,6 @@
@parent @parent
@stop @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 --}} {{-- Page content --}}
@section('content') @section('content')
<div class="row"> <div class="row">
@ -78,8 +63,8 @@
<span class="caret"></span> <span class="caret"></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="{{ route('licenses.edit', $user->id) }}">{{ trans('admin/users/general.edit') }}</a></li> <li><a href="{{ route('licenses.edit', $license->id) }}">{{ trans('admin/licenses/general.edit') }}</a></li>
<li><a href="{{ route('clone/license', $user->id) }}">{{ trans('admin/users/general.clone') }}</a></li> <li><a href="{{ route('clone/license', $license->id) }}">{{ trans('admin/licenses/general.clone') }}</a></li>
</ul> </ul>
</li> </li>
@endcan @endcan

View file

@ -16,10 +16,10 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
@if ($model->deleted_at=='') @if ($model->deleted_at=='')
<li><a href="{{ route('models.edit', $model->id) }}">{{ trans('admin/models/table.edit') }}</a></li> <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> <li><a href="{{ route('hardware.create', ['model_id' => $model->id]) }}">{{ trans('admin/hardware/form.create') }}</a></li>
@else @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 @endif
</ul> </ul>
</div> </div>
@ -316,7 +316,7 @@
@can('create', \App\Models\AssetModel::class) @can('create', \App\Models\AssetModel::class)
<div class="col-md-12" style="padding-bottom: 5px;"> <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> </div>
@endcan @endcan

View file

@ -6,8 +6,8 @@
<tr><td>&nbsp;</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> <tr><td>&nbsp;</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) @foreach ($assets as $asset)
@php @php
$expires = Helper::getFormattedDateObject($asset->present()->warrantee_expires, 'date'); $expires = Helper::getFormattedDateObject($asset->present()->warranty_expires, 'date');
$diff = round(abs(strtotime($asset->present()->warrantee_expires) - strtotime(date('Y-m-d')))/86400); $diff = round(abs(strtotime($asset->present()->warranty_expires) - strtotime(date('Y-m-d')))/86400);
$icon = ($diff <= ($threshold / 2)) ? '🚨' : (($diff <= $threshold) ? '⚠️' : ' '); $icon = ($diff <= ($threshold / 2)) ? '🚨' : (($diff <= $threshold) ? '⚠️' : ' ');
@endphp @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> <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>

View file

@ -352,6 +352,20 @@
</label> </label>
</div> </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> </div>

View file

@ -113,7 +113,7 @@
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="{{ route('users.edit', $user->id) }}">{{ trans('admin/users/general.edit') }}</a></li> <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=='')) @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> <li><a href="{{ route('users.destroy', $user->id) }}">{{ trans('button.delete') }}</a></li>
@endif @endif
@ -173,7 +173,7 @@
@can('create', $user) @can('create', $user)
<div class="col-md-12" style="padding-top: 5px;"> <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> </div>
@endcan @endcan
@ -228,7 +228,7 @@
</div> </div>
@else @else
<div class="col-md-12" style="padding-top: 5px;"> <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 @csrf
<button style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('button.restore') }}</button> <button style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('button.restore') }}</button>
</form> </form>
@ -730,7 +730,7 @@
</td> </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('accessories.checkin.show', array('accessoryID'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
@endcan @endcan
</td> </td>
</tr> </tr>

View file

@ -467,12 +467,12 @@ Route::group(['middleware' => 'web'], function () {
Route::get( Route::get(
'logout', 'logout',
[LoginController::class, 'logout'] [LoginController::class, 'logout']
)->name('logout'); )->name('logout.get');
Route::post( Route::post(
'logout', 'logout',
[LoginController::class, 'logout'] [LoginController::class, 'logout']
)->name('logout'); )->name('logout.post');
}); });
//Auth::routes(); //Auth::routes();

View file

@ -10,22 +10,22 @@ Route::group(['prefix' => 'accessories', 'middleware' => ['auth']], function ()
Route::get( Route::get(
'{accessoryID}/checkout', '{accessoryID}/checkout',
[Accessories\AccessoryCheckoutController::class, 'create'] [Accessories\AccessoryCheckoutController::class, 'create']
)->name('checkout/accessory'); )->name('accessories.checkout.show');
Route::post( Route::post(
'{accessoryID}/checkout', '{accessoryID}/checkout',
[Accessories\AccessoryCheckoutController::class, 'store'] [Accessories\AccessoryCheckoutController::class, 'store']
)->name('checkout/accessory'); )->name('accessories.checkout.store');
Route::get( Route::get(
'{accessoryID}/checkin/{backto?}', '{accessoryID}/checkin/{backto?}',
[Accessories\AccessoryCheckinController::class, 'create'] [Accessories\AccessoryCheckinController::class, 'create']
)->name('checkin/accessory'); )->name('accessories.checkin.show');
Route::post( Route::post(
'{accessoryID}/checkin/{backto?}', '{accessoryID}/checkin/{backto?}',
[Accessories\AccessoryCheckinController::class, 'store'] [Accessories\AccessoryCheckinController::class, 'store']
)->name('checkin/accessory'); )->name('accessories.checkin.store');
}); });

View file

@ -8,22 +8,22 @@ Route::group(['prefix' => 'components', 'middleware' => ['auth']], function () {
Route::get( Route::get(
'{componentID}/checkout', '{componentID}/checkout',
[Components\ComponentCheckoutController::class, 'create'] [Components\ComponentCheckoutController::class, 'create']
)->name('checkout/component'); )->name('components.checkout.show');
Route::post( Route::post(
'{componentID}/checkout', '{componentID}/checkout',
[Components\ComponentCheckoutController::class, 'store'] [Components\ComponentCheckoutController::class, 'store']
)->name('checkout/component'); )->name('components.checkout.store');
Route::get( Route::get(
'{componentID}/checkin/{backto?}', '{componentID}/checkin/{backto?}',
[Components\ComponentCheckinController::class, 'create'] [Components\ComponentCheckinController::class, 'create']
)->name('checkin/component'); )->name('components.checkin.show');
Route::post( Route::post(
'{componentID}/checkin/{backto?}', '{componentID}/checkin/{backto?}',
[Components\ComponentCheckinController::class, 'store'] [Components\ComponentCheckinController::class, 'store']
)->name('component.checkin.save'); )->name('components.checkin.store');
}); });

View file

@ -9,12 +9,12 @@ Route::group(['prefix' => 'consumables', 'middleware' => ['auth']], function ()
Route::get( Route::get(
'{consumablesID}/checkout', '{consumablesID}/checkout',
[Consumables\ConsumableCheckoutController::class, 'create'] [Consumables\ConsumableCheckoutController::class, 'create']
)->name('checkout/consumable'); )->name('consumables.checkout.show');
Route::post( Route::post(
'{consumablesID}/checkout', '{consumablesID}/checkout',
[Consumables\ConsumableCheckoutController::class, 'store'] [Consumables\ConsumableCheckoutController::class, 'store']
)->name('checkout/consumable'); )->name('consumables.checkout.store');
}); });

View file

@ -108,19 +108,19 @@ Route::group(
Route::get('{assetId}/checkout', Route::get('{assetId}/checkout',
[AssetCheckoutController::class, 'create'] [AssetCheckoutController::class, 'create']
)->name('checkout/hardware'); )->name('hardware.checkout.create');
Route::post('{assetId}/checkout', Route::post('{assetId}/checkout',
[AssetCheckoutController::class, 'store'] [AssetCheckoutController::class, 'store']
)->name('checkout/hardware'); )->name('hardware.checkout.store');
Route::get('{assetId}/checkin/{backto?}', Route::get('{assetId}/checkin/{backto?}',
[AssetCheckinController::class, 'create'] [AssetCheckinController::class, 'create']
)->name('checkin/hardware'); )->name('hardware.checkin.create');
Route::post('{assetId}/checkin/{backto?}', Route::post('{assetId}/checkin/{backto?}',
[AssetCheckinController::class, 'store'] [AssetCheckinController::class, 'store']
)->name('checkin/hardware'); )->name('hardware.checkin.store');
Route::get('{assetId}/view', Route::get('{assetId}/view',
[AssetsController::class, 'show'] [AssetsController::class, 'show']
@ -168,11 +168,11 @@ Route::group(
// Bulk checkout / checkin // Bulk checkout / checkin
Route::get('bulkcheckout', Route::get('bulkcheckout',
[BulkAssetsController::class, 'showCheckout'] [BulkAssetsController::class, 'showCheckout']
)->name('hardware/bulkcheckout'); )->name('hardware.bulkcheckout.show');
Route::post('bulkcheckout', Route::post('bulkcheckout',
[BulkAssetsController::class, 'storeCheckout'] [BulkAssetsController::class, 'storeCheckout']
)->name('hardware/bulkcheckout'); )->name('hardware.bulkcheckout.store');
}); });
Route::resource('hardware', Route::resource('hardware',

View file

@ -28,7 +28,7 @@ Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
AssetModelsController::class, AssetModelsController::class,
'getClone' 'getClone'
] ]
)->name('clone/model'); )->name('models.clone.create');
Route::post( Route::post(
'{modelId}/clone', '{modelId}/clone',
@ -36,7 +36,7 @@ Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
AssetModelsController::class, AssetModelsController::class,
'postCreate' 'postCreate'
] ]
)->name('clone/model'); )->name('models.clone.store');
Route::get( Route::get(
'{modelId}/view', '{modelId}/view',
@ -52,7 +52,7 @@ Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
AssetModelsController::class, AssetModelsController::class,
'getRestore' 'getRestore'
] ]
)->name('restore/model'); )->name('models.restore.store');
Route::get( Route::get(
'{modelId}/custom_fields', '{modelId}/custom_fields',

View file

@ -38,7 +38,7 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
Users\UsersController::class, Users\UsersController::class,
'getClone' 'getClone'
] ]
)->name('clone/user'); )->name('users.clone.show');
Route::post( Route::post(
'{userId}/clone', '{userId}/clone',
@ -46,7 +46,7 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
Users\UsersController::class, Users\UsersController::class,
'postCreate' 'postCreate'
] ]
)->name('clone/user'); )->name('users.clone.store');
Route::post( Route::post(
'{userId}/restore', '{userId}/restore',
@ -54,7 +54,7 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
Users\UsersController::class, Users\UsersController::class,
'getRestore' 'getRestore'
] ]
)->name('restore/user'); )->name('users.restore.store');
Route::get( Route::get(
'{userId}/unsuspend', '{userId}/unsuspend',