Compare commits
123 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e08a91c53 | |||
| 4fd35573ad | |||
| caf2cdbf6f | |||
| c0293a7c1c | |||
| 17405f5de1 | |||
| bfefa10462 | |||
| 55a140045b | |||
| 897bd2c56e | |||
| 7321c5937f | |||
| 98700cab8b | |||
| 3d07635820 | |||
| 59b18a6ada | |||
| ce525c1985 | |||
| a0d163a3c4 | |||
| faab971931 | |||
| 38eb16dfea | |||
| 4494456cad | |||
| 876dde1280 | |||
| 17ee904828 | |||
| 4f1b58cd35 | |||
| edcd3afc3e | |||
| e433b0f9d8 | |||
| f137e516a6 | |||
| ba38b841cb | |||
| f7c6697a69 | |||
| 498fc3762d | |||
| eb24eb1fff | |||
| 3e5e6ba99a | |||
| 0396267388 | |||
| 4577ba39d7 | |||
| 7eef1b4bcf | |||
| 578da128e9 | |||
| bb4d49690f | |||
| 7eb94d16a1 | |||
| 65bd33c274 | |||
| 0f7aa21a59 | |||
| ee0814716a | |||
| f56e1768b6 | |||
| 012afe99e2 | |||
| 0c02b6d24e | |||
| 2f34336f2b | |||
| afe6f43a1b | |||
| 738e33b165 | |||
| 566fd4d2e1 | |||
| c61887da21 | |||
| 6852b74317 | |||
| 4c266fdcf4 | |||
| c26a2f8291 | |||
| a994e54726 | |||
| 172c7c75a8 | |||
| 487fd17ce3 | |||
| 65353fa422 | |||
| 4f4920615c | |||
| c162c02304 | |||
| 1bb1480f67 | |||
| 8dceacc2b4 | |||
| ffae537400 | |||
| 5ce7882bf5 | |||
| b36594f508 | |||
| 59c9c22a59 | |||
| 9097681c13 | |||
| 567f741d95 | |||
| 9b1fb90519 | |||
| b567ffdcfe | |||
| 9d44607b8f | |||
| 35ee52212f | |||
| e9e32fdb00 | |||
| 6c130ce8ac | |||
| dd7db0de93 | |||
| 70efac8fa7 | |||
| 6e2556eefd | |||
| fb6a545cc6 | |||
| e5c1e41966 | |||
| 61617a2629 | |||
| a3e80882c1 | |||
| 31980c55de | |||
| d1022e8ff7 | |||
| e6ff447ee8 | |||
| 1123272ae8 | |||
| 74aa562a3b | |||
| 74773ac912 | |||
| 9764d2ad24 | |||
| d03b8c6528 | |||
| 99a355145e | |||
| 7233e2dded | |||
| eed50112d5 | |||
| 5aee5a3f3d | |||
| f21c7ba312 | |||
| 9d7455f022 | |||
| b748e7ed5e | |||
| 84a717c6ad | |||
| a202e1657c | |||
| 30ec919048 | |||
| 4ae4083b7b | |||
| dec9ac1ac8 | |||
| 8776d28d3b | |||
| 231dea0ebc | |||
| cceeb5c8a2 | |||
| 579334b5fc | |||
| 3a82fbe714 | |||
| 143071fa0c | |||
| 0589652edb | |||
| b772d8e527 | |||
| b96d4dcf1f | |||
| dc32e4bdb0 | |||
| 43f2a530f5 | |||
| 6ece593629 | |||
| 33de0ec8a9 | |||
| 8e17714c12 | |||
| 32fc052c3b | |||
| 17febca466 | |||
| 8572a9771b | |||
| 3ea294c0e6 | |||
| 2b3b2e3197 | |||
| a9d9234fb3 | |||
| a11d9b84a4 | |||
| 936ff707c7 | |||
| def69b1aaa | |||
| 4818e1b8ca | |||
| 623f21e51f | |||
| bd524ff2f3 | |||
| 04ab522ee3 | |||
| f672b14468 |
@@ -809,6 +809,26 @@
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "TheVakman",
|
||||
"name": "Lawrence",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/18545156?v=4",
|
||||
"profile": "https://github.com/TheVakman",
|
||||
"contributions": [
|
||||
"test",
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "uknzaeinozpas",
|
||||
"name": "uknzaeinozpas",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/22473767?v=4",
|
||||
"profile": "https://github.com/uknzaeinozpas",
|
||||
"contributions": [
|
||||
"test",
|
||||
"code"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ LOGIN_LOCKOUT_DURATION=60
|
||||
# --------------------------------------------
|
||||
# OPTIONAL: MISC
|
||||
# --------------------------------------------
|
||||
APP_LOG=daily
|
||||
APP_LOG=single
|
||||
APP_LOG_MAX_FILES=10
|
||||
APP_LOCKED=false
|
||||
FILESYSTEM_DISK=local
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[](https://travis-ci.org/snipe/snipe-it) [](http://waffle.io/snipe/snipe-it) []() [](https://crowdin.com/project/snipe-it) [](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://hub.docker.com/r/snipe/snipe-it/) [](https://twitter.com/snipeyhead) [](https://zenhub.io) [](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade)
|
||||
[](#contributors)
|
||||
[](#contributors)
|
||||
|
||||
|
||||
## Snipe-IT - Open Source Asset Management System
|
||||
@@ -68,7 +68,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/857740?v=3" width="110px;"/><br /><sub>Gil Rutkowski</sub>](http://FlashingCursor.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=flashingcursor "Code") | [<img src="https://avatars3.githubusercontent.com/u/129360?v=3" width="110px;"/><br /><sub>Desmond Morris</sub>](http://www.desmondmorris.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=desmondmorris "Code") | [<img src="https://avatars2.githubusercontent.com/u/52936?v=3" width="110px;"/><br /><sub>Nick Peelman</sub>](http://peelman.us)<br />[💻](https://github.com/snipe/snipe-it/commits?author=peelman "Code") | [<img src="https://avatars0.githubusercontent.com/u/53161?v=3" width="110px;"/><br /><sub>Abraham Vegh</sub>](https://abrahamvegh.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=abrahamvegh "Code") | [<img src="https://avatars0.githubusercontent.com/u/2818680?v=3" width="110px;"/><br /><sub>Mohamed Rashid</sub>](https://github.com/rashivkp)<br />[📖](https://github.com/snipe/snipe-it/commits?author=rashivkp "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/1509456?v=3" width="110px;"/><br /><sub>Kasey</sub>](http://hinchk.github.io)<br />[💻](https://github.com/snipe/snipe-it/commits?author=HinchK "Code") | [<img src="https://avatars2.githubusercontent.com/u/10522541?v=3" width="110px;"/><br /><sub>Brett</sub>](https://github.com/BrettFagerlund)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=BrettFagerlund "Tests") |
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/16108587?v=3" width="110px;"/><br /><sub>Jason Spriggs</sub>](http://jasonspriggs.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jasonspriggs "Code") | [<img src="https://avatars2.githubusercontent.com/u/1134568?v=3" width="110px;"/><br /><sub>Nate Felton</sub>](http://n8felton.wordpress.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=n8felton "Code") | [<img src="https://avatars2.githubusercontent.com/u/14036694?v=3" width="110px;"/><br /><sub>Manasses Ferreira</sub>](http://homepages.dcc.ufmg.br/~manassesferreira)<br />[💻](https://github.com/snipe/snipe-it/commits?author=manassesferreira "Code") | [<img src="https://avatars0.githubusercontent.com/u/15913949?v=3" width="110px;"/><br /><sub>Steve</sub>](https://github.com/steveelwood)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=steveelwood "Tests") | [<img src="https://avatars1.githubusercontent.com/u/3361683?v=3" width="110px;"/><br /><sub>matc</sub>](http://twitter.com/matc)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=matc "Tests") | [<img src="https://avatars3.githubusercontent.com/u/7405702?v=3" width="110px;"/><br /><sub>Cole R. Davis</sub>](http://www.davisracingteam.com)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=VanillaNinjaD "Tests") | [<img src="https://avatars2.githubusercontent.com/u/10167681?v=3" width="110px;"/><br /><sub>gibsonjoshua55</sub>](https://github.com/gibsonjoshua55)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gibsonjoshua55 "Code") |
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/2809241?v=4" width="110px;"/><br /><sub>Robin Temme</sub>](https://github.com/zwerch)<br />[💻](https://github.com/snipe/snipe-it/commits?author=zwerch "Code") | [<img src="https://avatars0.githubusercontent.com/u/6961695?v=4" width="110px;"/><br /><sub>Iman</sub>](https://github.com/imanghafoori1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=imanghafoori1 "Code") | [<img src="https://avatars1.githubusercontent.com/u/6551003?v=4" width="110px;"/><br /><sub>Richard Hofman</sub>](https://github.com/richardhofman6)<br />[💻](https://github.com/snipe/snipe-it/commits?author=richardhofman6 "Code") | [<img src="https://avatars0.githubusercontent.com/u/3697569?v=4" width="110px;"/><br /><sub>gizzmojr</sub>](https://github.com/gizzmojr)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gizzmojr "Code") | [<img src="https://avatars3.githubusercontent.com/u/404729?v=4" width="110px;"/><br /><sub>Jenny Li</sub>](https://github.com/imjennyli)<br />[📖](https://github.com/snipe/snipe-it/commits?author=imjennyli "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/869227?v=4" width="110px;"/><br /><sub>Geoff Young</sub>](https://github.com/GeoffYoung)<br />[💻](https://github.com/snipe/snipe-it/commits?author=GeoffYoung "Code") | [<img src="https://avatars3.githubusercontent.com/u/1068477?v=4" width="110px;"/><br /><sub>Elliot Blackburn</sub>](http://www.elliotblackburn.com)<br />[📖](https://github.com/snipe/snipe-it/commits?author=BlueHatbRit "Documentation") |
|
||||
| [<img src="https://avatars1.githubusercontent.com/u/6357451?v=4" width="110px;"/><br /><sub>Tõnis Ormisson</sub>](http://andmemasin.eu)<br />[💻](https://github.com/snipe/snipe-it/commits?author=TonisOrmisson "Code") | [<img src="https://avatars0.githubusercontent.com/u/449411?v=4" width="110px;"/><br /><sub>Nicolai Essig</sub>](http://www.nicolai-essig.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=thakilla "Code") | [<img src="https://avatars1.githubusercontent.com/u/14809698?v=4" width="110px;"/><br /><sub>Danielle</sub>](https://github.com/techincolor)<br />[📖](https://github.com/snipe/snipe-it/commits?author=techincolor "Documentation") |
|
||||
| [<img src="https://avatars1.githubusercontent.com/u/6357451?v=4" width="110px;"/><br /><sub>Tõnis Ormisson</sub>](http://andmemasin.eu)<br />[💻](https://github.com/snipe/snipe-it/commits?author=TonisOrmisson "Code") | [<img src="https://avatars0.githubusercontent.com/u/449411?v=4" width="110px;"/><br /><sub>Nicolai Essig</sub>](http://www.nicolai-essig.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=thakilla "Code") | [<img src="https://avatars1.githubusercontent.com/u/14809698?v=4" width="110px;"/><br /><sub>Danielle</sub>](https://github.com/techincolor)<br />[📖](https://github.com/snipe/snipe-it/commits?author=techincolor "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/18545156?v=4" width="110px;"/><br /><sub>Lawrence</sub>](https://github.com/TheVakman)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=TheVakman "Tests") [🐛](https://github.com/snipe/snipe-it/issues?q=author%3ATheVakman "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/22473767?v=4" width="110px;"/><br /><sub>uknzaeinozpas</sub>](https://github.com/uknzaeinozpas)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=uknzaeinozpas "Tests") [💻](https://github.com/snipe/snipe-it/commits?author=uknzaeinozpas "Code") |
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
||||
@@ -49,7 +49,7 @@ class SyncAssetLocations extends Command
|
||||
$bar = $this->output->createProgressBar(count($total_assets));
|
||||
|
||||
// Unassigned
|
||||
$rtd_assets = Asset::whereNull('assigned_to')->with('defaultLoc')->get();
|
||||
$rtd_assets = Asset::whereNull('assigned_to')->whereNull('deleted_at')->with('defaultLoc')->get();
|
||||
$output['info'][] = 'There are '.$rtd_assets->count().' unassigned assets.';
|
||||
|
||||
foreach ($rtd_assets as $rtd_asset) {
|
||||
@@ -60,15 +60,15 @@ class SyncAssetLocations extends Command
|
||||
$bar->advance();
|
||||
}
|
||||
|
||||
$assigned_user_assets = Asset::where('assigned_type','App\Models\User')->whereNotNull('assigned_to')->get();
|
||||
$assigned_user_assets = Asset::where('assigned_type','App\Models\User')->whereNotNull('assigned_to')->whereNull('deleted_at')->get();
|
||||
$output['info'][] = 'There are '.$assigned_user_assets->count().' assets checked out to users.';
|
||||
foreach ($assigned_user_assets as $assigned_user_asset) {
|
||||
if (($assigned_user_asset->assignedTo) && ($assigned_user_asset->assignedTo->userLoc)) {
|
||||
$new_location=$assigned_user_asset->assignedTo->userloc->id;
|
||||
$output['info'][] ='Setting User Asset ' . $assigned_user_asset->id . ' ('.$assigned_user_asset->asset_tag.') to ' . $assigned_user_asset->assignedTo->userLoc->name . ' which is id: ' . $new_location;
|
||||
} else {
|
||||
$output['error'][] ='Asset ' . $assigned_user_asset->id . ' ('.$assigned_user_asset->asset_tag.') still has no location! ';
|
||||
$new_location=$assigned_user_asset->rtd_location_id;
|
||||
$output['warn'][] ='Asset ' . $assigned_user_asset->id . ' ('.$assigned_user_asset->asset_tag.') still has no location! ';
|
||||
$new_location = $assigned_user_asset->rtd_location_id;
|
||||
}
|
||||
$assigned_user_asset->location_id=$new_location;
|
||||
$assigned_user_asset->unsetEventDispatcher();
|
||||
@@ -78,34 +78,45 @@ class SyncAssetLocations extends Command
|
||||
}
|
||||
|
||||
$assigned_location_assets = Asset::where('assigned_type','App\Models\Location')
|
||||
->whereNotNull('assigned_to')->get();
|
||||
->whereNotNull('assigned_to')->whereNull('deleted_at')->get();
|
||||
$output['info'][] = 'There are '.$assigned_location_assets->count().' assets checked out to locations.';
|
||||
|
||||
foreach ($assigned_location_assets as $assigned_location_asset) {
|
||||
$assigned_location_asset->location_id = $assigned_location_asset->assignedTo->id;
|
||||
|
||||
$output['info'][] ='Setting Location Assigned asset ' . $assigned_location_asset->id . ' ('.$assigned_location_asset->asset_tag.') that is checked out to '.$assigned_location_asset->assignedTo->name.' (#'.$assigned_location_asset->assignedTo->id.') to location: ' . $assigned_location_asset->assetLoc()->id;
|
||||
$assigned_location_asset->unsetEventDispatcher();
|
||||
$assigned_location_asset->save();
|
||||
if ($assigned_location_asset->assignedTo) {
|
||||
$assigned_location_asset->location_id = $assigned_location_asset->assignedTo->id;
|
||||
$output['info'][] ='Setting Location Assigned asset ' . $assigned_location_asset->id . ' ('.$assigned_location_asset->asset_tag.') that is checked out to '.$assigned_location_asset->assignedTo->name.' (#'.$assigned_location_asset->assignedTo->id.') to location: ' . $assigned_location_asset->assetLoc()->id;
|
||||
$assigned_location_asset->unsetEventDispatcher();
|
||||
$assigned_location_asset->save();
|
||||
} else {
|
||||
$output['warn'][] ='Asset ' . $assigned_location_asset->id . ' ('.$assigned_location_asset->asset_tag.') did not return a valid associated location - perhaps it was deleted?';
|
||||
}
|
||||
$bar->advance();
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Assigned to assets
|
||||
$assigned_asset_assets = Asset::where('assigned_type','App\Models\Asset')
|
||||
->whereNotNull('assigned_to')->get();
|
||||
->whereNotNull('assigned_to')->whereNull('deleted_at')->get();
|
||||
$output['info'][] ='Asset-assigned assets: '.$assigned_asset_assets->count();
|
||||
|
||||
foreach ($assigned_asset_assets as $assigned_asset_asset) {
|
||||
$assigned_asset_asset->location_id = $assigned_asset_asset->assetLoc()->id;
|
||||
$output['info'][] ='Setting Asset Assigned asset ' . $assigned_asset_asset->assetLoc()->id. ' ('.$assigned_asset_asset->asset_tag.') location to: ' . $assigned_asset_asset->assetLoc()->id;
|
||||
$assigned_asset_asset->unsetEventDispatcher();
|
||||
$assigned_asset_asset->save();
|
||||
|
||||
// Check to make sure there aren't any invalid relationships
|
||||
if ($assigned_asset_asset->assetLoc()) {
|
||||
$assigned_asset_asset->location_id = $assigned_asset_asset->assetLoc()->id;
|
||||
$output['info'][] ='Setting Asset Assigned asset ' . $assigned_asset_asset->assetLoc()->id. ' ('.$assigned_asset_asset->asset_tag.') location to: ' . $assigned_asset_asset->assetLoc()->id;
|
||||
$assigned_asset_asset->unsetEventDispatcher();
|
||||
$assigned_asset_asset->save();
|
||||
} else {
|
||||
$output['warn'][] ='Asset Assigned asset ' . $assigned_asset_asset->assetLoc()->id. ' ('.$assigned_asset_asset->asset_tag.') does not seem to have a valid location';
|
||||
}
|
||||
|
||||
$bar->advance();
|
||||
|
||||
}
|
||||
|
||||
$unlocated_assets = Asset::whereNull("location_id")->get();
|
||||
$unlocated_assets = Asset::whereNull("location_id")->whereNull('deleted_at')->get();
|
||||
$output['info'][] ='Assets still without a location: '.$unlocated_assets->count();
|
||||
foreach($unlocated_assets as $unlocated_asset) {
|
||||
$output['warn'][] ='Asset: '.$unlocated_asset->id.' still has no location. ';
|
||||
|
||||
@@ -34,6 +34,10 @@ class AccessoriesController extends Controller
|
||||
$accessories->where('company_id','=',$request->input('company_id'));
|
||||
}
|
||||
|
||||
if ($request->has('category_id')) {
|
||||
$accessories->where('category_id','=',$request->input('category_id'));
|
||||
}
|
||||
|
||||
if ($request->has('manufacturer_id')) {
|
||||
$accessories->where('manufacturer_id','=',$request->input('manufacturer_id'));
|
||||
}
|
||||
|
||||
@@ -56,11 +56,9 @@ class AssetMaintenancesController extends Controller
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$total = $maintenances->count();
|
||||
$maintenances = $maintenances->skip($offset)->take($limit)->get();
|
||||
|
||||
|
||||
return (new AssetMaintenancesTransformer())->transformAssetMaintenances($maintenances, $maintenances->count());
|
||||
return (new AssetMaintenancesTransformer())->transformAssetMaintenances($maintenances, $total);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -182,21 +182,20 @@ class AssetModelsController extends Controller
|
||||
*/
|
||||
public function selectlist(Request $request)
|
||||
{
|
||||
$this->authorize('view', AssetModel::class);
|
||||
|
||||
$assetmodels = AssetModel::select([
|
||||
'models.id',
|
||||
'models.name',
|
||||
'models.image',
|
||||
'models.model_number',
|
||||
]);
|
||||
])->with('manufacturer');
|
||||
|
||||
|
||||
if ($request->has('search')) {
|
||||
$assetmodels = $assetmodels->where('models.name', 'LIKE', '%'.$request->get('search').'%')
|
||||
->orWhere('models.model_number', 'LIKE', '%'.$request->get('search').'%');
|
||||
}
|
||||
$assetmodels = $assetmodels->paginate(50);
|
||||
$assetmodels = $assetmodels->orderby('models.name', 'asc')->orderby('models.model_number', 'asc')->paginate(50);
|
||||
|
||||
foreach ($assetmodels as $assetmodel) {
|
||||
$assetmodel->use_text = $assetmodel->present()->modelName;
|
||||
|
||||
@@ -281,27 +281,34 @@ class AssetsController extends Controller
|
||||
'assets.name',
|
||||
'assets.asset_tag',
|
||||
'assets.model_id',
|
||||
'assets.assigned_to',
|
||||
'assets.assigned_type',
|
||||
'assets.status_id'
|
||||
])->with('model', 'assetstatus')->NotArchived());
|
||||
])->with('model', 'assetstatus', 'assignedTo')->NotArchived());
|
||||
|
||||
|
||||
if ($request->has('search')) {
|
||||
$assets = $assets->where('assets.name', 'LIKE', '%'.$request->get('search').'%')
|
||||
->orWhere('assets.asset_tag', 'LIKE', '%'.$request->get('search').'%')
|
||||
->join('models AS assets_models',function ($join) use ($request) {
|
||||
$join->on('assets_models.id', "=", "assets.model_id");
|
||||
})->orWhere('assets_models.name','LIKE','%'.$request->get('search').'%');
|
||||
$assets = $assets->AssignedSearch($request->input('search'));
|
||||
}
|
||||
|
||||
|
||||
$assets = $assets->paginate(50);
|
||||
|
||||
// Loop through and set some custom properties for the transformer to use.
|
||||
// This lets us have more flexibility in special cases like assets, where
|
||||
// they may not have a ->name value but we want to display something anyway
|
||||
foreach ($assets as $asset) {
|
||||
|
||||
|
||||
$asset->use_text = $asset->present()->fullName;
|
||||
|
||||
if ($asset->checkedOutToUser()) {
|
||||
$asset->use_text .= ' → '.$asset->assigned->getFullNameAttribute();
|
||||
}
|
||||
|
||||
|
||||
if ($asset->assetstatus->getStatuslabelType()=='pending') {
|
||||
$asset->use_text = $asset->present()->fullName.' ('.$asset->assetstatus->getStatuslabelType().')';
|
||||
$asset->use_text .= '('.$asset->assetstatus->getStatuslabelType().')';
|
||||
}
|
||||
|
||||
$asset->use_image = ($asset->getImageUrl()) ? $asset->getImageUrl() : null;
|
||||
|
||||
@@ -141,7 +141,6 @@ class CategoriesController extends Controller
|
||||
*/
|
||||
public function selectlist(Request $request, $category_type = 'asset')
|
||||
{
|
||||
$this->authorize('view', Categories::class);
|
||||
|
||||
$categories = Category::select([
|
||||
'id',
|
||||
|
||||
@@ -153,7 +153,6 @@ class CompaniesController extends Controller
|
||||
*/
|
||||
public function selectlist(Request $request)
|
||||
{
|
||||
$this->authorize('view', Company::class);
|
||||
|
||||
$companies = Company::select([
|
||||
'companies.id',
|
||||
|
||||
@@ -160,7 +160,6 @@ class ConsumablesController extends Controller
|
||||
*/
|
||||
public function getDataView($consumableId)
|
||||
{
|
||||
//$consumable = Consumable::find($consumableID);
|
||||
$consumable = Consumable::with(array('consumableAssignments'=>
|
||||
function ($query) {
|
||||
$query->orderBy('created_at', 'DESC');
|
||||
@@ -171,12 +170,10 @@ class ConsumablesController extends Controller
|
||||
},
|
||||
))->find($consumableId);
|
||||
|
||||
// $consumable->load('consumableAssignments.admin','consumableAssignments.user');
|
||||
|
||||
if (!Company::isCurrentUserHasAccess($consumable)) {
|
||||
return ['total' => 0, 'rows' => []];
|
||||
}
|
||||
$this->authorize('view', Component::class);
|
||||
$this->authorize('view', Consumable::class);
|
||||
$rows = array();
|
||||
|
||||
foreach ($consumable->consumableAssignments as $consumable_assignment) {
|
||||
|
||||
@@ -122,7 +122,6 @@ class DepartmentsController extends Controller
|
||||
*/
|
||||
public function selectlist(Request $request)
|
||||
{
|
||||
$this->authorize('view', Department::class);
|
||||
|
||||
$departments = Department::select([
|
||||
'id',
|
||||
|
||||
@@ -132,7 +132,6 @@ class ManufacturersController extends Controller
|
||||
*/
|
||||
public function selectlist(Request $request)
|
||||
{
|
||||
$this->authorize('view', Manufacturers::class);
|
||||
|
||||
$manufacturers = Manufacturer::select([
|
||||
'id',
|
||||
|
||||
@@ -146,7 +146,6 @@ class SuppliersController extends Controller
|
||||
*/
|
||||
public function selectlist(Request $request)
|
||||
{
|
||||
$this->authorize('view', Supplier::class);
|
||||
|
||||
$suppliers = Supplier::select([
|
||||
'id',
|
||||
|
||||
@@ -154,16 +154,21 @@ class AssetMaintenancesController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$asset = null;
|
||||
|
||||
if ($asset = Asset::find(request('asset_id'))) {
|
||||
// We have to set this so that the correct property is set in the select2 ajax dropdown
|
||||
$asset->asset_id = $asset->id;
|
||||
}
|
||||
|
||||
// Prepare Asset Maintenance Type List
|
||||
$assetMaintenanceType = [
|
||||
'' => 'Select an asset maintenance type',
|
||||
] + AssetMaintenance::getImprovementOptions();
|
||||
// Mark the selected asset, if it came in
|
||||
// Render the view
|
||||
|
||||
return view('asset_maintenances/edit')
|
||||
->with('asset_list', Helper::detailedAssetList())
|
||||
->with('selectedAsset', request('asset_id'))
|
||||
->with('supplier_list', Helper::suppliersList())
|
||||
->with('asset', $asset)
|
||||
->with('assetMaintenanceType', $assetMaintenanceType)
|
||||
->with('item', new AssetMaintenance);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class AssetModelsController extends Controller
|
||||
|
||||
$image = Input::file('image');
|
||||
$file_name = str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/models/');
|
||||
$path = app('models_upload_path');
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
@@ -191,15 +191,14 @@ class AssetModelsController extends Controller
|
||||
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
|
||||
}
|
||||
|
||||
$model->depreciation_id = $request->input('depreciation_id');
|
||||
$model->eol = $request->input('eol');
|
||||
$model->depreciation_id = $request->input('depreciation_id');
|
||||
$model->eol = $request->input('eol');
|
||||
$model->name = $request->input('name');
|
||||
$model->model_number = $request->input('model_number');
|
||||
$model->manufacturer_id = $request->input('manufacturer_id');
|
||||
$model->category_id = $request->input('category_id');
|
||||
$model->notes = $request->input('notes');
|
||||
|
||||
$model->requestable = Input::has('requestable');
|
||||
$model->requestable = $request->input('requestable', '0');
|
||||
|
||||
if ($request->input('custom_fieldset')=='') {
|
||||
$model->fieldset_id = null;
|
||||
@@ -207,35 +206,38 @@ class AssetModelsController extends Controller
|
||||
$model->fieldset_id = $request->input('custom_fieldset');
|
||||
}
|
||||
|
||||
if (Input::file('image')) {
|
||||
$old_image = $model->image;
|
||||
|
||||
$image = Input::file('image');
|
||||
$file_name = str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/models/');
|
||||
$old_image = $path.$model->image;
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$model->image = null;
|
||||
}
|
||||
|
||||
try {
|
||||
unlink($old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = $model->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path.'/'.$file_name);
|
||||
})->save(app('models_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move($path, $file_name);
|
||||
$image->move(app('models_upload_path'), $file_name);
|
||||
}
|
||||
$model->image = $file_name;
|
||||
|
||||
}
|
||||
|
||||
if ($request->input('image_delete') == 1 && Input::file('image') == "") {
|
||||
$model->image = null;
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('models_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($model->save()) {
|
||||
return redirect()->route("models.index")->with('success', trans('admin/models/message.update.success'));
|
||||
}
|
||||
|
||||
@@ -454,14 +454,32 @@ class AssetsController extends Controller
|
||||
}
|
||||
$this->authorize('checkout', $asset);
|
||||
|
||||
|
||||
// Fetch the target and set the asset's new location_id
|
||||
if (request('assigned_user')) {
|
||||
$target = User::find(request('assigned_user'));
|
||||
$asset->location_id = ($target) ? $target->location_id : '';
|
||||
|
||||
} elseif (request('assigned_asset')) {
|
||||
|
||||
$target = Asset::where('id','!=',$assetId)->find(request('assigned_asset'));
|
||||
$asset->location_id = $target->rtd_location_id;
|
||||
|
||||
// Override with the asset's location_id if it has one
|
||||
if ($target->location_id!='') {
|
||||
$asset->location_id = ($target) ? $target->location_id : '';
|
||||
}
|
||||
|
||||
} elseif (request('assigned_location')) {
|
||||
$target = Location::find(request('assigned_location'));
|
||||
$asset->location_id = ($target) ? $target->id : '';
|
||||
}
|
||||
// $user = User::find(Input::get('assigned_to'));
|
||||
|
||||
// No valid target was found - error out
|
||||
if (!$target) {
|
||||
return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($asset->getErrors());
|
||||
}
|
||||
|
||||
$admin = Auth::user();
|
||||
|
||||
if ((Input::has('checkout_at')) && (Input::get('checkout_at')!= date("Y-m-d"))) {
|
||||
@@ -476,22 +494,13 @@ class AssetsController extends Controller
|
||||
$expected_checkin = '';
|
||||
}
|
||||
|
||||
// Set the location ID to the RTD location id if there is one
|
||||
if ($asset->rtd_location_id!='') {
|
||||
$asset->location_id = $target->rtd_location_id;
|
||||
}
|
||||
|
||||
// Overwrite that if the target has a location ID though
|
||||
if ($target->location_id!='') {
|
||||
$asset->location_id = $target->location_id;
|
||||
}
|
||||
|
||||
if ($asset->checkOut($target, $admin, $checkout_at, $expected_checkin, e(Input::get('note')), Input::get('name'))) {
|
||||
// Redirect to the new asset page
|
||||
return redirect()->route("hardware.index")->with('success', trans('admin/hardware/message.checkout.success'));
|
||||
}
|
||||
|
||||
// Redirect to the asset management page with error
|
||||
// Redirect to the asset management page with error
|
||||
return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($asset->getErrors());
|
||||
}
|
||||
|
||||
@@ -657,20 +666,23 @@ class AssetsController extends Controller
|
||||
|
||||
if ($settings->qr_code == '1') {
|
||||
$asset = Asset::withTrashed()->find($assetId);
|
||||
$size = Helper::barcodeDimensions($settings->barcode_type);
|
||||
$qr_file = public_path().'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'-'.str_slug($asset->id).'.png';
|
||||
if ($asset) {
|
||||
$size = Helper::barcodeDimensions($settings->barcode_type);
|
||||
$qr_file = public_path().'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'-'.str_slug($asset->id).'.png';
|
||||
|
||||
if (isset($asset->id, $asset->asset_tag)) {
|
||||
if (file_exists($qr_file)) {
|
||||
$header = ['Content-type' => 'image/png'];
|
||||
return response()->file($qr_file, $header);
|
||||
} else {
|
||||
$barcode = new \Com\Tecnick\Barcode\Barcode();
|
||||
$barcode_obj = $barcode->getBarcodeObj($settings->barcode_type, route('hardware.show', $asset->id), $size['height'], $size['width'], 'black', array(-2, -2, -2, -2));
|
||||
file_put_contents($qr_file, $barcode_obj->getPngData());
|
||||
return response($barcode_obj->getPngData())->header('Content-type', 'image/png');
|
||||
if (isset($asset->id, $asset->asset_tag)) {
|
||||
if (file_exists($qr_file)) {
|
||||
$header = ['Content-type' => 'image/png'];
|
||||
return response()->file($qr_file, $header);
|
||||
} else {
|
||||
$barcode = new \Com\Tecnick\Barcode\Barcode();
|
||||
$barcode_obj = $barcode->getBarcodeObj($settings->barcode_type, route('hardware.show', $asset->id), $size['height'], $size['width'], 'black', array(-2, -2, -2, -2));
|
||||
file_put_contents($qr_file, $barcode_obj->getPngData());
|
||||
return response($barcode_obj->getPngData())->header('Content-type', 'image/png');
|
||||
}
|
||||
}
|
||||
}
|
||||
return 'That asset is invalid';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -930,8 +942,8 @@ class AssetsController extends Controller
|
||||
|
||||
$destinationPath = config('app.private_uploads').'/assets';
|
||||
|
||||
if ($request->hasFile('image')) {
|
||||
foreach ($request->file('image') as $file) {
|
||||
if ($request->hasFile('assetfile')) {
|
||||
foreach ($request->file('assetfile') as $file) {
|
||||
$extension = $file->getClientOriginalExtension();
|
||||
$filename = 'hardware-'.$asset->id.'-'.str_random(8);
|
||||
$filename .= '-'.str_slug($file->getClientOriginalName()).'.'.$extension;
|
||||
|
||||
@@ -71,9 +71,7 @@ class CategoriesController extends Controller
|
||||
*/
|
||||
public function store(ImageUploadRequest $request)
|
||||
{
|
||||
// create a new model instance
|
||||
$category = new Category();
|
||||
// Update the category data
|
||||
$category->name = $request->input('name');
|
||||
$category->category_type = $request->input('category_type');
|
||||
$category->eula_text = $request->input('eula_text');
|
||||
@@ -150,17 +148,35 @@ class CategoriesController extends Controller
|
||||
$category->require_acceptance = $request->input('require_acceptance', '0');
|
||||
$category->checkin_email = $request->input('checkin_email', '0');
|
||||
|
||||
$old_image = $category->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$category->image = null;
|
||||
}
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/categories/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$file_name = $category->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('categories_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('categories_upload_path'), $file_name);
|
||||
}
|
||||
$category->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$category->image = null;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('categories_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -110,17 +110,35 @@ final class CompaniesController extends Controller
|
||||
|
||||
$company->name = $request->input('name');
|
||||
|
||||
$old_image = $company->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$company->image = null;
|
||||
}
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/companies/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$file_name = $company->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('companies_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('companies_upload_path'), $file_name);
|
||||
}
|
||||
$company->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$company->image = null;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('companies_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Helpers\Helper;
|
||||
use App\Http\Requests\ImageUploadRequest;
|
||||
use App\Models\Actionlog;
|
||||
use App\Models\Company;
|
||||
use App\Models\Component;
|
||||
use App\Models\CustomField;
|
||||
@@ -313,5 +314,97 @@ class ComponentsController extends Controller
|
||||
return redirect()->route('components.index')->with('success', trans('admin/components/message.checkout.success'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a view that allows the checkin of a component from an asset.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @see ComponentsController::postCheckout() method that stores the data.
|
||||
* @since [v4.1.4]
|
||||
* @param int $componentId
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function getCheckin($component_asset_id)
|
||||
{
|
||||
|
||||
// This could probably be done more cleanly but I am very tired. - @snipe
|
||||
if ($component_assets = DB::table('components_assets')->find($component_asset_id)) {
|
||||
if (is_null($component = Component::find($component_assets->component_id))) {
|
||||
return redirect()->route('components.index')->with('error', trans('admin/components/messages.not_found'));
|
||||
}
|
||||
if (is_null($asset = Asset::find($component_assets->asset_id))) {
|
||||
return redirect()->route('components.index')->with('error',
|
||||
trans('admin/components/message.not_found'));
|
||||
}
|
||||
$this->authorize('checkin', $component_assets);
|
||||
return view('components/checkin', compact('component_assets','component','asset'));
|
||||
}
|
||||
|
||||
return redirect()->route('components.index')->with('error', trans('admin/components/messages.not_found'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate and store checkin data.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @see ComponentsController::getCheckout() method that returns the form.
|
||||
* @since [v4.1.4]
|
||||
* @param Request $request
|
||||
* @param int $componentId
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function postCheckin(Request $request, $component_asset_id)
|
||||
{
|
||||
if ($component_assets = DB::table('components_assets')->find($component_asset_id)) {
|
||||
if (is_null($component = Component::find($component_assets->component_id))) {
|
||||
return redirect()->route('components.index')->with('error',
|
||||
trans('admin/components/message.not_found'));
|
||||
}
|
||||
|
||||
|
||||
$this->authorize('checkin', $component);
|
||||
|
||||
$max_to_checkin = $component_assets->assigned_qty;
|
||||
$validator = Validator::make($request->all(), [
|
||||
"checkin_qty" => "required|numeric|between:1,$max_to_checkin"
|
||||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return redirect()->back()
|
||||
->withErrors($validator)
|
||||
->withInput();
|
||||
}
|
||||
|
||||
// Validation passed, so let's figure out what we have to do here.
|
||||
$qty_remaining_in_checkout = ($component_assets->assigned_qty - (int)$request->input('checkin_qty'));
|
||||
|
||||
// We have to modify the record to reflect the new qty that's
|
||||
// actually checked out.
|
||||
$component_assets->assigned_qty = $qty_remaining_in_checkout;
|
||||
DB::table('components_assets')->where('id',
|
||||
$component_asset_id)->update(['assigned_qty' => $qty_remaining_in_checkout]);
|
||||
|
||||
$log = new Actionlog();
|
||||
$log->user_id = Auth::user()->id;
|
||||
$log->action_type = 'checkin from';
|
||||
$log->target_type = Asset::class;
|
||||
$log->target_id = $component_assets->asset_id;
|
||||
$log->item_id = $component_assets->component_id;
|
||||
$log->item_type = Component::class;
|
||||
$log->note = $request->input('note');
|
||||
$log->save();
|
||||
|
||||
// If the checked-in qty is exactly the same as the assigned_qty,
|
||||
// we can simply delete the associated components_assets record
|
||||
if ($qty_remaining_in_checkout == 0) {
|
||||
DB::table('components_assets')->where('id', '=', $component_asset_id)->delete();
|
||||
}
|
||||
|
||||
return redirect()->route('components.index')->with('success',
|
||||
trans('admin/components/message.checkout.success'));
|
||||
}
|
||||
return redirect()->route('components.index')->with('error', trans('admin/components/message.not_found'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\CustomFieldRequest;
|
||||
use View;
|
||||
use App\Models\CustomFieldset;
|
||||
use App\Models\CustomField;
|
||||
@@ -69,7 +70,7 @@ class CustomFieldsController extends Controller
|
||||
* @since [v1.8]
|
||||
* @return Redirect
|
||||
*/
|
||||
public function store(Request $request)
|
||||
public function store(CustomFieldRequest $request)
|
||||
{
|
||||
$field = new CustomField([
|
||||
"name" => $request->get("name"),
|
||||
@@ -81,27 +82,19 @@ class CustomFieldsController extends Controller
|
||||
]);
|
||||
|
||||
|
||||
|
||||
if (!in_array(Input::get('format'), array_keys(CustomField::$PredefinedFormats))) {
|
||||
$field->format = e($request->get("custom_format"));
|
||||
} else {
|
||||
$field->format = e($request->get("format"));
|
||||
}
|
||||
|
||||
|
||||
$validator = Validator::make(Input::all(), $field->rules);
|
||||
|
||||
if ($validator->passes()) {
|
||||
$results = $field->save();
|
||||
if ($results) {
|
||||
return redirect()->route("fields.index")->with("success", trans('admin/custom_fields/message.field.create.success'));
|
||||
} else {
|
||||
dd($field);
|
||||
return redirect()->back()->withInput()->with('error', trans('admin/custom_fields/message.field.create.error'));
|
||||
}
|
||||
if ($field->save()) {
|
||||
return redirect()->route("fields.index")->with("success", trans('admin/custom_fields/message.field.create.success'));
|
||||
} else {
|
||||
return redirect()->back()->withInput()->withErrors($validator);
|
||||
// dd($field);
|
||||
return redirect()->back()->withInput()->with('error', trans('admin/custom_fields/message.field.create.error'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +162,7 @@ class CustomFieldsController extends Controller
|
||||
* @since [v4.0]
|
||||
* @return Redirect
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
public function update(CustomFieldRequest $request, $id)
|
||||
{
|
||||
$field = CustomField::find($id);
|
||||
|
||||
@@ -186,13 +179,12 @@ class CustomFieldsController extends Controller
|
||||
$field->format = e($request->get("format"));
|
||||
}
|
||||
|
||||
$validator = Validator::make(Input::all(), $field->rules);
|
||||
|
||||
if ($field->save()) {
|
||||
return redirect()->route("fields.index")->with("success", trans('admin/custom_fields/message.field.update.success'));
|
||||
}
|
||||
|
||||
return redirect()->back()->withInput()->withErrors($validator);
|
||||
return redirect()->back()->withInput()->with('error', trans('admin/custom_fields/message.field.update.error'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -152,21 +152,38 @@ class DepartmentsController extends Controller
|
||||
}
|
||||
|
||||
$department->fill($request->all());
|
||||
$department->manager_id = ($request->has('manager_id' ) ? $request->input('manager_id') : null);
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/departments/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$department->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$old_image = $department->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$department->image = null;
|
||||
}
|
||||
|
||||
$department->manager_id = ($request->has('manager_id' ) ? $request->input('manager_id') : null);
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = $department->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('departments_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('departments_upload_path'), $file_name);
|
||||
}
|
||||
$department->image = $file_name;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('departments_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
if ($department->save()) {
|
||||
return redirect()->route("departments.index")->with('success', trans('admin/departments/message.update.success'));
|
||||
|
||||
@@ -275,10 +275,19 @@ class LicensesController extends Controller
|
||||
if ($license->getAvailSeatsCountAttribute() < 1) {
|
||||
return redirect()->route('licenses.index')->with('error', 'There are no available seats for this license');
|
||||
}
|
||||
|
||||
// Get the next available seat for this license
|
||||
$next = $license->freeSeat();
|
||||
|
||||
if (!$next) {
|
||||
return redirect()->route('licenses.index')->with('error', 'There are no available seats for this license');
|
||||
}
|
||||
|
||||
if (!$licenseSeat = LicenseSeat::where('id', '=', $next->id)->first()) {
|
||||
return redirect()->route('licenses.index')->with('error', 'There are no available seats for this license');
|
||||
}
|
||||
|
||||
|
||||
$licenseSeat = LicenseSeat::where('license_id',$license->id)->find($next)->first();
|
||||
$assigned_to = $request->input('assigned_to');
|
||||
$asset_id = $request->input('asset_id');
|
||||
|
||||
@@ -299,6 +308,8 @@ class LicensesController extends Controller
|
||||
return redirect()->back()->withInput()->withErrors($validator);
|
||||
}
|
||||
$target = null;
|
||||
|
||||
// If assigned to a user
|
||||
if ($assigned_to!='') {
|
||||
// Check if the user exists
|
||||
if (is_null($target = User::find($assigned_to))) {
|
||||
@@ -307,6 +318,7 @@ class LicensesController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
// If assigned to an asset
|
||||
if ($asset_id!='') {
|
||||
if (is_null($target = Asset::find($asset_id))) {
|
||||
// Redirect to the asset management page with error
|
||||
@@ -318,11 +330,6 @@ class LicensesController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the asset exists
|
||||
if (is_null($licenseSeat)) {
|
||||
// Redirect to the asset management page with error
|
||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
|
||||
}
|
||||
|
||||
if ($request->input('asset_id') == '') {
|
||||
$licenseSeat->asset_id = null;
|
||||
@@ -337,6 +344,8 @@ class LicensesController extends Controller
|
||||
$licenseSeat->assigned_to = $request->input('assigned_to');
|
||||
}
|
||||
|
||||
$licenseSeat->user_id = Auth::user()->id;
|
||||
|
||||
// Was the asset updated?
|
||||
if ($licenseSeat->save()) {
|
||||
$licenseSeat->logCheckout($request->input('note'), $target);
|
||||
|
||||
@@ -204,17 +204,35 @@ class LocationsController extends Controller
|
||||
$location->ldap_ou = $request->input('ldap_ou');
|
||||
$location->manager_id = $request->input('manager_id');
|
||||
|
||||
$old_image = $location->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$location->image = null;
|
||||
}
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/locations/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$file_name = $location->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('locations_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('locations_upload_path'), $file_name);
|
||||
}
|
||||
$location->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$location->image = null;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('locations_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -138,26 +138,35 @@ class ManufacturersController extends Controller
|
||||
$manufacturer->support_phone = $request->input('support_phone');
|
||||
$manufacturer->support_email = $request->input('support_email');
|
||||
|
||||
$old_image = $manufacturer->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$manufacturer->image = null;
|
||||
}
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_slug($image->getClientOriginalName()).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/manufacturers/'.$file_name);
|
||||
$old_image = $path.$manufacturer->image;
|
||||
$file_name = $manufacturer->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('manufacturers_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('manufacturers_upload_path'), $file_name);
|
||||
}
|
||||
$manufacturer->image = $file_name;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink($old_image);
|
||||
unlink(app('manufacturers_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
|
||||
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$manufacturer->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$manufacturer->image = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ class ReportsController extends Controller
|
||||
($asset->supplier) ? e($asset->supplier->name) : '',
|
||||
($asset->assignedTo) ? e($asset->assignedTo->present()->name()) : '',
|
||||
($asset->last_checkout!='') ? e($asset->last_checkout) : '',
|
||||
($asset->location) ? e($asset->location->present()->name()) : '',
|
||||
($asset->location) ? e($asset->location->name) : '',
|
||||
($asset->notes) ? e($asset->notes) : '',
|
||||
];
|
||||
foreach ($customfields as $field) {
|
||||
@@ -582,7 +582,12 @@ class ReportsController extends Controller
|
||||
if (e(Input::get('username')) == '1') {
|
||||
// Only works if we're checked out to a user, not anything else.
|
||||
if ($asset->checkedOutToUser()) {
|
||||
$row[] = '"' .e($asset->assignedto->username). '"';
|
||||
if ($asset->assignedto) {
|
||||
$row[] = '"' .e($asset->assignedto->username). '"';
|
||||
} else {
|
||||
$row[] = ''; // Empty string if unassigned
|
||||
}
|
||||
|
||||
} else {
|
||||
$row[] = ''; // Empty string if unassigned
|
||||
}
|
||||
@@ -591,7 +596,12 @@ class ReportsController extends Controller
|
||||
if (e(Input::get('employee_num')) == '1') {
|
||||
// Only works if we're checked out to a user, not anything else.
|
||||
if ($asset->checkedOutToUser()) {
|
||||
$row[] = '"' .e($asset->assignedto->employee_num). '"';
|
||||
if ($asset->assignedto) {
|
||||
$row[] = '"' .e($asset->assignedto->employee_num). '"';
|
||||
} else {
|
||||
$row[] = ''; // Empty string if unassigned
|
||||
}
|
||||
|
||||
} else {
|
||||
$row[] = ''; // Empty string if unassigned
|
||||
}
|
||||
|
||||
@@ -552,6 +552,7 @@ class SettingsController extends Controller
|
||||
$setting->alert_threshold = $request->input('alert_threshold');
|
||||
$setting->audit_interval = $request->input('audit_interval');
|
||||
$setting->audit_warning_days = $request->input('audit_warning_days');
|
||||
$setting->show_alerts_in_menu = $request->input('show_alerts_in_menu', '0');
|
||||
|
||||
if ($setting->save()) {
|
||||
return redirect()->route('settings.index')
|
||||
@@ -747,6 +748,7 @@ class SettingsController extends Controller
|
||||
$setting->labels_fontsize = $request->input('labels_fontsize');
|
||||
$setting->labels_pagewidth = $request->input('labels_pagewidth');
|
||||
$setting->labels_pageheight = $request->input('labels_pageheight');
|
||||
$setting->labels_display_company_name = $request->input('labels_display_company_name', '0');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -159,19 +159,38 @@ class SuppliersController extends Controller
|
||||
$supplier->notes = request('notes');
|
||||
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/suppliers/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$supplier->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$old_image = $supplier->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$supplier->image = null;
|
||||
}
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = $supplier->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('suppliers_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('suppliers_upload_path'), $file_name);
|
||||
}
|
||||
$supplier->image = $file_name;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('suppliers_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($supplier->save()) {
|
||||
return redirect()->route('suppliers.index')->with('success', trans('admin/suppliers/message.update.success'));
|
||||
}
|
||||
|
||||
@@ -284,9 +284,10 @@ class ViewAssetsController extends Controller
|
||||
public function getAcceptAsset($logID = null)
|
||||
{
|
||||
|
||||
if (!$findlog = Actionlog::where('id', $logID)->first()) {
|
||||
echo 'no record';
|
||||
//return redirect()->to('account')->with('error', trans('admin/hardware/message.does_not_exist'));
|
||||
$findlog = Actionlog::where('id', $logID)->first();
|
||||
|
||||
if (!$findlog) {
|
||||
return redirect()->to('account/view-assets')->with('error', 'No matching record.');
|
||||
}
|
||||
|
||||
if ($findlog->accepted_id!='') {
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CustomFieldRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(Request $request)
|
||||
{
|
||||
|
||||
$rules = [];
|
||||
|
||||
switch($this->method())
|
||||
{
|
||||
|
||||
// Brand new
|
||||
case 'POST':
|
||||
{
|
||||
$rules['name'] = "required|unique:custom_fields";
|
||||
break;
|
||||
}
|
||||
|
||||
// Save all fields
|
||||
case 'PUT':
|
||||
$rules['name'] = "required";
|
||||
break;
|
||||
|
||||
// Save only what's passed
|
||||
case 'PATCH':
|
||||
{
|
||||
$rules['name'] = "required";
|
||||
break;
|
||||
}
|
||||
|
||||
default:break;
|
||||
}
|
||||
|
||||
$rules['custom_format'] = 'valid_regex';
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ class AssetModelsTransformer
|
||||
'id' => (int) $assetmodel->manufacturer->id,
|
||||
'name'=> e($assetmodel->manufacturer->name)
|
||||
] : null,
|
||||
'image' => ($assetmodel->image!='') ? url('/').'/uploads/models/'.e($assetmodel->image) : null,
|
||||
'image' => ($assetmodel->image!='') ? app('models_upload_url').e($assetmodel->image) : null,
|
||||
'model_number' => e($assetmodel->model_number),
|
||||
'depreciation' => ($assetmodel->depreciation) ? [
|
||||
'id' => (int) $assetmodel->depreciation->id,
|
||||
|
||||
@@ -25,7 +25,7 @@ class CategoriesTransformer
|
||||
$array = [
|
||||
'id' => (int) $category->id,
|
||||
'name' => e($category->name),
|
||||
'image' => ($category->image) ? e(url('/').'/uploads/categories/'.e($category->image)) : null,
|
||||
'image' => ($category->image) ? app('categories_upload_url').e($category->image) : null,
|
||||
'type' => e($category->category_type),
|
||||
'eula' => ($category->getEula()) ? true : false,
|
||||
'checkin_email' => ($category->checkin_email =='1') ? true : false,
|
||||
|
||||
@@ -25,7 +25,7 @@ class CompaniesTransformer
|
||||
$array = [
|
||||
'id' => (int) $company->id,
|
||||
'name' => e($company->name),
|
||||
'image' => ($company->image) ? e(url('/').'/uploads/companies/'.e($company->image)) : null,
|
||||
'image' => ($company->image) ? app('companies_upload_url').e($company->image) : null,
|
||||
"created_at" => Helper::getFormattedDateObject($company->created_at, 'datetime'),
|
||||
"updated_at" => Helper::getFormattedDateObject($company->updated_at, 'datetime'),
|
||||
"assets_count" => (int) $company->assets_count,
|
||||
|
||||
@@ -25,7 +25,7 @@ class DepartmentsTransformer
|
||||
$array = [
|
||||
'id' => (int) $department->id,
|
||||
'name' => e($department->name),
|
||||
'image' => ($department->image) ? e(url('/').'/uploads/departments/'.e($department->image)) : null,
|
||||
'image' => ($department->image) ? app('departments_upload_url').e($department->image) : null,
|
||||
'company' => ($department->company) ? [
|
||||
'id' => (int) $department->company->id,
|
||||
'name'=> e($department->company->name)
|
||||
|
||||
@@ -33,7 +33,7 @@ class LocationsTransformer
|
||||
$array = [
|
||||
'id' => (int) $location->id,
|
||||
'name' => e($location->name),
|
||||
'image' => ($location->image) ? e(url('/').'/uploads/locations/'.e($location->image)) : null,
|
||||
'image' => ($location->image) ? app('locations_upload_url').e($location->image) : null,
|
||||
'address' => e($location->address),
|
||||
'city' => e($location->city),
|
||||
'state' => e($location->state),
|
||||
|
||||
@@ -26,7 +26,7 @@ class ManufacturersTransformer
|
||||
'id' => (int) $manufacturer->id,
|
||||
'name' => e($manufacturer->name),
|
||||
'url' => e($manufacturer->url),
|
||||
'image' => ($manufacturer->image) ? e(url('/').'/uploads/manufacturers/'.e($manufacturer->image)) : null,
|
||||
'image' => ($manufacturer->image) ? app('manufacturers_upload_url').e($manufacturer->image) : null,
|
||||
'support_url' => e($manufacturer->support_url),
|
||||
'support_phone' => e($manufacturer->support_phone),
|
||||
'support_email' => e($manufacturer->support_email),
|
||||
|
||||
@@ -25,7 +25,7 @@ class SuppliersTransformer
|
||||
$array = [
|
||||
'id' => (int) $supplier->id,
|
||||
'name' => e($supplier->name),
|
||||
'image' => ($supplier->image) ? e(url('/').'/uploads/suppliers/'.e($supplier->image)) : null,
|
||||
'image' => ($supplier->image) ? app('suppliers_upload_url').e($supplier->image) : null,
|
||||
'address' => ($supplier->address) ? e($supplier->address) : null,
|
||||
'address2' => ($supplier->address2) ? e($supplier->address2) : null,
|
||||
'city' => ($supplier->city) ? e($supplier->city) : null,
|
||||
|
||||
@@ -17,7 +17,7 @@ class Accessory extends SnipeModel
|
||||
use Loggable, Presentable;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $dates = ['deleted_at', 'purchase_date'];
|
||||
protected $table = 'accessories';
|
||||
protected $casts = [
|
||||
'requestable' => 'boolean'
|
||||
|
||||
+74
-16
@@ -42,6 +42,7 @@ class Asset extends Depreciable
|
||||
*/
|
||||
protected $injectUniqueIdentifier = true;
|
||||
|
||||
// We set these as protected dates so that they will be easily accessible via Carbon
|
||||
protected $dates = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
@@ -138,7 +139,7 @@ class Asset extends Depreciable
|
||||
* @param User $user
|
||||
* @param User $admin
|
||||
* @param Carbon $checkout_at
|
||||
* @param null $expected_checkin
|
||||
* @param Carbon $expected_checkin
|
||||
* @param string $note
|
||||
* @param null $name
|
||||
* @return bool
|
||||
@@ -694,7 +695,7 @@ class Asset extends Depreciable
|
||||
|
||||
public function scopeDeleted($query)
|
||||
{
|
||||
return $query->whereNotNull('deleted_at');
|
||||
return $query->whereNotNull('assets.deleted_at');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -710,7 +711,7 @@ class Asset extends Depreciable
|
||||
*/
|
||||
public function scopeInModelList($query, array $modelIdListing)
|
||||
{
|
||||
return $query->whereIn('model_id', $modelIdListing);
|
||||
return $query->whereIn('assets.model_id', $modelIdListing);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -764,11 +765,11 @@ class Asset extends Depreciable
|
||||
{
|
||||
$search = explode(' OR ', $search);
|
||||
|
||||
return $query->leftJoin('users',function ($leftJoin) {
|
||||
$leftJoin->on("users.id", "=", "assets.assigned_to")
|
||||
return $query->leftJoin('users as assets_users',function ($leftJoin) {
|
||||
$leftJoin->on("assets_users.id", "=", "assets.assigned_to")
|
||||
->where("assets.assigned_type", "=", User::class);
|
||||
})->leftJoin('locations',function ($leftJoin) {
|
||||
$leftJoin->on("locations.id","=","assets.assigned_to")
|
||||
})->leftJoin('locations as assets_locations',function ($leftJoin) {
|
||||
$leftJoin->on("assets_locations.id","=","assets.assigned_to")
|
||||
->where("assets.assigned_type","=",Location::class);
|
||||
})->leftJoin('assets as assigned_assets',function ($leftJoin) {
|
||||
$leftJoin->on('assigned_assets.id', '=', 'assets.assigned_to')
|
||||
@@ -807,10 +808,10 @@ class Asset extends Depreciable
|
||||
$query->where('locations.name', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
})->orWhere(function ($query) use ($search) {
|
||||
$query->where('users.first_name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('users.last_name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('users.username', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('locations.name', 'LIKE', '%'.$search.'%')
|
||||
$query->where('assets_users.first_name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets_users.last_name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets_users.username', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets_locations.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assigned_assets.name', 'LIKE', '%'.$search.'%');
|
||||
})->orWhere('assets.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets.asset_tag', 'LIKE', '%'.$search.'%')
|
||||
@@ -825,6 +826,62 @@ class Asset extends Depreciable
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Query builder scope to search on text for complex Bootstrap Tables API.
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query Query builder instance
|
||||
* @param text $search Search term
|
||||
*
|
||||
* @return \Illuminate\Database\Query\Builder Modified query builder
|
||||
*/
|
||||
public function scopeAssignedSearch($query, $search)
|
||||
{
|
||||
$search = explode(' OR ', $search);
|
||||
|
||||
return $query->leftJoin('users as assets_users',function ($leftJoin) {
|
||||
$leftJoin->on("assets_users.id", "=", "assets.assigned_to")
|
||||
->where("assets.assigned_type", "=", User::class);
|
||||
})->leftJoin('locations as assets_locations',function ($leftJoin) {
|
||||
$leftJoin->on("assets_locations.id","=","assets.assigned_to")
|
||||
->where("assets.assigned_type","=",Location::class);
|
||||
})->leftJoin('assets as assigned_assets',function ($leftJoin) {
|
||||
$leftJoin->on('assigned_assets.id', '=', 'assets.assigned_to')
|
||||
->where('assets.assigned_type', '=', Asset::class);
|
||||
})->where(function ($query) use ($search) {
|
||||
foreach ($search as $search) {
|
||||
$query->whereHas('model', function ($query) use ($search) {
|
||||
$query->whereHas('category', function ($query) use ($search) {
|
||||
$query->where(function ($query) use ($search) {
|
||||
$query->where('categories.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('models.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('models.model_number', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
});
|
||||
})->orWhereHas('model', function ($query) use ($search) {
|
||||
$query->whereHas('manufacturer', function ($query) use ($search) {
|
||||
$query->where(function ($query) use ($search) {
|
||||
$query->where('manufacturers.name', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
});
|
||||
})->orWhere(function ($query) use ($search) {
|
||||
$query->where('assets_users.first_name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets_users.last_name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets_users.username', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets_locations.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assigned_assets.name', 'LIKE', '%'.$search.'%');
|
||||
})->orWhere('assets.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets.asset_tag', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets.serial', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets.order_number', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets.notes', 'LIKE', '%'.$search.'%');
|
||||
}
|
||||
foreach (CustomField::all() as $field) {
|
||||
$query->orWhere('assets.'.$field->db_column_name(), 'LIKE', "%$search%");
|
||||
}
|
||||
})->withTrashed()->whereNull("assets.deleted_at"); //workaround for laravel bug
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Query builder scope to search on text filters for complex Bootstrap Tables API
|
||||
@@ -939,8 +996,9 @@ class Asset extends Depreciable
|
||||
}
|
||||
}
|
||||
|
||||
if (($fieldname!='category') && ($fieldname!='status_label') && ($fieldname!='model')) {
|
||||
$query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%');
|
||||
if (($fieldname!='category') && ($fieldname!='location')
|
||||
&& ($fieldname!='status_label') && ($fieldname!='model') && ($fieldname!='manufacturer')) {
|
||||
$query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
|
||||
@@ -961,7 +1019,7 @@ class Asset extends Depreciable
|
||||
*/
|
||||
public function scopeOrderModels($query, $order)
|
||||
{
|
||||
return $query->join('models', 'assets.model_id', '=', 'models.id')->orderBy('models.name', $order);
|
||||
return $query->join('models as asset_models', 'assets.model_id', '=', 'asset_models.id')->orderBy('asset_models.name', $order);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1089,7 +1147,7 @@ class Asset extends Depreciable
|
||||
*/
|
||||
public function scopeOrderLocation($query, $order)
|
||||
{
|
||||
return $query->leftJoin('locations as asset_locations', 'asset_locations.id', '=', 'assets.rtd_location_id')->orderBy('asset_locations.name', $order);
|
||||
return $query->leftJoin('locations as asset_locations', 'asset_locations.id', '=', 'assets.location_id')->orderBy('asset_locations.name', $order);
|
||||
}
|
||||
|
||||
|
||||
@@ -1117,7 +1175,7 @@ class Asset extends Depreciable
|
||||
public function scopeByLocationId($query, $search)
|
||||
{
|
||||
return $query->where(function ($query) use ($search) {
|
||||
$query->whereHas('defaultLoc', function ($query) use ($search) {
|
||||
$query->whereHas('location', function ($query) use ($search) {
|
||||
$query->where('locations.id', '=', $search);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@ class Component extends SnipeModel
|
||||
use Loggable, Presentable;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $dates = ['deleted_at', 'purchase_date'];
|
||||
protected $table = 'components';
|
||||
/**
|
||||
* Category validation rules
|
||||
|
||||
@@ -12,13 +12,14 @@ class Consumable extends SnipeModel
|
||||
use Loggable, Presentable;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $dates = ['deleted_at', 'purchase_date'];
|
||||
protected $table = 'consumables';
|
||||
protected $casts = [
|
||||
'requestable' => 'boolean'
|
||||
];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Category validation rules
|
||||
*/
|
||||
|
||||
@@ -25,10 +25,13 @@ class CustomField extends Model
|
||||
];
|
||||
|
||||
public $rules = [
|
||||
"name" => "required|unique:custom_fields"
|
||||
"name" => "required|unique:custom_fields"
|
||||
];
|
||||
|
||||
public static $table_name="assets";
|
||||
// This is confusing, since it's actually the custom fields table that
|
||||
// we're usually modifying, but since we alter the assets table, we have to
|
||||
// say that here
|
||||
public static $table_name = "assets";
|
||||
|
||||
public static function name_to_db_name($name)
|
||||
{
|
||||
@@ -39,7 +42,6 @@ class CustomField extends Model
|
||||
{
|
||||
self::created(function ($custom_field) {
|
||||
|
||||
|
||||
// column exists - nothing to do here
|
||||
if (Schema::hasColumn(CustomField::$table_name, $custom_field->convertUnicodeDbSlug())) {
|
||||
return false;
|
||||
@@ -62,14 +64,17 @@ class CustomField extends Model
|
||||
return true;
|
||||
}
|
||||
|
||||
// This is just a dumb thing we have to include because Laraval/Doctrine doesn't
|
||||
// play well with enums or a table that EVER had enums. :(
|
||||
$platform = Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform();
|
||||
$platform->registerDoctrineTypeMapping('enum', 'string');
|
||||
|
||||
|
||||
// Rename the field if the name has changed
|
||||
Schema::table(CustomField::$table_name, function ($table) use ($custom_field) {
|
||||
$table->renameColumn($custom_field->convertUnicodeDbSlug($custom_field->getOriginal("name")), $custom_field->convertUnicodeDbSlug());
|
||||
});
|
||||
|
||||
|
||||
// Save the updated column name to the custom fields table
|
||||
$custom_field->db_column = $custom_field->convertUnicodeDbSlug();
|
||||
$custom_field->save();
|
||||
|
||||
@@ -78,6 +83,8 @@ class CustomField extends Model
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
// Drop the assets column if we've deleted it from custom fields
|
||||
self::deleting(function ($custom_field) {
|
||||
return Schema::table(CustomField::$table_name, function ($table) use ($custom_field) {
|
||||
$table->dropColumn($custom_field->convertUnicodeDbSlug());
|
||||
|
||||
+14
-4
@@ -22,7 +22,14 @@ class License extends Depreciable
|
||||
protected $injectUniqueIdentifier = true;
|
||||
use ValidatingTrait;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
// 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'
|
||||
];
|
||||
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
@@ -340,10 +347,13 @@ class License extends Depreciable
|
||||
*/
|
||||
public function freeSeat()
|
||||
{
|
||||
return $this->licenseseats()
|
||||
return $this->licenseseats()
|
||||
->whereNull('deleted_at')
|
||||
->whereNull('assigned_to')
|
||||
->whereNull('asset_id')
|
||||
->where(function ($query) {
|
||||
$query->whereNull('assigned_to')
|
||||
->whereNull('asset_id');
|
||||
})
|
||||
->orderBy('id', 'asc')
|
||||
->first();
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,18 @@ class Setting extends Model
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes the custom CSS, and then un-escapes the greater-than symbol
|
||||
* so it can work with direct descendant characters for bootstrap
|
||||
* menu overrides like:
|
||||
*
|
||||
* .skin-blue .sidebar-menu>li.active>a, .skin-blue .sidebar-menu>li:hover>a
|
||||
*
|
||||
* Important: Do not remove the e() escaping here, as we output raw in the blade.
|
||||
*
|
||||
* @return string escaped CSS
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
*/
|
||||
public function show_custom_css()
|
||||
{
|
||||
$custom_css = Setting::getSettings()->custom_css;
|
||||
|
||||
@@ -93,7 +93,7 @@ class CheckoutNotification extends Notification
|
||||
'first_name' => $target->present()->fullName(),
|
||||
'item_name' => $item->present()->name(),
|
||||
'checkout_date' => $item->last_checkout,
|
||||
'expected_checkin' => $item->expected_checkin,
|
||||
'expected_checkin' => ($item->expected_checkin) ? $item->expected_checkin->format('Y-m-d') : '',
|
||||
'item_tag' => $item->asset_tag,
|
||||
'note' => $this->params['note'],
|
||||
'item_serial' => $item->serial,
|
||||
|
||||
@@ -26,7 +26,6 @@ abstract class SnipePermissionsPolicy
|
||||
|
||||
public function index(User $user)
|
||||
{
|
||||
// dd('here');
|
||||
return $user->hasAccess($this->columnName().'.view');
|
||||
}
|
||||
/**
|
||||
@@ -37,7 +36,6 @@ abstract class SnipePermissionsPolicy
|
||||
*/
|
||||
public function view(User $user, $item = null)
|
||||
{
|
||||
//
|
||||
return $user->hasAccess($this->columnName().'.view');
|
||||
}
|
||||
|
||||
@@ -49,7 +47,6 @@ abstract class SnipePermissionsPolicy
|
||||
*/
|
||||
public function create(User $user)
|
||||
{
|
||||
//
|
||||
return $user->hasAccess($this->columnName().'.create');
|
||||
}
|
||||
|
||||
@@ -61,7 +58,6 @@ abstract class SnipePermissionsPolicy
|
||||
*/
|
||||
public function update(User $user, $item = null)
|
||||
{
|
||||
//
|
||||
return $user->hasAccess($this->columnName().'.edit');
|
||||
}
|
||||
|
||||
@@ -73,7 +69,6 @@ abstract class SnipePermissionsPolicy
|
||||
*/
|
||||
public function delete(User $user, $item = null)
|
||||
{
|
||||
//
|
||||
return $user->hasAccess($this->columnName().'.delete');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Validator;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use DB;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use App\Observers\AssetObserver;
|
||||
@@ -19,7 +18,7 @@ use App\Models\Component;
|
||||
|
||||
|
||||
/**
|
||||
* This service provider handles a few custom validation rules.
|
||||
* This service provider handles setting the observers on models
|
||||
*
|
||||
* PHP version 5.5.9
|
||||
* @version v3.0
|
||||
@@ -42,47 +41,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
Component::observe(ComponentObserver::class);
|
||||
Consumable::observe(ConsumableObserver::class);
|
||||
License::observe(LicenseObserver::class);
|
||||
|
||||
// Email array validator
|
||||
Validator::extend('email_array', function ($attribute, $value, $parameters, $validator) {
|
||||
$value = str_replace(' ', '', $value);
|
||||
$array = explode(',', $value);
|
||||
|
||||
foreach ($array as $email) { //loop over values
|
||||
$email_to_validate['alert_email'][]=$email;
|
||||
}
|
||||
|
||||
$rules = array('alert_email.*'=>'email');
|
||||
$messages = array(
|
||||
'alert_email.*'=>trans('validation.email_array')
|
||||
);
|
||||
|
||||
$validator = Validator::make($email_to_validate, $rules, $messages);
|
||||
|
||||
return $validator->passes();
|
||||
|
||||
});
|
||||
|
||||
// Unique only if undeleted
|
||||
// This works around the use case where multiple deleted items have the same unique attribute.
|
||||
// (I think this is a bug in Laravel's validator?)
|
||||
Validator::extend('unique_undeleted', function ($attribute, $value, $parameters, $validator) {
|
||||
|
||||
if (count($parameters)) {
|
||||
$count = DB::table($parameters[0])->select('id')->where($attribute, '=', $value)->whereNull('deleted_at')->where('id', '!=', $parameters[1])->count();
|
||||
return $count < 1;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Share common setting variables with all views.
|
||||
view()->composer('*', function ($view) {
|
||||
$view->with('snipeSettings', \App\Models\Setting::getSettings());
|
||||
});
|
||||
|
||||
// Set the monetary locale to the configured locale to make helper::parseFloat work.
|
||||
setlocale(LC_MONETARY, config('app.locale'));
|
||||
setlocale(LC_NUMERIC, config('app.locale'));
|
||||
|
||||
}
|
||||
|
||||
@@ -97,7 +56,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
$log_level = config('app.log_level');
|
||||
|
||||
if (($this->app->environment('production')) && (config('services.rollbar.access_token'))){
|
||||
$this->app->register(\Jenssegers\Rollbar\RollbarServiceProvider::class);
|
||||
$this->app->register(\Rollbar\Laravel\RollbarServiceProvider::class);
|
||||
}
|
||||
|
||||
foreach ($monolog->getHandlers() as $handler) {
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Validator;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use DB;
|
||||
use Log;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This service provider handles sharing the snipeSettings variable, and sets
|
||||
* some common upload path and image urls.
|
||||
*
|
||||
* PHP version 5.5.9
|
||||
* @version v3.0
|
||||
*/
|
||||
|
||||
class SettingsServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Custom email array validation
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
|
||||
|
||||
// Share common setting variables with all views.
|
||||
view()->composer('*', function ($view) {
|
||||
$view->with('snipeSettings', \App\Models\Setting::getSettings());
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Set some common variables so that they're globally available.
|
||||
* The paths should always be public (versus private uploads)
|
||||
*/
|
||||
// Model paths and URLs
|
||||
\App::singleton('models_upload_path', function(){
|
||||
return public_path('/uploads/models/');
|
||||
});
|
||||
|
||||
\App::singleton('models_upload_url', function(){
|
||||
return url('/').'/uploads/models/';
|
||||
});
|
||||
|
||||
// Categories
|
||||
\App::singleton('categories_upload_path', function(){
|
||||
return public_path('/uploads/categories/');
|
||||
});
|
||||
|
||||
\App::singleton('categories_upload_url', function(){
|
||||
return url('/').'/uploads/categories/';
|
||||
});
|
||||
|
||||
// Locations
|
||||
\App::singleton('locations_upload_path', function(){
|
||||
return public_path('/uploads/locations/');
|
||||
});
|
||||
|
||||
\App::singleton('locations_upload_url', function(){
|
||||
return url('/').'/uploads/locations/';
|
||||
});
|
||||
|
||||
// Users
|
||||
\App::singleton('users_upload_path', function(){
|
||||
return public_path('/uploads/users/');
|
||||
});
|
||||
|
||||
\App::singleton('users_upload_url', function(){
|
||||
return url('/').'/uploads/users/';
|
||||
});
|
||||
|
||||
// Manufacturers
|
||||
\App::singleton('manufacturers_upload_path', function(){
|
||||
return public_path('/uploads/manufacturers/');
|
||||
});
|
||||
|
||||
\App::singleton('manufacturers_upload_url', function(){
|
||||
return url('/').'/uploads/manufacturers/';
|
||||
});
|
||||
|
||||
// Suppliers
|
||||
\App::singleton('suppliers_upload_path', function(){
|
||||
return public_path('/uploads/suppliers/');
|
||||
});
|
||||
|
||||
\App::singleton('suppliers_upload_url', function(){
|
||||
return url('/').'/uploads/suppliers/';
|
||||
});
|
||||
|
||||
// Departments
|
||||
\App::singleton('departments_upload_path', function(){
|
||||
return public_path('/uploads/departments/');
|
||||
});
|
||||
|
||||
\App::singleton('departments_upload_url', function(){
|
||||
return url('/').'/uploads/departments/';
|
||||
});
|
||||
|
||||
// Company paths and URLs
|
||||
\App::singleton('companies_upload_path', function(){
|
||||
return public_path('/uploads/companies/');
|
||||
});
|
||||
|
||||
\App::singleton('companies_upload_url', function(){
|
||||
return url('/').'/uploads/companies/';
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Set the monetary locale to the configured locale to make helper::parseFloat work.
|
||||
setlocale(LC_MONETARY, config('app.locale'));
|
||||
setlocale(LC_NUMERIC, config('app.locale'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Validator;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use DB;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use App\Observers\AssetObserver;
|
||||
use App\Observers\LicenseObserver;
|
||||
use App\Observers\AccessoryObserver;
|
||||
use App\Observers\ConsumableObserver;
|
||||
use App\Observers\ComponentObserver;
|
||||
use App\Models\Asset;
|
||||
use App\Models\License;
|
||||
use App\Models\Accessory;
|
||||
use App\Models\Consumable;
|
||||
use App\Models\Component;
|
||||
|
||||
|
||||
/**
|
||||
* This service provider handles a few custom validation rules.
|
||||
*
|
||||
* PHP version 5.5.9
|
||||
* @version v3.0
|
||||
*/
|
||||
|
||||
class ValidationServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Custom email array validation
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
|
||||
// Email array validator
|
||||
Validator::extend('email_array', function ($attribute, $value, $parameters, $validator) {
|
||||
$value = str_replace(' ', '', $value);
|
||||
$array = explode(',', $value);
|
||||
|
||||
foreach ($array as $email) { //loop over values
|
||||
$email_to_validate['alert_email'][]=$email;
|
||||
}
|
||||
|
||||
$rules = array('alert_email.*'=>'email');
|
||||
$messages = array(
|
||||
'alert_email.*'=>trans('validation.email_array')
|
||||
);
|
||||
|
||||
$validator = Validator::make($email_to_validate, $rules, $messages);
|
||||
|
||||
return $validator->passes();
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Unique only if undeleted
|
||||
// This works around the use case where multiple deleted items have the same unique attribute.
|
||||
// (I think this is a bug in Laravel's validator?)
|
||||
Validator::extend('unique_undeleted', function ($attribute, $value, $parameters, $validator) {
|
||||
|
||||
if (count($parameters)) {
|
||||
$count = DB::table($parameters[0])->select('id')->where($attribute, '=', $value)->whereNull('deleted_at')->where('id', '!=', $parameters[1])->count();
|
||||
return $count < 1;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Yo dawg. I heard you like validators.
|
||||
// This validates the custom validator regex in custom fields.
|
||||
// We're just checking that the regex won't throw an exception, not
|
||||
// that it's actually correct for what the user intended.
|
||||
|
||||
Validator::extend('valid_regex', function ($attribute, $value, $parameters, $validator) {
|
||||
|
||||
// Make sure it's not just an ANY format
|
||||
if ($value!='') {
|
||||
|
||||
// Check that the string starts with regex:
|
||||
if (strpos($value, 'regex:') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$test_string = 'My hovercraft is full of eels';
|
||||
|
||||
// We have to stip out the regex: part here to check with preg_match
|
||||
$test_pattern = str_replace('regex:','', $value);
|
||||
|
||||
try {
|
||||
preg_match($test_pattern, $test_string);
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -4,9 +4,8 @@
|
||||
"keywords": ["assets", "asset-management", "laravel"],
|
||||
"license": "AGPL-3",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"require": {
|
||||
"php": ">=5.6.4",
|
||||
"aws/aws-sdk-php-laravel": "^3.1",
|
||||
"barryvdh/laravel-debugbar": "^2.4",
|
||||
"doctrine/cache": "^1.6",
|
||||
"doctrine/common": "^2.7",
|
||||
@@ -17,7 +16,6 @@
|
||||
"fideloper/proxy": "^3.1",
|
||||
"intervention/image": "^2.3",
|
||||
"javiereguiluz/easyslugger": "^1.0",
|
||||
"jenssegers/rollbar": "^1.5",
|
||||
"laravel/framework": "5.4.29",
|
||||
"laravel/passport": "^3.0",
|
||||
"laravel/tinker": "^1.0",
|
||||
@@ -30,6 +28,7 @@
|
||||
"phpspec/prophecy": "1.6.2",
|
||||
"pragmarx/google2fa": "^1.0",
|
||||
"predis/predis": "^1.1",
|
||||
"rollbar/rollbar-laravel": "^2.2",
|
||||
"schuppo/password-strength": "~1.5",
|
||||
"spatie/laravel-backup": "^3.0.0",
|
||||
"tecnickcom/tc-lib-barcode": "^1.15",
|
||||
|
||||
Generated
+105
-271
@@ -4,144 +4,8 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "a1fc66ea043e149e85b4d708f852adbe",
|
||||
"content-hash": "53bd9d88d11d74732ab302b7ebd01af3",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.36.32",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "7ba49dbd24366647a41cd4a13eab972b2264b8db"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7ba49dbd24366647a41cd4a13eab972b2264b8db",
|
||||
"reference": "7ba49dbd24366647a41cd4a13eab972b2264b8db",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-spl": "*",
|
||||
"guzzlehttp/guzzle": "^5.3.1|^6.2.1",
|
||||
"guzzlehttp/promises": "~1.0",
|
||||
"guzzlehttp/psr7": "^1.4.1",
|
||||
"mtdowling/jmespath.php": "~2.2",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"andrewsville/php-token-reflection": "^1.4",
|
||||
"aws/aws-php-sns-message-validator": "~1.0",
|
||||
"behat/behat": "~3.0",
|
||||
"doctrine/cache": "~1.4",
|
||||
"ext-dom": "*",
|
||||
"ext-openssl": "*",
|
||||
"nette/neon": "^2.3",
|
||||
"phpunit/phpunit": "^4.8.35|^5.4.0",
|
||||
"psr/cache": "^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"aws/aws-php-sns-message-validator": "To validate incoming SNS notifications",
|
||||
"doctrine/cache": "To use the DoctrineCacheAdapter",
|
||||
"ext-curl": "To send requests using cURL",
|
||||
"ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Aws\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Amazon Web Services",
|
||||
"homepage": "http://aws.amazon.com"
|
||||
}
|
||||
],
|
||||
"description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project",
|
||||
"homepage": "http://aws.amazon.com/sdkforphp",
|
||||
"keywords": [
|
||||
"amazon",
|
||||
"aws",
|
||||
"cloud",
|
||||
"dynamodb",
|
||||
"ec2",
|
||||
"glacier",
|
||||
"s3",
|
||||
"sdk"
|
||||
],
|
||||
"time": "2017-10-23T20:40:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php-laravel",
|
||||
"version": "3.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php-laravel.git",
|
||||
"reference": "3b946892d493b91b4920ec4facc4a0ad7195fb86"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php-laravel/zipball/3b946892d493b91b4920ec4facc4a0ad7195fb86",
|
||||
"reference": "3b946892d493b91b4920ec4facc4a0ad7195fb86",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"aws/aws-sdk-php": "~3.0",
|
||||
"illuminate/support": "~5.1",
|
||||
"php": ">=5.5.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0|~5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"laravel/framework": "To test the Laravel bindings",
|
||||
"laravel/lumen-framework": "To test the Lumen bindings"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Aws\\Laravel\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Amazon Web Services",
|
||||
"homepage": "http://aws.amazon.com"
|
||||
}
|
||||
],
|
||||
"description": "A simple Laravel 5 service provider for including the AWS SDK for PHP.",
|
||||
"homepage": "http://aws.amazon.com/sdkforphp2",
|
||||
"keywords": [
|
||||
"amazon",
|
||||
"aws",
|
||||
"dynamodb",
|
||||
"ec2",
|
||||
"laravel",
|
||||
"laravel 5",
|
||||
"s3",
|
||||
"sdk"
|
||||
],
|
||||
"time": "2016-01-18T06:57:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/laravel-debugbar",
|
||||
"version": "v2.4.3",
|
||||
@@ -1375,58 +1239,6 @@
|
||||
"description": "A fast and easy to use slugger with full UTF-8 support.",
|
||||
"time": "2015-04-12T19:57:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jenssegers/rollbar",
|
||||
"version": "v1.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jenssegers/laravel-rollbar.git",
|
||||
"reference": "d61d6797884df95f6928dee1e23d886ac7086265"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jenssegers/laravel-rollbar/zipball/d61d6797884df95f6928dee1e23d886ac7086265",
|
||||
"reference": "d61d6797884df95f6928dee1e23d886ac7086265",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "^4.0|^5.0",
|
||||
"php": ">=5.4",
|
||||
"rollbar/rollbar": "~0.15"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9",
|
||||
"orchestra/testbench": "^3.0",
|
||||
"phpunit/phpunit": "~4.0|~5.0",
|
||||
"satooshi/php-coveralls": "^1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Jenssegers\\Rollbar\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jens Segers",
|
||||
"homepage": "https://jenssegers.com"
|
||||
}
|
||||
],
|
||||
"description": "Rollbar error monitoring integration for Laravel projects",
|
||||
"homepage": "https://github.com/jenssegers/laravel-rollbar",
|
||||
"keywords": [
|
||||
"error",
|
||||
"laravel",
|
||||
"logging",
|
||||
"monitoring",
|
||||
"rollbar"
|
||||
],
|
||||
"time": "2017-01-25T08:34:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v5.4.29",
|
||||
@@ -2248,7 +2060,7 @@
|
||||
},
|
||||
{
|
||||
"name": "mtdowling/cron-expression",
|
||||
"version": "v1.2.0",
|
||||
"version": "v1.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mtdowling/cron-expression.git",
|
||||
@@ -2290,61 +2102,6 @@
|
||||
],
|
||||
"time": "2017-01-23T04:29:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mtdowling/jmespath.php",
|
||||
"version": "2.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jmespath/jmespath.php.git",
|
||||
"reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/adcc9531682cf87dfda21e1fd5d0e7a41d292fac",
|
||||
"reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/jp.php"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"JmesPath\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/JmesPath.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Declaratively specify how to extract elements from a JSON document",
|
||||
"keywords": [
|
||||
"json",
|
||||
"jsonpath"
|
||||
],
|
||||
"time": "2016-12-03T22:08:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "neitanod/forceutf8",
|
||||
"version": "v2.0.1",
|
||||
@@ -2434,16 +2191,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v3.1.1",
|
||||
"version": "v3.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "a1e8e1a30e1352f118feff1a8481066ddc2f234a"
|
||||
"reference": "08131e7ff29de6bb9f12275c7d35df71f25f4d89"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a1e8e1a30e1352f118feff1a8481066ddc2f234a",
|
||||
"reference": "a1e8e1a30e1352f118feff1a8481066ddc2f234a",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/08131e7ff29de6bb9f12275c7d35df71f25f4d89",
|
||||
"reference": "08131e7ff29de6bb9f12275c7d35df71f25f4d89",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2481,7 +2238,7 @@
|
||||
"parser",
|
||||
"php"
|
||||
],
|
||||
"time": "2017-09-02T17:10:46+00:00"
|
||||
"time": "2017-11-04T11:48:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
@@ -3101,16 +2858,16 @@
|
||||
},
|
||||
{
|
||||
"name": "psy/psysh",
|
||||
"version": "v0.8.13",
|
||||
"version": "v0.8.14",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bobthecow/psysh.git",
|
||||
"reference": "cdb5593c3684bab74e10fcfffe4a0c8d1c39695d"
|
||||
"reference": "91e53c16560bdb8b9592544bb38429ae00d6baee"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/cdb5593c3684bab74e10fcfffe4a0c8d1c39695d",
|
||||
"reference": "cdb5593c3684bab74e10fcfffe4a0c8d1c39695d",
|
||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/91e53c16560bdb8b9592544bb38429ae00d6baee",
|
||||
"reference": "91e53c16560bdb8b9592544bb38429ae00d6baee",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3170,7 +2927,7 @@
|
||||
"interactive",
|
||||
"shell"
|
||||
],
|
||||
"time": "2017-10-19T06:13:20+00:00"
|
||||
"time": "2017-11-04T16:06:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
@@ -3256,31 +3013,40 @@
|
||||
},
|
||||
{
|
||||
"name": "rollbar/rollbar",
|
||||
"version": "v0.18.2",
|
||||
"version": "v1.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rollbar/rollbar-php.git",
|
||||
"reference": "fafe13f8beb669d6bba0137f3703fa808d50cbb7"
|
||||
"reference": "2e092656f49b5bd52eb5ee381b5eece58d82e30e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rollbar/rollbar-php/zipball/fafe13f8beb669d6bba0137f3703fa808d50cbb7",
|
||||
"reference": "fafe13f8beb669d6bba0137f3703fa808d50cbb7",
|
||||
"url": "https://api.github.com/repos/rollbar/rollbar-php/zipball/2e092656f49b5bd52eb5ee381b5eece58d82e30e",
|
||||
"reference": "2e092656f49b5bd52eb5ee381b5eece58d82e30e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-curl": "*"
|
||||
"ext-curl": "*",
|
||||
"psr/log": "~1.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeclimate/php-test-reporter": "dev-master",
|
||||
"mockery/mockery": "0.9.*",
|
||||
"phpunit/phpunit": "4.5.*"
|
||||
"monolog/monolog": "*",
|
||||
"packfire/php5.3-compat": "*",
|
||||
"phpmd/phpmd": "@stable",
|
||||
"phpunit/phpunit": "4.8.*",
|
||||
"squizlabs/php_codesniffer": "2.*"
|
||||
},
|
||||
"suggest": {
|
||||
"fluent/logger": "Needed to use the 'fluent' handler for fluentd support",
|
||||
"packfire/php5.3-compat": "for backward compatibility with PHP 5.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/Level.php",
|
||||
"src/rollbar.php"
|
||||
]
|
||||
"psr-4": {
|
||||
"Rollbar\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@@ -3302,7 +3068,75 @@
|
||||
"logging",
|
||||
"monitoring"
|
||||
],
|
||||
"time": "2016-07-05T15:50:29+00:00"
|
||||
"time": "2017-10-27T17:40:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "rollbar/rollbar-laravel",
|
||||
"version": "v2.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rollbar/rollbar-php-laravel.git",
|
||||
"reference": "8d46138367cc2a45aa9e1097258847cfc6eddbe2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rollbar/rollbar-php-laravel/zipball/8d46138367cc2a45aa9e1097258847cfc6eddbe2",
|
||||
"reference": "8d46138367cc2a45aa9e1097258847cfc6eddbe2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "^4.0|^5.0",
|
||||
"php": ">=5.4",
|
||||
"rollbar/rollbar": "^1.3.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9",
|
||||
"orchestra/testbench": "~3.0",
|
||||
"phpunit/phpunit": "~4.0|~5.0",
|
||||
"satooshi/php-coveralls": "^1.0",
|
||||
"squizlabs/php_codesniffer": "2.*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Rollbar\\Laravel\\RollbarServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Rollbar": "Rollbar\\Laravel\\Facades\\Rollbar"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Rollbar\\Laravel\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jens Segers",
|
||||
"homepage": "https://jenssegers.com"
|
||||
},
|
||||
{
|
||||
"name": "Artur Moczulski",
|
||||
"email": "artur.moczulski@gmail.com",
|
||||
"role": "Contractor @ Rollbar, Inc."
|
||||
}
|
||||
],
|
||||
"description": "Rollbar error monitoring integration for Laravel projects",
|
||||
"homepage": "https://github.com/rollbar/rollbar-php-laravel",
|
||||
"keywords": [
|
||||
"error",
|
||||
"laravel",
|
||||
"logging",
|
||||
"monitoring",
|
||||
"rollbar"
|
||||
],
|
||||
"time": "2017-09-19T00:20:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "schuppo/password-strength",
|
||||
@@ -5036,16 +4870,16 @@
|
||||
},
|
||||
{
|
||||
"name": "watson/validating",
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dwightwatson/validating.git",
|
||||
"reference": "ade13078bf2e820e244603446114a28eda51b08c"
|
||||
"reference": "22edd06d45893f5d4f79c9e901bd7fbce174a79f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/dwightwatson/validating/zipball/ade13078bf2e820e244603446114a28eda51b08c",
|
||||
"reference": "ade13078bf2e820e244603446114a28eda51b08c",
|
||||
"url": "https://api.github.com/repos/dwightwatson/validating/zipball/22edd06d45893f5d4f79c9e901bd7fbce174a79f",
|
||||
"reference": "22edd06d45893f5d4f79c9e901bd7fbce174a79f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5082,7 +4916,7 @@
|
||||
"laravel",
|
||||
"validation"
|
||||
],
|
||||
"time": "2017-10-08T22:42:01+00:00"
|
||||
"time": "2017-11-06T21:35:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
|
||||
+4
-3
@@ -78,7 +78,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => env('APP_LOCALE', 'en_US.UTF-8'),
|
||||
'locale' => env('APP_LOCALE', 'en'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -121,7 +121,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'log' => env('APP_LOG', 'daily'),
|
||||
'log' => env('APP_LOG', 'single'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -278,7 +278,6 @@ return [
|
||||
*/
|
||||
|
||||
Barryvdh\Debugbar\ServiceProvider::class,
|
||||
Aws\Laravel\AwsServiceProvider::class,
|
||||
Intervention\Image\ImageServiceProvider::class,
|
||||
Collective\Html\HtmlServiceProvider::class,
|
||||
Spatie\Backup\BackupServiceProvider::class,
|
||||
@@ -297,6 +296,8 @@ return [
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
App\Providers\SettingsServiceProvider::class,
|
||||
App\Providers\ValidationServiceProvider::class,
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Aws\Laravel\AwsServiceProvider;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| AWS SDK Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The configuration options set in this file will be passed directly to the
|
||||
| `Aws\Sdk` object, from which all client objects are created. The minimum
|
||||
| required options are declared here, but the full set of possible options
|
||||
| are documented at:
|
||||
| http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html
|
||||
|
|
||||
*/
|
||||
|
||||
'region' => env('AWS_REGION', 'us-east-1'),
|
||||
'version' => 'latest',
|
||||
'ua_append' => [
|
||||
'L5MOD/' . AwsServiceProvider::VERSION,
|
||||
],
|
||||
];
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v4.1.3',
|
||||
'build_version' => '94',
|
||||
'hash_version' => 'gb6a14d2',
|
||||
'full_hash' => 'v4.1.3-beta2-94-gb6a14d2',
|
||||
'app_version' => 'v4.1.5',
|
||||
'build_version' => '187',
|
||||
'hash_version' => 'gc0293a7',
|
||||
'full_hash' => 'v4.1.5-beta2-187-gc0293a7',
|
||||
);
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use App\Models\Asset;
|
||||
use App\Models\User;
|
||||
use App\Models\Location;
|
||||
|
||||
|
||||
class MigrateDenormedAssetLocations extends Migration
|
||||
{
|
||||
@@ -16,77 +11,11 @@ class MigrateDenormedAssetLocations extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
|
||||
// Unassigned
|
||||
$rtd_assets = Asset::whereNull('assigned_to')->with('defaultLoc')->get();
|
||||
\Log::info('Unasigned assets: ');
|
||||
foreach ($rtd_assets as $rtd_asset) {
|
||||
\Log::info('Setting asset '.$rtd_asset->id.' to location: '.$rtd_asset->rtd_location_id." Because asset's default location is: ".$rtd_asset->rtd_location_id);
|
||||
$rtd_asset->location_id=$rtd_asset->rtd_location_id;
|
||||
$rtd_asset->unsetEventDispatcher();
|
||||
$rtd_asset->save();
|
||||
}
|
||||
|
||||
// Assigned to users - ::with('assignedTo') //can't eager-load polymorphic relations?
|
||||
$assigned_user_assets = Asset::where('assigned_type',User::class)->whereNotNull('assigned_to')->get();
|
||||
\Log::debug('User-assigned assets:');
|
||||
foreach ($assigned_user_assets as $assigned_user_asset) {
|
||||
if (($assigned_user_asset->assignedTo) && ($assigned_user_asset->assignedTo->userLoc)) {
|
||||
$new_location=$assigned_user_asset->assignedTo->userloc->id;
|
||||
\Log::info(' They are in '.$assigned_user_asset->assignedTo->userloc->name.' which is id: '.$new_location);
|
||||
} else {
|
||||
\Log::info('They have no location! ');
|
||||
$new_location=$assigned_user_asset->rtd_location_id;
|
||||
}
|
||||
$assigned_user_asset->location_id=$new_location;
|
||||
$assigned_user_asset->unsetEventDispatcher();
|
||||
$assigned_user_asset->save();
|
||||
|
||||
}
|
||||
|
||||
// Assigned to locations // with('assetloc')-> //can't eager-load polymorphic relationships
|
||||
$assigned_location_assets = Asset::where('assigned_type',Location::class)->whereNotNull('assigned_to')->get();
|
||||
\Log::info('Location-assigned assets: ');
|
||||
foreach ($assigned_location_assets as $assigned_location_asset) {
|
||||
$assigned_location_asset->location_id=$assigned_location_asset->assignedTo->id;
|
||||
\Log::info('(calculated to be: '.$assigned_location_asset->assetLoc());
|
||||
$assigned_location_asset->unsetEventDispatcher();
|
||||
$assigned_location_asset->save();
|
||||
}
|
||||
|
||||
// Assigned to assets
|
||||
$assigned_asset_assets = Asset::where('assigned_type',Asset::class)->whereNotNull('assigned_to')->with('assetloc')->get();
|
||||
\Log::info('Asset-assigned assets: ');
|
||||
foreach ($assigned_asset_assets as $assigned_asset_asset) {
|
||||
\Log::info('This asset is: '.$assigned_asset_asset->assignedTo->asset_tag);
|
||||
if (($assigned_asset_asset->assignedTo) && ($assigned_asset_asset->assignedTo->location)) {
|
||||
\Log::info('They are in '.$assigned_asset_asset->assignedTo->location->name);
|
||||
}
|
||||
if ($assigned_asset_asset->assetloc) {
|
||||
\Log::info('User location is: '.$assigned_asset_asset->assetloc->name);
|
||||
\Log::info('Setting asset '.$assigned_asset_asset->id.' location to '.$assigned_asset_asset->assetloc->id.' ('.$assigned_asset_asset->assetloc->name.')');
|
||||
$assigned_asset_asset->location_id=$assigned_asset_asset->assetloc->id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$unassigned_assets=Asset::whereNull("location_id")->get();
|
||||
foreach($unassigned_assets as $unassigned_asset) {
|
||||
\Log::info('Asset: '.$unassigned_asset->id.' still has no location');
|
||||
}
|
||||
|
||||
$assets = Asset::get();
|
||||
|
||||
foreach ($assets as $asset) {
|
||||
if (($asset) && ($asset->assetLoc()) && ($asset->location_id != $asset->assetLoc()->id)) {
|
||||
\Log::info('MISMATCH MISMATCH '.$asset->id. "doesn't match its location");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// the contents of this migration have moved to the `php artisan snipeit:sync-asset-locations` script
|
||||
// I know its gross to edit a migration, but we had to do this for support purposes. - @snipe
|
||||
Artisan::call('snipeit:sync-asset-locations', ['--output' => 'all']);
|
||||
$output = Artisan::output();
|
||||
\Log::info($output);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddAlertMenuSetting extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->boolean('show_alerts_in_menu')->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->dropColumn('show_alerts_in_menu');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class LabelsDisplayCompanyName extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->boolean('labels_display_company_name')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function ($table) {
|
||||
$table->dropColumn(
|
||||
'labels_display_company_name'
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,8 @@ MAIL_PASSWORD=${MAIL_ENV_PASSWORD}
|
||||
MAIL_ENCRYPTION=${MAIL_ENV_ENCRYPTION}
|
||||
MAIL_FROM_ADDR=${MAIL_ENV_FROM_ADDR}
|
||||
MAIL_FROM_NAME=${MAIL_ENV_FROM_NAME}
|
||||
MAIL_REPLYTO_ADDR=${MAIL_ENV_FROM_ADDR}
|
||||
MAIL_REPLYTO_NAME=${MAIL_ENV_FROM_NAME}
|
||||
|
||||
|
||||
# --------------------------------------------
|
||||
|
||||
+1
-1
@@ -26,8 +26,8 @@
|
||||
"bootstrap-datepicker": "^1.6.4",
|
||||
"bootstrap-less": "^3.3.8",
|
||||
"ekko-lightbox": "^5.1.1",
|
||||
"fastclick": "^1.0.6",
|
||||
"font-awesome": "^4.7.0",
|
||||
"icheck": "^1.0.2",
|
||||
"jquery-slimscroll": "^1.3.8",
|
||||
"jquery-ui": "^1.12.1",
|
||||
"jquery-ui-bundle": "^1.12.1",
|
||||
|
||||
+17
-17
File diff suppressed because one or more lines are too long
Vendored
+17
-17
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@
|
||||
"/css/app.css.map": "/css/app.css.map?id=bdbe05e6ecd70ccfac72",
|
||||
"/css/overrides.css.map": "/css/overrides.css.map?id=898c91d4a425b01b589b",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=7c3842d2639193ac7e88",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=45f8944e6ec45cec9861",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=0d558c3ed637f4c81a77",
|
||||
"/css/build/all.css": "/css/build/all.css?id=7c3842d2639193ac7e88",
|
||||
"/js/build/all.js": "/js/build/all.js?id=45f8944e6ec45cec9861"
|
||||
"/js/build/all.js": "/js/build/all.js?id=0d558c3ed637f4c81a77"
|
||||
}
|
||||
@@ -19,5 +19,9 @@
|
||||
</rule>
|
||||
</rules>
|
||||
</rewrite>
|
||||
<staticContent>
|
||||
<remove fileExtension=".woff2" />
|
||||
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" />
|
||||
</staticContent>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
|
||||
@@ -63,7 +63,7 @@ $.AdminLTE.options = {
|
||||
//native touch experience with touch devices. If you
|
||||
//choose to enable the plugin, make sure you load the script
|
||||
//before AdminLTE's app.js
|
||||
enableFastclick: true,
|
||||
enableFastclick: false,
|
||||
//Control Sidebar Options
|
||||
enableControlSidebar: true,
|
||||
controlSidebarOptions: {
|
||||
|
||||
@@ -194,7 +194,9 @@ $(document).ready(function () {
|
||||
link.select2({
|
||||
|
||||
ajax: {
|
||||
url: baseUrl + '/api/v1/' + endpoint + '/selectlist',
|
||||
|
||||
// the baseUrl includes a trailing slash
|
||||
url: baseUrl + 'api/v1/' + endpoint + '/selectlist',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
headers: {
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'element',
|
||||
'field_format' => 'formaat',
|
||||
'field_custom_format' => 'Gepasmaakte formaat',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'vereis',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Gebruik deur modelle',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'Die gekose: attribuut is ongeldig.',
|
||||
'numeric' => 'Die: Attribuut moet \'n nommer wees.',
|
||||
'present' => 'Die: attribuut veld moet teenwoordig wees.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => 'Die: Attribuutformaat is ongeldig.',
|
||||
'required' => 'Die: attribuut veld is nodig.',
|
||||
'required_if' => 'Die: attribuut veld is nodig wanneer: ander is: waarde.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'عنصر',
|
||||
'field_format' => 'صيغة',
|
||||
'field_custom_format' => 'صيغة مخصصة',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'مطلوب',
|
||||
'req' => 'مطلوب',
|
||||
'used_by_models' => 'مستخدم في الموديلات',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'السمة المحددة: غير صالحة.',
|
||||
'numeric' => 'يجب أن تكون السمة رقم.',
|
||||
'present' => 'يجب أن يكون حقل السمة موجود.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => 'تنسيق السمة: غير صالح.',
|
||||
'required' => 'حقل السمة: مطلوب.',
|
||||
'required_if' => 'حقل السمة: مطلوب عند: أوثر إس: فالو.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'Елемент',
|
||||
'field_format' => 'Формат',
|
||||
'field_custom_format' => 'Персонализиран формат',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Задължителен',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Използвани от модели ',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'Избраният :attribute е невалиден.',
|
||||
'numeric' => ':attribute трябва да бъде число.',
|
||||
'present' => 'Полето на атрибута трябва да е налице.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => 'Форматът на :attribute е невалиден.',
|
||||
'required' => 'Полето :attribute е задължително.',
|
||||
'required_if' => 'Полето :attribute е задължително, когато :other е :value.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'Typ',
|
||||
'field_format' => 'Formát',
|
||||
'field_custom_format' => 'Vlastní formát',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Povinné',
|
||||
'req' => 'Pov.',
|
||||
'used_by_models' => 'Užito u modelů',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'Zvolený :attribute je neplatný.',
|
||||
'numeric' => ':attribute musí být číslo.',
|
||||
'present' => 'Pole atributu musí být přítomno.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => 'Formát :attribute je neplatný.',
|
||||
'required' => 'Pole :attribute je požadováno.',
|
||||
'required_if' => 'Položka :attribute je vyžadována, když :other je :value.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
'field_custom_format' => 'Brugerdefineret Format',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Påkrævet',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Bruges af modeller',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'Den valgte :attribute er ugyldig.',
|
||||
'numeric' => ':attribute skal være et tal.',
|
||||
'present' => 'Attributfeltet skal være til stede.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => ':attribute formatet er ugyldigt.',
|
||||
'required' => ':attribute feltet er krævet.',
|
||||
'required_if' => ':attribute feltet er krævet når :other er :value.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
'field_custom_format' => 'Benutzerdefiniertes Format',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Erforderlich',
|
||||
'req' => 'Erf.',
|
||||
'used_by_models' => 'Von Modellen benutzt',
|
||||
|
||||
@@ -63,7 +63,7 @@ return array(
|
||||
'success' => 'Asset wurde erfolgreich herausgegeben.',
|
||||
'user_does_not_exist' => 'Dieser Benutzer existiert nicht. Bitte versuchen Sie es erneut.',
|
||||
'not_available' => 'Dieses Asset kann nicht herausgegeben werden!',
|
||||
'no_assets_selected' => 'You must select at least one asset from the list'
|
||||
'no_assets_selected' => 'Mind. 1 Eintrag muss ausgewählt werden'
|
||||
),
|
||||
|
||||
'checkin' => array(
|
||||
|
||||
@@ -23,8 +23,8 @@ return array(
|
||||
'confirm_purge_help' => 'Geben Sie das Wort "DELETE" in das untere Feld ein um die gelöschten Einträge zu bereinigen. Dies kann nicht rückgängig gemacht werden.',
|
||||
'custom_css' => 'Eigenes CSS',
|
||||
'custom_css_help' => 'Füge eigenes CSS hinzu. Benutze keine <style></style> tags.',
|
||||
'custom_forgot_pass_url' => 'Custom Password Reset URL',
|
||||
'custom_forgot_pass_url_help' => 'This replaces the built-in forgotten password URL on the login screen, useful to direct people to internal or hosted LDAP password reset functionality. It will effectively disable local user forgotten password functionality.',
|
||||
'custom_forgot_pass_url' => 'Benutzerdefinierte Passwort Reset URL',
|
||||
'custom_forgot_pass_url_help' => 'Dadurch wird die integrierte URL für vergessene Passwörter auf dem Anmeldebildschirm ersetzt. Dies ist nützlich, um Benutzer zur internen oder gehosteten Funktion zum Zurücksetzen von LDAP-Passwörtern zu leiten. Es wird effektiv die Funktionalität des lokalen, vergessenen Passworts deaktiviert.',
|
||||
'default_currency' => 'Standardwährung',
|
||||
'default_eula_text' => 'Standard EULA',
|
||||
'default_language' => 'Standardsprache',
|
||||
@@ -46,8 +46,8 @@ return array(
|
||||
'ldap_enabled' => 'LDAP aktiviert',
|
||||
'ldap_integration' => 'LDAP Integration',
|
||||
'ldap_settings' => 'LDAP Einstellungen',
|
||||
'ldap_login_test_help' => 'Enter a valid LDAP username and password from the base DN you specified above to test whether your LDAP login is configured correctly. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.',
|
||||
'ldap_login_sync_help' => 'This only tests that LDAP can sync correctly. If your LDAP Authentication query is not correct, users may still not be able to login. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.',
|
||||
'ldap_login_test_help' => 'Geben Sie einen gültigen LDAP-Benutzernamen und ein Passwort von der oben angegebenen Basis-DN ein, um zu testen, ob Ihre LDAP-Anmeldung korrekt konfiguriert ist. SIE MÜSSEN IHRE AKTUALISIERTEN LDAP-EINSTELLUNGEN ZUERST SPEICHERN.',
|
||||
'ldap_login_sync_help' => 'Dies testet nur, ob LDAP korrekt synchronisiert werden kann. Wenn Ihre LDAP-Authentifizierungsabfrage nicht korrekt ist, können sich Benutzer möglicherweise nicht anmelden. SIE MÜSSEN IHRE AKTUALISIERTEN LDAP-EINSTELLUNGEN ZUERST SPEICHERN.',
|
||||
'ldap_server' => 'LDAP Server',
|
||||
'ldap_server_help' => 'Sollte mit ldap:// (für unencrypted oder TLS) oder ldaps:// (für SSL) starten',
|
||||
'ldap_server_cert' => 'LDAP SSL Zertifikatsüberprüfung',
|
||||
|
||||
@@ -19,9 +19,9 @@ return array(
|
||||
'confirm' => 'Sind Sie sicher, dass Sie diesen Lieferanten löschen möchten?',
|
||||
'error' => 'Beim löschen des Lieferanten ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.',
|
||||
'success' => 'Lieferant wurde erfolgreich gelöscht.',
|
||||
'assoc_assets' => 'This supplier is currently associated with :asset_count asset(s) and cannot be deleted. Please update your assets to no longer reference this supplier and try again. ',
|
||||
'assoc_licenses' => 'This supplier is currently associated with :licenses_count licences(s) and cannot be deleted. Please update your licenses to no longer reference this supplier and try again. ',
|
||||
'assoc_maintenances' => 'This supplier is currently associated with :asset_maintenances_count asset maintenances(s) and cannot be deleted. Please update your asset maintenances to no longer reference this supplier and try again. ',
|
||||
'assoc_assets' => 'Dieser Lieferant ist derzeit :asset_count Asset(s) zugeordnet und kann nicht gelöscht werden. Bitte aktualisieren Sie Ihre Assets so, dass sie nicht mehr auf diesen Lieferant verweisen und versuchen Sie es erneut. ',
|
||||
'assoc_licenses' => 'Dieser Lieferant ist derzeit mit :licenses_count Lizenze(n) verknüpft und kann nicht gelöscht werden. Bitte aktualisieren Sie Ihre Lizenzen so, dass sie nicht mehr auf diesen Lieferant verweisen und versuchen Sie es erneut. ',
|
||||
'assoc_maintenances' => 'Diese Lieferant ist derzeit mindestens einem Modell zugeordnet und kann nicht gelöscht werden. Bitte aktualisieren Sie Ihre Modelle, um nicht mehr auf diesen Lieferant zu verweisen und versuchen Sie es erneut. ',
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
'checkout' => 'Checkout Asset to User',
|
||||
'city' => 'Stadt',
|
||||
'click_here' => 'Hier klicken',
|
||||
'clear_selection' => 'Clear Selection',
|
||||
'clear_selection' => 'Auswahl löschen',
|
||||
'companies' => 'Firmen',
|
||||
'company' => 'Firma',
|
||||
'component' => 'Komponente',
|
||||
@@ -90,7 +90,7 @@
|
||||
'history' => 'Historie',
|
||||
'history_for' => 'Verlauf für',
|
||||
'id' => 'Id',
|
||||
'image' => 'Image',
|
||||
'image' => 'Abbildung',
|
||||
'image_delete' => 'Bild löschen',
|
||||
'image_upload' => 'Bild hinzufügen',
|
||||
'import' => 'Import',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'Auswahl :attribute ist ungültig.',
|
||||
'numeric' => ':attribute muss eine Zahl sein.',
|
||||
'present' => 'Das Attributfeld muss vorhanden sein.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => ':attribute Format ungültig.',
|
||||
'required' => ':attribute Feld muss ausgefüllt sein.',
|
||||
'required_if' => ':attribute wird benötigt wenn :other :value entspricht.',
|
||||
@@ -87,7 +88,7 @@ return array(
|
||||
'unique' => ':attribute schon benutzt.',
|
||||
'uploaded' => ':attribute konnte nicht hochgeladen werden.',
|
||||
'url' => ':attribute Format ist ungültig.',
|
||||
"unique_undeleted" => "The :attribute must be unique.",
|
||||
"unique_undeleted" => "Die Variable :attribute muss eindeutig sein.",
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'Στοιχείο',
|
||||
'field_format' => 'Τύπος',
|
||||
'field_custom_format' => 'Προσαρμοσμένος τύπος',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Απαιτείται',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Χρησιμοποιήθηκε από τα μοντέλα',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'Το επιλεγμένο: χαρακτηριστικό δεν είναι έγκυρο.',
|
||||
'numeric' => 'Το χαρακτηριστικό πρέπει να είναι ένας αριθμός.',
|
||||
'present' => 'Πρέπει να υπάρχει το πεδίο ιδιοτήτων: attribute.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => 'Η μορφή του χαρακτηριστικού είναι μη έγκυρη.',
|
||||
'required' => 'Το πεδίο ιδιοτήτων: απαιτείται.',
|
||||
'required_if' => 'Το πεδίο ιδιοτήτων: απαιτείται όταν: το άλλο είναι: τιμή.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
'field_custom_format' => 'Custom Format',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Required',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Used By Models',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
'field_custom_format' => 'Custom Format',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Required',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Used By Models',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
|
||||
@@ -5,7 +5,7 @@ return array(
|
||||
'field' => 'Field',
|
||||
'about_fieldsets_title' => 'About Fieldsets',
|
||||
'about_fieldsets_text' => 'Fieldsets allow you to create groups of custom fields that are frequently re-used used for specific asset model types.',
|
||||
'custom_format' => 'Custom format...',
|
||||
'custom_format' => 'Custom regex format...',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database',
|
||||
'encrypt_field_help' => 'WARNING: Encrypting a field makes it unsearchable.',
|
||||
'encrypted' => 'Encrypted',
|
||||
@@ -19,7 +19,8 @@ return array(
|
||||
'field_element' => 'Form Element',
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
'field_custom_format' => 'Custom Format',
|
||||
'field_custom_format' => 'Custom Regex Format',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Required',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Used By Models',
|
||||
|
||||
@@ -6,7 +6,7 @@ return array(
|
||||
'ad_domain_help' => 'This is sometimes the same as your email domain, but not always.',
|
||||
'is_ad' => 'This is an Active Directory server',
|
||||
'alert_email' => 'Send alerts to',
|
||||
'alerts_enabled' => 'Alerts Enabled',
|
||||
'alerts_enabled' => 'Email Alerts Enabled',
|
||||
'alert_interval' => 'Expiring Alerts Threshold (in days)',
|
||||
'alert_inv_threshold' => 'Inventory Alert Threshold',
|
||||
'asset_ids' => 'Asset IDs',
|
||||
@@ -27,7 +27,7 @@ return array(
|
||||
'custom_forgot_pass_url_help' => 'This replaces the built-in forgotten password URL on the login screen, useful to direct people to internal or hosted LDAP password reset functionality. It will effectively disable local user forgotten password functionality.',
|
||||
'default_currency' => 'Default Currency',
|
||||
'default_eula_text' => 'Default EULA',
|
||||
'default_language' => 'Default Language',
|
||||
'default_language' => 'Default Language',
|
||||
'default_eula_help_text' => 'You can also associate custom EULAs to specific asset categories.',
|
||||
'display_asset_name' => 'Display Asset Name',
|
||||
'display_checkout_date' => 'Display Checkout Date',
|
||||
@@ -91,6 +91,7 @@ return array(
|
||||
'qr_text' => 'QR Code Text',
|
||||
'setting' => 'Setting',
|
||||
'settings' => 'Settings',
|
||||
'show_alerts_in_menu' => 'Show alerts in top menu',
|
||||
'site_name' => 'Site Name',
|
||||
'slack_botname' => 'Slack Botname',
|
||||
'slack_channel' => 'Slack Channel',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'Elemento',
|
||||
'field_format' => 'Formato',
|
||||
'field_custom_format' => 'Formato personalizado',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Obligatorio',
|
||||
'req' => 'Obl.',
|
||||
'used_by_models' => 'Usado Por Modelos',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'El :attribute seleccionado no es correcto.',
|
||||
'numeric' => ':attribute debe ser un número.',
|
||||
'present' => 'El campo: atributo debe estar presente.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => ':attribute formato incorrecto.',
|
||||
'required' => ':attribute es obligatorio.',
|
||||
'required_if' => ':attribute es obligatrio cuando :other es :value.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'Elemento',
|
||||
'field_format' => 'Formato',
|
||||
'field_custom_format' => 'Formato personalizado',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Obligatorio',
|
||||
'req' => 'Obl.',
|
||||
'used_by_models' => 'Usado Por Modelos',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'El :attribute seleccionado no es correcto.',
|
||||
'numeric' => ':attribute debe ser un número.',
|
||||
'present' => 'El campo: atributo debe estar presente.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => ':attribute formato incorrecto.',
|
||||
'required' => ':attribute es obligatorio.',
|
||||
'required_if' => ':attribute es obligatrio cuando :other es :value.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Vorming',
|
||||
'field_custom_format' => 'Kohandatud vorming',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Nõutud',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Kasutatud mudelite järgi',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'Valitud atribuut on kehtetu.',
|
||||
'numeric' => 'Atribuut peab olema number.',
|
||||
'present' => 'Atribuudiväli peab olema kohal.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => 'Atribuudivorming on vale.',
|
||||
'required' => 'Atribuudiväljandus on kohustuslik.',
|
||||
'required_if' => 'Atribuudiväljastus on vajalik, kui: muu on: väärtus.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'عنصر',
|
||||
'field_format' => 'شکل دادن',
|
||||
'field_custom_format' => 'شکل دادن سفارشی',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'نیازمندی',
|
||||
'req' => 'نیازمندی',
|
||||
'used_by_models' => 'استفاده شده توسط مدل ها',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'ویژگی انتخاب شده نامعتبر است.',
|
||||
'numeric' => 'ویژگی باید عدد باشد.',
|
||||
'present' => 'فیلد attribute باید باشد.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => 'شکل ویژگی نامعتبر است.',
|
||||
'required' => 'فیلد ویژگی ضروری است.',
|
||||
'required_if' => 'فیلد ویژگی ضروری است، وقتی که دیگری ارزش است.',
|
||||
|
||||
@@ -20,6 +20,7 @@ return array(
|
||||
'field_element_short' => 'elementti',
|
||||
'field_format' => 'Muoto',
|
||||
'field_custom_format' => 'Mukautettu muoto',
|
||||
'field_custom_format_help' => 'This field allows you to use a regex expression for validation. It should start with "regex:" - for example, to validate that a custom field value contains a valid IMEI (15 numeric digits), you would use <code>regex:/^[0-9]{15}$/</code>.',
|
||||
'required' => 'Edellytetään',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Käytetään mallien mukaan',
|
||||
|
||||
@@ -67,6 +67,7 @@ return array(
|
||||
'not_in' => 'Valittu :attribute on virheellinen.',
|
||||
'numeric' => ':attribute tulee olla numero.',
|
||||
'present' => 'Attribuutti-kentän on oltava läsnä.',
|
||||
'valid_regex' => 'That is not a valid regex. ',
|
||||
'regex' => ':attribute muotoilu on virheellinen.',
|
||||
'required' => ':attribute on vaadittu.',
|
||||
'required_if' => ':attribute on vaadittu kun :other on :value.',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user