Merge remote-tracking branch 'origin/master' into develop

Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	README.md
#	app/Http/Controllers/Accessories/AccessoriesController.php
#	app/Http/Controllers/Api/AssetMaintenancesController.php
#	app/Http/Controllers/Api/AssetModelsController.php
#	app/Http/Controllers/Api/AssetsController.php
#	app/Http/Controllers/Api/UsersController.php
#	app/Http/Controllers/AssetMaintenancesController.php
#	app/Http/Controllers/Assets/AssetFilesController.php
#	app/Http/Controllers/Assets/AssetsController.php
#	app/Http/Controllers/Assets/BulkAssetsController.php
#	app/Http/Controllers/Components/ComponentsController.php
#	app/Http/Controllers/Consumables/ConsumablesController.php
#	app/Http/Controllers/Licenses/LicenseFilesController.php
#	app/Http/Controllers/Licenses/LicensesController.php
#	app/Http/Controllers/Users/UserFilesController.php
#	app/Http/Transformers/AssetsTransformer.php
#	app/Http/Transformers/LicensesTransformer.php
#	app/Importer/UserImporter.php
#	app/Models/Asset.php
#	config/app.php
#	config/version.php
#	package-lock.json
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
#	resources/lang/en/admin/users/message.php
#	resources/lang/is/button.php
#	resources/lang/ja/admin/kits/general.php
#	resources/lang/ro/admin/users/general.php
#	resources/lang/zh-HK/admin/depreciations/general.php
#	resources/lang/zh-HK/admin/models/general.php
#	resources/views/hardware/qr-view.blade.php
#	resources/views/hardware/view.blade.php
#	resources/views/partials/bootstrap-table.blade.php
#	resources/views/users/view.blade.php
#	routes/web.php
#	routes/web/hardware.php
#	routes/web/models.php
#	routes/web/users.php
This commit is contained in:
snipe 2021-10-20 17:26:41 -07:00
commit aa8f1378c9
308 changed files with 1128 additions and 976 deletions

View file

