Compare commits
164 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a1225a8bf | |||
| c6069b905b | |||
| 2e76620cf8 | |||
| a4b30279ee | |||
| db59d4b2c4 | |||
| faf3802971 | |||
| 7fe2a1f802 | |||
| 3d57d1bd1d | |||
| ba8bcce8eb | |||
| 8247a73182 | |||
| aab409dec2 | |||
| 70a9b7bf05 | |||
| d9824a0454 | |||
| e759a249bd | |||
| 42c2a66946 | |||
| 4d32f2b337 | |||
| 0e29744ec2 | |||
| 51236a2ad9 | |||
| 9b6726a630 | |||
| cbdd05144a | |||
| 507f1f196c | |||
| b60febeea2 | |||
| b3e0d8f675 | |||
| 9b84a0d516 | |||
| adac5ac544 | |||
| 1775995f26 | |||
| df4700b411 | |||
| 26a7701cda | |||
| a34085f1d9 | |||
| 8e682c715e | |||
| 915c19ebda | |||
| 7fded367c4 | |||
| 0a4743210c | |||
| af19e5d976 | |||
| 3d7277398c | |||
| a7ad48a02a | |||
| 469a3fc608 | |||
| 0fb4ff77f4 | |||
| ac83dba2bb | |||
| 979ecf961d | |||
| 13dcdf41b8 | |||
| fc96fa756e | |||
| ea9a502152 | |||
| d844734b6c | |||
| ec8a3d2e56 | |||
| 5410dc4255 | |||
| d1112bbc99 | |||
| ecf041fa10 | |||
| 0ab9bc1db8 | |||
| 73e788b94b | |||
| e91a537552 | |||
| ef8c1abf28 | |||
| bd0498aa69 | |||
| ea45033588 | |||
| 5e1df7049c | |||
| e27e1a78c3 | |||
| d585a34a26 | |||
| 4edaba648e | |||
| 9dca7396f3 | |||
| 4324242475 | |||
| eca5a05335 | |||
| aa4d3c3ffb | |||
| d442feb687 | |||
| 0a88141b18 | |||
| d5e6d82ca1 | |||
| f2a62857cb | |||
| b354ca817d | |||
| 4b9bfc178d | |||
| abc2f7e789 | |||
| 29cc9a0815 | |||
| f2ee7dcabb | |||
| 26203801f6 | |||
| fbe9539130 | |||
| 43ec959385 | |||
| 9b6276f281 | |||
| 0715791229 | |||
| 0a0661bf41 | |||
| 6ee939d29b | |||
| c3afbc0e53 | |||
| 38326314ca | |||
| 865950e766 | |||
| d49b67d033 | |||
| 6b63808e34 | |||
| 34dfcb5add | |||
| 30019a144a | |||
| 3e222b674a | |||
| e316444c63 | |||
| b29d7beb3a | |||
| f0a49fefd7 | |||
| 998c4a5fe5 | |||
| 626a6408d0 | |||
| 126a5671fe | |||
| aff104fa5d | |||
| a5764351f7 | |||
| 348becbbec | |||
| 922d6937ae | |||
| c53dae4b72 | |||
| 17ad7f7800 | |||
| 6232a077b5 | |||
| e7d72beb88 | |||
| 01e3f4a4db | |||
| 1b76880b0e | |||
| ed4ea7f1f4 | |||
| 81e358a01d | |||
| 6c283de60a | |||
| 4e7a6c0ccf | |||
| eba145503b | |||
| ae8c9d6afc | |||
| faeca4139d | |||
| 47909b93f7 | |||
| 472658b2fe | |||
| 42a03a0436 | |||
| ae0573b3da | |||
| 34f816097e | |||
| fd515654ff | |||
| 5347b19910 | |||
| 29f1cf2b48 | |||
| f56862c684 | |||
| 1052be670d | |||
| 30a9704625 | |||
| 9a9b6ae228 | |||
| 7c8dc9fe2d | |||
| b81dd18576 | |||
| dac4b58892 | |||
| 71fd430f8e | |||
| 5265821bcc | |||
| cb494a74ca | |||
| c526ffbf68 | |||
| 6f5fe83a91 | |||
| 5a3816c907 | |||
| c8796cf045 | |||
| f4095c6dd0 | |||
| ee2c67a65f | |||
| 5614578710 | |||
| 08ef78356d | |||
| 47ac59abef | |||
| 265a896211 | |||
| f7e4fca70d | |||
| bb4c443cd9 | |||
| 7b1d2ee050 | |||
| b3f70a046f | |||
| 734e87f85f | |||
| f371c5fd62 | |||
| 4b3edbd2f5 | |||
| 1f3106b9da | |||
| 9fd3a9a82d | |||
| a6e6991a2d | |||
| 93ba0717d8 | |||
| a8839e0ef4 | |||
| 3e4152c966 | |||
| 1bf34d73f5 | |||
| d1e360d64d | |||
| 3b5b19848c | |||
| 93ba90e837 | |||
| fc70d79a17 | |||
| 65016a2383 | |||
| dbcb2ccb46 | |||
| 2afcfcc87c | |||
| 1afef9416a | |||
| 4049143ebf | |||
| 4df53bdf8d | |||
| d49a1ea304 | |||
| 521f4facd5 | |||
| b4653dfc15 |
@@ -728,6 +728,33 @@
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "imanghafoori1",
|
||||
"name": "Iman",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/6961695?v=4",
|
||||
"profile": "https://github.com/imanghafoori1",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "richardhofman6",
|
||||
"name": "Richard Hofman",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/6551003?v=4",
|
||||
"profile": "https://github.com/richardhofman6",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "gizzmojr",
|
||||
"name": "gizzmojr",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/3697569?v=4",
|
||||
"profile": "https://github.com/gizzmojr",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ DB_USERNAME=null
|
||||
DB_PASSWORD=null
|
||||
DB_PREFIX=null
|
||||
DB_DUMP_PATH='/usr/bin'
|
||||
DB_CHARSET=utf8mb4
|
||||
DB_COLLATION=utf8mb4_unicode_ci
|
||||
|
||||
# --------------------------------------------
|
||||
# OPTIONAL: SSL DATABASE SETTINGS
|
||||
@@ -61,6 +63,7 @@ ENCRYPT=false
|
||||
COOKIE_NAME=snipeit_session
|
||||
COOKIE_DOMAIN=null
|
||||
SECURE_COOKIES=false
|
||||
REFERRER_POLICY=strict-origin
|
||||
|
||||
|
||||
# --------------------------------------------
|
||||
|
||||
@@ -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
|
||||
@@ -67,7 +67,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/8341172?v=3" width="110px;"/><br /><sub>Jay Richards</sub>](http://www.cordeos.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=technogenus "Code") | [<img src="https://avatars2.githubusercontent.com/u/7295127?v=3" width="110px;"/><br /><sub>Alexander Innes</sub>](https://necurity.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=leostat "Code") | [<img src="https://avatars2.githubusercontent.com/u/334485?v=3" width="110px;"/><br /><sub>Danny Garcia</sub>](https://buzzedword.codes)<br />[💻](https://github.com/snipe/snipe-it/commits?author=buzzedword "Code") | [<img src="https://avatars2.githubusercontent.com/u/366855?v=3" width="110px;"/><br /><sub>archpoint</sub>](https://github.com/archpoint)<br />[💻](https://github.com/snipe/snipe-it/commits?author=archpoint "Code") | [<img src="https://avatars1.githubusercontent.com/u/67991?v=3" width="110px;"/><br /><sub>Jake McGraw</sub>](http://www.jakemcgraw.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jakemcgraw "Code") | [<img src="https://avatars1.githubusercontent.com/u/1714374?v=3" width="110px;"/><br /><sub>FleischKarussel</sub>](https://github.com/FleischKarussel)<br />[📖](https://github.com/snipe/snipe-it/commits?author=FleischKarussel "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/319644?v=3" width="110px;"/><br /><sub>Dylan Yi</sub>](https://github.com/feeva)<br />[💻](https://github.com/snipe/snipe-it/commits?author=feeva "Code") |
|
||||
| [<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://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") |
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
|
||||
@@ -76,7 +76,7 @@ This project follows the [all-contributors](https://github.com/kentcdodds/all-co
|
||||
|
||||
### Contributing
|
||||
|
||||
Please see the documentation on [contributing and developing for Snipe-IT](https://snipe-it.readme.io/docs/contributing).
|
||||
Please see the documentation on [contributing and developing for Snipe-IT](https://snipe-it.readme.io/docs/contributing-overview).
|
||||
|
||||
|
||||
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
||||
|
||||
@@ -47,6 +47,7 @@ class RecryptFromMcrypt extends Command
|
||||
// Check and see if they have a legacy app key listed in their .env
|
||||
// If not, we can try to use the current APP_KEY if looks like it's old
|
||||
$legacy_key = env('LEGACY_APP_KEY');
|
||||
$key_parts = explode(':', $legacy_key);
|
||||
$errors = array();
|
||||
|
||||
if (!$legacy_key) {
|
||||
@@ -54,11 +55,23 @@ class RecryptFromMcrypt extends Command
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that the app key is 32 characters
|
||||
|
||||
// Do some basic legacy app key length checks
|
||||
if (strlen($legacy_key) == 32) {
|
||||
$this->comment('INFO: Your LEGACY_APP_KEY is 32 characters. Okay to continue.');
|
||||
$legacy_length_check = true;
|
||||
} elseif (array_key_exists('1', $key_parts) && (strlen($key_parts[1])==44)) {
|
||||
$legacy_length_check = true;
|
||||
} else {
|
||||
$this->error('ERROR: Your LEGACY_APP_KEY is not the correct length (32 characters). Please locate your old APP_KEY and use that as your LEGACY_APP_KEY in your .env file to continue.');
|
||||
$legacy_length_check = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that the app key is 32 characters
|
||||
if ($legacy_length_check === true) {
|
||||
$this->comment('INFO: Your LEGACY_APP_KEY looks correct. Okay to continue.');
|
||||
} else {
|
||||
$this->error('ERROR: Your LEGACY_APP_KEY is not the correct length (32 characters or base64 followed by 44 characters for later versions). Please locate your old APP_KEY and use that as your LEGACY_APP_KEY in your .env file to continue.');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ class AccessoriesController extends Controller
|
||||
$data['note'] = $logaction->note;
|
||||
$data['require_acceptance'] = $accessory->requireAcceptance();
|
||||
// TODO: Port this to new mail notifications
|
||||
if (($accessory->requireAcceptance()=='1') || ($accessory->getEula())) {
|
||||
if ((($accessory->requireAcceptance()=='1') || ($accessory->getEula())) && ($user->email!='')) {
|
||||
|
||||
Mail::send('emails.accept-accessory', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
@@ -351,7 +351,7 @@ class AccessoriesController extends Controller
|
||||
$data['item_tag'] = '';
|
||||
$data['note'] = e($logaction->note);
|
||||
|
||||
if (($accessory->checkin_email()=='1')) {
|
||||
if ((($accessory->checkin_email()=='1')) && ($user->email!='')) {
|
||||
|
||||
Mail::send('emails.checkin-asset', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
|
||||
@@ -129,9 +129,8 @@ class AccessoriesController extends Controller
|
||||
{
|
||||
$this->authorize('view', Accessory::class);
|
||||
$accessory = Accessory::findOrFail($id)->with('users')->first();
|
||||
$accessories_users = $accessory->users;
|
||||
$total = $accessories_users->count();
|
||||
return (new AccessoriesTransformer)->transformCheckedoutAccessories($accessories_users, $total);
|
||||
$total = $accessory->users->count();
|
||||
return (new AccessoriesTransformer)->transformCheckedoutAccessory($accessory, $total);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Transformers\CustomFieldsTransformer;
|
||||
use App\Models\CustomField;
|
||||
use App\Models\CustomFieldset;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CustomFieldsController extends Controller
|
||||
{
|
||||
@@ -16,6 +18,15 @@ class CustomFieldsController extends Controller
|
||||
* @since [v3.0]
|
||||
* @return Array
|
||||
*/
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->authorize('index', CustomFields::class);
|
||||
$fields = CustomField::get();
|
||||
|
||||
$total = count($fields);
|
||||
return (new CustomFieldsTransformer)->transformCustomFields($fields, $total);
|
||||
}
|
||||
public function postReorder(Request $request, $id)
|
||||
{
|
||||
$fieldset = CustomFieldset::find($id);
|
||||
|
||||
@@ -73,7 +73,7 @@ class GroupsController extends Controller
|
||||
{
|
||||
$this->authorize('view', Group::class);
|
||||
$group = Group::findOrFail($id);
|
||||
return $group;
|
||||
return (new GroupsTransformer)->transformGroup($group);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use League\Csv\Reader;
|
||||
use Symfony\Component\HttpFoundation\File\Exception\FileException;
|
||||
use Artisan;
|
||||
|
||||
class ImportController extends Controller
|
||||
{
|
||||
@@ -94,6 +95,8 @@ class ImportController extends Controller
|
||||
public function process(ItemImportRequest $request, $import_id)
|
||||
{
|
||||
$this->authorize('create', Asset::class);
|
||||
// Run a backup immediately before processing
|
||||
Artisan::call('backup:run');
|
||||
$errors = $request->import(Import::find($import_id));
|
||||
$redirectTo = "hardware.index";
|
||||
switch ($request->get('import-type')) {
|
||||
|
||||
@@ -52,6 +52,12 @@ class UsersController extends Controller
|
||||
$users = $users->TextSearch($request->input('search'));
|
||||
}
|
||||
|
||||
|
||||
if (($request->has('deleted')) && ($request->input('deleted')=='true')) {
|
||||
$users = $users->GetDeleted();
|
||||
}
|
||||
|
||||
|
||||
if ($request->has('company_id')) {
|
||||
$users = $users->where('company_id', '=', $request->input('company_id'));
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class AssetModelsController extends Controller
|
||||
$model->manufacturer_id = $request->input('manufacturer_id');
|
||||
$model->category_id = $request->input('category_id');
|
||||
$model->notes = $request->input('notes');
|
||||
$model->user_id = Auth::guard('api')->user();
|
||||
$model->user_id = Auth::id();
|
||||
$model->requestable = Input::has('requestable');
|
||||
|
||||
if ($request->input('custom_fieldset')!='') {
|
||||
|
||||
@@ -412,6 +412,13 @@ class AssetsController extends Controller
|
||||
|
||||
$asset->delete();
|
||||
|
||||
$logaction = new Actionlog();
|
||||
$logaction->item_type = Asset::class;
|
||||
$logaction->item_id = $asset->id;
|
||||
$logaction->created_at = date("Y-m-d H:i:s");
|
||||
$logaction->user_id = Auth::user()->id;
|
||||
$log = $logaction->logaction('deleted');
|
||||
|
||||
// Redirect to the asset management page
|
||||
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.delete.success'));
|
||||
}
|
||||
@@ -643,7 +650,7 @@ class AssetsController extends Controller
|
||||
if ($settings->qr_code == '1') {
|
||||
$asset = Asset::find($assetId);
|
||||
$size = Helper::barcodeDimensions($settings->barcode_type);
|
||||
$qr_file = public_path().'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'.png';
|
||||
$qr_file = public_path().'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'-'.str_slug($asset->id).'.png';
|
||||
|
||||
if (isset($asset->id,$asset->asset_tag)) {
|
||||
|
||||
@@ -1223,7 +1230,7 @@ class AssetsController extends Controller
|
||||
foreach ($asset_ids as $asset_id) {
|
||||
$asset = Asset::find($asset_id);
|
||||
$this->authorize('checkout', $asset);
|
||||
$error = $asset->checkOutToUser($user, $admin, $checkout_at, $expected_checkin, e(Input::get('note')), null);
|
||||
$error = $asset->checkOut($user, $admin, $checkout_at, $expected_checkin, e(Input::get('note')), null);
|
||||
|
||||
if ($error) {
|
||||
array_merge_recursive($errors, $asset->getErrors()->toArray());
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ class ResetPasswordController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
protected $redirectTo = '/';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
||||
@@ -74,20 +74,20 @@ class ComponentsController extends Controller
|
||||
* @since [v3.0]
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function store()
|
||||
public function store(Request $request)
|
||||
{
|
||||
$this->authorize('create', Component::class);
|
||||
$component = new Component();
|
||||
$component->name = Input::get('name');
|
||||
$component->category_id = Input::get('category_id');
|
||||
$component->location_id = Input::get('location_id');
|
||||
$component->company_id = Company::getIdForCurrentUser(Input::get('company_id'));
|
||||
$component->order_number = Input::get('order_number');
|
||||
$component->min_amt = Input::get('min_amt');
|
||||
$component->serial = Input::get('serial');
|
||||
$component->purchase_date = Input::get('purchase_date');
|
||||
$component->purchase_cost = request('purchase_cost');
|
||||
$component->qty = Input::get('qty');
|
||||
$component->name = $request->input('name');
|
||||
$component->category_id = $request->input('category_id');
|
||||
$component->location_id = $request->input('location_id');
|
||||
$component->company_id = Company::getIdForCurrentUser($request->input('company_id'));
|
||||
$component->order_number = $request->input('order_number', null);
|
||||
$component->min_amt = $request->input('min_amt', null);
|
||||
$component->serial = $request->input('serial', null);
|
||||
$component->purchase_date = $request->input('purchase_date', null);
|
||||
$component->purchase_cost = $request->input('purchase_cost', null);
|
||||
$component->qty = $request->input('qty');
|
||||
$component->user_id = Auth::id();
|
||||
|
||||
if ($component->save()) {
|
||||
|
||||
@@ -37,19 +37,25 @@ class CustomFieldsetsController extends Controller
|
||||
public function show($id)
|
||||
{
|
||||
$cfset = CustomFieldset::with('fields')->where('id', '=', $id)->orderBy('id', 'ASC')->first();
|
||||
$custom_fields_list = ["" => "Add New Field to Fieldset"] + CustomField::pluck("name", "id")->toArray();
|
||||
|
||||
$maxid = 0;
|
||||
foreach ($cfset->fields() as $field) {
|
||||
if ($field->pivot->order > $maxid) {
|
||||
$maxid=$field->pivot->order;
|
||||
}
|
||||
if (isset($custom_fields_list[$field->id])) {
|
||||
unset($custom_fields_list[$field->id]);
|
||||
if ($cfset) {
|
||||
$custom_fields_list = ["" => "Add New Field to Fieldset"] + CustomField::pluck("name", "id")->toArray();
|
||||
|
||||
$maxid = 0;
|
||||
foreach ($cfset->fields() as $field) {
|
||||
if ($field->pivot->order > $maxid) {
|
||||
$maxid=$field->pivot->order;
|
||||
}
|
||||
if (isset($custom_fields_list[$field->id])) {
|
||||
unset($custom_fields_list[$field->id]);
|
||||
}
|
||||
}
|
||||
|
||||
return view("custom_fields.fieldsets.view")->with("custom_fieldset", $cfset)->with("maxid", $maxid+1)->with("custom_fields_list", $custom_fields_list);
|
||||
}
|
||||
|
||||
return view("custom_fields.fieldsets.view")->with("custom_fieldset", $cfset)->with("maxid", $maxid+1)->with("custom_fields_list", $custom_fields_list);
|
||||
return redirect()->route("fields.index")->with("error", trans('admin/custom_fields/message.fieldset.does_not_exist'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -133,16 +139,21 @@ class CustomFieldsetsController extends Controller
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
$fieldset = CustomFieldset::find($id);
|
||||
|
||||
$models = AssetModel::where("fieldset_id", "=", $id);
|
||||
if ($models->count() == 0) {
|
||||
$fieldset->delete();
|
||||
return redirect()->route("fields.show")->with("success", trans('admin/custom_fields/message.fieldset.delete.success'));
|
||||
} else {
|
||||
return redirect()->route("fields.show")->with("error", trans('admin/custom_fields/message.fieldset.delete.in_use'));
|
||||
if ($fieldset) {
|
||||
$models = AssetModel::where("fieldset_id", "=", $id);
|
||||
if ($models->count() == 0) {
|
||||
$fieldset->delete();
|
||||
return redirect()->route("fields.index")->with("success", trans('admin/custom_fields/message.fieldset.delete.success'));
|
||||
} else {
|
||||
return redirect()->route("fields.index")->with("error", trans('admin/custom_fields/message.fieldset.delete.in_use'));
|
||||
}
|
||||
}
|
||||
|
||||
return redirect()->route("fields.index")->with("error", trans('admin/custom_fields/message.fieldset.does_not_exist'));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ class LicensesController extends Controller
|
||||
|
||||
// Declare the rules for the form validation
|
||||
$rules = [
|
||||
'note' => 'string',
|
||||
'note' => 'string|nullable',
|
||||
'asset_id' => 'required_without:assigned_to',
|
||||
];
|
||||
|
||||
@@ -306,8 +306,8 @@ class LicensesController extends Controller
|
||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.asset_does_not_exist'));
|
||||
}
|
||||
|
||||
if (($target->assigned_to!='') && (($target->assigned_to!=$assigned_to)) && ($target!='')) {
|
||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.owner_doesnt_match_asset'));
|
||||
if (($request->has('assigned_to')) && ($request->has('asset_id'))) {
|
||||
return redirect()->back()->withInput()->with('error', trans('admin/licenses/message.select_asset_or_person'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,7 +440,10 @@ class LicensesController extends Controller
|
||||
*/
|
||||
public function show($licenseId = null)
|
||||
{
|
||||
|
||||
$license = License::find($licenseId);
|
||||
$license = $license->load('assignedusers', 'licenseSeats.user', 'licenseSeats.asset');
|
||||
|
||||
if (isset($license->id)) {
|
||||
$license = $license->load('assignedusers', 'licenseSeats.user', 'licenseSeats.asset');
|
||||
$this->authorize('view', $license);
|
||||
|
||||
@@ -463,7 +463,7 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
if (e(Input::get('notes')) == '1') {
|
||||
$header[] = 'Notes';
|
||||
$header[] = trans('general.notes');
|
||||
}
|
||||
|
||||
|
||||
@@ -604,9 +604,9 @@ class ReportsController extends Controller
|
||||
|
||||
if (e(Input::get('notes')) == '1') {
|
||||
if ($asset->notes) {
|
||||
$row[] = '"' .$asset->notes. '"';
|
||||
$row[] = '"' .$asset->notes . '"';
|
||||
} else {
|
||||
$row[] = ''; // Empty string if unassigned
|
||||
$row[] = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -338,7 +338,10 @@ class SettingsController extends Controller
|
||||
$setting->email_format = $request->input('email_format');
|
||||
$setting->username_format = $request->input('username_format');
|
||||
$setting->require_accept_signature = $request->input('require_accept_signature');
|
||||
$setting->login_note = $request->input('login_note');
|
||||
if (!config('app.lock_passwords')) {
|
||||
$setting->login_note = $request->input('login_note');
|
||||
}
|
||||
|
||||
$setting->default_eula_text = $request->input('default_eula_text');
|
||||
$setting->thumbnail_max_h = $request->input('thumbnail_max_h');
|
||||
|
||||
@@ -992,6 +995,8 @@ class SettingsController extends Controller
|
||||
{
|
||||
if (!config('app.lock_passwords')) {
|
||||
if (Input::get('confirm_purge')=='DELETE') {
|
||||
// Run a backup immediately before processing
|
||||
Artisan::call('backup:run');
|
||||
Artisan::call('snipeit:purge', ['--force'=>'true','--no-interaction'=>true]);
|
||||
$output = Artisan::output();
|
||||
return view('settings/purge')
|
||||
|
||||
@@ -370,14 +370,20 @@ class UsersController extends Controller
|
||||
// Authorize takes care of many of our logic checks now.
|
||||
$this->authorize('delete', User::class);
|
||||
|
||||
if ($user->assets()->count() > 0) {
|
||||
// Check if we are not trying to delete ourselves
|
||||
if ($user->id === Auth::user()->id) {
|
||||
// Redirect to the user management page
|
||||
return redirect()->route('users.index')->with('error', 'This user still has ' . $user->assets()->count() . ' assets associated with them.');
|
||||
}
|
||||
|
||||
if (count($user->assets) > 0) {
|
||||
// Redirect to the user management page
|
||||
return redirect()->route('users.index')->with('error', 'This user still has ' . count($user->assets) . ' assets associated with them.');
|
||||
}
|
||||
|
||||
if ($user->licenses()->count() > 0) {
|
||||
// Redirect to the user management page
|
||||
return redirect()->route('users.index')->with('error', 'This user still has ' . $user->licenses()->count() . ' licenses associated with them.');
|
||||
return redirect()->route('users.index')->with('error', 'This user still has ' . $user->assets()->count() . ' assets associated with them.');
|
||||
}
|
||||
|
||||
if ($user->accessories()->count() > 0) {
|
||||
@@ -532,10 +538,7 @@ class UsersController extends Controller
|
||||
if (($key = array_search(Auth::user()->id, $user_raw_array)) !== false) {
|
||||
unset($user_raw_array[$key]);
|
||||
}
|
||||
|
||||
if (!Auth::user()->isSuperUser()) {
|
||||
return redirect()->route('users.index')->with('error', trans('admin/users/message.insufficient_permissions'));
|
||||
}
|
||||
|
||||
|
||||
if (!config('app.lock_passwords')) {
|
||||
|
||||
@@ -836,7 +839,6 @@ class UsersController extends Controller
|
||||
'permissions' => '{"user":1}',
|
||||
'notes' => 'Imported user'
|
||||
);
|
||||
//dd($newuser);
|
||||
|
||||
DB::table('users')->insert($newuser);
|
||||
|
||||
@@ -928,7 +930,6 @@ class UsersController extends Controller
|
||||
$user = User::find($userId);
|
||||
$destinationPath = config('app.private_uploads').'/users';
|
||||
|
||||
// the license is valid
|
||||
if (isset($user->id)) {
|
||||
$this->authorize('update', $user);
|
||||
$log = Actionlog::find($fileId);
|
||||
|
||||
@@ -19,10 +19,12 @@ class Kernel extends HttpKernel
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\FrameGuard::class,
|
||||
\App\Http\Middleware\XssProtectHeader::class,
|
||||
\App\Http\Middleware\ReferrerPolicyHeader::class,
|
||||
\App\Http\Middleware\NosniffGuard::class,
|
||||
\App\Http\Middleware\CheckForSetup::class,
|
||||
\Fideloper\Proxy\TrustProxies::class,
|
||||
\App\Http\Middleware\CheckForDebug::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
|
||||
class ReferrerPolicyHeader
|
||||
{
|
||||
/**
|
||||
* Handle the given request and get the response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$response = $next($request);
|
||||
$response->headers->set('Referrer-Policy', config('app.referrer_policy'));
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,9 @@ class XssProtectHeader
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$mode = '1;mode=block';
|
||||
$response = $next($request);
|
||||
$response->headers->set('X-XSS-Protection', '1');
|
||||
$response->headers->set('X-XSS-Protection', $mode);
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,13 +59,30 @@ class AccessoriesTransformer
|
||||
}
|
||||
|
||||
|
||||
public function transformCheckedoutAccessories (Collection $accessories_users, $total)
|
||||
public function transformCheckedoutAccessory (Accessory $accessory, $total)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
$array = array();
|
||||
foreach ($accessories_users as $user) {
|
||||
$array[] = (new UsersTransformer)->transformUser($user);
|
||||
foreach ($accessory->users as $user) {
|
||||
$array[] = [
|
||||
'assigned_pivot_id' => $user->pivot->id,
|
||||
'id' => (int) $user->id,
|
||||
'username' => e($user->username),
|
||||
'name' => e($user->getFullNameAttribute()),
|
||||
'first_name'=> e($user->first_name),
|
||||
'last_name'=> e($user->last_name),
|
||||
'employee_number' => e($user->employee_num),
|
||||
'type' => 'user',
|
||||
'available_actions' => ['checkin' => true]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (new DatatablesTransformer)->transformDatatables($array, $total);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,8 @@ class ActionlogsTransformer
|
||||
'type' => e($actionlog->targetType()),
|
||||
] : null,
|
||||
|
||||
'note' => e($actionlog->note),
|
||||
'note' => ($actionlog->note) ? e($actionlog->note): null,
|
||||
'signature_file' => ($actionlog->accept_signature) ? route('log.signature.view', ['filename' => $actionlog->accept_signature ]) : null,
|
||||
|
||||
|
||||
];
|
||||
|
||||
@@ -33,7 +33,8 @@ class AssetsTransformer
|
||||
'model_number' => ($asset->model) ? e($asset->model->model_number) : null,
|
||||
'status_label' => ($asset->assetstatus) ? [
|
||||
'id' => (int) $asset->assetstatus->id,
|
||||
'name'=> e($asset->assetstatus->name)
|
||||
'name'=> e($asset->assetstatus->name),
|
||||
'status_type' => e($asset->assetstatus->getStatuslabelType()),
|
||||
] : null,
|
||||
'category' => ($asset->model->category) ? [
|
||||
'id' => (int) $asset->model->category->id,
|
||||
@@ -75,8 +76,9 @@ class AssetsTransformer
|
||||
];
|
||||
|
||||
|
||||
if ($asset->model->fieldset) {
|
||||
if (($asset->model->fieldset) && (count($asset->model->fieldset->fields)> 0)) {
|
||||
$fields_array = array();
|
||||
|
||||
foreach ($asset->model->fieldset->fields as $field) {
|
||||
|
||||
if ($field->isFieldDecryptable($asset->{$field->convertUnicodeDbSlug()})) {
|
||||
|
||||
@@ -25,7 +25,7 @@ class CustomFieldsTransformer
|
||||
'name' => e($field->name),
|
||||
'db_column_name' => e($field->db_column_name()),
|
||||
'format' => e($field->format),
|
||||
'required' => $field->pivot->required,
|
||||
'required' => $field->pivot ? $field->pivot->required : false,
|
||||
'created_at' => Helper::getFormattedDateObject($field->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($field->updated_at, 'datetime'),
|
||||
];
|
||||
|
||||
@@ -23,7 +23,7 @@ class GroupsTransformer
|
||||
$array = [
|
||||
'id' => (int) $group->id,
|
||||
'name' => e($group->name),
|
||||
'permissions' => $group->permissions,
|
||||
'permissions' => json_decode($group->permissions),
|
||||
'users_count' => (int) $group->users_count,
|
||||
'created_at' => Helper::getFormattedDateObject($group->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($group->updated_at, 'datetime'),
|
||||
|
||||
@@ -33,8 +33,9 @@ class LicensesTransformer
|
||||
'depreciation' => ($license->depreciation) ? ['id' => (int) $license->depreciation->id,'name'=> e($license->depreciation->name)] : null,
|
||||
'notes' => e($license->notes),
|
||||
'expiration_date' => Helper::getFormattedDateObject($license->expiration_date, 'date'),
|
||||
'total_seats' => (int) $license->total_seats,
|
||||
'remaining_qty' => $license->remaincount(),
|
||||
'total_seats' => (int) $license->seats,
|
||||
'next_seat' => ($license->freeSeat()) ? (int) $license->freeSeat()->id : null,
|
||||
'remaining_qty' => (int) $license->remaincount(),
|
||||
'min_qty' => $license->remaincount(),
|
||||
'license_name' => e($license->license_name),
|
||||
'license_email' => e($license->license_email),
|
||||
|
||||
@@ -36,9 +36,11 @@ class LocationsTransformer
|
||||
'address' => e($location->address),
|
||||
'city' => e($location->city),
|
||||
'state' => e($location->state),
|
||||
'country' => e($location->country),
|
||||
'zip' => e($location->zip),
|
||||
'assets_checkedout' => $location->assets()->count(),
|
||||
'assets_default' => $location->assignedassets()->count(),
|
||||
'country' => e($location->country),
|
||||
|
||||
'created_at' => Helper::getFormattedDateObject($location->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($location->updated_at, 'datetime'),
|
||||
'parent' => ($location->parent) ? [
|
||||
|
||||
@@ -56,9 +56,10 @@ class UsersTransformer
|
||||
];
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
'update' => Gate::allows('update', User::class) ? true : false,
|
||||
'delete' => Gate::allows('delete', User::class) ? true : false,
|
||||
'clone' => Gate::allows('create', User::class) ? true : false,
|
||||
'update' => (Gate::allows('update', User::class) && ($user->deleted_at=='')) ? true : false,
|
||||
'delete' => (Gate::allows('delete', User::class) && ($user->deleted_at=='')) ? true : false,
|
||||
'clone' => (Gate::allows('create', User::class) && ($user->deleted_at=='')) ,
|
||||
'restore' => (Gate::allows('create', User::class) && ($user->deleted_at!='')) ? true : false,
|
||||
];
|
||||
|
||||
$array += $permissions_array;
|
||||
|
||||
@@ -63,7 +63,9 @@ class AssetImporter extends ItemImporter
|
||||
$this->item['image'] = $this->findCsvMatch($row, "image");
|
||||
$this->item['warranty_months'] = intval($this->findCsvMatch($row, "warranty"));
|
||||
$this->item['model_id'] = $this->createOrFetchAssetModel($row);
|
||||
if (!$this->item['status_id'] && !$editingAsset) {
|
||||
|
||||
// If no status ID is found
|
||||
if (!array_key_exists('status_id', $this->item) && !$editingAsset) {
|
||||
$this->log("No status field found, defaulting to first status.");
|
||||
$this->item['status_id'] = $this->defaultStatusLabelId;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,15 @@ abstract class Importer
|
||||
{
|
||||
$headerRow = $this->csv->fetchOne();
|
||||
$results = $this->normalizeInputArray($this->csv->fetchAssoc());
|
||||
$this->customFields = CustomField::All(['name']);
|
||||
|
||||
// Stolen From https://adamwathan.me/2016/07/14/customizing-keys-when-mapping-collections/
|
||||
// This 'inverts' the fields such that we have a collection of fields indexed by name.
|
||||
$cFs = CustomField::All();
|
||||
$this->customFields = $cFs->reduce(function ($nameLookup, $field) {
|
||||
$nameLookup[$field['name']] = $field;
|
||||
return $nameLookup;
|
||||
});
|
||||
|
||||
DB::transaction(function () use (&$results) {
|
||||
Model::unguard();
|
||||
$resultsCount = sizeof($results);
|
||||
@@ -161,8 +169,6 @@ abstract class Importer
|
||||
*/
|
||||
public function lookupCustomKey($key)
|
||||
{
|
||||
// dd($this->fieldMap);
|
||||
|
||||
if (array_key_exists($key, $this->fieldMap)) {
|
||||
$this->log("Found a match in our custom map: {$key} is " . $this->fieldMap[$key]);
|
||||
return $this->fieldMap[$key];
|
||||
|
||||
@@ -10,6 +10,7 @@ use App\Models\Location;
|
||||
use App\Models\Manufacturer;
|
||||
use App\Models\Statuslabel;
|
||||
use App\Models\Supplier;
|
||||
use App\Models\User;
|
||||
|
||||
class ItemImporter extends Importer
|
||||
{
|
||||
@@ -68,6 +69,7 @@ class ItemImporter extends Importer
|
||||
if(get_class($this) !== UserImporter::class) {
|
||||
if ($this->item["user"] = $this->createOrFetchUser($row)) {
|
||||
$this->item['assigned_to'] = $this->item['user']->id;
|
||||
$this->item['assigned_type'] = User::class;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ class Accessory extends SnipeModel
|
||||
'purchase_date',
|
||||
'model_number',
|
||||
'manufacturer_id',
|
||||
'notes',
|
||||
'qty',
|
||||
'requestable'
|
||||
];
|
||||
|
||||
+30
-28
@@ -79,6 +79,7 @@ class Asset extends Depreciable
|
||||
protected $fillable = [
|
||||
'asset_tag',
|
||||
'assigned_to',
|
||||
'assigned_type',
|
||||
'company_id',
|
||||
'image',
|
||||
'model_id',
|
||||
@@ -253,18 +254,20 @@ class Asset extends Depreciable
|
||||
public function assetLoc()
|
||||
{
|
||||
if (!empty($this->assignedType())) {
|
||||
// dd($this->assignedType());
|
||||
if ($this->assignedType() == self::ASSET) {
|
||||
return $this->assignedTo->assetloc(); // Recurse until we have a final location
|
||||
return $this->assignedto->assetloc(); // Recurse until we have a final location
|
||||
}
|
||||
if ($this->assignedType() == self::LOCATION) {
|
||||
return $this->assignedTo();
|
||||
}
|
||||
if ($this->assignedType() == self::USER) {
|
||||
if (!$this->assignedTo) {
|
||||
return $this->defaultLoc();
|
||||
}
|
||||
return $this->assignedTo->userLoc();
|
||||
}
|
||||
if (!$this->assignedTo) {
|
||||
return $this->defaultLoc();
|
||||
}
|
||||
|
||||
}
|
||||
return $this->defaultLoc();
|
||||
}
|
||||
@@ -722,7 +725,8 @@ class Asset extends Depreciable
|
||||
|
||||
|
||||
/**
|
||||
* Query builder scope to search on text for complex Bootstrap Tables API
|
||||
* Query builder scope to search on text for complex Bootstrap Tables API.
|
||||
* This is really horrible, but I can't think of a less-awful way to do it.
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query Query builder instance
|
||||
* @param text $search Search term
|
||||
@@ -733,7 +737,16 @@ class Asset extends Depreciable
|
||||
{
|
||||
$search = explode(' OR ', $search);
|
||||
|
||||
return $query->where(function ($query) use ($search) {
|
||||
return $query->leftJoin('users',function ($leftJoin) {
|
||||
$leftJoin->on("users.id", "=", "assets.assigned_to")
|
||||
->where("assets.assigned_type", "=", User::class);
|
||||
})->leftJoin('locations',function ($leftJoin) {
|
||||
$leftJoin->on("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) {
|
||||
@@ -766,26 +779,15 @@ class Asset extends Depreciable
|
||||
$query->whereHas('defaultLoc', function ($query) use ($search) {
|
||||
$query->where('locations.name', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
//FIXME: This needs attention to work with checkout to not-users.
|
||||
// })->orWhere(function ($query) use ($search) {
|
||||
// $query->whereHas('assignedTo', function ($query) use ($search) {
|
||||
// $query->where(function ($query) use ($search) {
|
||||
// $query->where('assets.assigned_type', '=', User::class)
|
||||
// ->join('users', 'users.id', '=', 'assets.assigned_to')
|
||||
// ->where(function($query) use ($search) {
|
||||
// $query->where('users.first_name', 'LIKE', '%'.$search.'%')
|
||||
// ->orWhere('users.last_name', 'LIKE', '%'.$search.'%');
|
||||
// });
|
||||
// })->orWhere(function ($query) use ($search) {
|
||||
// $query->where('assets.assigned_type', '=', Location::class)
|
||||
// ->join('locations', 'locations.id', '=', 'assets.assigned_to')
|
||||
// ->where('locations.name', 'LIKE', '%'.$search.'%');
|
||||
// })->orWhere(function ($query) use ($search) {
|
||||
// $query->where('assets.assigned_type', '=', Asset::class)
|
||||
// ->join('assets as assigned_asset', 'assigned_assets.id', '=', 'assets.assigned_to')
|
||||
// ->where('assigned_assets.name', 'LIKE', '%'.$search.'%');
|
||||
// });
|
||||
// });
|
||||
})->orWhere(function ($query) use ($search) {
|
||||
|
||||
$query->whereHas('assignedTo', 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.'%')
|
||||
->orWhere('assigned_assets.name', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
})->orWhere('assets.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets.asset_tag', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets.serial', 'LIKE', '%'.$search.'%')
|
||||
@@ -793,9 +795,9 @@ class Asset extends Depreciable
|
||||
->orWhere('assets.notes', 'LIKE', '%'.$search.'%');
|
||||
}
|
||||
foreach (CustomField::all() as $field) {
|
||||
$query->orWhere($field->db_column_name(), 'LIKE', "%$search%");
|
||||
$query->orWhere('assets.'.$field->db_column_name(), 'LIKE', "%$search%");
|
||||
}
|
||||
});
|
||||
})->withTrashed()->whereNull("assets.deleted_at"); //workaround for laravel bug
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class AssetModel extends SnipeModel
|
||||
// Declare the rules for the model validation
|
||||
protected $rules = array(
|
||||
'name' => 'required|min:1|max:255',
|
||||
'model_number' => 'min:1|max:255',
|
||||
'model_number' => 'max:255|nullable',
|
||||
'category_id' => 'required|integer|exists:categories,id',
|
||||
'manufacturer_id' => 'required|integer|exists:manufacturers,id',
|
||||
'eol' => 'integer:min:0|max:240|nullable',
|
||||
|
||||
@@ -53,6 +53,7 @@ class Component extends SnipeModel
|
||||
'name',
|
||||
'purchase_cost',
|
||||
'purchase_date',
|
||||
'min_amt',
|
||||
'qty',
|
||||
];
|
||||
|
||||
|
||||
@@ -47,9 +47,7 @@ class CustomFieldset extends Model
|
||||
|
||||
if (($field->field_encrypted!='1') ||
|
||||
(($field->field_encrypted =='1') && (Gate::allows('admin')) )) {
|
||||
if ($field->pivot->required) {
|
||||
$rule[]="required";
|
||||
}
|
||||
$rule[] = ($field->pivot->required=='1') ? "required" : "nullable";
|
||||
}
|
||||
|
||||
array_push($rule, $field->attributes['format']);
|
||||
|
||||
@@ -48,6 +48,7 @@ class Ldap extends Model
|
||||
// Needed for AD
|
||||
ldap_set_option($connection, LDAP_OPT_REFERRALS, 0);
|
||||
ldap_set_option($connection, LDAP_OPT_PROTOCOL_VERSION, $ldap_version);
|
||||
ldap_set_option($connection, LDAP_OPT_NETWORK_TIMEOUT, 20);
|
||||
|
||||
if ($ldap_use_tls=='1') {
|
||||
ldap_start_tls($connection);
|
||||
|
||||
@@ -31,10 +31,10 @@ class License extends Depreciable
|
||||
protected $rules = array(
|
||||
'name' => 'required|string|min:3|max:255',
|
||||
'seats' => 'required|min:1|max:1000000|integer',
|
||||
'license_email' => 'email|min:0|max:120',
|
||||
'license_name' => 'string|min:0|max:100',
|
||||
'note' => 'string',
|
||||
'notes' => 'string|min:0',
|
||||
'license_email' => 'email|nullable|max:120',
|
||||
'license_name' => 'string|nullable|max:100',
|
||||
'note' => 'string|nullable',
|
||||
'notes' => 'string|nullable',
|
||||
'company_id' => 'integer|nullable',
|
||||
);
|
||||
|
||||
@@ -332,14 +332,17 @@ class License extends Depreciable
|
||||
return $this->belongsTo('\App\Models\Supplier', 'supplier_id');
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the next available free seat - used by
|
||||
* the API to populate next_seat
|
||||
*/
|
||||
public function freeSeat()
|
||||
{
|
||||
$seat = LicenseSeat::where('license_id', '=', $this->id)
|
||||
return $this->licenseseats()
|
||||
->whereNull('deleted_at')
|
||||
->whereNull('assigned_to')
|
||||
->whereNull('asset_id')
|
||||
->first();
|
||||
return $seat->id;
|
||||
}
|
||||
|
||||
public static function getExpiringLicenses($days = 60)
|
||||
|
||||
@@ -43,20 +43,23 @@ trait Loggable
|
||||
$log->target_type = get_class($target);
|
||||
$log->target_id = $target->id;
|
||||
|
||||
$class = get_class($target);
|
||||
if ($class == Location::class) {
|
||||
$target_class = get_class($target);
|
||||
|
||||
// Figure out what the target is
|
||||
if ($target_class == Location::class) {
|
||||
// We can checkout to a location
|
||||
$log->location_id = $target->id;
|
||||
} else if ($class== Asset::class) {
|
||||
} elseif ($target_class== Asset::class) {
|
||||
$log->location_id = $target->rtd_location_id;
|
||||
} else {
|
||||
$log->location_id = $target->location_id;
|
||||
}
|
||||
|
||||
$log->note = $note;
|
||||
$log->logaction('checkout');
|
||||
|
||||
$params = [
|
||||
'item' => $this,
|
||||
'item' => $log->item,
|
||||
'target' => $target,
|
||||
'admin' => $log->user,
|
||||
'note' => $note,
|
||||
|
||||
@@ -77,13 +77,28 @@ class SnipeModel extends Model
|
||||
return;
|
||||
}
|
||||
|
||||
public function setMinAmtAttribute($value)
|
||||
{
|
||||
if ($value == '') {
|
||||
$value = null;
|
||||
}
|
||||
$this->attributes['min_amt'] = $value;
|
||||
return;
|
||||
}
|
||||
|
||||
public function setParentIdAttribute($value)
|
||||
{
|
||||
if ($value == '') {
|
||||
$value = null;
|
||||
}
|
||||
$this->attributes['parent_id'] = $value;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
public function getDisplayNameAttribute()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function name() {
|
||||
return $this->name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,9 @@ class CheckoutNotification extends Notification
|
||||
}
|
||||
$item = $this->params['item'];
|
||||
|
||||
$notifyBy[]='mail';
|
||||
if (class_basename(get_class($this->params['item']))!='License') {
|
||||
$notifyBy[] = 'mail';
|
||||
}
|
||||
// if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance()=='1'))
|
||||
// || (method_exists($item, 'getEula') && ($item->getEula()))
|
||||
// ) {
|
||||
@@ -81,30 +83,31 @@ class CheckoutNotification extends Notification
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
//TODO: Expand for non assets.
|
||||
$item = $this->params['item'];
|
||||
$admin_user = $this->params['admin'];
|
||||
$target = $this->params['target'];
|
||||
$data = [
|
||||
'eula' => method_exists($item, 'getEula') ? $item->getEula() : '',
|
||||
'first_name' => $target->present()->fullName(),
|
||||
'item_name' => $item->present()->name(),
|
||||
'checkout_date' => $item->last_checkout,
|
||||
'expected_checkin' => $item->expected_checkin,
|
||||
'item_tag' => $item->asset_tag,
|
||||
'note' => $this->params['note'],
|
||||
'item_serial' => $item->serial,
|
||||
'require_acceptance' => $item->requireAcceptance(),
|
||||
'log_id' => $this->params['log_id'],
|
||||
];
|
||||
return (new MailMessage)
|
||||
->view('emails.accept-asset', $data)
|
||||
->subject(trans('mail.Confirm_asset_delivery'));
|
||||
// \Mail::send('emails.accept-asset', $data, function ($m) use ($target) {
|
||||
// $m->to($target->email, $target->first_name . ' ' . $target->last_name);
|
||||
// $m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
// $m->subject(trans('mail.Confirm_asset_delivery'));
|
||||
// });
|
||||
|
||||
//TODO: Expand for non assets.
|
||||
$item = $this->params['item'];
|
||||
$admin_user = $this->params['admin'];
|
||||
$target = $this->params['target'];
|
||||
$data = [
|
||||
'eula' => method_exists($item, 'getEula') ? $item->getEula() : '',
|
||||
'first_name' => $target->present()->fullName(),
|
||||
'item_name' => $item->present()->name(),
|
||||
'checkout_date' => $item->last_checkout,
|
||||
'expected_checkin' => $item->expected_checkin,
|
||||
'item_tag' => $item->asset_tag,
|
||||
'note' => $this->params['note'],
|
||||
'item_serial' => $item->serial,
|
||||
'require_acceptance' => method_exists($item, 'requireAcceptance') ? $item->requireAcceptance() : '',
|
||||
'log_id' => $this->params['log_id'],
|
||||
];
|
||||
|
||||
return (new MailMessage)
|
||||
->view('emails.accept-asset', $data)
|
||||
->subject(trans('mail.Confirm_asset_delivery'));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -146,6 +146,16 @@ class LicensePresenter extends Presenter
|
||||
return (string)link_to_route('licenses.show', $this->name, $this->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to this licenses Name
|
||||
* @return string
|
||||
*/
|
||||
public function fullName()
|
||||
{
|
||||
return 'poop';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Link to this licenses serial
|
||||
* @return string
|
||||
|
||||
@@ -65,6 +65,11 @@ abstract class Presenter
|
||||
return '';
|
||||
}
|
||||
|
||||
public function name()
|
||||
{
|
||||
return $this->model->name;
|
||||
}
|
||||
|
||||
public function __get($property)
|
||||
{
|
||||
if (method_exists($this, $property)) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"css/AdminLTE.css","sources":[],"mappings":";;;;;;","sourceRoot":""}
|
||||
{"version":3,"file":"css/AdminLTE.css","sources":[],"mappings":";;;;;;A","sourceRoot":""}
|
||||
+3
-3
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"css/app.css","sources":[],"mappings":";;;;;;;;","sourceRoot":""}
|
||||
{"version":3,"file":"css/app.css","sources":[],"mappings":";;;;;;;;A","sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
+10
-21
@@ -1,23 +1,12 @@
|
||||
{
|
||||
"/build/vue.js": "/build/vue.js",
|
||||
"/mix.js": "/mix.js",
|
||||
"/build/app.css": "/build/app.535d8af1016a2377e449920c617f0197.css",
|
||||
"/build/AdminLTE.css": "/build/AdminLTE.3d8a2b2e33baa060b1b324363ad5e1c2.css",
|
||||
"/build/overrides.css": "/build/overrides.617623c6a96be3e0cbd11c5d4039ec10.css",
|
||||
"/css/all.css": "/css/all.css",
|
||||
"/js/all.js": "/js/all.js",
|
||||
"/css/app.css": "/css/app.css",
|
||||
"/css/dist/all.css": "/css/dist/all.css",
|
||||
"/js/dist/all.js": "/js/dist/all.js",
|
||||
"/css/AdminLTE.css": "/css/AdminLTE.css",
|
||||
"/css/overrides.css": "/css/overrides.css",
|
||||
"/css/skin-blue.css": "/css/skin-blue.css",
|
||||
"/vue.js": "/vue.js",
|
||||
"/vue.js.map": "/vue.js.map",
|
||||
"/mix.js.map": "/mix.js.map",
|
||||
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map",
|
||||
"/css/app.css.map": "/css/app.css.map",
|
||||
"/css/overrides.css.map": "/css/overrides.css.map",
|
||||
"public/css/dist/all.css": "public/css/dist/all.css",
|
||||
"public/js/dist/all.js": "public/js/dist/all.js"
|
||||
"/vue.js": "/vue.js",
|
||||
"/css/AdminLTE.css": "/css/AdminLTE.css",
|
||||
"/css/app.css": "/css/app.css",
|
||||
"/css/overrides.css": "/css/overrides.css",
|
||||
"/vue.js.map": "/vue.js.map",
|
||||
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map",
|
||||
"/css/app.css.map": "/css/app.css.map",
|
||||
"/css/overrides.css.map": "/css/overrides.css.map",
|
||||
"/public/css/dist/all.css": "/public/css/dist/all.css",
|
||||
"/public/js/dist/all.js": "/public/js/dist/all.js"
|
||||
}
|
||||
+1
-63
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -155,6 +155,21 @@ return [
|
||||
'allow_iframing' => env('ALLOW_IFRAMING', false),
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| REFERRER-POLICY
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is an additional security header that browsers use to determine
|
||||
| whether they should report back URL referrer information.
|
||||
|
|
||||
| Read more: https://www.w3.org/TR/referrer-policy/
|
||||
|
|
||||
*/
|
||||
|
||||
'referrer_policy' => env('REFERRER_POLICY', 'strict-origin'),
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Demo Mode Lockdown
|
||||
|
||||
+2
-2
@@ -65,8 +65,8 @@ return [
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||
'prefix' => env('DB_PREFIX', null),
|
||||
'strict' => false,
|
||||
'engine' => null,
|
||||
|
||||
@@ -22,6 +22,8 @@ return [
|
||||
base_path('public/uploads'),
|
||||
base_path('config'),
|
||||
base_path('storage/private_uploads'),
|
||||
base_path('storage/oauth-private.key'),
|
||||
base_path('storage/oauth-public.key'),
|
||||
],
|
||||
|
||||
/*
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v4',
|
||||
'build_version' => 'beta4',
|
||||
'hash_version' => '24',
|
||||
'full_hash' => 'v4-beta4-24-g10f3221',
|
||||
'app_version' => 'v4.0.6',
|
||||
'build_version' => '47',
|
||||
'hash_version' => 'g2e76620',
|
||||
'full_hash' => 'v4.0.6-47-g2e76620',
|
||||
);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
|
||||
$factory->define(App\Models\CustomField::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'name' => $faker->catchPhrase,
|
||||
'format' => 'IP',
|
||||
'element' => 'text',
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(App\Models\CustomFieldset::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'name' => $faker->catchPhrase,
|
||||
'user_id' => Auth::id()
|
||||
];
|
||||
});
|
||||
@@ -97,14 +97,6 @@ $factory->define(App\Models\Consumable::class, function (Faker\Generator $faker)
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(App\Models\CustomField::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'name' => $faker->catchPhrase,
|
||||
'format' => 'IP',
|
||||
'element' => 'text',
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(App\Models\Department::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'name' => $faker->catchPhrase,
|
||||
|
||||
@@ -12,10 +12,13 @@ class AddSoftDeletedToLog extends Migration {
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
|
||||
Schema::table('asset_logs', function ($table) {
|
||||
$table->string('asset_type',100)->nullable()->change();
|
||||
});
|
||||
|
||||
$platform = Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform();
|
||||
$platform->registerDoctrineTypeMapping('enum', 'string');
|
||||
|
||||
Schema::table('asset_logs', function ($table) {
|
||||
$table->string('asset_type',100)->nullable()->change();
|
||||
});
|
||||
|
||||
// DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'asset_logs MODIFY column asset_type varchar(100) null');
|
||||
// DB::statement('ALTER TABLE ' . DB::getTablePrefix() . 'asset_logs MODIFY column added_on timestamp default "0000-00-00 00:00:00"');
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Asset;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class FixAssignedTypeNotBeingNulled extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* There was a point in the v4 beta process where assigned_type was not nulled on checkin
|
||||
* This manually nulls all assets where there is an assigned_type but not an assigned_to.
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
// There was a point in the v4 beta process where assigned_type was not nulled on checkin
|
||||
// This manually nulls all assets where there is an assigned_type but not an assigned_to.
|
||||
Asset::whereNotNull('assigned_type')->whereNull('assigned_to')->update(['assigned_type' => null]);
|
||||
|
||||
// Additionally, the importer did not set assigned_type when importing.
|
||||
// In the case where we have an assigned_to but not an assigned_type, set the assigned_type to User.
|
||||
Asset::whereNotNull('assigned_to')->whereNull('assigned_type')->update(['assigned_type' => 'App\Models\User']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
+7
-5
@@ -10,14 +10,14 @@
|
||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^0.15.3",
|
||||
"axios": "^0.16.2",
|
||||
"babel-preset-latest": "^6.24.1",
|
||||
"cross-env": "^3.2.4",
|
||||
"cross-env": "^5.0.5",
|
||||
"jquery": "^3.1.1",
|
||||
"laravel-mix": "0.12.1",
|
||||
"laravel-mix": "1.4.3",
|
||||
"lodash": "^4.17.4",
|
||||
"vue": "2.3.3",
|
||||
"vue-template-compiler": "2.3.3"
|
||||
"vue": "2.4.4",
|
||||
"vue-template-compiler": "2.4.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"blueimp-file-upload": "^9.18.0",
|
||||
@@ -32,6 +32,8 @@
|
||||
"jquery-ui": "^1.12.1",
|
||||
"jquery-ui-bundle": "^1.12.1",
|
||||
"jquery.iframe-transport": "^1.0.0",
|
||||
"less": "^2.7.2",
|
||||
"less-loader": "^4.0.5",
|
||||
"papaparse": "^4.3.3",
|
||||
"select2": "^4.0.3",
|
||||
"tether": "^1.4.0",
|
||||
|
||||
Vendored
+5
-7
File diff suppressed because one or more lines are too long
Vendored
+25
-25
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,2 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow:
|
||||
Disallow: /
|
||||
|
||||
@@ -67,7 +67,7 @@ tr {
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['file'],
|
||||
props: ['file', 'customFieldUrl', 'importProcessUrl'],
|
||||
data() {
|
||||
return {
|
||||
activeFile: this.file,
|
||||
@@ -130,20 +130,28 @@ tr {
|
||||
{id: 'jobtitle', text: 'Job Title' },
|
||||
{id: 'phone_number', text: 'Phone Number' },
|
||||
],
|
||||
customFields: [],
|
||||
},
|
||||
columnMappings: this.file.field_map || {},
|
||||
activeColumn: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchCustomFields();
|
||||
window.eventHub.$on('showDetails', this.toggleExtendedDisplay)
|
||||
this.populateSelect2ActiveItems();
|
||||
},
|
||||
computed: {
|
||||
processUrl() {
|
||||
// Because we need to pass a parameter to the laravel route function
|
||||
// We get a url 'http://localhost/api/v1/imports/process/DUMMYTEXT'
|
||||
// But we want to customize that to /api/v1/imports/process/this_file
|
||||
return this.importProcessUrl.replace('DUMMYTEXT', this.file.id)
|
||||
},
|
||||
columns() {
|
||||
switch(this.options.importType) {
|
||||
case 'asset':
|
||||
return this.columnOptions.general.concat(this.columnOptions.assets);
|
||||
return this.columnOptions.general.concat(this.columnOptions.assets).concat(this.columnOptions.customFields);
|
||||
case 'license':
|
||||
return this.columnOptions.general.concat(this.columnOptions.licenses);
|
||||
case 'user':
|
||||
@@ -153,24 +161,36 @@ tr {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fetchCustomFields() {
|
||||
this.$http.get(this.customFieldUrl)
|
||||
.then( ({data}) => {
|
||||
data = data.rows;
|
||||
data.forEach((item) => {
|
||||
this.columnOptions.customFields.push({
|
||||
'id': item.db_column_name,
|
||||
'text': item.name,
|
||||
})
|
||||
})
|
||||
});
|
||||
},
|
||||
postSave() {
|
||||
this.statusText = "Processing...";
|
||||
this.$http.post('/api/v1/imports/process/'+this.file.id, {
|
||||
this.$http.post(this.processUrl, {
|
||||
'import-update': this.options.update,
|
||||
'import-type': this.options.importType,
|
||||
'column-mappings': this.columnMappings
|
||||
}).then( (response) => {
|
||||
}).then( ({body}) => {
|
||||
// Success
|
||||
this.statusText = "Success... Redirecting.";
|
||||
window.location.href = response.body.messages.redirect_url;
|
||||
}, (response) => {
|
||||
window.location.href = body.messages.redirect_url;
|
||||
}, ({body}) => {
|
||||
// Failure
|
||||
if(response.body.status == 'import-errors') {
|
||||
window.eventHub.$emit('importErrors', response.body.messages);
|
||||
if(body.status == 'import-errors') {
|
||||
window.eventHub.$emit('importErrors', body.messages);
|
||||
this.statusText = "Error";
|
||||
} else {
|
||||
this.$emit('alert', {
|
||||
message: response.body.messages,
|
||||
message: body.messages,
|
||||
type: "danger",
|
||||
visible: true,
|
||||
})
|
||||
@@ -208,4 +228,4 @@ tr {
|
||||
select2: require('../select2.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -11,6 +11,8 @@ th {
|
||||
<script>
|
||||
require('blueimp-file-upload');
|
||||
export default {
|
||||
|
||||
props: ['importUrl'],
|
||||
/*
|
||||
* The component's data.
|
||||
*/
|
||||
@@ -72,7 +74,7 @@ th {
|
||||
|
||||
methods: {
|
||||
fetchFiles() {
|
||||
this.$http.get('/api/v1/imports')
|
||||
this.$http.get(this.importUrl)
|
||||
.then( ({data}) => this.files = data, // Success
|
||||
//Fail
|
||||
(response) => {
|
||||
@@ -82,7 +84,7 @@ th {
|
||||
});
|
||||
},
|
||||
deleteFile(file, key) {
|
||||
this.$http.delete("/api/v1/imports/"+file.id)
|
||||
this.$http.delete(this.importUrl+"/"+file.id)
|
||||
.then((response) => this.files.splice(key, 1), // Success, remove file from array.
|
||||
(response) => {// Fail
|
||||
this.alert.type="danger";
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
'success' => 'Asset Maintenance created successfully.'
|
||||
],
|
||||
'edit' => [
|
||||
'error' => 'Asset Maintenance was not created, please try again.',
|
||||
'success' => 'Asset Maintenance created successfully.'
|
||||
'error' => 'Asset Maintenance was not edited, please try again.',
|
||||
'success' => 'Asset Maintenance edited successfully.'
|
||||
],
|
||||
'asset_maintenance_incomplete' => 'Not Completed Yet',
|
||||
'warranty' => 'Warranty',
|
||||
|
||||
@@ -7,7 +7,7 @@ return array(
|
||||
'asset' => 'Asset',
|
||||
'bulk_checkout' => 'Checkout Assets to User',
|
||||
'checkin' => 'Checkin Asset',
|
||||
'checkout' => 'Checkout Asset to User',
|
||||
'checkout' => 'Checkout Asset',
|
||||
'clone' => 'Clone Asset',
|
||||
'deployable' => 'Deployable',
|
||||
'deleted' => 'This asset has been deleted. <a href="/hardware/:asset_id/restore">Click here to restore it</a>.',
|
||||
|
||||
@@ -24,6 +24,12 @@ return array(
|
||||
'success' => 'Asset restored successfully.'
|
||||
),
|
||||
|
||||
'audit' => array(
|
||||
'error' => 'Asset audit was unsuccessful. Please try again.',
|
||||
'success' => 'Asset audit successfully logged.'
|
||||
),
|
||||
|
||||
|
||||
'deletefile' => array(
|
||||
'error' => 'File not deleted. Please try again.',
|
||||
'success' => 'File successfully deleted.',
|
||||
|
||||
@@ -10,6 +10,10 @@ return array(
|
||||
'alert_interval' => 'Expiring Alerts Threshold (in days)',
|
||||
'alert_inv_threshold' => 'Inventory Alert Threshold',
|
||||
'asset_ids' => 'Asset IDs',
|
||||
'audit_interval' => 'Audit Interval',
|
||||
'audit_interval_help' => 'If you are required to regularly physically audit your assets, enter the interval in months.',
|
||||
'audit_warning_days' => 'Audit Warning Threshold',
|
||||
'audit_warning_days_help' => 'How many days in advance should we warn you when assets are due for auditing?',
|
||||
'auto_increment_assets' => 'Generate auto-incrementing asset IDs',
|
||||
'auto_increment_prefix' => 'Prefix (optional)',
|
||||
'auto_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this',
|
||||
|
||||
@@ -13,6 +13,7 @@ return array(
|
||||
'filetype_info' => 'Allowed filetypes are png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, and rar.',
|
||||
'history_user' => 'History for :name',
|
||||
'info' => 'Info',
|
||||
'restore_user' => 'Click here to restore them.',
|
||||
'last_login' => 'Last Login',
|
||||
'ldap_config_text' => 'LDAP configuration settings can be found Admin > Settings. The (optional) selected location will be set for all imported users.',
|
||||
'software_user' => 'Software Checked out to :name',
|
||||
|
||||
@@ -18,11 +18,15 @@
|
||||
'asset_report' => 'Asset Report',
|
||||
'asset_tag' => 'Asset Tag',
|
||||
'assets_available' => 'assets available',
|
||||
'audit' => 'Audit',
|
||||
'audit_report' => 'Audit Log',
|
||||
'assets' => 'Assets',
|
||||
'avatar_delete' => 'Delete Avatar',
|
||||
'avatar_upload' => 'Upload Avatar',
|
||||
'back' => 'Back',
|
||||
'bad_data' => 'Nothing found. Maybe bad data?',
|
||||
'bulkaudit' => 'Bulk Audit',
|
||||
'bulkaudit_status' => 'Audit Status',
|
||||
'bulk_checkout' => 'Bulk Checkout',
|
||||
'cancel' => 'Cancel',
|
||||
'categories' => 'Categories',
|
||||
@@ -52,6 +56,8 @@
|
||||
'current' => 'Current',
|
||||
'custom_report' => 'Custom Asset Report',
|
||||
'dashboard' => 'Dashboard',
|
||||
'days' => 'days',
|
||||
'days_to_next_audit' => 'Days to Next Audit',
|
||||
'date' => 'Date',
|
||||
'debug_warning' => 'Warning!',
|
||||
'debug_warning_text' => 'This application is running in production mode with debugging enabled. This can expose sensitive data if your application is accessible to the outside world. Disable debug mode by setting the <code>APP_DEBUG</code> value in your <code>.env</code> file to <code>false</code>.',
|
||||
@@ -117,6 +123,8 @@
|
||||
'moreinfo' => 'More Info',
|
||||
'name' => 'Name',
|
||||
'next' => 'Next',
|
||||
'next_audit_date' => 'Next Audit Date',
|
||||
'last_audit' => 'Last Audit',
|
||||
'new' => 'new!',
|
||||
'no_depreciation' => 'No Depreciation',
|
||||
'no_results' => 'No Results.',
|
||||
|
||||
@@ -13,62 +13,91 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
"accepted" => "The :attribute must be accepted.",
|
||||
"active_url" => "The :attribute is not a valid URL.",
|
||||
"after" => "The :attribute must be a date after :date.",
|
||||
"alpha" => "The :attribute may only contain letters.",
|
||||
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
|
||||
"alpha_num" => "The :attribute may only contain letters and numbers.",
|
||||
"before" => "The :attribute must be a date before :date.",
|
||||
"between" => array(
|
||||
"numeric" => "The :attribute must be between :min - :max.",
|
||||
"file" => "The :attribute must be between :min - :max kilobytes.",
|
||||
"string" => "The :attribute must be between :min - :max characters.",
|
||||
),
|
||||
"boolean" => "The :attribute must be true or false.",
|
||||
"confirmed" => "The :attribute confirmation does not match.",
|
||||
"date" => "The :attribute is not a valid date.",
|
||||
"date_format" => "The :attribute does not match the format :format.",
|
||||
"different" => "The :attribute and :other must be different.",
|
||||
"digits" => "The :attribute must be :digits digits.",
|
||||
"digits_between" => "The :attribute must be between :min and :max digits.",
|
||||
"email" => "The :attribute format is invalid.",
|
||||
"exists" => "The selected :attribute is invalid.",
|
||||
"email_array" => "One or more email addresses is invalid.",
|
||||
"hashed_pass" => "Your current password is incorrect",
|
||||
'dumbpwd' => 'That password is too common.',
|
||||
"image" => "The :attribute must be an image.",
|
||||
"in" => "The selected :attribute is invalid.",
|
||||
"integer" => "The :attribute must be an integer.",
|
||||
"ip" => "The :attribute must be a valid IP address.",
|
||||
"max" => array(
|
||||
"numeric" => "The :attribute may not be greater than :max.",
|
||||
"file" => "The :attribute may not be greater than :max kilobytes.",
|
||||
"string" => "The :attribute may not be greater than :max characters.",
|
||||
),
|
||||
"mimes" => "The :attribute must be a file of type: :values.",
|
||||
"min" => array(
|
||||
"numeric" => "The :attribute must be at least :min.",
|
||||
"file" => "The :attribute must be at least :min kilobytes.",
|
||||
"string" => "The :attribute must be at least :min characters.",
|
||||
),
|
||||
"not_in" => "The selected :attribute is invalid.",
|
||||
"numeric" => "The :attribute must be a number.",
|
||||
"regex" => "The :attribute format is invalid.",
|
||||
"required" => "The :attribute field is required.",
|
||||
"required_if" => "The :attribute field is required when :other is :value.",
|
||||
"required_with" => "The :attribute field is required when :values is present.",
|
||||
"required_without" => "The :attribute field is required when :values is not present.",
|
||||
"same" => "The :attribute and :other must match.",
|
||||
"size" => array(
|
||||
"numeric" => "The :attribute must be :size.",
|
||||
"file" => "The :attribute must be :size kilobytes.",
|
||||
"string" => "The :attribute must be :size characters.",
|
||||
),
|
||||
"unique" => "The :attribute has already been taken.",
|
||||
"url" => "The :attribute format is invalid.",
|
||||
"statuslabel_type" => "You must select a valid status label type",
|
||||
"unique_undeleted" => "The :attribute must be unique.",
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
|
||||
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||
'array' => 'The :attribute must be an array.',
|
||||
'before' => 'The :attribute must be a date before :date.',
|
||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'numeric' => 'The :attribute must be between :min and :max.',
|
||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||
'string' => 'The :attribute must be between :min and :max characters.',
|
||||
'array' => 'The :attribute must have between :min and :max items.',
|
||||
],
|
||||
'boolean' => 'The :attribute field must be true or false.',
|
||||
'confirmed' => 'The :attribute confirmation does not match.',
|
||||
'date' => 'The :attribute is not a valid date.',
|
||||
'date_format' => 'The :attribute does not match the format :format.',
|
||||
'different' => 'The :attribute and :other must be different.',
|
||||
'digits' => 'The :attribute must be :digits digits.',
|
||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||
'distinct' => 'The :attribute field has a duplicate value.',
|
||||
'email' => 'The :attribute must be a valid email address.',
|
||||
'exists' => 'The selected :attribute is invalid.',
|
||||
'file' => 'The :attribute must be a file.',
|
||||
'filled' => 'The :attribute field must have a value.',
|
||||
'image' => 'The :attribute must be an image.',
|
||||
'in' => 'The selected :attribute is invalid.',
|
||||
'in_array' => 'The :attribute field does not exist in :other.',
|
||||
'integer' => 'The :attribute must be an integer.',
|
||||
'ip' => 'The :attribute must be a valid IP address.',
|
||||
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||
'json' => 'The :attribute must be a valid JSON string.',
|
||||
'max' => [
|
||||
'numeric' => 'The :attribute may not be greater than :max.',
|
||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||
'string' => 'The :attribute may not be greater than :max characters.',
|
||||
'array' => 'The :attribute may not have more than :max items.',
|
||||
],
|
||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||
'min' => [
|
||||
'numeric' => 'The :attribute must be at least :min.',
|
||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||
'string' => 'The :attribute must be at least :min characters.',
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
],
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => 'The :attribute field is required when :values is present.',
|
||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => 'The :attribute and :other must match.',
|
||||
'size' => [
|
||||
'numeric' => 'The :attribute must be :size.',
|
||||
'file' => 'The :attribute must be :size kilobytes.',
|
||||
'string' => 'The :attribute must be :size characters.',
|
||||
'array' => 'The :attribute must contain :size items.',
|
||||
],
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid zone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => 'The :attribute format is invalid.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
@@ -82,8 +111,14 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => array(),
|
||||
'alpha_space' => "The :attribute field contains a character that is not allowed.",
|
||||
'custom' => [
|
||||
'alpha_space' => "The :attribute field contains a character that is not allowed.",
|
||||
"email_array" => "One or more email addresses is invalid.",
|
||||
"hashed_pass" => "Your current password is incorrect",
|
||||
'dumbpwd' => 'That password is too common.',
|
||||
"statuslabel_type" => "You must select a valid status label type",
|
||||
"unique_undeleted" => "The :attribute must be unique.",
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -96,6 +131,6 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => array(),
|
||||
'attributes' => [],
|
||||
|
||||
);
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
'success' => 'تم إنشاء سند صيانة الأصل بنجاح.'
|
||||
],
|
||||
'edit' => [
|
||||
'error' => 'Asset Maintenance was not created, please try again.',
|
||||
'success' => 'Asset Maintenance created successfully.'
|
||||
'error' => 'Asset Maintenance was not edited, please try again.',
|
||||
'success' => 'Asset Maintenance edited successfully.'
|
||||
],
|
||||
'asset_maintenance_incomplete' => 'لم يكتمل بعد',
|
||||
'warranty' => 'الضمان',
|
||||
|
||||
@@ -28,7 +28,7 @@ return array(
|
||||
|
||||
'fieldset' => array(
|
||||
|
||||
'does_not_exist' => 'Fieldset does not exist',
|
||||
'does_not_exist' => 'مجموعة الحقول غير موجودة',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'لم يتم إنشاء مجموعة-الحقول، الرجاء المحاولة مرة اخرى.',
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Department does not exist.',
|
||||
'assoc_users' => 'This department is currently associated with at least one user and cannot be deleted. Please update your users to no longer reference this department and try again. ',
|
||||
'does_not_exist' => 'القسم الاداري غير موجود.',
|
||||
'assoc_users' => 'هذا القسم الإداري مرتبط حاليا مع مستخدم واحد على الأقل ولا يمكن حذفه. الرجاء تحديث تفاصيل المستخدمين حيث لا تحتوي هذا القسم وحاول مرة أخرى. ',
|
||||
'create' => array(
|
||||
'error' => 'Department was not created, please try again.',
|
||||
'success' => 'Department created successfully.'
|
||||
'error' => 'لم يتم إنشاء القسم الإداري، الرجاء المحاولة مرة أخرى.',
|
||||
'success' => 'تم انشاء القسم الاداري بنجاح.'
|
||||
),
|
||||
'update' => array(
|
||||
'error' => 'Department was not updated, please try again',
|
||||
'success' => 'Department updated successfully.'
|
||||
'error' => 'لم يتم تحديث القسم الإداري، الرجاء المحاولة مرة أخرى',
|
||||
'success' => 'تم تحديث القسم الاداري بنجاح.'
|
||||
),
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this department?',
|
||||
'error' => 'There was an issue deleting the department. Please try again.',
|
||||
'success' => 'The department was deleted successfully.'
|
||||
'confirm' => 'هل أنت متأكد من رغبتك في حذف هذا القسم؟',
|
||||
'error' => 'حدثت مشكلة اثناء عملية حذف القسم الاداري. الرجاء المحاولة مرة اُخرى.',
|
||||
'success' => 'تم حذف القسم الاداري بنجاح.'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
return array(
|
||||
|
||||
'id' => 'ID',
|
||||
'name' => 'Department Name',
|
||||
'manager' => 'Manager',
|
||||
'location' => 'Location',
|
||||
'create' => 'Create Department',
|
||||
'update' => 'Update Department',
|
||||
'id' => 'رقم التعريف',
|
||||
'name' => 'اسم القسم الإداري',
|
||||
'manager' => 'المدير',
|
||||
'location' => 'الموقع',
|
||||
'create' => 'إنشاء قسم اداري',
|
||||
'update' => 'تحديث قسم اداري',
|
||||
);
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
return array(
|
||||
'bulk_delete' => 'تاكيد إجراء حذف متعدد للاُصول',
|
||||
'bulk_delete_help' => 'Review the assets for bulk deletion below. Once deleted, these assets can be restored, but they will no longer be associated with any users they are currently assigned to.',
|
||||
'bulk_delete_warn' => 'You are about to delete :asset_count assets.',
|
||||
'bulk_update' => 'Bulk Update Assets',
|
||||
'bulk_delete_help' => 'الرجاء مراجعة الأصول المعينة للحذف بالجملة أدناه. بمجرد الحذف، يمكن استعادة هذه الأصول، لكنها لن تكون مقترنة مع أي من المستخدمين اللذين تم تعيين الاصول لهم من قبل.',
|
||||
'bulk_delete_warn' => 'أنت على وشك حذف اصول asset_count: .',
|
||||
'bulk_update' => 'تحديث الاصول بالجملة',
|
||||
'bulk_update_help' => 'This form allows you to update multiple assets at once. Only fill in the fields you need to change. Any fields left blank will remain unchanged. ',
|
||||
'bulk_update_warn' => 'You are about to edit the properties of :asset_count assets.',
|
||||
'checkedout_to' => 'Checked Out To',
|
||||
|
||||
@@ -7,7 +7,7 @@ return array(
|
||||
'asset' => 'أصل',
|
||||
'bulk_checkout' => 'Checkout Assets to User',
|
||||
'checkin' => 'Checkin Asset',
|
||||
'checkout' => 'Checkout Asset to User',
|
||||
'checkout' => 'Checkout Asset',
|
||||
'clone' => 'استنساخ الأصل',
|
||||
'deployable' => 'قابل للنشر',
|
||||
'deleted' => 'This asset has been deleted. <a href="/hardware/:asset_id/restore">Click here to restore it</a>.',
|
||||
|
||||
@@ -24,6 +24,12 @@ return array(
|
||||
'success' => 'Asset restored successfully.'
|
||||
),
|
||||
|
||||
'audit' => array(
|
||||
'error' => 'Asset audit was unsuccessful. Please try again.',
|
||||
'success' => 'Asset audit successfully logged.'
|
||||
),
|
||||
|
||||
|
||||
'deletefile' => array(
|
||||
'error' => 'لم يتم حذف الملف. الرجاء المحاولة مرة اخرى.',
|
||||
'success' => 'تم حذف الملف بنجاح.',
|
||||
|
||||
@@ -10,6 +10,10 @@ return array(
|
||||
'alert_interval' => 'Expiring Alerts Threshold (in days)',
|
||||
'alert_inv_threshold' => 'Inventory Alert Threshold',
|
||||
'asset_ids' => 'Asset IDs',
|
||||
'audit_interval' => 'Audit Interval',
|
||||
'audit_interval_help' => 'If you are required to regularly physically audit your assets, enter the interval in months.',
|
||||
'audit_warning_days' => 'Audit Warning Threshold',
|
||||
'audit_warning_days_help' => 'How many days in advance should we warn you when assets are due for auditing?',
|
||||
'auto_increment_assets' => 'Generate auto-incrementing asset IDs',
|
||||
'auto_increment_prefix' => 'البادئة (اختياري)',
|
||||
'auto_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this',
|
||||
|
||||
@@ -13,6 +13,7 @@ return array(
|
||||
'filetype_info' => 'انواع صيغ الملفات المسوح بها هي png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, and rar.',
|
||||
'history_user' => 'الأرشيف الخاص بـ :name',
|
||||
'info' => 'Info',
|
||||
'restore_user' => 'Click here to restore them.',
|
||||
'last_login' => 'آخر دخول للمستخدم',
|
||||
'ldap_config_text' => 'LDAP configuration settings can be found Admin > Settings. The (optional) selected location will be set for all imported users.',
|
||||
'software_user' => 'البرامج المسجلة لـ :name',
|
||||
|
||||
@@ -18,11 +18,15 @@
|
||||
'asset_report' => 'Asset Report',
|
||||
'asset_tag' => 'وسم الأصول',
|
||||
'assets_available' => 'الأصول المتاحة',
|
||||
'audit' => 'Audit',
|
||||
'audit_report' => 'Audit Log',
|
||||
'assets' => 'الأصول',
|
||||
'avatar_delete' => 'حذف الصورة الرمزية',
|
||||
'avatar_upload' => 'رفع صورة رمزية',
|
||||
'back' => 'الرجوع للخلف',
|
||||
'bad_data' => 'Nothing found. Maybe bad data?',
|
||||
'bulkaudit' => 'Bulk Audit',
|
||||
'bulkaudit_status' => 'Audit Status',
|
||||
'bulk_checkout' => 'Bulk Checkout',
|
||||
'cancel' => 'إلغاء',
|
||||
'categories' => 'التصنيفات',
|
||||
@@ -52,6 +56,8 @@
|
||||
'current' => 'الحالي',
|
||||
'custom_report' => 'Custom Asset Report',
|
||||
'dashboard' => 'Dashboard',
|
||||
'days' => 'days',
|
||||
'days_to_next_audit' => 'Days to Next Audit',
|
||||
'date' => 'التاريخ',
|
||||
'debug_warning' => 'Warning!',
|
||||
'debug_warning_text' => 'This application is running in production mode with debugging enabled. This can expose sensitive data if your application is accessible to the outside world. Disable debug mode by setting the <code>APP_DEBUG</code> value in your <code>.env</code> file to <code>false</code>.',
|
||||
@@ -117,6 +123,8 @@
|
||||
'moreinfo' => 'المزيد من المعلومات',
|
||||
'name' => 'الإسم',
|
||||
'next' => 'Next',
|
||||
'next_audit_date' => 'Next Audit Date',
|
||||
'last_audit' => 'Last Audit',
|
||||
'new' => 'new!',
|
||||
'no_depreciation' => 'لا يوجد إستهلاك',
|
||||
'no_results' => 'لا يوجد نتائج.',
|
||||
|
||||
@@ -13,62 +13,91 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
"accepted" => ":attribute يجب ان يكون مقبولا.",
|
||||
"active_url" => ":attribute موقع غير صحيح.",
|
||||
"after" => ":attribute يجب ان يكون تاريخ قبل :date.",
|
||||
"alpha" => "The :attribute may only contain letters.",
|
||||
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
|
||||
"alpha_num" => "The :attribute may only contain letters and numbers.",
|
||||
"before" => ":attribute يجب ان يكون تاريخ قبل :date.",
|
||||
"between" => array(
|
||||
"numeric" => ":attribute يجب ان يكون بين :min - :max.",
|
||||
"file" => "The :attribute must be between :min - :max kilobytes.",
|
||||
"string" => "The :attribute must be between :min - :max characters.",
|
||||
),
|
||||
"boolean" => "The :attribute must be true or false.",
|
||||
"confirmed" => "The :attribute confirmation does not match.",
|
||||
"date" => ":attribute تاريخ غير صحيح.",
|
||||
"date_format" => "The :attribute does not match the format :format.",
|
||||
"different" => "The :attribute and :other must be different.",
|
||||
"digits" => "The :attribute must be :digits digits.",
|
||||
"digits_between" => "The :attribute must be between :min and :max digits.",
|
||||
"email" => "The :attribute format is invalid.",
|
||||
"exists" => "The selected :attribute is invalid.",
|
||||
"email_array" => "One or more email addresses is invalid.",
|
||||
"hashed_pass" => "Your current password is incorrect",
|
||||
'dumbpwd' => 'That password is too common.',
|
||||
"image" => "The :attribute must be an image.",
|
||||
"in" => "The selected :attribute is invalid.",
|
||||
"integer" => "The :attribute must be an integer.",
|
||||
"ip" => "The :attribute must be a valid IP address.",
|
||||
"max" => array(
|
||||
"numeric" => "The :attribute may not be greater than :max.",
|
||||
"file" => "The :attribute may not be greater than :max kilobytes.",
|
||||
"string" => "The :attribute may not be greater than :max characters.",
|
||||
),
|
||||
"mimes" => "The :attribute must be a file of type: :values.",
|
||||
"min" => array(
|
||||
"numeric" => "The :attribute must be at least :min.",
|
||||
"file" => "The :attribute must be at least :min kilobytes.",
|
||||
"string" => "The :attribute must be at least :min characters.",
|
||||
),
|
||||
"not_in" => "The selected :attribute is invalid.",
|
||||
"numeric" => "The :attribute must be a number.",
|
||||
"regex" => "The :attribute format is invalid.",
|
||||
"required" => "The :attribute field is required.",
|
||||
"required_if" => "The :attribute field is required when :other is :value.",
|
||||
"required_with" => "The :attribute field is required when :values is present.",
|
||||
"required_without" => "The :attribute field is required when :values is not present.",
|
||||
"same" => "The :attribute and :other must match.",
|
||||
"size" => array(
|
||||
"numeric" => "The :attribute must be :size.",
|
||||
"file" => "The :attribute must be :size kilobytes.",
|
||||
"string" => "The :attribute must be :size characters.",
|
||||
),
|
||||
"unique" => "The :attribute has already been taken.",
|
||||
"url" => "The :attribute format is invalid.",
|
||||
"statuslabel_type" => "You must select a valid status label type",
|
||||
"unique_undeleted" => "The :attribute must be unique.",
|
||||
'accepted' => ':attribute يجب ان يكون مقبولا.',
|
||||
'active_url' => ':attribute موقع غير صحيح.',
|
||||
'after' => ':attribute يجب ان يكون تاريخ قبل :date.',
|
||||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
|
||||
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||
'array' => 'The :attribute must be an array.',
|
||||
'before' => ':attribute يجب ان يكون تاريخ قبل :date.',
|
||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'numeric' => ':attribute يجب ان يكون بين :min - :max.',
|
||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||
'string' => 'The :attribute must be between :min and :max characters.',
|
||||
'array' => 'The :attribute must have between :min and :max items.',
|
||||
],
|
||||
'boolean' => 'The :attribute field must be true or false.',
|
||||
'confirmed' => 'The :attribute confirmation does not match.',
|
||||
'date' => ':attribute تاريخ غير صحيح.',
|
||||
'date_format' => 'The :attribute does not match the format :format.',
|
||||
'different' => 'The :attribute and :other must be different.',
|
||||
'digits' => 'The :attribute must be :digits digits.',
|
||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||
'distinct' => 'The :attribute field has a duplicate value.',
|
||||
'email' => 'The :attribute must be a valid email address.',
|
||||
'exists' => 'The selected :attribute is invalid.',
|
||||
'file' => 'The :attribute must be a file.',
|
||||
'filled' => 'The :attribute field must have a value.',
|
||||
'image' => 'The :attribute must be an image.',
|
||||
'in' => 'The selected :attribute is invalid.',
|
||||
'in_array' => 'The :attribute field does not exist in :other.',
|
||||
'integer' => 'The :attribute must be an integer.',
|
||||
'ip' => 'The :attribute must be a valid IP address.',
|
||||
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||
'json' => 'The :attribute must be a valid JSON string.',
|
||||
'max' => [
|
||||
'numeric' => 'The :attribute may not be greater than :max.',
|
||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||
'string' => 'The :attribute may not be greater than :max characters.',
|
||||
'array' => 'The :attribute may not have more than :max items.',
|
||||
],
|
||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||
'min' => [
|
||||
'numeric' => 'The :attribute must be at least :min.',
|
||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||
'string' => 'The :attribute must be at least :min characters.',
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
],
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => 'The :attribute field is required when :values is present.',
|
||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => 'The :attribute and :other must match.',
|
||||
'size' => [
|
||||
'numeric' => 'The :attribute must be :size.',
|
||||
'file' => 'The :attribute must be :size kilobytes.',
|
||||
'string' => 'The :attribute must be :size characters.',
|
||||
'array' => 'The :attribute must contain :size items.',
|
||||
],
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid zone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => 'The :attribute format is invalid.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
@@ -82,8 +111,14 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => array(),
|
||||
'alpha_space' => "The :attribute field contains a character that is not allowed.",
|
||||
'custom' => [
|
||||
'alpha_space' => "The :attribute field contains a character that is not allowed.",
|
||||
"email_array" => "One or more email addresses is invalid.",
|
||||
"hashed_pass" => "Your current password is incorrect",
|
||||
'dumbpwd' => 'That password is too common.',
|
||||
"statuslabel_type" => "You must select a valid status label type",
|
||||
"unique_undeleted" => "The :attribute must be unique.",
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -96,6 +131,6 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => array(),
|
||||
'attributes' => [],
|
||||
|
||||
);
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
'success' => 'Поддръжката на актив създадена успешно.'
|
||||
],
|
||||
'edit' => [
|
||||
'error' => 'Asset Maintenance was not created, please try again.',
|
||||
'success' => 'Asset Maintenance created successfully.'
|
||||
'error' => 'Asset Maintenance was not edited, please try again.',
|
||||
'success' => 'Asset Maintenance edited successfully.'
|
||||
],
|
||||
'asset_maintenance_incomplete' => 'Все още неприключила',
|
||||
'warranty' => 'Гаранция',
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
return array(
|
||||
|
||||
'id' => 'ID',
|
||||
'id' => 'ИД№',
|
||||
'name' => 'Department Name',
|
||||
'manager' => 'Manager',
|
||||
'location' => 'Location',
|
||||
'manager' => 'Ръководител',
|
||||
'location' => 'Местоположение',
|
||||
'create' => 'Create Department',
|
||||
'update' => 'Update Department',
|
||||
);
|
||||
|
||||
@@ -7,7 +7,7 @@ return array(
|
||||
'asset' => 'Актив',
|
||||
'bulk_checkout' => 'Отписване на активи към потребител',
|
||||
'checkin' => 'Връщане на актив',
|
||||
'checkout' => 'Изписване на актив към потребител',
|
||||
'checkout' => 'Checkout Asset',
|
||||
'clone' => 'Копиране на актив',
|
||||
'deployable' => 'Може да бъде предоставен',
|
||||
'deleted' => 'Активът беше изтрит. <a href="/hardware/:asset_id/restore">Възстановяване</a>.',
|
||||
|
||||
@@ -23,6 +23,12 @@ return array(
|
||||
'success' => 'Активът възстановен успешно.'
|
||||
),
|
||||
|
||||
'audit' => array(
|
||||
'error' => 'Asset audit was unsuccessful. Please try again.',
|
||||
'success' => 'Asset audit successfully logged.'
|
||||
),
|
||||
|
||||
|
||||
'deletefile' => array(
|
||||
'error' => 'Файлът не беше изтрит. Моля опитайте отново.',
|
||||
'success' => 'Файлът изтрит успешно.',
|
||||
|
||||
@@ -29,8 +29,8 @@ return array(
|
||||
),
|
||||
|
||||
'bulkedit' => array(
|
||||
'error' => 'No fields were changed, so nothing was updated.',
|
||||
'success' => 'Models updated.'
|
||||
'error' => 'Няма полета, който да са се променили, така че нищо не е осъвременено.',
|
||||
'success' => 'Моделите са осъвременени.'
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
@@ -10,6 +10,10 @@ return array(
|
||||
'alert_interval' => 'Изтичаш праг на известия (в дни)',
|
||||
'alert_inv_threshold' => 'Праг на известия за запаси',
|
||||
'asset_ids' => 'ID на активи',
|
||||
'audit_interval' => 'Audit Interval',
|
||||
'audit_interval_help' => 'If you are required to regularly physically audit your assets, enter the interval in months.',
|
||||
'audit_warning_days' => 'Audit Warning Threshold',
|
||||
'audit_warning_days_help' => 'How many days in advance should we warn you when assets are due for auditing?',
|
||||
'auto_increment_assets' => 'Автоматично генериране на инвентарни номера на активите',
|
||||
'auto_increment_prefix' => 'Префикс (незадължително)',
|
||||
'auto_incrementing_help' => 'Първо включете автоматично генериране на инвентарни номера, за да включите тази опция.',
|
||||
|
||||
@@ -13,6 +13,7 @@ return array(
|
||||
'filetype_info' => 'Позволените типове файлове са png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, и rar.',
|
||||
'history_user' => 'История за :name',
|
||||
'info' => 'Информация',
|
||||
'restore_user' => 'Click here to restore them.',
|
||||
'last_login' => 'Последен достъп до системата',
|
||||
'ldap_config_text' => 'LDAP конфигурационните настройки могат да бъдат намерени в Admin > Settings. Избраното (по изобр) местоположение ще бъде настроено за всички въведени потребители.',
|
||||
'software_user' => 'Софтуерни продукти, изписани на :name',
|
||||
|
||||
@@ -19,7 +19,7 @@ return array(
|
||||
'location' => 'Местоположение',
|
||||
'lock_passwords' => 'Настройките за вход не могат да бъдат променяни в текущата инсталация.',
|
||||
'manager' => 'Ръководител',
|
||||
'managed_locations' => 'Managed Locations',
|
||||
'managed_locations' => 'Управлявани места',
|
||||
'name' => 'Име',
|
||||
'notes' => 'Бележки',
|
||||
'password_confirm' => 'Потвърждение на паролата',
|
||||
|
||||
@@ -18,11 +18,15 @@
|
||||
'asset_report' => 'Справка за активите',
|
||||
'asset_tag' => 'Инвентарен номер',
|
||||
'assets_available' => 'налични активи',
|
||||
'audit' => 'Audit',
|
||||
'audit_report' => 'Audit Log',
|
||||
'assets' => 'Активи',
|
||||
'avatar_delete' => 'Изтриване на аватар',
|
||||
'avatar_upload' => 'Качване на аватар',
|
||||
'back' => 'Назад',
|
||||
'bad_data' => 'Няма резултати.',
|
||||
'bulkaudit' => 'Bulk Audit',
|
||||
'bulkaudit_status' => 'Audit Status',
|
||||
'bulk_checkout' => 'Общо отписване',
|
||||
'cancel' => 'Отказ',
|
||||
'categories' => 'Категории',
|
||||
@@ -52,6 +56,8 @@
|
||||
'current' => 'Текущи',
|
||||
'custom_report' => 'Потребителски справки за активи',
|
||||
'dashboard' => 'Табло',
|
||||
'days' => 'days',
|
||||
'days_to_next_audit' => 'Days to Next Audit',
|
||||
'date' => 'Дата',
|
||||
'debug_warning' => 'Предупреждение!',
|
||||
'debug_warning_text' => 'Това приложение се изпълнява в режим на производство с разрешено отстраняване на грешки. Това може да изложи чувствителни данни, ако приложението ви е достъпно за външния свят. Забранете режим отстраняване на грешки чрез задаване на стойността <code>APP_DEBUF</code> <code>.env</code> във файла <code>false</code>.',
|
||||
@@ -117,6 +123,8 @@
|
||||
'moreinfo' => 'Повече информация',
|
||||
'name' => 'Име',
|
||||
'next' => 'Следващ',
|
||||
'next_audit_date' => 'Next Audit Date',
|
||||
'last_audit' => 'Last Audit',
|
||||
'new' => 'new!',
|
||||
'no_depreciation' => 'Без амортизация',
|
||||
'no_results' => 'Няма резултат.',
|
||||
@@ -152,7 +160,7 @@
|
||||
'select_model' => 'Избор на модел',
|
||||
'select_supplier' => 'Избор на доставчик',
|
||||
'select_user' => 'Избор на потребител',
|
||||
'select_date' => 'Select Date (YYYY-MM-DD)',
|
||||
'select_date' => 'Изберете дата (ГГГГ-ММ-ДД)',
|
||||
'select_statuslabel' => 'Избор на статус',
|
||||
'select_company' => 'Изберете компания',
|
||||
'select_asset' => 'Изберете актив',
|
||||
|
||||
@@ -13,62 +13,91 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
"accepted" => ":attribute трябва да бъде потвърден.",
|
||||
"active_url" => ":attribute не е валиден URL адрес.",
|
||||
"after" => ":attribute трябва да бъде дата след :date.",
|
||||
"alpha" => ":attribute може да съдържа единствено букви.",
|
||||
"alpha_dash" => ":attribute може да съдържа единствено букви, числа и тире.",
|
||||
"alpha_num" => ":attribute може да съдържа единствено букви и числа.",
|
||||
"before" => ":attribute трябва да бъде дата преди :date.",
|
||||
"between" => array(
|
||||
"numeric" => ":attribute трябва да бъде между :min и :max.",
|
||||
"file" => ":attribute трябва да бъде с големина между :min и :max KB.",
|
||||
"string" => ":attribute трябва да бъде с дължина между :min и :max символа.",
|
||||
),
|
||||
"boolean" => ":attribute трябва да е верен или грешен.",
|
||||
"confirmed" => ":attribute потвърждение не съвпада.",
|
||||
"date" => ":attribute не е валидна дата.",
|
||||
"date_format" => ":attribute не съвпада с формата :format.",
|
||||
"different" => ":attribute и :other трябва да се различават.",
|
||||
"digits" => ":attribute трябва да бъде с дължина :digits цифри.",
|
||||
"digits_between" => ":attribute трябва да бъде с дължина между :min и :max цифри.",
|
||||
"email" => ":attribute е с невалиден формат.",
|
||||
"exists" => "Избраният :attribute е невалиден.",
|
||||
"email_array" => "Един или повече email адреси е невалиден.",
|
||||
"hashed_pass" => "Your current password is incorrect",
|
||||
'dumbpwd' => 'That password is too common.',
|
||||
"image" => ":attribute трябва да бъде изображение.",
|
||||
"in" => "Избраният :attribute е невалиден.",
|
||||
"integer" => ":attribute трябва да бъде целочислен.",
|
||||
"ip" => ":attribute трябва да бъде валиден IP адрес.",
|
||||
"max" => array(
|
||||
"numeric" => ":attribute не може да бъде по-дълъг от :max.",
|
||||
"file" => ":attribute не може да бъде по-голям от :max KB.",
|
||||
"string" => ":attribute не може да бъде по-дълъг от :max символа.",
|
||||
),
|
||||
"mimes" => ":attribute трябва да бъде файл с един от следните типове: :values.",
|
||||
"min" => array(
|
||||
"numeric" => ":attribute трябва да бъде минимум :min.",
|
||||
"file" => ":attribute трябва да бъде с големина минимум :min KB.",
|
||||
"string" => ":attribute трябва да бъде минимум :min символа.",
|
||||
),
|
||||
"not_in" => "Избраният :attribute е невалиден.",
|
||||
"numeric" => ":attribute трябва да бъде число.",
|
||||
"regex" => "Форматът на :attribute е невалиден.",
|
||||
"required" => "Полето :attribute е задължително.",
|
||||
"required_if" => "Полето :attribute е задължително, когато :other е :value.",
|
||||
"required_with" => ":attribute е задължителен, когато са избрани :values.",
|
||||
"required_without" => ":attribute е задължителен, когато не са избрани :values.",
|
||||
"same" => ":attribute и :other трябва да съвпадат.",
|
||||
"size" => array(
|
||||
"numeric" => ":attribute трябва да бъде с дължина :size.",
|
||||
"file" => ":attribute трябва да бъде с големина :size KB.",
|
||||
"string" => ":attribute трябва да бъде с дължина :size символа.",
|
||||
),
|
||||
"unique" => ":attribute вече е вписан.",
|
||||
"url" => "Форматът на :attribute е невалиден.",
|
||||
"statuslabel_type" => "Трябва да изберете валиден тип етикет за статус",
|
||||
"unique_undeleted" => ":attribute трябва да е единствен по рода си.",
|
||||
'accepted' => ':attribute трябва да бъде потвърден.',
|
||||
'active_url' => ':attribute не е валиден URL адрес.',
|
||||
'after' => ':attribute трябва да бъде дата след :date.',
|
||||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||
'alpha' => ':attribute може да съдържа единствено букви.',
|
||||
'alpha_dash' => ':attribute може да съдържа единствено букви, числа и тире.',
|
||||
'alpha_num' => ':attribute може да съдържа единствено букви и числа.',
|
||||
'array' => 'The :attribute must be an array.',
|
||||
'before' => ':attribute трябва да бъде дата преди :date.',
|
||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'numeric' => ':attribute трябва да бъде между :min и :max.',
|
||||
'file' => ':attribute трябва да бъде с големина между :min и :max KB.',
|
||||
'string' => ':attribute трябва да бъде с дължина между :min и :max символа.',
|
||||
'array' => 'The :attribute must have between :min and :max items.',
|
||||
],
|
||||
'boolean' => ':attribute трябва да е верен или грешен.',
|
||||
'confirmed' => ':attribute потвърждение не съвпада.',
|
||||
'date' => ':attribute не е валидна дата.',
|
||||
'date_format' => ':attribute не съвпада с формата :format.',
|
||||
'different' => ':attribute и :other трябва да се различават.',
|
||||
'digits' => ':attribute трябва да бъде с дължина :digits цифри.',
|
||||
'digits_between' => ':attribute трябва да бъде с дължина между :min и :max цифри.',
|
||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||
'distinct' => 'The :attribute field has a duplicate value.',
|
||||
'email' => ':attribute е с невалиден формат.',
|
||||
'exists' => 'Избраният :attribute е невалиден.',
|
||||
'file' => 'The :attribute must be a file.',
|
||||
'filled' => 'The :attribute field must have a value.',
|
||||
'image' => ':attribute трябва да бъде изображение.',
|
||||
'in' => 'Избраният :attribute е невалиден.',
|
||||
'in_array' => 'The :attribute field does not exist in :other.',
|
||||
'integer' => ':attribute трябва да бъде целочислен.',
|
||||
'ip' => ':attribute трябва да бъде валиден IP адрес.',
|
||||
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||
'json' => 'The :attribute must be a valid JSON string.',
|
||||
'max' => [
|
||||
'numeric' => ':attribute не може да бъде по-дълъг от :max.',
|
||||
'file' => ':attribute не може да бъде по-голям от :max KB.',
|
||||
'string' => ':attribute не може да бъде по-дълъг от :max символа.',
|
||||
'array' => 'The :attribute may not have more than :max items.',
|
||||
],
|
||||
'mimes' => ':attribute трябва да бъде файл с един от следните типове: :values.',
|
||||
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||
'min' => [
|
||||
'numeric' => ':attribute трябва да бъде минимум :min.',
|
||||
'file' => ':attribute трябва да бъде с големина минимум :min KB.',
|
||||
'string' => ':attribute трябва да бъде минимум :min символа.',
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
],
|
||||
'not_in' => 'Избраният :attribute е невалиден.',
|
||||
'numeric' => ':attribute трябва да бъде число.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'Форматът на :attribute е невалиден.',
|
||||
'required' => 'Полето :attribute е задължително.',
|
||||
'required_if' => 'Полето :attribute е задължително, когато :other е :value.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => ':attribute е задължителен, когато са избрани :values.',
|
||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
||||
'required_without' => ':attribute е задължителен, когато не са избрани :values.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => ':attribute и :other трябва да съвпадат.',
|
||||
'size' => [
|
||||
'numeric' => ':attribute трябва да бъде с дължина :size.',
|
||||
'file' => ':attribute трябва да бъде с големина :size KB.',
|
||||
'string' => ':attribute трябва да бъде с дължина :size символа.',
|
||||
'array' => 'The :attribute must contain :size items.',
|
||||
],
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid zone.',
|
||||
'unique' => ':attribute вече е вписан.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => 'Форматът на :attribute е невалиден.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
@@ -82,8 +111,14 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => array(),
|
||||
'alpha_space' => ":attribute съдържа символи, които са забранени.",
|
||||
'custom' => [
|
||||
'alpha_space' => "The :attribute field contains a character that is not allowed.",
|
||||
"email_array" => "One or more email addresses is invalid.",
|
||||
"hashed_pass" => "Your current password is incorrect",
|
||||
'dumbpwd' => 'That password is too common.',
|
||||
"statuslabel_type" => "You must select a valid status label type",
|
||||
"unique_undeleted" => "The :attribute must be unique.",
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -96,6 +131,6 @@ return array(
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => array(),
|
||||
'attributes' => [],
|
||||
|
||||
);
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
'success' => 'Údržba zařízení byla v pořádku vytvořena.'
|
||||
],
|
||||
'edit' => [
|
||||
'error' => 'Asset Maintenance was not created, please try again.',
|
||||
'success' => 'Asset Maintenance created successfully.'
|
||||
'error' => 'Asset Maintenance was not edited, please try again.',
|
||||
'success' => 'Asset Maintenance edited successfully.'
|
||||
],
|
||||
'asset_maintenance_incomplete' => 'Prozatím nedokončeno',
|
||||
'warranty' => 'Záruka',
|
||||
|
||||
@@ -7,7 +7,7 @@ return array(
|
||||
'asset' => 'Majetek',
|
||||
'bulk_checkout' => 'Předat majetek uživateli',
|
||||
'checkin' => 'Převzít majetek',
|
||||
'checkout' => 'Předat majetek uživateli',
|
||||
'checkout' => 'Checkout Asset',
|
||||
'clone' => 'Klonovat majetek',
|
||||
'deployable' => 'Připraveno k nasazení',
|
||||
'deleted' => 'Toto zařízení bylo odstraněno. <a href="/hardware/:asset_id/restore">Klepněte zde pro jeho obnovení</a>.',
|
||||
|
||||
@@ -24,6 +24,12 @@ return array(
|
||||
'success' => 'Majetek byl v pořádku obnoven.'
|
||||
),
|
||||
|
||||
'audit' => array(
|
||||
'error' => 'Asset audit was unsuccessful. Please try again.',
|
||||
'success' => 'Asset audit successfully logged.'
|
||||
),
|
||||
|
||||
|
||||
'deletefile' => array(
|
||||
'error' => 'Soubor se nesmazal, prosím zkuste to znovu.',
|
||||
'success' => 'Soubor byl úspěšně smazán.',
|
||||
|
||||
@@ -10,6 +10,10 @@ return array(
|
||||
'alert_interval' => 'Mez upozornění na vypršení (ve dnech)',
|
||||
'alert_inv_threshold' => 'Mez upozornění skladu',
|
||||
'asset_ids' => 'ID majetku',
|
||||
'audit_interval' => 'Audit Interval',
|
||||
'audit_interval_help' => 'If you are required to regularly physically audit your assets, enter the interval in months.',
|
||||
'audit_warning_days' => 'Audit Warning Threshold',
|
||||
'audit_warning_days_help' => 'How many days in advance should we warn you when assets are due for auditing?',
|
||||
'auto_increment_assets' => 'Vygenerovat zvyšující se ID majetku',
|
||||
'auto_increment_prefix' => 'Předpona (volitnelná)',
|
||||
'auto_incrementing_help' => 'Nastavte nejdříve automaticky se zvyšující ID majetku pro nastavení tohoto',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user