@ -2396,6 +2396,87 @@
"contributions": [
"code"
]
},
{
"login": "AL4AL",
"name": "ALPHA",
"avatar_url": "https://avatars.githubusercontent.com/u/22044358?v=4",
"profile": "https://github.com/AL4AL",
"contributions": [
"code"
]
},
{
"login": "FliegenKLATSCH",
"name": "FliegenKLATSCH",
"avatar_url": "https://avatars.githubusercontent.com/u/1042587?v=4",
"profile": "https://www.ifern.de",
"contributions": [
"code"
]
},
{
"login": "jerm",
"name": "Jeremy Price",
"avatar_url": "https://avatars.githubusercontent.com/u/442138?v=4",
"profile": "https://github.com/jerm",
"contributions": [
"code"
]
},
{
"login": "Toreg87",
"name": "Toreg87",
"avatar_url": "https://avatars.githubusercontent.com/u/84392209?v=4",
"profile": "https://github.com/Toreg87",
"contributions": [
"code"
]
},
{
"login": "Computroniks",
"name": "Matthew Nickson",
"avatar_url": "https://avatars.githubusercontent.com/u/67638596?v=4",
"profile": "https://github.com/Computroniks",
"contributions": [
"code"
]
},
{
"login": "jethron",
"name": "Jethro Nederhof",
"avatar_url": "https://avatars.githubusercontent.com/u/1646397?v=4",
"profile": "https://jethron.id.au",
"contributions": [
"code"
]
},
{
"login": "01ste02",
"name": "Oskar Stenberg",
"avatar_url": "https://avatars.githubusercontent.com/u/23289826?v=4",
"profile": "https://github.com/01ste02",
"contributions": [
"code"
]
},
{
"login": "Robert-Azelis",
"name": "Robert-Azelis",
"avatar_url": "https://avatars.githubusercontent.com/u/82208283?v=4",
"profile": "https://github.com/Robert-Azelis",
"contributions": [
"code"
]
},
{
"login": "alwism",
"name": "Alexander William Smith",
"avatar_url": "https://avatars.githubusercontent.com/u/60648387?v=4",
"profile": "https://github.com/alwism",
"contributions": [
"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)
[![All Contributors](https://img.shields.io/badge/all_contributors-262-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-271-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
@ -128,8 +128,8 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/9255772?v=4" width="110px;"/><br /><sub>Mark Stenglein</sub>](https://markstenglein.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ocelotsloth "Code") | [<img src="https://avatars.githubusercontent.com/u/35658596?v=4" width="110px;"/><br /><sub>ajsy</sub>](https://github.com/ajsy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ajsy "Code") | [<img src="https://avatars.githubusercontent.com/u/3628035?v=4" width="110px;"/><br /><sub>Jan Kiesewetter</sub>](https://github.com/t3easy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=t3easy "Code") | [<img src="https://avatars.githubusercontent.com/u/79449630?v=4" width="110px;"/><br /><sub>Tetrachloromethane250</sub>](https://github.com/Tetrachloromethane250)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Tetrachloromethane250 "Code") | [<img src="https://avatars.githubusercontent.com/u/22004482?v=4" width="110px;"/><br /><sub>Lars Kajes</sub>](https://www.kajes.se/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=kajes "Code") | [<img src="https://avatars.githubusercontent.com/u/13993216?v=4" width="110px;"/><br /><sub>Joly0</sub>](https://github.com/Joly0)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Joly0 "Code") | [<img src="https://avatars.githubusercontent.com/u/1501022?v=4" width="110px;"/><br /><sub>theburger</sub>](https://github.com/limeless)<br />[💻](https://github.com/snipe/snipe-it/commits?author=limeless "Code") |
| [<img src="https://avatars.githubusercontent.com/u/36065681?v=4" width="110px;"/><br /><sub>David Valin Alonso</sub>](https://github.com/deivishome)<br />[💻](https://github.com/snipe/snipe-it/commits?author=deivishome "Code") | [<img src="https://avatars.githubusercontent.com/u/8290389?v=4" width="110px;"/><br /><sub>andreaci</sub>](https://github.com/andreaci)<br />[💻](https://github.com/snipe/snipe-it/commits?author=andreaci "Code") | [<img src="https://avatars.githubusercontent.com/u/1828542?v=4" width="110px;"/><br /><sub>Jelle Sebreghts</sub>](http://www.jellesebreghts.be)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Jelle-S "Code") | [<img src="https://avatars.githubusercontent.com/u/11180862?v=4" width="110px;"/><br /><sub>Michael Pietsch</sub>](https://github.com/Skywalker-11)<br /> | [<img src="https://avatars.githubusercontent.com/u/22068886?v=4" width="110px;"/><br /><sub>Masudul Haque Shihab</sub>](https://github.com/sh1hab)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sh1hab "Code") | [<img src="https://avatars.githubusercontent.com/u/16099942?v=4" width="110px;"/><br /><sub>Supapong Areeprasertkul</sub>](http://www.freedomdive.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=zybersup "Code") | [<img src="https://avatars.githubusercontent.com/u/207358?v=4" width="110px;"/><br /><sub>Peter Sarossy</sub>](https://github.com/psarossy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=psarossy "Code") |
| [<img src="https://avatars.githubusercontent.com/u/11823649?v=4" width="110px;"/><br /><sub>Renee Margaret McConahy</sub>](https://github.com/nepella)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nepella "Code") | [<img src="https://avatars.githubusercontent.com/u/5553884?v=4" width="110px;"/><br /><sub>JohnnyPicnic</sub>](https://github.com/JohnnyPicnic)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JohnnyPicnic "Code") | [<img src="https://avatars.githubusercontent.com/u/8799594?v=4" width="110px;"/><br /><sub>markbrule</sub>](https://github.com/markbrule)<br />[💻](https://github.com/snipe/snipe-it/commits?author=markbrule "Code") | [<img src="https://avatars.githubusercontent.com/u/1962801?v=4" width="110px;"/><br /><sub>Mike Campbell</sub>](https://github.com/mikecmpbll)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mikecmpbll "Code") | [<img src="https://avatars.githubusercontent.com/u/11973217?v=4" width="110px;"/><br /><sub>tbrconnect</sub>](https://github.com/tbrconnect)<br />[💻](https://github.com/snipe/snipe-it/commits?author=tbrconnect "Code") | [<img src="https://avatars.githubusercontent.com/u/12447225?v=4" width="110px;"/><br /><sub>kcoyo</sub>](https://github.com/kcoyo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=kcoyo "Code") | [<img src="https://avatars.githubusercontent.com/u/494017?v=4" width="110px;"/><br /><sub>Travis Miller</sub>](https://travismiller.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=travismiller "Code") |
| [<img src="https://avatars.githubusercontent.com/u/8735148?v=4" width="110px;"/><br /><sub>Petri Asikainen</sub>](https://github.com/PetriAsi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PetriAsi "Code") | [<img src="https://avatars.githubusercontent.com/u/11424540?v=4" width="110px;"/><br /><sub>derdeagle</sub>](https://github.com/derdeagle)<br />[💻](https://github.com/snipe/snipe-it/commits?author=derdeagle "Code") | [<img src="https://avatars.githubusercontent.com/u/176950?v=4" width="110px;"/><br /><sub>Mike Frysinger</sub>](https://wh0rd.org/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vapier "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1975640?v=4" width="110px;"/><br /><sub>Evan Taylor</sub>](https://github.com/Delta5)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Delta5 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/8735148?v=4" width="110px;"/><br /><sub>Petri Asikainen</sub>](https://github.com/PetriAsi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PetriAsi "Code") | [<img src="https://avatars.githubusercontent.com/u/11424540?v=4" width="110px;"/><br /><sub>derdeagle</sub>](https://github.com/derdeagle)<br />[💻](https://github.com/snipe/snipe-it/commits?author=derdeagle "Code") | [<img src="https://avatars.githubusercontent.com/u/176950?v=4" width="110px;"/><br /><sub>Mike Frysinger</sub>](https://wh0rd.org/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vapier "Code") | [<img src="https://avatars.githubusercontent.com/u/22044358?v=4" width="110px;"/><br /><sub>ALPHA</sub>](https://github.com/AL4AL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AL4AL "Code") | [<img src="https://avatars.githubusercontent.com/u/1042587?v=4" width="110px;"/><br /><sub>FliegenKLATSCH</sub>](https://www.ifern.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FliegenKLATSCH "Code") | [<img src="https://avatars.githubusercontent.com/u/442138?v=4" width="110px;"/><br /><sub>Jeremy Price</sub>](https://github.com/jerm)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jerm "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") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

View file

@ -402,6 +402,19 @@ class Helper
*/
public static function ParseFloat($floatString)
{
/*******
*
* WARNING: This does conversions based on *locale* - a Unix-ey-like thing.
*
* Everything else in the system tends to convert based on the Snipe-IT settings
*
* So it's very likely this is *not* what you want - instead look for the new
*
* ParseCurrency($currencyString)
*
* Which should be directly below here
*
*/
$LocaleInfo = localeconv();
$floatString = str_replace(',', '', $floatString);
$floatString = str_replace($LocaleInfo['decimal_point'], '.', $floatString);
@ -417,6 +430,26 @@ class Helper
return floatval($floatString);
}
/**
* Format currency using comma or period for thousands, and period or comma for decimal, based on settings.
*
* @author [B. Wetherington] [<bwetherington@grokability.com>]
* @since [v5.2]
* @return Float
*/
public static function ParseCurrency($currencyString) {
$without_currency = str_replace(Setting::getSettings()->default_currency, '', $currencyString); //generally shouldn't come up, since we don't do this in fields, but just in case it does...
if(Setting::getSettings()->digit_separator=='1.234,56') {
//EU format
$without_thousands = str_replace('.', '', $without_currency);
$corrected_decimal = str_replace(',', '.', $without_thousands);
} else {
$without_thousands = str_replace(',', '', $without_currency);
$corrected_decimal = $without_thousands; // decimal is already OK
}
return floatval($corrected_decimal);
}
/**
* Get the list of status labels in an array to make a dropdown menu
*

View file

@ -75,7 +75,7 @@ class AccessoriesController extends Controller
$accessory->manufacturer_id = request('manufacturer_id');
$accessory->model_number = request('model_number');
$accessory->purchase_date = request('purchase_date');
$accessory->purchase_cost = Helper::ParseFloat(request('purchase_cost'));
$accessory->purchase_cost = Helper::ParseCurrency(request('purchase_cost'));
$accessory->qty = request('qty');
$accessory->user_id = Auth::user()->id;
$accessory->supplier_id = request('supplier_id');
@ -101,6 +101,7 @@ class AccessoriesController extends Controller
*/
public function edit($accessoryId = null)
{
if ($item = Accessory::find($accessoryId)) {
$this->authorize($item);
@ -108,8 +109,10 @@ class AccessoriesController extends Controller
}
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
}
/**
* Save edited Accessory from form post
*
@ -137,7 +140,7 @@ class AccessoriesController extends Controller
$accessory->order_number = request('order_number');
$accessory->model_number = request('model_number');
$accessory->purchase_date = request('purchase_date');
$accessory->purchase_cost = request('purchase_cost');
$accessory->purchase_cost = Helper::ParseCurrency(request('purchase_cost'));
$accessory->qty = request('qty');
$accessory->supplier_id = request('supplier_id');
@ -167,6 +170,7 @@ class AccessoriesController extends Controller
$this->authorize($accessory);
if ($accessory->hasUsers() > 0) {
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.assoc_users', ['count'=> $accessory->hasUsers()]));
}
@ -184,6 +188,7 @@ class AccessoriesController extends Controller
return redirect()->route('accessories.index')->with('success', trans('admin/accessories/message.delete.success'));
}
/**
* Returns a view that invokes the ajax table which contains
* the content for the accessory detail view, which is generated in getDataView.

View file

@ -21,6 +21,8 @@ use Illuminate\Support\Facades\Input;
*/
class AssetMaintenancesController extends Controller
{
/**
* Generates the JSON response for asset maintenances listing view.
*
@ -82,10 +84,12 @@ class AssetMaintenancesController extends Controller
$total = $maintenances->count();
$maintenances = $maintenances->skip($offset)->take($limit)->get();
return (new AssetMaintenancesTransformer())->transformAssetMaintenances($maintenances, $total);
}
/**
* Validates and stores the new asset maintenance
*
@ -101,7 +105,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance = new AssetMaintenance();
$assetMaintenance->supplier_id = $request->input('supplier_id');
$assetMaintenance->is_warranty = $request->input('is_warranty');
$assetMaintenance->cost = e($request->input('cost'));
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->notes = e($request->input('notes'));
$asset = Asset::find(e($request->input('asset_id')));
@ -129,9 +133,11 @@ class AssetMaintenancesController extends Controller
// Was the asset maintenance created?
if ($assetMaintenance->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $assetMaintenance, trans('admin/asset_maintenances/message.create.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, $assetMaintenance->getErrors()));
}
/**
@ -155,7 +161,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance->supplier_id = e($request->input('supplier_id'));
$assetMaintenance->is_warranty = e($request->input('is_warranty'));
$assetMaintenance->cost = Helper::ParseFloat(e($request->input('cost')));
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->notes = e($request->input('notes'));
$asset = Asset::find(request('asset_id'));
@ -192,6 +198,7 @@ class AssetMaintenancesController extends Controller
// Was the asset maintenance created?
if ($assetMaintenance->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $assetMaintenance, trans('admin/asset_maintenances/message.edit.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, $assetMaintenance->getErrors()));
@ -218,6 +225,8 @@ class AssetMaintenancesController extends Controller
$assetMaintenance->delete();
return response()->json(Helper::formatStandardApiResponse('success', $assetMaintenance, trans('admin/asset_maintenances/message.delete.success')));
}
/**
@ -237,5 +246,6 @@ class AssetMaintenancesController extends Controller
}
return (new AssetMaintenancesTransformer())->transformAssetMaintenance($assetMaintenance);
}
}

View file

@ -66,7 +66,7 @@ class AssetModelsController extends Controller
->with('category', 'depreciation', 'manufacturer', 'fieldset')
->withCount('assets as assets_count');
if ($request->filled('status')) {
if ($request->input('status')=='deleted') {
$assetmodels->onlyTrashed();
}
@ -102,6 +102,7 @@ class AssetModelsController extends Controller
return (new AssetModelsTransformer)->transformAssetModels($assetmodels, $total);
}
/**
* Store a newly created resource in storage.
*
@ -120,8 +121,9 @@ class AssetModelsController extends Controller
if ($assetmodel->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $assetmodel, trans('admin/models/message.create.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, $assetmodel->getErrors()));
}
/**
@ -156,6 +158,7 @@ class AssetModelsController extends Controller
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
}
/**
* Update the specified resource in storage.
*
@ -184,6 +187,7 @@ class AssetModelsController extends Controller
$assetmodel->fieldset_id = $request->get('custom_fieldset_id');
}
if ($assetmodel->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $assetmodel, trans('admin/models/message.update.success')));
}

View file

@ -188,6 +188,8 @@ class AssetsController extends Controller
}
}
// This is used by the sidenav, mostly
// We switched from using query scopes here because of a Laravel bug
@ -314,11 +316,24 @@ class AssetsController extends Controller
$total = $assets->count();
$assets = $assets->skip($offset)->take($limit)->get();
/**
* Include additional associated relationships
*/
if ($request->input('components')) {
$assets->loadMissing(['components' => function ($query) {
$query->orderBy('created_at', 'desc');
}]);
}
/**
* Here we're just determining which Transformer (via $transformer) to use based on the
* variables we set earlier on in this method - we default to AssetsTransformer.
*/
return (new $transformer)->transformAssets($assets, $total);
return (new $transformer)->transformAssets($assets, $total, $request);
}
/**
@ -329,15 +344,16 @@ class AssetsController extends Controller
* @since [v4.2.1]
* @return JsonResponse
*/
public function showByTag($tag)
public function showByTag(Request $request, $tag)
{
if ($asset = Asset::with('assetstatus')->with('assignedTo')->where('asset_tag', $tag)->first()) {
$this->authorize('view', $asset);
return (new AssetsTransformer)->transformAsset($asset);
return (new AssetsTransformer)->transformAsset($asset, $request);
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 200);
}
/**
@ -348,15 +364,16 @@ class AssetsController extends Controller
* @since [v4.2.1]
* @return JsonResponse
*/
public function showBySerial($serial)
public function showBySerial(Request $request, $serial)
{
$this->authorize('index', Asset::class);
if ($assets = Asset::with('assetstatus')->with('assignedTo')
->withTrashed()->where('serial', $serial)->get()) {
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 200);
}
@ -368,19 +385,19 @@ class AssetsController extends Controller
* @since [v4.0]
* @return JsonResponse
*/
public function show($id)
public function show(Request $request, $id)
{
if ($asset = Asset::with('assetstatus')->with('assignedTo')->withTrashed()
->withCount('checkins as checkins_count', 'checkouts as checkouts_count', 'userRequests as user_requests_count')->findOrFail($id)) {
$this->authorize('view', $asset);
return (new AssetsTransformer)->transformAsset($asset);
return (new AssetsTransformer)->transformAsset($asset, $request->input('components') );
}
}
public function licenses($id)
public function licenses(Request $request, $id)
{
$this->authorize('view', Asset::class);
$this->authorize('view', License::class);
@ -446,6 +463,7 @@ class AssetsController extends Controller
return (new SelectlistTransformer)->transformSelectlist($assets);
}
/**
* Accepts a POST request to create a new asset
*
@ -474,7 +492,7 @@ class AssetsController extends Controller
$asset->depreciate = '0';
$asset->status_id = $request->get('status_id', 0);
$asset->warranty_months = $request->get('warranty_months', null);
$asset->purchase_cost = Helper::ParseFloat($request->get('purchase_cost'));
$asset->purchase_cost = Helper::ParseCurrency($request->get('purchase_cost')); // this is the API's store method, so I don't know that I want to do this? Confusing. FIXME (or not?!)
$asset->purchase_date = $request->get('purchase_date', null);
$asset->assigned_to = $request->get('assigned_to', null);
$asset->supplier_id = $request->get('supplier_id', 0);
@ -550,6 +568,7 @@ class AssetsController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()), 200);
}
/**
* Accepts a POST request to update an asset
*

View file

@ -223,7 +223,7 @@ class ComponentsController extends Controller
$this->authorize('checkout', $component);
if ($component->numRemaining() > $request->get('assigned_qty')) {
if ($component->numRemaining() >= $request->get('assigned_qty')) {
if (!$asset = Asset::find($request->input('assigned_to'))) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')));

View file

@ -68,6 +68,7 @@ class UsersController extends Controller
->withCount('assets as assets_count', 'licenses as licenses_count', 'accessories as accessories_count', 'consumables as consumables_count');
$users = Company::scopeCompanyables($users);
if (($request->filled('deleted')) && ($request->input('deleted') == 'true')) {
$users = $users->onlyTrashed();
} elseif (($request->filled('all')) && ($request->input('all') == 'true')) {
@ -144,6 +145,7 @@ class UsersController extends Controller
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
switch ($request->input('sort')) {
case 'manager':
$users = $users->OrderManager($order);
@ -233,6 +235,8 @@ class UsersController extends Controller
return (new SelectlistTransformer)->transformSelectlist($users);
}
/**
* Store a newly created resource in storage.
*
@ -291,6 +295,7 @@ class UsersController extends Controller
return (new UsersTransformer)->transformUser($user);
}
/**
* Update the specified resource in storage.
*
@ -320,6 +325,7 @@ class UsersController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, 'Permission denied. You cannot update user information via API on the demo.'));
}
$user->fill($request->all());
if ($user->id == $request->input('manager_id')) {
@ -343,6 +349,8 @@ class UsersController extends Controller
$user->permissions = $permissions_array;
}
// Update the location of any assets checked out to this user
Asset::where('assigned_type', User::class)
->where('assigned_to', $user->id)->update(['location_id' => $request->input('location_id', null)]);
@ -366,6 +374,7 @@ class UsersController extends Controller
$user->groups()->sync([]);
}
return response()->json(Helper::formatStandardApiResponse('success', (new UsersTransformer)->transformUser($user), trans('admin/users/message.success.update')));
}
@ -427,13 +436,13 @@ class UsersController extends Controller
* @param $userId
* @return string JSON
*/
public function assets($id)
public function assets(Request $request, $id)
{
$this->authorize('view', User::class);
$this->authorize('view', Asset::class);
$assets = Asset::where('assigned_to', '=', $id)->where('assigned_type', '=', User::class)->with('model')->get();
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
return (new AssetsTransformer)->transformAssets($assets, $assets->count(), $request);
}
/**
@ -496,8 +505,9 @@ class UsersController extends Controller
return response()->json(['message' => trans('admin/settings/general.two_factor_reset_error')], 500);
}
}
return response()->json(['message' => 'No ID provided'], 500);
}
/**

View file

@ -98,7 +98,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance = new AssetMaintenance();
$assetMaintenance->supplier_id = $request->input('supplier_id');
$assetMaintenance->is_warranty = $request->input('is_warranty');
$assetMaintenance->cost = $request->input('cost');
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->notes = $request->input('notes');
$asset = Asset::find($request->input('asset_id'));
@ -206,7 +206,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance->supplier_id = $request->input('supplier_id');
$assetMaintenance->is_warranty = $request->input('is_warranty');
$assetMaintenance->cost = Helper::ParseFloat($request->input('cost'));
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->notes = $request->input('notes');
$asset = Asset::find(request('asset_id'));

View file

@ -9,6 +9,8 @@ use App\Models\Actionlog;
use App\Models\Asset;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Storage;
use App\Helpers\StorageHelper;
use enshrined\svgSanitize\Sanitizer;
class AssetFilesController extends Controller
{
@ -36,9 +38,29 @@ class AssetFilesController extends Controller
}
foreach ($request->file('file') as $file) {
$extension = $file->getClientOriginalExtension();
$file_name = 'hardware-'.$asset->id.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;
// Check for SVG and sanitize it
if ($extension=='svg') {
\Log::debug('This is an SVG');
$sanitizer = new Sanitizer();
$dirtySVG = file_get_contents($file->getRealPath());
$cleanSVG = $sanitizer->sanitize($dirtySVG);
try {
Storage::put('private_uploads/assets/'.$file_name, $cleanSVG);
} catch (\Exception $e) {
\Log::debug('Upload no workie :( ');
\Log::debug($e);
}
} else {
Storage::put('private_uploads/assets/'.$file_name, file_get_contents($file));
}
$asset->logUpload($file_name, e($request->get('notes')));
}
@ -127,7 +149,6 @@ class AssetFilesController extends Controller
return redirect()->back()->with('success', trans('admin/hardware/message.deletefile.success'));
}
$log->delete();
return redirect()->back()
->with('success', trans('admin/hardware/message.deletefile.success'));

View file

@ -139,7 +139,7 @@ class AssetsController extends Controller
$asset->depreciate = '0';
$asset->status_id = request('status_id', 0);
$asset->warranty_months = request('warranty_months', null);
$asset->purchase_cost = Helper::ParseFloat($request->get('purchase_cost'));
$asset->purchase_cost = Helper::ParseCurrency($request->get('purchase_cost'));
$asset->purchase_date = request('purchase_date', null);
$asset->assigned_to = request('assigned_to', null);
$asset->supplier_id = request('supplier_id', 0);
@ -296,7 +296,7 @@ class AssetsController extends Controller
$asset->status_id = $request->input('status_id', null);
$asset->warranty_months = $request->input('warranty_months', null);
$asset->purchase_cost = Helper::ParseFloat($request->input('purchase_cost', null));
$asset->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost', null));
$asset->purchase_date = $request->input('purchase_date', null);
$asset->supplier_id = $request->input('supplier_id', null);
$asset->expected_checkin = $request->input('expected_checkin', null);
@ -357,6 +357,7 @@ class AssetsController extends Controller
}
}
if ($asset->save()) {
return redirect()->route('hardware.show', $assetId)
->with('success', trans('admin/hardware/message.update.success'));
@ -828,8 +829,8 @@ class AssetsController extends Controller
Storage::putFileAs($path, $upload, $file_name);
}
$asset->logAudit($request->input('note'), $request->input('location_id'), $file_name);
$asset->logAudit($request->input('note'), $request->input('location_id'), $file_name);
return redirect()->to('hardware')->with('success', trans('admin/hardware/message.audit.success'));
}
}

View file

@ -32,7 +32,8 @@ class BulkAssetsController extends Controller
return redirect()->back()->with('error', 'No assets selected');
}
$asset_ids = array_keys($request->input('ids'));
$asset_ids = array_values(array_unique($request->input('ids')));
if ($request->filled('bulk_actions')) {
switch ($request->input('bulk_actions')) {
@ -51,7 +52,7 @@ class BulkAssetsController extends Controller
return view('hardware/bulk-delete')->with('assets', $assets);
case 'edit':
return view('hardware/bulk')
->with('assets', request('ids'))
->with('assets', $asset_ids)
->with('statuslabel_list', Helper::statusLabelList());
}
}
@ -92,6 +93,7 @@ class BulkAssetsController extends Controller
|| ($request->filled('model_id'))
) {
foreach ($assets as $assetId) {
$this->update_array = [];
$this->conditionallyAddItem('purchase_date')
@ -104,7 +106,7 @@ class BulkAssetsController extends Controller
->conditionallyAddItem('warranty_months');
if ($request->filled('purchase_cost')) {
$this->update_array['purchase_cost'] = Helper::ParseFloat($request->input('purchase_cost'));
$this->update_array['purchase_cost'] = Helper::ParseCurrency($request->input('purchase_cost'));
}
if ($request->filled('company_id')) {

View file

@ -29,6 +29,7 @@ class ForgotPasswordController extends Controller
public function __construct()
{
$this->middleware('guest');
$this->middleware('throttle:5,1', ['except' => 'showLinkRequestForm']);
}
/**

View file

@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\ImageUploadRequest;
use App\Models\Company;
use App\Models\Component;
use App\Helpers\Helper;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Storage;
@ -36,6 +37,7 @@ class ComponentsController extends Controller
return view('components/index');
}
/**
* Returns a form to create a new component.
*
@ -75,7 +77,7 @@ class ComponentsController extends Controller
$component->min_amt = $request->input('min_amt', null);
$component->serial = $request->input('serial', null);
$component->purchase_date = $request->input('purchase_date', null);
$component->purchase_cost = $request->input('purchase_cost', null);
$component->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost', null));
$component->qty = $request->input('qty');
$component->user_id = Auth::id();
@ -109,6 +111,7 @@ class ComponentsController extends Controller
return redirect()->route('components.index')->with('error', trans('admin/components/message.does_not_exist'));
}
/**
* Return a view to edit a component.
*
@ -147,7 +150,7 @@ class ComponentsController extends Controller
$component->min_amt = $request->input('min_amt');
$component->serial = $request->input('serial');
$component->purchase_date = $request->input('purchase_date');
$component->purchase_cost = request('purchase_cost');
$component->purchase_cost = Helper::ParseCurrency(request('purchase_cost'));
$component->qty = $request->input('qty');
$component = $request->handleImages($component);

View file

@ -75,7 +75,7 @@ class ConsumablesController extends Controller
$consumable->model_number = $request->input('model_number');
$consumable->item_no = $request->input('item_no');
$consumable->purchase_date = $request->input('purchase_date');
$consumable->purchase_cost = Helper::ParseFloat($request->input('purchase_cost'));
$consumable->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$consumable->qty = $request->input('qty');
$consumable->user_id = Auth::id();
@ -138,7 +138,7 @@ class ConsumablesController extends Controller
$consumable->model_number = $request->input('model_number');
$consumable->item_no = $request->input('item_no');
$consumable->purchase_date = $request->input('purchase_date');
$consumable->purchase_cost = Helper::ParseFloat($request->input('purchase_cost'));
$consumable->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$consumable->qty = Helper::ParseFloat($request->input('qty'));
$consumable = $request->handleImages($consumable);

View file

@ -7,10 +7,11 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\AssetFileRequest;
use App\Models\Actionlog;
use App\Models\License;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\HttpFoundation\JsonResponse;
use App\Helpers\StorageHelper;
use enshrined\svgSanitize\Sanitizer;
class LicenseFilesController extends Controller
{
@ -37,26 +38,39 @@ class LicenseFilesController extends Controller
Storage::makeDirectory('private_uploads/licenses', 775);
}
$upload_success = false;
foreach ($request->file('file') as $file) {
$file_name = 'license-'.$license->id.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$file->getClientOriginalExtension())).'.'.$file->getClientOriginalExtension();
$upload_success = $file->storeAs('private_uploads/licenses', $file_name);
// $upload_success = $file->storeAs('private_uploads/licenses/'.$file_name, $file);
$extension = $file->getClientOriginalExtension();
$file_name = 'license-'.$license->id.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;
// Check for SVG and sanitize it
if ($extension == 'svg') {
\Log::debug('This is an SVG');
\Log::debug($file_name);
$sanitizer = new Sanitizer();
$dirtySVG = file_get_contents($file->getRealPath());
$cleanSVG = $sanitizer->sanitize($dirtySVG);
try {
Storage::put('private_uploads/licenses/'.$file_name, $cleanSVG);
} catch (\Exception $e) {
\Log::debug('Upload no workie :( ');
\Log::debug($e);
}
} else {
Storage::put('private_uploads/licenses/'.$file_name, file_get_contents($file));
}
//Log the upload to the log
$license->logUpload($file_name, e($request->input('notes')));
}
// This being called from a modal seems to confuse redirect()->back()
// It thinks we should go to the dashboard. As this is only used
// from the modal at present, hardcode the redirect. Longterm
// maybe we evaluate something else.
if ($upload_success) {
return redirect()->route('licenses.show', $license->id)->with('success', trans('admin/licenses/message.upload.success'));
}
return redirect()->route('licenses.show', $license->id)->with('error', trans('admin/licenses/message.upload.error'));
return redirect()->route('licenses.show', $license->id)->with('success', trans('admin/licenses/message.upload.success'));
}
return redirect()->route('licenses.show', $license->id)->with('error', trans('admin/licenses/message.upload.nofiles'));
@ -153,6 +167,7 @@ class LicenseFilesController extends Controller
}
return StorageHelper::downloader($file);
}
}
}

View file

@ -86,7 +86,7 @@ class LicensesController extends Controller
$license->name = $request->input('name');
$license->notes = $request->input('notes');
$license->order_number = $request->input('order_number');
$license->purchase_cost = $request->input('purchase_cost');
$license->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$license->purchase_date = $request->input('purchase_date');
$license->purchase_order = $request->input('purchase_order');
$license->purchase_order = $request->input('purchase_order');
@ -159,11 +159,11 @@ class LicensesController extends Controller
$license->expiration_date = $request->input('expiration_date');
$license->license_email = $request->input('license_email');
$license->license_name = $request->input('license_name');
$license->maintained = $request->input('maintained', 0);
$license->maintained = $request->input('maintained',0);
$license->name = $request->input('name');
$license->notes = $request->input('notes');
$license->order_number = $request->input('order_number');
$license->purchase_cost = $request->input('purchase_cost');
$license->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$license->purchase_date = $request->input('purchase_date');
$license->purchase_order = $request->input('purchase_order');
$license->reassignable = $request->input('reassignable', 0);

View file

@ -556,7 +556,7 @@ class ReportsController extends Controller
foreach ($customfields as $customfield) {
if (e($request->input($customfield->db_column_name())) == '1') {
if ($request->input($customfield->db_column_name()) == '1') {
$header[] = $customfield->name;
}
}

View file

@ -10,6 +10,8 @@ use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use enshrined\svgSanitize\Sanitizer;
use Illuminate\Support\Facades\Storage;
class UserFilesController extends Controller
{
@ -38,12 +40,32 @@ class UserFilesController extends Controller
return redirect()->back()->with('error', trans('admin/users/message.upload.nofiles'));
}
foreach ($files as $file) {
$extension = $file->getClientOriginalExtension();
$filename = 'user-'.$user->id.'-'.str_random(8);
$filename .= '-'.str_slug($file->getClientOriginalName()).'.'.$extension;
if (! $file->move($destinationPath, $filename)) {
return redirect()->back()->with('error', trans('admin/users/message.upload.invalidfiles'));
$file_name = 'user-'.$user->id.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;
// Check for SVG and sanitize it
if ($extension == 'svg') {
\Log::debug('This is an SVG');
\Log::debug($file_name);
$sanitizer = new Sanitizer();
$dirtySVG = file_get_contents($file->getRealPath());
$cleanSVG = $sanitizer->sanitize($dirtySVG);
try {
Storage::put('private_uploads/users/'.$file_name, $cleanSVG);
} catch (\Exception $e) {
\Log::debug('Upload no workie :( ');
\Log::debug($e);
}
} else {
Storage::put('private_uploads/users/'.$file_name, file_get_contents($file));
}
//Log the uploaded file to the log
$logAction = new Actionlog();
$logAction->item_id = $user->id;
@ -51,8 +73,8 @@ class UserFilesController extends Controller
$logAction->user_id = Auth::id();
$logAction->note = $request->input('notes');
$logAction->target_id = null;
$logAction->created_at = date('Y-m-d H:i:s');
$logAction->filename = $filename;
$logAction->created_at = date("Y-m-d H:i:s");
$logAction->filename = $file_name;
$logAction->action_type = 'uploaded';
if (! $logAction->save()) {
@ -63,8 +85,9 @@ class UserFilesController extends Controller
// dd($logActions);
return redirect()->back()->with('success', trans('admin/users/message.upload.success'));
}
return redirect()->back()->with('error', trans('admin/users/message.upload.nofiles'));
}
/**
@ -97,6 +120,7 @@ class UserFilesController extends Controller
$error = trans('admin/users/message.user_not_found', ['id' => $userId]);
// Redirect to the licence management page
return redirect()->route('users.index')->with('error', $error);
}
/**
@ -128,4 +152,5 @@ class UserFilesController extends Controller
// Redirect to the licence management page
return redirect()->route('users.index')->with('error', $error);
}
}

View file

@ -23,6 +23,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\CheckForDebug::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\SecurityHeaders::class,
\App\Http\Middleware\PreventBackHistory::class,
];

View file

@ -0,0 +1,30 @@
<?php
namespace App\Http\Middleware;
use Closure;
class PreventBackHistory
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$headers = [
'Cache-Control' => 'no-cache, no-store, max-age=0, must-revalidate',
'Pragma' => 'no-cache',
'Expires' => 'Sun, 02 Jan 1990 00:00:00 GMT'
];
$response = $next($request);
foreach($headers as $key => $value) {
$response->headers->set($key, $value);
}
return $response;
}
}

View file

@ -83,6 +83,7 @@ class AssetsTransformer
'user_can_checkout' => (bool) $asset->availableForCheckout(),
];
if (($asset->model) && ($asset->model->fieldset) && ($asset->model->fieldset->fields->count() > 0)) {
$fields_array = [];
@ -96,12 +97,15 @@ class AssetsTransformer
'value' => $value,
'field_format' => $field->format,
];
} else {
$fields_array[$field->name] = [
'field' => $field->convertUnicodeDbSlug(),
'value' => $asset->{$field->convertUnicodeDbSlug()},
'field_format' => $field->format,
];
}
$array['custom_fields'] = $fields_array;
}
@ -112,7 +116,7 @@ class AssetsTransformer
$permissions_array['available_actions'] = [
'checkout' => Gate::allows('checkout', Asset::class),
'checkin' => Gate::allows('checkin', Asset::class),
'clone' => Gate::allows('create', Asset::class),
'clone' => false,
'restore' => false,
'update' => (bool) Gate::allows('update', Asset::class),
'delete' => ($asset->assigned_to == '' && Gate::allows('delete', Asset::class)),
@ -129,6 +133,29 @@ class AssetsTransformer
];
}
if (request('components')=='true') {
if ($asset->components) {
$array['components'] = [];
foreach ($asset->components as $component) {
$array['components'][] = [
'id' => $component->id,
'pivot_id' => $component->pivot->id,
'name' => $component->name,
'qty' => $component->pivot->assigned_qty,
'price_cost' => $component->purchase_cost,
'purchase_total' => $component->purchase_cost * $component->pivot->assigned_qty,
'checkout_date' => Helper::getFormattedDateObject($component->pivot->created_at, 'datetime') ,
];
}
}
}
$array += $permissions_array;
return $array;
@ -160,6 +187,7 @@ class AssetsTransformer
] : null;
}
public function transformRequestedAssets(Collection $assets, $total)
{
$array = [];
@ -192,7 +220,8 @@ class AssetsTransformer
];
$array += $permissions_array;
return $array;
}
}

View file

@ -31,8 +31,9 @@ class LicensesTransformer
'purchase_order' => e($license->purchase_order),
'purchase_date' => Helper::getFormattedDateObject($license->purchase_date, 'date'),
'termination_date' => Helper::getFormattedDateObject($license->termination_date, 'date'),
'depreciation' => ($license->depreciation) ? ['id' => (int) $license->depreciation->id, 'name'=> e($license->depreciation->name)] : null,
'purchase_cost' => e($license->purchase_cost),
'depreciation' => ($license->depreciation) ? ['id' => (int) $license->depreciation->id,'name'=> e($license->depreciation->name)] : null,
'purchase_cost' => Helper::formatCurrencyOutput($license->purchase_cost),
'purchase_cost_numeric' => $license->purchase_cost,
'notes' => e($license->notes),
'expiration_date' => Helper::getFormattedDateObject($license->expiration_date, 'date'),
'seats' => (int) $license->seats,
@ -65,4 +66,7 @@ class LicensesTransformer
{
return (new DatatablesTransformer)->transformDatatables($licenses);
}
}

View file

@ -74,6 +74,7 @@ class UserImporter extends ItemImporter
return;
}
// This needs to be applied after the update logic, otherwise we'll overwrite user passwords
// Issue #5408
$this->item['password'] = bcrypt($this->tempPassword);
@ -106,6 +107,7 @@ class UserImporter extends ItemImporter
}
$this->logError($user, 'User');
return;
}
/**
@ -118,10 +120,11 @@ class UserImporter extends ItemImporter
*/
public function createOrFetchDepartment($department_name)
{
if(is_null($department_name) || $department_name == ''){
return null;
}
$department = Department::where(['name' => $department_name])->first();
if ($department) {
$this->log('A matching department '.$department_name.' already exists');

View file

@ -29,6 +29,8 @@ class Asset extends Depreciable
{
protected $presenter = \App\Presenters\AssetPresenter::class;
use CompanyableTrait;
use HasFactory, Loggable, Requestable, Presentable, SoftDeletes, ValidatingTrait, UniqueUndeletedTrait, UniqueSerialTrait;
const LOCATION = 'location';
@ -68,6 +70,17 @@ class Asset extends Depreciable
protected $injectUniqueIdentifier = true;
// We set these as protected dates so that they will be easily accessible via Carbon
protected $dates = [
'created_at',
'updated_at',
'deleted_at',
'purchase_date',
'last_checkout',
'expected_checkin',
'last_audit_date',
'next_audit_date'
];
protected $casts = [
'purchase_date' => 'datetime',
@ -169,6 +182,7 @@ class Asset extends Depreciable
'model.manufacturer' => ['name'],
];
/**
* This handles the custom field validation for assets
*
@ -187,6 +201,7 @@ class Asset extends Depreciable
return parent::save($params);
}
public function getDisplayNameAttribute()
{
return $this->present()->name();
@ -243,7 +258,8 @@ class Asset extends Depreciable
// The asset status is not archived and is deployable
if (($this->assetstatus) && ($this->assetstatus->archived == '0')
&& ($this->assetstatus->deployable == '1')) {
&& ($this->assetstatus->deployable == '1'))
{
return true;
}
}
@ -370,9 +386,10 @@ class Asset extends Depreciable
*/
public function components()
{
return $this->belongsToMany(\App\Models\Component::class, 'components_assets', 'asset_id', 'component_id')->withPivot('id', 'assigned_qty')->withTrashed();
}
/**
* Get depreciation attribute from associated asset model
*
@ -399,8 +416,8 @@ class Asset extends Depreciable
*/
public function uploads()
{
return $this->hasMany(\App\Models\Actionlog::class, 'item_id')
->where('item_type', '=', self::class)
return $this->hasMany('\App\Models\Actionlog', 'item_id')
->where('item_type', '=', Asset::class)
->where('action_type', '=', 'uploaded')
->whereNotNull('filename')
->orderBy('created_at', 'desc');
@ -447,6 +464,7 @@ class Asset extends Depreciable
return $this->morphMany(self::class, 'assigned', 'assigned_type', 'assigned_to')->withTrashed();
}
/**
* Get the asset's location based on the assigned user
*
@ -475,6 +493,7 @@ class Asset extends Depreciable
if ($this->assignedTo) {
return $this->assignedTo;
}
}
if ($this->assignedType() == self::USER) {
if (($this->assignedTo) && $this->assignedTo->userLoc) {
@ -533,6 +552,7 @@ class Asset extends Depreciable
return false;
}
/**
* Get the asset's logs
*
@ -592,6 +612,7 @@ class Asset extends Depreciable
->withTrashed();
}
/**
* Get maintenances for this asset
*
@ -617,6 +638,8 @@ class Asset extends Depreciable
return $this->belongsTo(\App\Models\User::class, 'user_id');
}
/**
* Establishes the asset -> status relationship
*
@ -662,6 +685,7 @@ class Asset extends Depreciable
->get();
}
/**
* Establishes the asset -> assigned licenses relationship
*
@ -710,6 +734,8 @@ class Asset extends Depreciable
return $this->belongsTo(\App\Models\Location::class, 'location_id');
}
/**
* Get the next autoincremented asset tag
*
@ -721,6 +747,7 @@ class Asset extends Depreciable
{
$settings = \App\Models\Setting::getSettings();
if ($settings->auto_increment_assets == '1') {
$temp_asset_tag = \DB::table('assets')
->where('physical', '=', '1')
@ -751,23 +778,28 @@ class Asset extends Depreciable
*/
public static function nextAutoIncrement($assets)
{
$max = 1;
foreach ($assets as $asset) {
$results = preg_match("/\d+$/", $asset['asset_tag'], $matches);
if ($results) {
{
$number = $matches[0];
if ($number > $max) {
{
$max = $number;
}
}
}
return $max + 1;
}
/**
* Add zerofilling based on Settings
*
@ -807,6 +839,7 @@ class Asset extends Depreciable
if (($this->model) && ($this->model->category)) {
return $this->model->category->require_acceptance;
}
}
/**
@ -834,6 +867,7 @@ class Asset extends Depreciable
return false;
}
/**
* -----------------------------------------------
* BEGIN QUERY SCOPES
@ -859,11 +893,13 @@ class Asset extends Depreciable
});
foreach ($terms as $term) {
$query = $query
->orWhere('assets_users.first_name', 'LIKE', '%'.$term.'%')
->orWhere('assets_users.last_name', 'LIKE', '%'.$term.'%')
->orWhere('assets_users.username', 'LIKE', '%'.$term.'%')
->orWhereRaw('CONCAT('.DB::getTablePrefix().'assets_users.first_name," ",'.DB::getTablePrefix().'assets_users.last_name) LIKE ?', ["%$term%"]);
}
/**
@ -875,6 +911,7 @@ class Asset extends Depreciable
});
foreach ($terms as $term) {
$query = $query->orWhere('assets_locations.name', 'LIKE', '%'.$term.'%');
}
@ -888,11 +925,13 @@ class Asset extends Depreciable
foreach ($terms as $term) {
$query = $query->orWhere('assigned_assets.name', 'LIKE', '%'.$term.'%');
}
return $query;
}
/**
* Query builder scope for hardware
*
@ -900,6 +939,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeHardware($query)
{
return $query->where('physical', '=', '1');
@ -912,6 +952,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopePending($query)
{
return $query->whereHas('assetstatus', function ($query) {
@ -921,6 +962,7 @@ class Asset extends Depreciable
});
}
/**
* Query builder scope for searching location
*
@ -928,6 +970,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeAssetsByLocation($query, $location)
{
return $query->where(function ($query) use ($location) {
@ -949,6 +992,7 @@ class Asset extends Depreciable
});
}
/**
* Query builder scope for RTD assets
*
@ -956,6 +1000,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeRTD($query)
{
return $query->whereNull('assets.assigned_to')
@ -973,6 +1018,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeUndeployable($query)
{
return $query->whereHas('assetstatus', function ($query) {
@ -989,6 +1035,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeNotArchived($query)
{
return $query->whereHas('assetstatus', function ($query) {
@ -1018,6 +1065,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeDueForAudit($query, $settings)
{
$interval = $settings->audit_warning_days ?? 0;
@ -1042,6 +1090,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeOverdueForAudit($query)
{
return $query->whereNotNull('assets.next_audit_date')
@ -1063,6 +1112,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeDueOrOverdueForAudit($query, $settings)
{
$interval = $settings->audit_warning_days ?? 0;
@ -1073,6 +1123,7 @@ class Asset extends Depreciable
->NotArchived();
}
/**
* Query builder scope for Archived assets
*
@ -1080,6 +1131,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeArchived($query)
{
return $query->whereHas('assetstatus', function ($query) {
@ -1096,6 +1148,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeDeployed($query)
{
return $query->where('assigned_to', '>', '0');
@ -1108,6 +1161,7 @@ class Asset extends Depreciable
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeRequestableAssets($query)
{
return Company::scopeCompanyables($query->where('requestable', '=', 1))
@ -1118,6 +1172,7 @@ class Asset extends Depreciable
});
}
/**
* scopeInModelList
* Get all assets in the provided listing of model ids
@ -1158,6 +1213,7 @@ class Asset extends Depreciable
return $query->where('accepted', '=', 'rejected');
}
/**
* Query builder scope to get accepted assets
*
@ -1220,6 +1276,7 @@ class Asset extends Depreciable
->orWhere('assets.order_number', 'LIKE', '%'.$search.'%')
->orWhere('assets.notes', 'LIKE', '%'.$search.'%');
}
})->withTrashed()->whereNull('assets.deleted_at'); //workaround for laravel bug
}
@ -1239,9 +1296,12 @@ class Asset extends Depreciable
->where('assets.assigned_type', '=', User::class);
})->where(function ($query) use ($search) {
$query->where('assets_dept_users.department_id', '=', $search);
})->withTrashed()->whereNull('assets.deleted_at'); //workaround for laravel bug
}
/**
* Query builder scope to search on text filters for complex Bootstrap Tables API
*
@ -1344,6 +1404,7 @@ class Asset extends Depreciable
});
}
if ($fieldname == 'company') {
$query->where(function ($query) use ($search_val) {
$query->whereHas('company', function ($query) use ($search_val) {
@ -1381,14 +1442,21 @@ class Asset extends Depreciable
* against those relationships earlier in this method.
*
* - snipe
*
*/
if (($fieldname != 'category') && ($fieldname != 'model_number') && ($fieldname != 'rtd_location') && ($fieldname != 'location') && ($fieldname != 'supplier')
&& ($fieldname != 'status_label') && ($fieldname != 'model') && ($fieldname != 'company') && ($fieldname != 'manufacturer')) {
$query->orWhere('assets.'.$fieldname, 'LIKE', '%'.$search_val.'%');
}
});
}
/**
* Query builder scope to order on model
*
@ -1415,6 +1483,7 @@ class Asset extends Depreciable
return $query->join('models', 'assets.model_id', '=', 'models.id')->orderBy('models.model_number', $order);
}
/**
* Query builder scope to order on assigned user
*
@ -1454,6 +1523,7 @@ class Asset extends Depreciable
return $query->leftJoin('companies as company_sort', 'assets.company_id', '=', 'company_sort.id')->orderBy('company_sort.name', $order);
}
/**
* Query builder scope to return results of a category
*
@ -1482,6 +1552,8 @@ class Asset extends Depreciable
->join('manufacturers', 'models.manufacturer_id', '=', 'manufacturers.id')->where('models.manufacturer_id', '=', $manufacturer_id);
}
/**
* Query builder scope to order on category
*
@ -1497,6 +1569,7 @@ class Asset extends Depreciable
->orderBy('category_order.name', $order);
}
/**
* Query builder scope to order on manufacturer
*
@ -1537,6 +1610,7 @@ class Asset extends Depreciable
return $query->leftJoin('locations as rtd_asset_locations', 'rtd_asset_locations.id', '=', 'assets.rtd_location_id')->orderBy('rtd_asset_locations.name', $order);
}
/**
* Query builder scope to order on supplier name
*
@ -1565,8 +1639,10 @@ class Asset extends Depreciable
$query->where('locations.id', '=', $search);
});
});
}
/**
* Query builder scope to search on depreciation name
* @param \Illuminate\Database\Query\Builder $query Query builder instance
@ -1578,5 +1654,8 @@ class Asset extends Depreciable
{
return $query->join('models', 'assets.model_id', '=', 'models.id')
->join('depreciations', 'models.depreciation_id', '=', 'depreciations.id')->where('models.depreciation_id', '=', $search);
}
}

View file

@ -250,6 +250,9 @@ return [
'enable_csp' => env('ENABLE_CSP', false),
/*
|--------------------------------------------------------------------------
| Demo Mode Lockdown
@ -273,6 +276,7 @@ return [
'min_php' => '7.2.5',
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
@ -399,6 +403,7 @@ return [
'Carbon' => Carbon\Carbon::class,
'Helper' => App\Helpers\Helper::class, // makes it much easier to use 'Helper::blah' in blades (which is where we usually use this)
],
];

View file

@ -40,6 +40,7 @@ done
chown -R docker:root /var/lib/snipeit/data/*
chown -R docker:root /var/lib/snipeit/dumps
chown -R docker:root /var/lib/snipeit/keys
chown -R docker:root /var/www/html/storage/framework/cache
# Fix php settings
if [ -v "PHP_UPLOAD_LIMIT" ]

View file

@ -301,11 +301,11 @@ $(document).ready(function () {
});
// makes sure we're not selecting the same thing twice for multiples
var filteredResponse = response.items.filter(function(item) {
var filteredResponse = response.results.filter(function(item) {
return currentlySelected.indexOf(+item.id) < 0;
});
var first = (currentlySelected.length > 0) ? filteredResponse[0] : response.items[0];
var first = (currentlySelected.length > 0) ? filteredResponse[0] : response.results[0];
if(first && first.id) {
first.selected = true;
@ -519,7 +519,7 @@ $(document).ready(function () {
for (var i = 0; i < this.files.length; i++) {
total_size += this.files[i].size;
$(id + '-info').append('<span class="label label-default">' + this.files[i].name + ' (' + formatBytes(this.files[i].size) + ')</span> ');
$(id + '-info').append('<span class="label label-default">' + htmlEntities(this.files[i].name) + ' (' + formatBytes(this.files[i].size) + ')</span> ');
}
console.log('Max size is: ' + max_size);
@ -540,6 +540,9 @@ $(document).ready(function () {
});
function htmlEntities(str) {
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
}

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Waardevermindering Naam',
'number_of_months' => 'Aantal maande',
'update' => 'Werk waardevermindering op',
'depreciation_min' => 'Minimum Value after Depreciation'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Checkout Asset',
'clone' => 'Klone Bate',
'deployable' => 'verbintenis',
'deleted' => 'Hierdie bate is verwyder. <a href="/hardware/:asset_id/restore">Klik hier om dit te herstel</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Wysig bate',
'model_deleted' => 'Hierdie batesmodel is uitgevee. Jy moet die model herstel voordat jy die Bate kan herstel. <br/> <a href="/hardware/models/:model_id/restore">Klik hier om die model</a> te herstel.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Requestable',
'requested' => 'versoek',
'restore' => 'Herstel bate',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Oor Asset Models',
'about_models_text' => 'Batemodelle is \'n manier om identiese bates te groepeer. "MBP 2013", "IPhone 6s", ens.',
'deleted' => 'Hierdie model is verwyder. <a href="/hardware/models/:model_id/restore">Klik hier om dit te herstel</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Bulk Delete Asset Models',
'bulk_delete_help' => 'Use the checkboxes below to confirm the deletion of the selected asset models. Asset models that have assets associated with them cannot be deleted until the assets are associated with a different model.',
'bulk_delete_warn' => 'You are about to delete :model_count asset models.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Verwyder Maatskappyvereniging',
'reports' => 'Berigte',
'restored' => 'restored',
'restore' => 'Restore',
'requested' => 'versoek',
'request_canceled' => 'Versoek gekanselleer',
'save' => 'Save',

View file

@ -8,5 +8,6 @@ return array(
'depreciation_name' => 'Depreciation Name',
'number_of_months' => 'Number of Months',
'update' => 'Update Depreciation',
'depreciation_min' => 'Minimum Value after Depreciation'
);

View file

@ -10,9 +10,9 @@ return array(
'checkout' => 'Checkout Asset',
'clone' => 'Clone Asset',
'deployable' => 'Deployable',
'deleted' => 'This asset has been deleted. <a href="/hardware/:asset_id/restore">Click here to restore it</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Edit Asset',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Requestable',
'requested' => 'Requested',
'restore' => 'Restore Asset',

View file

@ -3,7 +3,7 @@
return array(
'about_models_title' => 'About Asset Models',
'about_models_text' => 'Asset Models are a way to group identical assets. "MBP 2013", "IPhone 6s", etc.',
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Bulk Delete Asset Models',
'bulk_delete_help' => 'Use the checkboxes below to confirm the deletion of the selected asset models. Asset models that have assets associated with them cannot be deleted until the assets are associated with a different model.',
'bulk_delete_warn' => 'You are about to delete :model_count asset models.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Remove Company Association',
'reports' => 'Reports',
'restored' => 'restored',
'restore' => 'Restore',
'requested' => 'Requested',
'request_canceled' => 'Request Canceled',
'save' => 'Save',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'اسم الاستهلاك',
'number_of_months' => 'عدد الأشهر',
'update' => 'تحديث الاستهلاك',
'depreciation_min' => 'Minimum Value after Depreciation'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'اخراج الأصل',
'clone' => 'استنساخ الأصل',
'deployable' => 'قابل للتوزيع',
'deleted' => 'تم حذف هذا الأصل. <a href="/hardware/:asset_id/restore"> انقر هنا لاستعادته </a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'تعديل الأصل',
'model_deleted' => 'تم حذف موديل الأصل هذا. يجب عليك استعادة الموديل قبل أن تتمكن من استعادة الأصل.<br/> <a href="/hardware/models/:model_id/restore"> انقر هنا لاستعادة الموديل</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'قابل للطلب',
'requested' => 'تم الطلب',
'restore' => 'استعادة الأصل',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'حول موديلات الأصول',
'about_models_text' => 'موديلات الأصول هي طريقة لتجميع الأصول المتطابقة "MBP 2013", "IPhone 6s", الخ.',
'deleted' => 'تم حذف هذا الموديل. <a href="/hardware/models/:model_id/restore"> انقر هنا لاستعادته </a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'حذف موديلات الاصول بالجملة',
'bulk_delete_help' => 'استخدم مربعات الاختيار أدناه لتأكيد حذف موديلات الأصول المحددة. لا يمكن حذف موديلات الأصول التي تحتوي على أصول مرتبطة بها إلى أن يتم ربط الأصول بموديل مختلف.',
'bulk_delete_warn' => 'أنت على وشك حذف :model_count من موديلات الأصول.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'إزالة جمعية الشركة',
'reports' => 'التقارير',
'restored' => 'المعاد',
'restore' => 'Restore',
'requested' => 'طلب',
'request_canceled' => 'تم إلغاء الطلب',
'save' => 'حفظ',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Амортизация',
'number_of_months' => 'Брой месеци',
'update' => 'Обновяване на амортизация',
'depreciation_min' => 'Minimum Value after Depreciation'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Проверка на активите',
'clone' => 'Копиране на актив',
'deployable' => 'Може да бъде предоставен',
'deleted' => 'Активът беше изтрит. <a href="/hardware/:asset_id/restore">Възстановяване</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Редакция на актив',
'model_deleted' => 'Моделът актив беше изтрит.Необходимо е да възстановите моделът, преди да възстановите актива.<br/> <a href="/hardware/models/:model_id/restore">Възстановяване на модел</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Може да бъде изискван',
'requested' => 'Изискан',
'restore' => 'Възстановяване на актив',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Относно модели на актив',
'about_models_text' => 'Модели на актив са начин за групиране на идентични активи. "MBP 2013", "IPhone 6s" и др.',
'deleted' => 'Моделът беше изтрит. <a href="/hardware/models/:model_id/restore">Възстановяване</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Масово изтриване на модели на активите',
'bulk_delete_help' => 'Използвайте квадратчетата за отметка по-долу, за да потвърдите изтриването на избраните модели на активи. Моделите, за които има асоциирани активи, не могат да бъдат изтрити, докато активите не се асоциират с друг модел.',
'bulk_delete_warn' => 'Ще бъдат изтрити :model_count модели на активи.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Премахване на асоциация към компания',
'reports' => 'Справки',
'restored' => 'възстановени',
'restore' => 'Restore',
'requested' => 'Изискан',
'request_canceled' => 'Заявка отменена',
'save' => 'Запис',

View file

@ -8,5 +8,6 @@ return array(
'depreciation_name' => 'Depreciation Name',
'number_of_months' => 'Number of Months',
'update' => 'Update Depreciation',
'depreciation_min' => 'Minimum Value after Depreciation'
);

View file

@ -10,9 +10,9 @@ return array(
'checkout' => 'Checkout Asset',
'clone' => 'Clone Asset',
'deployable' => 'Deployable',
'deleted' => 'This asset has been deleted. <a href="/hardware/:asset_id/restore">Click here to restore it</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Edit Asset',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Requestable',
'requested' => 'Requested',
'restore' => 'Restore Asset',

View file

@ -3,7 +3,7 @@
return array(
'about_models_title' => 'About Asset Models',
'about_models_text' => 'Asset Models are a way to group identical assets. "MBP 2013", "IPhone 6s", etc.',
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Bulk Delete Asset Models',
'bulk_delete_help' => 'Use the checkboxes below to confirm the deletion of the selected asset models. Asset models that have assets associated with them cannot be deleted until the assets are associated with a different model.',
'bulk_delete_warn' => 'You are about to delete :model_count asset models.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Remove Company Association',
'reports' => 'Reports',
'restored' => 'restored',
'restore' => 'Restore',
'requested' => 'Requested',
'request_canceled' => 'Request Canceled',
'save' => 'Save',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Jméno amortizace',
'number_of_months' => 'Počet měsíců',
'update' => 'Aktualizovat amortizaci',
'depreciation_min' => 'Minimum Value after Depreciation'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Pokladní majetek',
'clone' => 'Klonovat majetek',
'deployable' => 'Připraveno k nasazení',
'deleted' => 'Toto zařízení bylo odstraněno. <a href="/hardware/:asset_id/restore">Klepněte zde pro jeho obnovení</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Upravit majetek',
'model_deleted' => 'Tento model majetku byl odstraněn. Přejete-li si obnovit zařízení, <a href="/hardware/models/:model_id/restore">klepněte zde</a><br/> a obnovte nejdříve jeho model.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Lze vyžádat',
'requested' => 'Požadováno',
'restore' => 'Obnovit zařízení',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'O modelech majetku',
'about_models_text' => 'Modely majetku jsou způsoby seskupení shodných majetků. "MBP 2013", "iPhone 6s" atd.',
'deleted' => 'Model byl vymazán. <a href="/hardware/models/:model_id/restore">Klikněte sem pro jeho obnovení</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Hromadné mazání modelů majetku',
'bulk_delete_help' => 'Pomocí zaškrtávacích kolonek potvrďte smazání označených modelů majetku. Modely majetku, ke kterým je přiřazen majetek nemohou být smazány dokud jim přiřazený majetek nebude přeřazen k jinému modulu.',
'bulk_delete_warn' => 'Chystáte se smazat :model_count asset models.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Odstraňte sdružení společnosti',
'reports' => 'Reporty',
'restored' => 'obnoveno',
'restore' => 'Restore',
'requested' => 'Požadováno',
'request_canceled' => 'Žádost zrušena',
'save' => 'Uložit',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Enw Dibrisiant',
'number_of_months' => 'Nifer o Fisoedd',
'update' => 'Diweddaru Dibrisiant',
'depreciation_min' => 'Minimum Value after Depreciation'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Nodi Asedau Allan',
'clone' => 'Dyblygu Ased',
'deployable' => 'Gellir ei ddefnyddio',
'deleted' => 'Mae\'r ased yma wedi dileu. <a href="/hardware/:asset_id/restore">Cliciwch yma i\'w adfer</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Addasu Ased',
'model_deleted' => 'Mae\'r model yma o ased wedi\'i dileu. Rhaid i chi adfer y model cyn fedrwch chi adfer y\'r ased. <br/> <a href="/hardware/models/:model_id/restore">Cliciwch yma i adfer yr ased</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Ar gael',
'requested' => 'Gofynnwyd amdano',
'restore' => 'Adfer Ased',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Amdan Modelau',
'about_models_text' => 'Mae modelau o asedau yn ffordd o creu grwp o asedau. "iPhone 7, Samsung TAB 4, ayyb.',
'deleted' => 'Mae\'r model yma wedi dileu. <a href="/hardware/models/:model_id/restore">Cliciwch yma i\'w adfer</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Dileu Nifer o Modelau',
'bulk_delete_help' => 'Rhowch tic yn y bocsys isod i cadarnhau dileu y model. Nid oes modd dileu modelau sydd hefo asedau yn ei erbyn.',
'bulk_delete_warn' => 'Rydych am dileu :model_count o asedau.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Dileu Cymdeithas y Cwmni',
'reports' => 'Adroddiadau',
'restored' => 'wedi adfer',
'restore' => 'Restore',
'requested' => 'Gofynnwyd amdano',
'request_canceled' => 'Cais wedi dileu',
'save' => 'Cadw',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Afskrivningnavn',
'number_of_months' => 'Antal måneder',
'update' => 'Opdater Afskrivninger',
'depreciation_min' => 'Minimum Value after Depreciation'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Checkout Asset',
'clone' => 'Klonaktiver',
'deployable' => 'Deployable',
'deleted' => 'Dette aktiv er blevet slettet. <a href="/hardware/:asset_id/restore">Klik her for at gendanne det</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Rediger aktiv',
'model_deleted' => 'Denne aktivmodel er blevet slettet. Du skal gendanne modellen, før du kan gendanne Asset.<br/> <a href="/hardware/models/:model_id/restore">Klik her for at gendanne model</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'kan anmodes',
'requested' => 'Anmodet',
'restore' => 'Gendan aktiv',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Om aktiv modeller',
'about_models_text' => 'Aktiv modeller er en måde at gruppere identiske aktiver. "MBP 2013", "IPhone 6s", osv.',
'deleted' => 'Denne model er blevet slettet. <a href="/hardware/models/:model_id/restore"> Klik her for at gendanne den</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Slet flere aktivmodeller',
'bulk_delete_help' => 'Brug checkboksene nedenfor til at bekræfte sletning af valgte aktivmodeller. Aktivmodeller med tilknyttede aktiver kan ikke slettes før aktivet er knyttet til en anden model.',
'bulk_delete_warn' => 'Du er ved at slette :model_count aktivmodeller.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Fjern association med selskab',
'reports' => 'Rapporter',
'restored' => 'gendannet',
'restore' => 'Restore',
'requested' => 'Anmodet',
'request_canceled' => 'Anmodning Annulleret',
'save' => 'Gem',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Abschreibungs Name',
'number_of_months' => 'Anzahl der Monate',
'update' => 'Abschreibung aktualisieren',
'depreciation_min' => 'Minimaler Wert nach Abschreibung'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Asset herausgeben',
'clone' => 'Asset duplizieren',
'deployable' => 'Einsetzbar',
'deleted' => 'Dieses Asset wurde gelöscht. <a href="/hardware/:asset_id/restore">Zur Wiederherstellung hier klicken</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Asset bearbeiten',
'model_deleted' => 'Dieses Asset wurde gelöscht. Sie müssen das Modell Wiederherstellen bevor Sie das Asset Wiederherstellen können <br/><a href="/hardware/models/:model_id/restore">klicken Sie hier um das Modell wiederherzustellen</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Anforderbar',
'requested' => 'Angefordert',
'restore' => 'Asset wiederherstellen',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Über Asset-Modelle',
'about_models_text' => 'Asset-Modelle sind eine Möglichkeit, identische Assets zu gruppieren. "MBP 2013", "IPhone 6 s" usw.',
'deleted' => 'Dieses Modell wurde gelöscht.<a href="/hardware/models/:model_id/restore">klicken Sie hier um es Wiederzuherstellen</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Massenlöschen von Asset-Modellen',
'bulk_delete_help' => 'Nutzen Sie die nachfolgenden Kontrollkästchen, um die Löschung der Asset-Modelle zu bestätigen. Asset-Modelle die noch zugewiesene Assets haben können nur dann gelöscht werden, wenn die enthaltenen Assets einem anderem Asset-Modell zugewiesen werden.',
'bulk_delete_warn' => 'Sie sind im Begriff :model_count Asset-Modelle zu löschen.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Firmenzuordnung entfernen',
'reports' => 'Berichte',
'restored' => 'wiederhergestellt',
'restore' => 'Restore',
'requested' => 'Angefragt',
'request_canceled' => 'Anfrage abgebrochen',
'save' => 'Speichern',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Όνομα απόσβεσης',
'number_of_months' => 'Αριθμός των μηνών',
'update' => 'Ενημέρωση αποσβέσεων',
'depreciation_min' => 'Minimum Value after Depreciation'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Ταμείο ελέγχου',
'clone' => 'Κλώνος χρήστη',
'deployable' => 'Προς ανάπτυξη',
'deleted' => 'Αυτό το στοιχείο έχει διαγραφεί. <a href="/hardware/:asset_id/restore">Κάντε κλικ εδώ για να την επαναφέρετε</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Επεξεργασία παγίων',
'model_deleted' => 'Αυτό το μοντέλο περιουσιακών στοιχείων έχει διαγραφεί. Πρέπει να επαναφέρετε το μοντέλο για να μπορέσετε να επαναφέρετε το Asset.<br/> <a href="/hardware/models/:model_id/restore">Κάντε κλικ εδώ για να επαναφέρετε το μοντέλο</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Επαναληπτικό',
'requested' => 'Ζητήθηκαν',
'restore' => 'Επαναφορά παγίου',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Σχετικά με τους τύπους παγίων',
'about_models_text' => 'Τα μοντέλα περιουσιακών στοιχείων είναι ένας τρόπος για να ομαδοποιήσετε ταυτόσημα περιουσιακά στοιχεία "MBP 2013", "IPhone 6s" κ.λπ.',
'deleted' => 'Αυτό το μοντέλο έχει διαγραφεί. <a href="/hardware/models/:model_id/restore">Κάντε κλικ εδώ για να την επαναφέρετε</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Μαζική διαγραφή μοντέλου Asset',
'bulk_delete_help' => 'Χρησιμοποιήστε τα παρακάτω πλαίσια ελέγχου για να επιβεβαιώσετε τη διαγραφή των επιλεγμένων μοντέλων στοιχείων. Τα μοντέλα στοιχείων που έχουν στοιχεία που σχετίζονται με αυτά δεν μπορούν να διαγραφούν έως ότου τα στοιχεία συσχετιστούν με διαφορετικό μοντέλο.',
'bulk_delete_warn' => 'Πρόκειται να διαγράψετε: asset_count περιουσιακών στοιχείων.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Κατάργηση σύνδεσης εταιρείας',
'reports' => 'Αναφορές',
'restored' => 'restored',
'restore' => 'Restore',
'requested' => 'Ζητήθηκαν',
'request_canceled' => 'Το αίτημα ακυρώθηκε',
'save' => 'Αποθήκευση',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Depreciation Name',
'number_of_months' => 'Number of Months',
'update' => 'Update Depreciation',
'depreciation_min' => 'Minimum Value after Depreciation'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Checkout Asset',
'clone' => 'Clone Asset',
'deployable' => 'Deployable',
'deleted' => 'This asset has been deleted. <a href="/hardware/:asset_id/restore">Click here to restore it</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Edit Asset',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Requestable',
'requested' => 'Requested',
'restore' => 'Restore Asset',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'About Asset Models',
'about_models_text' => 'Asset Models are a way to group identical assets. "MBP 2013", "IPhone 6s", etc.',
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Bulk Delete Asset Models',
'bulk_delete_help' => 'Use the checkboxes below to confirm the deletion of the selected asset models. Asset models that have assets associated with them cannot be deleted until the assets are associated with a different model.',
'bulk_delete_warn' => 'You are about to delete :model_count asset models.',

View file

@ -14,7 +14,7 @@ return array(
'alerts_enabled' => 'Alerts Enabled',
'alert_interval' => 'Expiring Alerts Threshold (in days)',
'alert_inv_threshold' => 'Inventory Alert Threshold',
'allow_user_skin' => 'Erlaube Benutzer Skin',
'allow_user_skin' => 'Allow User Skin',
'allow_user_skin_help_text' => 'Checking this box will allow a user to override the UI skin with a different one.' ,
'asset_ids' => 'Asset IDs',
'audit_interval' => 'Audit Interval',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Remove Company Association',
'reports' => 'Reports',
'restored' => 'restored',
'restore' => 'Restore',
'requested' => 'Requested',
'request_canceled' => 'Request Canceled',
'save' => 'Save',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Nama Penyusutan',
'number_of_months' => 'Jumlah Bulan',
'update' => 'Perbarui pengurangan',
'depreciation_min' => 'Minimum Value after Depreciation'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Periksa aset',
'clone' => 'Gandakan aset',
'deployable' => 'Bisa dicairkan',
'deleted' => 'Aset ini telah dihapus <a href="/hardware/:asset_id/restore"> Klik di sini untuk memulihkannya</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Edit Asset',
'model_deleted' => 'Model Aset ini telah dihapus. Anda harus mengembalikan model sebelum mengembalikan Aset.<br/> <a href="/hardware/models/:model_id/restore">Klik di sini untuk memulihkan modelnya</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Permintaan',
'requested' => 'Diminta',
'restore' => 'Kembalikan Aset',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Tentang Model Aset',
'about_models_text' => 'Model Aset adalah cara untuk mengelompokkan aset identik. "MBP 2013", "IPhone 6s", dll.',
'deleted' => 'Model ini telah dihapus. <a href="/hardware/models/:model_id/restore">Klik di sini untuk memulihkannya</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Bulk hapus model aset',
'bulk_delete_help' => 'Gunakan kotak centang di bawah untuk mengkonfirmasi penghapusan model aset yang dipilih. Model aset yang memiliki aset yang terkait dengannya tidak dapat dihapus sampai aset dikaitkan dengan model yang berbeda.',
'bulk_delete_warn' => 'Anda akan menghapus: model aset model_count.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Hapus Asosiasi Perusahaan',
'reports' => 'Laporan',
'restored' => 'dikembalikan',
'restore' => 'Restore',
'requested' => 'Diminta',
'request_canceled' => 'Permintaan dibatalkan',
'save' => 'Simpan',

View file

@ -17,7 +17,7 @@ return [
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
'update' => 'Update Category',
'use_default_eula' => 'Use the <a href="#" data-toggle="modal" data-target="#eulaModal">primary default EULA</a> instead.',
'use_default_eula_column' => 'Use default EULA',
'use_default_eula_disabled' => '<del>Use the primary default EULA instead.</del> No primary default EULA is set. Please add one in Settings.',
'use_default_eula_column' => 'Use default EULA',
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Checkout Asset',
'clone' => 'Clone Asset',
'deployable' => 'Deployable',
'deleted' => 'This asset has been deleted. <a href="/hardware/:asset_id/restore">Click here to restore it</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Edit Asset',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Requestable',
'requested' => 'Requested',
'restore' => 'Restore Asset',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'About Asset Models',
'about_models_text' => 'Asset Models are a way to group identical assets. "MBP 2013", "IPhone 6s", etc.',
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Bulk Delete Asset Models',
'bulk_delete_help' => 'Use the checkboxes below to confirm the deletion of the selected asset models. Asset models that have assets associated with them cannot be deleted until the assets are associated with a different model.',
'bulk_delete_warn' => 'You are about to delete :model_count asset models.',

View file

@ -62,8 +62,6 @@ return [
'label_logo_size' => 'Square logos look best - will be displayed in the top right of each asset label. ',
'laravel' => 'Laravel Version',
'ldap_client_tls_cert' => 'LDAP Client-Side TLS Certificate',
'ldap_client_tls_cert_help' => 'Client-Side TLS Certificate and Key for LDAP connections are usually only useful in Google Workspace configurations with "Secure LDAP." Both are required.',
'ldap_client_tls_key' => 'LDAP Client-Side TLS key',
'ldap_enabled' => 'LDAP enabled',
'ldap_integration' => 'LDAP Integration',
'ldap_settings' => 'LDAP Settings',

View file

@ -15,6 +15,7 @@ return [
'password_resets_sent' => 'The selected users who are activated and have a valid email addresses have been sent a password reset link.',
'password_reset_sent' => 'A password reset link has been sent to :email!',
'success' => [
'create' => 'User was successfully created.',
'update' => 'User was successfully updated.',

View file

@ -177,6 +177,7 @@
'remove_company' => 'Remove Company Association',
'reports' => 'Reports',
'restored' => 'restored',
'restore' => 'Restore',
'requested' => 'Requested',
'request_canceled' => 'Request Canceled',
'save' => 'Save',

View file

@ -60,7 +60,7 @@ return [
'test_mail_text' => 'This is a test from the Snipe-IT Asset Management System. If you got this, mail is working :)',
'the_following_item' => 'The following item has been checked in: ',
'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.',
'assets_warrantee_alert' => 'There is :count asset with a warrantee expiring in the next :threshold days.|There are :count assets with warrantees expiring in the next :threshold days.',
'assets_warrantee_alert' => 'There is :count asset with a warranty expiring in the next :threshold days.|There are :count assets with warranties expiring in the next :threshold days.',
'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.',
'to_reset' => 'To reset your :web password, complete this form:',
'type' => 'Type',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Nombre de Depreciación',
'number_of_months' => 'Número de Meses',
'update' => 'Actualizar Depreciación',
'depreciation_min' => 'Valor mínimo después de depreciación'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Asignar Equipo',
'clone' => 'Clonar Equipo',
'deployable' => 'Desplegable',
'deleted' => 'Este equipo ha sido eliminado. <a href="/hardware/:asset_id/restore">Click aquí para restaurarlo</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Editar Equipo',
'model_deleted' => 'Este modelo de equipo ha sido borrado. Debes restaurar el modelo antes de poder restaurar el equipo.<br/><a href="/hardware/models/:model_id/restore">Hacer click aquí para restaurar el modelo</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Puede Solicitarse',
'requested' => 'Solicitado',
'restore' => 'Restaurar equipo',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Acerca de modelos de activos',
'about_models_text' => 'Los Modelos de activos son una forma de agrupar activos idénticos. "MBP 2013", "IPhone 6s", etc.',
'deleted' => 'Este modelo ha sido borrado.<a href="/hardware/models/:model_id/restore">Click aquí para restaurarlo</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Borrar Grandes Modelos de Activos',
'bulk_delete_help' => 'Usa las casillas de verificación para confirmar la eliminación de los modelos de activos. Los modelos de activos tienen activos asociados que no pueden ser eliminados hasta que los activos sean asociados con un modelo diferente.',
'bulk_delete_warn' => 'Estás a punto de eliminar: los modelos de activo model_count.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Eliminar Asociación de compañía',
'reports' => 'Informes',
'restored' => 'restaurado',
'restore' => 'Restore',
'requested' => 'Solicitado',
'request_canceled' => 'Solicitud Cancelada',
'save' => 'Guardar',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Nombre Amortización',
'number_of_months' => 'Meses',
'update' => 'Actualizar Amortización',
'depreciation_min' => 'Valor mínimo después de la depreciación'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Activo de pago',
'clone' => 'Clonar Equipo',
'deployable' => 'Desplegable',
'deleted' => 'Este equipo ha sido eliminado. <a href="/hardware/:asset_id/restore">Click aqui para restaurarlot</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Editar Equipo',
'model_deleted' => 'Este modelo de equipo ha sido borrado. Debe restaurar el modelo antes de poder restaurar el equipo.<br/><a href="/hardware/models/:model_id/restore">Hacer click aquí para restaurar el modelo</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Requerible',
'requested' => 'Solicitado',
'restore' => 'Restaurar equipo',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Acerca de modelos de activos',
'about_models_text' => 'Los Modelos de activos son una forma de agrupar activos idénticos. "MBP 2013", "IPhone 6s", etc.',
'deleted' => 'Este modelo ha sido borrado.<a href="/hardware/models/:model_id/restore">Click aquí para restaurarlo</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Borrar Grandes Modelos de Activos',
'bulk_delete_help' => 'Usa las casillas de verificación para confirmar la eliminación de los modelos de activos. Los modelos de activos tienen activos asociados que no pueden ser eliminados hasta que los activos sean asociados con un modelo diferente.',
'bulk_delete_warn' => 'Estás a punto de eliminar: los modelos de activo model_count.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Eliminar Asociación de compañía',
'reports' => 'Informes',
'restored' => 'restaurado',
'restore' => 'Restore',
'requested' => 'Solicitado',
'request_canceled' => 'Solicitud Cancelada',
'save' => 'Guardar',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Nombre Amortización',
'number_of_months' => 'Meses',
'update' => 'Actualizar Amortización',
'depreciation_min' => 'Valor mínimo después de depreciado'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Activo de pago',
'clone' => 'Clonar Equipo',
'deployable' => 'Desplegable',
'deleted' => 'Este equipo ha sido eliminado. <a href="/hardware/:asset_id/restore">Click aqui para restaurarlot</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Editar Equipo',
'model_deleted' => 'Este modelo de equipo ha sido borrado. Debe restaurar el modelo antes de poder restaurar el equipo.<br/><a href="/hardware/models/:model_id/restore">Hacer click aquí para restaurar el modelo</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Requerible',
'requested' => 'Solicitado',
'restore' => 'Restaurar equipo',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Acerca de modelos de activos',
'about_models_text' => 'Los Modelos de activos son una forma de agrupar activos idénticos. "MBP 2013", "IPhone 6s", etc.',
'deleted' => 'Este modelo ha sido borrado.<a href="/hardware/models/:model_id/restore">Click aquí para restaurarlo</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Borrar Grandes Modelos de Activos',
'bulk_delete_help' => 'Usa las casillas de verificación para confirmar la eliminación de los modelos de activos. Los modelos de activos tienen activos asociados que no pueden ser eliminados hasta que los activos sean asociados con un modelo diferente.',
'bulk_delete_warn' => 'Estás a punto de eliminar: los modelos de activo model_count.',

View file

@ -176,6 +176,7 @@
'remove_company' => 'Eliminar Asociación de compañía',
'reports' => 'Informes',
'restored' => 'restaurado',
'restore' => 'Restore',
'requested' => 'Solicitado',
'request_canceled' => 'Solicitud Cancelada',
'save' => 'Guardar',

View file

@ -8,5 +8,6 @@ return [
'depreciation_name' => 'Nombre de Depreciación',
'number_of_months' => 'Número de Meses',
'update' => 'Actualizar Depreciación',
'depreciation_min' => 'Valor mínimo después de la depreciación'
];

View file

@ -10,9 +10,9 @@ return [
'checkout' => 'Retirar Activo',
'clone' => 'Clonar Activo',
'deployable' => 'Enviable',
'deleted' => 'Este activo ha sido borrado. <a href="/hardware/:asset_id/restore">Click aquí para restaurarlos</a>.',
'deleted' => 'This asset has been deleted.',
'edit' => 'Editar Activo',
'model_deleted' => 'Este modelo de activos ha sido borrado. Debes restaurar el modelo antes de poder restaurar los activos. <br/><a href="/hardware/models/:model_id/restore">Click aquí para restaurar el modelo</a>.',
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.',
'requestable' => 'Solicitable',
'requested' => 'Solicitado',
'restore' => 'Restaurar Activo',

View file

@ -3,7 +3,7 @@
return [
'about_models_title' => 'Acerca de los Modelos de Activos',
'about_models_text' => 'Los Modelos de Activos son un grupo de activos idénticos. "MBP 2013", "iPhone 6S", etc.',
'deleted' => 'Este modelo ha sido borrado. <a href="/hardware/models/:model_id/restore">Click aquí para restaurarlo</a>.',
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Eliminación Masiva de Modelos de Activos',
'bulk_delete_help' => 'Usa las casillas abajo para confirmar la eliminación de los modelos de activos seleccionados. Los modelos de activo que tienen distintos activos asociados con ellos no pueden ser borrados hasta que los activos sean asociados a un modelo diferente.',
'bulk_delete_warn' => 'Estás a punto de borrar :model_count modelos de activo.',

Some files were not shown because too many files have changed in this diff Show more