From 595dad0f18c0ef042f2dacc1439e250b1f1b10e5 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Sat, 16 Mar 2024 19:51:40 -0700 Subject: [PATCH 001/318] updates all assets assigned to user with new location --- app/Console/Commands/LdapSync.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index 05f60ee4e14d..5b7a59f32b3e 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -2,6 +2,7 @@ namespace App\Console\Commands; +use App\Models\Asset; use App\Models\Department; use App\Models\Group; use Illuminate\Console\Command; @@ -390,6 +391,10 @@ public function handle() $user->location_id = $location->id; } } + $assets = Asset::whereColumn('assigned_to', '=', $user->id)->get(); + foreach($assets as $asset){ + $asset->location = $user->location_id; + } $user->ldap_import = 1; From 05a8d3030b15a7da1f71604d2a775c0e3a29e9c1 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Sat, 16 Mar 2024 19:54:48 -0700 Subject: [PATCH 002/318] correct column name --- app/Console/Commands/LdapSync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index 5b7a59f32b3e..a26c15747663 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -393,7 +393,7 @@ public function handle() } $assets = Asset::whereColumn('assigned_to', '=', $user->id)->get(); foreach($assets as $asset){ - $asset->location = $user->location_id; + $asset->location_id = $user->location_id; } $user->ldap_import = 1; From 866f0a9f561c7fc93335b55c2728e52a6448a5e0 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 19 Mar 2024 11:58:49 -0700 Subject: [PATCH 003/318] syncs assets location to users location --- app/Console/Commands/LdapSync.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index a26c15747663..34eb4642b341 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -391,9 +391,11 @@ public function handle() $user->location_id = $location->id; } } - $assets = Asset::whereColumn('assigned_to', '=', $user->id)->get(); + //updates assets location based on user's location + $assets = Asset::where('assigned_to', '=', $user->id)->get(); foreach($assets as $asset){ $asset->location_id = $user->location_id; + $asset->save(); } $user->ldap_import = 1; From c62a022252b88e03379a0c4f1baa4ee8434c6570 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Thu, 21 Mar 2024 14:34:47 -0700 Subject: [PATCH 004/318] replaced for loop with eloquent query update --- app/Console/Commands/LdapSync.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index 34eb4642b341..7fcbc8eb072b 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -392,11 +392,7 @@ public function handle() } } //updates assets location based on user's location - $assets = Asset::where('assigned_to', '=', $user->id)->get(); - foreach($assets as $asset){ - $asset->location_id = $user->location_id; - $asset->save(); - } + Asset::where('assigned_to', '=', $user->id)->update(['location_id' => $user->location_id]); $user->ldap_import = 1; From 552f90ae2c32270c60d6b38628f2d20b63386acd Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 1 Aug 2024 16:06:47 -0400 Subject: [PATCH 005/318] required, but not optional --- resources/views/hardware/checkin.blade.php | 2 +- resources/views/hardware/checkout.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index 1efd39427799..e3f65bd7ff94 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -119,7 +119,7 @@ {{ trans('general.notes') }}
- {!! $errors->first('note', '') !!}
diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php index f91e06036816..89d6f06e6e16 100755 --- a/resources/views/hardware/checkout.blade.php +++ b/resources/views/hardware/checkout.blade.php @@ -141,7 +141,7 @@ {{ trans('general.notes') }}
- {!! $errors->first('note', '') !!}
From 3ff1745f560ff71cc43fd01fd67410acd57d4b97 Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 1 Aug 2024 16:44:02 -0400 Subject: [PATCH 006/318] setting created --- app/Http/Controllers/SettingsController.php | 2 ++ ...8_01_201721_add_required_notes_setting.php | 30 +++++++++++++++++++ .../lang/en-US/admin/settings/general.php | 2 ++ resources/views/settings/general.blade.php | 17 +++++++++++ 4 files changed, 51 insertions(+) create mode 100644 database/migrations/2024_08_01_201721_add_required_notes_setting.php diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 9c7392560dcc..f0903f412b21 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -342,6 +342,8 @@ public function postSettings(Request $request) : RedirectResponse $setting->depreciation_method = $request->input('depreciation_method'); $setting->dash_chart_type = $request->input('dash_chart_type'); $setting->profile_edit = $request->input('profile_edit', 0); + $setting->require_checkinout_notes = $request->input('require_checkinout_notes', 0); + if ($request->input('per_page') != '') { $setting->per_page = $request->input('per_page'); diff --git a/database/migrations/2024_08_01_201721_add_required_notes_setting.php b/database/migrations/2024_08_01_201721_add_required_notes_setting.php new file mode 100644 index 000000000000..d4934ed7fb93 --- /dev/null +++ b/database/migrations/2024_08_01_201721_add_required_notes_setting.php @@ -0,0 +1,30 @@ +boolean('require_checkinout_notes')->nullable()->default(1); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('settings', function (Blueprint $table) { + if (Schema::hasColumn('settings', 'require_checkinout_notes')) { + $table->dropColumn('require_checkinout_notes'); + } + }); + } +}; diff --git a/resources/lang/en-US/admin/settings/general.php b/resources/lang/en-US/admin/settings/general.php index 9ba69ef22a14..abbf2632097d 100644 --- a/resources/lang/en-US/admin/settings/general.php +++ b/resources/lang/en-US/admin/settings/general.php @@ -276,6 +276,8 @@ 'two_factor_enrollment_text' => "Two factor authentication is required, however your device has not been enrolled yet. Open your Google Authenticator app and scan the QR code below to enroll your device. Once you've enrolled your device, enter the code below", 'require_accept_signature' => 'Require Signature', 'require_accept_signature_help_text' => 'Enabling this feature will require users to physically sign off on accepting an asset.', + 'require_checkinout_notes' => 'Require Notes on Checkin/Checkout', + 'require_checkinout_notes_help_text' => 'Enabling this feature will require the note fields to be populated when checking in or checking out an asset.', 'left' => 'left', 'right' => 'right', 'top' => 'top', diff --git a/resources/views/settings/general.blade.php b/resources/views/settings/general.blade.php index 91d3b1c56f9d..477d8e68a05f 100644 --- a/resources/views/settings/general.blade.php +++ b/resources/views/settings/general.blade.php @@ -200,6 +200,23 @@ + +
+
+ +
+
+ +

{{ trans('admin/settings/general.require_checkinout_notes_help_text') }}

+
+
+ +
From 0f0baa207dabd252a49eca496a2f8a9af14658d6 Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 1 Aug 2024 17:02:35 -0400 Subject: [PATCH 007/318] note field optional --- resources/views/hardware/checkin.blade.php | 30 +++++++++++++-------- resources/views/hardware/checkout.blade.php | 8 ++++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index e3f65bd7ff94..a313b65a33c1 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -113,17 +113,25 @@
- -
- -
- - {!! $errors->first('note', '') !!} -
-
+ +
+ + @if($snipeSettings->require_checkinout_notes=="1") +
+ + {!! $errors->first('note', '') !!} +
+ @else +
+ + {!! $errors->first('note', '') !!} +
+ @endif +
diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php index 89d6f06e6e16..79e9e409e549 100755 --- a/resources/views/hardware/checkout.blade.php +++ b/resources/views/hardware/checkout.blade.php @@ -140,11 +140,19 @@ + @if($snipeSettings->require_checkinout_notes=="1")
{!! $errors->first('note', '') !!}
+ @else +
+ + {!! $errors->first('note', '') !!} +
+ @endif @if ($asset->requireAcceptance() || $asset->getEula() || ($snipeSettings->webhook_endpoint!='')) From 5066eb58f4590821bf2d4e1deaf7f87c3eb68815 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 17 Aug 2024 02:31:03 +0100 Subject: [PATCH 008/318] Added asset model import to importer Signed-off-by: snipe --- app/Importer/AssetModelImporter.php | 100 ++++++++++++++++++++ app/Importer/ItemImporter.php | 12 ++- app/Livewire/Importer.php | 36 +++++-- resources/lang/en-US/general.php | 2 +- resources/views/livewire/importer.blade.php | 3 + sample_csvs/models-sample.csv | 22 +++++ 6 files changed, 164 insertions(+), 11 deletions(-) create mode 100644 app/Importer/AssetModelImporter.php create mode 100644 sample_csvs/models-sample.csv diff --git a/app/Importer/AssetModelImporter.php b/app/Importer/AssetModelImporter.php new file mode 100644 index 000000000000..888265a95e52 --- /dev/null +++ b/app/Importer/AssetModelImporter.php @@ -0,0 +1,100 @@ +createAssetModelIfNotExists($row); + } + + /** + * Create a model if a duplicate does not exist. + * @todo Investigate how this should interact with Importer::createModelIfNotExists + * + * @author A. Gianotto + * @since 6.1.0 + * @param array $row + */ + public function createAssetModelIfNotExists(array $row) + { + + $editingAssetModel = false; + $assetmodel = AssetModel::where('name', '=', $this->findCsvMatch($row, 'name'))->first(); + + if ($assetmodel) { + if (! $this->updating) { + $this->log('A matching Model '.$this->item['name'].' already exists'); + return; + } + + $this->log('Updating Model'); + $editingAssetModel = true; + } else { + $this->log('No Matching Model, Create a new one'); + $assetmodel = new AssetModel(); + } + + // Pull the records from the CSV to determine their values + $this->item['name'] = trim($this->findCsvMatch($row, 'name')); + $this->item['category'] = trim($this->findCsvMatch($row, 'category')); + $this->item['manufacturer'] = trim($this->findCsvMatch($row, 'manufacturer')); + $this->item['min_amt'] = trim($this->findCsvMatch($row, 'min_amt')); + $this->item['model_number'] = trim($this->findCsvMatch($row, 'model_number')); + $this->item['notes'] = trim($this->findCsvMatch($row, 'notes')); + $this->item['user_id'] = auth()->id(); + + + if (!empty($this->item['category'])) { + if ($category = $this->createOrFetchCategory($row, 'category')) { + $this->item['category_id'] = $category->id; + } + } + if (!empty($this->item['manufacturer'])) { + if ($manufacturer = $this->createOrFetchManufacturer($row, 'manufacturer')) { + $this->item['manufacturer_id'] = $manufacturer->id; + } + } + + Log::debug('Item array is: '); + Log::debug(print_r($this->item, true)); + + + if ($editingAssetModel) { + Log::debug('Updating existing model'); + $assetmodel->update($this->sanitizeItemForUpdating($assetmodel)); + } else { + Log::debug('Creating model'); + $assetmodel->fill($this->sanitizeItemForStoring($assetmodel)); + } + + if ($assetmodel->save()) { + $this->log('AssetModel '.$assetmodel->name.' created or updated from CSV import'); + return $assetmodel; + + } else { + Log::debug($assetmodel->getErrors()); + return $assetmodel->errors; + } + + + } +} \ No newline at end of file diff --git a/app/Importer/ItemImporter.php b/app/Importer/ItemImporter.php index 29197ca5dc35..56c9a3cb0969 100644 --- a/app/Importer/ItemImporter.php +++ b/app/Importer/ItemImporter.php @@ -113,7 +113,7 @@ protected function handle($row) protected function determineCheckout($row) { // Locations don't get checked out to anyone/anything - if (get_class($this) == LocationImporter::class) { + if ((get_class($this) == LocationImporter::class) || (get_class($this) == AssetModelImporter::class)) { return; } @@ -287,14 +287,22 @@ public function createOrFetchCategory($asset_category) $classname = class_basename(get_class($this)); $item_type = strtolower(substr($classname, 0, strpos($classname, 'Importer'))); + if ($item_type == 'assetmodel') { + $item_type = 'asset'; + } + + \Log::error('Item Type: '.$item_type); + if (empty($asset_category)) { $asset_category = 'Unnamed Category'; } + + $category = Category::where(['name' => $asset_category, 'category_type' => $item_type])->first(); + if ($category) { $this->log('A matching category: '.$asset_category.' already exists'); - return $category->id; } diff --git a/app/Livewire/Importer.php b/app/Livewire/Importer.php index 32dd7912fb3b..5af99b35bade 100644 --- a/app/Livewire/Importer.php +++ b/app/Livewire/Importer.php @@ -79,6 +79,7 @@ public function generate_field_map() private function getColumns($type) { + \Log::error($type); switch ($type) { case 'asset': $results = $this->assets_fields; @@ -101,10 +102,14 @@ private function getColumns($type) case 'location': $results = $this->locations_fields; break; + case 'assetmodel': + $results = $this->assetmodels_fields; + break; default: $results = []; } asort($results, SORT_FLAG_CASE | SORT_STRING); + if ($type == "asset") { // add Custom Fields after a horizontal line $results['-'] = "———" . trans('admin/custom_fields/general.custom_fields') . "———’"; @@ -143,6 +148,7 @@ public function updating($name, $new_import_type) } // if you got here, we didn't find a match. Try the $aliases_fields foreach ($this->aliases_fields as $key => $alias_values) { + \Log::error('No matches'); foreach ($alias_values as $alias_value) { if (strcasecmp($alias_value, $header) === 0) { // aLsO CaSe-INSENSitiVE! // Make *absolutely* sure that this key actually _exists_ in this import type - @@ -172,13 +178,14 @@ public function mount() $this->progress = -1; // '-1' means 'don't show the progressbar' $this->progress_bar_class = 'progress-bar-warning'; $this->importTypes = [ - 'asset' => trans('general.assets'), - 'accessory' => trans('general.accessories'), - 'consumable' => trans('general.consumables'), - 'component' => trans('general.components'), - 'license' => trans('general.licenses'), - 'user' => trans('general.users'), - 'location' => trans('general.locations'), + 'asset' => trans('general.assets'), + 'accessory' => trans('general.accessories'), + 'consumable' => trans('general.consumables'), + 'component' => trans('general.components'), + 'license' => trans('general.licenses'), + 'user' => trans('general.users'), + 'location' => trans('general.locations'), + 'assetmodel' => trans('general.asset_models'), ]; /** @@ -352,6 +359,18 @@ public function mount() 'parent_location' => trans('admin/locations/table.parent'), ]; + $this->assetmodels_fields = [ + 'item_name' => trans('general.item_name_var', ['item' => trans('general.asset_model')]), + 'category' => trans('general.category'), + 'manufacturer' => trans('general.manufacturer'), + 'model_number' => trans('general.model_no'), + 'notes' => trans('general.item_notes', ['item' => trans('admin/hardware/form.model')]), + 'min_amt' => trans('mail.min_QTY'), + 'fieldset' => trans('admin/models/general.fieldset'), + 'category_type' => 'category type', + + ]; + // "real fieldnames" to a list of aliases for that field $this->aliases_fields = [ 'item_name' => @@ -527,18 +546,19 @@ public function selectFile($id) if (!$this->activeFile) { $this->message = trans('admin/hardware/message.import.file_missing'); $this->message_type = 'danger'; - return; } $this->field_map = null; foreach($this->activeFile->header_row as $element) { + if(isset($this->activeFile->field_map[$element])) { $this->field_map[] = $this->activeFile->field_map[$element]; } else { $this->field_map[] = null; // re-inject the 'nulls' if a file was imported with some 'Do Not Import' settings } } + $this->file_id = $id; $this->import_errors = null; $this->statusText = null; diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.php index 7634387906e8..5e54bab83ed5 100644 --- a/resources/lang/en-US/general.php +++ b/resources/lang/en-US/general.php @@ -557,7 +557,7 @@ 'something_went_wrong' => 'Something went wrong with your request.', 'close' => 'Close', 'expires' => 'Expires', - 'map_fields'=> 'Map :item_type Field', + 'map_fields'=> 'Map :item_type Fields', 'remaining_var' => ':count Remaining', 'assets_in_var' => 'Assets in :name :type', 'label' => 'Label', diff --git a/resources/views/livewire/importer.blade.php b/resources/views/livewire/importer.blade.php index 92dfd128ad93..7371dd2fe87f 100644 --- a/resources/views/livewire/importer.blade.php +++ b/resources/views/livewire/importer.blade.php @@ -170,16 +170,19 @@ class="col-md-12 table table-striped snipe-table"> {{ trans('general.update_existing_values') }} + @if ($activeFile->import_type === 'asset' && $snipeSettings->auto_increment_assets == 1 && $update)

{{ trans('general.auto_incrementing_asset_tags_enabled_so_now_assets_will_be_created') }}

@endif + @if ($activeFile->import_type != 'location' && $activeFile->import_type == 'assetmodel' && $update) + @endif @if($snipeSettings->require_checkinout_notes=="1") -
+
{!! $errors->first('note', '') !!} diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php index 108101907211..ab8b7b31f3bd 100755 --- a/resources/views/hardware/checkout.blade.php +++ b/resources/views/hardware/checkout.blade.php @@ -141,7 +141,7 @@ {{ trans('general.notes') }} @if($snipeSettings->require_checkinout_notes=="1") -
+
{!! $errors->first('note', '') !!} From 2901ecbf4376009f371449bac03da5292a773f03 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 3 Sep 2024 15:02:27 -0400 Subject: [PATCH 010/318] more test work --- app/Http/Requests/AssetCheckinRequest.php | 4 ++-- app/Http/Requests/AssetCheckoutRequest.php | 1 + resources/views/hardware/checkin.blade.php | 7 ------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 116b8b39f22a..dec4b0912f55 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -21,9 +21,9 @@ public function authorize() */ public function rules() { - return [ + 'note' => 'required|in:asset,', - ]; + return $rules; } public function response(array $errors) diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index f48a7d5e534f..0f42076c9b92 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -27,6 +27,7 @@ public function rules() 'assigned_location' => 'required_without_all:assigned_user,assigned_asset', 'status_id' => 'exists:status_labels,id,deployable,1', 'checkout_to_type' => 'required|in:asset,location,user', + 'note' => 'required|in:asset,', 'checkout_at' => [ 'nullable', 'date', diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index 496e899addb8..12c678e6458c 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -124,13 +124,6 @@ name="note">{{ old('note', $asset->note) }} {!! $errors->first('note', '') !!}
- @else -
- - {!! $errors->first('note', '') !!} -
- @endif
From 77c5035cac4887f5491eb7e469c8ffa83dad61f7 Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 4 Sep 2024 17:50:52 -0400 Subject: [PATCH 011/318] fixing some formatting --- app/Http/Requests/AssetCheckinRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index dec4b0912f55..436a2a9d582a 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -21,7 +21,7 @@ public function authorize() */ public function rules() { - 'note' => 'required|in:asset,', + 'note' => 'required|in:asset,', return $rules; } From bebb72a04f36805cf8f7e2090f505e384a396281 Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 4 Sep 2024 17:53:19 -0400 Subject: [PATCH 012/318] back to having tests pass. needed to comment out the notes rules() i added --- app/Http/Requests/AssetCheckinRequest.php | 12 ++++++------ app/Http/Requests/AssetCheckoutRequest.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 436a2a9d582a..3bee83a81097 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -19,12 +19,12 @@ public function authorize() * * @return array */ - public function rules() - { - 'note' => 'required|in:asset,', - - return $rules; - } +// public function rules() +// { +// 'note' => 'required|in:asset,', +// +// return $rules; +// } public function response(array $errors) { diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index 0f42076c9b92..9064e6dcd03c 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -27,7 +27,7 @@ public function rules() 'assigned_location' => 'required_without_all:assigned_user,assigned_asset', 'status_id' => 'exists:status_labels,id,deployable,1', 'checkout_to_type' => 'required|in:asset,location,user', - 'note' => 'required|in:asset,', +// 'note' => 'required|in:asset,', 'checkout_at' => [ 'nullable', 'date', From d262638a63af82d5f1f5cde4d4c342edf85be58b Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 4 Sep 2024 18:23:36 -0400 Subject: [PATCH 013/318] backend form validation. +cleanup --- .../Controllers/Assets/AssetCheckinController.php | 6 ++++++ .../Controllers/Assets/AssetCheckoutController.php | 4 ++++ app/Http/Requests/AssetCheckinRequest.php | 12 ------------ app/Http/Requests/AssetCheckoutRequest.php | 1 - resources/lang/en-US/admin/hardware/message.php | 2 ++ resources/views/hardware/checkin.blade.php | 1 + 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetCheckinController.php b/app/Http/Controllers/Assets/AssetCheckinController.php index f84a468a60e7..2c49f78bfbfb 100644 --- a/app/Http/Controllers/Assets/AssetCheckinController.php +++ b/app/Http/Controllers/Assets/AssetCheckinController.php @@ -116,6 +116,12 @@ public function store(AssetCheckinRequest $request, $assetId = null, $backto = n $seat->update(['assigned_to' => null]); }); + $settings = \App\Models\Setting::getSettings(); + + if($settings->require_checkinout_notes=="1" && (is_null($request->note))) { + return redirect()->to("hardware/$assetId/checkin")->with('error', trans('admin/hardware/message.update.no_note')); + } + // Get all pending Acceptances for this asset and delete them $acceptances = CheckoutAcceptance::pending()->whereHasMorph('checkoutable', [Asset::class], diff --git a/app/Http/Controllers/Assets/AssetCheckoutController.php b/app/Http/Controllers/Assets/AssetCheckoutController.php index 05b766916be8..506f47680cd1 100644 --- a/app/Http/Controllers/Assets/AssetCheckoutController.php +++ b/app/Http/Controllers/Assets/AssetCheckoutController.php @@ -102,6 +102,10 @@ public function store(AssetCheckoutRequest $request, $assetId) : RedirectRespons $settings = \App\Models\Setting::getSettings(); + if($settings->require_checkinout_notes=="1" && (is_null($request->note))) { + return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.update.no_note'); //needs translation + } + // We have to check whether $target->company_id is null here since locations don't have a company yet if (($settings->full_multiple_companies_support) && ((!is_null($target->company_id)) && (!is_null($asset->company_id)))) { if ($target->company_id != $asset->company_id){ diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 3bee83a81097..ea2847189942 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -14,18 +14,6 @@ public function authorize() return true; } - /** - * Get the validation rules that apply to the request. - * - * @return array - */ -// public function rules() -// { -// 'note' => 'required|in:asset,', -// -// return $rules; -// } - public function response(array $errors) { return $this->redirector->back()->withInput()->withErrors($errors, $this->errorBag); diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index 9064e6dcd03c..f48a7d5e534f 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -27,7 +27,6 @@ public function rules() 'assigned_location' => 'required_without_all:assigned_user,assigned_asset', 'status_id' => 'exists:status_labels,id,deployable,1', 'checkout_to_type' => 'required|in:asset,location,user', -// 'note' => 'required|in:asset,', 'checkout_at' => [ 'nullable', 'date', diff --git a/resources/lang/en-US/admin/hardware/message.php b/resources/lang/en-US/admin/hardware/message.php index d06bf4a0e043..c9ea79023b8b 100644 --- a/resources/lang/en-US/admin/hardware/message.php +++ b/resources/lang/en-US/admin/hardware/message.php @@ -23,6 +23,7 @@ 'nothing_updated' => 'No fields were selected, so nothing was updated.', 'no_assets_selected' => 'No assets were selected, so nothing was updated.', 'assets_do_not_exist_or_are_invalid' => 'Selected assets cannot be updated.', + 'no_note' => 'Note field is empty', ], 'restore' => [ @@ -76,6 +77,7 @@ 'user_does_not_exist' => 'That user is invalid. Please try again.', 'not_available' => 'That asset is not available for checkout!', 'no_assets_selected' => 'You must select at least one asset from the list', + ], 'checkin' => [ diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index 12c678e6458c..c015b2563145 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -124,6 +124,7 @@ name="note">{{ old('note', $asset->note) }} {!! $errors->first('note', '') !!} + @endif From c71411465a03499caf98937857e95ec489e865b4 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Tue, 24 Sep 2024 15:17:35 +0100 Subject: [PATCH 014/318] First pass at better-handling those annoying Rollbars we keep getting --- .../Controllers/Assets/AssetsController.php | 34 ++++++++++++++----- .../lang/en-US/admin/hardware/message.php | 3 ++ 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index dceaa9b08a41..315c86f72570 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -112,8 +112,10 @@ public function store(ImageUploadRequest $request) : RedirectResponse $settings = Setting::getSettings(); - $success = false; + $successes = 0; + $failures = 0; $serials = $request->input('serials'); + $last_succesful_asset = null; for ($a = 1; $a <= count($asset_tags); $a++) { $asset = new Asset(); @@ -200,20 +202,36 @@ public function store(ImageUploadRequest $request) : RedirectResponse $asset->checkOut($target, auth()->user(), date('Y-m-d H:i:s'), $request->input('expected_checkin', null), 'Checked out on asset creation', $request->get('name'), $location); } - $success = true; - + $last_succesful_asset = $asset; + $successes++; + + } else { + $failures++; } } session()->put(['redirect_option' => $request->get('redirect_option'), 'checkout_to_type' => $request->get('checkout_to_type')]); - if ($success) { + if ($successes > 0) { + if ($failures > 0) { + //some succeeded, some failed + return redirect()->to(Helper::getRedirectOption($request, $last_succesful_asset->id, 'Assets')) + ->with('success-unescaped', trans_choice('admin/hardware/message.create.multi_success_linked', $successes, ['link' => route('hardware.show', ['hardware' => $last_succesful_asset->id]), 'id', 'tag' => e($last_succesful_asset->asset_tag)])) + ->with('warning', trans_choice('admin/hardware/message.create.partial_failure', $failures)); + } else { + if ($successes == 1) { + //the most common case, keeping it so we don't have to make every use of that translation string be trans_choice'ed + //and re-translated + return redirect()->to(Helper::getRedirectOption($request, $last_succesful_asset->id, 'Assets')) + ->with('success-unescaped', trans('admin/hardware/message.create.success_linked', ['link' => route('hardware.show', ['hardware' => $last_succesful_asset->id]), 'id', 'tag' => e($last_succesful_asset->asset_tag)])); + } else { + //multi-success + return redirect()->to(Helper::getRedirectOption($request, $last_succesful_asset->id, 'Assets')) + ->with('success-unescaped', trans_choice('admin/hardware/message.create.multi_success_linked', $successes, ['link' => route('hardware.show', ['hardware' => $last_succesful_asset->id]), 'id', 'tag' => e($last_succesful_asset->asset_tag)])); + } + } - return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets')) - ->with('success-unescaped', trans('admin/hardware/message.create.success_linked', ['link' => route('hardware.show', ['hardware' => $asset->id]), 'id', 'tag' => e($asset->asset_tag)])); - - } return redirect()->back()->withInput()->withErrors($asset->getErrors()); diff --git a/resources/lang/en-US/admin/hardware/message.php b/resources/lang/en-US/admin/hardware/message.php index 041d32f56c90..a33aea1813e4 100644 --- a/resources/lang/en-US/admin/hardware/message.php +++ b/resources/lang/en-US/admin/hardware/message.php @@ -14,6 +14,9 @@ 'error' => 'Asset was not created, please try again. :(', 'success' => 'Asset created successfully. :)', 'success_linked' => 'Asset with tag :tag was created successfully. Click here to view.', + 'multi_success_linked' => 'Asset with tag :tag was created successfully. Click here to view.|:count assets were created succesfully. The last one was :tag. Click here to view.', + 'partial_success_linked' => 'Asset with tag :tag was created successfully. Click here to view.', + 'partial_failure' => 'An asset was unable to be created.|:count assets were unable to be created.' ], 'update' => [ From b6340532d7e34c31d65999e55440241935c6db60 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Tue, 24 Sep 2024 17:15:39 +0100 Subject: [PATCH 015/318] Improve the error and success messages and linking --- .../Controllers/Assets/AssetsController.php | 31 +++++++++---------- .../lang/en-US/admin/hardware/message.php | 5 ++- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index 315c86f72570..e37d7c59b36c 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -112,10 +112,10 @@ public function store(ImageUploadRequest $request) : RedirectResponse $settings = Setting::getSettings(); - $successes = 0; - $failures = 0; + $successes = []; + $failures = []; $serials = $request->input('serials'); - $last_succesful_asset = null; + $asset = null; for ($a = 1; $a <= count($asset_tags); $a++) { $asset = new Asset(); @@ -202,33 +202,32 @@ public function store(ImageUploadRequest $request) : RedirectResponse $asset->checkOut($target, auth()->user(), date('Y-m-d H:i:s'), $request->input('expected_checkin', null), 'Checked out on asset creation', $request->get('name'), $location); } - $last_succesful_asset = $asset; - $successes++; + $successes[] = " $asset->id]) . "' style='color: white;'>" . e($asset->asset_tag) . ""; } else { - $failures++; + $failures[] = join(",", $asset->getErrors()->all()); } } session()->put(['redirect_option' => $request->get('redirect_option'), 'checkout_to_type' => $request->get('checkout_to_type')]); - if ($successes > 0) { - if ($failures > 0) { + if ($successes) { + if ($failures) { //some succeeded, some failed - return redirect()->to(Helper::getRedirectOption($request, $last_succesful_asset->id, 'Assets')) - ->with('success-unescaped', trans_choice('admin/hardware/message.create.multi_success_linked', $successes, ['link' => route('hardware.show', ['hardware' => $last_succesful_asset->id]), 'id', 'tag' => e($last_succesful_asset->asset_tag)])) - ->with('warning', trans_choice('admin/hardware/message.create.partial_failure', $failures)); + return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets')) //FIXME - not tested + ->with('success-unescaped', trans_choice('admin/hardware/message.create.multi_success_linked', $successes, ['links' => join(", ", $successes)])) + ->with('warning', trans_choice('admin/hardware/message.create.partial_failure', $failures, ['failures' => join("; ", $failures)])); } else { - if ($successes == 1) { + if (count($successes) == 1) { //the most common case, keeping it so we don't have to make every use of that translation string be trans_choice'ed //and re-translated - return redirect()->to(Helper::getRedirectOption($request, $last_succesful_asset->id, 'Assets')) - ->with('success-unescaped', trans('admin/hardware/message.create.success_linked', ['link' => route('hardware.show', ['hardware' => $last_succesful_asset->id]), 'id', 'tag' => e($last_succesful_asset->asset_tag)])); + return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets')) + ->with('success-unescaped', trans('admin/hardware/message.create.success_linked', ['link' => route('hardware.show', ['hardware' => $asset->id]), 'id', 'tag' => e($asset->asset_tag)])); } else { //multi-success - return redirect()->to(Helper::getRedirectOption($request, $last_succesful_asset->id, 'Assets')) - ->with('success-unescaped', trans_choice('admin/hardware/message.create.multi_success_linked', $successes, ['link' => route('hardware.show', ['hardware' => $last_succesful_asset->id]), 'id', 'tag' => e($last_succesful_asset->asset_tag)])); + return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets')) + ->with('success-unescaped', trans_choice('admin/hardware/message.create.multi_success_linked', $successes, ['links' => join(", ", $successes)])); } } diff --git a/resources/lang/en-US/admin/hardware/message.php b/resources/lang/en-US/admin/hardware/message.php index a33aea1813e4..874888de9dd0 100644 --- a/resources/lang/en-US/admin/hardware/message.php +++ b/resources/lang/en-US/admin/hardware/message.php @@ -14,9 +14,8 @@ 'error' => 'Asset was not created, please try again. :(', 'success' => 'Asset created successfully. :)', 'success_linked' => 'Asset with tag :tag was created successfully. Click here to view.', - 'multi_success_linked' => 'Asset with tag :tag was created successfully. Click here to view.|:count assets were created succesfully. The last one was :tag. Click here to view.', - 'partial_success_linked' => 'Asset with tag :tag was created successfully. Click here to view.', - 'partial_failure' => 'An asset was unable to be created.|:count assets were unable to be created.' + 'multi_success_linked' => 'Asset with tag :links was created successfully.|:count assets were created succesfully. :links.', + 'partial_failure' => 'An asset was unable to be created. Reason: :failures|:count assets were unable to be created. Reasons: :failures', ], 'update' => [ From d1e2f9db34f3adad650c09d078cb11f873e7b3c8 Mon Sep 17 00:00:00 2001 From: Maciej Poleszczyk Date: Wed, 25 Sep 2024 17:56:49 +0200 Subject: [PATCH 016/318] Fixing #15064 - to not fail ldap sync on single data issue with ldap manager --- app/Console/Commands/LdapSync.php | 33 +++++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index 62fda0789286..8bde0c6e12cc 100644 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -320,22 +320,29 @@ public function handle() ] ]; } - + + $add_manager_to_cache = true; if ($ldap_manager["count"] > 0) { - - // Get the Manager's username - // PHP LDAP returns every LDAP attribute as an array, and 90% of the time it's an array of just one item. But, hey, it's an array. - $ldapManagerUsername = $ldap_manager[0][$ldap_map["username"]][0]; - - // Get User from Manager username. - $ldap_manager = User::where('username', $ldapManagerUsername)->first(); - - if ($ldap_manager && isset($ldap_manager->id)) { - // Link user to manager id. - $user->manager_id = $ldap_manager->id; + try { + // Get the Manager's username + // PHP LDAP returns every LDAP attribute as an array, and 90% of the time it's an array of just one item. But, hey, it's an array. + $ldapManagerUsername = $ldap_manager[0][$ldap_map["username"]][0]; + + // Get User from Manager username. + $ldap_manager = User::where('username', $ldapManagerUsername)->first(); + + if ($ldap_manager && isset($ldap_manager->id)) { + // Link user to manager id. + $user->manager_id = $ldap_manager->id; + } + } catch (\Exception $e) { + $add_manager_to_cache = false; + \Log::warning('Handling ldap manager ' . $item['manager'] . ' caused an exception: ' . $e->getMessage() . '. Continuing synchronization.'); } } - $manager_cache[$item['manager']] = $ldap_manager && isset($ldap_manager->id) ? $ldap_manager->id : null; // Store results in cache, even if 'failed' + if ($add_manager_to_cache) { + $manager_cache[$item['manager']] = $ldap_manager && isset($ldap_manager->id) ? $ldap_manager->id : null; // Store results in cache, even if 'failed' + } } } From 3f74ff25d2e0ddc259c6d397150ff6d5ac42d6ed Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 25 Sep 2024 16:19:09 -0700 Subject: [PATCH 017/318] fixed error message --- app/Http/Controllers/Api/StatuslabelsController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/StatuslabelsController.php b/app/Http/Controllers/Api/StatuslabelsController.php index 754ebf73231f..7e4851ff5ae1 100644 --- a/app/Http/Controllers/Api/StatuslabelsController.php +++ b/app/Http/Controllers/Api/StatuslabelsController.php @@ -95,7 +95,8 @@ public function store(Request $request) : JsonResponse $request->except('deployable', 'pending', 'archived'); if (! $request->filled('type')) { - return response()->json(Helper::formatStandardApiResponse('error', null, ['type' => ['Status label type is required.']]), 500); + + return response()->json(Helper::formatStandardApiResponse('error', null, ['type' => ['Status label type is required.']])); } $statuslabel = new Statuslabel; From 73a059c9ac528a0c604077cc1968e88b645160ad Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 1 Oct 2024 16:37:30 -0400 Subject: [PATCH 018/318] missing closing ) --- app/Http/Controllers/Assets/AssetCheckoutController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Assets/AssetCheckoutController.php b/app/Http/Controllers/Assets/AssetCheckoutController.php index 506f47680cd1..9e7a17a942ea 100644 --- a/app/Http/Controllers/Assets/AssetCheckoutController.php +++ b/app/Http/Controllers/Assets/AssetCheckoutController.php @@ -103,7 +103,7 @@ public function store(AssetCheckoutRequest $request, $assetId) : RedirectRespons $settings = \App\Models\Setting::getSettings(); if($settings->require_checkinout_notes=="1" && (is_null($request->note))) { - return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.update.no_note'); //needs translation + return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.update.no_note')); } // We have to check whether $target->company_id is null here since locations don't have a company yet From 3153bbb13fb2244a457135e7550f656a51a6ea20 Mon Sep 17 00:00:00 2001 From: spencerrlongg Date: Tue, 1 Oct 2024 17:04:18 -0500 Subject: [PATCH 019/318] dumb fix --- app/Http/Requests/Traits/MayContainCustomFields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/Traits/MayContainCustomFields.php b/app/Http/Requests/Traits/MayContainCustomFields.php index 9a7f85e3a268..bbdf62893d06 100644 --- a/app/Http/Requests/Traits/MayContainCustomFields.php +++ b/app/Http/Requests/Traits/MayContainCustomFields.php @@ -23,7 +23,7 @@ public function withValidator($validator) return str_starts_with($attributes, '_snipeit_'); }); // if there are custom fields, find the one's that don't exist on the model's fieldset and add an error to the validator's error bag - if (count($request_fields) > 0) { + if (count($request_fields) > 0 && $validator->errors()->isEmpty()) { $request_fields->diff($asset_model?->fieldset?->fields?->pluck('db_column')) ->each(function ($request_field_name) use ($request_fields, $validator) { if (CustomField::where('db_column', $request_field_name)->exists()) { From 081c5706c428a7d4556f14e9f80e82adf0bd3a4d Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 1 Aug 2024 16:06:47 -0400 Subject: [PATCH 020/318] required, but not optional --- resources/views/hardware/checkin.blade.php | 2 +- resources/views/hardware/checkout.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index 5686e74dd40e..1b1950c594dd 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -119,7 +119,7 @@ {{ trans('general.notes') }}
- {!! $errors->first('note', '') !!}
diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php index 943b4ba79810..22e1dc00a425 100755 --- a/resources/views/hardware/checkout.blade.php +++ b/resources/views/hardware/checkout.blade.php @@ -142,7 +142,7 @@ {{ trans('general.notes') }}
- {!! $errors->first('note', '') !!}
From 700647c53fb4308dba1cb937be71ffec4d5b1361 Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 1 Aug 2024 16:44:02 -0400 Subject: [PATCH 021/318] setting created --- app/Http/Controllers/SettingsController.php | 2 ++ ...8_01_201721_add_required_notes_setting.php | 30 +++++++++++++++++++ .../lang/en-US/admin/settings/general.php | 2 ++ resources/views/settings/general.blade.php | 17 +++++++++++ 4 files changed, 51 insertions(+) create mode 100644 database/migrations/2024_08_01_201721_add_required_notes_setting.php diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index b9026aaecece..d17da3c73775 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -343,6 +343,8 @@ public function postSettings(Request $request) : RedirectResponse $setting->depreciation_method = $request->input('depreciation_method'); $setting->dash_chart_type = $request->input('dash_chart_type'); $setting->profile_edit = $request->input('profile_edit', 0); + $setting->require_checkinout_notes = $request->input('require_checkinout_notes', 0); + if ($request->input('per_page') != '') { $setting->per_page = $request->input('per_page'); diff --git a/database/migrations/2024_08_01_201721_add_required_notes_setting.php b/database/migrations/2024_08_01_201721_add_required_notes_setting.php new file mode 100644 index 000000000000..d4934ed7fb93 --- /dev/null +++ b/database/migrations/2024_08_01_201721_add_required_notes_setting.php @@ -0,0 +1,30 @@ +boolean('require_checkinout_notes')->nullable()->default(1); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('settings', function (Blueprint $table) { + if (Schema::hasColumn('settings', 'require_checkinout_notes')) { + $table->dropColumn('require_checkinout_notes'); + } + }); + } +}; diff --git a/resources/lang/en-US/admin/settings/general.php b/resources/lang/en-US/admin/settings/general.php index 9a81886ae8f4..b30a2518942e 100644 --- a/resources/lang/en-US/admin/settings/general.php +++ b/resources/lang/en-US/admin/settings/general.php @@ -280,6 +280,8 @@ 'two_factor_enrollment_text' => "Two factor authentication is required, however your device has not been enrolled yet. Open your Google Authenticator app and scan the QR code below to enroll your device. Once you've enrolled your device, enter the code below", 'require_accept_signature' => 'Require Signature', 'require_accept_signature_help_text' => 'Enabling this feature will require users to physically sign off on accepting an asset.', + 'require_checkinout_notes' => 'Require Notes on Checkin/Checkout', + 'require_checkinout_notes_help_text' => 'Enabling this feature will require the note fields to be populated when checking in or checking out an asset.', 'left' => 'left', 'right' => 'right', 'top' => 'top', diff --git a/resources/views/settings/general.blade.php b/resources/views/settings/general.blade.php index c800b26ac9d3..c3d419fe9870 100644 --- a/resources/views/settings/general.blade.php +++ b/resources/views/settings/general.blade.php @@ -215,6 +215,23 @@ + +
+
+ +
+
+ +

{{ trans('admin/settings/general.require_checkinout_notes_help_text') }}

+
+
+ +
From 8b643cb3b9dc40c1513acbbac4e0d3be2d6c04d4 Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 1 Aug 2024 17:02:35 -0400 Subject: [PATCH 022/318] note field optional --- resources/views/hardware/checkin.blade.php | 30 +++++++++++++-------- resources/views/hardware/checkout.blade.php | 8 ++++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index 1b1950c594dd..ce63d6e723f8 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -113,17 +113,25 @@
- -
- -
- - {!! $errors->first('note', '') !!} -
-
+ +
+ + @if($snipeSettings->require_checkinout_notes=="1") +
+ + {!! $errors->first('note', '') !!} +
+ @else +
+ + {!! $errors->first('note', '') !!} +
+ @endif +
diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php index 22e1dc00a425..fadb7a1abcfa 100755 --- a/resources/views/hardware/checkout.blade.php +++ b/resources/views/hardware/checkout.blade.php @@ -141,11 +141,19 @@ + @if($snipeSettings->require_checkinout_notes=="1")
{!! $errors->first('note', '') !!}
+ @else +
+ + {!! $errors->first('note', '') !!} +
+ @endif @if ($asset->requireAcceptance() || $asset->getEula() || ($snipeSettings->webhook_endpoint!='')) From 5e74b109d9805fb7978e118139421641357dbedd Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 20 Aug 2024 19:07:47 -0400 Subject: [PATCH 023/318] front end changes/updates from gh --- .../migrations/2024_08_01_201721_add_required_notes_setting.php | 2 +- resources/views/hardware/checkin.blade.php | 2 +- resources/views/hardware/checkout.blade.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/database/migrations/2024_08_01_201721_add_required_notes_setting.php b/database/migrations/2024_08_01_201721_add_required_notes_setting.php index d4934ed7fb93..38fdd38c1137 100644 --- a/database/migrations/2024_08_01_201721_add_required_notes_setting.php +++ b/database/migrations/2024_08_01_201721_add_required_notes_setting.php @@ -12,7 +12,7 @@ public function up(): void { Schema::table('settings', function (Blueprint $table) { - $table->boolean('require_checkinout_notes')->nullable()->default(1); + $table->boolean('require_checkinout_notes')->nullable()->default(0); }); } diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index ce63d6e723f8..8b1807cc50e8 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -119,7 +119,7 @@ {{ trans('general.notes') }} @if($snipeSettings->require_checkinout_notes=="1") -
+
{!! $errors->first('note', '') !!} diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php index fadb7a1abcfa..a37f705179ea 100755 --- a/resources/views/hardware/checkout.blade.php +++ b/resources/views/hardware/checkout.blade.php @@ -142,7 +142,7 @@ {{ trans('general.notes') }} @if($snipeSettings->require_checkinout_notes=="1") -
+
{!! $errors->first('note', '') !!} From 515f59fed977fb936814154a762554f800be5234 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 3 Sep 2024 15:02:27 -0400 Subject: [PATCH 024/318] more test work --- app/Http/Requests/AssetCheckinRequest.php | 4 ++-- app/Http/Requests/AssetCheckoutRequest.php | 1 + resources/views/hardware/checkin.blade.php | 7 ------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 116b8b39f22a..dec4b0912f55 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -21,9 +21,9 @@ public function authorize() */ public function rules() { - return [ + 'note' => 'required|in:asset,', - ]; + return $rules; } public function response(array $errors) diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index f48a7d5e534f..0f42076c9b92 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -27,6 +27,7 @@ public function rules() 'assigned_location' => 'required_without_all:assigned_user,assigned_asset', 'status_id' => 'exists:status_labels,id,deployable,1', 'checkout_to_type' => 'required|in:asset,location,user', + 'note' => 'required|in:asset,', 'checkout_at' => [ 'nullable', 'date', diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index 8b1807cc50e8..5083325a8efc 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -124,13 +124,6 @@ name="note">{{ old('note', $asset->note) }} {!! $errors->first('note', '') !!}
- @else -
- - {!! $errors->first('note', '') !!} -
- @endif
From bd6698de2a990bda2e0bd9559e680e519c93df8a Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 4 Sep 2024 17:50:52 -0400 Subject: [PATCH 025/318] fixing some formatting --- app/Http/Requests/AssetCheckinRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index dec4b0912f55..436a2a9d582a 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -21,7 +21,7 @@ public function authorize() */ public function rules() { - 'note' => 'required|in:asset,', + 'note' => 'required|in:asset,', return $rules; } From 925aea853190e8964a23966fc892143d07c6e76e Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 4 Sep 2024 17:53:19 -0400 Subject: [PATCH 026/318] back to having tests pass. needed to comment out the notes rules() i added --- app/Http/Requests/AssetCheckinRequest.php | 12 ++++++------ app/Http/Requests/AssetCheckoutRequest.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 436a2a9d582a..3bee83a81097 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -19,12 +19,12 @@ public function authorize() * * @return array */ - public function rules() - { - 'note' => 'required|in:asset,', - - return $rules; - } +// public function rules() +// { +// 'note' => 'required|in:asset,', +// +// return $rules; +// } public function response(array $errors) { diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index 0f42076c9b92..9064e6dcd03c 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -27,7 +27,7 @@ public function rules() 'assigned_location' => 'required_without_all:assigned_user,assigned_asset', 'status_id' => 'exists:status_labels,id,deployable,1', 'checkout_to_type' => 'required|in:asset,location,user', - 'note' => 'required|in:asset,', +// 'note' => 'required|in:asset,', 'checkout_at' => [ 'nullable', 'date', From f45b8360105ea52fd8ab2bd78684b0b70bc92305 Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 4 Sep 2024 18:23:36 -0400 Subject: [PATCH 027/318] backend form validation. +cleanup --- .../Controllers/Assets/AssetCheckinController.php | 6 ++++++ .../Controllers/Assets/AssetCheckoutController.php | 4 ++++ app/Http/Requests/AssetCheckinRequest.php | 12 ------------ app/Http/Requests/AssetCheckoutRequest.php | 1 - resources/lang/en-US/admin/hardware/message.php | 2 ++ resources/views/hardware/checkin.blade.php | 1 + 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetCheckinController.php b/app/Http/Controllers/Assets/AssetCheckinController.php index f84a468a60e7..2c49f78bfbfb 100644 --- a/app/Http/Controllers/Assets/AssetCheckinController.php +++ b/app/Http/Controllers/Assets/AssetCheckinController.php @@ -116,6 +116,12 @@ public function store(AssetCheckinRequest $request, $assetId = null, $backto = n $seat->update(['assigned_to' => null]); }); + $settings = \App\Models\Setting::getSettings(); + + if($settings->require_checkinout_notes=="1" && (is_null($request->note))) { + return redirect()->to("hardware/$assetId/checkin")->with('error', trans('admin/hardware/message.update.no_note')); + } + // Get all pending Acceptances for this asset and delete them $acceptances = CheckoutAcceptance::pending()->whereHasMorph('checkoutable', [Asset::class], diff --git a/app/Http/Controllers/Assets/AssetCheckoutController.php b/app/Http/Controllers/Assets/AssetCheckoutController.php index 05b766916be8..506f47680cd1 100644 --- a/app/Http/Controllers/Assets/AssetCheckoutController.php +++ b/app/Http/Controllers/Assets/AssetCheckoutController.php @@ -102,6 +102,10 @@ public function store(AssetCheckoutRequest $request, $assetId) : RedirectRespons $settings = \App\Models\Setting::getSettings(); + if($settings->require_checkinout_notes=="1" && (is_null($request->note))) { + return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.update.no_note'); //needs translation + } + // We have to check whether $target->company_id is null here since locations don't have a company yet if (($settings->full_multiple_companies_support) && ((!is_null($target->company_id)) && (!is_null($asset->company_id)))) { if ($target->company_id != $asset->company_id){ diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 3bee83a81097..ea2847189942 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -14,18 +14,6 @@ public function authorize() return true; } - /** - * Get the validation rules that apply to the request. - * - * @return array - */ -// public function rules() -// { -// 'note' => 'required|in:asset,', -// -// return $rules; -// } - public function response(array $errors) { return $this->redirector->back()->withInput()->withErrors($errors, $this->errorBag); diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index 9064e6dcd03c..f48a7d5e534f 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -27,7 +27,6 @@ public function rules() 'assigned_location' => 'required_without_all:assigned_user,assigned_asset', 'status_id' => 'exists:status_labels,id,deployable,1', 'checkout_to_type' => 'required|in:asset,location,user', -// 'note' => 'required|in:asset,', 'checkout_at' => [ 'nullable', 'date', diff --git a/resources/lang/en-US/admin/hardware/message.php b/resources/lang/en-US/admin/hardware/message.php index 041d32f56c90..32358cb6dd8d 100644 --- a/resources/lang/en-US/admin/hardware/message.php +++ b/resources/lang/en-US/admin/hardware/message.php @@ -23,6 +23,7 @@ 'nothing_updated' => 'No fields were selected, so nothing was updated.', 'no_assets_selected' => 'No assets were selected, so nothing was updated.', 'assets_do_not_exist_or_are_invalid' => 'Selected assets cannot be updated.', + 'no_note' => 'Note field is empty', ], 'restore' => [ @@ -77,6 +78,7 @@ 'user_does_not_exist' => 'That user is invalid. Please try again.', 'not_available' => 'That asset is not available for checkout!', 'no_assets_selected' => 'You must select at least one asset from the list', + ], 'checkin' => [ diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php index 5083325a8efc..2b087cb58b6e 100755 --- a/resources/views/hardware/checkin.blade.php +++ b/resources/views/hardware/checkin.blade.php @@ -124,6 +124,7 @@ name="note">{{ old('note', $asset->note) }} {!! $errors->first('note', '') !!} + @endif From 6fef127cd12a71575ba62b6fac432b7e1826bf87 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 1 Oct 2024 16:37:30 -0400 Subject: [PATCH 028/318] missing closing ) --- app/Http/Controllers/Assets/AssetCheckoutController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Assets/AssetCheckoutController.php b/app/Http/Controllers/Assets/AssetCheckoutController.php index 506f47680cd1..9e7a17a942ea 100644 --- a/app/Http/Controllers/Assets/AssetCheckoutController.php +++ b/app/Http/Controllers/Assets/AssetCheckoutController.php @@ -103,7 +103,7 @@ public function store(AssetCheckoutRequest $request, $assetId) : RedirectRespons $settings = \App\Models\Setting::getSettings(); if($settings->require_checkinout_notes=="1" && (is_null($request->note))) { - return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.update.no_note'); //needs translation + return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.update.no_note')); } // We have to check whether $target->company_id is null here since locations don't have a company yet From 17706f150e3b6c243bfb4cc6b45358958f13ddb7 Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 2 Oct 2024 18:15:32 -0400 Subject: [PATCH 029/318] requested changes --- .../Controllers/Assets/AssetCheckinController.php | 2 +- .../Assets/AssetCheckoutController.php | 2 +- app/Http/Requests/AssetCheckinRequest.php | 15 +++++++++++++++ app/Models/Setting.php | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetCheckinController.php b/app/Http/Controllers/Assets/AssetCheckinController.php index 2c49f78bfbfb..1d64da98e25b 100644 --- a/app/Http/Controllers/Assets/AssetCheckinController.php +++ b/app/Http/Controllers/Assets/AssetCheckinController.php @@ -118,7 +118,7 @@ public function store(AssetCheckinRequest $request, $assetId = null, $backto = n $settings = \App\Models\Setting::getSettings(); - if($settings->require_checkinout_notes=="1" && (is_null($request->note))) { + if($settings->require_checkinout_notes && (is_null($request->note))) { return redirect()->to("hardware/$assetId/checkin")->with('error', trans('admin/hardware/message.update.no_note')); } diff --git a/app/Http/Controllers/Assets/AssetCheckoutController.php b/app/Http/Controllers/Assets/AssetCheckoutController.php index 9e7a17a942ea..a73e85db52f8 100644 --- a/app/Http/Controllers/Assets/AssetCheckoutController.php +++ b/app/Http/Controllers/Assets/AssetCheckoutController.php @@ -102,7 +102,7 @@ public function store(AssetCheckoutRequest $request, $assetId) : RedirectRespons $settings = \App\Models\Setting::getSettings(); - if($settings->require_checkinout_notes=="1" && (is_null($request->note))) { + if($settings->require_checkinout_notes= && (is_null($request->note))) { return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.update.no_note')); } diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index ea2847189942..59ab1a72ec7c 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -14,6 +14,21 @@ public function authorize() return true; } + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + $rules = []; + + if($this->settings->require_checkinout_notes) { + $rules['notes'] = 'required|string'; + } + return $rules; + } + public function response(array $errors) { return $this->redirector->back()->withInput()->withErrors($errors, $this->errorBag); diff --git a/app/Models/Setting.php b/app/Models/Setting.php index d775be81c52c..188884450873 100755 --- a/app/Models/Setting.php +++ b/app/Models/Setting.php @@ -99,6 +99,7 @@ class Setting extends Model protected $casts = [ 'label2_asset_logo' => 'boolean', + 'require_checkinout_notes' => 'boolean', ]; /** From 06e3bb7fd13fb307161ad3f0864babea658354f9 Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 2 Oct 2024 18:37:11 -0400 Subject: [PATCH 030/318] requested changes --- app/Http/Controllers/Assets/AssetCheckinController.php | 2 +- app/Http/Controllers/Assets/AssetCheckoutController.php | 2 +- app/Http/Requests/AssetCheckinRequest.php | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetCheckinController.php b/app/Http/Controllers/Assets/AssetCheckinController.php index 1d64da98e25b..ec92070bb494 100644 --- a/app/Http/Controllers/Assets/AssetCheckinController.php +++ b/app/Http/Controllers/Assets/AssetCheckinController.php @@ -118,7 +118,7 @@ public function store(AssetCheckinRequest $request, $assetId = null, $backto = n $settings = \App\Models\Setting::getSettings(); - if($settings->require_checkinout_notes && (is_null($request->note))) { + if($settings->require_checkinout_notes == '1' && (is_null($request->note))) { return redirect()->to("hardware/$assetId/checkin")->with('error', trans('admin/hardware/message.update.no_note')); } diff --git a/app/Http/Controllers/Assets/AssetCheckoutController.php b/app/Http/Controllers/Assets/AssetCheckoutController.php index a73e85db52f8..0797c86d5472 100644 --- a/app/Http/Controllers/Assets/AssetCheckoutController.php +++ b/app/Http/Controllers/Assets/AssetCheckoutController.php @@ -102,7 +102,7 @@ public function store(AssetCheckoutRequest $request, $assetId) : RedirectRespons $settings = \App\Models\Setting::getSettings(); - if($settings->require_checkinout_notes= && (is_null($request->note))) { + if($settings->require_checkinout_notes == '1' && (is_null($request->note))) { return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.update.no_note')); } diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 59ab1a72ec7c..6e7e8aa6fae0 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -21,10 +21,12 @@ public function authorize() */ public function rules() { + $setting = + $rules = []; - if($this->settings->require_checkinout_notes) { - $rules['notes'] = 'required|string'; + if($setting->require_checkinout_notes == '1') { + $rules['notes'] = 'required|string|nullable'; } return $rules; } From e00a1aec026e53a9af01269bf344933d6eb85c8e Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 2 Oct 2024 18:52:33 -0400 Subject: [PATCH 031/318] note box is now missing when unchecking setting --- app/Http/Controllers/Assets/AssetCheckinController.php | 2 +- app/Http/Controllers/Assets/AssetCheckoutController.php | 2 +- app/Http/Requests/AssetCheckinRequest.php | 5 +++-- app/Http/Requests/AssetCheckoutRequest.php | 7 +++++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetCheckinController.php b/app/Http/Controllers/Assets/AssetCheckinController.php index ec92070bb494..1d64da98e25b 100644 --- a/app/Http/Controllers/Assets/AssetCheckinController.php +++ b/app/Http/Controllers/Assets/AssetCheckinController.php @@ -118,7 +118,7 @@ public function store(AssetCheckinRequest $request, $assetId = null, $backto = n $settings = \App\Models\Setting::getSettings(); - if($settings->require_checkinout_notes == '1' && (is_null($request->note))) { + if($settings->require_checkinout_notes && (is_null($request->note))) { return redirect()->to("hardware/$assetId/checkin")->with('error', trans('admin/hardware/message.update.no_note')); } diff --git a/app/Http/Controllers/Assets/AssetCheckoutController.php b/app/Http/Controllers/Assets/AssetCheckoutController.php index 0797c86d5472..ef60a589d7c7 100644 --- a/app/Http/Controllers/Assets/AssetCheckoutController.php +++ b/app/Http/Controllers/Assets/AssetCheckoutController.php @@ -102,7 +102,7 @@ public function store(AssetCheckoutRequest $request, $assetId) : RedirectRespons $settings = \App\Models\Setting::getSettings(); - if($settings->require_checkinout_notes == '1' && (is_null($request->note))) { + if($settings->require_checkinout_notes && (is_null($request->note))) { return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.update.no_note')); } diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 6e7e8aa6fae0..7321aed193cc 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -21,11 +21,12 @@ public function authorize() */ public function rules() { - $setting = + $settings = \App\Models\Setting::getSettings(); $rules = []; - if($setting->require_checkinout_notes == '1') { + if($settings->require_checkinout_notes) { + // dd($settings->require_checkinout_notes); $rules['notes'] = 'required|string|nullable'; } return $rules; diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index f48a7d5e534f..27372055f8c5 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -21,6 +21,8 @@ public function authorize() */ public function rules() { + $settings = \App\Models\Setting::getSettings(); + $rules = [ 'assigned_user' => 'required_without_all:assigned_asset,assigned_location', 'assigned_asset' => 'required_without_all:assigned_user,assigned_location', @@ -35,6 +37,11 @@ public function rules() 'nullable', 'date' ], + + if($settings->require_checkinout_notes) { + // dd($settings->require_checkinout_notes); + $rules['notes'] = 'required|string|nullable'; + } ]; return $rules; From 0c84904bf9dba7a1d500086f53dd198d6460489d Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 2 Oct 2024 18:56:41 -0400 Subject: [PATCH 032/318] un'required'ing the rule. not sure what's breaking here but looking --- app/Http/Requests/AssetCheckinRequest.php | 2 +- app/Http/Requests/AssetCheckoutRequest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 7321aed193cc..3d958aae1844 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -27,7 +27,7 @@ public function rules() if($settings->require_checkinout_notes) { // dd($settings->require_checkinout_notes); - $rules['notes'] = 'required|string|nullable'; + $rules['notes'] = 'string|nullable'; } return $rules; } diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index 27372055f8c5..91ed094ae3cb 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -37,12 +37,12 @@ public function rules() 'nullable', 'date' ], + ]; if($settings->require_checkinout_notes) { // dd($settings->require_checkinout_notes); - $rules['notes'] = 'required|string|nullable'; + $rules['notes'] = 'string|nullable'; } - ]; return $rules; } From 0c71b71fe02e33d9cd339e83295293039165f71d Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Mon, 7 Oct 2024 18:07:33 +0100 Subject: [PATCH 033/318] Prevent setting assigned_to without setting assigned_type --- app/Http/Controllers/Api/AssetsController.php | 76 +++++++++---------- app/Models/Asset.php | 1 + tests/Unit/AssetTest.php | 10 +++ 3 files changed, 48 insertions(+), 39 deletions(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index d4a103be3732..dbdc712bf763 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -670,8 +670,6 @@ public function store(StoreAssetRequest $request): JsonResponse } return response()->json(Helper::formatStandardApiResponse('success', $asset, trans('admin/hardware/message.create.success'))); - - return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset), trans('admin/hardware/message.create.success'))); } return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()), 200); @@ -711,50 +709,50 @@ public function update(UpdateAssetRequest $request, Asset $asset): JsonResponse $asset = $request->handleImages($asset); $model = $asset->model; - - // Update custom fields - $problems_updating_encrypted_custom_fields = false; - if (($model) && (isset($model->fieldset))) { - foreach ($model->fieldset->fields as $field) { - $field_val = $request->input($field->db_column, null); - - if ($request->has($field->db_column)) { - if ($field->element == 'checkbox') { - if(is_array($field_val)) { - $field_val = implode(',', $field_val); - } + + // Update custom fields + $problems_updating_encrypted_custom_fields = false; + if (($model) && (isset($model->fieldset))) { + foreach ($model->fieldset->fields as $field) { + $field_val = $request->input($field->db_column, null); + + if ($request->has($field->db_column)) { + if ($field->element == 'checkbox') { + if (is_array($field_val)) { + $field_val = implode(',', $field_val); } - if ($field->field_encrypted == '1') { - if (Gate::allows('assets.view.encrypted_custom_fields')) { - $field_val = Crypt::encrypt($field_val); - } else { - $problems_updating_encrypted_custom_fields = true; - continue; - } + } + if ($field->field_encrypted == '1') { + if (Gate::allows('assets.view.encrypted_custom_fields')) { + $field_val = Crypt::encrypt($field_val); + } else { + $problems_updating_encrypted_custom_fields = true; + continue; } - $asset->{$field->db_column} = $field_val; } + $asset->{$field->db_column} = $field_val; } } - if ($asset->save()) { - if (($request->filled('assigned_user')) && ($target = User::find($request->get('assigned_user')))) { - $location = $target->location_id; - } elseif (($request->filled('assigned_asset')) && ($target = Asset::find($request->get('assigned_asset')))) { - $location = $target->location_id; - - Asset::where('assigned_type', \App\Models\Asset::class)->where('assigned_to', $asset->id) - ->update(['location_id' => $target->location_id]); - } elseif (($request->filled('assigned_location')) && ($target = Location::find($request->get('assigned_location')))) { - $location = $target->id; - } + } + if ($asset->save()) { + if (($request->filled('assigned_user')) && ($target = User::find($request->get('assigned_user')))) { + $location = $target->location_id; + } elseif (($request->filled('assigned_asset')) && ($target = Asset::find($request->get('assigned_asset')))) { + $location = $target->location_id; + + Asset::where('assigned_type', \App\Models\Asset::class)->where('assigned_to', $asset->id) + ->update(['location_id' => $target->location_id]); + } elseif (($request->filled('assigned_location')) && ($target = Location::find($request->get('assigned_location')))) { + $location = $target->id; + } - if (isset($target)) { - $asset->checkOut($target, auth()->user(), date('Y-m-d H:i:s'), '', 'Checked out on asset update', e($request->get('name')), $location); - } + if (isset($target)) { + $asset->checkOut($target, auth()->user(), date('Y-m-d H:i:s'), '', 'Checked out on asset update', e($request->get('name')), $location); + } - if ($asset->image) { - $asset->image = $asset->getImageUrl(); - } + if ($asset->image) { + $asset->image = $asset->getImageUrl(); + } if ($problems_updating_encrypted_custom_fields) { return response()->json(Helper::formatStandardApiResponse('success', $asset, trans('admin/hardware/message.update.encrypted_warning'))); diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 73010657126f..a228bf79481e 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -120,6 +120,7 @@ public function declinedCheckout(User $declinedBy, $signature) 'order_number' => ['nullable', 'string', 'max:191'], 'notes' => ['nullable', 'string', 'max:65535'], 'assigned_to' => ['nullable', 'integer'], + 'assigned_type' => ['nullable', 'required_with:assigned_to'], 'requestable' => ['nullable', 'boolean'], 'assigned_user' => ['nullable', 'exists:users,id,deleted_at,NULL'], 'assigned_location' => ['nullable', 'exists:locations,id,deleted_at,NULL'], diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.php index d0f3af623373..aea894f9fb94 100644 --- a/tests/Unit/AssetTest.php +++ b/tests/Unit/AssetTest.php @@ -4,6 +4,7 @@ use App\Models\Asset; use App\Models\AssetModel; use App\Models\Category; +use App\Models\User; use Carbon\Carbon; use Tests\TestCase; use App\Models\Setting; @@ -189,4 +190,13 @@ public function testWarrantyExpiresAttribute() $this->assertEquals(Carbon::createFromDate(2019, 1, 1)->format('Y-m-d'), $asset->warranty_expires->format('Y-m-d')); } + + public function testAssignedTypeWithoutAssignTo() + { + $user = User::factory()->create(); + $asset = Asset::factory()->create([ + 'assigned_to' => $user->id + ]); + $this->assertModelMissing($asset); + } } From 8687e188fea5e9422e7c209a6b3a5fa05d76cd3d Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Mon, 7 Oct 2024 18:14:58 +0100 Subject: [PATCH 034/318] Fixed tests to include assigned_type when setting assigned_to --- tests/Feature/Assets/Api/AssetIndexTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Feature/Assets/Api/AssetIndexTest.php b/tests/Feature/Assets/Api/AssetIndexTest.php index c4a362d28b71..8554edb3d459 100644 --- a/tests/Feature/Assets/Api/AssetIndexTest.php +++ b/tests/Feature/Assets/Api/AssetIndexTest.php @@ -83,7 +83,7 @@ public function testAssetApiIndexReturnsDueOrOverdueForAudit() public function testAssetApiIndexReturnsDueForExpectedCheckin() { - Asset::factory()->count(3)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->format('Y-m-d')]); + Asset::factory()->count(3)->create(['assigned_to' => '1', 'assigned_type' => User::class, 'expected_checkin' => Carbon::now()->format('Y-m-d')]); $this->actingAsForApi(User::factory()->superuser()->create()) ->getJson( @@ -99,7 +99,7 @@ public function testAssetApiIndexReturnsDueForExpectedCheckin() public function testAssetApiIndexReturnsOverdueForExpectedCheckin() { - Asset::factory()->count(3)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->subDays(1)->format('Y-m-d')]); + Asset::factory()->count(3)->create(['assigned_to' => '1', 'assigned_type' => User::class, 'expected_checkin' => Carbon::now()->subDays(1)->format('Y-m-d')]); $this->actingAsForApi(User::factory()->superuser()->create()) ->getJson(route('api.assets.list-upcoming', ['action' => 'checkins', 'upcoming_status' => 'overdue'])) @@ -113,8 +113,8 @@ public function testAssetApiIndexReturnsOverdueForExpectedCheckin() public function testAssetApiIndexReturnsDueOrOverdueForExpectedCheckin() { - Asset::factory()->count(3)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->subDays(1)->format('Y-m-d')]); - Asset::factory()->count(2)->create(['assigned_to' => '1', 'expected_checkin' => Carbon::now()->format('Y-m-d')]); + Asset::factory()->count(3)->create(['assigned_to' => '1', 'assigned_type' => User::class, 'expected_checkin' => Carbon::now()->subDays(1)->format('Y-m-d')]); + Asset::factory()->count(2)->create(['assigned_to' => '1', 'assigned_type' => User::class, 'expected_checkin' => Carbon::now()->format('Y-m-d')]); $this->actingAsForApi(User::factory()->superuser()->create()) ->getJson(route('api.assets.list-upcoming', ['action' => 'checkins', 'upcoming_status' => 'due-or-overdue'])) From 7438d01f4dc9eb3c36809ba010009ce85c897780 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Mon, 7 Oct 2024 20:40:22 +0100 Subject: [PATCH 035/318] Add new tests for assigned_to without assigned_type --- app/Http/Requests/StoreAssetRequest.php | 1 - app/Observers/AssetObserver.php | 5 ++- tests/Feature/Assets/Api/StoreAssetTest.php | 35 +++++++++++++++++ tests/Feature/Assets/Api/UpdateAssetTest.php | 40 ++++++++++++++++++++ 4 files changed, 78 insertions(+), 3 deletions(-) diff --git a/app/Http/Requests/StoreAssetRequest.php b/app/Http/Requests/StoreAssetRequest.php index e1665e213696..77b1d07aa17e 100644 --- a/app/Http/Requests/StoreAssetRequest.php +++ b/app/Http/Requests/StoreAssetRequest.php @@ -38,7 +38,6 @@ public function prepareForValidation(): void $this->merge([ 'asset_tag' => $this->asset_tag ?? Asset::autoincrement_asset(), 'company_id' => $idForCurrentUser, - 'assigned_to' => $assigned_to ?? null, ]); } diff --git a/app/Observers/AssetObserver.php b/app/Observers/AssetObserver.php index 0d01428ea8e9..a8f5f09ae8de 100644 --- a/app/Observers/AssetObserver.php +++ b/app/Observers/AssetObserver.php @@ -40,8 +40,9 @@ public function updating(Asset $asset) // If the asset isn't being checked out or audited, log the update. // (Those other actions already create log entries.) - if (($attributes['assigned_to'] == $attributesOriginal['assigned_to']) - && ($same_checkout_counter) && ($same_checkin_counter) + if (array_key_exists('assigned_to', $attributes) && array_key_exists('assigned_to', $attributesOriginal) + && ($attributes['assigned_to'] == $attributesOriginal['assigned_to']) + && ($same_checkout_counter) && ($same_checkin_counter) && ((isset( $attributes['next_audit_date']) ? $attributes['next_audit_date'] : null) == (isset($attributesOriginal['next_audit_date']) ? $attributesOriginal['next_audit_date']: null)) && ($attributes['last_checkout'] == $attributesOriginal['last_checkout']) && (!$restoring_or_deleting)) { diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index a14750451945..8a5539fbbed9 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -162,6 +162,41 @@ public function testSaveWithPendingStatusAndUserReturnsValidationError() $this->assertNotNull($response->json('messages.status_id')); } + public function testSaveWithAssignedToChecksOut() + { + $user = User::factory()->create(); + $response = $this->actingAsForApi(User::factory()->superuser()->create()) + ->postJson(route('api.assets.store'), [ + 'asset_tag' => '1235', + 'assigned_to' => $user->id, + 'assigned_type' => User::class, + 'model_id' => AssetModel::factory()->create()->id, + 'status_id' => Statuslabel::factory()->readyToDeploy()->create()->id, + ]) + ->assertOk() + ->assertStatusMessageIs('success'); + + $asset = Asset::find($response->json()['payload']['id']); + $this->assertEquals($user->id, $asset->assigned_to); + $this->assertEquals('Asset created successfully. :)', $response->json('messages')); + } + + + public function testSaveWithNoAssignedTypeReturnsValidationError() + { + $response = $this->actingAsForApi(User::factory()->superuser()->create()) + ->postJson(route('api.assets.store'), [ + 'asset_tag' => '1235', + 'assigned_to' => '1', +// 'assigned_type' => User::class, //deliberately omit assigned_type + 'model_id' => AssetModel::factory()->create()->id, + 'status_id' => Statuslabel::factory()->readyToDeploy()->create()->id, + ]) + ->assertOk() + ->assertStatusMessageIs('error'); + $this->assertNotNull($response->json('messages.assigned_type')); + } + public function testSaveWithPendingStatusWithoutUserIsSuccessful() { $response = $this->actingAsForApi(User::factory()->superuser()->create()) diff --git a/tests/Feature/Assets/Api/UpdateAssetTest.php b/tests/Feature/Assets/Api/UpdateAssetTest.php index df4448a2db5c..9c778d071787 100644 --- a/tests/Feature/Assets/Api/UpdateAssetTest.php +++ b/tests/Feature/Assets/Api/UpdateAssetTest.php @@ -423,6 +423,46 @@ public function testCheckoutToUserOnAssetUpdate() $this->assertEquals($asset->assigned_type, 'App\Models\User'); } + public function testCheckoutToUserWithAssignedToAndAssignedType() + { + $asset = Asset::factory()->create(); + $user = User::factory()->editAssets()->create(); + $assigned_user = User::factory()->create(); + + $response = $this->actingAsForApi($user) + ->patchJson(route('api.assets.update', $asset->id), [ + 'assigned_to' => $assigned_user->id, + 'assigned_type' => User::class + ]) + ->assertOk() + ->assertStatusMessageIs('success') + ->json(); + + $asset->refresh(); + $this->assertEquals($assigned_user->id, $asset->assigned_to); + $this->assertEquals($asset->assigned_type, 'App\Models\User'); + } + + public function testCheckoutToUserWithAssignedToWithoutAssignedType() + { + $asset = Asset::factory()->create(); + $user = User::factory()->editAssets()->create(); + $assigned_user = User::factory()->create(); + + $response = $this->actingAsForApi($user) + ->patchJson(route('api.assets.update', $asset->id), [ + 'assigned_to' => $assigned_user->id, +// 'assigned_type' => User::class //deliberately omit assigned_type + ]) + ->assertOk() + ->assertStatusMessageIs('error'); + + $asset->refresh(); + $this->assertNotEquals($assigned_user->id, $asset->assigned_to); + $this->assertNotEquals($asset->assigned_type, 'App\Models\User'); + $this->assertNotNull($response->json('messages.assigned_type')); + } + public function testCheckoutToDeletedUserFailsOnAssetUpdate() { $asset = Asset::factory()->create(); From 299e743848a5b0b3f2b3fdc508a8097917c906c8 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 8 Oct 2024 15:51:53 -0400 Subject: [PATCH 036/318] weird requesting --- app/Http/Requests/AssetCheckoutRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index 91ed094ae3cb..10e8bfbed553 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -41,7 +41,7 @@ public function rules() if($settings->require_checkinout_notes) { // dd($settings->require_checkinout_notes); - $rules['notes'] = 'string|nullable'; + $rules['notes'] = 'required|string|nullable'; } return $rules; From 5330769e0ee2c7a290e3633037ea2ee974f8fff2 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Thu, 10 Oct 2024 13:49:14 +0100 Subject: [PATCH 037/318] Added tighter validation to assigned_to and assigned_type, new tests --- app/Http/Controllers/Api/AssetsController.php | 4 ++ app/Models/Asset.php | 4 +- tests/Feature/Assets/Api/StoreAssetTest.php | 29 ++++++++++++++ tests/Feature/Assets/Api/UpdateAssetTest.php | 40 +++++++++++++++++++ 4 files changed, 75 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index dbdc712bf763..d165a9d66035 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -670,6 +670,10 @@ public function store(StoreAssetRequest $request): JsonResponse } return response()->json(Helper::formatStandardApiResponse('success', $asset, trans('admin/hardware/message.create.success'))); + + // below is what we want the _eventual_ return to look like - in a more standardized format. + // return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset), trans('admin/hardware/message.create.success'))); + } return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()), 200); diff --git a/app/Models/Asset.php b/app/Models/Asset.php index a228bf79481e..709389e5d720 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -119,8 +119,8 @@ public function declinedCheckout(User $declinedBy, $signature) 'byod' => ['nullable', 'boolean'], 'order_number' => ['nullable', 'string', 'max:191'], 'notes' => ['nullable', 'string', 'max:65535'], - 'assigned_to' => ['nullable', 'integer'], - 'assigned_type' => ['nullable', 'required_with:assigned_to'], + 'assigned_to' => ['nullable', 'integer', 'required_with:assigned_type'], + 'assigned_type' => ['nullable', 'required_with:assigned_to', 'in:'.User::class.",".Location::class.",".Asset::class], 'requestable' => ['nullable', 'boolean'], 'assigned_user' => ['nullable', 'exists:users,id,deleted_at,NULL'], 'assigned_location' => ['nullable', 'exists:locations,id,deleted_at,NULL'], diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index 8a5539fbbed9..6ea73e9151ff 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -197,6 +197,35 @@ public function testSaveWithNoAssignedTypeReturnsValidationError() $this->assertNotNull($response->json('messages.assigned_type')); } + public function testSaveWithBadAssignedTypeReturnsValidationError() + { + $response = $this->actingAsForApi(User::factory()->superuser()->create()) + ->postJson(route('api.assets.store'), [ + 'asset_tag' => '1235', + 'assigned_to' => '1', + 'assigned_type' => 'nonsense_string', //deliberately bad assigned_type + 'model_id' => AssetModel::factory()->create()->id, + 'status_id' => Statuslabel::factory()->readyToDeploy()->create()->id, + ]) + ->assertOk() + ->assertStatusMessageIs('error'); + $this->assertNotNull($response->json('messages.assigned_type')); + } + + public function testSaveWithAssignedTypeAndNoAssignedToReturnsValidationError() + { + $response = $this->actingAsForApi(User::factory()->superuser()->create()) + ->postJson(route('api.assets.store'), [ + 'asset_tag' => '1235', + //'assigned_to' => '1', //deliberately omit assigned_to + 'assigned_type' => User::class, + 'model_id' => AssetModel::factory()->create()->id, + 'status_id' => Statuslabel::factory()->readyToDeploy()->create()->id, + ]) + ->assertOk() + ->assertStatusMessageIs('error'); + $this->assertNotNull($response->json('messages.assigned_to')); + } public function testSaveWithPendingStatusWithoutUserIsSuccessful() { $response = $this->actingAsForApi(User::factory()->superuser()->create()) diff --git a/tests/Feature/Assets/Api/UpdateAssetTest.php b/tests/Feature/Assets/Api/UpdateAssetTest.php index 9c778d071787..528a46676da0 100644 --- a/tests/Feature/Assets/Api/UpdateAssetTest.php +++ b/tests/Feature/Assets/Api/UpdateAssetTest.php @@ -463,6 +463,46 @@ public function testCheckoutToUserWithAssignedToWithoutAssignedType() $this->assertNotNull($response->json('messages.assigned_type')); } + public function testCheckoutToUserWithAssignedToWithBadAssignedType() + { + $asset = Asset::factory()->create(); + $user = User::factory()->editAssets()->create(); + $assigned_user = User::factory()->create(); + + $response = $this->actingAsForApi($user) + ->patchJson(route('api.assets.update', $asset->id), [ + 'assigned_to' => $assigned_user->id, + 'assigned_type' => 'more_deliberate_nonsense' //deliberately bad assigned_type + ]) + ->assertOk() + ->assertStatusMessageIs('error'); + + $asset->refresh(); + $this->assertNotEquals($assigned_user->id, $asset->assigned_to); + $this->assertNotEquals($asset->assigned_type, 'App\Models\User'); + $this->assertNotNull($response->json('messages.assigned_type')); + } + + public function testCheckoutToUserWithoutAssignedToWithAssignedType() + { + $asset = Asset::factory()->create(); + $user = User::factory()->editAssets()->create(); + $assigned_user = User::factory()->create(); + + $response = $this->actingAsForApi($user) + ->patchJson(route('api.assets.update', $asset->id), [ + //'assigned_to' => $assigned_user->id, + 'assigned_type' => User::class //deliberately bad assigned_type + ]) + ->assertOk() + ->assertStatusMessageIs('error'); + + $asset->refresh(); + $this->assertNotEquals($assigned_user->id, $asset->assigned_to); + $this->assertNotEquals($asset->assigned_type, 'App\Models\User'); + $this->assertNotNull($response->json('messages.assigned_to')); + } + public function testCheckoutToDeletedUserFailsOnAssetUpdate() { $asset = Asset::factory()->create(); From 3153eac872193798a11f24e444445c3fc6888a94 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Thu, 10 Oct 2024 13:51:18 +0100 Subject: [PATCH 038/318] Fixed wrong comment --- tests/Feature/Assets/Api/UpdateAssetTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Assets/Api/UpdateAssetTest.php b/tests/Feature/Assets/Api/UpdateAssetTest.php index 528a46676da0..e04f3f681144 100644 --- a/tests/Feature/Assets/Api/UpdateAssetTest.php +++ b/tests/Feature/Assets/Api/UpdateAssetTest.php @@ -491,8 +491,8 @@ public function testCheckoutToUserWithoutAssignedToWithAssignedType() $response = $this->actingAsForApi($user) ->patchJson(route('api.assets.update', $asset->id), [ - //'assigned_to' => $assigned_user->id, - 'assigned_type' => User::class //deliberately bad assigned_type + //'assigned_to' => $assigned_user->id, // deliberately omit assigned_to + 'assigned_type' => User::class ]) ->assertOk() ->assertStatusMessageIs('error'); From 524a44272452d701e9da4d2e77ca10780f019f96 Mon Sep 17 00:00:00 2001 From: bryanlopezinc Date: Thu, 10 Oct 2024 23:32:07 +0100 Subject: [PATCH 039/318] Improved import performance --- app/Console/Commands/ObjectImportCommand.php | 49 +++++++------------- app/Importer/Importer.php | 33 +++++-------- 2 files changed, 28 insertions(+), 54 deletions(-) diff --git a/app/Console/Commands/ObjectImportCommand.php b/app/Console/Commands/ObjectImportCommand.php index 8370e7c0508c..a1202ded8959 100644 --- a/app/Console/Commands/ObjectImportCommand.php +++ b/app/Console/Commands/ObjectImportCommand.php @@ -6,6 +6,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Illuminate\Support\Facades\Log; +use Symfony\Component\Console\Helper\ProgressIndicator; ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); //600 seconds = 10 minutes ini_set('memory_limit', env('IMPORT_MEMORY_LIMIT', '500M')); @@ -29,6 +30,11 @@ class ObjectImportCommand extends Command */ protected $description = 'Import Items from CSV'; + /** + * The progress indicator instance. + */ + protected ProgressIndicator $progressIndicator; + /** * Create a new command instance. * @@ -39,8 +45,6 @@ public function __construct() parent::__construct(); } - private $bar; - /** * Execute the console command. * @@ -48,6 +52,8 @@ public function __construct() */ public function handle() { + $this->progressIndicator = new ProgressIndicator($this->output); + $filename = $this->argument('filename'); $class = title_case($this->option('item-type')); $classString = "App\\Importer\\{$class}Importer"; @@ -61,46 +67,25 @@ public function handle() // This $logFile/useFiles() bit is currently broken, so commenting it out for now // $logFile = $this->option('logfile'); // Log::useFiles($logFile); - $this->comment('======= Importing Items from '.$filename.' ========='); - $importer->import(); + $this->progressIndicator->start('======= Importing Items from '.$filename.' ========='); - $this->bar = null; + $importer->import(); - if (! empty($this->errors)) { - $this->comment('The following Errors were encountered.'); - foreach ($this->errors as $asset => $error) { - $this->comment('Error: Item: '.$asset.' failed validation: '.json_encode($error)); - } - } else { - $this->comment('All Items imported successfully!'); - } - $this->comment(''); + $this->progressIndicator->finish('Import finished.'); } - public function errorCallback($item, $field, $errorString) + public function errorCallback($item, $field, $error) { - $this->errors[$item->name][$field] = $errorString; + $this->output->write("\x0D\x1B[2K"); + + $this->warn('Error: Item: '.$item->name.' failed validation: '.json_encode($error)); } - public function progress($count) + public function progress($importedItemsCount) { - if (! $this->bar) { - $this->bar = $this->output->createProgressBar($count); - } - static $index = 0; - $index++; - if ($index < $count) { - $this->bar->advance(); - } else { - $this->bar->finish(); - } + $this->progressIndicator->advance(); } - // Tracks the current item for error messages - private $updating; - // An array of errors encountered while parsing - private $errors; - /** * Log a message to file, configurable by the --log-file parameter. * If a warning message is passed, we'll spit it to the console as well. diff --git a/app/Importer/Importer.php b/app/Importer/Importer.php index 47de5add4c2c..6f2816c7af07 100644 --- a/app/Importer/Importer.php +++ b/app/Importer/Importer.php @@ -21,7 +21,6 @@ abstract class Importer * Id of User performing import * @var */ - protected $created_by; /** * Are we updating items in the import @@ -149,17 +148,23 @@ public function import() { $headerRow = $this->csv->fetchOne(); $this->csv->setHeaderOffset(0); //explicitly sets the CSV document header record - $results = $this->normalizeInputArray($this->csv->getRecords($headerRow)); $this->populateCustomFields($headerRow); - DB::transaction(function () use (&$results) { + DB::transaction(function () use ($headerRow) { + $importedItemsCount = 0; Model::unguard(); - $resultsCount = count($results); - foreach ($results as $row) { + + foreach ($this->csv->getRecords($headerRow) as $row) { + //Lowercase header values to ensure we're comparing values properly. + $row = array_change_key_case($row, CASE_LOWER); + $this->handle($row); + + $importedItemsCount++; + if ($this->progressCallback) { - call_user_func($this->progressCallback, $resultsCount); + call_user_func($this->progressCallback, $importedItemsCount); } $this->log('------------- Action Summary ----------------'); @@ -237,22 +242,6 @@ public function lookupCustomKey($key) return $key; } - /** - * Used to lowercase header values to ensure we're comparing values properly. - * - * @param $results - * @return array - */ - public function normalizeInputArray($results) - { - $newArray = []; - foreach ($results as $index => $arrayToNormalize) { - $newArray[$index] = array_change_key_case($arrayToNormalize); - } - - return $newArray; - } - /** * Figure out the fieldname of the custom field * From b29d032bf0250941a2a968c85c227bbee9449c81 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 15 Oct 2024 11:28:27 -0700 Subject: [PATCH 040/318] adds checkoutAssetMail class, and content method --- .../CheckoutAssetNotification.php | 30 -- composer.json | 2 + composer.lock | 416 ++++++++++-------- 3 files changed, 245 insertions(+), 203 deletions(-) diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php index b14796fb8c0f..e61d49bf5cc5 100644 --- a/app/Notifications/CheckoutAssetNotification.php +++ b/app/Notifications/CheckoutAssetNotification.php @@ -191,35 +191,5 @@ public function toGoogleChat() * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail() - { $this->item->load('assetstatus'); - $eula = method_exists($this->item, 'getEula') ? $this->item->getEula() : ''; - $req_accept = method_exists($this->item, 'requireAcceptance') ? $this->item->requireAcceptance() : 0; - $fields = []; - - // Check if the item has custom fields associated with it - if (($this->item->model) && ($this->item->model->fieldset)) { - $fields = $this->item->model->fieldset->fields; - } - $accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance); - - $message = (new MailMessage)->markdown('notifications.markdown.checkout-asset', - [ - 'item' => $this->item, - 'admin' => $this->admin, - 'status' => $this->item->assetstatus?->name, - 'note' => $this->note, - 'target' => $this->target, - 'fields' => $fields, - 'eula' => $eula, - 'req_accept' => $req_accept, - 'accept_url' => $accept_url, - 'last_checkout' => $this->last_checkout, - 'expected_checkin' => $this->expected_checkin, - ]) - ->subject(trans('mail.Confirm_asset_delivery')); - - return $message; - } } diff --git a/composer.json b/composer.json index 6d893125787c..b255f821cd73 100644 --- a/composer.json +++ b/composer.json @@ -63,6 +63,8 @@ "rollbar/rollbar-laravel": "^8.0", "spatie/laravel-backup": "^8.8", "spatie/laravel-ignition": "^2.0", + "symfony/http-client": "^7.1", + "symfony/mailgun-mailer": "^7.1", "tecnickcom/tc-lib-barcode": "^1.15", "tecnickcom/tcpdf": "^6.5", "unicodeveloper/laravel-password": "^1.0", diff --git a/composer.lock b/composer.lock index 3f79921b26df..c6e469c5978f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3819ab4ef72eb77fabe494c0e746b83b", + "content-hash": "0378e36c927d3838ac338c4f58ed30cd", "packages": [ { "name": "alek13/slack", @@ -9081,6 +9081,178 @@ ], "time": "2024-08-13T14:27:37+00:00" }, + { + "name": "symfony/http-client", + "version": "v7.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client.git", + "reference": "abca35865118edf35a23f2f24978a1784c831cb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client/zipball/abca35865118edf35a23f2f24978a1784c831cb4", + "reference": "abca35865118edf35a23f2f24978a1784c831cb4", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-client-contracts": "^3.4.1", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "php-http/discovery": "<1.15", + "symfony/http-foundation": "<6.4" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "1.0", + "symfony/http-client-implementation": "3.0" + }, + "require-dev": { + "amphp/amp": "^2.5", + "amphp/http-client": "^4.2.1", + "amphp/http-tunnel": "^1.0", + "amphp/socket": "^1.1", + "guzzlehttp/promises": "^1.4|^2.0", + "nyholm/psr7": "^1.0", + "php-http/httplug": "^1.0|^2.0", + "psr/http-client": "^1.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/rate-limiter": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", + "homepage": "https://symfony.com", + "keywords": [ + "http" + ], + "support": { + "source": "https://github.com/symfony/http-client/tree/v7.1.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-20T13:35:23+00:00" + }, + { + "name": "symfony/http-client-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client-contracts.git", + "reference": "20414d96f391677bf80078aa55baece78b82647d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/20414d96f391677bf80078aa55baece78b82647d", + "reference": "20414d96f391677bf80078aa55baece78b82647d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to HTTP clients", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, { "name": "symfony/http-foundation", "version": "v6.4.12", @@ -9352,6 +9524,75 @@ ], "time": "2024-09-08T12:30:05+00:00" }, + { + "name": "symfony/mailgun-mailer", + "version": "v7.1.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/mailgun-mailer.git", + "reference": "dac02fe68e9306849703025511c56f10701696a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/dac02fe68e9306849703025511c56f10701696a8", + "reference": "dac02fe68e9306849703025511c56f10701696a8", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/mailer": "^6.4|^7.0" + }, + "conflict": { + "symfony/http-foundation": "<6.4" + }, + "require-dev": { + "symfony/http-client": "^6.4|^7.0", + "symfony/webhook": "^6.4|^7.0" + }, + "type": "symfony-mailer-bridge", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mailer\\Bridge\\Mailgun\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Mailgun Mailer Bridge", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/mailgun-mailer/tree/v7.1.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-07-04T11:20:59+00:00" + }, { "name": "symfony/mime", "version": "v6.4.12", @@ -16028,177 +16269,6 @@ ], "time": "2024-09-16T16:01:33+00:00" }, - { - "name": "symfony/http-client", - "version": "v6.4.12", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client.git", - "reference": "fbebfcce21084d3e91ea987ae5bdd8c71ff0fd56" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/fbebfcce21084d3e91ea987ae5bdd8c71ff0fd56", - "reference": "fbebfcce21084d3e91ea987ae5bdd8c71ff0fd56", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-client-contracts": "^3.4.1", - "symfony/service-contracts": "^2.5|^3" - }, - "conflict": { - "php-http/discovery": "<1.15", - "symfony/http-foundation": "<6.3" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "1.0", - "symfony/http-client-implementation": "3.0" - }, - "require-dev": { - "amphp/amp": "^2.5", - "amphp/http-client": "^4.2.1", - "amphp/http-tunnel": "^1.0", - "amphp/socket": "^1.1", - "guzzlehttp/promises": "^1.4|^2.0", - "nyholm/psr7": "^1.0", - "php-http/httplug": "^1.0|^2.0", - "psr/http-client": "^1.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", - "homepage": "https://symfony.com", - "keywords": [ - "http" - ], - "support": { - "source": "https://github.com/symfony/http-client/tree/v6.4.12" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-20T08:21:33+00:00" - }, - { - "name": "symfony/http-client-contracts", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "20414d96f391677bf80078aa55baece78b82647d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/20414d96f391677bf80078aa55baece78b82647d", - "reference": "20414d96f391677bf80078aa55baece78b82647d", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to HTTP clients", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-04-18T09:32:20+00:00" - }, { "name": "symfony/options-resolver", "version": "v6.4.8", @@ -16658,5 +16728,5 @@ "ext-pdo": "*" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } From f8476f713396027e7149e7306db2bfcc710d5e5c Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 15 Oct 2024 12:49:52 -0700 Subject: [PATCH 041/318] finished the construct and mail call in the listner --- app/Listeners/CheckoutableListener.php | 27 ++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index eb6b73809420..7dab68f18ccc 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -3,6 +3,7 @@ namespace App\Listeners; use App\Events\CheckoutableCheckedOut; +use App\Mail\CheckoutAssetMail; use App\Models\Accessory; use App\Models\Asset; use App\Models\CheckoutAcceptance; @@ -20,6 +21,7 @@ use App\Notifications\CheckoutConsumableNotification; use App\Notifications\CheckoutLicenseSeatNotification; use GuzzleHttp\Exception\ClientException; +use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Notification; use Exception; use Illuminate\Support\Facades\Log; @@ -44,23 +46,24 @@ public function onCheckedOut($event) * Make a checkout acceptance and attach it in the notification */ $acceptance = $this->getCheckoutAcceptance($event); - $notifiables = $this->getNotifiables($event); + $notifiable = $this->getNotifiables($event); + $mailable = (new CheckoutAssetMail( + $event->checkoutable, + $event->checkedOutTo, + $event->checkedOutBy, + $acceptance, + $event->note + )); // Send email notifications try { - foreach ($notifiables as $notifiable) { - if ($notifiable instanceof User && $notifiable->email != '') { - if (! $event->checkedOutTo->locale){ - Notification::locale(Setting::getSettings()->locale)->send($notifiable, $this->getCheckoutNotification($event, $acceptance)); - } - else { - Notification::send($notifiable, $this->getCheckoutNotification($event, $acceptance)); - } + if (! $event->checkedOutTo->locale){ + $mailable->locale($event->checkedOutTo->locale); } - } + Mail::to($notifiable)->send($mailable); - // Send Webhook notification - if ($this->shouldSendWebhookNotification()) { + // Send Webhook notification + if ($this->shouldSendWebhookNotification()) { // Slack doesn't include the URL in its messaging format, so this is needed to hit the endpoint if (Setting::getSettings()->webhook_selected === 'slack' || Setting::getSettings()->webhook_selected === 'general') { Notification::route('slack', Setting::getSettings()->webhook_endpoint) From 42095c0167b661d0f7a996a3bd17e0c0cfac5750 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 15 Oct 2024 13:02:22 -0700 Subject: [PATCH 042/318] Add reference link --- tests/Feature/Assets/Api/StoreAssetTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index a14750451945..ea5cfb617820 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -560,6 +560,9 @@ public function testAnAssetCanBeCheckedOutToAssetOnStore() $this->assertTrue($asset->assignedAssets()->find($response['payload']['id'])->is($apiAsset)); } + /** + * @link https://app.shortcut.com/grokability/story/24475 + */ public function testCompanyIdNeedsToBeInteger() { $this->actingAsForApi(User::factory()->createAssets()->create()) From 9f06a0e441940606de32279c428b24a8957186fb Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 15 Oct 2024 14:01:28 -0700 Subject: [PATCH 043/318] handle some edge cases, null values clean up variable names --- app/Listeners/CheckoutableListener.php | 42 +++++++++++++----------- app/Models/Recipients/AdminRecipient.php | 6 ++++ 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index 7dab68f18ccc..4d21fd6c1099 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -4,6 +4,7 @@ use App\Events\CheckoutableCheckedOut; use App\Mail\CheckoutAssetMail; +use App\Mail\CheckinAssetMail; use App\Models\Accessory; use App\Models\Asset; use App\Models\CheckoutAcceptance; @@ -14,7 +15,6 @@ use App\Models\Setting; use App\Models\User; use App\Notifications\CheckinAccessoryNotification; -use App\Notifications\CheckinAssetNotification; use App\Notifications\CheckinLicenseSeatNotification; use App\Notifications\CheckoutAccessoryNotification; use App\Notifications\CheckoutAssetNotification; @@ -46,7 +46,7 @@ public function onCheckedOut($event) * Make a checkout acceptance and attach it in the notification */ $acceptance = $this->getCheckoutAcceptance($event); - $notifiable = $this->getNotifiables($event); + $notifiable = $this->getNotifiable($event); $mailable = (new CheckoutAssetMail( $event->checkoutable, $event->checkedOutTo, @@ -57,11 +57,11 @@ public function onCheckedOut($event) // Send email notifications try { - if (! $event->checkedOutTo->locale){ + if (!$event->checkedOutTo->locale){ $mailable->locale($event->checkedOutTo->locale); } Mail::to($notifiable)->send($mailable); - + \Log::info('Sending email, Locale: ' .($event->checkedOutTo->locale ?? 'default')); // Send Webhook notification if ($this->shouldSendWebhookNotification()) { // Slack doesn't include the URL in its messaging format, so this is needed to hit the endpoint @@ -107,19 +107,22 @@ public function onCheckedIn($event) } } - $notifiables = $this->getNotifiables($event); + $notifiable = $this->getNotifiable($event); + $mailable = (new CheckInAssetMail( + $event->checkoutable, + $event->checkedOutTo, + $event->checkedOutBy, + $event->note, + null, + )); + // Send email notifications try { - foreach ($notifiables as $notifiable) { - if ($notifiable instanceof User && $notifiable->email != '') { - if (! $event->checkedOutTo->locale){ - Notification::locale(Setting::getSettings()->locale)->send($notifiable, $this->getCheckoutNotification($event, $acceptance)); - } - else { - Notification::send($notifiable, $this->getCheckinNotification($event)); - } - } + if (!$event->checkedOutTo->locale){ + $mailable->locale($event->checkedOutTo->locale); } + Mail::to($notifiable)->send($mailable); + \Log::info('Sending email, Locale: ' .$event->checkedOutTo->locale); // Send Webhook notification if ($this->shouldSendWebhookNotification()) { // Slack doesn't include the URL in its messaging format, so this is needed to hit the endpoint @@ -168,25 +171,26 @@ private function getCheckoutAcceptance($event) * @param Event $event * @return Collection */ - private function getNotifiables($event) + private function getNotifiable($event) { - $notifiables = collect(); + $notifiable = collect(); /** * Notify who checked out the item as long as the model can route notifications */ if (method_exists($event->checkedOutTo, 'routeNotificationFor')) { - $notifiables->push($event->checkedOutTo); + $notifiable->push($event->checkedOutTo); } /** * Notify Admin users if the settings is activated */ if ((Setting::getSettings()) && (Setting::getSettings()->admin_cc_email != '')) { - $notifiables->push(new AdminRecipient()); + $adminRecipient= new AdminRecipient; + $notifiable->push($adminRecipient->getEmail()); } - return $notifiables; + return new $notifiable; } /** diff --git a/app/Models/Recipients/AdminRecipient.php b/app/Models/Recipients/AdminRecipient.php index 433bd002094a..90e39d4ee53e 100644 --- a/app/Models/Recipients/AdminRecipient.php +++ b/app/Models/Recipients/AdminRecipient.php @@ -6,9 +6,15 @@ class AdminRecipient extends Recipient { + + protected $email; public function __construct() { $settings = Setting::getSettings(); $this->email = trim($settings->admin_cc_email); } + + public function getEmail(){ + return $this->email; + } } From d9afde4610dd0527fb19fd52093f2d654ce36430 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 15 Oct 2024 17:00:22 -0700 Subject: [PATCH 044/318] Write failing test --- tests/Feature/Assets/Api/StoreAssetTest.php | 47 +++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index ea5cfb617820..12c6d5e8586e 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -23,6 +23,53 @@ public function testRequiresPermissionToCreateAsset() ->assertForbidden(); } + /** + * @link https://github.com/snipe/snipe-it/issues/15654 + */ + public function testAdheresToFullMultipleCompaniesSupportScoping() + { + [$companyA, $companyB] = Company::factory()->count(2)->create(); + $model = AssetModel::factory()->create(); + $status = Statuslabel::factory()->readyToDeploy()->create(); + + $userInNoCompany = User::factory() + ->createAssets() + ->create(['company_id' => null]); + + $userInCompanyA = User::factory() + ->for($companyA) + ->createAssets() + ->create(); + + $this->assertNull($userInNoCompany->company_id); + $this->assertEquals($companyA->id, $userInCompanyA->company_id); + + $this->settings->enableMultipleFullCompanySupport(); + + $responseForUserWithNoCompany = $this->actingAsForApi($userInNoCompany) + ->postJson(route('api.assets.store'), [ + 'asset_tag' => 'random_string', + 'company_id' => $companyB->id, + 'model_id' => $model->id, + 'status_id' => $status->id, + ]); + + $responseForUserInCompanyA = $this->actingAsForApi($userInCompanyA) + ->postJson(route('api.assets.store'), [ + 'asset_tag' => 'another_string', + 'company_id' => $companyB->id, + 'model_id' => $model->id, + 'status_id' => $status->id, + ]); + + $assetForUserWithNoCompany = Asset::withoutGlobalScopes()->find($responseForUserWithNoCompany['payload']['id']); + $assetForUserInCompanyA = Asset::withoutGlobalScopes()->find($responseForUserInCompanyA['payload']['id']); + + // company_id should be the company_id of the user that performed the action + $this->assertNull($assetForUserWithNoCompany->company_id); + $this->assertEquals($userInCompanyA->company_id, $assetForUserInCompanyA->company_id); + } + public function testAllAssetAttributesAreStored() { $company = Company::factory()->create(); From cba1a560408c821c4112a2548a6df20755536efd Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 15 Oct 2024 17:38:11 -0700 Subject: [PATCH 045/318] Improve readability? --- tests/Feature/Assets/Api/StoreAssetTest.php | 77 ++++++++++++--------- 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index 12c6d5e8586e..8d648b835d26 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -10,8 +10,10 @@ use App\Models\Statuslabel; use App\Models\Supplier; use App\Models\User; +use Generator; use Illuminate\Support\Facades\Crypt; use Illuminate\Testing\Fluent\AssertableJson; +use PHPUnit\Framework\Attributes\DataProvider; use Tests\TestCase; class StoreAssetTest extends TestCase @@ -23,51 +25,60 @@ public function testRequiresPermissionToCreateAsset() ->assertForbidden(); } + public static function userProvider(): Generator + { + yield 'User in a company' => [ + function () { + $jedi = Company::factory()->create(); + $sith = Company::factory()->create(); + $luke = User::factory()->for($jedi)->createAssets()->create(); + + return [ + 'actor' => $luke, + 'company_attempting_to_associate' => $sith, + 'assertions' => function ($asset) use ($jedi) { + self::assertEquals($jedi->id, $asset->company_id); + }, + ]; + } + ]; + + yield 'User without a company' => [ + function () { + $userInNoCompany = User::factory()->createAssets()->create(['company_id' => null]); + + return [ + 'actor' => $userInNoCompany, + 'company_attempting_to_associate' => Company::factory()->create(), + 'assertions' => function ($asset) { + self::assertNull($asset->company_id); + }, + ]; + } + ]; + } + /** * @link https://github.com/snipe/snipe-it/issues/15654 */ - public function testAdheresToFullMultipleCompaniesSupportScoping() + #[DataProvider('userProvider')] + public function testAdheresToFullMultipleCompaniesSupportScoping($data) { - [$companyA, $companyB] = Company::factory()->count(2)->create(); - $model = AssetModel::factory()->create(); - $status = Statuslabel::factory()->readyToDeploy()->create(); - - $userInNoCompany = User::factory() - ->createAssets() - ->create(['company_id' => null]); - - $userInCompanyA = User::factory() - ->for($companyA) - ->createAssets() - ->create(); - - $this->assertNull($userInNoCompany->company_id); - $this->assertEquals($companyA->id, $userInCompanyA->company_id); + ['actor' => $actor, 'company_attempting_to_associate' => $company, 'assertions' => $assertions] = $data(); $this->settings->enableMultipleFullCompanySupport(); - $responseForUserWithNoCompany = $this->actingAsForApi($userInNoCompany) + $response = $this->actingAsForApi($actor) ->postJson(route('api.assets.store'), [ 'asset_tag' => 'random_string', - 'company_id' => $companyB->id, - 'model_id' => $model->id, - 'status_id' => $status->id, - ]); - - $responseForUserInCompanyA = $this->actingAsForApi($userInCompanyA) - ->postJson(route('api.assets.store'), [ - 'asset_tag' => 'another_string', - 'company_id' => $companyB->id, - 'model_id' => $model->id, - 'status_id' => $status->id, + 'company_id' => $company->id, + 'model_id' => AssetModel::factory()->create()->id, + 'status_id' => Statuslabel::factory()->readyToDeploy()->create()->id, ]); - $assetForUserWithNoCompany = Asset::withoutGlobalScopes()->find($responseForUserWithNoCompany['payload']['id']); - $assetForUserInCompanyA = Asset::withoutGlobalScopes()->find($responseForUserInCompanyA['payload']['id']); + $asset = Asset::withoutGlobalScopes()->findOrFail($response['payload']['id']); - // company_id should be the company_id of the user that performed the action - $this->assertNull($assetForUserWithNoCompany->company_id); - $this->assertEquals($userInCompanyA->company_id, $assetForUserInCompanyA->company_id); + $assertions($asset); } public function testAllAssetAttributesAreStored() From 2f72c66614676efd205585e25d909424b136d869 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Wed, 16 Oct 2024 11:30:06 -0700 Subject: [PATCH 046/318] Add additional case --- tests/Feature/Assets/Api/StoreAssetTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index 8d648b835d26..118ccee40674 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -56,6 +56,21 @@ function () { ]; } ]; + + yield 'Super-User assigning across companies' => [ + function () { + $superUser = User::factory()->superuser()->create(); + $company = Company::factory()->create(); + + return [ + 'actor' => $superUser, + 'company_attempting_to_associate' => $company, + 'assertions' => function ($asset) use ($company) { + self::assertEquals($asset->company_id, $company->id); + }, + ]; + } + ]; } /** From 604a9644624a52cd1aa965d92d36aa936840265d Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Wed, 16 Oct 2024 11:52:24 -0700 Subject: [PATCH 047/318] Improve scenario descriptions --- tests/Feature/Assets/Api/StoreAssetTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php index 118ccee40674..95b73520bffd 100644 --- a/tests/Feature/Assets/Api/StoreAssetTest.php +++ b/tests/Feature/Assets/Api/StoreAssetTest.php @@ -27,7 +27,7 @@ public function testRequiresPermissionToCreateAsset() public static function userProvider(): Generator { - yield 'User in a company' => [ + yield "User in a company should result in user's company_id being used" => [ function () { $jedi = Company::factory()->create(); $sith = Company::factory()->create(); @@ -43,7 +43,7 @@ function () { } ]; - yield 'User without a company' => [ + yield "User without a company should result in asset's company_id being null" => [ function () { $userInNoCompany = User::factory()->createAssets()->create(['company_id' => null]); @@ -57,7 +57,7 @@ function () { } ]; - yield 'Super-User assigning across companies' => [ + yield "Super-User assigning across companies should result in asset's company_id being set to what was provided" => [ function () { $superUser = User::factory()->superuser()->create(); $company = Company::factory()->create(); From 3ab2521cb0b8f61cb42a7b205a7836d7950046a6 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 12:21:33 -0700 Subject: [PATCH 048/318] email comes through, no picture and html markup appear though. --- .../Account/AcceptanceController.php | 1 + app/Listeners/CheckoutableListener.php | 25 ++-- .../CheckoutAssetNotification.php | 21 --- .../markdown/checkout-asset.blade.php | 130 +++++++++--------- routes/web.php | 22 +++ 5 files changed, 100 insertions(+), 99 deletions(-) diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index e29fa7c63b08..278d7e208106 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -338,4 +338,5 @@ public function store(Request $request, $id) : RedirectResponse return redirect()->to('account/accept')->with('success', $return_msg); } + } diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index 4d21fd6c1099..cfadad5ae915 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -51,8 +51,8 @@ public function onCheckedOut($event) $event->checkoutable, $event->checkedOutTo, $event->checkedOutBy, + $event->note, $acceptance, - $event->note )); // Send email notifications @@ -61,18 +61,18 @@ public function onCheckedOut($event) $mailable->locale($event->checkedOutTo->locale); } Mail::to($notifiable)->send($mailable); - \Log::info('Sending email, Locale: ' .($event->checkedOutTo->locale ?? 'default')); + Log::info('Sending email, Locale: ' .($event->checkedOutTo->locale ?? 'default')); // Send Webhook notification - if ($this->shouldSendWebhookNotification()) { - // Slack doesn't include the URL in its messaging format, so this is needed to hit the endpoint - if (Setting::getSettings()->webhook_selected === 'slack' || Setting::getSettings()->webhook_selected === 'general') { - Notification::route('slack', Setting::getSettings()->webhook_endpoint) - ->notify($this->getCheckoutNotification($event, $acceptance)); - } else { - Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint) - ->notify($this->getCheckoutNotification($event, $acceptance)); - } - } +// if ($this->shouldSendWebhookNotification()) { +// // Slack doesn't include the URL in its messaging format, so this is needed to hit the endpoint +// if (Setting::getSettings()->webhook_selected === 'slack' || Setting::getSettings()->webhook_selected === 'general') { +// Notification::route('slack', Setting::getSettings()->webhook_endpoint) +// ->notify($this->getCheckoutNotification($event, $acceptance)); +// } else { +// Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint) +// ->notify($this->getCheckoutNotification($event, $acceptance)); +// } +// } } catch (ClientException $e) { Log::debug("Exception caught during checkout notification: " . $e->getMessage()); } catch (Exception $e) { @@ -113,7 +113,6 @@ public function onCheckedIn($event) $event->checkedOutTo, $event->checkedOutBy, $event->note, - null, )); // Send email notifications diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php index e61d49bf5cc5..4337749f4942 100644 --- a/app/Notifications/CheckoutAssetNotification.php +++ b/app/Notifications/CheckoutAssetNotification.php @@ -32,28 +32,7 @@ class CheckoutAssetNotification extends Notification */ public function __construct(Asset $asset, $checkedOutTo, User $checkedOutBy, $acceptance, $note) { - $this->item = $asset; - $this->admin = $checkedOutBy; - $this->note = $note; - $this->target = $checkedOutTo; - $this->acceptance = $acceptance; - - $this->settings = Setting::getSettings(); - - $this->last_checkout = ''; - $this->expected_checkin = ''; - - if ($this->item->last_checkout) { - $this->last_checkout = Helper::getFormattedDateObject($this->item->last_checkout, 'date', - false); - } - - if ($this->item->expected_checkin) { - $this->expected_checkin = Helper::getFormattedDateObject($this->item->expected_checkin, 'date', - false); - } } - /** * Get the notification's delivery channels. * diff --git a/resources/views/notifications/markdown/checkout-asset.blade.php b/resources/views/notifications/markdown/checkout-asset.blade.php index 9b5fc26dc2e9..5b4c811dd712 100644 --- a/resources/views/notifications/markdown/checkout-asset.blade.php +++ b/resources/views/notifications/markdown/checkout-asset.blade.php @@ -1,76 +1,76 @@ @component('mail::message') -# {{ trans('mail.hello') }} {{ $target->present()->fullName() }}, + # {{ trans('mail.hello') }} {{ $target->present()->fullName() }}, -{{ trans('mail.new_item_checked') }} + {{ trans('mail.new_item_checked') }} -@if (($snipeSettings->show_images_in_email =='1') && $item->getImageUrl()) -
Asset
-@endif + @if (($snipeSettings->show_images_in_email =='1') && $item->getImageUrl()) +
Asset
+ @endif -@component('mail::table') -| | | -| ------------- | ------------- | -@if ((isset($item->name)) && ($item->name!='')) -| **{{ trans('mail.asset_name') }}** | {{ $item->name }} | -@endif -@if (($item->name!=$item->asset_tag)) -| **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} | -@endif -@if (isset($item->manufacturer)) -| **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} | -@endif -@if (isset($item->model)) -| **{{ trans('general.asset_model') }}** | {{ $item->model->name }} | -@endif -@if ((isset($item->model->model_number)) && ($item->model->name!=$item->model->model_number)) -| **{{ trans('general.model_no') }}** | {{ $item->model->model_number }} | -@endif -@if (isset($item->serial)) -| **{{ trans('mail.serial') }}** | {{ $item->serial }} | -@endif -@if (isset($last_checkout)) -| **{{ trans('mail.checkout_date') }}** | {{ $last_checkout }} | -@endif -@if (isset($status)) -| **{{ trans('general.status') }}** | {{ $status }} | -@endif -@if ((isset($expected_checkin)) && ($expected_checkin!='')) -| **{{ trans('mail.expecting_checkin_date') }}** | {{ $expected_checkin }} | -@endif -@foreach($fields as $field) -@if (($item->{ $field->db_column_name() }!='') && ($field->show_in_email) && ($field->field_encrypted=='0')) -| **{{ $field->name }}** | {{ $item->{ $field->db_column_name() } }} | -@endif -@endforeach -@if ($admin) -| **{{ trans('general.administrator') }}** | {{ $admin->present()->fullName() }} | -@endif -@if ($note) -| **{{ trans('mail.additional_notes') }}** | {{ $note }} | -@endif -@endcomponent + @component('mail::table') + | | | + | ------------- | ------------- | + @if ((isset($item->name)) && ($item->name!='')) + | **{{ trans('mail.asset_name') }}** | {{ $item->name }} | + @endif + @if (($item->name!=$item->asset_tag)) + | **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} | + @endif + @if (isset($item->manufacturer)) + | **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} | + @endif + @if (isset($item->model)) + | **{{ trans('general.asset_model') }}** | {{ $item->model->name }} | + @endif + @if ((isset($item->model->model_number)) && ($item->model->name!=$item->model->model_number)) + | **{{ trans('general.model_no') }}** | {{ $item->model->model_number }} | + @endif + @if (isset($item->serial)) + | **{{ trans('mail.serial') }}** | {{ $item->serial }} | + @endif + @if (isset($last_checkout)) + | **{{ trans('mail.checkout_date') }}** | {{ $last_checkout }} | + @endif + @if (isset($status)) + | **{{ trans('general.status') }}** | {{ $status }} | + @endif + @if ((isset($expected_checkin)) && ($expected_checkin!='')) + | **{{ trans('mail.expecting_checkin_date') }}** | {{ $expected_checkin }} | + @endif + @foreach($fields as $field) + @if (($item->{ $field->db_column_name() }!='') && ($field->show_in_email) && ($field->field_encrypted=='0')) + | **{{ $field->name }}** | {{ $item->{ $field->db_column_name() } }} | + @endif + @endforeach + @if ($admin) + | **{{ trans('general.administrator') }}** | {{ $admin->present()->fullName() }} | + @endif + @if ($note) + | **{{ trans('mail.additional_notes') }}** | {{ $note }} | + @endif + @endcomponent -@if (($req_accept == 1) && ($eula!='')) -{{ trans('mail.read_the_terms_and_click') }} -@elseif (($req_accept == 1) && ($eula=='')) -{{ trans('mail.click_on_the_link_asset') }} -@elseif (($req_accept == 0) && ($eula!='')) -{{ trans('mail.read_the_terms') }} -@endif + @if (($req_accept == 1) && ($eula!='')) + {{ trans('mail.read_the_terms_and_click') }} + @elseif (($req_accept == 1) && ($eula=='')) + {{ trans('mail.click_on_the_link_asset') }} + @elseif (($req_accept == 0) && ($eula!='')) + {{ trans('mail.read_the_terms') }} + @endif -@if ($eula) -@component('mail::panel') -{!! $eula !!} -@endcomponent -@endif + @if ($eula) + @component('mail::panel') + {!! $eula !!} + @endcomponent + @endif -@if ($req_accept == 1) -**[✔ {{ trans('mail.i_have_read') }}]({{ $accept_url }})** -@endif + @if ($req_accept == 1) + **[✔ {{ trans('mail.i_have_read') }}]({{ $accept_url }})** + @endif -{{ trans('mail.best_regards') }} + {{ trans('mail.best_regards') }} -{{ $snipeSettings->site_name }} + {{ $snipeSettings->site_name }} -@endcomponent +@endcomponent \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 60b74476c799..7bed89acf7ff 100644 --- a/routes/web.php +++ b/routes/web.php @@ -24,6 +24,8 @@ use App\Http\Controllers\Auth\ForgotPasswordController; use App\Http\Controllers\Auth\ResetPasswordController; use App\Livewire\Importer; +use App\Models\Asset; +use App\Models\User; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Auth; @@ -53,6 +55,26 @@ /* * Locations */ + Route::get('/test-email', function() { + $item = Asset::find(1); // Load some test data + $admin = User::find(1); + $target = User::find(2); + $acceptance = null; // Simulate acceptance data + $note = 'Test note'; + + $fields = []; + if (($item->model) && ($item->model->fieldset)) { + $fields = $item->model->fieldset->fields; + } + + return new \App\Mail\CheckoutAssetMail( + $item, + $admin, + $target, + $acceptance, + $note); + }); + Route::group(['prefix' => 'locations', 'middleware' => ['auth']], function () { From 9e1b86f586f2942312105b0b37d69ee8ec34ca17 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 12:51:19 -0700 Subject: [PATCH 049/318] sends checkout notification via webhook --- app/Listeners/CheckoutableListener.php | 34 +++++------ .../CheckinAssetNotification.php | 17 +++--- .../CheckoutAssetNotification.php | 61 ++++++++----------- 3 files changed, 51 insertions(+), 61 deletions(-) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index cfadad5ae915..3204bf628b43 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -62,17 +62,17 @@ public function onCheckedOut($event) } Mail::to($notifiable)->send($mailable); Log::info('Sending email, Locale: ' .($event->checkedOutTo->locale ?? 'default')); - // Send Webhook notification -// if ($this->shouldSendWebhookNotification()) { -// // Slack doesn't include the URL in its messaging format, so this is needed to hit the endpoint -// if (Setting::getSettings()->webhook_selected === 'slack' || Setting::getSettings()->webhook_selected === 'general') { -// Notification::route('slack', Setting::getSettings()->webhook_endpoint) -// ->notify($this->getCheckoutNotification($event, $acceptance)); -// } else { -// Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint) -// ->notify($this->getCheckoutNotification($event, $acceptance)); -// } -// } +// Send Webhook notification + if ($this->shouldSendWebhookNotification()) { + // Slack doesn't include the URL in its messaging format, so this is needed to hit the endpoint + if (Setting::getSettings()->webhook_selected === 'slack' || Setting::getSettings()->webhook_selected === 'general') { + Notification::route('slack', Setting::getSettings()->webhook_endpoint) + ->notify($this->getCheckoutNotification($event, $acceptance)); + } else { + Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint) + ->notify($this->getCheckoutNotification($event, $acceptance)); + } + } } catch (ClientException $e) { Log::debug("Exception caught during checkout notification: " . $e->getMessage()); } catch (Exception $e) { @@ -231,17 +231,17 @@ private function getCheckoutNotification($event, $acceptance = null) { $notificationClass = null; - switch (get_class($event->checkoutable)) { - case Accessory::class: + switch (true) { + case $event->checkoutable instanceof Accessory: $notificationClass = CheckoutAccessoryNotification::class; break; - case Asset::class: + case $event->checkoutable instanceof Asset: $notificationClass = CheckoutAssetNotification::class; break; - case Consumable::class: + case $event->checkoutable instanceof Consumable: $notificationClass = CheckoutConsumableNotification::class; - break; - case LicenseSeat::class: + break; + case $event->checkoutable instanceof LicenseSeat: $notificationClass = CheckoutLicenseSeatNotification::class; break; } diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.php index 77cd6d9b5a87..85b1c744130a 100644 --- a/app/Notifications/CheckinAssetNotification.php +++ b/app/Notifications/CheckinAssetNotification.php @@ -50,7 +50,6 @@ public function __construct(Asset $asset, $checkedOutTo, User $checkedInBy, $not */ public function via() { - $notifyBy = []; if (Setting::getSettings()->webhook_selected == 'google' && Setting::getSettings()->webhook_endpoint) { $notifyBy[] = GoogleChatChannel::class; @@ -64,14 +63,14 @@ public function via() Log::debug('use webhook'); $notifyBy[] = 'slack'; } - - /** - * Only send checkin notifications to users if the category - * has the corresponding checkbox checked. - */ - if ($this->item->checkin_email() && $this->target instanceof User && $this->target->email != '') { - $notifyBy[] = 'mail'; - } +dd($notifyBy); +// /** +// * Only send checkin notifications to users if the category +// * has the corresponding checkbox checked. +// */ +// if ($this->item->checkin_email() && $this->target instanceof User && $this->target->email != '') { +// $notifyBy[] = 'mail'; +// } return $notifyBy; } diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php index 4337749f4942..1ca329ed80e7 100644 --- a/app/Notifications/CheckoutAssetNotification.php +++ b/app/Notifications/CheckoutAssetNotification.php @@ -8,6 +8,7 @@ use App\Models\User; use Exception; use Illuminate\Bus\Queueable; +use Illuminate\Notifications\Channels\SlackWebhookChannel; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; @@ -32,6 +33,23 @@ class CheckoutAssetNotification extends Notification */ public function __construct(Asset $asset, $checkedOutTo, User $checkedOutBy, $acceptance, $note) { + $this->settings = Setting::getSettings(); + $this->item = $asset; + $this->admin = $checkedOutBy; + $this->note = $note; + $this->target = $checkedOutTo; + $this->last_checkout = ''; + $this->expected_checkin = ''; + + if ($this->item->last_checkout) { + $this->last_checkout = Helper::getFormattedDateObject($this->item->last_checkout, 'date', + false); + } + + if ($this->item->expected_checkin) { + $this->expected_checkin = Helper::getFormattedDateObject($this->item->expected_checkin, 'date', + false); + } } /** * Get the notification's delivery channels. @@ -41,61 +59,34 @@ public function __construct(Asset $asset, $checkedOutTo, User $checkedOutBy, $ac public function via() { $notifyBy = []; - if (Setting::getSettings()->webhook_selected == 'google' && Setting::getSettings()->webhook_endpoint) { + + if (Setting::getSettings()->webhook_selected === 'google' && Setting::getSettings()->webhook_endpoint) { $notifyBy[] = GoogleChatChannel::class; } - if (Setting::getSettings()->webhook_selected == 'microsoft' && Setting::getSettings()->webhook_endpoint) { + if (Setting::getSettings()->webhook_selected === 'microsoft' && Setting::getSettings()->webhook_endpoint) { $notifyBy[] = MicrosoftTeamsChannel::class; } - if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) { + if (Setting::getSettings()->webhook_selected === 'slack' || Setting::getSettings()->webhook_selected === 'general' ) { Log::debug('use webhook'); - $notifyBy[] = 'slack'; - } - - /** - * Only send notifications to users that have email addresses - */ - if ($this->target instanceof User && $this->target->email != '') { - - /** - * Send an email if the asset requires acceptance, - * so the user can accept or decline the asset - */ - if ($this->item->requireAcceptance()) { - $notifyBy[1] = 'mail'; - } - - /** - * Send an email if the item has a EULA, since the user should always receive it - */ - if ($this->item->getEula()) { - $notifyBy[1] = 'mail'; - } - - /** - * Send an email if an email should be sent at checkin/checkout - */ - if ($this->item->checkin_email()) { - $notifyBy[1] = 'mail'; - } + $notifyBy[] = SlackWebhookChannel::class; } return $notifyBy; } - public function toSlack() + public function toSlack() :SlackMessage { $target = $this->target; $admin = $this->admin; $item = $this->item; $note = $this->note; - $botname = ($this->settings->webhook_botname) ? $this->settings->webhook_botname : 'Snipe-Bot'; + $botname = ($this->settings->webhook_botname) ?: 'Snipe-Bot'; $channel = ($this->settings->webhook_channel) ? $this->settings->webhook_channel : ''; $fields = [ @@ -103,7 +94,7 @@ public function toSlack() 'By' => '<'.$admin->present()->viewUrl().'|'.$admin->present()->fullName().'>', ]; - if (($this->expected_checkin) && ($this->expected_checkin != '')) { + if (($this->expected_checkin) && ($this->expected_checkin !== '')) { $fields['Expected Checkin'] = $this->expected_checkin; } From 16cffe9a9dd0cbce4f38d161a2b4cbebeaffde1c Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 12:53:35 -0700 Subject: [PATCH 050/318] simplified checkout webhook call --- app/Listeners/CheckoutableListener.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index 3204bf628b43..16032a54f50a 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -124,16 +124,9 @@ public function onCheckedIn($event) \Log::info('Sending email, Locale: ' .$event->checkedOutTo->locale); // Send Webhook notification if ($this->shouldSendWebhookNotification()) { - // Slack doesn't include the URL in its messaging format, so this is needed to hit the endpoint - if (Setting::getSettings()->webhook_selected === 'slack' || Setting::getSettings()->webhook_selected === 'general') { - Notification::route('slack', Setting::getSettings()->webhook_endpoint) - ->notify($this->getCheckinNotification($event)); - } else { Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint) ->notify($this->getCheckinNotification($event)); } - } - } catch (ClientException $e) { Log::warning("Exception caught during checkout notification: " . $e->getMessage()); } catch (Exception $e) { From 9710436d54fc23e79bf96b61430f3f0f3345581a Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 13:12:07 -0700 Subject: [PATCH 051/318] adds Mailables for asset checkin and out --- app/Listeners/CheckoutableListener.php | 8 +- app/Mail/CheckinAssetMail.php | 102 ++++++++++++ app/Mail/CheckoutAssetMail.php | 150 ++++++++++++++++++ .../CheckinAssetNotification.php | 32 +--- .../markdown/checkin-asset.blade.php | 0 routes/web.php | 2 +- 6 files changed, 255 insertions(+), 39 deletions(-) create mode 100644 app/Mail/CheckinAssetMail.php create mode 100644 app/Mail/CheckoutAssetMail.php rename resources/views/{notifications => mail}/markdown/checkin-asset.blade.php (100%) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index 16032a54f50a..44e731b4baf5 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -64,15 +64,9 @@ public function onCheckedOut($event) Log::info('Sending email, Locale: ' .($event->checkedOutTo->locale ?? 'default')); // Send Webhook notification if ($this->shouldSendWebhookNotification()) { - // Slack doesn't include the URL in its messaging format, so this is needed to hit the endpoint - if (Setting::getSettings()->webhook_selected === 'slack' || Setting::getSettings()->webhook_selected === 'general') { - Notification::route('slack', Setting::getSettings()->webhook_endpoint) - ->notify($this->getCheckoutNotification($event, $acceptance)); - } else { Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint) ->notify($this->getCheckoutNotification($event, $acceptance)); } - } } catch (ClientException $e) { Log::debug("Exception caught during checkout notification: " . $e->getMessage()); } catch (Exception $e) { @@ -111,7 +105,7 @@ public function onCheckedIn($event) $mailable = (new CheckInAssetMail( $event->checkoutable, $event->checkedOutTo, - $event->checkedOutBy, + $event->checkedInBy, $event->note, )); diff --git a/app/Mail/CheckinAssetMail.php b/app/Mail/CheckinAssetMail.php new file mode 100644 index 000000000000..5795d795c701 --- /dev/null +++ b/app/Mail/CheckinAssetMail.php @@ -0,0 +1,102 @@ +target = $checkedOutTo; + $this->item = $asset; + $this->admin = $checkedInBy; + $this->note = $note; + + $this->settings = Setting::getSettings(); + $this->expected_checkin = ''; + + if ($this->item->expected_checkin) { + $this->expected_checkin = Helper::getFormattedDateObject($this->item->expected_checkin, 'date', + false); + } + } + + /** + * Get the message envelope. + */ + public function envelope(): Envelope + { + $from = null; + $cc = []; + + if (!empty(Setting::getSettings()->alert_email)) { + $from = new Address(Setting::getSettings()->alert_email); + } + if (!empty(Setting::getSettings()->admin_cc_email)) { + $cc[] = new Address(Setting::getSettings()->admin_cc_email); + } + + return new Envelope( + from: $from ?? new Address('default@example.com', 'Default Sender'), + cc: $cc, + subject: trans('mail.Asset_Checkin_Notification'), + ); + } + + /** + * Get the mail representation of the notification. + * + * @param mixed $notifiable + * @return Content + */ + public function content(): Content + { + $this->item->load('assetstatus'); + $fields = []; + + // Check if the item has custom fields associated with it + if (($this->item->model) && ($this->item->model->fieldset)) { + $fields = $this->item->model->fieldset->fields; + } + + return new Content( + markdown: 'mail.markdown.checkin-asset', + with: [ + 'item' => $this->item, + 'status' => $this->item->assetstatus?->name, + 'admin' => $this->admin, + 'note' => $this->note, + 'target' => $this->target, + 'fields' => $fields, + 'expected_checkin' => $this->expected_checkin, + ], + ); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + return []; + } +} diff --git a/app/Mail/CheckoutAssetMail.php b/app/Mail/CheckoutAssetMail.php new file mode 100644 index 000000000000..214c48ed5c16 --- /dev/null +++ b/app/Mail/CheckoutAssetMail.php @@ -0,0 +1,150 @@ +item = $asset; + $this->admin = $checkedOutBy; + $this->note = $note; + $this->target = $checkedOutTo; + $this->acceptance = $acceptance; + + $this->settings = Setting::getSettings(); + + $this->last_checkout = ''; + $this->expected_checkin = ''; + + if ($this->item->last_checkout) { + $this->last_checkout = Helper::getFormattedDateObject($this->item->last_checkout, 'date', + false); + } + + if ($this->item->expected_checkin) { + $this->expected_checkin = Helper::getFormattedDateObject($this->item->expected_checkin, 'date', + false); + } + } + + /** + * Get the message envelope. + */ + public function envelope(): Envelope + { + $from = null; + $cc = []; + + if (!empty(Setting::getSettings()->alert_email)) { + $from = new Address(Setting::getSettings()->alert_email); + } + if (!empty(Setting::getSettings()->admin_cc_email)) { + $cc[] = new Address(Setting::getSettings()->admin_cc_email); + } + + return new Envelope( + from: $from ?? new Address('default@example.com', 'Default Sender'), + cc: $cc, + subject: trans('mail.Asset_Checkout_Notification'), + ); + } + + /** + * Get the mail representation of the notification. + * + * @param mixed $notifiable + * @return Content + */ + public function content(): Content + { + $this->item->load('assetstatus'); + $eula = method_exists($this->item, 'getEula') ? $this->item->getEula() : ''; + $req_accept = method_exists($this->item, 'requireAcceptance') ? $this->item->requireAcceptance() : 0; + $fields = []; + + // Check if the item has custom fields associated with it + if (($this->item->model) && ($this->item->model->fieldset)) { + $fields = $this->item->model->fieldset->fields; + } + + $accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance); + + return new Content( + markdown: 'mail.markdown.checkout-asset', + with: [ + 'item' => $this->item, + 'admin' => $this->admin, + 'status' => $this->item->assetstatus?->name, + 'note' => $this->note, + 'target' => $this->target, + 'fields' => $fields, + 'eula' => $eula, + 'req_accept' => $req_accept, + 'accept_url' => $accept_url, + 'last_checkout' => $this->last_checkout, + 'expected_checkin' => $this->expected_checkin, + ], + ); + } +// public function build() +// { +// $this->item->load('assetstatus'); +// $eula = method_exists($this->item, 'getEula') ? $this->item->getEula() : ''; +// $req_accept = method_exists($this->item, 'requireAcceptance') ? $this->item->requireAcceptance() : 0; +// $fields = []; +// +// // Check if the item has custom fields associated with it +// if (($this->item->model) && ($this->item->model->fieldset)) { +// $fields = $this->item->model->fieldset->fields; +// } +// +// $accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance); +// +// return $this +// ->subject('Asset Checkout Notification') +// ->markdown('notifications.markdown.checkout-asset') +// ->with([ +// 'item' => $this->item, +// 'admin' => $this->admin, +// 'status' => $this->item->assetstatus?->name, +// 'note' => $this->note, +// 'target' => $this->target, +// 'fields' => $fields, +// 'eula' => $eula, +// 'req_accept' => $req_accept, +// 'accept_url' => $accept_url, +// 'last_checkout' => $this->last_checkout, +// 'expected_checkin' => $this->expected_checkin, +// ]); +// } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + return []; + } +} diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.php index 85b1c744130a..5c38982ab690 100644 --- a/app/Notifications/CheckinAssetNotification.php +++ b/app/Notifications/CheckinAssetNotification.php @@ -63,7 +63,7 @@ public function via() Log::debug('use webhook'); $notifyBy[] = 'slack'; } -dd($notifyBy); + // /** // * Only send checkin notifications to users if the category // * has the corresponding checkbox checked. @@ -141,35 +141,5 @@ public function toGoogleChat() ) ) ); - - } - - /** - * Get the mail representation of the notification. - * - * @return \Illuminate\Notifications\Messages\MailMessage - */ - public function toMail() - { - $fields = []; - - // Check if the item has custom fields associated with it - if (($this->item->model) && ($this->item->model->fieldset)) { - $fields = $this->item->model->fieldset->fields; - } - - $message = (new MailMessage)->markdown('notifications.markdown.checkin-asset', - [ - 'item' => $this->item, - 'status' => $this->item->assetstatus?->name, - 'admin' => $this->admin, - 'note' => $this->note, - 'target' => $this->target, - 'fields' => $fields, - 'expected_checkin' => $this->expected_checkin, - ]) - ->subject(trans('mail.Asset_Checkin_Notification')); - - return $message; } } diff --git a/resources/views/notifications/markdown/checkin-asset.blade.php b/resources/views/mail/markdown/checkin-asset.blade.php similarity index 100% rename from resources/views/notifications/markdown/checkin-asset.blade.php rename to resources/views/mail/markdown/checkin-asset.blade.php diff --git a/routes/web.php b/routes/web.php index 7bed89acf7ff..548758e3827d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -67,7 +67,7 @@ $fields = $item->model->fieldset->fields; } - return new \App\Mail\CheckoutAssetMail( + return new \App\Mail\CheckinAssetMail( $item, $admin, $target, From dcdf600b785501d960ee6a8f99a46f9a6ba90b9f Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 15:27:34 -0700 Subject: [PATCH 052/318] adds Checkin and Checkout mailables and listner logic --- app/Listeners/CheckoutableListener.php | 43 +++++--- app/Mail/CheckoutAccessoryMail.php | 98 +++++++++++++++++++ .../CheckinAccessoryNotification.php | 62 ++++++------ .../CheckoutAccessoryNotification.php | 58 +---------- .../markdown/checkin-accessory.blade.php | 0 .../markdown/checkout-accessory.blade.php | 0 routes/web.php | 6 +- 7 files changed, 162 insertions(+), 105 deletions(-) create mode 100644 app/Mail/CheckoutAccessoryMail.php rename resources/views/{notifications => mail}/markdown/checkin-accessory.blade.php (100%) rename resources/views/{notifications => mail}/markdown/checkout-accessory.blade.php (100%) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index 44e731b4baf5..6acedd4d97b6 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -3,6 +3,8 @@ namespace App\Listeners; use App\Events\CheckoutableCheckedOut; +use App\Mail\CheckinAccessoryMail; +use App\Mail\CheckoutAccessoryMail; use App\Mail\CheckoutAssetMail; use App\Mail\CheckinAssetMail; use App\Models\Accessory; @@ -47,14 +49,7 @@ public function onCheckedOut($event) */ $acceptance = $this->getCheckoutAcceptance($event); $notifiable = $this->getNotifiable($event); - $mailable = (new CheckoutAssetMail( - $event->checkoutable, - $event->checkedOutTo, - $event->checkedOutBy, - $event->note, - $acceptance, - )); - + $mailable = $this->getCheckoutMailType($event, $acceptance); // Send email notifications try { if (!$event->checkedOutTo->locale){ @@ -102,12 +97,7 @@ public function onCheckedIn($event) } $notifiable = $this->getNotifiable($event); - $mailable = (new CheckInAssetMail( - $event->checkoutable, - $event->checkedOutTo, - $event->checkedInBy, - $event->note, - )); + $mailable = $this->getCheckinMailType($event); // Send email notifications try { @@ -233,9 +223,32 @@ private function getCheckoutNotification($event, $acceptance = null) break; } - return new $notificationClass($event->checkoutable, $event->checkedOutTo, $event->checkedOutBy, $acceptance, $event->note); } + private function getCheckoutMailType($event, $acceptance){ + $lookup = [ + Accessory::class => CheckoutAccessoryMail::class, + Asset::class => CheckoutAssetMail::class, +// Consumable::class => +// LicenseSeat::class => + ]; + $mailable= $lookup[get_class($event->checkoutable)]; + + return new $mailable($event->checkoutable, $event->checkedOutTo, $event->checkedOutBy, $event->note, $acceptance); + + } + private function getCheckinMailType($event){ + $lookup = [ + Accessory::class => CheckinAccessoryMail::class, + Asset::class => CheckinAssetMail::class, +// Consumable::class => +// LicenseSeat::class => + ]; + $mailable= $lookup[get_class($event->checkoutable)]; + + return new $mailable($event->checkoutable, $event->checkedOutTo, $event->checkedInBy, $event->note); + + } /** * Register the listeners for the subscriber. diff --git a/app/Mail/CheckoutAccessoryMail.php b/app/Mail/CheckoutAccessoryMail.php new file mode 100644 index 000000000000..f7f90e8fe2c4 --- /dev/null +++ b/app/Mail/CheckoutAccessoryMail.php @@ -0,0 +1,98 @@ +item = $accessory; + $this->admin = $checkedOutBy; + $this->note = $note; + $this->checkout_qty = $accessory->checkout_qty; + $this->target = $checkedOutTo; + $this->acceptance = $acceptance; + $this->settings = Setting::getSettings(); + } + + /** + * Get the message envelope. + */ + public function envelope(): Envelope + { + $from = null; + $cc = []; + + if (!empty(Setting::getSettings()->alert_email)) { + $from = new Address(Setting::getSettings()->alert_email); + } + if (!empty(Setting::getSettings()->admin_cc_email)) { + $cc[] = new Address(Setting::getSettings()->admin_cc_email); + } + return new Envelope( + from: $from ?? new Address('default@example.com', 'Default Sender'), + cc: $cc, + subject: (trans('mail.Accessory_Checkout_Notification')), + ); + } + + /** + * Get the message content definition. + */ + public function content(): Content + { + Log::debug($this->item->getImageUrl()); + $eula = $this->item->getEula(); + $req_accept = $this->item->requireAcceptance(); + + $accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance); + + // Check if the item has custom fields associated with it + if (($this->item->model) && ($this->item->model->fieldset)) { + $fields = $this->item->model->fieldset->fields; + } + + $accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance); + + return new Content( + markdown: 'mail.markdown.checkout-accessory', + with: [ + 'item' => $this->item, + 'admin' => $this->admin, + 'note' => $this->note, + 'target' => $this->target, + 'eula' => $eula, + 'req_accept' => $req_accept, + 'accept_url' => $accept_url, + 'checkout_qty' => $this->checkout_qty, + ], + ); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + return []; + } +} diff --git a/app/Notifications/CheckinAccessoryNotification.php b/app/Notifications/CheckinAccessoryNotification.php index 7e033f1870bd..d36b77a85019 100644 --- a/app/Notifications/CheckinAccessoryNotification.php +++ b/app/Notifications/CheckinAccessoryNotification.php @@ -58,18 +58,18 @@ public function via() $notifyBy[] = 'slack'; } - /** - * Only send notifications to users that have email addresses - */ - if ($this->target instanceof User && $this->target->email != '') { - Log::debug('The target is a user'); - - if ($this->item->checkin_email()) { - $notifyBy[] = 'mail'; - } - } - - Log::debug('checkin_email on this category is '.$this->item->checkin_email()); +// /** +// * Only send notifications to users that have email addresses +// */ +// if ($this->target instanceof User && $this->target->email != '') { +// Log::debug('The target is a user'); +// +// if ($this->item->checkin_email()) { +// $notifyBy[] = 'mail'; +// } +// } +// +// Log::debug('checkin_email on this category is '.$this->item->checkin_email()); return $notifyBy; } @@ -143,23 +143,23 @@ public function toGoogleChat() } - /** - * Get the mail representation of the notification. - * - * @param mixed $notifiable - * @return \Illuminate\Notifications\Messages\MailMessage - */ - public function toMail() - { - Log::debug('to email called'); - - return (new MailMessage)->markdown('notifications.markdown.checkin-accessory', - [ - 'item' => $this->item, - 'admin' => $this->admin, - 'note' => $this->note, - 'target' => $this->target, - ]) - ->subject(trans('mail.Accessory_Checkin_Notification')); - } +// /** +// * Get the mail representation of the notification. +// * +// * @param mixed $notifiable +// * @return \Illuminate\Notifications\Messages\MailMessage +// */ +// public function toMail() +// { +// Log::debug('to email called'); +// +// return (new MailMessage)->markdown('notifications.markdown.checkin-accessory', +// [ +// 'item' => $this->item, +// 'admin' => $this->admin, +// 'note' => $this->note, +// 'target' => $this->target, +// ]) +// ->subject(trans('mail.Accessory_Checkin_Notification')); +// } } diff --git a/app/Notifications/CheckoutAccessoryNotification.php b/app/Notifications/CheckoutAccessoryNotification.php index 721ba7f6a4b5..cbc946ba43ed 100644 --- a/app/Notifications/CheckoutAccessoryNotification.php +++ b/app/Notifications/CheckoutAccessoryNotification.php @@ -6,6 +6,7 @@ use App\Models\Setting; use App\Models\User; use Illuminate\Bus\Queueable; +use Illuminate\Notifications\Channels\SlackWebhookChannel; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; @@ -55,35 +56,7 @@ public function via() } if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) { - $notifyBy[] = 'slack'; - } - - /** - * Only send notifications to users that have email addresses - */ - if ($this->target instanceof User && $this->target->email != '') { - - /** - * Send an email if the asset requires acceptance, - * so the user can accept or decline the asset - */ - if ($this->item->requireAcceptance()) { - $notifyBy[1] = 'mail'; - } - - /** - * Send an email if the item has a EULA, since the user should always receive it - */ - if ($this->item->getEula()) { - $notifyBy[1] = 'mail'; - } - - /** - * Send an email if an email should be sent at checkin/checkout - */ - if ($this->item->checkin_email()) { - $notifyBy[1] = 'mail'; - } + $notifyBy[] = SlackWebhookChannel::class; } return $notifyBy; @@ -163,31 +136,4 @@ public function toGoogleChat() } - - /** - * Get the mail representation of the notification. - * - * @return \Illuminate\Notifications\Messages\MailMessage - */ - public function toMail() - { - Log::debug($this->item->getImageUrl()); - $eula = $this->item->getEula(); - $req_accept = $this->item->requireAcceptance(); - - $accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance); - - return (new MailMessage)->markdown('notifications.markdown.checkout-accessory', - [ - 'item' => $this->item, - 'admin' => $this->admin, - 'note' => $this->note, - 'target' => $this->target, - 'eula' => $eula, - 'req_accept' => $req_accept, - 'accept_url' => $accept_url, - 'checkout_qty' => $this->checkout_qty, - ]) - ->subject(trans('mail.Confirm_accessory_delivery')); - } } diff --git a/resources/views/notifications/markdown/checkin-accessory.blade.php b/resources/views/mail/markdown/checkin-accessory.blade.php similarity index 100% rename from resources/views/notifications/markdown/checkin-accessory.blade.php rename to resources/views/mail/markdown/checkin-accessory.blade.php diff --git a/resources/views/notifications/markdown/checkout-accessory.blade.php b/resources/views/mail/markdown/checkout-accessory.blade.php similarity index 100% rename from resources/views/notifications/markdown/checkout-accessory.blade.php rename to resources/views/mail/markdown/checkout-accessory.blade.php diff --git a/routes/web.php b/routes/web.php index 548758e3827d..756c6dd4513e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -24,6 +24,7 @@ use App\Http\Controllers\Auth\ForgotPasswordController; use App\Http\Controllers\Auth\ResetPasswordController; use App\Livewire\Importer; +use App\Models\Accessory; use App\Models\Asset; use App\Models\User; use Illuminate\Support\Facades\Route; @@ -56,7 +57,7 @@ * Locations */ Route::get('/test-email', function() { - $item = Asset::find(1); // Load some test data + $item = Accessory::find(1); // Load some test data $admin = User::find(1); $target = User::find(2); $acceptance = null; // Simulate acceptance data @@ -67,11 +68,10 @@ $fields = $item->model->fieldset->fields; } - return new \App\Mail\CheckinAssetMail( + return new \App\Mail\CheckinAccessoryMail( $item, $admin, $target, - $acceptance, $note); }); From c39df34bdfabb2acde4ab8aaba01cf5c65582675 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 15:29:50 -0700 Subject: [PATCH 053/318] forgot to add accessory mail to project --- app/Mail/CheckinAccessoryMail.php | 79 +++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 app/Mail/CheckinAccessoryMail.php diff --git a/app/Mail/CheckinAccessoryMail.php b/app/Mail/CheckinAccessoryMail.php new file mode 100644 index 000000000000..0c3ddbba0e5e --- /dev/null +++ b/app/Mail/CheckinAccessoryMail.php @@ -0,0 +1,79 @@ +item = $accessory; + $this->target = $checkedOutTo; + $this->admin = $checkedInby; + $this->note = $note; + $this->settings = Setting::getSettings(); + } + + /** + * Get the message envelope. + */ + public function envelope(): Envelope + { + $from = null; + $cc = []; + + if (!empty(Setting::getSettings()->alert_email)) { + $from = new Address(Setting::getSettings()->alert_email); + } + if (!empty(Setting::getSettings()->admin_cc_email)) { + $cc[] = new Address(Setting::getSettings()->admin_cc_email); + } + + return new Envelope( + from: $from ?? new Address('default@example.com', 'Default Sender'), + cc: $cc, + subject: trans('mail.Accessory_Checkin_Notification'), + ); + } + + /** + * Get the message content definition. + */ + public function content(): Content + { + return new Content( + markdown: 'mail.markdown.checkin-accessory', + with: [ + 'item' => $this->item, + 'admin' => $this->admin, + 'note' => $this->note, + 'target' => $this->target, + ] + ); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + return []; + } +} From f1d83a3f281a7d17c2b8ca52ccaf8403cac4d246 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 15:30:53 -0700 Subject: [PATCH 054/318] forgot to add asset checkout markdown to projet --- .../mail/markdown/checkout-asset.blade.php | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 resources/views/mail/markdown/checkout-asset.blade.php diff --git a/resources/views/mail/markdown/checkout-asset.blade.php b/resources/views/mail/markdown/checkout-asset.blade.php new file mode 100644 index 000000000000..5b4c811dd712 --- /dev/null +++ b/resources/views/mail/markdown/checkout-asset.blade.php @@ -0,0 +1,76 @@ +@component('mail::message') + # {{ trans('mail.hello') }} {{ $target->present()->fullName() }}, + + {{ trans('mail.new_item_checked') }} + + @if (($snipeSettings->show_images_in_email =='1') && $item->getImageUrl()) +
Asset
+ @endif + + @component('mail::table') + | | | + | ------------- | ------------- | + @if ((isset($item->name)) && ($item->name!='')) + | **{{ trans('mail.asset_name') }}** | {{ $item->name }} | + @endif + @if (($item->name!=$item->asset_tag)) + | **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} | + @endif + @if (isset($item->manufacturer)) + | **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} | + @endif + @if (isset($item->model)) + | **{{ trans('general.asset_model') }}** | {{ $item->model->name }} | + @endif + @if ((isset($item->model->model_number)) && ($item->model->name!=$item->model->model_number)) + | **{{ trans('general.model_no') }}** | {{ $item->model->model_number }} | + @endif + @if (isset($item->serial)) + | **{{ trans('mail.serial') }}** | {{ $item->serial }} | + @endif + @if (isset($last_checkout)) + | **{{ trans('mail.checkout_date') }}** | {{ $last_checkout }} | + @endif + @if (isset($status)) + | **{{ trans('general.status') }}** | {{ $status }} | + @endif + @if ((isset($expected_checkin)) && ($expected_checkin!='')) + | **{{ trans('mail.expecting_checkin_date') }}** | {{ $expected_checkin }} | + @endif + @foreach($fields as $field) + @if (($item->{ $field->db_column_name() }!='') && ($field->show_in_email) && ($field->field_encrypted=='0')) + | **{{ $field->name }}** | {{ $item->{ $field->db_column_name() } }} | + @endif + @endforeach + @if ($admin) + | **{{ trans('general.administrator') }}** | {{ $admin->present()->fullName() }} | + @endif + @if ($note) + | **{{ trans('mail.additional_notes') }}** | {{ $note }} | + @endif + @endcomponent + + @if (($req_accept == 1) && ($eula!='')) + {{ trans('mail.read_the_terms_and_click') }} + @elseif (($req_accept == 1) && ($eula=='')) + {{ trans('mail.click_on_the_link_asset') }} + @elseif (($req_accept == 0) && ($eula!='')) + {{ trans('mail.read_the_terms') }} + @endif + + @if ($eula) + @component('mail::panel') + {!! $eula !!} + @endcomponent + @endif + + @if ($req_accept == 1) + **[✔ {{ trans('mail.i_have_read') }}]({{ $accept_url }})** + @endif + + + {{ trans('mail.best_regards') }} + + {{ $snipeSettings->site_name }} + +@endcomponent \ No newline at end of file From f0d3a6e2d353d88f598fda957a6190c0efe86cb8 Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 16 Oct 2024 18:35:31 -0400 Subject: [PATCH 055/318] removing some comments/merging in develop --- app/Http/Requests/AssetCheckinRequest.php | 1 - app/Http/Requests/AssetCheckoutRequest.php | 1 - 2 files changed, 2 deletions(-) diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 3d958aae1844..ea2a6e0b0165 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -26,7 +26,6 @@ public function rules() $rules = []; if($settings->require_checkinout_notes) { - // dd($settings->require_checkinout_notes); $rules['notes'] = 'string|nullable'; } return $rules; diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index 10e8bfbed553..f7c338245585 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -40,7 +40,6 @@ public function rules() ]; if($settings->require_checkinout_notes) { - // dd($settings->require_checkinout_notes); $rules['notes'] = 'required|string|nullable'; } From 2584d603445bb0a82e722cd8b7a3dbf7f1c1d020 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 15:38:49 -0700 Subject: [PATCH 056/318] adds Licenses seat checkout Mailable --- app/Listeners/CheckoutableListener.php | 3 +- app/Mail/CheckoutLicenseMail.php | 89 +++++++++++++++++++ .../CheckoutLicenseSeatNotification.php | 28 ------ .../markdown/checkout-license.blade.php | 0 routes/web.php | 6 +- 5 files changed, 95 insertions(+), 31 deletions(-) create mode 100644 app/Mail/CheckoutLicenseMail.php rename resources/views/{notifications => mail}/markdown/checkout-license.blade.php (100%) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index 6acedd4d97b6..915ed5753aae 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -7,6 +7,7 @@ use App\Mail\CheckoutAccessoryMail; use App\Mail\CheckoutAssetMail; use App\Mail\CheckinAssetMail; +use App\Mail\CheckoutLicenseMail; use App\Models\Accessory; use App\Models\Asset; use App\Models\CheckoutAcceptance; @@ -229,8 +230,8 @@ private function getCheckoutMailType($event, $acceptance){ $lookup = [ Accessory::class => CheckoutAccessoryMail::class, Asset::class => CheckoutAssetMail::class, + LicenseSeat::class => CheckoutLicenseMail::class, // Consumable::class => -// LicenseSeat::class => ]; $mailable= $lookup[get_class($event->checkoutable)]; diff --git a/app/Mail/CheckoutLicenseMail.php b/app/Mail/CheckoutLicenseMail.php new file mode 100644 index 000000000000..8389f1136fce --- /dev/null +++ b/app/Mail/CheckoutLicenseMail.php @@ -0,0 +1,89 @@ +item = $licenseSeat->license; + $this->admin = $checkedOutBy; + $this->note = $note; + $this->target = $checkedOutTo; + $this->acceptance = $acceptance; + + $this->settings = Setting::getSettings(); + } + + /** + * Get the message envelope. + */ + public function envelope(): Envelope + { + $from = null; + $cc = []; + + if (!empty(Setting::getSettings()->alert_email)) { + $from = new Address(Setting::getSettings()->alert_email); + } + if (!empty(Setting::getSettings()->admin_cc_email)) { + $cc[] = new Address(Setting::getSettings()->admin_cc_email); + } + + return new Envelope( + from: $from ?? new Address('default@example.com', 'Default Sender'), + cc: $cc, + subject: trans('mail.Confirm_license_delivery'), + ); + } + + /** + * Get the message content definition. + */ + public function content(): Content + { + $eula = method_exists($this->item, 'getEula') ? $this->item->getEula() : ''; + $req_accept = method_exists($this->item, 'requireAcceptance') ? $this->item->requireAcceptance() : 0; + + $accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance); + + return new Content( + markdown: 'mail.markdown.checkout-license', + with: [ + 'item' => $this->item, + 'admin' => $this->admin, + 'note' => $this->note, + 'target' => $this->target, + 'eula' => $eula, + 'req_accept' => $req_accept, + 'accept_url' => $accept_url, + ] + ); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + return []; + } +} diff --git a/app/Notifications/CheckoutLicenseSeatNotification.php b/app/Notifications/CheckoutLicenseSeatNotification.php index 8e0273c66e7d..16f8c7c1d50c 100644 --- a/app/Notifications/CheckoutLicenseSeatNotification.php +++ b/app/Notifications/CheckoutLicenseSeatNotification.php @@ -63,34 +63,6 @@ public function via() $notifyBy[] = 'slack'; } - /** - * Only send notifications to users that have email addresses - */ - if ($this->target instanceof User && $this->target->email != '') { - - /** - * Send an email if the asset requires acceptance, - * so the user can accept or decline the asset - */ - if ($this->item->requireAcceptance()) { - $notifyBy[1] = 'mail'; - } - - /** - * Send an email if the item has a EULA, since the user should always receive it - */ - if ($this->item->getEula()) { - $notifyBy[1] = 'mail'; - } - - /** - * Send an email if an email should be sent at checkin/checkout - */ - if ($this->item->checkin_email()) { - $notifyBy[1] = 'mail'; - } - } - return $notifyBy; } diff --git a/resources/views/notifications/markdown/checkout-license.blade.php b/resources/views/mail/markdown/checkout-license.blade.php similarity index 100% rename from resources/views/notifications/markdown/checkout-license.blade.php rename to resources/views/mail/markdown/checkout-license.blade.php diff --git a/routes/web.php b/routes/web.php index 756c6dd4513e..bcbe159b3046 100644 --- a/routes/web.php +++ b/routes/web.php @@ -26,6 +26,7 @@ use App\Livewire\Importer; use App\Models\Accessory; use App\Models\Asset; +use App\Models\LicenseSeat; use App\Models\User; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Auth; @@ -57,7 +58,7 @@ * Locations */ Route::get('/test-email', function() { - $item = Accessory::find(1); // Load some test data + $item = LicenseSeat::find(1); // Load some test data $admin = User::find(1); $target = User::find(2); $acceptance = null; // Simulate acceptance data @@ -68,10 +69,11 @@ $fields = $item->model->fieldset->fields; } - return new \App\Mail\CheckinAccessoryMail( + return new \App\Mail\CheckoutLicenseMail( $item, $admin, $target, + $acceptance, $note); }); From 4becdca8aa792957243e5ca9a3dcf04cfa3ee522 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 15:39:20 -0700 Subject: [PATCH 057/318] removes toMail from license notificaqtion --- .../CheckoutLicenseSeatNotification.php | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/app/Notifications/CheckoutLicenseSeatNotification.php b/app/Notifications/CheckoutLicenseSeatNotification.php index 16f8c7c1d50c..85d02abc9294 100644 --- a/app/Notifications/CheckoutLicenseSeatNotification.php +++ b/app/Notifications/CheckoutLicenseSeatNotification.php @@ -136,29 +136,4 @@ public function toGoogleChat() ); } - - /** - * Get the mail representation of the notification. - * - * @return \Illuminate\Notifications\Messages\MailMessage - */ - public function toMail() - { - $eula = method_exists($this->item, 'getEula') ? $this->item->getEula() : ''; - $req_accept = method_exists($this->item, 'requireAcceptance') ? $this->item->requireAcceptance() : 0; - - $accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance); - - return (new MailMessage)->markdown('notifications.markdown.checkout-license', - [ - 'item' => $this->item, - 'admin' => $this->admin, - 'note' => $this->note, - 'target' => $this->target, - 'eula' => $eula, - 'req_accept' => $req_accept, - 'accept_url' => $accept_url, - ]) - ->subject(trans('mail.Confirm_license_delivery')); - } } From 02ff646da4388422d260ed50d8e93ea7bc57dab0 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 15:44:45 -0700 Subject: [PATCH 058/318] adds checkin license mailable --- app/Listeners/CheckoutableListener.php | 3 +- app/Mail/CheckinLicenseMail.php | 79 +++++++++++++++++++ .../CheckinAccessoryNotification.php | 33 -------- .../CheckinLicenseSeatNotification.php | 27 ------- .../markdown/checkin-license.blade.php | 0 5 files changed, 81 insertions(+), 61 deletions(-) create mode 100644 app/Mail/CheckinLicenseMail.php rename resources/views/{notifications => mail}/markdown/checkin-license.blade.php (100%) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index 915ed5753aae..fe9f7b6d383b 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -4,6 +4,7 @@ use App\Events\CheckoutableCheckedOut; use App\Mail\CheckinAccessoryMail; +use App\Mail\CheckinLicenseMail; use App\Mail\CheckoutAccessoryMail; use App\Mail\CheckoutAssetMail; use App\Mail\CheckinAssetMail; @@ -242,8 +243,8 @@ private function getCheckinMailType($event){ $lookup = [ Accessory::class => CheckinAccessoryMail::class, Asset::class => CheckinAssetMail::class, + LicenseSeat::class => CheckinLicenseMail::class, // Consumable::class => -// LicenseSeat::class => ]; $mailable= $lookup[get_class($event->checkoutable)]; diff --git a/app/Mail/CheckinLicenseMail.php b/app/Mail/CheckinLicenseMail.php new file mode 100644 index 000000000000..e567383f8035 --- /dev/null +++ b/app/Mail/CheckinLicenseMail.php @@ -0,0 +1,79 @@ +target = $checkedOutTo; + $this->item = $licenseSeat->license; + $this->admin = $checkedInBy; + $this->note = $note; + $this->settings = Setting::getSettings(); + } + + /** + * Get the message envelope. + */ + public function envelope(): Envelope + { + $from = null; + $cc = []; + + if (!empty(Setting::getSettings()->alert_email)) { + $from = new Address(Setting::getSettings()->alert_email); + } + if (!empty(Setting::getSettings()->admin_cc_email)) { + $cc[] = new Address(Setting::getSettings()->admin_cc_email); + } + + return new Envelope( + from: $from ?? new Address('default@example.com', 'Default Sender'), + cc: $cc, + subject: trans('mail.License_Checkin_Notification'), + ); + } + + /** + * Get the message content definition. + */ + public function content(): Content + { + return new Content( + markdown: 'mail.markdown.checkin-license', + with: [ + 'item' => $this->item, + 'admin' => $this->admin, + 'note' => $this->note, + 'target' => $this->target, + ] + ); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + return []; + } +} diff --git a/app/Notifications/CheckinAccessoryNotification.php b/app/Notifications/CheckinAccessoryNotification.php index d36b77a85019..777834aae7bd 100644 --- a/app/Notifications/CheckinAccessoryNotification.php +++ b/app/Notifications/CheckinAccessoryNotification.php @@ -58,19 +58,6 @@ public function via() $notifyBy[] = 'slack'; } -// /** -// * Only send notifications to users that have email addresses -// */ -// if ($this->target instanceof User && $this->target->email != '') { -// Log::debug('The target is a user'); -// -// if ($this->item->checkin_email()) { -// $notifyBy[] = 'mail'; -// } -// } -// -// Log::debug('checkin_email on this category is '.$this->item->checkin_email()); - return $notifyBy; } @@ -142,24 +129,4 @@ public function toGoogleChat() ); } - -// /** -// * Get the mail representation of the notification. -// * -// * @param mixed $notifiable -// * @return \Illuminate\Notifications\Messages\MailMessage -// */ -// public function toMail() -// { -// Log::debug('to email called'); -// -// return (new MailMessage)->markdown('notifications.markdown.checkin-accessory', -// [ -// 'item' => $this->item, -// 'admin' => $this->admin, -// 'note' => $this->note, -// 'target' => $this->target, -// ]) -// ->subject(trans('mail.Accessory_Checkin_Notification')); -// } } diff --git a/app/Notifications/CheckinLicenseSeatNotification.php b/app/Notifications/CheckinLicenseSeatNotification.php index 289e63a16247..114011bd7284 100644 --- a/app/Notifications/CheckinLicenseSeatNotification.php +++ b/app/Notifications/CheckinLicenseSeatNotification.php @@ -61,14 +61,6 @@ public function via() $notifyBy[] = 'slack'; } - /** - * Only send checkin notifications to users if the category - * has the corresponding checkbox checked. - */ - if ($this->item->checkin_email() && $this->target instanceof User && $this->target->email != '') { - $notifyBy[] = 'mail'; - } - return $notifyBy; } @@ -149,23 +141,4 @@ public function toGoogleChat() ); } - - - /** - * Get the mail representation of the notification. - * - * @param mixed $notifiable - * @return \Illuminate\Notifications\Messages\MailMessage - */ - public function toMail() - { - return (new MailMessage)->markdown('notifications.markdown.checkin-license', - [ - 'item' => $this->item, - 'admin' => $this->admin, - 'note' => $this->note, - 'target' => $this->target, - ]) - ->subject(trans('mail.License_Checkin_Notification')); - } } diff --git a/resources/views/notifications/markdown/checkin-license.blade.php b/resources/views/mail/markdown/checkin-license.blade.php similarity index 100% rename from resources/views/notifications/markdown/checkin-license.blade.php rename to resources/views/mail/markdown/checkin-license.blade.php From 02bda3cd9598d77ddd2c68f67f589f82e0af37b3 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 15:53:05 -0700 Subject: [PATCH 059/318] adds Checkout Consumable mailable and slackwebhook channel to notifs --- app/Listeners/CheckoutableListener.php | 16 ++-- app/Mail/CheckoutConsumableMail.php | 91 +++++++++++++++++++ .../CheckinAccessoryNotification.php | 3 +- .../CheckoutConsumableNotification.php | 83 ++++++----------- .../CheckoutLicenseSeatNotification.php | 3 +- .../markdown/checkout-consumable.blade.php | 0 6 files changed, 133 insertions(+), 63 deletions(-) create mode 100644 app/Mail/CheckoutConsumableMail.php rename resources/views/{notifications => mail}/markdown/checkout-consumable.blade.php (100%) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index fe9f7b6d383b..4f51ed705f5d 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -8,6 +8,7 @@ use App\Mail\CheckoutAccessoryMail; use App\Mail\CheckoutAssetMail; use App\Mail\CheckinAssetMail; +use App\Mail\CheckoutConsumableMail; use App\Mail\CheckoutLicenseMail; use App\Models\Accessory; use App\Models\Asset; @@ -210,21 +211,22 @@ private function getCheckoutNotification($event, $acceptance = null) { $notificationClass = null; - switch (true) { - case $event->checkoutable instanceof Accessory: + switch (get_class($event->checkoutable)) { + case Accessory::class: $notificationClass = CheckoutAccessoryNotification::class; break; - case $event->checkoutable instanceof Asset: + case Asset::class: $notificationClass = CheckoutAssetNotification::class; break; - case $event->checkoutable instanceof Consumable: + case Consumable::class: $notificationClass = CheckoutConsumableNotification::class; break; - case $event->checkoutable instanceof LicenseSeat: + case LicenseSeat::class: $notificationClass = CheckoutLicenseSeatNotification::class; break; } + return new $notificationClass($event->checkoutable, $event->checkedOutTo, $event->checkedOutBy, $acceptance, $event->note); } private function getCheckoutMailType($event, $acceptance){ @@ -232,7 +234,7 @@ private function getCheckoutMailType($event, $acceptance){ Accessory::class => CheckoutAccessoryMail::class, Asset::class => CheckoutAssetMail::class, LicenseSeat::class => CheckoutLicenseMail::class, -// Consumable::class => + Consumable::class => CheckoutConsumableMail::class, ]; $mailable= $lookup[get_class($event->checkoutable)]; @@ -244,8 +246,8 @@ private function getCheckinMailType($event){ Accessory::class => CheckinAccessoryMail::class, Asset::class => CheckinAssetMail::class, LicenseSeat::class => CheckinLicenseMail::class, -// Consumable::class => ]; + $mailable= $lookup[get_class($event->checkoutable)]; return new $mailable($event->checkoutable, $event->checkedOutTo, $event->checkedInBy, $event->note); diff --git a/app/Mail/CheckoutConsumableMail.php b/app/Mail/CheckoutConsumableMail.php new file mode 100644 index 000000000000..382f789eb917 --- /dev/null +++ b/app/Mail/CheckoutConsumableMail.php @@ -0,0 +1,91 @@ +item = $consumable; + $this->admin = $checkedOutBy; + $this->note = $note; + $this->target = $checkedOutTo; + $this->acceptance = $acceptance; + + $this->settings = Setting::getSettings(); + } + + /** + * Get the message envelope. + */ + public function envelope(): Envelope + { + $from = null; + $cc = []; + + if (!empty(Setting::getSettings()->alert_email)) { + $from = new Address(Setting::getSettings()->alert_email); + } + if (!empty(Setting::getSettings()->admin_cc_email)) { + $cc[] = new Address(Setting::getSettings()->admin_cc_email); + } + + return new Envelope( + from: $from ?? new Address('default@example.com', 'Default Sender'), + cc: $cc, + subject: trans('mail.Confirm_consumable_delivery'), + ); + } + + /** + * Get the message content definition. + */ + public function content(): Content + { + Log::debug($this->item->getImageUrl()); + $eula = $this->item->getEula(); + $req_accept = $this->item->requireAcceptance(); + + $accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance); + + return new Content( + markdown: 'mail.markdown.checkout-consumable', + with: [ + 'item' => $this->item, + 'admin' => $this->admin, + 'note' => $this->note, + 'target' => $this->target, + 'eula' => $eula, + 'req_accept' => $req_accept, + 'accept_url' => $accept_url, + ] + ); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + return []; + } +} diff --git a/app/Notifications/CheckinAccessoryNotification.php b/app/Notifications/CheckinAccessoryNotification.php index 777834aae7bd..d2955151217b 100644 --- a/app/Notifications/CheckinAccessoryNotification.php +++ b/app/Notifications/CheckinAccessoryNotification.php @@ -6,6 +6,7 @@ use App\Models\Setting; use App\Models\User; use Illuminate\Bus\Queueable; +use Illuminate\Notifications\Channels\SlackWebhookChannel; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; @@ -55,7 +56,7 @@ public function via() } if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) { - $notifyBy[] = 'slack'; + $notifyBy[] = SlackWebhookChannel::class; } return $notifyBy; diff --git a/app/Notifications/CheckoutConsumableNotification.php b/app/Notifications/CheckoutConsumableNotification.php index 6746795f2c63..0a2733689b93 100644 --- a/app/Notifications/CheckoutConsumableNotification.php +++ b/app/Notifications/CheckoutConsumableNotification.php @@ -6,6 +6,7 @@ use App\Models\Setting; use App\Models\User; use Illuminate\Bus\Queueable; +use Illuminate\Notifications\Channels\SlackWebhookChannel; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; @@ -61,36 +62,36 @@ public function via() } if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) { - $notifyBy[] = 'slack'; + $notifyBy[] = SlackWebhookChannel::class; } - /** - * Only send notifications to users that have email addresses - */ - if ($this->target instanceof User && $this->target->email != '') { - - /** - * Send an email if the asset requires acceptance, - * so the user can accept or decline the asset - */ - if ($this->item->requireAcceptance()) { - $notifyBy[1] = 'mail'; - } - - /** - * Send an email if the item has a EULA, since the user should always receive it - */ - if ($this->item->getEula()) { - $notifyBy[1] = 'mail'; - } - - /** - * Send an email if an email should be sent at checkin/checkout - */ - if ((method_exists($this->item, 'checkin_email')) && ($this->item->checkin_email())) { - $notifyBy[1] = 'mail'; - } - } +// /** +// * Only send notifications to users that have email addresses +// */ +// if ($this->target instanceof User && $this->target->email != '') { +// +// /** +// * Send an email if the asset requires acceptance, +// * so the user can accept or decline the asset +// */ +// if ($this->item->requireAcceptance()) { +// $notifyBy[1] = 'mail'; +// } +// +// /** +// * Send an email if the item has a EULA, since the user should always receive it +// */ +// if ($this->item->getEula()) { +// $notifyBy[1] = 'mail'; +// } +// +// /** +// * Send an email if an email should be sent at checkin/checkout +// */ +// if ((method_exists($this->item, 'checkin_email')) && ($this->item->checkin_email())) { +// $notifyBy[1] = 'mail'; +// } +// } return $notifyBy; } @@ -165,30 +166,4 @@ public function toGoogleChat() ); } - - /** - * Get the mail representation of the notification. - * - * @return \Illuminate\Notifications\Messages\MailMessage - */ - public function toMail() - { - Log::debug($this->item->getImageUrl()); - $eula = $this->item->getEula(); - $req_accept = $this->item->requireAcceptance(); - - $accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance); - - return (new MailMessage)->markdown('notifications.markdown.checkout-consumable', - [ - 'item' => $this->item, - 'admin' => $this->admin, - 'note' => $this->note, - 'target' => $this->target, - 'eula' => $eula, - 'req_accept' => $req_accept, - 'accept_url' => $accept_url, - ]) - ->subject(trans('mail.Confirm_consumable_delivery')); - } } diff --git a/app/Notifications/CheckoutLicenseSeatNotification.php b/app/Notifications/CheckoutLicenseSeatNotification.php index 85d02abc9294..1c26138a6ed7 100644 --- a/app/Notifications/CheckoutLicenseSeatNotification.php +++ b/app/Notifications/CheckoutLicenseSeatNotification.php @@ -6,6 +6,7 @@ use App\Models\Setting; use App\Models\User; use Illuminate\Bus\Queueable; +use Illuminate\Notifications\Channels\SlackWebhookChannel; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\SlackMessage; use Illuminate\Notifications\Notification; @@ -60,7 +61,7 @@ public function via() } if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) { - $notifyBy[] = 'slack'; + $notifyBy[] = SlackWebhookChannel::class; } return $notifyBy; diff --git a/resources/views/notifications/markdown/checkout-consumable.blade.php b/resources/views/mail/markdown/checkout-consumable.blade.php similarity index 100% rename from resources/views/notifications/markdown/checkout-consumable.blade.php rename to resources/views/mail/markdown/checkout-consumable.blade.php From c56affd66345a92f64fb8c7451ced58b5340dd70 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:07:37 +0100 Subject: [PATCH 060/318] Added SVG icon Signed-off-by: snipe --- app/Helpers/Helper.php | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php index 18e149b57d83..6c43fec05a19 100644 --- a/app/Helpers/Helper.php +++ b/app/Helpers/Helper.php @@ -1123,6 +1123,7 @@ public static function filetype_icon($filename) 'png' => 'far fa-image', 'webp' => 'far fa-image', 'avif' => 'far fa-image', + 'svg' => 'fas fa-vector-square', // word 'doc' => 'far fa-file-word', 'docx' => 'far fa-file-word', @@ -1135,7 +1136,7 @@ public static function filetype_icon($filename) //Text 'txt' => 'far fa-file-alt', 'rtf' => 'far fa-file-alt', - 'xml' => 'far fa-file-alt', + 'xml' => 'fas fa-code', // Misc 'pdf' => 'far fa-file-pdf', 'lic' => 'far fa-save', @@ -1148,41 +1149,7 @@ public static function filetype_icon($filename) return 'far fa-file'; } - public static function show_file_inline($filename) - { - $extension = substr(strrchr($filename, '.'), 1); - - if ($extension) { - switch ($extension) { - case 'jpg': - case 'jpeg': - case 'gif': - case 'png': - case 'webp': - case 'avif': - return true; - break; - default: - return false; - } - } - return false; - } - - /** - * Generate a random encrypted password. - * - * @author Wes Hulette - * - * @since 5.0.0 - * - * @return string - */ - public static function generateEncyrptedPassword(): string - { - return bcrypt(self::generateUnencryptedPassword()); - } /** * Get a random unencrypted password. From 96191a5e9391e86701095b74fefc9064e4bf74d3 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:07:54 +0100 Subject: [PATCH 061/318] Added method to decide if the file should be inlinable Signed-off-by: snipe --- app/Helpers/StorageHelper.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/Helpers/StorageHelper.php b/app/Helpers/StorageHelper.php index 2cdab1d66c40..0b56aa97cd3c 100644 --- a/app/Helpers/StorageHelper.php +++ b/app/Helpers/StorageHelper.php @@ -25,4 +25,25 @@ public static function downloader($filename, $disk = 'default') : BinaryFileResp return Storage::disk($disk)->download($filename); } } + + public static function allowSafeInline($file_with_path) { + + $allowed_inline = [ + 'pdf', + 'svg', + 'jpg', + 'gif', + 'svg', + 'avif', + 'webp', + 'png', + ]; + + if (in_array(pathinfo($file_with_path, PATHINFO_EXTENSION), $allowed_inline)) { + return true; + } + + return false; + + } } From ccd20194484313c6e53bf357687ef8a29a4fffe6 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:08:04 +0100 Subject: [PATCH 062/318] Removed unusded use statements Signed-off-by: snipe --- app/Http/Controllers/Users/UserFilesController.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/Http/Controllers/Users/UserFilesController.php b/app/Http/Controllers/Users/UserFilesController.php index 9e5f322c03eb..c1555705136d 100644 --- a/app/Http/Controllers/Users/UserFilesController.php +++ b/app/Http/Controllers/Users/UserFilesController.php @@ -7,9 +7,6 @@ use App\Http\Requests\UploadFileRequest; use App\Models\Actionlog; use App\Models\User; -use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Input; -use Illuminate\Support\Facades\Response; use Symfony\Component\HttpFoundation\JsonResponse; use Illuminate\Support\Facades\Storage; From c49abb6aeafbfbf43ebcb7e1a9c565288b72b9d9 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:08:38 +0100 Subject: [PATCH 063/318] Refactor the UserFilesController show method for simpler inlining Signed-off-by: snipe --- .../Controllers/Users/UserFilesController.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Users/UserFilesController.php b/app/Http/Controllers/Users/UserFilesController.php index c1555705136d..377692965b4a 100644 --- a/app/Http/Controllers/Users/UserFilesController.php +++ b/app/Http/Controllers/Users/UserFilesController.php @@ -113,6 +113,9 @@ public function destroy($userId = null, $fileId = null) public function show($userId = null, $fileId = null) { + + + if (empty($fileId)) { return redirect()->route('users.show')->with('error', 'Invalid file request'); } @@ -126,15 +129,21 @@ public function show($userId = null, $fileId = null) if ($log = Actionlog::whereNotNull('filename')->where('item_id', $user->id)->find($fileId)) { - // Display the file inline - if (request('inline') == 'true') { + $file = 'private_uploads/users/'.$log->filename; + + + if ((request('inline') == 'true') && (StorageHelper::allowSafeInline($file) === false)) { + + // Display the file as text is not allowed for security reasons $headers = [ 'Content-Disposition' => 'inline', + 'Content-Type' => 'text/plain', ]; - return Storage::download('private_uploads/users/'.$log->filename, $log->filename, $headers); + return Storage::download($file, $log->filename, $headers); + } - return Storage::download('private_uploads/users/'.$log->filename); + return Storage::download($file); } return redirect()->route('users.index')->with('error', trans('admin/users/message.log_record_not_found')); From c49921f50fc54785b87d59e6265b29088bba48fe Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:08:54 +0100 Subject: [PATCH 064/318] Removed unused (maybe?) API endpoint Signed-off-by: snipe --- app/Http/Transformers/ActionlogsTransformer.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Http/Transformers/ActionlogsTransformer.php b/app/Http/Transformers/ActionlogsTransformer.php index d0605c747bb1..49eee4241575 100644 --- a/app/Http/Transformers/ActionlogsTransformer.php +++ b/app/Http/Transformers/ActionlogsTransformer.php @@ -158,7 +158,6 @@ public function transformActionlog (Actionlog $actionlog, $settings = null) [ 'url' => $file_url, 'filename' => $actionlog->filename, - 'inlineable' => (bool) Helper::show_file_inline($actionlog->filename), ] : null, 'item' => ($actionlog->item) ? [ From 017884f8432abd3afed7397a7967bb2813df0262 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:09:09 +0100 Subject: [PATCH 065/318] Added checks and filetype display Signed-off-by: snipe --- resources/views/users/view.blade.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index 4ef3a0c24ff6..d33b40d94871 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -995,7 +995,8 @@ class="table table-striped snipe-table" - {{trans('general.file_type')}} + {{trans('general.icon')}} + {{trans('general.file_type')}} {{ trans('general.image') }} {{ trans('general.file_name') }} {{ trans('general.filesize') }} @@ -1009,9 +1010,11 @@ class="table table-striped snipe-table" @foreach ($user->uploads as $file) - + {{ Helper::filetype_icon($file->filename) }} - + + + {{ pathinfo('private_uploads/users/'.$file->filename, PATHINFO_EXTENSION) }} @if (($file->filename) && (Storage::exists('private_uploads/users/'.$file->filename))) @@ -1045,7 +1048,7 @@ class="table table-striped snipe-table" {{ trans('general.download') }} - + @endif From c01190fac279b38d8ee74a636d8cf9c2fd7a7285 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:18:34 +0100 Subject: [PATCH 066/318] Conditionally add content-type Signed-off-by: snipe --- app/Http/Controllers/Users/UserFilesController.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Users/UserFilesController.php b/app/Http/Controllers/Users/UserFilesController.php index 377692965b4a..15b8018b78d7 100644 --- a/app/Http/Controllers/Users/UserFilesController.php +++ b/app/Http/Controllers/Users/UserFilesController.php @@ -132,15 +132,19 @@ public function show($userId = null, $fileId = null) $file = 'private_uploads/users/'.$log->filename; - if ((request('inline') == 'true') && (StorageHelper::allowSafeInline($file) === false)) { - // Display the file as text is not allowed for security reasons + if (request('inline') == 'true') { + $headers = [ 'Content-Disposition' => 'inline', - 'Content-Type' => 'text/plain', ]; - return Storage::download($file, $log->filename, $headers); + // This is NOT allowed as inline - force it to be displayed as text + if (StorageHelper::allowSafeInline($file) === false) { + array_push($headers, ['Content-Type' => 'text/plain']); + } + + return Storage::download($file, $log->filename, $headers); } return Storage::download($file); From 02c80ff18af48c016433807b4bdc0f384ffde41a Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:18:40 +0100 Subject: [PATCH 067/318] Added comment Signed-off-by: snipe --- app/Helpers/StorageHelper.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Helpers/StorageHelper.php b/app/Helpers/StorageHelper.php index 0b56aa97cd3c..ef0facc27b67 100644 --- a/app/Helpers/StorageHelper.php +++ b/app/Helpers/StorageHelper.php @@ -26,6 +26,15 @@ public static function downloader($filename, $disk = 'default') : BinaryFileResp } } + + /** + * This determines the file types that should be allowed inline and checks their fileinfo extension + * + * @author [ + * @since v7.0.14 + * @param $file_with_path + * @return bool + */ public static function allowSafeInline($file_with_path) { $allowed_inline = [ From d67addc69ee2fde2fdc9d90e1eefa13f1c1e4f26 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:21:43 +0100 Subject: [PATCH 068/318] =?UTF-8?q?Removed=20filetype=20column=20-=20it?= =?UTF-8?q?=E2=80=99s=20dumb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: snipe --- resources/views/users/view.blade.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index d33b40d94871..223d525f1d64 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -995,7 +995,6 @@ class="table table-striped snipe-table" - {{trans('general.icon')}} {{trans('general.file_type')}} {{ trans('general.image') }} {{ trans('general.file_name') }} @@ -1013,9 +1012,6 @@ class="table table-striped snipe-table" {{ Helper::filetype_icon($file->filename) }} - - {{ pathinfo('private_uploads/users/'.$file->filename, PATHINFO_EXTENSION) }} - @if (($file->filename) && (Storage::exists('private_uploads/users/'.$file->filename))) @if (Helper::checkUploadIsImage($file->get_src('users'))) From 4933aa5784e3a86021136775055d81eed7b3c966 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:27:04 +0100 Subject: [PATCH 069/318] Add StorageHelper to app config Signed-off-by: snipe --- config/app.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/app.php b/config/app.php index bc74b4dd0547..39898ff4372b 100755 --- a/config/app.php +++ b/config/app.php @@ -280,7 +280,6 @@ Illuminate\Redis\RedisServiceProvider::class, Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, Illuminate\Session\SessionServiceProvider::class, -// Illuminate\Translation\TranslationServiceProvider::class, //replaced on next line App\Providers\SnipeTranslationServiceProvider::class, //we REPLACE the default Laravel translator with our own Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, @@ -373,7 +372,7 @@ 'Image' => Intervention\Image\ImageServiceProvider::class, 'Carbon' => Carbon\Carbon::class, 'Helper' => App\Helpers\Helper::class, - // makes it much easier to use 'Helper::blah' in blades (which is where we usually use this) + 'StorageHelper' => App\Helpers\StorageHelper::class, 'Icon' => App\Helpers\IconHelper::class, 'Socialite' => Laravel\Socialite\Facades\Socialite::class, From 0e9b3c9119e77259ed2f8740ae98e9149936bd51 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:27:39 +0100 Subject: [PATCH 070/318] Check for existence before trying to get the icon Signed-off-by: snipe --- resources/views/users/view.blade.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index 223d525f1d64..7821b874026e 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -1009,13 +1009,17 @@ class="table table-striped snipe-table" @foreach ($user->uploads as $file) - - {{ Helper::filetype_icon($file->filename) }} + @if (Storage::exists('private_uploads/users/'.$file->filename)) + + {{ Helper::filetype_icon($file->filename) }} + @endif @if (($file->filename) && (Storage::exists('private_uploads/users/'.$file->filename))) @if (Helper::checkUploadIsImage($file->get_src('users'))) - + + + @else {{ trans('general.preview_not_available') }} @endif @@ -1044,7 +1048,7 @@ class="table table-striped snipe-table" {{ trans('general.download') }} - + @endif From a7754c1a7fd6559b5d512fbd520556c9d10b76aa Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 16:46:52 -0700 Subject: [PATCH 071/318] fixed asset checkout markdown, and notifiable variable --- app/Listeners/CheckoutableListener.php | 35 +---- .../mail/markdown/checkout-asset.blade.php | 128 +++++++++--------- 2 files changed, 67 insertions(+), 96 deletions(-) diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.php index 4f51ed705f5d..44987e20d17c 100644 --- a/app/Listeners/CheckoutableListener.php +++ b/app/Listeners/CheckoutableListener.php @@ -16,10 +16,9 @@ use App\Models\Component; use App\Models\Consumable; use App\Models\LicenseSeat; -use App\Models\Recipients\AdminRecipient; use App\Models\Setting; -use App\Models\User; use App\Notifications\CheckinAccessoryNotification; +use App\Notifications\CheckinAssetNotification; use App\Notifications\CheckinLicenseSeatNotification; use App\Notifications\CheckoutAccessoryNotification; use App\Notifications\CheckoutAssetNotification; @@ -51,7 +50,7 @@ public function onCheckedOut($event) * Make a checkout acceptance and attach it in the notification */ $acceptance = $this->getCheckoutAcceptance($event); - $notifiable = $this->getNotifiable($event); + $notifiable = $event->checkedOutTo; $mailable = $this->getCheckoutMailType($event, $acceptance); // Send email notifications try { @@ -99,7 +98,7 @@ public function onCheckedIn($event) } } - $notifiable = $this->getNotifiable($event); + $notifiable = $event->checkedInBy; $mailable = $this->getCheckinMailType($event); // Send email notifications @@ -144,34 +143,6 @@ private function getCheckoutAcceptance($event) return $acceptance; } - /** - * Gets the entities to be notified of the passed event - * - * @param Event $event - * @return Collection - */ - private function getNotifiable($event) - { - $notifiable = collect(); - - /** - * Notify who checked out the item as long as the model can route notifications - */ - if (method_exists($event->checkedOutTo, 'routeNotificationFor')) { - $notifiable->push($event->checkedOutTo); - } - - /** - * Notify Admin users if the settings is activated - */ - if ((Setting::getSettings()) && (Setting::getSettings()->admin_cc_email != '')) { - $adminRecipient= new AdminRecipient; - $notifiable->push($adminRecipient->getEmail()); - } - - return new $notifiable; - } - /** * Get the appropriate notification for the event * diff --git a/resources/views/mail/markdown/checkout-asset.blade.php b/resources/views/mail/markdown/checkout-asset.blade.php index 5b4c811dd712..aae0b2158455 100644 --- a/resources/views/mail/markdown/checkout-asset.blade.php +++ b/resources/views/mail/markdown/checkout-asset.blade.php @@ -1,76 +1,76 @@ @component('mail::message') - # {{ trans('mail.hello') }} {{ $target->present()->fullName() }}, +# {{ trans('mail.hello') }} {{ $target->present()->fullName() }}, - {{ trans('mail.new_item_checked') }} +{{ trans('mail.new_item_checked') }} - @if (($snipeSettings->show_images_in_email =='1') && $item->getImageUrl()) -
Asset
- @endif +@if (($snipeSettings->show_images_in_email =='1') && $item->getImageUrl()) +
Asset
+@endif - @component('mail::table') - | | | - | ------------- | ------------- | - @if ((isset($item->name)) && ($item->name!='')) - | **{{ trans('mail.asset_name') }}** | {{ $item->name }} | - @endif - @if (($item->name!=$item->asset_tag)) - | **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} | - @endif - @if (isset($item->manufacturer)) - | **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} | - @endif - @if (isset($item->model)) - | **{{ trans('general.asset_model') }}** | {{ $item->model->name }} | - @endif - @if ((isset($item->model->model_number)) && ($item->model->name!=$item->model->model_number)) - | **{{ trans('general.model_no') }}** | {{ $item->model->model_number }} | - @endif - @if (isset($item->serial)) - | **{{ trans('mail.serial') }}** | {{ $item->serial }} | - @endif - @if (isset($last_checkout)) - | **{{ trans('mail.checkout_date') }}** | {{ $last_checkout }} | - @endif - @if (isset($status)) - | **{{ trans('general.status') }}** | {{ $status }} | - @endif - @if ((isset($expected_checkin)) && ($expected_checkin!='')) - | **{{ trans('mail.expecting_checkin_date') }}** | {{ $expected_checkin }} | - @endif - @foreach($fields as $field) - @if (($item->{ $field->db_column_name() }!='') && ($field->show_in_email) && ($field->field_encrypted=='0')) - | **{{ $field->name }}** | {{ $item->{ $field->db_column_name() } }} | - @endif - @endforeach - @if ($admin) - | **{{ trans('general.administrator') }}** | {{ $admin->present()->fullName() }} | - @endif - @if ($note) - | **{{ trans('mail.additional_notes') }}** | {{ $note }} | - @endif - @endcomponent +@component('mail::table') +| | | +| ------------- | ------------- | +@if ((isset($item->name)) && ($item->name!='')) +| **{{ trans('mail.asset_name') }}** | {{ $item->name }} | +@endif +@if (($item->name!=$item->asset_tag)) +| **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} | +@endif +@if (isset($item->manufacturer)) +| **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} | +@endif +@if (isset($item->model)) +| **{{ trans('general.asset_model') }}** | {{ $item->model->name }} | +@endif +@if ((isset($item->model->model_number)) && ($item->model->name!=$item->model->model_number)) +| **{{ trans('general.model_no') }}** | {{ $item->model->model_number }} | +@endif +@if (isset($item->serial)) +| **{{ trans('mail.serial') }}** | {{ $item->serial }} | +@endif +@if (isset($last_checkout)) +| **{{ trans('mail.checkout_date') }}** | {{ $last_checkout }} | +@endif +@if (isset($status)) +| **{{ trans('general.status') }}** | {{ $status }} | +@endif +@if ((isset($expected_checkin)) && ($expected_checkin!='')) +| **{{ trans('mail.expecting_checkin_date') }}** | {{ $expected_checkin }} | +@endif +@foreach($fields as $field) +@if (($item->{ $field->db_column_name() }!='') && ($field->show_in_email) && ($field->field_encrypted=='0')) +| **{{ $field->name }}** | {{ $item->{ $field->db_column_name() } }} | +@endif +@endforeach +@if ($admin) +| **{{ trans('general.administrator') }}** | {{ $admin->present()->fullName() }} | +@endif +@if ($note) +| **{{ trans('mail.additional_notes') }}** | {{ $note }} | +@endif +@endcomponent - @if (($req_accept == 1) && ($eula!='')) - {{ trans('mail.read_the_terms_and_click') }} - @elseif (($req_accept == 1) && ($eula=='')) - {{ trans('mail.click_on_the_link_asset') }} - @elseif (($req_accept == 0) && ($eula!='')) - {{ trans('mail.read_the_terms') }} - @endif +@if (($req_accept == 1) && ($eula!='')) +{{ trans('mail.read_the_terms_and_click') }} +@elseif (($req_accept == 1) && ($eula=='')) +{{ trans('mail.click_on_the_link_asset') }} +@elseif (($req_accept == 0) && ($eula!='')) +{{ trans('mail.read_the_terms') }} +@endif - @if ($eula) - @component('mail::panel') - {!! $eula !!} - @endcomponent - @endif +@if ($eula) +@component('mail::panel') +{!! $eula !!} +@endcomponent +@endif - @if ($req_accept == 1) - **[✔ {{ trans('mail.i_have_read') }}]({{ $accept_url }})** - @endif +@if ($req_accept == 1) +**[✔ {{ trans('mail.i_have_read') }}]({{ $accept_url }})** +@endif - {{ trans('mail.best_regards') }} +{{ trans('mail.best_regards') }} - {{ $snipeSettings->site_name }} +{{ $snipeSettings->site_name }} @endcomponent \ No newline at end of file From ed6034065b34797ba531782a207fe49384e0f465 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 16:47:36 -0700 Subject: [PATCH 072/318] removed test route --- routes/web.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/routes/web.php b/routes/web.php index bcbe159b3046..dbd1a53808b6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -57,27 +57,6 @@ /* * Locations */ - Route::get('/test-email', function() { - $item = LicenseSeat::find(1); // Load some test data - $admin = User::find(1); - $target = User::find(2); - $acceptance = null; // Simulate acceptance data - $note = 'Test note'; - - $fields = []; - if (($item->model) && ($item->model->fieldset)) { - $fields = $item->model->fieldset->fields; - } - - return new \App\Mail\CheckoutLicenseMail( - $item, - $admin, - $target, - $acceptance, - $note); - }); - - Route::group(['prefix' => 'locations', 'middleware' => ['auth']], function () { Route::post( From 9a794833755ff5fb335ab6cf1e118a0d411b021e Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 16 Oct 2024 16:59:18 -0700 Subject: [PATCH 073/318] removed namespaces from routing --- routes/web.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/routes/web.php b/routes/web.php index dbd1a53808b6..9d9d4ab21f14 100644 --- a/routes/web.php +++ b/routes/web.php @@ -24,10 +24,6 @@ use App\Http\Controllers\Auth\ForgotPasswordController; use App\Http\Controllers\Auth\ResetPasswordController; use App\Livewire\Importer; -use App\Models\Accessory; -use App\Models\Asset; -use App\Models\LicenseSeat; -use App\Models\User; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Auth; From 780ed91a1098ed9af2a5f8f95d6ac87a14e55b20 Mon Sep 17 00:00:00 2001 From: NebelKreis Date: Thu, 17 Oct 2024 16:09:25 +0200 Subject: [PATCH 074/318] Fix: Removed strtolower() from dashboard titles This fix ensures the correct capitalization in different languages. --- resources/views/dashboard.blade.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 39a5d8b751fb..9eb2eb5386ce 100755 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -34,7 +34,7 @@

{{ number_format(\App\Models\Asset::AssetsForShow()->count()) }}

-

{{ strtolower(trans('general.assets')) }}

+

{{ trans('general.assets') }}

-
diff --git a/resources/views/modals/model.blade.php b/resources/views/modals/model.blade.php index abbd50ee97c6..fb1650eee7d2 100644 --- a/resources/views/modals/model.blade.php +++ b/resources/views/modals/model.blade.php @@ -9,40 +9,13 @@
-
-
-
-
- -
-
-
- -
-
- -
-
-
- -
-
- -
-
-
-
- -
-
-
{{ Form::select('fieldset_id', Helper::customFieldsetList(),old('fieldset_id'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:350px')) }}
-
- -
+ @include('modals.partials.footer') diff --git a/resources/views/modals/partials/categories-select.blade.php b/resources/views/modals/partials/categories-select.blade.php new file mode 100644 index 000000000000..116a0808e9c4 --- /dev/null +++ b/resources/views/modals/partials/categories-select.blade.php @@ -0,0 +1,11 @@ + +@php + $required = $required ?? ''; +@endphp +
+
+
+ +
+
+ \ No newline at end of file diff --git a/resources/views/modals/partials/fieldset-select.blade.php b/resources/views/modals/partials/fieldset-select.blade.php new file mode 100644 index 000000000000..3f4efc24b6d7 --- /dev/null +++ b/resources/views/modals/partials/fieldset-select.blade.php @@ -0,0 +1,6 @@ + +
+
+
{{ Form::select('fieldset_id', Helper::customFieldsetList(),old('fieldset_id'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:100%;')) }}
+
+ \ No newline at end of file diff --git a/resources/views/modals/partials/footer.blade.php b/resources/views/modals/partials/footer.blade.php new file mode 100644 index 000000000000..354d189b9edf --- /dev/null +++ b/resources/views/modals/partials/footer.blade.php @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/resources/views/modals/partials/manufacturer-select.blade.php b/resources/views/modals/partials/manufacturer-select.blade.php new file mode 100644 index 000000000000..810292067e45 --- /dev/null +++ b/resources/views/modals/partials/manufacturer-select.blade.php @@ -0,0 +1,8 @@ + +
+
+
+ +
+
+ \ No newline at end of file diff --git a/resources/views/modals/partials/model-number.blade.php b/resources/views/modals/partials/model-number.blade.php new file mode 100644 index 000000000000..2691f30d4882 --- /dev/null +++ b/resources/views/modals/partials/model-number.blade.php @@ -0,0 +1,6 @@ + +
+
+
+
+ \ No newline at end of file diff --git a/resources/views/modals/partials/name.blade.php b/resources/views/modals/partials/name.blade.php new file mode 100644 index 000000000000..6a64ed525f16 --- /dev/null +++ b/resources/views/modals/partials/name.blade.php @@ -0,0 +1,10 @@ + +@php + $required = $required ?? ''; +@endphp +
+
+
+
+ \ No newline at end of file diff --git a/resources/views/modals/statuslabel.blade.php b/resources/views/modals/statuslabel.blade.php index 7e07854197da..e7076f1bbbf0 100644 --- a/resources/views/modals/statuslabel.blade.php +++ b/resources/views/modals/statuslabel.blade.php @@ -10,21 +10,18 @@
-
-
+ @include('partials.forms.edit.name', ['required' => 'true', 'item' => new \App\Models\Statuslabel(),'translated_name' => trans('admin/statuslabels/table.name') ])
-
- diff --git a/resources/views/modals/supplier.blade.php b/resources/views/modals/supplier.blade.php index 0dd10595bf56..806b57c1de9c 100644 --- a/resources/views/modals/supplier.blade.php +++ b/resources/views/modals/supplier.blade.php @@ -10,15 +10,12 @@
-
-
+ @include('partials.forms.edit.name', [ 'item' => new \App\Models\Supplier(), 'translated_name' => trans('admin/suppliers/table.name')])
- diff --git a/resources/views/modals/user.blade.php b/resources/views/modals/user.blade.php index 4e428f35f76c..5672119fa10e 100644 --- a/resources/views/modals/user.blade.php +++ b/resources/views/modals/user.blade.php @@ -25,11 +25,10 @@ - diff --git a/resources/views/models/bulk-delete.blade.php b/resources/views/models/bulk-delete.blade.php index 570be2bce878..79b41b20643e 100644 --- a/resources/views/models/bulk-delete.blade.php +++ b/resources/views/models/bulk-delete.blade.php @@ -55,7 +55,7 @@ diff --git a/resources/views/models/bulk-edit.blade.php b/resources/views/models/bulk-edit.blade.php index 91b9e5f882c6..8a053b048fbf 100644 --- a/resources/views/models/bulk-edit.blade.php +++ b/resources/views/models/bulk-edit.blade.php @@ -108,7 +108,7 @@ diff --git a/resources/views/models/custom_fields_form.blade.php b/resources/views/models/custom_fields_form.blade.php index d3773f97c78d..8d414f337d09 100644 --- a/resources/views/models/custom_fields_form.blade.php +++ b/resources/views/models/custom_fields_form.blade.php @@ -47,7 +47,7 @@
- +
diff --git a/resources/views/models/custom_fields_form_bulk_edit.blade.php b/resources/views/models/custom_fields_form_bulk_edit.blade.php index 251ec8478fcd..e048b38d0962 100644 --- a/resources/views/models/custom_fields_form_bulk_edit.blade.php +++ b/resources/views/models/custom_fields_form_bulk_edit.blade.php @@ -63,7 +63,7 @@
- +
diff --git a/resources/views/models/view.blade.php b/resources/views/models/view.blade.php index 7192e1edaed9..f26b9babd4b1 100755 --- a/resources/views/models/view.blade.php +++ b/resources/views/models/view.blade.php @@ -41,9 +41,9 @@ -
@if ((isset($user_select)) && ($user_select!='false')) @endif @if ((isset($asset_select)) && ($asset_select!='false')) diff --git a/resources/views/partials/forms/edit/accessory-select.blade.php b/resources/views/partials/forms/edit/accessory-select.blade.php index 12be9bf7b7f2..d34b6b2fe05a 100644 --- a/resources/views/partials/forms/edit/accessory-select.blade.php +++ b/resources/views/partials/forms/edit/accessory-select.blade.php @@ -1,8 +1,8 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} -
- @if ((!isset($unselect)) && ($accessory_id = old($fieldname, (isset($accessory) ? $accessory->id : (isset($item) ? $item->{$fieldname} : '')))))
- {{ Form::label('city', trans('general.city'), array('class' => 'col-md-3 control-label', 'maxlength'=>'191')) }} + {{ Form::label('city', trans('general.city'), array('class' => 'col-md-3 control-label')) }}
- {{Form::text('city', old('city', $item->city), array('class' => 'form-control', 'aria-label'=>'city')) }} + {{Form::text('city', old('city', $item->city), array('class' => 'form-control', 'aria-label'=>'city', 'maxlength'=>'191')) }} {!! $errors->first('city', '') !!}
- {{ Form::label('state', trans('general.state'), array('class' => 'col-md-3 control-label', 'maxlength'=>'191')) }} + {{ Form::label('state', trans('general.state'), array('class' => 'col-md-3 control-label')) }}
- {{Form::text('state', old('state', $item->state), array('class' => 'form-control', 'aria-label'=>'state')) }} + {{Form::text('state', old('state', $item->state), array('class' => 'form-control', 'aria-label'=>'state', 'maxlength'=>'191')) }} {!! $errors->first('state', '') !!}
@@ -35,6 +35,7 @@ {{ Form::label('country', trans('general.country'), array('class' => 'col-md-3 control-label')) }}
{!! Form::countries('country', old('country', $item->country), 'select2') !!} +

{{ trans('general.countries_manually_entered_help') }}

{!! $errors->first('country', '') !!}
diff --git a/resources/views/partials/forms/edit/asset-select.blade.php b/resources/views/partials/forms/edit/asset-select.blade.php index 86dba8206fe5..9867a8e55254 100644 --- a/resources/views/partials/forms/edit/asset-select.blade.php +++ b/resources/views/partials/forms/edit/asset-select.blade.php @@ -1,8 +1,9 @@ -
+
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} -
- @if ((!isset($unselect)) && ($asset_id = old($fieldname, (isset($asset) ? $asset->id : (isset($item) ? $item->{$fieldname} : ''))))) + @else + @if(isset($asset_ids)) + @foreach($asset_ids as $asset_id) + + @endforeach + @endif @endif @endif diff --git a/resources/views/partials/forms/edit/category-select.blade.php b/resources/views/partials/forms/edit/category-select.blade.php index 66800deedf60..f610f6847014 100644 --- a/resources/views/partials/forms/edit/category-select.blade.php +++ b/resources/views/partials/forms/edit/category-select.blade.php @@ -3,14 +3,12 @@ {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} -
+
diff --git a/resources/views/partials/forms/edit/category.blade.php b/resources/views/partials/forms/edit/category.blade.php index 715c54184ed2..158cc3508bb6 100644 --- a/resources/views/partials/forms/edit/category.blade.php +++ b/resources/views/partials/forms/edit/category.blade.php @@ -1,8 +1,8 @@
-
- {{ Form::select('category_id', $category_list , old('category_id', $item->category_id), array('class'=>'select2', 'style'=>'width:100%')) }} +
+ {{ Form::select('category_id', $category_list , old('category_id', $item->category_id), array('class'=>'select2', 'style'=>'width:100%', 'required' => Helper::checkIfRequired($item, 'category_id') ? true : '')) }} {!! $errors->first('category_id', '') !!}
diff --git a/resources/views/partials/forms/edit/company-select.blade.php b/resources/views/partials/forms/edit/company-select.blade.php index 9aaa5cafdf1a..59de71a6ab15 100644 --- a/resources/views/partials/forms/edit/company-select.blade.php +++ b/resources/views/partials/forms/edit/company-select.blade.php @@ -10,7 +10,7 @@ {{ (\App\Models\Company::find($company_id)) ? \App\Models\Company::find($company_id)->name : '' }} @else - + {!! (!isset($multiple) || ($multiple=='false')) ? '' : '' !!} @endif
@@ -20,14 +20,14 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} -
+
diff --git a/resources/views/partials/forms/edit/company.blade.php b/resources/views/partials/forms/edit/company.blade.php index 4e64dbd1a829..22cb623584ac 100644 --- a/resources/views/partials/forms/edit/company.blade.php +++ b/resources/views/partials/forms/edit/company.blade.php @@ -3,8 +3,8 @@
{{ Form::label('company_id', trans('general.company'), array('class' => 'col-md-3 control-label', 'for' => 'company_id')) }}
-
- {{ Form::select('company_id', $company_list , old('company_id', $item->company_id), array('class'=>'select2', 'style'=>'width:100%')) }} +
+ {{ Form::select('company_id', $company_list , old('company_id', $item->company_id), array('class'=>'select2', 'style'=>'width:100%', 'required' => Helper::checkIfRequired($item, 'company_id') ? true : '')) }} {!! $errors->first('company_id', '') !!}
diff --git a/resources/views/partials/forms/edit/datepicker.blade.php b/resources/views/partials/forms/edit/datepicker.blade.php index 9d2a714bb734..3bd0200d0acc 100644 --- a/resources/views/partials/forms/edit/datepicker.blade.php +++ b/resources/views/partials/forms/edit/datepicker.blade.php @@ -4,7 +4,7 @@
- +
{!! $errors->first($fieldname, '') !!}
diff --git a/resources/views/partials/forms/edit/department-select.blade.php b/resources/views/partials/forms/edit/department-select.blade.php index c695d04ef420..7d67416f5fc9 100644 --- a/resources/views/partials/forms/edit/department-select.blade.php +++ b/resources/views/partials/forms/edit/department-select.blade.php @@ -8,8 +8,6 @@ - @else - @endif
diff --git a/resources/views/partials/forms/edit/email.blade.php b/resources/views/partials/forms/edit/email.blade.php index 0e10b7d766e6..171367a83095 100644 --- a/resources/views/partials/forms/edit/email.blade.php +++ b/resources/views/partials/forms/edit/email.blade.php @@ -1,7 +1,7 @@
- {{ Form::label('email', trans('admin/suppliers/table.email'), array('class' => 'col-md-3 control-label')) }} -
- {{Form::text('email', old('email', $item->email), array('class' => 'form-control')) }} + +
+ {!! $errors->first('email', '') !!}
-
+
\ No newline at end of file diff --git a/resources/views/partials/forms/edit/eol_date.blade.php b/resources/views/partials/forms/edit/eol_date.blade.php index fb461cf44eda..5efba06a85e3 100644 --- a/resources/views/partials/forms/edit/eol_date.blade.php +++ b/resources/views/partials/forms/edit/eol_date.blade.php @@ -3,8 +3,8 @@
- - + +
{!! $errors->first('asset_eol_date', '') !!}
diff --git a/resources/views/partials/forms/edit/fax.blade.php b/resources/views/partials/forms/edit/fax.blade.php index 6e8a1d7fd4b4..7ed4d3070d44 100644 --- a/resources/views/partials/forms/edit/fax.blade.php +++ b/resources/views/partials/forms/edit/fax.blade.php @@ -1,7 +1,7 @@
{{ Form::label('fax', trans('admin/suppliers/table.fax'), array('class' => 'col-md-3 control-label')) }}
- {{Form::text('fax', old('fax', $item->fax), array('class' => 'form-control')) }} + {!! $errors->first('fax', '') !!}
\ No newline at end of file diff --git a/resources/views/partials/forms/edit/item_number.blade.php b/resources/views/partials/forms/edit/item_number.blade.php index 1c9654cb4537..1adeb89be4d9 100644 --- a/resources/views/partials/forms/edit/item_number.blade.php +++ b/resources/views/partials/forms/edit/item_number.blade.php @@ -1,8 +1,8 @@
-
- +
+ {!! $errors->first('item_no', '') !!}
diff --git a/resources/views/partials/forms/edit/kit-select.blade.php b/resources/views/partials/forms/edit/kit-select.blade.php index a9b6525202f8..d8c6ba101332 100644 --- a/resources/views/partials/forms/edit/kit-select.blade.php +++ b/resources/views/partials/forms/edit/kit-select.blade.php @@ -2,8 +2,8 @@ {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }} -
- @if ($kit_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
+
{{ Form::select('typeOfImport', $importTypes, $typeOfImport, [ 'id' => 'import_type', 'class' => 'livewire-select2', @@ -177,7 +177,9 @@ class="col-md-12 table table-striped snipe-table">

@endif - @if ($this->activeFile->import_type != 'location' && $this->activeFile->import_type != 'assetmodel' && $update) + + + @if (($typeOfImport != 'location' && $typeOfImport!= 'assetmodel') && ($typeOfImport!=''))
+ Type: {{ $typeOfImport }} @if($statusText)
@@ -228,7 +231,7 @@ class="col-md-12 table table-striped snipe-table">
-
+
{{ Form::select('field_map.'.$index, $columnOptions[$typeOfImport], @$field_map[$index], [ From 2f943bc052f2c2d55b2c1a314a9b5ecd1ab9332d Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 16:44:09 +0000 Subject: [PATCH 203/318] Better error messaging for bad fields Signed-off-by: snipe --- app/Importer/AssetModelImporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Importer/AssetModelImporter.php b/app/Importer/AssetModelImporter.php index 140b70e54505..898e0c1523ce 100644 --- a/app/Importer/AssetModelImporter.php +++ b/app/Importer/AssetModelImporter.php @@ -109,7 +109,7 @@ public function createAssetModelIfNotExists(array $row) } else { $this->log($assetmodel->getErrors()->first()); - $this->addErrorToBag($assetmodel, '', $assetmodel->getErrors()->first()); + $this->addErrorToBag($assetmodel, $assetmodel->getErrors()->keys()[0], $assetmodel->getErrors()->first()); return $assetmodel->getErrors(); } From 813b304a01adc72353f345f910723d284ac12e30 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 16:49:58 +0000 Subject: [PATCH 204/318] Fixed tests Signed-off-by: snipe --- tests/Feature/Importing/Api/ImportAssetModelsTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Importing/Api/ImportAssetModelsTest.php b/tests/Feature/Importing/Api/ImportAssetModelsTest.php index 3d1026e0d49f..defd798da28a 100644 --- a/tests/Feature/Importing/Api/ImportAssetModelsTest.php +++ b/tests/Feature/Importing/Api/ImportAssetModelsTest.php @@ -104,8 +104,8 @@ public function whenRequiredColumnsAreMissingInImportFile(): void 'payload' => null, 'messages' => [ '' => [ - '' => [ - '' => + 'name' => [ + 'name' => ['The name field is required.'], ], ] From 85dbbdbbcbdaeb9aea34439e7b3d73685b1878de Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 16:53:19 +0000 Subject: [PATCH 205/318] wtf Signed-off-by: snipe --- tests/Feature/Importing/Api/ImportAssetModelsTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Feature/Importing/Api/ImportAssetModelsTest.php b/tests/Feature/Importing/Api/ImportAssetModelsTest.php index defd798da28a..092057672b94 100644 --- a/tests/Feature/Importing/Api/ImportAssetModelsTest.php +++ b/tests/Feature/Importing/Api/ImportAssetModelsTest.php @@ -4,6 +4,7 @@ use App\Models\Category; use App\Models\AssetModel; +use App\Importer\AssetmodelImporter; use App\Models\User; use App\Models\Import; use Illuminate\Foundation\Testing\WithFaker; From 66aaafc4f200918a5bbdfdd9744e0a1820779b93 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 17:08:20 +0000 Subject: [PATCH 206/318] Updated variable name Signed-off-by: snipe --- app/Importer/AssetModelImporter.php | 22 +++++++++---------- app/Livewire/Importer.php | 4 ++-- resources/views/livewire/importer.blade.php | 3 +-- .../Importing/Api/ImportAssetModelsTest.php | 3 +-- .../AssetModelsImportFileBuilder.php | 1 - 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/app/Importer/AssetModelImporter.php b/app/Importer/AssetModelImporter.php index 898e0c1523ce..b3cc8671d1b7 100644 --- a/app/Importer/AssetModelImporter.php +++ b/app/Importer/AssetModelImporter.php @@ -40,9 +40,9 @@ public function createAssetModelIfNotExists(array $row) { $editingAssetModel = false; - $assetmodel = AssetModel::where('name', '=', $this->findCsvMatch($row, 'name'))->first(); + $assetModel = AssetModel::where('name', '=', $this->findCsvMatch($row, 'name'))->first(); - if ($assetmodel) { + if ($assetModel) { if (! $this->updating) { $this->log('A matching Model '.$this->item['name'].' already exists'); return; @@ -52,7 +52,7 @@ public function createAssetModelIfNotExists(array $row) $editingAssetModel = true; } else { $this->log('No Matching Model, Create a new one'); - $assetmodel = new AssetModel(); + $assetModel = new AssetModel(); } // Pull the records from the CSV to determine their values @@ -97,20 +97,20 @@ public function createAssetModelIfNotExists(array $row) if ($editingAssetModel) { Log::debug('Updating existing model'); - $assetmodel->update($this->sanitizeItemForUpdating($assetmodel)); + $assetModel->update($this->sanitizeItemForUpdating($assetModel)); } else { Log::debug('Creating model'); - $assetmodel->fill($this->sanitizeItemForStoring($assetmodel)); + $assetModel->fill($this->sanitizeItemForStoring($assetModel)); } - if ($assetmodel->save()) { - $this->log('AssetModel '.$assetmodel->name.' created or updated from CSV import'); - return $assetmodel; + if ($assetModel->save()) { + $this->log('AssetModel '.$assetModel->name.' created or updated from CSV import'); + return $assetModel; } else { - $this->log($assetmodel->getErrors()->first()); - $this->addErrorToBag($assetmodel, $assetmodel->getErrors()->keys()[0], $assetmodel->getErrors()->first()); - return $assetmodel->getErrors(); + $this->log($assetModel->getErrors()->first()); + $this->addErrorToBag($assetModel, $assetModel->getErrors()->keys()[0], $assetModel->getErrors()->first()); + return $assetModel->getErrors(); } } diff --git a/app/Livewire/Importer.php b/app/Livewire/Importer.php index 1296dbd106d4..75b707b8ad24 100644 --- a/app/Livewire/Importer.php +++ b/app/Livewire/Importer.php @@ -73,7 +73,7 @@ private function getColumns($type) case 'asset': $results = $this->assets_fields; break; - case 'assetmodel': + case 'assetModel': $results = $this->assetmodels_fields; break; case 'accessory': @@ -165,7 +165,7 @@ public function mount() $this->importTypes = [ 'accessory' => trans('general.accessories'), 'asset' => trans('general.assets'), - 'assetmodel' => trans('general.asset_models'), + 'assetModel' => trans('general.asset_models'), 'component' => trans('general.components'), 'consumable' => trans('general.consumables'), 'license' => trans('general.licenses'), diff --git a/resources/views/livewire/importer.blade.php b/resources/views/livewire/importer.blade.php index 95d2a8bb91b3..7ce1f6485edd 100644 --- a/resources/views/livewire/importer.blade.php +++ b/resources/views/livewire/importer.blade.php @@ -179,7 +179,7 @@ class="col-md-12 table table-striped snipe-table"> - @if (($typeOfImport != 'location' && $typeOfImport!= 'assetmodel') && ($typeOfImport!='')) + @if (($typeOfImport != 'location' && $typeOfImport!= 'assetModel') && ($typeOfImport!=''))
- Type: {{ $typeOfImport }} @if($statusText)
diff --git a/tests/Feature/Importing/Api/ImportAssetModelsTest.php b/tests/Feature/Importing/Api/ImportAssetModelsTest.php index 092057672b94..379b094e2285 100644 --- a/tests/Feature/Importing/Api/ImportAssetModelsTest.php +++ b/tests/Feature/Importing/Api/ImportAssetModelsTest.php @@ -4,7 +4,6 @@ use App\Models\Category; use App\Models\AssetModel; -use App\Importer\AssetmodelImporter; use App\Models\User; use App\Models\Import; use Illuminate\Foundation\Testing\WithFaker; @@ -24,7 +23,7 @@ class ImportAssetModelsTest extends ImportDataTestCase implements TestsPermissio protected function importFileResponse(array $parameters = []): TestResponse { if (!array_key_exists('import-type', $parameters)) { - $parameters['import-type'] = 'assetmodel'; + $parameters['import-type'] = 'assetModel'; } return parent::importFileResponse($parameters); diff --git a/tests/Support/Importing/AssetModelsImportFileBuilder.php b/tests/Support/Importing/AssetModelsImportFileBuilder.php index d2aba6a95b51..615e329e477f 100644 --- a/tests/Support/Importing/AssetModelsImportFileBuilder.php +++ b/tests/Support/Importing/AssetModelsImportFileBuilder.php @@ -4,7 +4,6 @@ namespace Tests\Support\Importing; -use App\Models\Category; use Illuminate\Support\Str; /** From 4d3137e15a159bd13fe35ae495a7c3a90d77da59 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:18:46 +0000 Subject: [PATCH 207/318] Added $accessory->created_by = auth()->id(); Signed-off-by: snipe --- app/Importer/AccessoryImporter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Importer/AccessoryImporter.php b/app/Importer/AccessoryImporter.php index eb17c5acadc0..bc9c1909ff42 100644 --- a/app/Importer/AccessoryImporter.php +++ b/app/Importer/AccessoryImporter.php @@ -42,6 +42,7 @@ public function createAccessoryIfNotExists($row) } $this->log('No Matching Accessory, Creating a new one'); $accessory = new Accessory(); + $accessory->created_by = auth()->id(); $this->item['model_number'] = $this->findCsvMatch($row, "model_number"); $this->item['min_amt'] = $this->findCsvMatch($row, "min_amt"); $accessory->fill($this->sanitizeItemForStoring($accessory)); From 0ae1db6fe325c395a0a34d08fc059869ad84cf83 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:20:47 +0000 Subject: [PATCH 208/318] Added created_by Signed-off-by: snipe --- app/Importer/ComponentImporter.php | 3 ++- app/Importer/ConsumableImporter.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Importer/ComponentImporter.php b/app/Importer/ComponentImporter.php index 9687ec4f1791..3979ba499d29 100644 --- a/app/Importer/ComponentImporter.php +++ b/app/Importer/ComponentImporter.php @@ -47,6 +47,7 @@ public function createComponentIfNotExists() } $this->log('No matching component, creating one'); $component = new Component; + $component->created_by = auth()->id(); $component->fill($this->sanitizeItemForStoring($component)); // This sets an attribute on the Loggable trait for the action log @@ -58,7 +59,7 @@ public function createComponentIfNotExists() if (isset($this->item['asset_tag']) && ($asset = Asset::where('asset_tag', $this->item['asset_tag'])->first())) { $component->assets()->attach($component->id, [ 'component_id' => $component->id, - 'created_by' => $this->created_by, + 'created_by' => auth()->id(), 'created_at' => date('Y-m-d H:i:s'), 'assigned_qty' => 1, // Only assign the first one to the asset 'asset_id' => $asset->id, diff --git a/app/Importer/ConsumableImporter.php b/app/Importer/ConsumableImporter.php index 9e7019b0861e..10ffaaedfb5a 100644 --- a/app/Importer/ConsumableImporter.php +++ b/app/Importer/ConsumableImporter.php @@ -41,6 +41,7 @@ public function createConsumableIfNotExists($row) } $this->log('No matching consumable, creating one'); $consumable = new Consumable(); + $consumable->created_by = auth()->id(); $this->item['model_number'] = trim($this->findCsvMatch($row, 'model_number')); $this->item['item_no'] = trim($this->findCsvMatch($row, 'item_number')); $this->item['min_amt'] = trim($this->findCsvMatch($row, "min_amt")); From 0a6096e52832f315dd43d07267bce3640f8816d7 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:21:00 +0000 Subject: [PATCH 209/318] Updated method name Signed-off-by: snipe --- app/Importer/Importer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Importer/Importer.php b/app/Importer/Importer.php index 0316de04f139..907c8b72c55c 100644 --- a/app/Importer/Importer.php +++ b/app/Importer/Importer.php @@ -363,6 +363,7 @@ protected function createOrFetchUser($row, $type = 'user') // No luck finding a user on username or first name, let's create one. $user = new User; + $user->first_name = $user_array['first_name']; $user->last_name = $user_array['last_name']; $user->username = $user_array['username']; @@ -406,7 +407,7 @@ protected function findUserByNumber($user_name) * * @return self */ - public function setUserId($created_by) + public function setCreatedBy($created_by) { $this->created_by = $created_by; From d7e5fe50ebec2d9af586d313d0ae8f51e13af2b2 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:21:19 +0000 Subject: [PATCH 210/318] Use auth facade Signed-off-by: snipe --- app/Importer/ItemImporter.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/Importer/ItemImporter.php b/app/Importer/ItemImporter.php index 36eef7ab4c6f..8d008c3cde52 100644 --- a/app/Importer/ItemImporter.php +++ b/app/Importer/ItemImporter.php @@ -94,7 +94,7 @@ protected function handle($row) $this->item['qty'] = $this->findCsvMatch($row, 'quantity'); $this->item['requestable'] = $this->findCsvMatch($row, 'requestable'); - $this->item['created_by'] = $this->created_by; + $this->item['created_by'] = auth()->id(); $this->item['serial'] = $this->findCsvMatch($row, 'serial'); // NO need to call this method if we're running the user import. // TODO: Merge these methods. @@ -249,6 +249,7 @@ public function createOrFetchAssetModel(array $row) $this->log('No Matching Model, Creating a new one'); $asset_model = new AssetModel(); + $asset_model->created_by = auth()->id(); $item = $this->sanitizeItemForStoring($asset_model, $editingModel); $item['name'] = $asset_model_name; $item['model_number'] = $asset_modelNumber; @@ -306,9 +307,9 @@ public function createOrFetchCategory($asset_category) } $category = new Category(); + $category->created_by = auth()->id(); $category->name = $asset_category; $category->category_type = $item_type; - $category->created_by = $this->created_by; if ($category->save()) { $this->log('Category '.$asset_category.' was created'); @@ -337,6 +338,7 @@ public function createOrFetchCompany($asset_company_name) return $company->id; } $company = new Company(); + $company->created_by = auth()->id(); $company->name = $asset_company_name; if ($company->save()) { @@ -393,6 +395,7 @@ public function createOrFetchStatusLabel($asset_statuslabel_name) } $this->log('Creating a new status'); $status = new Statuslabel(); + $status->created_by = auth()->id(); $status->name = trim($asset_statuslabel_name); $status->deployable = 1; @@ -432,7 +435,7 @@ public function createOrFetchManufacturer($item_manufacturer) //Otherwise create a manufacturer. $manufacturer = new Manufacturer(); $manufacturer->name = trim($item_manufacturer); - $manufacturer->created_by = $this->created_by; + $manufacturer->created_by = auth()->id(); if ($manufacturer->save()) { $this->log('Manufacturer '.$manufacturer->name.' was created'); @@ -473,7 +476,7 @@ public function createOrFetchLocation($asset_location) $location->city = ''; $location->state = ''; $location->country = ''; - $location->created_by = $this->created_by; + $location->created_by = auth()->id(); if ($location->save()) { $this->log('Location '.$asset_location.' was created'); @@ -509,7 +512,7 @@ public function createOrFetchSupplier($item_supplier) $supplier = new Supplier(); $supplier->name = $item_supplier; - $supplier->created_by = $this->created_by; + $supplier->created_by = auth()->id(); if ($supplier->save()) { $this->log('Supplier '.$item_supplier.' was created'); From 54f7917fbe12254b832379fe74744b1e1672e8b2 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:21:27 +0000 Subject: [PATCH 211/318] Added created by Signed-off-by: snipe --- app/Importer/LocationImporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Importer/LocationImporter.php b/app/Importer/LocationImporter.php index b3ef59d24829..a9a515223449 100644 --- a/app/Importer/LocationImporter.php +++ b/app/Importer/LocationImporter.php @@ -51,6 +51,7 @@ public function createLocationIfNotExists(array $row) } else { $this->log('No Matching Location, Create a new one'); $location = new Location; + $location->created_by = auth()->id(); } // Pull the records from the CSV to determine their values @@ -65,7 +66,6 @@ public function createLocationIfNotExists(array $row) $this->item['ldap_ou'] = trim($this->findCsvMatch($row, 'ldap_ou')); $this->item['manager'] = trim($this->findCsvMatch($row, 'manager')); $this->item['manager_username'] = trim($this->findCsvMatch($row, 'manager_username')); - $this->item['created_by'] = auth()->id(); if ($this->findCsvMatch($row, 'parent_location')) { $this->item['parent_id'] = $this->createOrFetchLocation(trim($this->findCsvMatch($row, 'parent_location'))); From 8c3b50dbf2caec9b7ae92fdc41d9cc47ed2dd6a6 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:21:36 +0000 Subject: [PATCH 212/318] Added created by Signed-off-by: snipe --- app/Importer/UserImporter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Importer/UserImporter.php b/app/Importer/UserImporter.php index 036bf15c9a16..77317b3d09db 100644 --- a/app/Importer/UserImporter.php +++ b/app/Importer/UserImporter.php @@ -114,6 +114,7 @@ public function createUserIfNotExists(array $row) $this->log('No matching user, creating one'); $user = new User(); + $user->created_by = auth()->id(); $user->fill($this->sanitizeItemForStoring($user)); if ($user->save()) { From 3a1fb615e7fadc2ca5cac165e3b33561464fcca5 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:22:05 +0000 Subject: [PATCH 213/318] Added admin sort scope Signed-off-by: snipe --- app/Models/AssetModel.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Models/AssetModel.php b/app/Models/AssetModel.php index 6fdc39dd9a8f..02b5df40d13b 100755 --- a/app/Models/AssetModel.php +++ b/app/Models/AssetModel.php @@ -329,4 +329,14 @@ public function scopeOrderFieldset($query, $order) { return $query->leftJoin('custom_fieldsets', 'models.fieldset_id', '=', 'custom_fieldsets.id')->orderBy('custom_fieldsets.name', $order); } + + /** + * Query builder scope to order on created_by name + * + */ + public function scopeOrderByCreatedByName($query, $order) + { + return $query->leftJoin('users as admin_sort', 'models.created_by', '=', 'admin_sort.id')->select('models.*')->orderBy('admin_sort.first_name', $order)->orderBy('admin_sort.last_name', $order); + } + } From b6dbb8879a57cfd3f3c09f7f9602061327ea5c5f Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:22:30 +0000 Subject: [PATCH 214/318] Added created by Signed-off-by: snipe --- app/Importer/LicenseImporter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Importer/LicenseImporter.php b/app/Importer/LicenseImporter.php index 3f7bb9f85ceb..0dc7475478b8 100644 --- a/app/Importer/LicenseImporter.php +++ b/app/Importer/LicenseImporter.php @@ -84,6 +84,7 @@ public function createLicenseIfNotExists(array $row) $license->update($this->sanitizeItemForUpdating($license)); } else { $license->fill($this->sanitizeItemForStoring($license)); + $license->created_by = auth()->id(); } // This sets an attribute on the Loggable trait for the action log From 0c3b8cb11453255bd23fb109518a4c547da61cb6 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:22:46 +0000 Subject: [PATCH 215/318] Moved created by to create only Signed-off-by: snipe --- app/Importer/AssetModelImporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Importer/AssetModelImporter.php b/app/Importer/AssetModelImporter.php index b3cc8671d1b7..7cfd8a530dbb 100644 --- a/app/Importer/AssetModelImporter.php +++ b/app/Importer/AssetModelImporter.php @@ -65,7 +65,6 @@ public function createAssetModelIfNotExists(array $row) $this->item['notes'] = trim($this->findCsvMatch($row, 'notes')); $this->item['fieldset'] = trim($this->findCsvMatch($row, 'fieldset')); $this->item['depreciation'] = trim($this->findCsvMatch($row, 'depreciation')); - $this->item['created_by'] = auth()->id(); $this->item['requestable'] = trim(($this->fetchHumanBoolean($this->findCsvMatch($row, 'requestable'))) == 1) ? 1 : 0; if (!empty($this->item['category'])) { @@ -101,6 +100,7 @@ public function createAssetModelIfNotExists(array $row) } else { Log::debug('Creating model'); $assetModel->fill($this->sanitizeItemForStoring($assetModel)); + $assetModel->created_by = auth()->id(); } if ($assetModel->save()) { From d4018a283490e4a569b5c555210cf64c45cfbaa0 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:22:57 +0000 Subject: [PATCH 216/318] Added created_by to models API Signed-off-by: snipe --- app/Http/Transformers/AssetModelsTransformer.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Transformers/AssetModelsTransformer.php b/app/Http/Transformers/AssetModelsTransformer.php index a7b1c6a49f3f..dab21d9773f8 100644 --- a/app/Http/Transformers/AssetModelsTransformer.php +++ b/app/Http/Transformers/AssetModelsTransformer.php @@ -65,6 +65,10 @@ public function transformAssetModel(AssetModel $assetmodel) 'eol' => ($assetmodel->eol > 0) ? $assetmodel->eol.' months' : 'None', 'requestable' => ($assetmodel->requestable == '1') ? true : false, 'notes' => Helper::parseEscapedMarkedownInline($assetmodel->notes), + 'created_by' => ($assetmodel->adminuser) ? [ + 'id' => (int) $assetmodel->adminuser->id, + 'name'=> e($assetmodel->adminuser->present()->fullName()), + ] : null, 'created_at' => Helper::getFormattedDateObject($assetmodel->created_at, 'datetime'), 'updated_at' => Helper::getFormattedDateObject($assetmodel->updated_at, 'datetime'), 'deleted_at' => Helper::getFormattedDateObject($assetmodel->deleted_at, 'datetime'), From 1aef7edc430359e6529795c7082d27cda980e234 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:23:11 +0000 Subject: [PATCH 217/318] Added created by to the import itself Signed-off-by: snipe --- app/Http/Requests/ItemImportRequest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Requests/ItemImportRequest.php b/app/Http/Requests/ItemImportRequest.php index a6dc0ad7e5e2..7edba8a6f4e1 100644 --- a/app/Http/Requests/ItemImportRequest.php +++ b/app/Http/Requests/ItemImportRequest.php @@ -42,6 +42,7 @@ public function import(Import $import) $classString = "App\\Importer\\{$class}Importer"; $importer = new $classString($filename); $import->field_map = request('column-mappings'); + $import->created_by = auth()->id(); $import->save(); $fieldMappings = []; @@ -60,7 +61,7 @@ public function import(Import $import) $fieldMappings = array_change_key_case(array_flip($import->field_map), CASE_LOWER); } $importer->setCallbacks([$this, 'log'], [$this, 'progress'], [$this, 'errorCallback']) - ->setUserId(auth()->id()) + ->setCreatedBy(auth()->id()) ->setUpdating($this->get('import-update')) ->setShouldNotify($this->get('send-welcome')) ->setUsernameFormat('firstname.lastname') From d3602c05959b46142ca7c5aa2c01fcb1ea9d1fb5 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:23:26 +0000 Subject: [PATCH 218/318] Allow sorting on admin name in API Signed-off-by: snipe --- app/Http/Controllers/Api/AssetModelsController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/AssetModelsController.php b/app/Http/Controllers/Api/AssetModelsController.php index e1ae0c12d3ca..bfcb9d169696 100644 --- a/app/Http/Controllers/Api/AssetModelsController.php +++ b/app/Http/Controllers/Api/AssetModelsController.php @@ -59,6 +59,7 @@ public function index(Request $request) : JsonResponse | array 'model_number', 'min_amt', 'eol', + 'created_by', 'requestable', 'models.notes', 'models.created_at', @@ -69,7 +70,7 @@ public function index(Request $request) : JsonResponse | array 'models.deleted_at', 'models.updated_at', ]) - ->with('category', 'depreciation', 'manufacturer', 'fieldset.fields.defaultValues','adminuser') + ->with('category', 'depreciation', 'manufacturer', 'fieldset.fields.defaultValues', 'adminuser') ->withCount('assets as assets_count'); if ($request->input('status')=='deleted') { @@ -95,7 +96,7 @@ public function index(Request $request) : JsonResponse | array $order = $request->input('order') === 'asc' ? 'asc' : 'desc'; $sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'models.created_at'; - switch ($sort) { + switch ($request->input('sort')) { case 'manufacturer': $assetmodels->OrderManufacturer($order); break; @@ -105,6 +106,9 @@ public function index(Request $request) : JsonResponse | array case 'fieldset': $assetmodels->OrderFieldset($order); break; + case 'created_by': + $assetmodels->OrderByCreatedByName($order); + break; default: $assetmodels->orderBy($sort, $order); break; From 7c3f9ba6afd0fa406da0306d0f53218be0a30a88 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:42:03 +0000 Subject: [PATCH 219/318] Fixed tests Signed-off-by: snipe --- tests/Feature/Importing/Api/ImportUsersTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/Feature/Importing/Api/ImportUsersTest.php b/tests/Feature/Importing/Api/ImportUsersTest.php index f8c0b7c7434e..8dcf2b2d1a08 100644 --- a/tests/Feature/Importing/Api/ImportUsersTest.php +++ b/tests/Feature/Importing/Api/ImportUsersTest.php @@ -105,7 +105,6 @@ public function importUsers(): void $this->assertEquals(0, $newUser->vip); $this->assertEquals(0, $newUser->enable_sounds); $this->assertEquals(0, $newUser->enable_confetti); - $this->assertNull($newUser->created_by); $this->assertNull($newUser->start_date); $this->assertNull($newUser->end_date); $this->assertNull($newUser->scim_externalid); @@ -322,7 +321,6 @@ public function customColumnMapping(): void $this->assertEquals(0, $newUser->vip); $this->assertEquals(0, $newUser->enable_sounds); $this->assertEquals(0, $newUser->enable_confetti); - $this->assertNull($newUser->created_by); $this->assertNull($newUser->start_date); $this->assertNull($newUser->end_date); $this->assertNull($newUser->scim_externalid); From 4a18946dd7019107291e64f52523cb528d920f46 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:42:27 +0000 Subject: [PATCH 220/318] Added created by to imports Signed-off-by: snipe --- app/Http/Controllers/Api/ImportController.php | 7 +++---- resources/views/livewire/importer.blade.php | 17 +++++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/Api/ImportController.php b/app/Http/Controllers/Api/ImportController.php index 8df9961cf2ed..ebf8b550b2c0 100644 --- a/app/Http/Controllers/Api/ImportController.php +++ b/app/Http/Controllers/Api/ImportController.php @@ -28,8 +28,7 @@ class ImportController extends Controller public function index() : JsonResponse | array { $this->authorize('import'); - $imports = Import::latest()->get(); - + $imports = Import::with('adminuser')->latest()->get(); return (new ImportsTransformer)->transformImports($imports); } @@ -133,7 +132,7 @@ public function store() : JsonResponse } $import->filesize = filesize($path.'/'.$file_name); - + $import->created_by = auth()->id(); $import->save(); $results[] = $import; } @@ -177,7 +176,7 @@ public function process(ItemImportRequest $request, $import_id) : JsonResponse case 'asset': $redirectTo = 'hardware.index'; break; - case 'assetmodel': + case 'assetModel': $redirectTo = 'models.index'; break; case 'accessory': diff --git a/resources/views/livewire/importer.blade.php b/resources/views/livewire/importer.blade.php index 7ce1f6485edd..027d9e3dc636 100644 --- a/resources/views/livewire/importer.blade.php +++ b/resources/views/livewire/importer.blade.php @@ -105,13 +105,17 @@ class="col-md-12 table table-striped snipe-table"> - + {{ trans('general.file_name') }} - + {{ trans('general.created_at') }} - + + {{ trans('general.created_by') }} + + + {{ trans('general.filesize') }} @@ -122,9 +126,10 @@ class="col-md-12 table table-striped snipe-table"> @foreach($this->files as $currentFile) - {{ $currentFile->file_path }} - {{ Helper::getFormattedDateObject($currentFile->created_at, 'datetime', false) }} - {{ Helper::formatFilesizeUnits($currentFile->filesize) }} + {{ $currentFile->file_path }} + {{ Helper::getFormattedDateObject($currentFile->created_at, 'datetime', false) }} + {{ ($currentFile->adminuser) ? $currentFile->adminuser->present()->fullName : '--'}} + {{ Helper::formatFilesizeUnits($currentFile->filesize) }}
diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php index fadb7a1abcfa..e0dc8ef51912 100755 --- a/resources/views/hardware/checkout.blade.php +++ b/resources/views/hardware/checkout.blade.php @@ -141,19 +141,12 @@ - @if($snipeSettings->require_checkinout_notes=="1") -
- - {!! $errors->first('note', '') !!} -
- @else +
- {!! $errors->first('note', '') !!}
- @endif
@if ($asset->requireAcceptance() || $asset->getEula() || ($snipeSettings->webhook_endpoint!='')) From 0d608552ef7f8bbfea7cd40736e711554c19803a Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 21 Nov 2024 19:09:54 -0500 Subject: [PATCH 301/318] orange bar for requirednessness --- resources/assets/less/app.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/less/app.less b/resources/assets/less/app.less index 37514e5cfda3..259172baebd2 100644 --- a/resources/assets/less/app.less +++ b/resources/assets/less/app.less @@ -384,7 +384,7 @@ a.logo.no-hover a:hover { background-color: transparent; } -input:required, select:required { +input:required, select:required, textarea:required { border-right: 6px solid orange; } From 0f18ee86f78d1691f24b2992b2d5f839fafeaf4c Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 25 Nov 2024 13:05:05 +0000 Subject: [PATCH 302/318] Updated translations Signed-off-by: snipe --- .../lang/aa-ER/admin/hardware/message.php | 13 +- resources/lang/aa-ER/mail.php | 2 +- .../lang/af-ZA/admin/hardware/message.php | 13 +- resources/lang/af-ZA/mail.php | 2 +- .../lang/am-ET/admin/hardware/message.php | 13 +- resources/lang/am-ET/mail.php | 2 +- .../lang/ar-SA/admin/hardware/message.php | 13 +- resources/lang/ar-SA/mail.php | 2 +- .../lang/bg-BG/admin/hardware/message.php | 13 +- resources/lang/bg-BG/mail.php | 2 +- .../lang/ca-ES/admin/hardware/message.php | 13 +- resources/lang/ca-ES/mail.php | 2 +- .../lang/chr-US/admin/hardware/message.php | 13 +- resources/lang/chr-US/mail.php | 2 +- .../lang/cs-CZ/admin/hardware/message.php | 13 +- resources/lang/cs-CZ/mail.php | 2 +- .../lang/cy-GB/admin/hardware/message.php | 13 +- resources/lang/cy-GB/mail.php | 2 +- .../lang/da-DK/admin/hardware/message.php | 13 +- resources/lang/da-DK/mail.php | 2 +- resources/lang/de-DE/admin/hardware/form.php | 2 +- .../lang/de-DE/admin/hardware/message.php | 13 +- resources/lang/de-DE/general.php | 2 +- resources/lang/de-DE/mail.php | 2 +- resources/lang/de-if/admin/hardware/form.php | 2 +- .../lang/de-if/admin/hardware/message.php | 17 +- resources/lang/de-if/general.php | 2 +- resources/lang/de-if/mail.php | 2 +- .../lang/el-GR/admin/hardware/message.php | 13 +- resources/lang/el-GR/mail.php | 2 +- .../lang/en-GB/admin/hardware/message.php | 13 +- resources/lang/en-GB/mail.php | 2 +- .../lang/en-ID/admin/hardware/message.php | 13 +- resources/lang/en-ID/mail.php | 2 +- .../lang/es-CO/admin/hardware/message.php | 13 +- resources/lang/es-CO/general.php | 2 +- resources/lang/es-CO/mail.php | 2 +- .../lang/es-ES/admin/hardware/message.php | 13 +- resources/lang/es-ES/general.php | 2 +- resources/lang/es-ES/mail.php | 2 +- .../lang/es-MX/admin/hardware/message.php | 13 +- resources/lang/es-MX/general.php | 2 +- resources/lang/es-MX/mail.php | 2 +- .../lang/es-VE/admin/hardware/message.php | 13 +- resources/lang/es-VE/general.php | 2 +- resources/lang/es-VE/mail.php | 2 +- .../lang/et-EE/admin/hardware/message.php | 13 +- resources/lang/et-EE/mail.php | 2 +- .../lang/fa-IR/admin/hardware/message.php | 13 +- resources/lang/fa-IR/mail.php | 2 +- .../lang/fi-FI/admin/hardware/message.php | 13 +- resources/lang/fi-FI/mail.php | 2 +- .../lang/fil-PH/admin/hardware/message.php | 13 +- resources/lang/fil-PH/mail.php | 2 +- .../lang/fr-FR/admin/hardware/message.php | 13 +- resources/lang/fr-FR/mail.php | 2 +- .../lang/ga-IE/admin/hardware/message.php | 13 +- resources/lang/ga-IE/mail.php | 2 +- .../lang/he-IL/admin/hardware/message.php | 13 +- resources/lang/he-IL/mail.php | 2 +- .../lang/hr-HR/admin/hardware/message.php | 13 +- resources/lang/hr-HR/mail.php | 2 +- .../lang/hu-HU/admin/hardware/message.php | 13 +- resources/lang/hu-HU/mail.php | 2 +- .../lang/id-ID/admin/hardware/message.php | 13 +- resources/lang/id-ID/mail.php | 2 +- .../lang/is-IS/admin/hardware/message.php | 13 +- resources/lang/is-IS/mail.php | 2 +- .../lang/it-IT/admin/hardware/message.php | 13 +- resources/lang/it-IT/general.php | 2 +- resources/lang/it-IT/mail.php | 2 +- .../lang/iu-NU/admin/hardware/message.php | 13 +- resources/lang/iu-NU/mail.php | 2 +- .../lang/ja-JP/admin/accessories/message.php | 2 +- .../lang/ja-JP/admin/hardware/message.php | 13 +- .../lang/ja-JP/admin/licenses/general.php | 2 +- resources/lang/ja-JP/localizations.php | 8 +- resources/lang/ja-JP/mail.php | 2 +- .../lang/km-KH/admin/hardware/message.php | 13 +- resources/lang/km-KH/admin/hardware/table.php | 2 +- resources/lang/km-KH/admin/labels/table.php | 10 +- resources/lang/km-KH/general.php | 112 ++++---- .../lang/ko-KR/admin/hardware/message.php | 13 +- resources/lang/ko-KR/mail.php | 2 +- .../lang/lt-LT/admin/hardware/message.php | 13 +- resources/lang/lt-LT/mail.php | 2 +- .../lang/lv-LV/admin/hardware/message.php | 13 +- resources/lang/lv-LV/mail.php | 2 +- .../lang/mi-NZ/admin/hardware/message.php | 13 +- resources/lang/mi-NZ/mail.php | 2 +- .../lang/mk-MK/admin/hardware/message.php | 13 +- resources/lang/mk-MK/mail.php | 2 +- .../lang/ml-IN/admin/hardware/message.php | 13 +- resources/lang/ml-IN/mail.php | 2 +- .../lang/mn-MN/admin/hardware/message.php | 13 +- resources/lang/mn-MN/mail.php | 2 +- .../lang/ms-MY/admin/hardware/message.php | 13 +- resources/lang/ms-MY/mail.php | 2 +- .../lang/nb-NO/admin/hardware/message.php | 13 +- resources/lang/nb-NO/mail.php | 2 +- .../lang/nl-NL/admin/hardware/message.php | 13 +- resources/lang/nl-NL/mail.php | 2 +- .../lang/nn-NO/admin/hardware/message.php | 13 +- resources/lang/nn-NO/mail.php | 2 +- .../lang/no-NO/admin/hardware/message.php | 13 +- resources/lang/no-NO/mail.php | 2 +- .../lang/pl-PL/admin/hardware/message.php | 13 +- resources/lang/pl-PL/general.php | 14 +- resources/lang/pl-PL/mail.php | 4 +- resources/lang/pl-PL/validation.php | 4 +- .../lang/pt-BR/admin/hardware/message.php | 13 +- resources/lang/pt-BR/mail.php | 2 +- .../lang/pt-PT/admin/hardware/message.php | 13 +- resources/lang/pt-PT/mail.php | 2 +- .../lang/ro-RO/admin/hardware/message.php | 13 +- resources/lang/ro-RO/mail.php | 2 +- .../lang/ru-RU/admin/hardware/message.php | 13 +- resources/lang/ru-RU/mail.php | 2 +- .../lang/si-LK/admin/hardware/message.php | 13 +- resources/lang/si-LK/mail.php | 2 +- .../lang/sk-SK/admin/hardware/message.php | 13 +- resources/lang/sk-SK/mail.php | 2 +- .../lang/sl-SI/admin/hardware/message.php | 13 +- resources/lang/sl-SI/mail.php | 2 +- .../lang/so-SO/admin/hardware/message.php | 13 +- resources/lang/so-SO/mail.php | 2 +- .../lang/sq-AL/admin/hardware/message.php | 13 +- resources/lang/sq-AL/mail.php | 2 +- .../lang/sr-CS/admin/hardware/message.php | 13 +- resources/lang/sr-CS/mail.php | 2 +- resources/lang/sv-SE/account/general.php | 18 +- .../lang/sv-SE/admin/accessories/general.php | 4 +- .../lang/sv-SE/admin/categories/general.php | 12 +- .../lang/sv-SE/admin/categories/table.php | 2 +- resources/lang/sv-SE/admin/hardware/form.php | 18 +- .../lang/sv-SE/admin/hardware/general.php | 6 +- .../lang/sv-SE/admin/hardware/message.php | 13 +- resources/lang/sv-SE/admin/labels/message.php | 4 +- resources/lang/sv-SE/admin/labels/table.php | 6 +- .../lang/sv-SE/admin/licenses/general.php | 20 +- .../lang/sv-SE/admin/locations/message.php | 8 +- .../lang/sv-SE/admin/locations/table.php | 14 +- resources/lang/sv-SE/admin/models/general.php | 2 +- resources/lang/sv-SE/admin/models/message.php | 14 +- resources/lang/sv-SE/admin/models/table.php | 14 +- .../lang/sv-SE/admin/settings/general.php | 48 ++-- .../lang/sv-SE/admin/settings/message.php | 2 +- .../lang/sv-SE/admin/statuslabels/message.php | 12 +- .../lang/sv-SE/admin/statuslabels/table.php | 2 +- resources/lang/sv-SE/admin/users/general.php | 6 +- resources/lang/sv-SE/admin/users/message.php | 20 +- resources/lang/sv-SE/admin/users/table.php | 2 +- resources/lang/sv-SE/auth/message.php | 4 +- resources/lang/sv-SE/button.php | 18 +- resources/lang/sv-SE/general.php | 66 ++--- resources/lang/sv-SE/localizations.php | 8 +- resources/lang/sv-SE/mail.php | 18 +- resources/lang/sv-SE/table.php | 2 +- resources/lang/sv-SE/validation.php | 240 +++++++++--------- .../lang/ta-IN/admin/hardware/message.php | 13 +- resources/lang/ta-IN/mail.php | 2 +- .../lang/th-TH/admin/hardware/message.php | 13 +- resources/lang/th-TH/mail.php | 2 +- .../lang/tl-PH/admin/hardware/message.php | 13 +- resources/lang/tl-PH/mail.php | 2 +- .../lang/tr-TR/admin/hardware/message.php | 13 +- resources/lang/tr-TR/mail.php | 2 +- .../lang/uk-UA/admin/hardware/message.php | 13 +- resources/lang/uk-UA/mail.php | 2 +- .../lang/ur-PK/admin/hardware/message.php | 13 +- resources/lang/ur-PK/mail.php | 2 +- .../lang/vi-VN/admin/hardware/message.php | 13 +- resources/lang/vi-VN/mail.php | 2 +- resources/lang/zh-CN/admin/hardware/form.php | 2 +- .../lang/zh-CN/admin/hardware/message.php | 13 +- resources/lang/zh-CN/general.php | 2 +- resources/lang/zh-CN/mail.php | 4 +- .../lang/zh-HK/admin/hardware/message.php | 13 +- resources/lang/zh-HK/mail.php | 2 +- .../lang/zh-TW/admin/hardware/message.php | 13 +- .../lang/zu-ZA/admin/hardware/message.php | 13 +- resources/lang/zu-ZA/mail.php | 2 +- 182 files changed, 1005 insertions(+), 798 deletions(-) diff --git a/resources/lang/aa-ER/admin/hardware/message.php b/resources/lang/aa-ER/admin/hardware/message.php index 2b9064167d1b..e44f1d9eaac9 100644 --- a/resources/lang/aa-ER/admin/hardware/message.php +++ b/resources/lang/aa-ER/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'crwdns12562:0crwdne12562:0', - 'does_not_exist' => 'crwdns740:0crwdne740:0', - 'does_not_exist_var'=> 'crwdns12188:0crwdne12188:0', - 'no_tag' => 'crwdns12190:0crwdne12190:0', + 'undeployable' => 'crwdns12562:0crwdne12562:0', + 'does_not_exist' => 'crwdns740:0crwdne740:0', + 'does_not_exist_var' => 'crwdns12188:0crwdne12188:0', + 'no_tag' => 'crwdns12190:0crwdne12190:0', 'does_not_exist_or_not_requestable' => 'crwdns6581:0crwdne6581:0', - 'assoc_users' => 'crwdns741:0crwdne741:0', + 'assoc_users' => 'crwdns741:0crwdne741:0', 'warning_audit_date_mismatch' => 'crwdns12192:0crwdne12192:0', + 'labels_generated' => 'crwdns12786:0crwdne12786:0', + 'error_generating_labels' => 'crwdns12788:0crwdne12788:0', + 'no_assets_selected' => 'crwdns12790:0crwdne12790:0', 'create' => [ 'error' => 'crwdns742:0crwdne742:0', diff --git a/resources/lang/aa-ER/mail.php b/resources/lang/aa-ER/mail.php index 8dd21ad03e68..9fd0e12c9049 100644 --- a/resources/lang/aa-ER/mail.php +++ b/resources/lang/aa-ER/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'crwdns12322:0crwdne12322:0', 'license_expiring_alert' => 'crwdns2048:0crwdne2048:0', 'link_to_update_password' => 'crwdns1742:0crwdne1742:0', - 'login' => 'crwdns1744:0crwdne1744:0', + 'login' => 'crwdns12792:0crwdne12792:0', 'login_first_admin' => 'crwdns1743:0crwdne1743:0', 'low_inventory_alert' => 'crwdns2046:0crwdne2046:0', 'min_QTY' => 'crwdns1746:0crwdne1746:0', diff --git a/resources/lang/af-ZA/admin/hardware/message.php b/resources/lang/af-ZA/admin/hardware/message.php index 2423fda30539..666719e7e186 100644 --- a/resources/lang/af-ZA/admin/hardware/message.php +++ b/resources/lang/af-ZA/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Bate bestaan ​​nie.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Bate bestaan ​​nie.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Hierdie bate word tans na \'n gebruiker nagegaan en kan nie uitgevee word nie. Gaan asseblief die bate eers in, en probeer dan weer uitvee.', + 'assoc_users' => 'Hierdie bate word tans na \'n gebruiker nagegaan en kan nie uitgevee word nie. Gaan asseblief die bate eers in, en probeer dan weer uitvee.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Bate is nie geskep nie, probeer asseblief weer. :(', diff --git a/resources/lang/af-ZA/mail.php b/resources/lang/af-ZA/mail.php index d181a60f3b24..857e08c4ceab 100644 --- a/resources/lang/af-ZA/mail.php +++ b/resources/lang/af-ZA/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Klik asseblief op die volgende skakel om u webtuiste te verander:', - 'login' => 'Teken aan:', + 'login' => 'Teken aan', 'login_first_admin' => 'Teken in op jou nuwe Snipe-IT-installasie deur die volgende inligting te gebruik:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/am-ET/admin/hardware/message.php b/resources/lang/am-ET/admin/hardware/message.php index df68f28395bd..222cbc439e6a 100644 --- a/resources/lang/am-ET/admin/hardware/message.php +++ b/resources/lang/am-ET/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/am-ET/mail.php b/resources/lang/am-ET/mail.php index 9680fc7801f4..ffac4f84c38b 100644 --- a/resources/lang/am-ET/mail.php +++ b/resources/lang/am-ET/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/ar-SA/admin/hardware/message.php b/resources/lang/ar-SA/admin/hardware/message.php index f9df3643d1b0..2ebc6cb2c75a 100644 --- a/resources/lang/ar-SA/admin/hardware/message.php +++ b/resources/lang/ar-SA/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'الأصل غير موجود.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'الأصل غير موجود.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'ذالك الأصل غير موجود أو غير قابل للطلب.', - 'assoc_users' => 'هذا الأصل مخرج حاليا لمستخدم ولا يمكن حذفه. يرجى التحقق من الأصل أولا، ثم حاول الحذف مرة أخرى. ', + 'assoc_users' => 'هذا الأصل مخرج حاليا لمستخدم ولا يمكن حذفه. يرجى التحقق من الأصل أولا، ثم حاول الحذف مرة أخرى. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'لم يتم إنشاء الأصل، يرجى إعادة المحاولة. :(', diff --git a/resources/lang/ar-SA/mail.php b/resources/lang/ar-SA/mail.php index ae558a5b82ec..c15f96fc4ebe 100644 --- a/resources/lang/ar-SA/mail.php +++ b/resources/lang/ar-SA/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'هنالك :count رخص سوف تنتهي في الأيام :threshold القادمة.', 'link_to_update_password' => 'يرجى النقر على الرابط التالي لتحديث كلمة المرور الخاصة بك على :web :', - 'login' => 'تسجيل الدخول:', + 'login' => 'الدخول', 'login_first_admin' => 'قم بتسجيل الدخول إلى التثبيت الجديد من Snipe-IT باستخدام البيانات أدناه:', 'low_inventory_alert' => 'هنالك :count عناصر أقل من الحد الأدنى للمخزون أول سوف تصبح أقل منه قريباً.', 'min_QTY' => 'دقيقة الكمية', diff --git a/resources/lang/bg-BG/admin/hardware/message.php b/resources/lang/bg-BG/admin/hardware/message.php index a2ee2249720f..2380d5fa3203 100644 --- a/resources/lang/bg-BG/admin/hardware/message.php +++ b/resources/lang/bg-BG/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Активът не съществува.', - 'does_not_exist_var'=> 'Активът с етике :asset_tag не е намерен.', - 'no_tag' => 'Не е предоставен етикет на актив.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Активът не съществува.', + 'does_not_exist_var' => 'Активът с етике :asset_tag не е намерен.', + 'no_tag' => 'Не е предоставен етикет на актив.', 'does_not_exist_or_not_requestable' => 'Актива не съществува или не може да бъде предоставян.', - 'assoc_users' => 'Активът е изписан на потребител и не може да бъде изтрит. Моля впишете го обратно и след това опитайте да го изтриете отново.', + 'assoc_users' => 'Активът е изписан на потребител и не може да бъде изтрит. Моля впишете го обратно и след това опитайте да го изтриете отново.', 'warning_audit_date_mismatch' => 'Следващата дата на одит на този актив (:next_audit_date) е преди последната дата на одит (:last_audit_date). Моля, актуализирайте следващата дата на одита.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Активът не беше създаден. Моля опитайте отново.', diff --git a/resources/lang/bg-BG/mail.php b/resources/lang/bg-BG/mail.php index 3360f4eb7dcd..3d4daaac4557 100644 --- a/resources/lang/bg-BG/mail.php +++ b/resources/lang/bg-BG/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Има :count лиценз, който изтича в следващите :threshold дни.|Има :count лиценза, които изтичат в следващите :threshold дни.', 'link_to_update_password' => 'Моля щракенете върху следния линк за да обновите своята :web password:', - 'login' => 'Вход:', + 'login' => 'Логин', 'login_first_admin' => 'Влезте в своята Snipe-IT инсталация използвайки данните по-долу:', 'low_inventory_alert' => 'Има :count артикул, който е под минималния праг за наличност или скоро ще се изчерпа.| Има :count артикула, които са под минималния праг за наличност или скоро ще се изчерпат.', 'min_QTY' => 'Минимално количество', diff --git a/resources/lang/ca-ES/admin/hardware/message.php b/resources/lang/ca-ES/admin/hardware/message.php index df68f28395bd..222cbc439e6a 100644 --- a/resources/lang/ca-ES/admin/hardware/message.php +++ b/resources/lang/ca-ES/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/ca-ES/mail.php b/resources/lang/ca-ES/mail.php index e1c53682f9b1..2b4a2e814ab1 100644 --- a/resources/lang/ca-ES/mail.php +++ b/resources/lang/ca-ES/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/chr-US/admin/hardware/message.php b/resources/lang/chr-US/admin/hardware/message.php index df68f28395bd..222cbc439e6a 100644 --- a/resources/lang/chr-US/admin/hardware/message.php +++ b/resources/lang/chr-US/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/chr-US/mail.php b/resources/lang/chr-US/mail.php index 76c0c1773d28..7663a0167bb6 100644 --- a/resources/lang/chr-US/mail.php +++ b/resources/lang/chr-US/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/cs-CZ/admin/hardware/message.php b/resources/lang/cs-CZ/admin/hardware/message.php index a9998733c828..23c24b111e08 100644 --- a/resources/lang/cs-CZ/admin/hardware/message.php +++ b/resources/lang/cs-CZ/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Majetek nenalezen.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Majetek nenalezen.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Tento majetek neexistuje nebo jej nelze vyskladnit.', - 'assoc_users' => 'Majetek je předán svému uživateli a nelze jej odstranit. Před odstraněním jej nejprve převezměte. ', + 'assoc_users' => 'Majetek je předán svému uživateli a nelze jej odstranit. Před odstraněním jej nejprve převezměte. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Majetek se nepodařilo vytvořit, zkuste to prosím znovu.', diff --git a/resources/lang/cs-CZ/mail.php b/resources/lang/cs-CZ/mail.php index 66f3e8733dc8..cd7021364551 100644 --- a/resources/lang/cs-CZ/mail.php +++ b/resources/lang/cs-CZ/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Je zde :count licence, které končí platnost v příštích :threshold dnech.|Jsou zde :count licence, kterým končí platnost v příštích :threshold dnech.', 'link_to_update_password' => 'Klepnutím na následující odkaz aktualizujte své heslo pro :web:', - 'login' => 'Uživatelské jméno:', + 'login' => 'Přihlášení', 'login_first_admin' => 'Přihlaste se k nové instalaci Snipe-IT pomocí níže uvedených pověření:', 'low_inventory_alert' => 'Je zde :count položka která je pod minimálním stavem nebo brzy bude.|Jsou zde :count položky které jsou pod minimálním stavem nebo brzy budou.', 'min_QTY' => 'Minimální množství', diff --git a/resources/lang/cy-GB/admin/hardware/message.php b/resources/lang/cy-GB/admin/hardware/message.php index 2f2ff8d432cb..54b39ef98510 100644 --- a/resources/lang/cy-GB/admin/hardware/message.php +++ b/resources/lang/cy-GB/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Nid yw\'r ased yn bodoli.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Nid yw\'r ased yn bodoli.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Ar hyn o bryd mae\'r ased yma allan gan ddefnyddiwr ac ni ellir ei ddileu. Cofnodwch yr ased yn ol i fewn yn gyntaf, ac yna ceisiwch ei ddileu eto. ', + 'assoc_users' => 'Ar hyn o bryd mae\'r ased yma allan gan ddefnyddiwr ac ni ellir ei ddileu. Cofnodwch yr ased yn ol i fewn yn gyntaf, ac yna ceisiwch ei ddileu eto. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Ni crewyd yr ased, ceisiwch eto o. g. y. dd. :(', diff --git a/resources/lang/cy-GB/mail.php b/resources/lang/cy-GB/mail.php index 4e55f1c54ecf..087574d9f888 100644 --- a/resources/lang/cy-GB/mail.php +++ b/resources/lang/cy-GB/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Mae yna :count trwydded yn dod i ben yn ystod y :threshold diwrnod nesaf | Mae :count trwyddedau yn dod i ben yn y :threshold diwrnod nesaf.', 'link_to_update_password' => 'Cliciwch ar y ddolen ganlynol i gadarnhau eich cyfrinair :gwe:', - 'login' => 'Mewngofnodi:', + 'login' => 'Mewngofnodi', 'login_first_admin' => 'Mewngofnodi i\'ch gosodiad Snipe-IT newydd gan ddefnyddio\'r manylion isod:', 'low_inventory_alert' => 'Mae yna :count eitem sy\'n is na\'r isafswm neu a fydd yn isel cyn bo hir. | Mae yna :count eitemau sy\'n is na\'r isafswm neu a fydd yn isel cyn bo hir.', 'min_QTY' => 'Nifer Lleiaf', diff --git a/resources/lang/da-DK/admin/hardware/message.php b/resources/lang/da-DK/admin/hardware/message.php index dd685238bf8b..70d872393bda 100644 --- a/resources/lang/da-DK/admin/hardware/message.php +++ b/resources/lang/da-DK/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset eksisterer ikke.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset eksisterer ikke.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Dette aktiv findes ikke eller er ikke påkrævet.', - 'assoc_users' => 'Dette aktiv er i øjeblikket tjekket ud til en bruger og kan ikke slettes. Kontroller aktivet først, og prøv derefter at slette igen.', + 'assoc_users' => 'Dette aktiv er i øjeblikket tjekket ud til en bruger og kan ikke slettes. Kontroller aktivet først, og prøv derefter at slette igen.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Akten blev ikke oprettet, prøv igen. :(', diff --git a/resources/lang/da-DK/mail.php b/resources/lang/da-DK/mail.php index 1ba28d502aac..17e163fb3c36 100644 --- a/resources/lang/da-DK/mail.php +++ b/resources/lang/da-DK/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Der er :count licens(er) der udløber indenfor den/de næste :threshold dag(e).', 'link_to_update_password' => 'Venligst klik på følgende link for at opdatere din: webadgangskode:', - 'login' => 'Log på:', + 'login' => 'Login', 'login_first_admin' => 'Log ind på din nye Snipe-IT-installation ved hjælp af nedenstående referencer:', 'low_inventory_alert' => 'Der er :count enhed som er under minimum lagertal eller som snart vil være det.|Der er :count enheder som er under minimum lagertal eller som snart vil være det.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/de-DE/admin/hardware/form.php b/resources/lang/de-DE/admin/hardware/form.php index 03222e42cde7..e7525e8cea19 100644 --- a/resources/lang/de-DE/admin/hardware/form.php +++ b/resources/lang/de-DE/admin/hardware/form.php @@ -60,5 +60,5 @@ 'processing_spinner' => 'Verarbeitung... (Dies kann bei großen Dateien etwas Zeit in Anspruch nehmen)', 'optional_infos' => 'Optionale Informationen', 'order_details' => 'Bestellinformationen', - 'calc_eol' => 'If nulling the EOL date, use automatic EOL calculation based on the purchase date and EOL rate.', + 'calc_eol' => 'Wenn Sie das EOL-Datum auf Null setzen, dann verwenden Sie die automatische EOL-Berechnung basierend auf dem Kaufdatum und der EOL-Rate.', ]; diff --git a/resources/lang/de-DE/admin/hardware/message.php b/resources/lang/de-DE/admin/hardware/message.php index 74f020456e53..64416f2a8de6 100644 --- a/resources/lang/de-DE/admin/hardware/message.php +++ b/resources/lang/de-DE/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warnung: Dieses Asset wurde als nicht zur Herausgabe bereit markiert. Falls sich dieser Status geändert hat, aktualisieren Sie bitte den Asset Status.', - 'does_not_exist' => 'Asset existiert nicht.', - 'does_not_exist_var'=> 'Asset mit Tag :asset_tag nicht gefunden.', - 'no_tag' => 'Kein Asset Tag angegeben.', + 'undeployable' => 'Warnung: Dieses Asset wurde als nicht zur Herausgabe bereit markiert. Falls sich dieser Status geändert hat, aktualisieren Sie bitte den Asset Status.', + 'does_not_exist' => 'Asset existiert nicht.', + 'does_not_exist_var' => 'Asset mit Tag :asset_tag nicht gefunden.', + 'no_tag' => 'Kein Asset Tag angegeben.', 'does_not_exist_or_not_requestable' => 'Dieses Asset existiert nicht oder kann nicht angefordert werden.', - 'assoc_users' => 'Dieses Asset ist im Moment an einen Benutzer herausgegeben und kann nicht entfernt werden. Bitte buchen sie das Asset wieder ein und versuchen Sie dann erneut es zu entfernen. ', + 'assoc_users' => 'Dieses Asset ist im Moment an einen Benutzer herausgegeben und kann nicht entfernt werden. Bitte buchen sie das Asset wieder ein und versuchen Sie dann erneut es zu entfernen. ', 'warning_audit_date_mismatch' => 'Das nächste Prüfdatum dieses Assets (:next_audit_date) liegt vor dem letzten Prüfungsdatum (:last_audit_date). Bitte aktualisieren Sie daher das nächste Prüfungsdatum.', + 'labels_generated' => 'Labels wurden erfolgreich generiert.', + 'error_generating_labels' => 'Fehler beim Generieren der Labels.', + 'no_assets_selected' => 'Keine Assets ausgewählt.', 'create' => [ 'error' => 'Asset wurde nicht erstellt. Bitte versuchen Sie es erneut. :(', diff --git a/resources/lang/de-DE/general.php b/resources/lang/de-DE/general.php index 354267d5be03..223313ac5272 100644 --- a/resources/lang/de-DE/general.php +++ b/resources/lang/de-DE/general.php @@ -560,7 +560,7 @@ 'something_went_wrong' => 'Bei Ihrer Anfrage ist ein Fehler aufgetreten.', 'close' => 'Schließen', 'expires' => 'Ablaufdatum', - 'map_fields'=> 'Map :item_type Fields', + 'map_fields'=> ':item_type Feld zuordnen', 'remaining_var' => ':count verbleibend', 'label' => 'Label', 'import_asset_tag_exists' => 'Ein Asset mit dem Asset-Tag :asset_tag ist bereits vorhanden und es wurde keine Aktualisierung angefordert. Es wurden keine Änderungen vorgenommen.', diff --git a/resources/lang/de-DE/mail.php b/resources/lang/de-DE/mail.php index d3ee4aa6c9eb..1514bd1eb01e 100644 --- a/resources/lang/de-DE/mail.php +++ b/resources/lang/de-DE/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Dies ist eine Erinnerung daran, dass Sie derzeit :count Artikel ausgeliehen haben, die Sie weder angenommen noch abgelehnt haben. Klicken Sie bitte auf den untenstehenden Link, um diese entweder anzunehmen oder abzulehnen.', 'license_expiring_alert' => 'Es gibt :count auslaufende Lizenz in den nächsten :threshold Tagen.|Es gibt :count auslaufende Lizenzen in den nächsten :threshold Tagen.', 'link_to_update_password' => 'Klicken Sie bitte auf den folgenden Link zum Aktualisieren Ihres :web Passworts:', - 'login' => 'Benutzername:', + 'login' => 'Login', 'login_first_admin' => 'Melden Sie sich zu Ihrer neuen Snipe-IT-Installation mithilfe der unten stehenden Anmeldeinformationen an:', 'low_inventory_alert' => 'Es gibt :count Artikel, der unter dem Minimum ist oder kurz davor ist.|Es gibt :count Artikel, die unter dem Minimum sind oder kurz davor sind.', 'min_QTY' => 'Mindestmenge', diff --git a/resources/lang/de-if/admin/hardware/form.php b/resources/lang/de-if/admin/hardware/form.php index 9eda6d80966b..f788abea09a8 100644 --- a/resources/lang/de-if/admin/hardware/form.php +++ b/resources/lang/de-if/admin/hardware/form.php @@ -60,5 +60,5 @@ 'processing_spinner' => 'Verarbeitung... (Dies kann bei großen Dateien etwas Zeit in Anspruch nehmen)', 'optional_infos' => 'Optionale Informationen', 'order_details' => 'Bestellinformationen', - 'calc_eol' => 'If nulling the EOL date, use automatic EOL calculation based on the purchase date and EOL rate.', + 'calc_eol' => 'Wenn du das EOL-Datum auf Null setzt, dann verwende die automatische EOL-Berechnung basierend auf dem Kaufdatum und der EOL-Rate.', ]; diff --git a/resources/lang/de-if/admin/hardware/message.php b/resources/lang/de-if/admin/hardware/message.php index d072090951c3..9223f2c57981 100644 --- a/resources/lang/de-if/admin/hardware/message.php +++ b/resources/lang/de-if/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warnung: Dieses Asset wurde als derzeit nicht einsetzbar markiert. Wenn sich dieser Status geändert hat, aktualisieren Sie bitte den Asset-Status.', - 'does_not_exist' => 'Asset existiert nicht.', - 'does_not_exist_var'=> 'Asset mit Asset-Tag :asset_tag nicht gefunden.', - 'no_tag' => 'Kein Asset-Tag angegeben.', + 'undeployable' => 'Warnung: Dieses Asset wurde als derzeit nicht einsetzbar markiert. Wenn sich dieser Status geändert hat, aktualisieren Sie bitte den Asset-Status.', + 'does_not_exist' => 'Asset existiert nicht.', + 'does_not_exist_var' => 'Asset mit Asset-Tag :asset_tag nicht gefunden.', + 'no_tag' => 'Kein Asset-Tag angegeben.', 'does_not_exist_or_not_requestable' => 'Dieses Asset existiert nicht oder kann nicht angefordert werden.', - 'assoc_users' => 'Dieses Asset ist im Moment an einen Benutzer herausgegeben und kann nicht entfernt werden. Bitte buche das Asset wieder ein und versuche dann erneut, es zu entfernen. ', + 'assoc_users' => 'Dieses Asset ist im Moment an einen Benutzer herausgegeben und kann nicht entfernt werden. Bitte buche das Asset wieder ein und versuche dann erneut, es zu entfernen. ', 'warning_audit_date_mismatch' => 'Das nächste Prüfdatum dieses Assets (:next_audit_date) liegt vor dem letzten Prüfdatum (:last_audit_date). Bitte aktualisieren Sie das nächste Prüfdatum.', + 'labels_generated' => 'Labels wurden erfolgreich generiert.', + 'error_generating_labels' => 'Fehler beim Generieren der Labels.', + 'no_assets_selected' => 'Keine Assets ausgewählt.', 'create' => [ 'error' => 'Asset wurde nicht erstellt. Bitte versuche es erneut. :(', @@ -82,8 +85,8 @@ ], 'multi-checkout' => [ - 'error' => 'Asset wurde nicht ausgebucht, bitte versuchen Sie es erneut|Assets wurden nicht ausgebucht, bitte versuchen Sie es erneut', - 'success' => 'Asset erfolgreich ausgbucht.|Assets erfolgreich ausgebucht.', + 'error' => 'Asset wurde nicht ausgecheckt, bitte versuche es erneut.|Assets wurden nicht ausgecheckt, bitte versuche es erneut', + 'success' => 'Asset erfolgreich ausgecheckt.|Assets erfolgreich ausgecheckt.', ], 'checkin' => [ diff --git a/resources/lang/de-if/general.php b/resources/lang/de-if/general.php index 025b1fdb7d61..f7d0e2122e79 100644 --- a/resources/lang/de-if/general.php +++ b/resources/lang/de-if/general.php @@ -560,7 +560,7 @@ 'something_went_wrong' => 'Etwas ist bei Ihrer Anfrage schiefgegangen.', 'close' => 'Schließen', 'expires' => 'Ablaufdatum', - 'map_fields'=> 'Map :item_type Fields', + 'map_fields'=> ':item_type Feld zuordnen', 'remaining_var' => ':count verbleibend', 'label' => 'Label', 'import_asset_tag_exists' => 'Ein Asset mit dem Asset-Tag :asset_tag ist bereits vorhanden und es wurde keine Aktualisierung angefordert. Es wurden keine Änderungen vorgenommen.', diff --git a/resources/lang/de-if/mail.php b/resources/lang/de-if/mail.php index 65bf414b5ac8..15d845337780 100644 --- a/resources/lang/de-if/mail.php +++ b/resources/lang/de-if/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Dies ist eine Erinnerung, dass Sie derzeit :count Artikel ausgeliehen haben, die dunoch nicht akzeptiert oder abgelehnt hast. Bitte klicke auf den untenstehenden Link, um deine Entscheidung zu treffen.', 'license_expiring_alert' => 'Es gibt :count auslaufende Lizenz in den nächsten :threshold Tagen.|Es gibt :count auslaufende Lizenzen in den nächsten :threshold Tagen.', 'link_to_update_password' => 'Klicken Sie bitte auf den folgenden Link zum Aktualisieren Ihres :web Passworts:', - 'login' => 'Anmelden:', + 'login' => 'Anmelden', 'login_first_admin' => 'Melde Diche zu Deiner neuen Snipe-IT-Installation mithilfe der unten stehenden Anmeldeinformationen an:', 'low_inventory_alert' => 'Es gibt :count Artikel, der unter dem Minimum ist oder kurz davor ist.|Es gibt :count Artikel, die unter dem Minimum sind oder kurz davor sind.', 'min_QTY' => 'Mindestmenge', diff --git a/resources/lang/el-GR/admin/hardware/message.php b/resources/lang/el-GR/admin/hardware/message.php index ad0b5bb169ea..88f3b1312bcd 100644 --- a/resources/lang/el-GR/admin/hardware/message.php +++ b/resources/lang/el-GR/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'To πάγιο δεν υπάρχει.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'To πάγιο δεν υπάρχει.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Αυτό το στοιχείο δεν υπάρχει ή δεν απαιτείται.', - 'assoc_users' => 'Αυτό το στοιχείο είναι συνήθως αποσυνδεδεμένο από έναν χρήστη και δεν μπορεί να διαγραφεί. Ελέγξτε πρώτα το στοιχείο και, στη συνέχεια, δοκιμάστε ξανά τη διαγραφή.', + 'assoc_users' => 'Αυτό το στοιχείο είναι συνήθως αποσυνδεδεμένο από έναν χρήστη και δεν μπορεί να διαγραφεί. Ελέγξτε πρώτα το στοιχείο και, στη συνέχεια, δοκιμάστε ξανά τη διαγραφή.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Το περιουσιακού στοιχείο δεν δημιουργήθηκε, παρακαλώ προσπαθήστε ξανά. :(', diff --git a/resources/lang/el-GR/mail.php b/resources/lang/el-GR/mail.php index 34bd1f8e9ce2..76552725a260 100644 --- a/resources/lang/el-GR/mail.php +++ b/resources/lang/el-GR/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Υπάρχει :count άδεια που λήγει στις επόμενες :threshold ημέρες."Υπάρχουν :count άδειες που λήγουν στις επόμενες :threshold ημέρες.', 'link_to_update_password' => 'Κάντε κλικ στον παρακάτω σύνδεσμο για να ενημερώσετε τον κωδικό: web:', - 'login' => 'Σύνδεση:', + 'login' => 'Είσοδος', 'login_first_admin' => 'Συνδεθείτε στη νέα σας εγκατάσταση Snipe-IT χρησιμοποιώντας τα παρακάτω διαπιστευτήρια:', 'low_inventory_alert' => 'Υπάρχει :count στοιχείο που είναι κάτω από το ελάχιστο απόθεμα ή σύντομα θα είναι χαμηλό. Υπάρχουν :count στοιχεία που είναι κάτω από το ελάχιστο απόθεμα ή σύντομα θα είναι χαμηλή.', 'min_QTY' => 'Ελάχιστη ποσότητα', diff --git a/resources/lang/en-GB/admin/hardware/message.php b/resources/lang/en-GB/admin/hardware/message.php index 9c8836117071..007ab00a88d6 100644 --- a/resources/lang/en-GB/admin/hardware/message.php +++ b/resources/lang/en-GB/admin/hardware/message.php @@ -2,14 +2,17 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/en-GB/mail.php b/resources/lang/en-GB/mail.php index 517f5b17adff..938d0ff09c13 100644 --- a/resources/lang/en-GB/mail.php +++ b/resources/lang/en-GB/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/en-ID/admin/hardware/message.php b/resources/lang/en-ID/admin/hardware/message.php index 0b4a346a1070..b99b61e6837e 100644 --- a/resources/lang/en-ID/admin/hardware/message.php +++ b/resources/lang/en-ID/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Aset tidak ada.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Aset tidak ada.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Aset ini saat ini diperiksa ke pengguna dan tidak dapat dihapus. Harap periksa dulu asetnya, lalu coba hapus lagi. ', + 'assoc_users' => 'Aset ini saat ini diperiksa ke pengguna dan tidak dapat dihapus. Harap periksa dulu asetnya, lalu coba hapus lagi. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Aset tidak dibuat, coba lagi. :(', diff --git a/resources/lang/en-ID/mail.php b/resources/lang/en-ID/mail.php index c3a0fb1c3f17..f8bdb4c8f252 100644 --- a/resources/lang/en-ID/mail.php +++ b/resources/lang/en-ID/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Ada :count lisensi yang masa berlakunya akan habis dalam :threshold hari.|Ada :count lisensi yang masa berlakunya akan habis dalam :threshold hari.', 'link_to_update_password' => 'Silahkan klik pada link berikut untuk memperbarui :web password:', - 'login' => 'Masuk:', + 'login' => 'Masuk', 'login_first_admin' => 'Login ke instalasi Snipe-IT baru Anda dengan menggunakan kredensial di bawah ini:', 'low_inventory_alert' => 'Ada :count item yang di bawah minimum persediaan atau akan segera habis.|Ada :count item yang di bawah minimum persediaan atau akan segera habis.', 'min_QTY' => 'QTY minimum', diff --git a/resources/lang/es-CO/admin/hardware/message.php b/resources/lang/es-CO/admin/hardware/message.php index 1da0e967f41d..266732ce34a4 100644 --- a/resources/lang/es-CO/admin/hardware/message.php +++ b/resources/lang/es-CO/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Advertencia: Este activo actualmente está marcado como no utilizable. Si este estado ha cambiado, por favor, actualice el estado del activo.', - 'does_not_exist' => 'El recurso no existe.', - 'does_not_exist_var'=> 'Activo con placa :asset_tag no encontrado.', - 'no_tag' => 'No se ha proporcionado ninguna placa de activo.', + 'undeployable' => 'Advertencia: Este activo actualmente está marcado como no utilizable. Si este estado ha cambiado, por favor, actualice el estado del activo.', + 'does_not_exist' => 'El recurso no existe.', + 'does_not_exist_var' => 'Activo con placa :asset_tag no encontrado.', + 'no_tag' => 'No se ha proporcionado ninguna placa de activo.', 'does_not_exist_or_not_requestable' => 'Ese activo no existe o no puede ser solicitado.', - 'assoc_users' => 'Actualmente este activo está asignado a un usuario y no puede ser eliminado. Por favor, primero ingrese el activo y vuelva a intentarlo. ', + 'assoc_users' => 'Actualmente este activo está asignado a un usuario y no puede ser eliminado. Por favor, primero ingrese el activo y vuelva a intentarlo. ', 'warning_audit_date_mismatch' => 'La próxima fecha de auditoría de este activo (:next_audit_date) es anterior a la última fecha de auditoría (:last_audit_date). Por favor, actualice la próxima fecha de auditoría.', + 'labels_generated' => 'Las etiquetas fueron generadas exitosamente.', + 'error_generating_labels' => 'Error en la generación de etiquetas.', + 'no_assets_selected' => 'No se han seleccionado activos.', 'create' => [ 'error' => 'El activo no fue creado, por favor, inténtelo de nuevo. :(', diff --git a/resources/lang/es-CO/general.php b/resources/lang/es-CO/general.php index 5f868b75e304..01135ffd4f3f 100644 --- a/resources/lang/es-CO/general.php +++ b/resources/lang/es-CO/general.php @@ -560,7 +560,7 @@ 'something_went_wrong' => 'Algo falló en su solicitud.', 'close' => 'Cerrar', 'expires' => 'Vence', - 'map_fields'=> 'Map :item_type Fields', + 'map_fields'=> 'Asociar los campos para :item_type', 'remaining_var' => ':count restantes', 'label' => 'Etiqueta', 'import_asset_tag_exists' => 'Ya existe un activo con la placa :asset_tag y no se ha solicitado una actualización. No se ha realizado ningún cambio.', diff --git a/resources/lang/es-CO/mail.php b/resources/lang/es-CO/mail.php index 93da5ae7fe23..4c80d9d6afe0 100644 --- a/resources/lang/es-CO/mail.php +++ b/resources/lang/es-CO/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Este es un recordatorio de que actualmente tiene :count elemento(s) asignado(s) que no ha aceptado o rechazado. Haga clic en el siguiente enlace para confirmar su decisión.', 'license_expiring_alert' => 'Hay :count licencia que expira en los próximos :threshold días. | Hay :count licencias que expiran en los próximos :threshold días.', 'link_to_update_password' => 'Por favor, haga clic en el siguiente enlace para actualizar su contraseña de :web :', - 'login' => 'Entrar:', + 'login' => 'Iniciar sesión', 'login_first_admin' => 'Inicie sesión en su nueva instalación de Snipe-IT usando las credenciales:', 'low_inventory_alert' => 'Hay :count elemento que está por debajo del inventario mínimo o que pronto lo estará.|Hay :count elementos que están por debajo del inventario mínimo o que pronto lo estarán.', 'min_QTY' => 'Cantidad mínima', diff --git a/resources/lang/es-ES/admin/hardware/message.php b/resources/lang/es-ES/admin/hardware/message.php index dbad76fdc93d..6dddc1c0d94e 100644 --- a/resources/lang/es-ES/admin/hardware/message.php +++ b/resources/lang/es-ES/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Advertencia: Este activo actualmente está marcado como no utilizable. Si este estado ha cambiado, por favor, actualice el estado del activo.', - 'does_not_exist' => 'El activo no existe.', - 'does_not_exist_var'=> 'Activo con placa :asset_tag no encontrado.', - 'no_tag' => 'No se ha proporcionado ninguna placa de activo.', + 'undeployable' => 'Advertencia: Este activo actualmente está marcado como no utilizable. Si este estado ha cambiado, por favor, actualice el estado del activo.', + 'does_not_exist' => 'El activo no existe.', + 'does_not_exist_var' => 'Activo con placa :asset_tag no encontrado.', + 'no_tag' => 'No se ha proporcionado ninguna placa de activo.', 'does_not_exist_or_not_requestable' => 'Ese activo no existe o no puede ser solicitado.', - 'assoc_users' => 'Actualmente este activo está asignado a un usuario y no puede ser eliminado. Por favor, primero ingrese el activo y vuelva a intentarlo. ', + 'assoc_users' => 'Actualmente este activo está asignado a un usuario y no puede ser eliminado. Por favor, primero ingrese el activo y vuelva a intentarlo. ', 'warning_audit_date_mismatch' => 'La próxima fecha de auditoría de este activo (:next_audit_date) es anterior a la última fecha de auditoría (:last_audit_date). Por favor, actualice la próxima fecha de auditoría.', + 'labels_generated' => 'Las etiquetas fueron generadas exitosamente.', + 'error_generating_labels' => 'Error en la generación de etiquetas.', + 'no_assets_selected' => 'No se han seleccionado activos.', 'create' => [ 'error' => 'El activo no fue creado, por favor, inténtelo de nuevo. :(', diff --git a/resources/lang/es-ES/general.php b/resources/lang/es-ES/general.php index 31b56fce6279..8a87dea6b340 100644 --- a/resources/lang/es-ES/general.php +++ b/resources/lang/es-ES/general.php @@ -560,7 +560,7 @@ 'something_went_wrong' => 'Algo falló en su solicitud.', 'close' => 'Cerrar', 'expires' => 'Vence', - 'map_fields'=> 'Map :item_type Fields', + 'map_fields'=> 'Asociar los campos para :item_type', 'remaining_var' => ':count restantes', 'label' => 'Etiqueta', 'import_asset_tag_exists' => 'Ya existe un activo con la placa :asset_tag y no se ha solicitado una actualización. No se ha realizado ningún cambio.', diff --git a/resources/lang/es-ES/mail.php b/resources/lang/es-ES/mail.php index 6d9ee15caa54..4c80d9d6afe0 100644 --- a/resources/lang/es-ES/mail.php +++ b/resources/lang/es-ES/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Este es un recordatorio de que actualmente tiene :count elemento(s) asignado(s) que no ha aceptado o rechazado. Haga clic en el siguiente enlace para confirmar su decisión.', 'license_expiring_alert' => 'Hay :count licencia que expira en los próximos :threshold días. | Hay :count licencias que expiran en los próximos :threshold días.', 'link_to_update_password' => 'Por favor, haga clic en el siguiente enlace para actualizar su contraseña de :web :', - 'login' => 'Iniciar sesión:', + 'login' => 'Iniciar sesión', 'login_first_admin' => 'Inicie sesión en su nueva instalación de Snipe-IT usando las credenciales:', 'low_inventory_alert' => 'Hay :count elemento que está por debajo del inventario mínimo o que pronto lo estará.|Hay :count elementos que están por debajo del inventario mínimo o que pronto lo estarán.', 'min_QTY' => 'Cantidad mínima', diff --git a/resources/lang/es-MX/admin/hardware/message.php b/resources/lang/es-MX/admin/hardware/message.php index 5796100ef45c..4fd1130d2d14 100644 --- a/resources/lang/es-MX/admin/hardware/message.php +++ b/resources/lang/es-MX/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Advertencia: Este activo actualmente está marcado como no utilizable. Si este estado ha cambiado, por favor, actualice el estado del activo.', - 'does_not_exist' => 'Equipo inexistente.', - 'does_not_exist_var'=> 'Activo con placa :asset_tag no encontrado.', - 'no_tag' => 'No se ha proporcionado ninguna placa de activo.', + 'undeployable' => 'Advertencia: Este activo actualmente está marcado como no utilizable. Si este estado ha cambiado, por favor, actualice el estado del activo.', + 'does_not_exist' => 'Equipo inexistente.', + 'does_not_exist_var' => 'Activo con placa :asset_tag no encontrado.', + 'no_tag' => 'No se ha proporcionado ninguna placa de activo.', 'does_not_exist_or_not_requestable' => 'Ese activo no existe o no puede ser solicitado.', - 'assoc_users' => 'Actualmente este activo está asignado a un usuario y no puede ser eliminado. Por favor, primero ingrese el activo y vuelva a intentarlo. ', + 'assoc_users' => 'Actualmente este activo está asignado a un usuario y no puede ser eliminado. Por favor, primero ingrese el activo y vuelva a intentarlo. ', 'warning_audit_date_mismatch' => 'La próxima fecha de auditoría de este activo (:next_audit_date) es anterior a la última fecha de auditoría (:last_audit_date). Por favor, actualice la próxima fecha de auditoría.', + 'labels_generated' => 'Las etiquetas fueron generadas exitosamente.', + 'error_generating_labels' => 'Error en la generación de etiquetas.', + 'no_assets_selected' => 'No se han seleccionado activos.', 'create' => [ 'error' => 'El activo no fue creado, por favor, inténtelo de nuevo. :(', diff --git a/resources/lang/es-MX/general.php b/resources/lang/es-MX/general.php index 382c439cfcd1..a835d6c87539 100644 --- a/resources/lang/es-MX/general.php +++ b/resources/lang/es-MX/general.php @@ -560,7 +560,7 @@ 'something_went_wrong' => 'Algo falló en su solicitud.', 'close' => 'Cerrar', 'expires' => 'Vence', - 'map_fields'=> 'Map :item_type Fields', + 'map_fields'=> 'Asociar los campos para :item_type', 'remaining_var' => ':count restantes', 'label' => 'Etiqueta', 'import_asset_tag_exists' => 'Ya existe un activo con la placa :asset_tag y no se ha solicitado una actualización. No se ha realizado ningún cambio.', diff --git a/resources/lang/es-MX/mail.php b/resources/lang/es-MX/mail.php index e59e54c5281a..65807bc1710f 100644 --- a/resources/lang/es-MX/mail.php +++ b/resources/lang/es-MX/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Este es un recordatorio de que actualmente tiene :count elemento(s) asignado(s) que no ha aceptado o rechazado. Haga clic en el siguiente enlace para confirmar su decisión.', 'license_expiring_alert' => 'Hay :count licencia que expira en los próximos :threshold días. | Hay :count licencias que expiran en los próximos :threshold días.', 'link_to_update_password' => 'Por favor, haga clic en el siguiente enlace para actualizar su contraseña de :web :', - 'login' => 'Entrar:', + 'login' => 'Iniciar sesión', 'login_first_admin' => 'Inicie sesión en su nueva instalación de Snipe-IT usando las credenciales:', 'low_inventory_alert' => 'Hay :count elemento que está por debajo del inventario mínimo o que pronto lo estará.|Hay :count elementos que están por debajo del inventario mínimo o que pronto lo estarán.', 'min_QTY' => 'Cantidad mínima', diff --git a/resources/lang/es-VE/admin/hardware/message.php b/resources/lang/es-VE/admin/hardware/message.php index 3d87714d4a2c..d0956bafdb63 100644 --- a/resources/lang/es-VE/admin/hardware/message.php +++ b/resources/lang/es-VE/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Advertencia: Este activo actualmente está marcado como no utilizable. Si este estado ha cambiado, por favor, actualice el estado del activo.', - 'does_not_exist' => 'El activo no existe.', - 'does_not_exist_var'=> 'Activo con placa :asset_tag no encontrado.', - 'no_tag' => 'No se ha proporcionado ninguna placa de activo.', + 'undeployable' => 'Advertencia: Este activo actualmente está marcado como no utilizable. Si este estado ha cambiado, por favor, actualice el estado del activo.', + 'does_not_exist' => 'El activo no existe.', + 'does_not_exist_var' => 'Activo con placa :asset_tag no encontrado.', + 'no_tag' => 'No se ha proporcionado ninguna placa de activo.', 'does_not_exist_or_not_requestable' => 'Ese activo no existe o no puede ser solicitado.', - 'assoc_users' => 'Actualmente este activo está asignado a un usuario y no puede ser eliminado. Por favor, primero ingrese el activo y vuelva a intentarlo. ', + 'assoc_users' => 'Actualmente este activo está asignado a un usuario y no puede ser eliminado. Por favor, primero ingrese el activo y vuelva a intentarlo. ', 'warning_audit_date_mismatch' => 'La próxima fecha de auditoría de este activo (:next_audit_date) es anterior a la última fecha de auditoría (:last_audit_date). Por favor, actualice la próxima fecha de auditoría.', + 'labels_generated' => 'Las etiquetas fueron generadas exitosamente.', + 'error_generating_labels' => 'Error en la generación de etiquetas.', + 'no_assets_selected' => 'No se han seleccionado activos.', 'create' => [ 'error' => 'El activo no fue creado, por favor, inténtelo de nuevo. :(', diff --git a/resources/lang/es-VE/general.php b/resources/lang/es-VE/general.php index 11f67de5b1eb..1d38d6dcf562 100644 --- a/resources/lang/es-VE/general.php +++ b/resources/lang/es-VE/general.php @@ -560,7 +560,7 @@ 'something_went_wrong' => 'Algo falló en su solicitud.', 'close' => 'Cerrar', 'expires' => 'Vence', - 'map_fields'=> 'Map :item_type Fields', + 'map_fields'=> 'Asociar los campos para :item_type', 'remaining_var' => ':count restantes', 'label' => 'Etiqueta', 'import_asset_tag_exists' => 'Ya existe un activo con la placa :asset_tag y no se ha solicitado una actualización. No se ha realizado ningún cambio.', diff --git a/resources/lang/es-VE/mail.php b/resources/lang/es-VE/mail.php index cd19c0b6286c..50e3881495e0 100644 --- a/resources/lang/es-VE/mail.php +++ b/resources/lang/es-VE/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Este es un recordatorio de que actualmente tiene :count elemento(s) asignado(s) que no ha aceptado o rechazado. Haga clic en el siguiente enlace para confirmar su decisión.', 'license_expiring_alert' => 'Hay :count licencia que expira en los próximos :threshold días. | Hay :count licencias que expiran en los próximos :threshold días.', 'link_to_update_password' => 'Por favor, haga clic en el siguiente enlace para actualizar su contraseña de :web :', - 'login' => 'Iniciar sesión:', + 'login' => 'Iniciar sesión', 'login_first_admin' => 'Inicie sesión en su nueva instalación de Snipe-IT usando las credenciales:', 'low_inventory_alert' => 'Hay :count elemento que está por debajo del inventario mínimo o que pronto lo estará.|Hay :count elementos que están por debajo del inventario mínimo o que pronto lo estarán.', 'min_QTY' => 'Cantidad mínima', diff --git a/resources/lang/et-EE/admin/hardware/message.php b/resources/lang/et-EE/admin/hardware/message.php index ae19d9a660d7..94bbe5a155aa 100644 --- a/resources/lang/et-EE/admin/hardware/message.php +++ b/resources/lang/et-EE/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Vahend puudub.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Vahend puudub.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Seda vahendit ei eksisteeri või see ei ole taotletav.', - 'assoc_users' => 'Seda vara kontrollitakse kasutajale praegu ja seda ei saa kustutada. Esmalt kontrollige varast ja proovige seejärel uuesti kustutada.', + 'assoc_users' => 'Seda vara kontrollitakse kasutajale praegu ja seda ei saa kustutada. Esmalt kontrollige varast ja proovige seejärel uuesti kustutada.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Vahendit ei loodud, palun proovi uuesti. :(', diff --git a/resources/lang/et-EE/mail.php b/resources/lang/et-EE/mail.php index c55d9d204a0b..99f51c99d2a8 100644 --- a/resources/lang/et-EE/mail.php +++ b/resources/lang/et-EE/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => ':count litsents aegub järgmise :threshold päeva jooksul.|:count litsentsi aegub järgmise :threshold päeva jooksul.', 'link_to_update_password' => 'Klienditeenuse uuendamiseks klõpsake järgmisel lingil:', - 'login' => 'Logi sisse:', + 'login' => 'Logi sisse', 'login_first_admin' => 'Logige oma uude Snipe-IT-seadmesse sisse, kasutades allpool toodud mandaate.', 'low_inventory_alert' => ':count üksus on laos alla miinimummäära või saab varsti otsa.|:count üksust on laos alla miinimummäära või saab varsti otsa.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/fa-IR/admin/hardware/message.php b/resources/lang/fa-IR/admin/hardware/message.php index 3f608660f8ab..690daeca18c7 100644 --- a/resources/lang/fa-IR/admin/hardware/message.php +++ b/resources/lang/fa-IR/admin/hardware/message.php @@ -2,14 +2,17 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'دارایی وجود ندارد.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'دارایی وجود ندارد.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'آن دارایی وجود ندارد یا قابل درخواست نیست. ', - 'assoc_users' => 'این دارایی در حال حاضر به یک کاربر چک کردن و پاک نمی شود. لطفا دارایی در اولین بار چک کنید، و سپس سعی کنید دوباره حذف کنید.', + 'assoc_users' => 'این دارایی در حال حاضر به یک کاربر چک کردن و پاک نمی شود. لطفا دارایی در اولین بار چک کنید، و سپس سعی کنید دوباره حذف کنید.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'دارایی ساخته نشده است، لطفا دوباره تلاش کنید.', diff --git a/resources/lang/fa-IR/mail.php b/resources/lang/fa-IR/mail.php index 783a11221d9d..2c801099d99a 100644 --- a/resources/lang/fa-IR/mail.php +++ b/resources/lang/fa-IR/mail.php @@ -69,7 +69,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'مجوز :count در روزهای بعدی :threshold منقضی می شود.|مجوزهای :count در روزهای بعدی :threshold منقضی می شوند.', 'link_to_update_password' => 'برای به روزرسانی لطفا بر روی لینک زیر کلیک کنید: web password:', - 'login' => 'ورود:', + 'login' => 'ورود', 'login_first_admin' => 'با نصب مجدد Snipe-IT جدید خود به سیستم وارد شوید', 'low_inventory_alert' => 'آیتم :count وجود دارد که زیر حداقل موجودی است یا به زودی کم می شود.', 'min_QTY' => 'حداقل QTY', diff --git a/resources/lang/fi-FI/admin/hardware/message.php b/resources/lang/fi-FI/admin/hardware/message.php index e476c063d412..5ed9df8c3a5d 100644 --- a/resources/lang/fi-FI/admin/hardware/message.php +++ b/resources/lang/fi-FI/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Laitetta ei löydy.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Laitetta ei löydy.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Tätä laitetta ei ole tai se ei ole pyydettävissä.', - 'assoc_users' => 'Tämä laite on luovutettu käyttäjälle joten sitä ei voida poistaa. Palauta laite ensin käyttäjältä ja yritä uudelleen. ', + 'assoc_users' => 'Tämä laite on luovutettu käyttäjälle joten sitä ei voida poistaa. Palauta laite ensin käyttäjältä ja yritä uudelleen. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Laitetta ei luotu, yritä uudelleen. :(', diff --git a/resources/lang/fi-FI/mail.php b/resources/lang/fi-FI/mail.php index aaff0e8cd0e6..154aca7ce2e8 100644 --- a/resources/lang/fi-FI/mail.php +++ b/resources/lang/fi-FI/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => ':count lisenssiä vanhenee :threshold päivän sisällä.|:count lisenssiä vanhenee :threshold päivän sisällä.', 'link_to_update_password' => 'Napsauta seuraavaa linkkiä päivittääksesi :web salasanasi:', - 'login' => 'Kirjaudu sisään:', + 'login' => 'Kirjaudu', 'login_first_admin' => 'Kirjaudu sisään uuteen Snipe-IT asennukseen käyttäen alla olevia tunnistetietoja:', 'low_inventory_alert' => ':count nimikkeen saldomäärä on alle minimirajan tai kohta alhainen.|:count nimikkeen saldomäärä on alle minimirajan tai kohta alhainen.', 'min_QTY' => 'Minimi määrä', diff --git a/resources/lang/fil-PH/admin/hardware/message.php b/resources/lang/fil-PH/admin/hardware/message.php index d308600049d8..e035069635de 100644 --- a/resources/lang/fil-PH/admin/hardware/message.php +++ b/resources/lang/fil-PH/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Hindi umiiral ang asset.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Hindi umiiral ang asset.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Ang asset na ito ay kasalukuyang nai-check out sa isang user at hindi na maaaring mai-delete. Mangyaring suriin muna ang asset, at pagkatapos subukang i-delete muli. ', + 'assoc_users' => 'Ang asset na ito ay kasalukuyang nai-check out sa isang user at hindi na maaaring mai-delete. Mangyaring suriin muna ang asset, at pagkatapos subukang i-delete muli. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Ang asset ay hindi naisagawa, mangyaring subukang muli. :(', diff --git a/resources/lang/fil-PH/mail.php b/resources/lang/fil-PH/mail.php index 4d533a23eb07..af8afaecec72 100644 --- a/resources/lang/fil-PH/mail.php +++ b/resources/lang/fil-PH/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Paki-klik sa mga sumusunod na link para makapag-update sa iyong :web password:', - 'login' => 'Mag-login:', + 'login' => 'Mag-login', 'login_first_admin' => 'Mag-login sa iyong bagong pag-install ng Snipe-IT gamit ang mga kredensyal sa ibaba:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Ang Min QTY', diff --git a/resources/lang/fr-FR/admin/hardware/message.php b/resources/lang/fr-FR/admin/hardware/message.php index 5610f8664e67..9cc2ff8e1681 100644 --- a/resources/lang/fr-FR/admin/hardware/message.php +++ b/resources/lang/fr-FR/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Attention : Cet actif est marqué comme indéployable. Si ce statut a changé, merci de mettre à jour le statut d\'actif.', - 'does_not_exist' => 'Ce bien n\'existe pas.', - 'does_not_exist_var'=> 'Actif avec le tag :asset_tag introuvable.', - 'no_tag' => 'Aucune étiquette d\'actif fournie.', + 'undeployable' => 'Attention : Cet actif est marqué comme indéployable. Si ce statut a changé, merci de mettre à jour le statut d\'actif.', + 'does_not_exist' => 'Ce bien n\'existe pas.', + 'does_not_exist_var' => 'Actif avec le tag :asset_tag introuvable.', + 'no_tag' => 'Aucune étiquette d\'actif fournie.', 'does_not_exist_or_not_requestable' => 'Cet actif n\'existe pas ou ne peut pas être demandé.', - 'assoc_users' => 'Ce bien est marqué sorti par un utilisateur et ne peut être supprimé. Veuillez d\'abord cliquer sur Retour de Biens, et réessayer.', + 'assoc_users' => 'Ce bien est marqué sorti par un utilisateur et ne peut être supprimé. Veuillez d\'abord cliquer sur Retour de Biens, et réessayer.', 'warning_audit_date_mismatch' => 'La prochaine date d\'audit de cet actif (:next_audit_date) est antérieure à la dernière date d\'audit (:last_audit_date). Veuillez mettre à jour la prochaine date d\'audit.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Ce bien n\'a pas été créé, veuillez réessayer. :(', diff --git a/resources/lang/fr-FR/mail.php b/resources/lang/fr-FR/mail.php index 0b792d267b02..deff7cd389a8 100644 --- a/resources/lang/fr-FR/mail.php +++ b/resources/lang/fr-FR/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Ceci est un rappel que vous avez actuellement :count articles que vous n\'avez pas acceptés ou refusés. Veuillez cliquer sur le lien ci-dessous pour confirmer votre décision.', 'license_expiring_alert' => 'Il y a :count licence expirant dans les prochains :threshold jours.|Il y a :count licences expirant dans les prochains :threshold jours.', 'link_to_update_password' => 'Veuillez cliquer sur le lien suivant pour confirmer votre :web account:', - 'login' => 'Nom d\'utilisateur:', + 'login' => 'Connexion', 'login_first_admin' => 'Connectez-vous à votre nouvelle installation Snipe-IT en utilisant les informations d\'identification ci-dessous :', 'low_inventory_alert' => 'Il y a :count item qui est en dessous du minimum d\'inventaire ou qui sera bas sous peu.|Il y a :count articles qui sont en dessous du minimum d\'inventaire ou qui seront bas sous peu.', 'min_QTY' => 'Quantité minimum', diff --git a/resources/lang/ga-IE/admin/hardware/message.php b/resources/lang/ga-IE/admin/hardware/message.php index 53a36f78f794..cb9b7d7d0052 100644 --- a/resources/lang/ga-IE/admin/hardware/message.php +++ b/resources/lang/ga-IE/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Níl sócmhainn ann.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Níl sócmhainn ann.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Faoi láthair déanfar an tsócmhainn seo a sheiceáil chuig úsáideoir agus ní féidir é a scriosadh. Déan seiceáil ar an tsócmhainn sa chéad uair, agus déan iarracht ansin scriosadh arís.', + 'assoc_users' => 'Faoi láthair déanfar an tsócmhainn seo a sheiceáil chuig úsáideoir agus ní féidir é a scriosadh. Déan seiceáil ar an tsócmhainn sa chéad uair, agus déan iarracht ansin scriosadh arís.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Níor cruthaíodh sócmhainn, déan iarracht arís. :(', diff --git a/resources/lang/ga-IE/mail.php b/resources/lang/ga-IE/mail.php index 49ca519b7d74..1227f9c45f9e 100644 --- a/resources/lang/ga-IE/mail.php +++ b/resources/lang/ga-IE/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Cliceáil ar an nasc seo a leanas chun do chuid focal faire:', - 'login' => 'Logáil isteach:', + 'login' => 'Logáil isteach', 'login_first_admin' => 'Logáil isteach i do shuiteáil Snipe-IT nua ag baint úsáide as na dintiúir thíos:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/he-IL/admin/hardware/message.php b/resources/lang/he-IL/admin/hardware/message.php index 1ca76b81fbd9..b933d8ee2e73 100644 --- a/resources/lang/he-IL/admin/hardware/message.php +++ b/resources/lang/he-IL/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'הנכס אינו קיים.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'הנכס אינו קיים.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'הנכס אינו קיים או לא זמין.', - 'assoc_users' => 'הנכס הזה מסומן כרגע למשתמש ולא ניתן למחוק אותו. בדוק תחילה את הנכס ולאחר מכן נסה למחוק שוב.', + 'assoc_users' => 'הנכס הזה מסומן כרגע למשתמש ולא ניתן למחוק אותו. בדוק תחילה את הנכס ולאחר מכן נסה למחוק שוב.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'הנכס לא נוצר, נסה שוב. You', diff --git a/resources/lang/he-IL/mail.php b/resources/lang/he-IL/mail.php index e5f3457a05ae..4a1a59c040bd 100644 --- a/resources/lang/he-IL/mail.php +++ b/resources/lang/he-IL/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'לחץ על הקישור הבא כדי לעדכן את: סיסמת האינטרנט:', - 'login' => 'התחברות:', + 'login' => 'התחברות', 'login_first_admin' => 'היכנס למערכת ההתקנה החדשה של Snipe-IT באמצעות פרטי הכניסה הבאים:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'מינימום QTY', diff --git a/resources/lang/hr-HR/admin/hardware/message.php b/resources/lang/hr-HR/admin/hardware/message.php index 67d821aa8df7..b3bc02832622 100644 --- a/resources/lang/hr-HR/admin/hardware/message.php +++ b/resources/lang/hr-HR/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Imovina ne postoji.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Imovina ne postoji.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Ovaj je entitet trenutno provjeren korisniku i ne može se izbrisati. Najprije provjerite snimljeni materijal, a zatim pokušajte ponovo ukloniti.', + 'assoc_users' => 'Ovaj je entitet trenutno provjeren korisniku i ne može se izbrisati. Najprije provjerite snimljeni materijal, a zatim pokušajte ponovo ukloniti.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Imovina nije izrađena, pokušajte ponovo. :(', diff --git a/resources/lang/hr-HR/mail.php b/resources/lang/hr-HR/mail.php index de7c923cf12d..b32b10b9b330 100644 --- a/resources/lang/hr-HR/mail.php +++ b/resources/lang/hr-HR/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Postoji :count licenca koja istječe u naredna :threshold dana.|Postoje :count licence koje istječu u naredna :threshold dana.', 'link_to_update_password' => 'Kliknite sljedeću vezu da biste ažurirali svoju: web lozinku:', - 'login' => 'Prijaviti se:', + 'login' => 'Prijaviti se', 'login_first_admin' => 'Prijavite se na svoju novu Snipe-IT instalaciju pomoću vjerodajnica u nastavku:', 'low_inventory_alert' => 'Postoji :count stavka koja je ispod minimalnog iznosa zaliha ili će uskoro biti.|Postoje :count stavke koje su ispod minimalnog iznosa zaliha ili će uskoro biti.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/hu-HU/admin/hardware/message.php b/resources/lang/hu-HU/admin/hardware/message.php index ed3dbff684be..5c5b8287953b 100644 --- a/resources/lang/hu-HU/admin/hardware/message.php +++ b/resources/lang/hu-HU/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Eszköz nem létezik.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Eszköz nem létezik.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Az eszköz nem létezik vagy nem igényelhető.', - 'assoc_users' => 'Ez az eszköz jelenleg ki van jelölve egy felhasználónak, és nem törölhető. Kérjük, először ellenőrizze az eszközt, majd próbálja meg újra törölni.', + 'assoc_users' => 'Ez az eszköz jelenleg ki van jelölve egy felhasználónak, és nem törölhető. Kérjük, először ellenőrizze az eszközt, majd próbálja meg újra törölni.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Az eszköz nem jött létre, próbálkozzon újra. :(', diff --git a/resources/lang/hu-HU/mail.php b/resources/lang/hu-HU/mail.php index fe7c6f39b6a4..02115db38054 100644 --- a/resources/lang/hu-HU/mail.php +++ b/resources/lang/hu-HU/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Ez egy emlékeztető arról, hogy jelenleg :count számú jóváhagyásra váró eszköze van. Kérem, az alábbi linken döntsön ezek elfogadásáról, vagy elutasításáról.', 'license_expiring_alert' => ':count licensz lejár :thershold nap múlva.|:count licensz lejár :thershold nap múlva.', 'link_to_update_password' => 'Kérjük, kattintson a következő linkre a frissítéshez: webes jelszó:', - 'login' => 'Belépés:', + 'login' => 'Belépés', 'login_first_admin' => 'Jelentkezzen be az új Snipe-IT telepítésébe az alábbi hitelesítő adatok alapján:', 'low_inventory_alert' => ':count darab tétel érhető el, ami kevesebb mint a minimum készlet vagy hamarosan kevesebb lesz.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/id-ID/admin/hardware/message.php b/resources/lang/id-ID/admin/hardware/message.php index 8fe82f8b00df..95058fbcb690 100644 --- a/resources/lang/id-ID/admin/hardware/message.php +++ b/resources/lang/id-ID/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Aset tidak ada.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Aset tidak ada.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Aset tersebut tidak ada atau tidak dapat di minta.', - 'assoc_users' => 'Aset ini sudah diberikan kepada pengguna dan tidak dapat di hapus. Silahkan cek aset terlebih dahulu kemudian coba hapus kembali. ', + 'assoc_users' => 'Aset ini sudah diberikan kepada pengguna dan tidak dapat di hapus. Silahkan cek aset terlebih dahulu kemudian coba hapus kembali. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Aset gagal di buat, silahkan coba kembali', diff --git a/resources/lang/id-ID/mail.php b/resources/lang/id-ID/mail.php index c92b5fd535f1..dbcb949ca7af 100644 --- a/resources/lang/id-ID/mail.php +++ b/resources/lang/id-ID/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Ada :count lisensi yang masa berlakunya akan habis dalam :threshold hari.|Ada :count lisensi yang masa berlakunya akan habis dalam :threshold hari.', 'link_to_update_password' => 'Silahkan klik pada link berikut untuk mengupdate: password web anda:', - 'login' => 'Login:', + 'login' => 'Masuk', 'login_first_admin' => 'Login ke instalasi Snipe-IT baru Anda dengan menggunakan kredensial di bawah ini:', 'low_inventory_alert' => 'Ada :count item yang di bawah minimum persediaan atau akan segera habis.|Ada :count item yang di bawah minimum persediaan atau akan segera habis.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/is-IS/admin/hardware/message.php b/resources/lang/is-IS/admin/hardware/message.php index a87b2bb87299..c53993bd821b 100644 --- a/resources/lang/is-IS/admin/hardware/message.php +++ b/resources/lang/is-IS/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Þessi eign finnst ekki.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Þessi eign finnst ekki.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Þessari eign hefur þegar verið ráðstafað til notanda og er því ekki hægt að afskrá. Vinsamlegast skilaðu eigninni fyrst og reyndu síðan að afskrá hana. ', + 'assoc_users' => 'Þessari eign hefur þegar verið ráðstafað til notanda og er því ekki hægt að afskrá. Vinsamlegast skilaðu eigninni fyrst og reyndu síðan að afskrá hana. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/is-IS/mail.php b/resources/lang/is-IS/mail.php index fe008e097ecd..f533a33513a0 100644 --- a/resources/lang/is-IS/mail.php +++ b/resources/lang/is-IS/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/it-IT/admin/hardware/message.php b/resources/lang/it-IT/admin/hardware/message.php index 07edf1a79406..130203f48702 100644 --- a/resources/lang/it-IT/admin/hardware/message.php +++ b/resources/lang/it-IT/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Attenzione: Questo Bene è stato marcato come non distribuibile. Se lo stato del Bene è cambiato si prega di aggiornarlo.', - 'does_not_exist' => 'Questo Asset non esiste.', - 'does_not_exist_var'=> 'Bene con tag :asset_tag non trovato.', - 'no_tag' => 'Nessun tag del Bene è stato fornito.', + 'undeployable' => 'Attenzione: Questo Bene è stato marcato come non distribuibile. Se lo stato del Bene è cambiato si prega di aggiornarlo.', + 'does_not_exist' => 'Questo Asset non esiste.', + 'does_not_exist_var' => 'Bene con tag :asset_tag non trovato.', + 'no_tag' => 'Nessun tag del Bene è stato fornito.', 'does_not_exist_or_not_requestable' => 'Questo bene non esiste o non è disponibile.', - 'assoc_users' => 'Questo asset è stato assegnato ad un Utente e non può essere cancellato. Per favore Riassegnalo in magazzino,e dopo riprova a cancellarlo.', + 'assoc_users' => 'Questo asset è stato assegnato ad un Utente e non può essere cancellato. Per favore Riassegnalo in magazzino,e dopo riprova a cancellarlo.', 'warning_audit_date_mismatch' => 'La prossima data d\'inventario di questo Bene (:next_audit_date) precede l\'ultima data d\'inventario (:last_audit_date). Si prega di aggiornare la prossima data d\'inventario.', + 'labels_generated' => 'Etichette generate con successo.', + 'error_generating_labels' => 'Errore durante la generazione delle etichette.', + 'no_assets_selected' => 'Nessun Bene selezionato.', 'create' => [ 'error' => 'L\'asset non è stato creato, riprova per favore. :(', diff --git a/resources/lang/it-IT/general.php b/resources/lang/it-IT/general.php index e01a435950e5..9184a8f1dde9 100644 --- a/resources/lang/it-IT/general.php +++ b/resources/lang/it-IT/general.php @@ -560,7 +560,7 @@ 'something_went_wrong' => 'Qualcosa è andato storto con la tua richiesta.', 'close' => 'Chiudi', 'expires' => 'Scade', - 'map_fields'=> 'Map :item_type Fields', + 'map_fields'=> 'Mappa i Campi :item_type', 'remaining_var' => ':count Rimanenti', 'label' => 'Etichetta', 'import_asset_tag_exists' => 'Esiste già un Bene con tag :asset_tag e non è stato richiesto un aggiornamento. Nessuna modifica effettuata.', diff --git a/resources/lang/it-IT/mail.php b/resources/lang/it-IT/mail.php index 548618ffb6f0..17e3e5e18624 100644 --- a/resources/lang/it-IT/mail.php +++ b/resources/lang/it-IT/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Promemoria: attualmente hai :count elementi assegnati che non hai né accettato né rifiutato. Clicca sul link qui sotto per confermare la tua decisione.', 'license_expiring_alert' => 'Tra :threshold giorni sta per scadere :count licenza. |Tra :threshold giorni stanno per scadere :count licenze.', 'link_to_update_password' => 'Clicca sul seguente collegamento per aggiornare la tua password per :web :', - 'login' => 'Accesso:', + 'login' => 'Accedi', 'login_first_admin' => 'Accedi alla nuova installazione di Snipe-IT utilizzando le seguenti credenziali:', 'low_inventory_alert' => 'C\'è :count elemento che è al di sotto del livello di scorta minima o lo sarà a breve. |Ci sono :count elementi che sono al di sotto del livello di scorta minima o lo saranno a breve.', 'min_QTY' => 'Quantità minima', diff --git a/resources/lang/iu-NU/admin/hardware/message.php b/resources/lang/iu-NU/admin/hardware/message.php index df68f28395bd..222cbc439e6a 100644 --- a/resources/lang/iu-NU/admin/hardware/message.php +++ b/resources/lang/iu-NU/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/iu-NU/mail.php b/resources/lang/iu-NU/mail.php index 76c0c1773d28..7663a0167bb6 100644 --- a/resources/lang/iu-NU/mail.php +++ b/resources/lang/iu-NU/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/ja-JP/admin/accessories/message.php b/resources/lang/ja-JP/admin/accessories/message.php index 870630c169b0..4787fd544cac 100644 --- a/resources/lang/ja-JP/admin/accessories/message.php +++ b/resources/lang/ja-JP/admin/accessories/message.php @@ -28,7 +28,7 @@ 'unavailable' => '付属品はチェックアウト中のため利用できません。', 'user_does_not_exist' => 'その利用者は不正です。もう一度、やり直して下さい。', 'checkout_qty' => array( - 'lte' => 'There is currently only one available accessory of this type, and you are trying to check out :checkout_qty. Please adjust the checkout quantity or the total stock of this accessory and try again.|There are :number_currently_remaining total available accessories, and you are trying to check out :checkout_qty. Please adjust the checkout quantity or the total stock of this accessory and try again.', + 'lte' => '現在、このタイプのアクセサリーは1つしかありません。:checkout_qty をチェックアウトしようとしています。 このアクセサリの数量または総在庫数を調整して再度お試しください。 :number_currently_remaining の利用可能なアクセサリーがあり、:checkout_qty をチェックアウトしようとしています。 このアクセサリの数量または総在庫数を調整して再度お試しください。', ), ), diff --git a/resources/lang/ja-JP/admin/hardware/message.php b/resources/lang/ja-JP/admin/hardware/message.php index 827acc9e2043..d5b5138507d7 100644 --- a/resources/lang/ja-JP/admin/hardware/message.php +++ b/resources/lang/ja-JP/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => '警告: このアセットは現在デプロイ不可能としてマークされています。このステータスが変更された場合は、アセットのステータスを更新してください。', - 'does_not_exist' => '資産が存在しません。', - 'does_not_exist_var'=> 'タグ:asset_tag を持つアセットが見つかりません。', - 'no_tag' => 'アセットタグが提供されていません。', + 'undeployable' => '警告: このアセットは現在デプロイ不可能としてマークされています。このステータスが変更された場合は、アセットのステータスを更新してください。', + 'does_not_exist' => '資産が存在しません。', + 'does_not_exist_var' => 'タグ:asset_tag を持つアセットが見つかりません。', + 'no_tag' => 'アセットタグが提供されていません。', 'does_not_exist_or_not_requestable' => 'その資産は存在しないか要求可能ではありません。', - 'assoc_users' => 'この資産はユーザーに貸し出されているため削除できません。資産を返却後、もう一度、やり直して下さい。 ', + 'assoc_users' => 'この資産はユーザーに貸し出されているため削除できません。資産を返却後、もう一度、やり直して下さい。 ', 'warning_audit_date_mismatch' => 'この資産の次の監査日 (:next_audit_date) は最終監査日 (:last_audit_date) より前です。次の監査日を更新してください。', + 'labels_generated' => 'ラベルの生成に成功しました。', + 'error_generating_labels' => 'ラベルを生成中にエラーが発生しました。', + 'no_assets_selected' => '資産が選択されていません。', 'create' => [ 'error' => '資産は作成されませんでした。もう一度、やり直して下さい。', diff --git a/resources/lang/ja-JP/admin/licenses/general.php b/resources/lang/ja-JP/admin/licenses/general.php index e056beb0c87c..a3679a973946 100644 --- a/resources/lang/ja-JP/admin/licenses/general.php +++ b/resources/lang/ja-JP/admin/licenses/general.php @@ -14,7 +14,7 @@ 'info' => 'ライセンス情報', 'license_seats' => 'ライセンスシート', 'seat' => 'シート', - 'seat_count' => 'Seat :count', + 'seat_count' => 'シート :count', 'seats' => 'シート数', 'software_licenses' => 'ソフトウェア・ライセンス', 'user' => '利用者', diff --git a/resources/lang/ja-JP/localizations.php b/resources/lang/ja-JP/localizations.php index 537ded61da83..e182b6141fbb 100644 --- a/resources/lang/ja-JP/localizations.php +++ b/resources/lang/ja-JP/localizations.php @@ -41,7 +41,7 @@ 'mi-NZ'=> 'Maori', 'mn-MN'=> 'Mongolian', //'no-NO'=> 'Norwegian', - 'nb-NO'=> 'Norwegian Bokmål', + 'nb-NO'=> 'ノルウェー語ブークモール', //'nn-NO'=> 'Norwegian Nynorsk', 'fa-IR'=> 'Persian', 'pl-PL'=> 'Polish', @@ -135,7 +135,7 @@ 'EC'=>'Ecuador', 'EE'=>'Estonia', 'EG'=>'Egypt', - 'GB-ENG'=>'England', + 'GB-ENG'=>'イングランド', 'ER'=>'Eritrea', 'ES'=>'Spain', 'ET'=>'Ethiopia', @@ -234,7 +234,7 @@ 'NG'=>'Nigeria', 'NI'=>'Nicaragua', 'NL'=>'Netherlands', - 'GB-NIR' => 'Northern Ireland', + 'GB-NIR' => '北アイルランド', 'NO'=>'Norway', 'NP'=>'Nepal', 'NR'=>'Nauru', @@ -314,7 +314,7 @@ 'VI'=>'Virgin Islands (U.S.)', 'VN'=>'Viet Nam', 'VU'=>'Vanuatu', - 'GB-WLS' =>'Wales', + 'GB-WLS' =>'ウェールズ', 'WF'=>'Wallis And Futuna Islands', 'WS'=>'Samoa', 'YE'=>'Yemen', diff --git a/resources/lang/ja-JP/mail.php b/resources/lang/ja-JP/mail.php index dce268ac329a..a4d2a384aa60 100644 --- a/resources/lang/ja-JP/mail.php +++ b/resources/lang/ja-JP/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => ':threshold 日後に:count ライセンスが失効します。', 'link_to_update_password' => '次のリンクをクリックして、パスワードを更新してください。 :web password:', - 'login' => 'ログイン:', + 'login' => 'ログイン', 'login_first_admin' => '以下の新しいログイン情報を使用して、Snipe-ITにログインします。', 'low_inventory_alert' => '最小在庫を下回っているか、すぐに少なくなる :count のアイテムがあります。', 'min_QTY' => '分数', diff --git a/resources/lang/km-KH/admin/hardware/message.php b/resources/lang/km-KH/admin/hardware/message.php index 592bc26929cc..6c5867eac749 100644 --- a/resources/lang/km-KH/admin/hardware/message.php +++ b/resources/lang/km-KH/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'ទ្រព្យសកម្មមិនមានទេ។', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'ទ្រព្យសកម្មមិនមានទេ។', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'ទ្រព្យសកម្មនោះមិនមានទេ ឬមិនអាចស្នើសុំបាន។', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'ស្លាកត្រូវបានបង្កើតដោយជោគជ័យ។', + 'error_generating_labels' => 'កំហុសខណៈពេលបង្កើតស្លាក។', + 'no_assets_selected' => 'មិនបានជ្រើសរើសទ្រព្យសម្បត្តិទេ។', 'create' => [ 'error' => 'ទ្រព្យសកម្មមិនត្រូវបានបង្កើតទេ សូមព្យាយាមម្តងទៀត។ :(', diff --git a/resources/lang/km-KH/admin/hardware/table.php b/resources/lang/km-KH/admin/hardware/table.php index 716c01875849..bcf18e924f3f 100644 --- a/resources/lang/km-KH/admin/hardware/table.php +++ b/resources/lang/km-KH/admin/hardware/table.php @@ -27,6 +27,6 @@ 'monthly_depreciation' => 'Monthly Depreciation', 'requesting_user' => 'Requesting User', 'requested_date' => 'កាលបរិច្ឆេទដែលបានស្នើសុំ', - 'changed' => 'Changed', + 'changed' => 'បានផ្លាស់ប្តូរ', 'icon' => 'Icon', ]; diff --git a/resources/lang/km-KH/admin/labels/table.php b/resources/lang/km-KH/admin/labels/table.php index 7af46dacc745..6d531ffde70d 100644 --- a/resources/lang/km-KH/admin/labels/table.php +++ b/resources/lang/km-KH/admin/labels/table.php @@ -1,13 +1,13 @@ 'Test Company Limited', - 'example_defaultloc' => 'Building 1', + 'example_company' => 'ក្រុមហ៊ុន Test Limited', + 'example_defaultloc' => 'អាគារ 1', 'example_category' => 'Test Category', - 'example_location' => 'Building 2', + 'example_location' => 'អគារ 2', 'example_manufacturer' => 'Test Manufacturing Inc.', - 'example_model' => 'Test Model', - 'example_supplier' => 'Test Company Limited', + 'example_model' => 'គំរូសាកល្បង', + 'example_supplier' => 'ក្រុមហ៊ុន Test Limited', 'labels_per_page' => 'ស្លាក', 'support_fields' => 'Fields', 'support_asset_tag' => 'Tag', diff --git a/resources/lang/km-KH/general.php b/resources/lang/km-KH/general.php index fa9367f63b0a..bd83118f98d7 100644 --- a/resources/lang/km-KH/general.php +++ b/resources/lang/km-KH/general.php @@ -199,7 +199,7 @@ 'manufacturers' => 'ក្រុមហ៊ុនផលិត', 'markdown' => 'វាលនេះអនុញ្ញាតឱ្យ Github flavored markdown។', 'min_amt' => 'អប្បបរមា. QTY', - 'min_amt_help' => 'Minimum number of items that should be available before an alert gets triggered. Leave Min. QTY blank if you do not want to receive alerts for low inventory.', + 'min_amt_help' => 'ចំនួនអប្បបរមានៃធាតុដែលគួរតែមានមុនពេលការជូនដំណឹងត្រូវបានកេះ។ ទុក QTY អប្បបរមា នៅទទេ ប្រសិនបើអ្នកមិនចង់ទទួលបានការជូនដំណឹងសម្រាប់សារពើភ័ណ្ឌទាប។', 'model_no' => 'លេខ​ម៉ូដែល។', 'months' => 'ខែ', 'moreinfo' => 'ព័​ត៍​មាន​បន្ថែម', @@ -233,7 +233,7 @@ 'quantity_minimum' => 'អ្នកមានធាតុមួយខាងក្រោម ឬស្ទើរតែទាបជាងកម្រិតបរិមាណអប្បបរមា|អ្នកមាន៖ រាប់ធាតុខាងក្រោម ឬស្ទើរតែទាបជាងកម្រិតបរិមាណអប្បបរមា', 'quickscan_checkin' => 'ពិនិត្យស្កេនរហ័ស', 'quickscan_checkin_status' => 'Checkin Status', - 'ready_to_deploy' => 'Ready to Deploy', + 'ready_to_deploy' => 'រួចរាល់អាចប្រើប្រាស់', 'recent_activity' => 'សកម្មភាពថ្មីៗ', 'remaining' => 'នៅសល់', 'remove_company' => 'ដកសមាគមក្រុមហ៊ុនចេញ', @@ -303,16 +303,16 @@ 'username' => 'ឈ្មោះ​អ្នកប្រើប្រាស់', 'update' => 'ធ្វើបច្ចុប្បន្នភាព', 'upload_filetypes_help' => 'ប្រភេទឯកសារដែលបានអនុញ្ញាតគឺ png, gif, jpg, jpeg, doc, docx, pdf, xls, xlsx, txt, lic, xml, zip, rtf និង rar ។ ទំហំផ្ទុកឡើងអតិបរមាដែលអនុញ្ញាតគឺ៖ ទំហំ។', - 'uploaded' => 'Uploaded', + 'uploaded' => 'បានបង្ហោះ', 'user' => 'អ្នក​ប្រើ', - 'accepted' => 'accepted', - 'declined' => 'declined', - 'declined_note' => 'Declined Notes', + 'accepted' => 'យល់ព្រម', + 'declined' => 'បានបដិសេធ', + 'declined_note' => 'កំណត់ចំណាំដែលបដិសេធ', 'unassigned' => 'Unassigned', - 'unaccepted_asset_report' => 'Unaccepted Assets', - 'users' => 'Users', - 'viewall' => 'View All', - 'viewassets' => 'View Assigned Assets', + 'unaccepted_asset_report' => 'ទ្រព្យសម្បត្តិដែលមិនទាន់យល់ព្រម។', + 'users' => 'អ្នកប្រើប្រាស់ច្រើន', + 'viewall' => 'មើលទាំងអស់', + 'viewassets' => 'មើលទ្រព្យសកម្មដែលបានចាត់តាំង', 'viewassetsfor' => 'មើលទ្រព្យសម្បត្តិសម្រាប់៖ ឈ្មោះ', 'website' => 'វេបសាយ', 'welcome' => 'សូមស្វាគមន៍៖ ឈ្មោះ', @@ -361,63 +361,63 @@ 'due_to_checkin' => 'The following :count items are due to be checked in soon:', 'expected_checkin' => 'Expected Checkin', 'reminder_checked_out_items' => 'This is a reminder of the items currently checked out to you. If you feel this list is inaccurate (something is missing, or something appears here that you believe you never received), please email :reply_to_name at :reply_to_address.', - 'changed' => 'Changed', - 'to' => 'To', - 'report_fields_info' => '

Select the fields you would like to include in your custom report, and click Generate. The file (custom-asset-report-YYYY-mm-dd.csv) will download automatically, and you can open it in Excel.

-

If you would like to export only certain assets, use the options below to fine-tune your results.

', + 'changed' => 'បានផ្លាស់ប្តូរ', + 'to' => 'ទៅ', + 'report_fields_info' => '

ជ្រើសរើសវាលដែលអ្នកចង់បញ្ចូលក្នុងរបាយការណ៍ផ្ទាល់ខ្លួនរបស់អ្នក ហើយចុចបង្កើត។ ឯកសារ (custom-asset-report-YYYY-mm-dd.csv) នឹងទាញយកដោយស្វ័យប្រវត្តិ ហើយអ្នកអាចបើកវានៅក្នុង Excel។

+

ប្រសិនបើអ្នកចង់នាំចេញតែទ្រព្យសកម្មមួយចំនួន សូមប្រើជម្រើសខាងក្រោមដើម្បីកែសម្រួលលទ្ធផលរបស់អ្នក។

', 'range' => 'Range', 'bom_remark' => 'Add a BOM (byte-order mark) to this CSV', - 'improvements' => 'Improvements', - 'information' => 'Information', - 'permissions' => 'Permissions', - 'managed_ldap' => '(Managed via LDAP)', - 'export' => 'Export', - 'ldap_sync' => 'LDAP Sync', - 'ldap_user_sync' => 'LDAP User Sync', - 'synchronize' => 'Synchronize', - 'sync_results' => 'Synchronization Results', - 'license_serial' => 'Serial/Product Key', + 'improvements' => 'ការកែលម្អ', + 'information' => 'ព័ត៌មាន', + 'permissions' => 'ការអនុញ្ញាត', + 'managed_ldap' => '(គ្រប់គ្រងតាមរយៈ LDAP)', + 'export' => 'នាំចេញ', + 'ldap_sync' => 'LDAP សមកាលកម្ម', + 'ldap_user_sync' => 'សមកាលកម្មអ្នកប្រើប្រាស់ LDAP', + 'synchronize' => 'ធ្វើសមកាលកម្ម', + 'sync_results' => 'លទ្ធផលសមកាលកម្ម', + 'license_serial' => 'សៀរៀល/សោផលិតផល', 'invalid_category' => 'Invalid or missing category', 'invalid_item_category_single' => 'Invalid or missing :type category. Please update the category of this :type to include a valid category before checking out.', - 'dashboard_info' => 'This is your dashboard. There are many like it, but this one is yours.', - '60_percent_warning' => '60% Complete (warning)', - 'dashboard_empty' => 'It looks like you have not added anything yet, so we do not have anything awesome to display. Get started by adding some assets, accessories, consumables, or licenses now!', - 'new_asset' => 'New Asset', - 'new_license' => 'New License', - 'new_accessory' => 'New Accessory', - 'new_consumable' => 'New Consumable', + 'dashboard_info' => 'នេះគឺជាផ្ទាំងគ្រប់គ្រងរបស់អ្នក។ មានអ្នកចូលចិត្តច្រើន ប៉ុន្តែមួយនេះជារបស់អ្នក', + '60_percent_warning' => 'សម្រេចបាន 60% (ព្រមាន)', + 'dashboard_empty' => 'វាហាក់ដូចជាអ្នកមិនទាន់បានបន្ថែមអ្វីនៅឡើយទេ ដូច្នេះយើងមិនមានអ្វីដែលអស្ចារ្យដើម្បីបង្ហាញនោះទេ។ ចាប់ផ្តើមដោយបន្ថែមទ្រព្យសម្បត្តិ គ្រឿងបន្លាស់ សម្ភារៈប្រើប្រាស់ ឬអាជ្ញាប័ណ្ណមួយចំនួនឥឡូវនេះ!', + 'new_asset' => 'ទ្រព្យសកម្មថ្មី', + 'new_license' => 'អាជ្ញាប័ណ្ណថ្មី', + 'new_accessory' => 'គ្រឿងបន្លាស់ថ្មី', + 'new_consumable' => 'សម្ភារៈប្រើប្រាស់ថ្មី', 'collapse' => 'Collapse', - 'assigned' => 'Assigned', - 'asset_count' => 'Asset Count', + 'assigned' => 'បានចាត់តាំង', + 'asset_count' => 'ចំនួនទ្រព្យសកម្ម', 'accessories_count' => 'Accessories Count', 'consumables_count' => 'Consumables Count', 'components_count' => 'Components Count', 'licenses_count' => 'Licenses Count', 'notification_error' => 'កំហុស', - 'notification_error_hint' => 'Please check the form below for errors', - 'notification_bulk_error_hint' => 'The following fields had validation errors and were not edited:', + 'notification_error_hint' => 'សូមពិនិត្យមើលទម្រង់ខាងក្រោមសម្រាប់កំហុស', + 'notification_bulk_error_hint' => 'វាលខាងក្រោមមានកំហុសក្នុងការផ្ទៀងផ្ទាត់ ហើយមិនត្រូវបានកែសម្រួលទេ៖', 'notification_success' => 'ជោគជ័យ', 'notification_warning' => 'ព្រមាន', 'notification_info' => 'ព័ត៌មាន', - 'asset_information' => 'Asset Information', - 'model_name' => 'Model Name', + 'asset_information' => 'ព័ត៌មានទ្រព្យសកម្ម', + 'model_name' => 'ឈ្មោះម៉ូដែល', 'asset_name' => 'ឈ្មោះទ្រព្យសម្បត្តិ', 'consumable_information' => 'Consumable Information:', 'consumable_name' => 'ឈ្មោះ Consumable:', - 'accessory_information' => 'Accessory Information:', + 'accessory_information' => 'ព័ត៌មានអំពីគ្រឿងបន្លាស់', 'accessory_name' => 'ឈ្មោះគ្រឿងបន្លាស់៖', 'clone_item' => 'Clone Item', 'checkout_tooltip' => 'Check this item out', 'checkin_tooltip' => 'Check this item in so that it is available for re-issue, re-imaging, etc', 'checkout_user_tooltip' => 'Check this item out to a user', 'checkin_to_diff_location' => 'You can choose to check this asset in to a location other than this asset\'s default location of :default_location if one is set', - 'maintenance_mode' => 'The service is temporarily unavailable for system updates. Please check back later.', - 'maintenance_mode_title' => 'System Temporarily Unavailable', - 'ldap_import' => 'User password should not be managed by LDAP. (This allows you to send forgotten password requests.)', - 'purge_not_allowed' => 'Purging deleted data has been disabled in the .env file. Contact support or your systems administrator.', - 'backup_delete_not_allowed' => 'Deleting backups has been disabled in the .env file. Contact support or your systems administrator.', - 'additional_files' => 'Additional Files', - 'shitty_browser' => 'No signature detected. If you are using an older browser, please use a more modern browser to complete your asset acceptance.', + 'maintenance_mode' => 'សេវាកម្មនេះមិនមានជាបណ្តោះអាសន្នសម្រាប់ការអាប់ដេតប្រព័ន្ធទេ។ សូមពិនិត្យមើលឡើងវិញនៅពេលក្រោយ។', + 'maintenance_mode_title' => 'ប្រព័ន្ធមិនអាចប្រើបានជាបណ្តោះអាសន្ន', + 'ldap_import' => 'ពាក្យសម្ងាត់របស់អ្នកប្រើមិនគួរត្រូវបានគ្រប់គ្រងដោយ LDAP ទេ។ (វាអនុញ្ញាតឱ្យអ្នកផ្ញើសំណើសុំពាក្យសម្ងាត់ដែលភ្លេច។)', + 'purge_not_allowed' => 'ការលុបទិន្នន័យដែលបានលុបត្រូវបានបិទនៅក្នុងឯកសារ .env ។ ទាក់ទងផ្នែកជំនួយ ឬអ្នកគ្រប់គ្រងប្រព័ន្ធរបស់អ្នក។', + 'backup_delete_not_allowed' => 'ការលុបការបម្រុងទុកត្រូវបានបិទនៅក្នុងឯកសារ .env ។ ទាក់ទងផ្នែកជំនួយ ឬអ្នកគ្រប់គ្រងប្រព័ន្ធរបស់អ្នក។', + 'additional_files' => 'ឯកសារបន្ថែម', + 'shitty_browser' => 'រកមិនឃើញហត្ថលេខាទេ។ ប្រសិនបើអ្នកកំពុងប្រើកម្មវិធីរុករកចាស់ សូមប្រើកម្មវិធីរុករកតាមអ៊ីនធឺណិតទំនើបជាងមុន ដើម្បីបញ្ចប់ការទទួលយកទ្រព្យសកម្មរបស់អ្នក។', 'bulk_soft_delete' =>'Also soft-delete these users. Their asset history will remain intact unless/until you purge deleted records in the Admin Settings.', 'bulk_checkin_delete_success' => 'Your selected users have been deleted and their items have been checked in.', 'bulk_checkin_success' => 'The items for the selected users have been checked in.', @@ -431,21 +431,21 @@ 'unaccepted_profile_warning' => 'You have one item requiring acceptance. Click here to accept or decline it | You have :count items requiring acceptance. Click here to accept or decline them', 'start_date' => 'ថ្ងៃ​ចាប់ផ្តើម', 'end_date' => 'End Date', - 'alt_uploaded_image_thumbnail' => 'Uploaded thumbnail', + 'alt_uploaded_image_thumbnail' => 'រូបភាពតូចដែលបានបង្ហោះ', 'placeholder_kit' => 'Select a kit', - 'file_not_found' => 'File not found', - 'log_record_not_found' => 'No record for that log entry was found.', - 'preview_not_available' => '(no preview)', + 'file_not_found' => 'រកមិនឃើញឯកសារ', + 'log_record_not_found' => 'រក​មិន​ឃើញ​កំណត់ត្រា​សម្រាប់​ការ​ចូល​កំណត់​ហេតុ​នោះ​ទេ។', + 'preview_not_available' => '(គ្មានការមើលជាមុន)', 'setup' => 'Setup', 'pre_flight' => 'Pre-Flight', - 'skip_to_main_content' => 'Skip to main content', + 'skip_to_main_content' => 'រំលងទៅមាតិកាសំខាន់', 'toggle_navigation' => 'Toggle navigation', 'alerts' => 'ការជូនដំណឹង', - 'tasks_view_all' => 'View all tasks', - 'true' => 'True', - 'false' => 'False', - 'integration_option' => 'Integration Option', - 'log_does_not_exist' => 'No matching log record exists.', + 'tasks_view_all' => 'មើលកិច្ចការទាំងអស់។', + 'true' => 'ពិត', + 'false' => 'មិនពិត', + 'integration_option' => 'ជម្រើសនៃការរួមបញ្ចូល', + 'log_does_not_exist' => 'មិនមានកំណត់ត្រាដែលត្រូវគ្នាទេ។', 'merge_users' => 'Merge Users', 'merge_information' => 'This will merge the :count users into a single user. Select the user you wish to merge the others into below, and the associated assets, licenses, etc will be moved over to the selected user and the other users will be marked as deleted.', 'warning_merge_information' => 'This action CANNOT be undone and should ONLY be used when you need to merge users because of a bad import or sync. Be sure to run a backup first.', @@ -560,7 +560,7 @@ 'something_went_wrong' => 'Something went wrong with your request.', 'close' => 'Close', 'expires' => 'ផុតកំណត់', - 'map_fields'=> 'Map :item_type Fields', + 'map_fields'=> 'ផែនទី៖ item_type Fields', 'remaining_var' => ':count Remaining', 'label' => 'Label', 'import_asset_tag_exists' => 'An asset with the asset tag :asset_tag already exists and an update was not requested. No change was made.', diff --git a/resources/lang/ko-KR/admin/hardware/message.php b/resources/lang/ko-KR/admin/hardware/message.php index 4d98bdce6200..493b8c12f8e0 100644 --- a/resources/lang/ko-KR/admin/hardware/message.php +++ b/resources/lang/ko-KR/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => '자산이 존재하지 않습니다.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => '자산이 존재하지 않습니다.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => '이 자산은 현재 사용자에게 반출 중이어서 삭제 할 수 없습니다. 먼저 자산을 확인해 보고 다시 삭제를 시도해 주세요. ', + 'assoc_users' => '이 자산은 현재 사용자에게 반출 중이어서 삭제 할 수 없습니다. 먼저 자산을 확인해 보고 다시 삭제를 시도해 주세요. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => '자산이 생성되지 않았습니다. 다시 시도해 주세요. :(', diff --git a/resources/lang/ko-KR/mail.php b/resources/lang/ko-KR/mail.php index e21abd816738..7c9833e89f61 100644 --- a/resources/lang/ko-KR/mail.php +++ b/resources/lang/ko-KR/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => '다음 :threshold 일 내에 만료되는 라이선스가 :count 개 있습니다.|다음 :threshold 일 내에 만료되는 라이선스가 :count 개 있습니다.', 'link_to_update_password' => ':web 비밀번호를 수정하려면 다음 링크를 클릭하세요:', - 'login' => '로그인:', + 'login' => '로그인', 'login_first_admin' => '아래의 자격 증명을 사용하여 새 Snipe-IT 설치본에 로그인 하세요:', 'low_inventory_alert' => '최소 보유량보다 낮거나 소진될 수 있는 품목이 :count 개 있습니다.|최소 보유량보다 낮거나 소진될 수 있는 품목이 :count 개 있습니다.', 'min_QTY' => '최소 수량', diff --git a/resources/lang/lt-LT/admin/hardware/message.php b/resources/lang/lt-LT/admin/hardware/message.php index 023f616220d7..a396db810147 100644 --- a/resources/lang/lt-LT/admin/hardware/message.php +++ b/resources/lang/lt-LT/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Įspėjimas: Šis turtas pažymėtas kaip negalimas išduoti. Jei šio turto būsena pasikeitė, atnaujinkite būsenos žymą.', - 'does_not_exist' => 'Tokio turto nėra.', - 'does_not_exist_var'=> 'Turtas su numeriu :asset_tag nerastas.', - 'no_tag' => 'Nenurodytas inventorinis numeris.', + 'undeployable' => 'Įspėjimas: Šis turtas pažymėtas kaip negalimas išduoti. Jei šio turto būsena pasikeitė, atnaujinkite būsenos žymą.', + 'does_not_exist' => 'Tokio turto nėra.', + 'does_not_exist_var' => 'Turtas su numeriu :asset_tag nerastas.', + 'no_tag' => 'Nenurodytas inventorinis numeris.', 'does_not_exist_or_not_requestable' => 'Tokio turto nėra arba jo negalima užsakyti.', - 'assoc_users' => 'Šis turtas šiuo metu yra išduotas naudotojui ir negali būti panaikintas. Pirmiausia paimkite turtą ir tuomet vėl bandykite jį panaikinti. ', + 'assoc_users' => 'Šis turtas šiuo metu yra išduotas naudotojui ir negali būti panaikintas. Pirmiausia paimkite turtą ir tuomet vėl bandykite jį panaikinti. ', 'warning_audit_date_mismatch' => 'Šio turto kito audito data (:next_audit_date) yra ankstesnė už paskutinio audito datą (:last_audit_date). Atnaujinkite kito audito datą.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Turto sukurti nepavyko, bandykite dar kartą.', diff --git a/resources/lang/lt-LT/mail.php b/resources/lang/lt-LT/mail.php index 2e97bd088ac6..edc10bee818f 100644 --- a/resources/lang/lt-LT/mail.php +++ b/resources/lang/lt-LT/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Tai priminimas, kad šiuo metu jums yra išduoti :count daiktai, kurių nepriėmėte arba neatmetėte. Spustelėkite toliau pateiktą nuorodą, kad patvirtintumėte savo sprendimą.', 'license_expiring_alert' => 'Yra :count licencija, kuri baigiasi per kitas :threshold dienas.|Yra :count licencijos (-ų), kurios baigiasi per kitas :threshold dienas (-ų).', 'link_to_update_password' => 'Spustelėkite šią nuorodą, kad atnaujintumėte savo :web slaptažodį:', - 'login' => 'Prisijungti:', + 'login' => 'Prisijungti', 'login_first_admin' => 'Prisijunkite prie savo naujojo „Snipe-IT“ diegimo naudodami žemiau pateiktus prisijungimo duomenis:', 'low_inventory_alert' => 'Yra :count daiktas, kurio atsargos yra mažesnės (arba greitais bus mažesnės) nei numatytos minimalios atsargos.|Yra :count daiktai (-ų), kurių atsargos yra mažesnės (arba greitais bus mažesnės) nei numatytos minimalios atsargos.', 'min_QTY' => 'Mažiausias kiekis', diff --git a/resources/lang/lv-LV/admin/hardware/message.php b/resources/lang/lv-LV/admin/hardware/message.php index a9584b1a6cd2..db2558d81d71 100644 --- a/resources/lang/lv-LV/admin/hardware/message.php +++ b/resources/lang/lv-LV/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Aktīvs neeksistē.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Aktīvs neeksistē.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Šobrīd šis īpašums tiek pārbaudīts lietotājam un to nevar izdzēst. Vispirms pārbaudiet aktīvu, un pēc tam mēģiniet vēlreiz izdzēst.', + 'assoc_users' => 'Šobrīd šis īpašums tiek pārbaudīts lietotājam un to nevar izdzēst. Vispirms pārbaudiet aktīvu, un pēc tam mēģiniet vēlreiz izdzēst.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Iezīmes tika sekmīgi izveidotas.', + 'error_generating_labels' => 'Kļūda iezīmju veidošanas laikā.', + 'no_assets_selected' => 'Nav atlasīts neviens līdzeklis.', 'create' => [ 'error' => 'Īpašums netika izveidots, lūdzu, mēģiniet vēlreiz. :(', diff --git a/resources/lang/lv-LV/mail.php b/resources/lang/lv-LV/mail.php index 2d6eb377681a..0047fcfa1f30 100644 --- a/resources/lang/lv-LV/mail.php +++ b/resources/lang/lv-LV/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Pēc :threshold dienām beigsies termiņš :count licencei.| Pēc :threshold dienām beigsies termiņš :threshold :count licencēm.', 'link_to_update_password' => 'Lūdzu, noklikšķiniet uz šīs saites, lai atjauninātu savu: web paroli:', - 'login' => 'Pieslēgties:', + 'login' => 'Pieslēgties', 'login_first_admin' => 'Piesakieties savā jaunajā Snipe-IT instalācijā, izmantojot tālāk minētos akreditācijas datus.', 'low_inventory_alert' => ':count vienības skaits ir zemāks par krājuma minimumu vai drīz būs zems.|:count vienību skaits ir zemāks par krājuma minimumu vai drīz būs zems.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/mi-NZ/admin/hardware/message.php b/resources/lang/mi-NZ/admin/hardware/message.php index 3824d35b49c0..9ec198568b04 100644 --- a/resources/lang/mi-NZ/admin/hardware/message.php +++ b/resources/lang/mi-NZ/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Kaore he tahua.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Kaore he tahua.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Kei te tirohia tenei taonga i tetahi kaiwhakamahi me te kore e taea te muku. Tirohia koa te taonga i te tuatahi, a ka ngana ki te muku ano.', + 'assoc_users' => 'Kei te tirohia tenei taonga i tetahi kaiwhakamahi me te kore e taea te muku. Tirohia koa te taonga i te tuatahi, a ka ngana ki te muku ano.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Kaore i hangaia te tahua, tēnā whakamātau anō. :(', diff --git a/resources/lang/mi-NZ/mail.php b/resources/lang/mi-NZ/mail.php index 4bc21e4dcb14..12217064fd8b 100644 --- a/resources/lang/mi-NZ/mail.php +++ b/resources/lang/mi-NZ/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Koahia te hono e whai ake nei hei whakahou i to: kupuhipahipa:', - 'login' => 'Whakauru:', + 'login' => 'Whakauru', 'login_first_admin' => 'Whakauru ki to taahiranga hou Snipe-IT ma te whakamahi i nga taipitopito kei raro nei:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/mk-MK/admin/hardware/message.php b/resources/lang/mk-MK/admin/hardware/message.php index 14d6086593b2..07940e9a6ce7 100644 --- a/resources/lang/mk-MK/admin/hardware/message.php +++ b/resources/lang/mk-MK/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: Ова средство е обележано како моментално нераспоредливо. Ако овој статус е променет, ажурирајте го статусот на средството.', - 'does_not_exist' => 'Основното средство не постои.', - 'does_not_exist_var'=> 'Средство со ознака :asset_tag не е пронајдено.', - 'no_tag' => 'Не е обезбедена ознака за средството.', + 'undeployable' => 'Warning: Ова средство е обележано како моментално нераспоредливо. Ако овој статус е променет, ажурирајте го статусот на средството.', + 'does_not_exist' => 'Основното средство не постои.', + 'does_not_exist_var' => 'Средство со ознака :asset_tag не е пронајдено.', + 'no_tag' => 'Не е обезбедена ознака за средството.', 'does_not_exist_or_not_requestable' => 'Тоа средство не постои или не е побараливо.', - 'assoc_users' => 'Ова средство е задолжено на корисник и не може да се избрише. Проверете го, а потоа пробајте повторно да го избришете. ', + 'assoc_users' => 'Ова средство е задолжено на корисник и не може да се избрише. Проверете го, а потоа пробајте повторно да го избришете. ', 'warning_audit_date_mismatch' => 'Следниот датум на ревизија на ова средство (:next_audit_date) е пред последниот датум на ревизија (:last_audit_date). Ажурирајте го следниот датум на ревизија.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Основното средство не е креирано, обидете се повторно. :(', diff --git a/resources/lang/mk-MK/mail.php b/resources/lang/mk-MK/mail.php index 30b5a9109b58..3334dd5d489c 100644 --- a/resources/lang/mk-MK/mail.php +++ b/resources/lang/mk-MK/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Ова е потсетник дека во моментов го имате :count предмети кои не сте прифатиле или одбиле. Кликнете на врската подолу за да ја потврдите вашата одлука.', 'license_expiring_alert' => 'Има :count лиценца која истекува следните :threshold дена.|Има :count лиценци кои истекуваат следните :threshold дена.', 'link_to_update_password' => 'Ве молиме кликнете на следната врска за да ја обновите вашата :web лозинка:', - 'login' => 'Најава:', + 'login' => 'Најава', 'login_first_admin' => 'Влезете во новата инсталација на Snipe-IT користејќи ги ингеренциите подолу:', 'low_inventory_alert' => 'Има :count предмети кои се под инвентарн минимум или ќе бидат наскоро.|Има :count предмети кои се под инвентарн минимум или ќе бидат наскоро.', 'min_QTY' => 'Минимална количина', diff --git a/resources/lang/ml-IN/admin/hardware/message.php b/resources/lang/ml-IN/admin/hardware/message.php index df68f28395bd..222cbc439e6a 100644 --- a/resources/lang/ml-IN/admin/hardware/message.php +++ b/resources/lang/ml-IN/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/ml-IN/mail.php b/resources/lang/ml-IN/mail.php index 76c0c1773d28..7663a0167bb6 100644 --- a/resources/lang/ml-IN/mail.php +++ b/resources/lang/ml-IN/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/mn-MN/admin/hardware/message.php b/resources/lang/mn-MN/admin/hardware/message.php index 61cfbe985ddf..e4936ce188c8 100644 --- a/resources/lang/mn-MN/admin/hardware/message.php +++ b/resources/lang/mn-MN/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Хөрөнгө байхгүй байна.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Хөрөнгө байхгүй байна.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Энэ хөрөнгийг одоогоор хэрэглэгчид шалгаж, устгах боломжгүй байна. Эхлээд хөрөнгийг шалгаж үзээд дараа нь устга.', + 'assoc_users' => 'Энэ хөрөнгийг одоогоор хэрэглэгчид шалгаж, устгах боломжгүй байна. Эхлээд хөрөнгийг шалгаж үзээд дараа нь устга.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Акт үүсгээгүй байна, дахин оролдоно уу. :(', diff --git a/resources/lang/mn-MN/mail.php b/resources/lang/mn-MN/mail.php index 6614f69ea985..b190d4edd0ea 100644 --- a/resources/lang/mn-MN/mail.php +++ b/resources/lang/mn-MN/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => ':count ширхэг лизенц :threshhold өдрийн дотор дуусна.|:count ширхэг лизенц :threshhold өдрийн дотор дуусна.', 'link_to_update_password' => 'Вэбсайтаа шинэчлэхийн тулд дараах холбоос дээр дарна уу:', - 'login' => 'Нэвтрэх:', + 'login' => 'Нэвтрэх', 'login_first_admin' => 'Слайд-IT-г суулгахын тулд доорх итгэмжлэлүүдийг ашиглана уу:', 'low_inventory_alert' => ':count ширхэг барааны нөөц дуусаж байна.|:count ширхэг барааны нөөц дуусаж байна.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/ms-MY/admin/hardware/message.php b/resources/lang/ms-MY/admin/hardware/message.php index 5753834c77f5..7ed74a23f163 100644 --- a/resources/lang/ms-MY/admin/hardware/message.php +++ b/resources/lang/ms-MY/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Amaran: Harta ini sekarang ditanda sebagai tidak boleh agih. Jika statusnya telah berubah, sila kemaskini staus harta.', - 'does_not_exist' => 'Harta tidak wujud.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Amaran: Harta ini sekarang ditanda sebagai tidak boleh agih. Jika statusnya telah berubah, sila kemaskini staus harta.', + 'does_not_exist' => 'Harta tidak wujud.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Harta ini sekarang telah diagihkan kepada pengguna dan tidak boleh dihapuskan. Sila semak status harta ini dahulu, dan kemudian cuba semula. ', + 'assoc_users' => 'Harta ini sekarang telah diagihkan kepada pengguna dan tidak boleh dihapuskan. Sila semak status harta ini dahulu, dan kemudian cuba semula. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Harta gagal dicipta, sila cuba semula. :(', diff --git a/resources/lang/ms-MY/mail.php b/resources/lang/ms-MY/mail.php index 0f4f6a92593b..dcb72940b7ad 100644 --- a/resources/lang/ms-MY/mail.php +++ b/resources/lang/ms-MY/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Terdapat :count lesen yang akan tamat dalam tempoh :threshold hari.|Terdapat :count lesen yang akan tamat dalam tempoh :threshold hari.', 'link_to_update_password' => 'Sila klik pada pautan berikut untuk mengemas kini kata laluan web anda:', - 'login' => 'Log masuk:', + 'login' => 'Log masuk', 'login_first_admin' => 'Masuk ke pemasangan Snipe-IT baru anda menggunakan kelayakan di bawah ini:', 'low_inventory_alert' => 'Terdapat :count item yang berada di bawah inventori minimum atau akan menjadi rendah. Terdapat :count item yang berada di bawah inventori minimum atau akan menjadi rendah.', 'min_QTY' => 'QTY min', diff --git a/resources/lang/nb-NO/admin/hardware/message.php b/resources/lang/nb-NO/admin/hardware/message.php index 05276d498c3a..a51a80d807fc 100644 --- a/resources/lang/nb-NO/admin/hardware/message.php +++ b/resources/lang/nb-NO/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Advarsel: Denne eiendelen er merket som ikke utplasserbar. Vennligst endre status for eiendel dette har endret seg.', - 'does_not_exist' => 'Eiendel eksisterer ikke.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Advarsel: Denne eiendelen er merket som ikke utplasserbar. Vennligst endre status for eiendel dette har endret seg.', + 'does_not_exist' => 'Eiendel eksisterer ikke.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Eiendelen eksisterer ikke eller kan ikke forespørres.', - 'assoc_users' => 'Denne eiendelen er merket som utsjekket til en bruker og kan ikke slettes. Vennligst sjekk inn eiendelen først, og forsøk sletting på nytt. ', + 'assoc_users' => 'Denne eiendelen er merket som utsjekket til en bruker og kan ikke slettes. Vennligst sjekk inn eiendelen først, og forsøk sletting på nytt. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Eiendelen ble ikke opprettet, prøv igjen :(', diff --git a/resources/lang/nb-NO/mail.php b/resources/lang/nb-NO/mail.php index abddca823f89..f5c9532d6041 100644 --- a/resources/lang/nb-NO/mail.php +++ b/resources/lang/nb-NO/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => ':count lisens utløper de neste :threshold dagene.|:count lisenser utløper de neste :threshold dagene.', 'link_to_update_password' => 'Klikk på følgende link for å bekrefte din :web passord:', - 'login' => 'Logg inn:', + 'login' => 'Logg inn', 'login_first_admin' => 'Logg inn på din nye Snipe-IT-installasjon ved å bruke kontoen nedenfor:', 'low_inventory_alert' => ':count enhet er under minimumnivå for beholdning, eller vil snart nå dette nivået.|:count enheter er under minimumnivå for beholdning, eller vil snart nå dette nivået.', 'min_QTY' => 'Min. antall', diff --git a/resources/lang/nl-NL/admin/hardware/message.php b/resources/lang/nl-NL/admin/hardware/message.php index 499ec034b60f..2a61df041185 100644 --- a/resources/lang/nl-NL/admin/hardware/message.php +++ b/resources/lang/nl-NL/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Waarschuwing: Dit bestand is gemarkeerd als niet-uitgeefbaar. Als deze status is veranderd, update dan de asset status.', - 'does_not_exist' => 'Dit asset bestaat niet.', - 'does_not_exist_var'=> 'Asset met tag :asset_tag niet gevonden.', - 'no_tag' => 'Geen asset tag opgegeven.', + 'undeployable' => 'Waarschuwing: Dit bestand is gemarkeerd als niet-uitgeefbaar. Als deze status is veranderd, update dan de asset status.', + 'does_not_exist' => 'Dit asset bestaat niet.', + 'does_not_exist_var' => 'Asset met tag :asset_tag niet gevonden.', + 'no_tag' => 'Geen asset tag opgegeven.', 'does_not_exist_or_not_requestable' => 'Die asset bestaat niet of is niet aanvraagbaar.', - 'assoc_users' => 'Dit asset is momenteel toegewezen aan een gebruiker en kan niet worden verwijderd. Controleer het asset eerst en probeer het opnieuw. ', + 'assoc_users' => 'Dit asset is momenteel toegewezen aan een gebruiker en kan niet worden verwijderd. Controleer het asset eerst en probeer het opnieuw. ', 'warning_audit_date_mismatch' => 'De volgende auditdatum van dit asset (:next_audit_date) ligt vóór de laatste auditdatum (:last_audit_date). Gelieve de volgende auditdatum bij te werken.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset is niet aangemaakt, probeer het opnieuw :(', diff --git a/resources/lang/nl-NL/mail.php b/resources/lang/nl-NL/mail.php index 51e3cf0de508..0e63b0497855 100644 --- a/resources/lang/nl-NL/mail.php +++ b/resources/lang/nl-NL/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Dit is een herinnering dat je op dit moment :count items uitgecheckt hebt die je niet hebt geaccepteerd of geweigerd. Klik op de onderstaande link om uw besluit te bevestigen.', 'license_expiring_alert' => 'Er is :count licentie die afloopt in de volgende :threshold dagen.|Er zijn :count licenties die vervallen in de volgende :threshold dagen.', 'link_to_update_password' => 'Klik op de volgende link om je :web wachtwoord te vernieuwen:', - 'login' => 'Login:', + 'login' => 'Inloggen', 'login_first_admin' => 'Meld u aan op uw nieuwe Snipe-IT installatie met onderstaande inloggegevens:', 'low_inventory_alert' => 'Er is :count item dat onder de minimumvoorraad ligt of binnenkort laag zal zijn.|Er zijn :count items die onder de minimumvoorraad zijn of binnenkort laag zullen zijn.', 'min_QTY' => 'Minimale hoeveelheid', diff --git a/resources/lang/nn-NO/admin/hardware/message.php b/resources/lang/nn-NO/admin/hardware/message.php index 05276d498c3a..a51a80d807fc 100644 --- a/resources/lang/nn-NO/admin/hardware/message.php +++ b/resources/lang/nn-NO/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Advarsel: Denne eiendelen er merket som ikke utplasserbar. Vennligst endre status for eiendel dette har endret seg.', - 'does_not_exist' => 'Eiendel eksisterer ikke.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Advarsel: Denne eiendelen er merket som ikke utplasserbar. Vennligst endre status for eiendel dette har endret seg.', + 'does_not_exist' => 'Eiendel eksisterer ikke.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Eiendelen eksisterer ikke eller kan ikke forespørres.', - 'assoc_users' => 'Denne eiendelen er merket som utsjekket til en bruker og kan ikke slettes. Vennligst sjekk inn eiendelen først, og forsøk sletting på nytt. ', + 'assoc_users' => 'Denne eiendelen er merket som utsjekket til en bruker og kan ikke slettes. Vennligst sjekk inn eiendelen først, og forsøk sletting på nytt. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Eiendelen ble ikke opprettet, prøv igjen :(', diff --git a/resources/lang/nn-NO/mail.php b/resources/lang/nn-NO/mail.php index abddca823f89..f5c9532d6041 100644 --- a/resources/lang/nn-NO/mail.php +++ b/resources/lang/nn-NO/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => ':count lisens utløper de neste :threshold dagene.|:count lisenser utløper de neste :threshold dagene.', 'link_to_update_password' => 'Klikk på følgende link for å bekrefte din :web passord:', - 'login' => 'Logg inn:', + 'login' => 'Logg inn', 'login_first_admin' => 'Logg inn på din nye Snipe-IT-installasjon ved å bruke kontoen nedenfor:', 'low_inventory_alert' => ':count enhet er under minimumnivå for beholdning, eller vil snart nå dette nivået.|:count enheter er under minimumnivå for beholdning, eller vil snart nå dette nivået.', 'min_QTY' => 'Min. antall', diff --git a/resources/lang/no-NO/admin/hardware/message.php b/resources/lang/no-NO/admin/hardware/message.php index 05276d498c3a..a51a80d807fc 100644 --- a/resources/lang/no-NO/admin/hardware/message.php +++ b/resources/lang/no-NO/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Advarsel: Denne eiendelen er merket som ikke utplasserbar. Vennligst endre status for eiendel dette har endret seg.', - 'does_not_exist' => 'Eiendel eksisterer ikke.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Advarsel: Denne eiendelen er merket som ikke utplasserbar. Vennligst endre status for eiendel dette har endret seg.', + 'does_not_exist' => 'Eiendel eksisterer ikke.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Eiendelen eksisterer ikke eller kan ikke forespørres.', - 'assoc_users' => 'Denne eiendelen er merket som utsjekket til en bruker og kan ikke slettes. Vennligst sjekk inn eiendelen først, og forsøk sletting på nytt. ', + 'assoc_users' => 'Denne eiendelen er merket som utsjekket til en bruker og kan ikke slettes. Vennligst sjekk inn eiendelen først, og forsøk sletting på nytt. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Eiendelen ble ikke opprettet, prøv igjen :(', diff --git a/resources/lang/no-NO/mail.php b/resources/lang/no-NO/mail.php index abddca823f89..f5c9532d6041 100644 --- a/resources/lang/no-NO/mail.php +++ b/resources/lang/no-NO/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => ':count lisens utløper de neste :threshold dagene.|:count lisenser utløper de neste :threshold dagene.', 'link_to_update_password' => 'Klikk på følgende link for å bekrefte din :web passord:', - 'login' => 'Logg inn:', + 'login' => 'Logg inn', 'login_first_admin' => 'Logg inn på din nye Snipe-IT-installasjon ved å bruke kontoen nedenfor:', 'low_inventory_alert' => ':count enhet er under minimumnivå for beholdning, eller vil snart nå dette nivået.|:count enheter er under minimumnivå for beholdning, eller vil snart nå dette nivået.', 'min_QTY' => 'Min. antall', diff --git a/resources/lang/pl-PL/admin/hardware/message.php b/resources/lang/pl-PL/admin/hardware/message.php index 049bdcdbdfaf..e3b7be61cc0c 100644 --- a/resources/lang/pl-PL/admin/hardware/message.php +++ b/resources/lang/pl-PL/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Uwaga: Ten nabytek został oznaczony jako obecnie nie przypisany. Jeśli jego status uległ zmianie proszę zaktualizować status nabytku.', - 'does_not_exist' => 'Nabytek/zasób nie istnieje.', - 'does_not_exist_var'=> 'Nie znaleziono zasobu o tagu :asset_tag.', - 'no_tag' => 'Nie podano tagu zasobu.', + 'undeployable' => 'Uwaga: Ten nabytek został oznaczony jako obecnie nie przypisany. Jeśli jego status uległ zmianie proszę zaktualizować status nabytku.', + 'does_not_exist' => 'Nabytek/zasób nie istnieje.', + 'does_not_exist_var' => 'Nie znaleziono zasobu o tagu :asset_tag.', + 'no_tag' => 'Nie podano tagu zasobu.', 'does_not_exist_or_not_requestable' => 'Aktywo nie istnieje albo nie można go zażądać.', - 'assoc_users' => 'Ten nabytek/zasób jest przypisany do użytkownika i nie może być usunięty. Proszę sprawdzić przypisanie nabytków/zasobów a następnie spróbować ponownie.', + 'assoc_users' => 'Ten nabytek/zasób jest przypisany do użytkownika i nie może być usunięty. Proszę sprawdzić przypisanie nabytków/zasobów a następnie spróbować ponownie.', 'warning_audit_date_mismatch' => 'Data następnego audytu (:next_audit_date) jest przed datą poprzedniego audytu (:last_audit_date). Zaktualizuj datę następnego audytu.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Nabytek nie został utworzony, proszę spróbować ponownie. :(', diff --git a/resources/lang/pl-PL/general.php b/resources/lang/pl-PL/general.php index e36b201256e2..2c53f7ad996d 100644 --- a/resources/lang/pl-PL/general.php +++ b/resources/lang/pl-PL/general.php @@ -280,7 +280,7 @@ 'site_name' => 'Nazwa Witryny', 'state' => 'Województwo', 'status_labels' => 'Etykiety Statusu', - 'status_label' => 'Status Label', + 'status_label' => 'Status etykiety', 'status' => 'Status', 'accept_eula' => 'Umowa akceptacyjna', 'show_or_hide_eulas' => 'Show/Hide EULAs', @@ -307,7 +307,7 @@ 'user' => 'Użytkownik', 'accepted' => 'zatwierdzone', 'declined' => 'odrzucony', - 'declined_note' => 'Declined Notes', + 'declined_note' => 'Odrzucone notatki', 'unassigned' => 'Nieprzypisane', 'unaccepted_asset_report' => 'Aktywa niezatwierdzone', 'users' => 'Użytkownicy', @@ -342,15 +342,15 @@ 'view_all' => 'pokaż wszystko', 'hide_deleted' => 'Ukryj usunięte', 'email' => 'Adres e-mail', - 'do_not_change' => 'Do not change', - 'bug_report' => 'Report a bug', + 'do_not_change' => 'Nie zmieniaj', + 'bug_report' => 'Zgłoś błąd', 'user_manual' => 'Podręcznik użytkownika', 'setup_step_1' => 'Krok 1', 'setup_step_2' => 'Krok 2', 'setup_step_3' => 'Krok 3', 'setup_step_4' => 'Krok 4', 'setup_config_check' => 'Sprawdzanie konfiguracji', - 'setup_create_database' => 'Create database tables', + 'setup_create_database' => 'Utwórz tabelę w bazie danych', 'setup_create_admin' => 'Create an admin user', 'setup_done' => 'Zakończono!', 'bulk_edit_about_to' => 'Zamierzasz edytować: ', @@ -563,7 +563,7 @@ 'map_fields'=> 'Map :item_type Fields', 'remaining_var' => ':count Remaining', 'label' => 'Label', - 'import_asset_tag_exists' => 'An asset with the asset tag :asset_tag already exists and an update was not requested. No change was made.', - 'countries_manually_entered_help' => 'Values with an asterisk (*) were manually entered and do not match existing ISO 3166 dropdown values', + 'import_asset_tag_exists' => 'Zasób z tagiem aktywów :asset_tag już istnieje i nie zażądano aktualizacji. Nie dokonano żadnych zmian.', + 'countries_manually_entered_help' => 'Wartości z gwiazdką (*) zostały wprowadzone ręcznie i nie odpowiadają istniejącym wartościom rozwijanym ISO 3166', ]; diff --git a/resources/lang/pl-PL/mail.php b/resources/lang/pl-PL/mail.php index d6e8cc0593b1..a346b6bf87a1 100644 --- a/resources/lang/pl-PL/mail.php +++ b/resources/lang/pl-PL/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Istnieje: liczba licencja wygasająca w ciągu następnych: dni progowe. | Istnieje: liczba licencji wygasających w ciągu następnych: dni progowe.', 'link_to_update_password' => 'Proszę kliknąć na poniższy link, aby zaktualizować swoje hasło na :web:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Zaloguj się do aplikacji Snipe-IT przy użyciu poniższych poświadczeń:', 'low_inventory_alert' => 'Istnieje: liczba przedmiot, który jest poniżej minimalnej ilości zapasów lub wkrótce ta wartość będzie niska. | Istnieją: policz przedmioty, które są poniżej minimalnej ilości zapasów lub wkrótce te wartości będą niskie.', 'min_QTY' => 'Min. ilość', @@ -93,5 +93,5 @@ 'welcome_to' => 'Witamy na :web!', 'your_assets' => 'Zobacz swój sprzęt', 'your_credentials' => 'Twoje poświadczenia :web', - 'mail_sent' => 'Mail sent successfully!', + 'mail_sent' => 'Wiadomość wysłana pomyślnie!', ]; diff --git a/resources/lang/pl-PL/validation.php b/resources/lang/pl-PL/validation.php index 3c0098a95d77..a4aea0c47e3a 100644 --- a/resources/lang/pl-PL/validation.php +++ b/resources/lang/pl-PL/validation.php @@ -75,9 +75,9 @@ 'in_array' => 'The :attribute field must exist in :other.', 'integer' => 'The :attribute field must be an integer.', 'ip' => 'The :attribute field must be a valid IP address.', - 'ipv4' => 'The :attribute field must be a valid IPv4 address.', + 'ipv4' => 'Atrybut: musi być prawidłowym adresem IPv4.', 'ipv6' => 'The :attribute field must be a valid IPv6 address.', - 'json' => 'The :attribute field must be a valid JSON string.', + 'json' => 'Atrybut: musi być prawidłowym ciągiem JSON.', 'list' => 'The :attribute field must be a list.', 'lowercase' => 'The :attribute field must be lowercase.', 'lt' => [ diff --git a/resources/lang/pt-BR/admin/hardware/message.php b/resources/lang/pt-BR/admin/hardware/message.php index 035ac3044b1e..a7f3b1045e19 100644 --- a/resources/lang/pt-BR/admin/hardware/message.php +++ b/resources/lang/pt-BR/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Aviso: Este ativo foi marcado como atualmente não implementável. Se esta situação mudou, por favor, atualize a situação do ativo.', - 'does_not_exist' => 'O ativo não existe.', - 'does_not_exist_var'=> 'Ativo com a etiqueta :asset_tag não encontrado.', - 'no_tag' => 'Nenhuma etiqueta de ativo fornecida.', + 'undeployable' => 'Aviso: Este ativo foi marcado como atualmente não implementável. Se esta situação mudou, por favor, atualize a situação do ativo.', + 'does_not_exist' => 'O ativo não existe.', + 'does_not_exist_var' => 'Ativo com a etiqueta :asset_tag não encontrado.', + 'no_tag' => 'Nenhuma etiqueta de ativo fornecida.', 'does_not_exist_or_not_requestable' => 'Esse ativo não existe ou não pode ser solicitado.', - 'assoc_users' => 'Este ativo está no momento associado com pelo menos um usuário e não pode ser deletado. Por favor, atualize seu ativo para que não referencie mais este usuário e tente novamente. ', + 'assoc_users' => 'Este ativo está no momento associado com pelo menos um usuário e não pode ser deletado. Por favor, atualize seu ativo para que não referencie mais este usuário e tente novamente. ', 'warning_audit_date_mismatch' => 'A próxima data de auditoria deste ativo (:next_audit_date) é anterior à última data de auditoria (:last_audit_date). Por favor, atualize a próxima data de auditoria.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'O ativo não foi criado, tente novamente. :(', diff --git a/resources/lang/pt-BR/mail.php b/resources/lang/pt-BR/mail.php index 7883b5deeeff..d6f966ae021f 100644 --- a/resources/lang/pt-BR/mail.php +++ b/resources/lang/pt-BR/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Este é um lembrete que você tem atualmente :count itens check-out para você que você não aceitou ou recusou. Por favor, clique no link abaixo para confirmar sua decisão.', 'license_expiring_alert' => 'Há uma :count licença expirando nos próximos :threshold dias. | Existem :count licenças expirand nos próximos :threshold dias.', 'link_to_update_password' => 'Por favor clique no link abaixo para atualizar a sua senha do :web:', - 'login' => 'Login:', + 'login' => 'Entrar', 'login_first_admin' => 'Faça login na sua instalação do Snipe-IT usando os dados abaixo:', 'low_inventory_alert' => 'Há um :count que está abaixo do estoque mínimo ou em breve estará abaixo. | Existem :count items que estão abaixo do estoque mínimo ou em breve estarão baixos.', 'min_QTY' => 'Qtde. Min', diff --git a/resources/lang/pt-PT/admin/hardware/message.php b/resources/lang/pt-PT/admin/hardware/message.php index 28c70a34a8a2..be337a425401 100644 --- a/resources/lang/pt-PT/admin/hardware/message.php +++ b/resources/lang/pt-PT/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Aviso: Este artigo foi assinalado como "não implementável". Se este estado mudou, por favor atualize o estado do artigo.', - 'does_not_exist' => 'Artigo não existente.', - 'does_not_exist_var'=> 'Ativo com a tag :asset_tag não encontrado.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Aviso: Este artigo foi assinalado como "não implementável". Se este estado mudou, por favor atualize o estado do artigo.', + 'does_not_exist' => 'Artigo não existente.', + 'does_not_exist_var' => 'Ativo com a tag :asset_tag não encontrado.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Esse artigo não existe ou não é solicitável.', - 'assoc_users' => 'Este artigo está correntemente alocado a um utilizador e não pode ser removido. Por favor devolva o artigo e de seguida tente remover novamente. ', + 'assoc_users' => 'Este artigo está correntemente alocado a um utilizador e não pode ser removido. Por favor devolva o artigo e de seguida tente remover novamente. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Não foi possível criar o Artigo. Por favor, tente novamente. :(', diff --git a/resources/lang/pt-PT/mail.php b/resources/lang/pt-PT/mail.php index fed4fdd6ddf0..7cec6c810087 100644 --- a/resources/lang/pt-PT/mail.php +++ b/resources/lang/pt-PT/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Há :count licença a expirar nos próximos :threshold dias. Existem :count licenças que irão expirar nos próximos :threshold dias.', 'link_to_update_password' => 'Por favor clique no link abaixo para actualizar a sua senha do :web:', - 'login' => 'Login:', + 'login' => 'Nome de registo', 'login_first_admin' => 'Faça login na sua instalação do Snipe-IT usando os dados abaixo:', 'low_inventory_alert' => 'Há :count que está abaixo do estoque mínimo ou em breve estará baixo. Existem :count itens que estão abaixo do estoque mínimo ou em breve estarão baixos.', 'min_QTY' => 'Qt. Min.', diff --git a/resources/lang/ro-RO/admin/hardware/message.php b/resources/lang/ro-RO/admin/hardware/message.php index 6dd081517f3e..457b56462a18 100644 --- a/resources/lang/ro-RO/admin/hardware/message.php +++ b/resources/lang/ro-RO/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Activul nu exista.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Activul nu exista.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Acest activ nu există sau nu poate fi solicitat.', - 'assoc_users' => 'Acest activ este predat catre un utilizator si nu se poate sterge. Va rugam verificati activul, dupa care incercati sa-l stergeti iar. ', + 'assoc_users' => 'Acest activ este predat catre un utilizator si nu se poate sterge. Va rugam verificati activul, dupa care incercati sa-l stergeti iar. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Activul nu a fost creat, va rugam incercati iar. :(', diff --git a/resources/lang/ro-RO/mail.php b/resources/lang/ro-RO/mail.php index bf7da216687b..561d7775276c 100644 --- a/resources/lang/ro-RO/mail.php +++ b/resources/lang/ro-RO/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Există :count licență care expiră în următoarele :prag zile. Există :count licențe care expiră în următoarele :threshold zile.', 'link_to_update_password' => 'Faceți clic pe următorul link pentru a vă actualiza parola web:', - 'login' => 'Logare:', + 'login' => 'Logare', 'login_first_admin' => 'Conectați-vă la noua dvs. instalare Snipe-IT utilizând următoarele acreditări:', 'low_inventory_alert' => 'Există :count articol care este sub nivelul minim de inventar sau care va fi în curând scăzut. Există :count articole care sunt sub nivelul minim de inventar sau care vor fi în curând scăzute.', 'min_QTY' => 'Cantitate min', diff --git a/resources/lang/ru-RU/admin/hardware/message.php b/resources/lang/ru-RU/admin/hardware/message.php index 67523fa9ad91..13331878ec57 100644 --- a/resources/lang/ru-RU/admin/hardware/message.php +++ b/resources/lang/ru-RU/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Внимание: Этот актив в настоящее время помечен как не подлежащий установке. Если этот статус изменился, пожалуйста обновите статус актива.', - 'does_not_exist' => 'Актив не существует.', - 'does_not_exist_var'=> 'Актив с тегом :asset_tag не найден.', - 'no_tag' => 'Тег актива не предоставлен.', + 'undeployable' => 'Внимание: Этот актив в настоящее время помечен как не подлежащий установке. Если этот статус изменился, пожалуйста обновите статус актива.', + 'does_not_exist' => 'Актив не существует.', + 'does_not_exist_var' => 'Актив с тегом :asset_tag не найден.', + 'no_tag' => 'Тег актива не предоставлен.', 'does_not_exist_or_not_requestable' => 'Этот актив не существует или не подлежит запросу.', - 'assoc_users' => 'Этот актив в настоящее время привязан к пользователю и не может быть удален. Пожалуйста сначала снимите привязку, и затем попробуйте удалить снова. ', + 'assoc_users' => 'Этот актив в настоящее время привязан к пользователю и не может быть удален. Пожалуйста сначала снимите привязку, и затем попробуйте удалить снова. ', 'warning_audit_date_mismatch' => 'Дата следующего аудита этого актива (:next_audit_date) не может быть раньше последней даты аудита (:last_audit_date). Пожалуйста, обновите следующую дату аудита.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Актив не был создан, пожалуйста попробуйте снова. :(', diff --git a/resources/lang/ru-RU/mail.php b/resources/lang/ru-RU/mail.php index 7031794f57f5..9d1bf709b53d 100644 --- a/resources/lang/ru-RU/mail.php +++ b/resources/lang/ru-RU/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Напоминание о том, что в настоящее время у вас есть :count предметов, выданных вам, которые вы не приняли. Пожалуйста, нажмите на ссылку ниже, чтобы принять решение.', 'license_expiring_alert' => 'Имеется :count лицензия, срок которой истечет в следующ(ие/ий) :threshold дней/день.|Имеются :count лицензии, срок которых истечет в следующ(ие/ий) :threshold дней/день.', 'link_to_update_password' => 'Пожалуйста, перейдите по ссылке, чтобы обновить ваш :web пароль:', - 'login' => 'Логин:', + 'login' => 'Логин', 'login_first_admin' => 'Чтобы войти в Snipe-It используйте следующие логин и пароль:', 'low_inventory_alert' => 'Осталась :count штука, что или уже ниже минимального запаса, или скоро будет ниже.|Осталось :count штук, что или уже ниже минимального запаса, или скоро будет ниже.', 'min_QTY' => 'Мин Кол-во', diff --git a/resources/lang/si-LK/admin/hardware/message.php b/resources/lang/si-LK/admin/hardware/message.php index df68f28395bd..222cbc439e6a 100644 --- a/resources/lang/si-LK/admin/hardware/message.php +++ b/resources/lang/si-LK/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/si-LK/mail.php b/resources/lang/si-LK/mail.php index 78d33acaa57f..d76e548fc193 100644 --- a/resources/lang/si-LK/mail.php +++ b/resources/lang/si-LK/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/sk-SK/admin/hardware/message.php b/resources/lang/sk-SK/admin/hardware/message.php index 0b31ea17ae75..ea6913c6168a 100644 --- a/resources/lang/sk-SK/admin/hardware/message.php +++ b/resources/lang/sk-SK/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Majetok neexistuje.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Majetok neexistuje.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Tento majetok je práve priradený používateľovi, preto nemôže byť odstránený. Prosim najprv odoberte majetok používateľovi, následne skúste znovu. ', + 'assoc_users' => 'Tento majetok je práve priradený používateľovi, preto nemôže byť odstránený. Prosim najprv odoberte majetok používateľovi, následne skúste znovu. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Majetok nebol vytvorený, prosím skúste znovu. :(', diff --git a/resources/lang/sk-SK/mail.php b/resources/lang/sk-SK/mail.php index 7eff7da47175..b54c54511df9 100644 --- a/resources/lang/sk-SK/mail.php +++ b/resources/lang/sk-SK/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Prihlásenie:', + 'login' => 'Prihlásenie', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/sl-SI/admin/hardware/message.php b/resources/lang/sl-SI/admin/hardware/message.php index 04db90851fd2..32f1927d0298 100644 --- a/resources/lang/sl-SI/admin/hardware/message.php +++ b/resources/lang/sl-SI/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Opozorilo: To sredstvo je bilo označeno kot trenutno nerazdeljeno. Če se je ta status spremenil, posodobite status sredstva.', - 'does_not_exist' => 'Sredstvo ne obstaja.', - 'does_not_exist_var'=> 'Sredstvo z oznako :oznaka_sredstva ni bilo najdeno.', - 'no_tag' => 'Oznaka sredstva ni podana.', + 'undeployable' => 'Opozorilo: To sredstvo je bilo označeno kot trenutno nerazdeljeno. Če se je ta status spremenil, posodobite status sredstva.', + 'does_not_exist' => 'Sredstvo ne obstaja.', + 'does_not_exist_var' => 'Sredstvo z oznako :oznaka_sredstva ni bilo najdeno.', + 'no_tag' => 'Oznaka sredstva ni podana.', 'does_not_exist_or_not_requestable' => 'To sredstvo ne obstaja ali ga ni mogoče zahtevati.', - 'assoc_users' => 'To sredstvo je trenutno izdano uporabniku in ga ni mogoče izbrisati. Najprej preverite sredstvo in poskusite znova izbrisati. ', + 'assoc_users' => 'To sredstvo je trenutno izdano uporabniku in ga ni mogoče izbrisati. Najprej preverite sredstvo in poskusite znova izbrisati. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Sredstvo ni bilo ustvarjeno, poskusite znova. :(', diff --git a/resources/lang/sl-SI/mail.php b/resources/lang/sl-SI/mail.php index 4d1f35984449..7f9e19d38692 100644 --- a/resources/lang/sl-SI/mail.php +++ b/resources/lang/sl-SI/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Prosimo, kliknite na to povezavo, da posodobite svoje: spletno geslo:', - 'login' => 'Prijava:', + 'login' => 'Prijava', 'login_first_admin' => 'Prijavite se v svojo novo namestitev Snipe-IT s spodnjimi poverilnicami:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min kol', diff --git a/resources/lang/so-SO/admin/hardware/message.php b/resources/lang/so-SO/admin/hardware/message.php index f79a72454ef8..dfc6084bc0c8 100644 --- a/resources/lang/so-SO/admin/hardware/message.php +++ b/resources/lang/so-SO/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Hantidu ma jirto.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Hantidu ma jirto.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Hantidaas ma jirto ama lama codsan karo.', - 'assoc_users' => 'Hantidan hadda waa la hubiyay isticmaale lamana tirtiri karo Fadlan marka hore hubi hantida, ka dibna isku day mar kale in aad tirtirto. ', + 'assoc_users' => 'Hantidan hadda waa la hubiyay isticmaale lamana tirtiri karo Fadlan marka hore hubi hantida, ka dibna isku day mar kale in aad tirtirto. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Hantida lama abuurin, fadlan isku day mar kale. :(', diff --git a/resources/lang/so-SO/mail.php b/resources/lang/so-SO/mail.php index b7b353a363d8..af5d3cdf348a 100644 --- a/resources/lang/so-SO/mail.php +++ b/resources/lang/so-SO/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Fadlan dhagsii xidhiidhka soo socda si aad u cusboonaysiiso :web eraygaaga sirta ah:', - 'login' => 'Soo gal:', + 'login' => 'Soo gal', 'login_first_admin' => 'Soo gal rakibaaddaada cusub ee Snipe-IT adoo isticmaalaya aqoonsiga hoose:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/sq-AL/admin/hardware/message.php b/resources/lang/sq-AL/admin/hardware/message.php index df68f28395bd..222cbc439e6a 100644 --- a/resources/lang/sq-AL/admin/hardware/message.php +++ b/resources/lang/sq-AL/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/sq-AL/mail.php b/resources/lang/sq-AL/mail.php index 76c0c1773d28..7663a0167bb6 100644 --- a/resources/lang/sq-AL/mail.php +++ b/resources/lang/sq-AL/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/sr-CS/admin/hardware/message.php b/resources/lang/sr-CS/admin/hardware/message.php index 137524b316a7..5df7f355f933 100644 --- a/resources/lang/sr-CS/admin/hardware/message.php +++ b/resources/lang/sr-CS/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Upozorenje: Ova imovina je trenutno označena kao nezaduživa. Ukoliko je status drugačiji, molim vas ažurirajte status imovine.', - 'does_not_exist' => 'Imovina ne postoji.', - 'does_not_exist_var'=> 'Nije pronađena imovina za oznakom :asset_tag.', - 'no_tag' => 'Nije navedena oznaka imovine.', + 'undeployable' => 'Upozorenje: Ova imovina je trenutno označena kao nezaduživa. Ukoliko je status drugačiji, molim vas ažurirajte status imovine.', + 'does_not_exist' => 'Imovina ne postoji.', + 'does_not_exist_var' => 'Nije pronađena imovina za oznakom :asset_tag.', + 'no_tag' => 'Nije navedena oznaka imovine.', 'does_not_exist_or_not_requestable' => 'Imovina ne postoji ili se ne može zatražiti.', - 'assoc_users' => 'Ovaj je resurs trenutno poveren korisniku i ne može se izbrisati. Najprije proverite resurs, a zatim ponovo pokušajte brisanje. ', + 'assoc_users' => 'Ovaj je resurs trenutno poveren korisniku i ne može se izbrisati. Najprije proverite resurs, a zatim ponovo pokušajte brisanje. ', 'warning_audit_date_mismatch' => 'Naredni datum popisa ove imovine (:next_audit_date) je pre poslednjeg datuma popisa (:last_audit_date). Molim vas izmenite datum narednog popisa.', + 'labels_generated' => 'Oznake su uspešno generisane.', + 'error_generating_labels' => 'Greška prilikom generisanja oznaka.', + 'no_assets_selected' => 'Nijedna imovina nije izabrana.', 'create' => [ 'error' => 'Imovina, resurs nije kreiran, pokušajte ponovo. :(', diff --git a/resources/lang/sr-CS/mail.php b/resources/lang/sr-CS/mail.php index 1cb8c8610bdf..07269ad12fdc 100644 --- a/resources/lang/sr-CS/mail.php +++ b/resources/lang/sr-CS/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Ovo je podsetnik da trenutno imate :count stavki koje su zadužene vama koje niste prihvatili ili odbili. Molim vas kliknite na vezu ispod da bi ste potvrdili vašu odluku.', 'license_expiring_alert' => 'Postoji :count licenci koja/e ističe u narednih treshold dana.|Postoje :count licencei koje ističu u narednih :treshold dana.', 'link_to_update_password' => 'Kliknite na sledeću vezu kako biste obnovili svoju :web lozinku:', - 'login' => 'Login:', + 'login' => 'Prijava', 'login_first_admin' => 'Prijavite se u vašu novu Snipe-IT instalaciju koristeći kredencijale ispod:', 'low_inventory_alert' => 'Postoji :count artikla ispod minimalne zalihe ili će uskoro biti nizak. |Postoje :count artikla koji su ispod minimalne zalihe ili će uskoro biti.', 'min_QTY' => 'Min Kol', diff --git a/resources/lang/sv-SE/account/general.php b/resources/lang/sv-SE/account/general.php index 221b8205e2ab..07b188bd7982 100644 --- a/resources/lang/sv-SE/account/general.php +++ b/resources/lang/sv-SE/account/general.php @@ -2,16 +2,16 @@ return array( 'personal_api_keys' => 'Personliga API-nycklar', - 'personal_access_token' => 'Personal Access Token', - 'personal_api_keys_success' => 'Personal API Key :key created sucessfully', - 'here_is_api_key' => 'Here is your new personal access token. This is the only time it will be shown so do not lose it! You may now use this token to make API requests.', - 'api_key_warning' => 'When generating an API token, be sure to copy it down immediately as they will not be visible to you again.', + 'personal_access_token' => 'Personligt Access Token', + 'personal_api_keys_success' => 'Personlig API-nyckel skapad', + 'here_is_api_key' => 'Här är din nya personliga access token. Detta är den enda gången det kommer att visas så tappa inte bort den! Du kan nu använda denna token för att göra API-förfrågningar.', + 'api_key_warning' => 'När du genererar ett API-token, se till att kopiera den omedelbart eftersom den inte kommer att vara synliga för dig igen.', 'api_base_url' => 'Din API-bas-url finns på:', 'api_base_url_endpoint' => '/<endpoint>', 'api_token_expiration_time' => 'API-tokens är inställda på att gå ut om:', - 'api_reference' => 'Please check the API reference to find specific API endpoints and additional API documentation.', - 'profile_updated' => 'Account successfully updated', - 'no_tokens' => 'You have not created any personal access tokens.', - 'enable_sounds' => 'Enable sound effects', - 'enable_confetti' => 'Enable confetti effects', + 'api_reference' => 'Vänligen kontrollera API-dokumentationen för att hitta specifika API-endpoints och ytterligare API relaterad information.', + 'profile_updated' => 'Kontot har uppdaterats', + 'no_tokens' => 'Du har inte skapat några personliga åtkomsttokens.', + 'enable_sounds' => 'Aktivera ljudeffekter', + 'enable_confetti' => 'Aktivera konfettieffekter', ); diff --git a/resources/lang/sv-SE/admin/accessories/general.php b/resources/lang/sv-SE/admin/accessories/general.php index b2dc82893252..bae1834950a6 100644 --- a/resources/lang/sv-SE/admin/accessories/general.php +++ b/resources/lang/sv-SE/admin/accessories/general.php @@ -7,7 +7,7 @@ 'checkin' => 'Checka in tillbehör', 'create' => 'Skapa tillbehör', 'edit' => 'Redigera tillbehör', - 'eula_text' => 'Kategori EULA', + 'eula_text' => 'EULA-kategori', 'eula_text_help' => 'Det här fältet tillåter att du ändrar din EULA för specifika typer av tillgångar. Om du endast har en EULA för samtliga tillgångar så kan du kryssa i rutan nedan för att använda den.', 'require_acceptance' => 'Kräv att användare bekräftar mottagande av tillgångar i denna kategori.', 'no_default_eula' => 'Ingen EULA funnen. Lägg till en i inställningar.', @@ -16,7 +16,7 @@ 'update' => 'Uppdatera tillbehör', 'use_default_eula' => 'Använd den primära EULA:n istället.', 'use_default_eula_disabled' => 'Använd den primära EULA:n istället. Ingen primär EULA är satt. Vänligen lägg till en i Inställningar.', - 'clone' => 'Klona tillbehör', + 'clone' => 'Kopiera tillbehör', 'delete_disabled' => 'Detta tillbehör kan inte tas bort ännu eftersom vissa objekt fortfarande är utcheckade.', ); diff --git a/resources/lang/sv-SE/admin/categories/general.php b/resources/lang/sv-SE/admin/categories/general.php index aa9387e7f3e8..8df2368e1bdf 100644 --- a/resources/lang/sv-SE/admin/categories/general.php +++ b/resources/lang/sv-SE/admin/categories/general.php @@ -1,16 +1,16 @@ 'Kategorier', + 'asset_categories' => 'Tillgångskategorier', 'category_name' => 'Kategorinamn', - 'checkin_email' => 'Skicka e-post till användaren vid incheckning / utcheckning.', - 'checkin_email_notification' => 'Den här användaren kommer att skickas ett mail vid incheckning / utcheckning.', - 'clone' => 'Klona kategori', + 'checkin_email' => 'Skicka e-post till användaren vid incheckning/utcheckning.', + 'checkin_email_notification' => 'Den här användaren kommer att få e-post vid incheckning/utcheckning.', + 'clone' => 'Kopiera kategori', 'create' => 'Skapa kategori', 'edit' => 'Redigera kategori', 'email_will_be_sent_due_to_global_eula' => 'Ett e-postmeddelande kommer att skickas till användaren eftersom det globala användaravtalet (EULA) används.', 'email_will_be_sent_due_to_category_eula' => 'Ett e-postmeddelande kommer att skickas till användaren eftersom ett användaravtal (EULA) är inställt för denna kategori.', - 'eula_text' => 'Kategori EULA', + 'eula_text' => 'EULA-kategori', 'eula_text_help' => 'I detta fält kan du anpassa dina licensavtal för slutanvändare, EULA, för vissa typer av tillgångar. Om du bara har ett licensavtal för alla dina tillgångar, kan du markera rutan nedan för att använda standardlicensavtalet.', 'name' => 'Kategorinamn', 'require_acceptance' => 'Kräv att användare bekräftar mottagande av tillgångar i denna kategori.', @@ -20,6 +20,6 @@ 'update' => 'Uppdatera kategori', 'use_default_eula' => 'Använd standard-licensavtal, EULA istället.', 'use_default_eula_disabled' => 'Använd den primära licensavtalet, EULA:n, istället. Inget primärt licensavtal, EULA, är satt. Vänligen lägg till en under Inställningar.', - 'use_default_eula_column' => 'Använd standard EULA', + 'use_default_eula_column' => 'Använd standard-EULA', ); diff --git a/resources/lang/sv-SE/admin/categories/table.php b/resources/lang/sv-SE/admin/categories/table.php index 8c257299681d..500de8f22f23 100644 --- a/resources/lang/sv-SE/admin/categories/table.php +++ b/resources/lang/sv-SE/admin/categories/table.php @@ -5,6 +5,6 @@ 'id' => 'ID', 'parent' => 'Överordnad', 'require_acceptance' => 'Godkännande', - 'title' => 'Namn på kategori', + 'title' => 'Namn Tillgångskategori', ); diff --git a/resources/lang/sv-SE/admin/hardware/form.php b/resources/lang/sv-SE/admin/hardware/form.php index 97220ecc0d0a..2c3b8c46e379 100644 --- a/resources/lang/sv-SE/admin/hardware/form.php +++ b/resources/lang/sv-SE/admin/hardware/form.php @@ -1,18 +1,18 @@ 'Bekräfta storlekar för borttagning av bulk', + 'bulk_delete' => 'Bekräfta massradering av tillgångar', 'bulk_restore' => 'Bekräfta massåterställning av tillgångar', - 'bulk_delete_help' => 'Granska tillgångarna för delad borttagning nedan. En gång raderas kan dessa tillgångar återställas, men de kommer inte längre att vara associerade med några användare de tilldelas för närvarande.', - 'bulk_restore_help' => 'Granska tillgångar för massåterställning nedan. När återställd, kommer dessa tillgångar inte att associeras med några användare som de tidigare tilldelats.', - 'bulk_delete_warn' => 'Du håller på att ta bort: asset_count-tillgångar.', - 'bulk_restore_warn' => 'Du håller på att återställa :asset_count tillgångar.', - 'bulk_update' => 'Bulk Update Assets', + 'bulk_delete_help' => 'Granska tillgångarna för massradering nedan. Efter radering kan dessa tillgångar återställas, men de kommer inte längre att vara associerade med de användare de för närvarande är tilldelade.', + 'bulk_restore_help' => 'Granska tillgångar för massåterställning nedan. Vid återställning kommer dessa tillgångar inte att associeras med några användare som de tidigare tilldelats.', + 'bulk_delete_warn' => 'Du är påväg att ta bort: asset_count tillgångar.', + 'bulk_restore_warn' => 'Du är påväg att återställa :asset_count tillgångar.', + 'bulk_update' => 'Massuppdatera tillgångar', 'bulk_update_help' => 'I det här formuläret kan du uppdatera flera tillgångar på en gång. Fyll bara i de fält du behöver ändra. Alla fält som lämnas tomma kommer att förbli oförändrade.', - 'bulk_update_warn' => 'Du håller på att redigera egenskaperna för en enda tillgång.|Du håller på att redigera egenskaperna för :asset_count tillgångar.', + 'bulk_update_warn' => 'Du håller på att redigera egenskaperna för en tillgång.|Du håller på att redigera egenskaperna för :asset_count tillgångar.', 'bulk_update_with_custom_field' => 'Notera att tillgångarna är :asset_model_count olika typer av modeller.', 'bulk_update_model_prefix' => 'På modeller', - 'bulk_update_custom_field_unique' => 'Detta är ett unikt fält och kan inte bulk redigeras.', + 'bulk_update_custom_field_unique' => 'Detta är ett unikt fält och kan inte massredigeras.', 'checkedout_to' => 'Utcheckad till', 'checkout_date' => 'Utcheckningsdatum', 'checkin_date' => 'Incheckningsdatum', @@ -60,5 +60,5 @@ 'processing_spinner' => 'Bearbetar... (Detta kan ta lite tid på stora filer)', 'optional_infos' => 'Valfri information', 'order_details' => 'Beställningsrelaterad information', - 'calc_eol' => 'If nulling the EOL date, use automatic EOL calculation based on the purchase date and EOL rate.', + 'calc_eol' => 'Vid nollställning av EOL-datum, använd den automatiserade EOL-uträkningen baserat på inköpingsdatum och EOL-datum.', ]; diff --git a/resources/lang/sv-SE/admin/hardware/general.php b/resources/lang/sv-SE/admin/hardware/general.php index ea8b33a35816..a1e97bf35191 100644 --- a/resources/lang/sv-SE/admin/hardware/general.php +++ b/resources/lang/sv-SE/admin/hardware/general.php @@ -5,11 +5,11 @@ 'about_assets_text' => 'Tillgångar är poster som spåras med serienummer eller tillgångstagg. De tenderar att vara mer värdefulla saker där identifiering av en viss sak är viktig.', 'archived' => 'Arkiverade', 'asset' => 'Tillgång', - 'bulk_checkout' => 'Checkout tillgångar', - 'bulk_checkin' => 'Återta tillgångar', + 'bulk_checkout' => 'Checka ut tillgångar', + 'bulk_checkin' => 'Checka in tillgångar', 'checkin' => 'Checkin Asset', 'checkout' => 'Checkout Asset', - 'clone' => 'Klon tillgång', + 'clone' => 'Kopiera tillgång', 'deployable' => 'Deployable', 'deleted' => 'Denna tillgång har tagits bort.', 'delete_confirm' => 'Är du säker du vill radera denna tillgång?', diff --git a/resources/lang/sv-SE/admin/hardware/message.php b/resources/lang/sv-SE/admin/hardware/message.php index c1b66dbba4f8..70b12cf36402 100644 --- a/resources/lang/sv-SE/admin/hardware/message.php +++ b/resources/lang/sv-SE/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Varning: Den här tillgången har för närvarande markerats som ej distribuerbar. Om denna status har ändrats vad god och uppdatera tillgångstatusen.', - 'does_not_exist' => 'Tillgång existerar inte.', - 'does_not_exist_var'=> 'Tillgång med taggen :asset_tag hittades inte.', - 'no_tag' => 'Ingen tillgångstagg angiven.', + 'undeployable' => 'Varning: Den här tillgången har för närvarande markerats som ej distribuerbar. Om denna status har ändrats vad god och uppdatera tillgångstatusen.', + 'does_not_exist' => 'Tillgång existerar inte.', + 'does_not_exist_var' => 'Tillgång med taggen :asset_tag hittades inte.', + 'no_tag' => 'Ingen tillgångstagg angiven.', 'does_not_exist_or_not_requestable' => 'Den tillgången finns inte eller är inte önskvärd.', - 'assoc_users' => 'Denna tillgång kontrolleras för närvarande till en användare och kan inte raderas. Kontrollera tillgången först och försök sedan radera igen.', + 'assoc_users' => 'Denna tillgång kontrolleras för närvarande till en användare och kan inte raderas. Kontrollera tillgången först och försök sedan radera igen.', 'warning_audit_date_mismatch' => 'Denna tillgångs nästa inventeringsdatum (:next_audit_date) är före det senaste inventeringsdatumet (:last_audit_date). Vänligen uppdatera nästa inventeringsdatum.', + 'labels_generated' => 'Etiketter har genererats.', + 'error_generating_labels' => 'Ett fel uppstod vid generering av etiketter.', + 'no_assets_selected' => 'Inga tillgångar valda.', 'create' => [ 'error' => 'Tillgången skapades inte, försök igen. :(', diff --git a/resources/lang/sv-SE/admin/labels/message.php b/resources/lang/sv-SE/admin/labels/message.php index 0563efed34fc..47abe34b4e67 100644 --- a/resources/lang/sv-SE/admin/labels/message.php +++ b/resources/lang/sv-SE/admin/labels/message.php @@ -3,8 +3,8 @@ return [ 'invalid_return_count' => 'Ogiltigt antal returnerade från :name. Förväntade :expected, fick :actual.', - 'invalid_return_type' => 'Ogiltig typ returneras från :name. Förväntad :expected, fick :actual.', - 'invalid_return_value' => 'Ogiltigt värde returneras från :name. Förväntade :expected, fick :actual.', + 'invalid_return_type' => 'Ogiltig typ returnerades från :name. Förväntade :expected, fick :actual.', + 'invalid_return_value' => 'Ogiltigt värde returnerades från :name. Förväntade :expected, fick :actual.', 'does_not_exist' => 'Etiketten finns inte', diff --git a/resources/lang/sv-SE/admin/labels/table.php b/resources/lang/sv-SE/admin/labels/table.php index 8f4a8d3a04a8..1c9060209261 100644 --- a/resources/lang/sv-SE/admin/labels/table.php +++ b/resources/lang/sv-SE/admin/labels/table.php @@ -5,12 +5,12 @@ 'example_defaultloc' => 'Byggnad 1', 'example_category' => 'Testa kategori', 'example_location' => 'Byggnad 2', - 'example_manufacturer' => 'Test Manufacturing Inc.', + 'example_manufacturer' => 'Testtillverkaren AB', 'example_model' => 'Testa modell', - 'example_supplier' => 'Test Company Limited', + 'example_supplier' => 'Testbolaget AB', 'labels_per_page' => 'Etiketter', 'support_fields' => 'Fält', - 'support_asset_tag' => 'Tag', + 'support_asset_tag' => 'Tagg', 'support_1d_barcode' => '1D', 'support_2d_barcode' => '2D', 'support_logo' => 'Logotyp', diff --git a/resources/lang/sv-SE/admin/licenses/general.php b/resources/lang/sv-SE/admin/licenses/general.php index b1061db3738d..79ff43e19bb6 100644 --- a/resources/lang/sv-SE/admin/licenses/general.php +++ b/resources/lang/sv-SE/admin/licenses/general.php @@ -8,7 +8,7 @@ 'checkout' => 'Checkout License Seat', 'edit' => 'Redigera licens', 'filetype_info' => 'Tillåtna filtyper är png, gif, jpg, jpeg, doc, docx, pdf, txt, zip och rar.', - 'clone' => 'Klonlicens', + 'clone' => 'Kopiera licens', 'history_for' => 'Historia för', 'in_out' => 'In ut', 'info' => 'Licensinfo', @@ -23,25 +23,25 @@ 'bulk' => [ 'checkin_all' => [ - 'button' => 'Checka in alla platser', + 'button' => 'Checka in alla säten', 'modal' => 'Denna åtgärd checkar in en plats. | Denna åtgärd checkar in alla :checkedout_seats_count platser för denna licens.', 'enabled_tooltip' => 'Checka in ALLA platser för denna licens från både användare och tillgångar', 'disabled_tooltip' => 'Detta är inaktiverat eftersom det för närvarande inte finns några platser utcheckade', - 'disabled_tooltip_reassignable' => 'Detta är inaktiverat eftersom licensen inte är omtilldelbar', + 'disabled_tooltip_reassignable' => 'Detta är inaktiverat eftersom licensen inte är omtilldelsningsbar', 'success' => 'Licensen har checkats in! | Alla licenser har checkats in!', - 'log_msg' => 'Incheckad via licens bulkincheckning i licens GUI', + 'log_msg' => 'Incheckad via massincheckning av licenser i licensgränssnittet', ], 'checkout_all' => [ - 'button' => 'Checka ut alla platser', - 'modal' => 'Denna åtgärd kommer att checka ut en plats till den första tillgängliga användaren. | Den här åtgärden kommer att checka ut alla :available_seats_count platser till de första tillgängliga användarna. En användare anses vara tillgänglig för denna plats om de inte redan har denna licens checkas ut till dem, och auto-tilldela licensegenskapen är aktiverad på deras användarkonto.', - 'enabled_tooltip' => 'Checka ut alla platser (eller så många som finns tillgängliga) till ALLA användare', - 'disabled_tooltip' => 'Detta är inaktiverat eftersom det för närvarande inte finns några platser tillgängliga', + 'button' => 'Checka ut alla säten', + 'modal' => 'Denna åtgärd kommer att checka ut en plats till den första tillgängliga användaren. | Den här åtgärden kommer att checka ut alla :available_seats_count platser till de första tillgängliga användarna. En användare anses vara tillgänglig för denna plats om de inte redan har denna licens utcheckad till dem, och auto-tilldela licensegenskapen är aktiverad på deras användarkonto.', + 'enabled_tooltip' => 'Checka ut alla säten (eller så många som finns tillgängliga) till ALLA användare', + 'disabled_tooltip' => 'Detta är inaktiverat eftersom det för närvarande inte finns några säten tillgängliga', 'success' => 'Licensen har checkats ut! | :count licenser har checkats ut!', - 'error_no_seats' => 'Det finns inga återstående platser kvar för denna licens.', + 'error_no_seats' => 'Det finns inga återstående säten kvar för denna licens.', 'warn_not_enough_seats' => ':count användare tilldelades denna licens, men vi fick slut på tillgängliga licenser.', 'warn_no_avail_users' => 'Inget att göra. Det finns inga användare som inte redan har denna licens tilldelad dem.', - 'log_msg' => 'Checkade ut via bulk licens checkout i licens GUI', + 'log_msg' => 'Utcheckad via massincheckning av licenser i licensgränssnittet', ], diff --git a/resources/lang/sv-SE/admin/locations/message.php b/resources/lang/sv-SE/admin/locations/message.php index 49c152fc20c3..978fe3e16ee1 100644 --- a/resources/lang/sv-SE/admin/locations/message.php +++ b/resources/lang/sv-SE/admin/locations/message.php @@ -3,12 +3,12 @@ return array( 'does_not_exist' => 'Platsen finns inte.', - 'assoc_users' => 'This location is not currently deletable because it is the location of record for at least one asset or user, has assets assigned to it, or is the parent location of another location. Please update your records to no longer reference this location and try again. ', + 'assoc_users' => 'Denna plats går inte att ta bort eftersom det är en plats tillhörande minst en tillgång eller användare, har kopplade tillgångar eller är standardplats för en annan plats. Vänligen uppdatera dina register för att ta bort referenser till denna plats och försök igen. ', 'assoc_assets' => 'Platsen är associerad med minst en tillgång och kan inte tas bort. Vänligen uppdatera dina tillgångar så dom inte refererar till denna plats och försök igen. ', 'assoc_child_loc' => 'Denna plats är för närvarande överliggande för minst en annan plats och kan inte tas bort. Vänligen uppdatera dina platser så dom inte längre refererar till denna och försök igen.', 'assigned_assets' => 'Tilldelade tillgångar', 'current_location' => 'Nuvarande plats', - 'open_map' => 'Open in :map_provider_icon Maps', + 'open_map' => 'Öppna i :map_provider_icon Kartor', 'create' => array( @@ -22,8 +22,8 @@ ), 'restore' => array( - 'error' => 'Location was not restored, please try again', - 'success' => 'Location restored successfully.' + 'error' => 'Platsen återställdes inte, försök igen', + 'success' => 'Platsen har återställts.' ), 'delete' => array( diff --git a/resources/lang/sv-SE/admin/locations/table.php b/resources/lang/sv-SE/admin/locations/table.php index 1f966443488c..baec09dffdf3 100644 --- a/resources/lang/sv-SE/admin/locations/table.php +++ b/resources/lang/sv-SE/admin/locations/table.php @@ -7,7 +7,7 @@ 'assets_checkedout' => 'Tilldelade tillgångar', 'id' => 'ID', 'city' => 'Stad', - 'state' => 'stat', + 'state' => 'Stat', 'country' => 'Land', 'create' => 'Skapa plats', 'update' => 'Uppdatera plats', @@ -16,26 +16,26 @@ 'name' => 'Platsnamn', 'address' => 'Adress', 'address2' => 'Adressrad 2', - 'zip' => 'postnummer', - 'locations' => 'platser', + 'zip' => 'Postnummer', + 'locations' => 'Platser', 'parent' => 'Förälder', 'currency' => 'Platsvaluta', 'ldap_ou' => 'LDAP-sökning OU', 'user_name' => 'Användarnamn', 'department' => 'Avdelning', 'location' => 'Plats', - 'asset_tag' => 'Stöldnummer', + 'asset_tag' => 'Tillgångstagg', 'asset_name' => 'Namn', 'asset_category' => 'Kategori', 'asset_manufacturer' => 'Tillverkare', 'asset_model' => 'Modell', 'asset_serial' => 'Serienummer', 'asset_location' => 'Plats', - 'asset_checked_out' => 'Checkat ut', - 'asset_expected_checkin' => 'Förväntad incheckning', + 'asset_checked_out' => 'Utcheckad', + 'asset_expected_checkin' => 'Förväntas incheckad', 'date' => 'Datum:', 'phone' => 'Plats Telefon', - 'signed_by_asset_auditor' => 'Signerad av (Asset Auditor):', + 'signed_by_asset_auditor' => 'Signerad av (Tillgångsansvarig):', 'signed_by_finance_auditor' => 'Undertecknad av (Finansrevisor):', 'signed_by_location_manager' => 'Undertecknad av (Platschef):', 'signed_by' => 'Undertecknad av:', diff --git a/resources/lang/sv-SE/admin/models/general.php b/resources/lang/sv-SE/admin/models/general.php index 6d4bc840f91d..48f96c977826 100644 --- a/resources/lang/sv-SE/admin/models/general.php +++ b/resources/lang/sv-SE/admin/models/general.php @@ -4,7 +4,7 @@ 'about_models_title' => 'Om modeller', 'about_models_text' => 'Modeller är ett sätt att gruppera identiska tillgångar. "Galaxy S20", "iPhone 12", etc.', 'deleted' => 'Denna modell har tagits bort.', - 'bulk_delete' => 'Bulk Radera modeller', + 'bulk_delete' => 'Massradera modeller', 'bulk_delete_help' => 'Använd kryssrutan här under för att bekräfta borttagning av valda modeller. Modeller som har tillgångar kopplade till sig kan inte raderas innan dessa är kopplade till en annan modell.', 'bulk_delete_warn' => 'Du håller på att ta bort en tillgångsmodell.|Du håller på att ta bort :model_count tillgångsmodeller.', 'restore' => 'Återskapa Modell', diff --git a/resources/lang/sv-SE/admin/models/message.php b/resources/lang/sv-SE/admin/models/message.php index cbcbe8f72a04..393b85417ea4 100644 --- a/resources/lang/sv-SE/admin/models/message.php +++ b/resources/lang/sv-SE/admin/models/message.php @@ -4,10 +4,10 @@ 'deleted' => 'Raderad tillgångsmodell', 'does_not_exist' => 'Modellen finns inte.', - 'no_association' => 'VARNING! Modellen för detta objekt är ogiltigt eller saknas!', - 'no_association_fix' => 'Detta kommer att bryta saker på konstiga och hemska sätt. Redigera denna tillgång nu för att tilldela det en modell.', + 'no_association' => 'VARNING! Tillgångsmodellen för detta objekt är ogiltig eller saknas!', + 'no_association_fix' => 'Detta kommer att förstöra saker på märkliga sätt. Redigera denna tillgång nu för att tilldela det till en modell.', 'assoc_users' => 'Denna modell är redan associerad med en eller flera tillgångar och kan inte tas bort. Ta bort tillgången och försök sedan igen. ', - 'invalid_category_type' => 'This category must be an asset category.', + 'invalid_category_type' => 'Denna kategori måste vara en tillgångskategori.', 'create' => array( 'error' => 'Modellen skapades inte, försök igen.', @@ -17,24 +17,24 @@ 'update' => array( 'error' => 'Modellen uppdaterades inte, försök igen', - 'success' => 'Modellen uppdaterad.', + 'success' => 'Modellen uppdaterades.', ), 'delete' => array( 'confirm' => 'Är du säker på att du vill ta bort denna modell?', - 'error' => 'Problem att ta bort modellen. Försök igen.', + 'error' => 'Kunde inte ta bort modellen. Försök igen.', 'success' => 'Modellen borttagen.' ), 'restore' => array( - 'error' => 'Modellen återskapades inte, försök igen', + 'error' => 'Modellen kunde inte återskapas, försök igen', 'success' => 'Modellen återskapades.' ), 'bulkedit' => array( 'error' => 'Inga fält ändrades, så ingenting uppdaterades.', 'success' => 'Modellen har uppdaterats. |:model_count modeller har uppdaterats.', - 'warn' => 'Du håller på att uppdatera egenskaperna för följande modell:|Du håller på att redigera egenskaperna för följande :model_count modeller:', + 'warn' => 'Du är påväg att uppdatera egenskaperna för följande modell:|Du håller på att redigera egenskaperna för följande :model_count modeller:', ), diff --git a/resources/lang/sv-SE/admin/models/table.php b/resources/lang/sv-SE/admin/models/table.php index 85395d261a53..5690fa30f298 100644 --- a/resources/lang/sv-SE/admin/models/table.php +++ b/resources/lang/sv-SE/admin/models/table.php @@ -3,15 +3,15 @@ return array( 'create' => 'Skapa Modell', - 'created_at' => 'Skapad den', + 'created_at' => 'Skapad', 'eol' => 'EOL', - 'modelnumber' => 'modell nr.', - 'name' => 'Anläggningsmodell Namn', + 'modelnumber' => 'Modellnr.', + 'name' => 'Tillgångens modellnamn', 'numassets' => 'Tillgångar', 'title' => 'Modeller', - 'update' => 'Uppdatera modell', + 'update' => 'Uppdatera tillgångsmodell', 'view' => 'Visa tillgångsmodell', - 'update' => 'Uppdatera modell', - 'clone' => 'Kopiera Modell', - 'edit' => 'Ändra Modell', + 'update' => 'Uppdatera tillgångsmodell', + 'clone' => 'Kopiera modell', + 'edit' => 'Ändra modell', ); diff --git a/resources/lang/sv-SE/admin/settings/general.php b/resources/lang/sv-SE/admin/settings/general.php index 03ca5c907355..91a236d4c515 100644 --- a/resources/lang/sv-SE/admin/settings/general.php +++ b/resources/lang/sv-SE/admin/settings/general.php @@ -31,8 +31,8 @@ 'backups' => 'Säkerhetskopior', 'backups_help' => 'Skapa, ladda ner och återställ säkerhetskopior ', 'backups_restoring' => 'Återställ från säkerhetskopia', - 'backups_clean' => 'Clean the backed-up database before restore', - 'backups_clean_helptext' => "This can be useful if you're changing between database versions", + 'backups_clean' => 'Rensa den säkerhetskopierade databasen innan återställning', + 'backups_clean_helptext' => "Detta kan vara användbart om du skiftar mellan databasversioner", 'backups_upload' => 'Ladda upp säkerhetskopia', 'backups_path' => 'Säkerhetskopior på servern lagras i :path', 'backups_restore_warning' => 'Använd återställningsknappen för att återställa från en tidigare säkerhetskopia. (Detta fungerar för närvarande inte med S3-fillagring eller Docker.)

Din hela :app_name databas och alla uppladdade filer kommer att helt ersättas av vad som finns i backupfilen. ', @@ -51,7 +51,7 @@ 'default_eula_text' => 'Standard EULA', 'default_language' => 'Standardspråk', 'default_eula_help_text' => 'Du kan också associera anpassade EULA till specifika tillgångskategorier.', - 'acceptance_note' => 'Add a note for your decision (Optional)', + 'acceptance_note' => 'Lägg till en anteckning för ditt beslut (valfritt)', 'display_asset_name' => 'Visa tillgångens namn', 'display_checkout_date' => 'Visa utcheckningsdatum', 'display_eol' => 'Visa EOL i tabellvy', @@ -96,7 +96,7 @@ 'ldap_login_sync_help' => 'Detta testar bara att LDAP kan synkroniseras korrekt. Om din LDAP-autentiseringsfråga inte är korrekt kan användarna fortfarande inte logga in. DU MÅSTE SPARA DINA UPPDATERADE LDAPINSTÄLLNINGAR FÖRST.', 'ldap_manager' => 'LDAP-hanterare', 'ldap_server' => 'LDAP-server', - 'ldap_server_help' => 'This should start with ldap:// (for unencrypted) or ldaps:// (for TLS or SSL)', + 'ldap_server_help' => 'Detta bör starta med ldap:// (för okrypterad) eller ldaps:// (för TLS eller SSL)', 'ldap_server_cert' => 'Validering av LDAP SSL-certifikat', 'ldap_server_cert_ignore' => 'Tillåt ogiltigt SSL-certifikat', 'ldap_server_cert_help' => 'Markera den här kryssrutan om du använder en självtecknad SSL-cert och vill acceptera ett ogiltigt SSL-certifikat.', @@ -124,8 +124,8 @@ 'ldap_test' => 'Testa LDAP', 'ldap_test_sync' => 'Testa LDAP-synkronisering', 'license' => 'Mjukvarulicens', - 'load_remote' => 'Load Remote Avatars', - 'load_remote_help_text' => 'Uncheck this box if your install cannot load scripts from the outside internet. This will prevent Snipe-IT from trying load avatars from Gravatar or other outside sources.', + 'load_remote' => 'Ladda in avatarer', + 'load_remote_help_text' => 'Avmarkera denna ruta om din installation inte kan ladda skript från externa källor. Detta förhindrar att Snipe-IT försöker ladda avatarer från Gravatar eller andra externa källor.', 'login' => 'Inloggningsförsök', 'login_attempt' => 'Inloggningsförsök', 'login_ip' => 'IP-adress', @@ -220,8 +220,8 @@ 'webhook_integration_help' => ':app integration är frivilligt, men slutpunkt och kanal krävs om du vill använda den. För att konfigurera :app integration, måste du först skapa en inkommande webhook på ditt :app konto. Klicka på Test :app Integration -knappen för att bekräfta att dina inställningar är korrekta innan du sparar. ', 'webhook_integration_help_button' => 'När du har sparat information om :app visas en testknapp.', 'webhook_test_help' => 'Testa om din :app integration är korrekt konfigurerad. DU MÅSTE SPARA DIN UPPDATERAD :app INSTÄLLNINGAR FÖRST.', - 'shortcuts_enabled' => 'Enable Shortcuts', - 'shortcuts_help_text' => 'Windows: Alt + Access key, Mac: Control + Option + Access key', + 'shortcuts_enabled' => 'Aktivera genvägar', + 'shortcuts_help_text' => 'Windows: Alt + Access-nyckel, Mac: Control + Option + Access-nyckel', 'snipe_version' => 'Snipe-IT-versionen', 'support_footer' => 'Stöd länkar i sidfot ', 'support_footer_help' => 'Ange vem som kan se länkarna till Snipe-IT Support info och användarmanual', @@ -291,18 +291,18 @@ 'zerofill_count' => 'Längd på tillgångstaggar, inklusive zerofill', 'username_format_help' => 'Denna inställning kommer endast att användas av importprocessen om ett användarnamn inte finns och vi måste generera ett användarnamn åt dig.', 'oauth_title' => 'OAuth API-inställningar', - 'oauth_clients' => 'OAuth Clients', + 'oauth_clients' => 'OAuth-klienter', 'oauth' => 'OAuth', 'oauth_help' => 'Oauth användarvillkor inställningar', - 'oauth_no_clients' => 'You have not created any OAuth clients yet.', - 'oauth_secret' => 'Secret', - 'oauth_authorized_apps' => 'Authorized Applications', + 'oauth_no_clients' => 'Du har inte skapat några OAuth-klienter ännu.', + 'oauth_secret' => 'Hemlighet', + 'oauth_authorized_apps' => 'Auktoriserade program', 'oauth_redirect_url' => 'Redirect URL', - 'oauth_name_help' => ' Something your users will recognize and trust.', + 'oauth_name_help' => ' Något som dina användare kommer att känna igen och lita på.', 'oauth_scopes' => 'Scopes', - 'oauth_callback_url' => 'Your application authorization callback URL.', - 'create_client' => 'Create Client', - 'no_scopes' => 'No scopes', + 'oauth_callback_url' => 'Din applikations authorization callback URL.', + 'create_client' => 'Skapa klient', + 'no_scopes' => 'Inga scopes', 'asset_tag_title' => 'Uppdatera stöldmärknings inställningar', 'barcode_title' => 'Uppdatera streckkodsinställningar', 'barcodes' => 'Streckkoder', @@ -377,14 +377,14 @@ 'database_driver' => 'Databasdrivrutinen', 'bs_table_storage' => 'Tabell Lagring', 'timezone' => 'Tidszon', - 'profile_edit' => 'Edit Profile', - 'profile_edit_help' => 'Allow users to edit their own profiles.', - 'default_avatar' => 'Upload custom default avatar', - 'default_avatar_help' => 'This image will be displayed as a profile if a user does not have a profile photo.', - 'restore_default_avatar' => 'Restore original system default avatar', + 'profile_edit' => 'Redigera profil', + 'profile_edit_help' => 'Tillåt användare att redigera sina egna profiler.', + 'default_avatar' => 'Ladda upp anpassad standardavatar', + 'default_avatar_help' => 'Denna bild kommer att visas som profilbild om en användare inte har en profilbild.', + 'restore_default_avatar' => 'Återställ ursprunglig systemavatar', 'restore_default_avatar_help' => '', - 'due_checkin_days' => 'Due For Checkin Warning', - 'due_checkin_days_help' => 'How many days before the expected checkin of an asset should it be listed in the "Due for checkin" page?', - 'no_groups' => 'No groups have been created yet. Visit Admin Settings > Permission Groups to add one.', + 'due_checkin_days' => 'Förfaller för incheckningsvarning', + 'due_checkin_days_help' => 'Hur många dagar innan den förväntade incheckningen av en tillgång ska den anges på sidan "Förfaller för incheckning"?', + 'no_groups' => 'Inga grupper har skapats än. Besök Administratörsinställningar > Grupper för att lägga till en.', ]; diff --git a/resources/lang/sv-SE/admin/settings/message.php b/resources/lang/sv-SE/admin/settings/message.php index 983eecae43df..6554d7f2fe68 100644 --- a/resources/lang/sv-SE/admin/settings/message.php +++ b/resources/lang/sv-SE/admin/settings/message.php @@ -15,7 +15,7 @@ 'restore_confirm' => 'Är du säker på att du vill återställa din databas från :filnamn?' ], 'restore' => [ - 'success' => 'Your system backup has been restored. Please log in again.' + 'success' => 'Din säkerhetskopia har återställts. Vänligen logga in igen.' ], 'purge' => [ 'error' => 'Ett fel har uppstått vid spolning.', diff --git a/resources/lang/sv-SE/admin/statuslabels/message.php b/resources/lang/sv-SE/admin/statuslabels/message.php index ff6372f46e54..4443f899b699 100644 --- a/resources/lang/sv-SE/admin/statuslabels/message.php +++ b/resources/lang/sv-SE/admin/statuslabels/message.php @@ -2,18 +2,18 @@ return [ - 'does_not_exist' => 'Status Label existerar inte.', + 'does_not_exist' => 'Statusetiketten existerar inte.', 'deleted_label' => 'Statusetikett borttagen', - 'assoc_assets' => 'Denna statusetikett är för närvarande associerad med minst en tillgång och kan inte raderas. Uppdatera dina tillgångar för att inte längre referera till denna status och försök igen.', + 'assoc_assets' => 'Denna statusetikett är för närvarande associerad med minst en tillgång och kan inte raderas. Uppdatera dina tillgångar och försök igen. ', 'create' => [ 'error' => 'Statusetiketten skapades inte, försök igen.', - 'success' => 'Status Label skapades framgångsrikt.', + 'success' => 'Statusetikett skapad.', ], 'update' => [ 'error' => 'Statusetiketten uppdaterades inte, var god försök igen', - 'success' => 'Statusetiketten uppdateras framgångsrikt.', + 'success' => 'Statusetikett uppdaterad.', ], 'delete' => [ @@ -24,8 +24,8 @@ 'help' => [ 'undeployable' => 'Dessa tillgångar kan inte tilldelas någon.', - 'deployable' => 'Dessa tillgångar kan checkas ut. När de har tilldelats, antar de en metastatus på Deployed.', - 'archived' => 'Dessa tillgångar kan inte checkas ut och visas bara i arkiverad vy. Detta är användbart för att behålla information om tillgångar för budgetering / historiska ändamål men att hålla dem borta från den dagliga tillgångslistan.', + 'deployable' => 'Dessa tillgångar kan checkas ut. När de har tilldelats, antar de en metastatus på Levererad.', + 'archived' => 'Dessa tillgångar kan inte checkas ut och visas enbart i den arkiverade vyn. Detta är användbart för att behålla information om tillgångar för budgetering/historiska ändamål men att hålla dem borta från den dagliga tillgångslistan.', 'pending' => 'Dessa tillgångar kan ännu inte tilldelas någon som ofta används för föremål som är ute för reparation, men förväntas återgå till omlopp.', ], diff --git a/resources/lang/sv-SE/admin/statuslabels/table.php b/resources/lang/sv-SE/admin/statuslabels/table.php index 04b83bc864e4..4acdd262ba4b 100644 --- a/resources/lang/sv-SE/admin/statuslabels/table.php +++ b/resources/lang/sv-SE/admin/statuslabels/table.php @@ -14,6 +14,6 @@ 'status_type' => 'Statustyp', 'show_in_nav' => 'Visa i sidofältet', 'title' => 'Statusetiketter', - 'undeployable' => 'Ej tillgänglig', + 'undeployable' => 'Otillgänglig', 'update' => 'Uppdatera statusetikett', ); diff --git a/resources/lang/sv-SE/admin/users/general.php b/resources/lang/sv-SE/admin/users/general.php index 442d9d88bcfa..0de3dc992665 100644 --- a/resources/lang/sv-SE/admin/users/general.php +++ b/resources/lang/sv-SE/admin/users/general.php @@ -4,10 +4,10 @@ 'activated_help_text' => 'Den här användaren kan logga in', 'activated_disabled_help_text' => 'Du kan inte redigera aktiveringsstatus för ditt eget konto.', 'assets_user' => 'Tillgångar tilldelade: namn', - 'bulk_update_warn' => 'Du håller på att redigera egenskaperna hos: user_count-användare. Observera att du inte kan ändra dina egna användarattribut med hjälp av det här formuläret, och måste göra ändringar till din egen användare enskilt.', - 'bulk_update_help' => 'Den här blanketten låter dig uppdatera flera användare samtidigt. Fyll bara i de fält du behöver ändra. Alla fält som lämnas tomma kommer att förbli oförändrade.', + 'bulk_update_warn' => 'Du håller på att redigera egenskaperna hos: user_count användare. Observera att du inte kan ändra dina egna användarattribut med hjälp av det här formuläret utan du måste göra ändringar till din egen användare enskilt.', + 'bulk_update_help' => 'Det här formuläret låter dig uppdatera flera användare samtidigt. Fyll i de fält du behöver ändra. Alla fält som lämnas tomma kommer att förbli oförändrade.', 'current_assets' => 'Tillgångar som för närvarande kontrolleras ut till den här användaren', - 'clone' => 'Klonanvändare', + 'clone' => 'Kopiera användare', 'contact_user' => 'Kontaktnamn', 'edit' => 'Redigera användare', 'filetype_info' => 'Tillåtna filtyper är png, gif, jpg, jpeg, doc, docx, pdf, txt, zip och rar.', diff --git a/resources/lang/sv-SE/admin/users/message.php b/resources/lang/sv-SE/admin/users/message.php index a06f75530605..60d097582523 100644 --- a/resources/lang/sv-SE/admin/users/message.php +++ b/resources/lang/sv-SE/admin/users/message.php @@ -4,9 +4,9 @@ 'accepted' => 'Du har framgångsrikt godkänt den här tillgången.', 'declined' => 'Du har framgångsrikt nekat den här tillgången.', - 'bulk_manager_warn' => 'Dina användare har uppdaterats, men chefsfältet sparades inte eftersom den chef du valt även finns i användarlistan, en användare kanske inte ange sig själv som chef. Vänligen välj dina användare igen, med undantag av chefen.', + 'bulk_manager_warn' => 'Dina användare har uppdaterats, men ansvarigfältet sparades inte eftersom den ansvarige du valt även finns i användarlistan varvid en användare inte kan ange sig själv som ansvarig. Vänligen välj dina användare igen, med den ansvarige exkluderad ur valen.', 'user_exists' => 'Användaren existerar redan!', - 'user_not_found' => 'User does not exist or you do not have permission view them.', + 'user_not_found' => 'Användaren existerar inte eller så har du inte behörighet att se den.', 'user_login_required' => 'Inloggningsfältet krävs', 'user_has_no_assets_assigned' => 'Inga tillgångar som för närvarande tilldelats användaren.', 'user_password_required' => 'Lösenordet krävs.', @@ -22,7 +22,7 @@ 'success' => array( 'create' => 'Användaren skapades med framgång.', 'update' => 'Användaren har uppdaterats.', - 'update_bulk' => 'Användarna uppdaterades med framgång!', + 'update_bulk' => 'Användarna uppdaterades!', 'delete' => 'Användaren har tagits bort.', 'ban' => 'Användaren har blivit bannlyst.', 'unban' => 'Användaren var framgångsrikt obuten.', @@ -37,23 +37,23 @@ 'update' => 'Det gick inte att uppdatera användaren. Var god försök igen.', 'delete' => 'Det gick inte att ta bort användaren. Var god försök igen.', 'delete_has_assets' => 'Den här användaren har objekt tilldelade och kunde inte raderas.', - 'delete_has_assets_var' => 'This user still has an asset assigned. Please check it in first.|This user still has :count assets assigned. Please check their assets in first.', - 'delete_has_licenses_var' => 'This user still has a license seats assigned. Please check it in first.|This user still has :count license seats assigned. Please check them in first.', - 'delete_has_accessories_var' => 'This user still has an accessory assigned. Please check it in first.|This user still has :count accessories assigned. Please check their assets in first.', - 'delete_has_locations_var' => 'This user still manages a location. Please select another manager first.|This user still manages :count locations. Please select another manager first.', - 'delete_has_users_var' => 'This user still manages another user. Please select another manager for that user first.|This user still manages :count users. Please select another manager for them first.', + 'delete_has_assets_var' => 'Den här användaren har fortfarande en tilldelad tillgång. Vänligen checka in den först.|Den här användaren har fortfarande :count tillgångar tilldelade. Vänligen check in dem först.', + 'delete_has_licenses_var' => 'Den här användaren har en licensplats tilldelad. Vänligen checka in den först.|Den här användaren har fortfarande :count licensplatser tilldelade. Vänligen checka in dem först.', + 'delete_has_accessories_var' => 'Den här användaren har fortfarande ett tillbehör tilldelat. Vänligen checka in det först.|Den här användaren har fortfarande :count tillbehör tilldelade. Vänligen checka in dem först.', + 'delete_has_locations_var' => 'Den här användaren hanterar fortfarande en plats. Välj en annan ansvarig först.|Den här användaren hanterar fortfarande :count platser. Välj en annan ansvarig först.', + 'delete_has_users_var' => 'Den här användaren hanterar fortfarande en annan användare. Välj en annan ansvarig för den användaren först. Den här användaren hanterar fortfarande :count användare. Välj en annan ansvarig för dem först.', 'unsuspend' => 'Det uppstod ett problem som avbröt användaren. Var god försök igen.', 'import' => 'Det gick inte att importera användare. Var god försök igen.', 'asset_already_accepted' => 'Denna tillgång har redan godkänts.', 'accept_or_decline' => 'Du måste antingen godkänna eller neka den här tillgången.', - 'cannot_delete_yourself' => 'We would feel really bad if you deleted yourself, please reconsider.', + 'cannot_delete_yourself' => 'Vi skulle må riktigt dåligt om du raderade dig själv, ta dig en funderare igen.', 'incorrect_user_accepted' => 'Den tillgång du försökte acceptera har inte checkats ut till dig.', 'ldap_could_not_connect' => 'Det gick inte att ansluta till LDAP-servern. Kontrollera din LDAP-serverkonfiguration i LDAP-konfigurationsfilen.
Fel från LDAP-servern:', 'ldap_could_not_bind' => 'Kunde inte binda till LDAP-servern. Kontrollera din LDAP-serverkonfiguration i LDAP-konfigurationsfilen.
Fel från LDAP-servern:', 'ldap_could_not_search' => 'Det gick inte att söka på LDAP-servern. Kontrollera din LDAP-serverkonfiguration i LDAP-konfigurationsfilen.
Fel från LDAP-servern:', 'ldap_could_not_get_entries' => 'Det gick inte att få poster från LDAP-servern. Kontrollera din LDAP-serverkonfiguration i LDAP-konfigurationsfilen.
Fel från LDAP-servern:', 'password_ldap' => 'Lösenordet för det här kontot hanteras av LDAP / Active Directory. Vänligen kontakta din IT-avdelning för att ändra ditt lösenord.', - 'multi_company_items_assigned' => 'This user has items assigned that belong to a different company. Please check them in or edit their company.' + 'multi_company_items_assigned' => 'Denna användare har objekt tilldelade som tillhör ett annat företag. Vänligen checka in dem eller redigera deras företag.' ), 'deletefile' => array( diff --git a/resources/lang/sv-SE/admin/users/table.php b/resources/lang/sv-SE/admin/users/table.php index 77de0f102e53..8647ce8c2cb7 100644 --- a/resources/lang/sv-SE/admin/users/table.php +++ b/resources/lang/sv-SE/admin/users/table.php @@ -36,6 +36,6 @@ 'username' => 'Användarnamn', 'user_deleted_text' => 'Den här användaren har markerats som borttagen.', 'username_note' => '(Detta används endast för Active Directory-bindning, inte för inloggning.)', - 'cloneuser' => 'Klonanvändare', + 'cloneuser' => 'Kopiera användare', 'viewusers' => 'Visa användare', ); diff --git a/resources/lang/sv-SE/auth/message.php b/resources/lang/sv-SE/auth/message.php index 71ffe6eb1fbf..3dca71a72a9a 100644 --- a/resources/lang/sv-SE/auth/message.php +++ b/resources/lang/sv-SE/auth/message.php @@ -14,8 +14,8 @@ 'success' => 'Din inloggning lyckades.', 'code_required' => 'Tvåfaktorskod krävs.', 'invalid_code' => 'Tvåfaktorskoden är ogiltig.', - 'enter_two_factor_code' => 'Please enter your two-factor authentication code.', - 'please_enroll' => 'Please enroll a device in two-factor authentication.', + 'enter_two_factor_code' => 'Ange din tvåfaktorsautentiseringskod.', + 'please_enroll' => 'Vänligen registrera en enhet med tvåfaktorsautentisering.', ), 'signin' => array( diff --git a/resources/lang/sv-SE/button.php b/resources/lang/sv-SE/button.php index 1b153d8d4bdf..94cd0f8483de 100644 --- a/resources/lang/sv-SE/button.php +++ b/resources/lang/sv-SE/button.php @@ -7,7 +7,7 @@ 'checkin_and_delete' => 'Checka in alla / ta bort användare', 'delete' => 'Radera', 'edit' => 'Ändra', - 'clone' => 'Clone', + 'clone' => 'Kopiera', 'restore' => 'Återställ', 'remove' => 'Ta bort', 'request' => 'Begäran', @@ -17,18 +17,18 @@ 'select_files' => 'Välj filer...', 'generate_labels' => '{1} Generera etikett|[2,*]] Generera etiketter', 'send_password_link' => 'Skicka länk för lösenordsåterställning', - 'go' => 'Gå', + 'go' => 'Kör', 'bulk_actions' => 'Massåtgärder', 'add_maintenance' => 'Inventarieunderhåll', 'append' => 'Lägg till', 'new' => 'Ny', 'var' => [ - 'clone' => 'Clone :item_type', - 'edit' => 'Edit :item_type', - 'delete' => 'Delete :item_type', - 'restore' => 'Restore :item_type', - 'create' => 'Create New :item_type', - 'checkout' => 'Checkout :item_type', - 'checkin' => 'Checkin :item_type', + 'clone' => 'Kopiera :item_type', + 'edit' => 'Redigera :item_type', + 'delete' => 'Ta bort :item_type', + 'restore' => 'Återställ :item_type', + 'create' => 'Skapa ny :item_type', + 'checkout' => 'Checka ut :item_type', + 'checkin' => 'Checka in :item_type', ] ]; diff --git a/resources/lang/sv-SE/general.php b/resources/lang/sv-SE/general.php index fdf9ae438046..622c1d9478bc 100644 --- a/resources/lang/sv-SE/general.php +++ b/resources/lang/sv-SE/general.php @@ -8,9 +8,9 @@ 'accessory' => 'Tillbehör', 'accessory_report' => 'Tillbehörsrapport', 'action' => 'Åtgärd', - 'activity_report' => 'Aktivitets Rapport', + 'activity_report' => 'Aktivitetsrapport', 'address' => 'Adress', - 'admin' => 'Administratör', + 'admin' => 'Admin', 'admin_tooltip' => 'Den här användaren har administratörsrättigheter', 'superuser' => 'Superanvändare', 'superuser_tooltip' => 'Den här användaren har superanvändarrättigheter', @@ -27,7 +27,7 @@ 'asset_tag' => 'Märkning av tillgångar', 'asset_tags' => 'Stöldnummer', 'assets_available' => 'Tillgängliga tillgångar', - 'accept_assets' => 'Acceptera tillgångar: namn', + 'accept_assets' => 'Accepterade tillgångar :namn', 'accept_assets_menu' => 'Accepterade tillgångar', 'audit' => 'Inventera', 'audit_report' => 'Inventeringsloggar', @@ -43,13 +43,13 @@ 'avatar_upload' => 'Ladda upp Avatar', 'back' => 'Bakåt', 'bad_data' => 'Inget hittat. Kanske dåliga data?', - 'bulkaudit' => 'Bulk Inventering', + 'bulkaudit' => 'Massinventering', 'bulkaudit_status' => 'Inventeringsstatus', - 'bulk_checkout' => 'Bulk Checkout', + 'bulk_checkout' => 'Massutcheckning', 'bulk_edit' => 'Massredigera', 'bulk_delete' => 'Massradering', 'bulk_actions' => 'Massåtgärder', - 'bulk_checkin_delete' => 'Bulk Checkin / Ta bort användare', + 'bulk_checkin_delete' => 'Massincheckning / Ta bort användare', 'byod' => 'BYOD', 'byod_help' => 'Denna enhet ägs av användaren', 'bystatus' => 'efter status', @@ -73,14 +73,14 @@ 'company' => 'Företag', 'component' => 'Komponent', 'components' => 'Komponenter', - 'complete' => 'Komplett', + 'complete' => 'Slutförd', 'consumable' => 'Förbrukningsmaterial', 'consumables' => 'Förbrukningsmaterial', 'country' => 'Land', 'could_not_restore' => 'Fel vid återställning av :item_type: :error', 'not_deleted' => ':item_type blev inte borttagen och kan därför inte återställd', 'create' => 'Skapa Ny', - 'created' => 'Artikel skapad', + 'created' => 'Objekt skapat', 'created_asset' => 'skapa tillgång', 'created_at' => 'Skapad den', 'created_by' => 'Skapad av', @@ -98,7 +98,7 @@ 'debug_warning' => 'Varning!', 'debug_warning_text' => 'Programmet körs i produktionsläge med debugging aktiverat. Detta kan avslöja känslig data om din ansökan är tillgänglig för omvärlden. Inaktivera felsökningsläge genom att ange värdet APP_DEBUG i filen .env till false.', 'delete' => 'Ta bort', - 'delete_confirm' => 'Är du säker på att du vill radera: föremål?', + 'delete_confirm' => 'Är du säker på att du vill radera :item?', 'delete_confirm_no_undo' => 'Är du säker på att du vill ta bort :item? Detta kan inte ångras.', 'deleted' => 'Raderad', 'delete_seats' => 'Borttagna platser', @@ -112,7 +112,7 @@ 'details' => 'Information', 'download' => 'Ladda ner', 'download_all' => 'Ladda ned alla', - 'editprofile' => 'Ändra Din Profil', + 'editprofile' => 'Ändra din profil', 'eol' => 'EOL', 'email_domain' => 'E-postdomän', 'email_format' => 'E-postformat', @@ -169,7 +169,7 @@ 'asset_maintenance' => 'Underhåll av tillgångar', 'asset_maintenance_report' => 'Asset Maintenance Report', 'asset_maintenances' => 'Asset Maintenances', - 'item' => 'Artikel', + 'item' => 'Objekt', 'item_name' => 'Objektnamn', 'import_file' => 'importera CSV-fil', 'import_type' => 'CSV importtyp', @@ -200,7 +200,7 @@ 'markdown' => 'Detta fält tillåter Github smaksatt markdown.', 'min_amt' => 'Min. ANTAL', 'min_amt_help' => 'Minsta antal objekt som ska vara tillgängliga innan en varning utlöses. Lämna Min. QTY tomt om du inte vill få varningar för lågt lager.', - 'model_no' => 'modell nr.', + 'model_no' => 'Modell nr.', 'months' => 'månader', 'moreinfo' => 'Mer information', 'name' => 'Namn', @@ -241,13 +241,13 @@ 'restored' => 'återställd', 'restore' => 'Återställ', 'requestable_models' => 'Begärbara modeller', - 'requestable_items' => 'Begärbara saker', + 'requestable_items' => 'Begärbara objekt', 'requested' => 'Begärda', 'requested_date' => 'Begärt datum', 'requested_assets' => 'Begärda tillgångar', 'requested_assets_menu' => 'Begärda tillgångar', 'request_canceled' => 'Förfrågan annulleras', - 'request_item' => 'Begär denna artikel', + 'request_item' => 'Begär detta objekt', 'external_link_tooltip' => 'Extern länk till', 'save' => 'Spara', 'select_var' => 'Välj :thing... ', // this will eventually replace all of our other selects @@ -275,7 +275,7 @@ 'signed_off_by' => 'Signerad av', 'skin' => 'Skal', 'webhook_msg_note' => 'Ett meddelande kommer att skickas via webhook', - 'webhook_test_msg' => 'Där ser man! Ser ut som din :app integrering med Snipe-IT fungerar!', + 'webhook_test_msg' => 'Snyggt! Det ser ut som din :app integrering med Snipe-IT fungerar!', 'some_features_disabled' => 'DEMO MODE: Vissa funktioner är inaktiverade för den här installationen.', 'site_name' => 'Sidnamn', 'state' => 'stat', @@ -326,7 +326,7 @@ 'token_expired' => 'Din formulärperiod har löpt ut. Var god försök igen.', 'login_enabled' => 'Inloggning aktiverad', 'audit_due' => 'Nästa inventering', - 'audit_due_days' => 'Tillgångar som ska granskas inom :days Day|Tillgångar som ska granskas inom :days Days', + 'audit_due_days' => 'Tillgångar som ska granskas inom :days Day|Tillgångar som ska granskas inom :days dagar', 'checkin_due' => 'Klar för incheckning', 'checkin_overdue' => 'Förfallen för incheckning', 'checkin_due_days' => 'Tillgångar som förfaller för incheckning inom :days Day|Tillgångar som förfaller för incheckning inom :days Days', @@ -376,7 +376,7 @@ 'ldap_user_sync' => 'LDAP användarsynkronisering', 'synchronize' => 'Synkronisera', 'sync_results' => 'Synkronisering Resultat', - 'license_serial' => 'Seriell/produktnyckel', + 'license_serial' => 'Serie/produktnyckel', 'invalid_category' => 'Ogiltig eller saknad kategori', 'invalid_item_category_single' => 'Ogiltig eller saknad :type kategori. Vänligen uppdatera kategorin för denna :type för att inkludera en giltig kategori innan du checkar ut.', 'dashboard_info' => 'Detta är din instrumentpanel. Det finns många som det, men den här är din.', @@ -406,9 +406,9 @@ 'consumable_name' => 'Namn på förbrukningsvara:', 'accessory_information' => 'Information om tillgång:', 'accessory_name' => 'Tillbehörsnamn:', - 'clone_item' => 'Klona objekt', - 'checkout_tooltip' => 'Låna utdetta objekt', - 'checkin_tooltip' => 'Checka in denna artikel så den blir tillgänglig för återanvändning, återbildning, osv', + 'clone_item' => 'Kopiera objekt', + 'checkout_tooltip' => 'Checka ut detta objekt', + 'checkin_tooltip' => 'Checka in detta objekt så den blir tillgänglig för återanvändning, återskapning, osv', 'checkout_user_tooltip' => 'Låna utdetta objekt till en användare', 'checkin_to_diff_location' => 'Du kan välja att checka in denna tillgång till en annan plats än tillgångens standardplats :default_location om en sådan är satt', 'maintenance_mode' => 'Tjänsten är för tillfället inte tillgänglig för systemuppdateringar. Kontrollera igen senare.', @@ -428,7 +428,7 @@ 'assets_by_status_type' => 'Tillgångar efter statustyp', 'pie_chart_type' => 'Instrumentpanelens cirkeldiagrams typ', 'hello_name' => 'Hej, :name!', - 'unaccepted_profile_warning' => 'Du har en artikel som kräver godkännande. Klicka här för att acceptera eller avböja det | Du har :count artiklar som kräver godkännande. Klicka här för att acceptera eller avböja dem', + 'unaccepted_profile_warning' => 'Du har ett objekt som kräver godkännande. Klicka här för att acceptera eller avböja det | Du har :count objekt som kräver godkännande. Klicka här för att acceptera eller avböja dem', 'start_date' => 'Startdatum', 'end_date' => 'Slutdatum', 'alt_uploaded_image_thumbnail' => 'Uppladdad miniatyrbild', @@ -471,20 +471,20 @@ 'errors_importing' => 'Några fel inträffade vid import: ', 'warning' => 'VARNING: :warning', 'success_redirecting' => '"Lyckades... Omdirigerar.', - 'cancel_request' => 'Avbryt den här begäran om objekt', + 'cancel_request' => 'Avbryt objektbegäran', 'setup_successful_migrations' => 'Dina databastabeller har skapats', - 'setup_migration_output' => 'Migrationsresultat:', + 'setup_migration_output' => 'Migreringssresultat:', 'setup_migration_create_user' => 'Nästa: Skapa användare', 'importer_generic_error' => 'Din filimport är klar, men vi fick ett fel. Detta orsakas vanligtvis av tredje parts API strypning från en anmälan webhook (såsom Slack) och skulle inte ha stört själva importen, men du bör bekräfta detta.', 'confirm' => 'Bekräfta', 'autoassign_licenses' => 'Auto-tilldela licenser', - 'autoassign_licenses_help' => 'Tillåt den här användaren att få licencer tilldelade via bulk-tilldelnings gränssnittet eller via cli verktyg.', - 'autoassign_licenses_help_long' => 'Detta gör det möjligt för en användare att ha licenser tilldelade via bulk-tilldela licens UI eller cli verktyg. (Du kanske till exempel inte vill att entreprenörerna ska tilldelas en licens som du skulle tillhandahålla till endast personalmedlemmar. Du kan fortfarande individuellt tilldela licenser till dessa användare, men de kommer inte att inkluderas i Tilldela licens för alla användarfunktioner.)', - 'no_autoassign_licenses_help' => 'Inkludera inte användare för bulk-tilldelning genom licens UI eller cli verktyg.', + 'autoassign_licenses_help' => 'Tillåt den här användaren att få licencer tilldelade via masstilldelningsgränssnittet för licenser eller via cli verktyg.', + 'autoassign_licenses_help_long' => 'Detta gör det möjligt för en användare att ha licenser tilldelade via masstilldelningsgränssnittet eller cli verktyg. (Du kanske till exempel inte vill att tredje part ska tilldelas en licens som du skulle tillhandahållit en andra part. Du kan fortfarande individuellt tilldela licenser till dessa användare, men de kommer inte att inkluderas i Tilldela licens för alla användarfunktioner.)', + 'no_autoassign_licenses_help' => 'Inkludera inte användare för masstilldelning genom licensgränssnittet eller cli verktyg.', 'modal_confirm_generic' => 'Är du säker?', - 'cannot_be_deleted' => 'Det här objektet kan inte raderas', + 'cannot_be_deleted' => 'Detta objekt kan inte raderas', 'cannot_be_edited' => 'Detta objekt kan inte redigeras.', - 'undeployable_tooltip' => 'Det här objektet kan inte checkas ut. Kolla antalet kvar.', + 'undeployable_tooltip' => 'Detta objekt kan inte checkas ut. Kontrollera antal kvar i lager.', 'serial_number' => 'Serienummer', 'item_notes' => ':item noteringar', 'item_name_var' => ':item namn', @@ -536,11 +536,11 @@ 'bulk' => [ 'delete' => [ - 'header' => 'Bulk Ta bort :object_type', - 'warn' => 'Du håller på att ta bort ett :object_type Du håller på att ta bort :count :object_type', + 'header' => 'Massradera :object_type', + 'warn' => 'Du är påväg att ta bort ett :object_type|Du är påväg att ta bort :count :object_type', 'success' => ':object_type har tagits bort framgångsrikt|:count :object_type har tagits bort framgångsrikt', 'error' => 'Kunde inte ta bort :object_type', - 'nothing_selected' => 'Inga :object_type valda - inget att göra', + 'nothing_selected' => 'Inga :object_type valda - inget mer att utföra', 'partial' => 'Borttagna :success_count :object_type, men :error_count :object_type kunde inte tas bort', ], ], @@ -555,12 +555,12 @@ 'components' => ':count Component|:count Komponenter', ], 'more_info' => 'Mer information', - 'quickscan_bulk_help' => 'Markering av denna ruta kommer att justera tillgångshistoriken till att visa den nya platsen. Om du lämnar rutan omarkerad noteras platsen i inventeringsloggen. Observera om tillgången är utcheckad kommer inte ändringar hos personen, tillgången eller platsen att göras.', + 'quickscan_bulk_help' => 'Markering av denna ruta kommer att justera tillgångshistoriken till att visa den nya platsen. Om du lämnar rutan omarkerad noteras platsen i inventeringsloggen. Observera att om tillgången är utcheckad kommer inte ändringar hos användaren, tillgången eller platsen att göras.', 'whoops' => 'Hoppsan!', 'something_went_wrong' => 'Något gick fel med din begäran.', 'close' => 'Stäng', 'expires' => 'Utgår', - 'map_fields'=> 'Map :item_type Fields', + 'map_fields'=> 'Koppla :item_type Fält', 'remaining_var' => ':count Återstående', 'label' => 'Etikett', 'import_asset_tag_exists' => 'En tillgång med tillgångstaggen :asset_tag finns redan och en uppdatering begärdes inte. Ingen ändring gjordes.', diff --git a/resources/lang/sv-SE/localizations.php b/resources/lang/sv-SE/localizations.php index 58b382bba387..09e3f7789b83 100644 --- a/resources/lang/sv-SE/localizations.php +++ b/resources/lang/sv-SE/localizations.php @@ -2,7 +2,7 @@ return [ - 'select_language' => 'Select a Language', + 'select_language' => 'Välj ett språk', 'languages' => [ 'en-US'=> 'Engelska, USA', 'en-GB'=> 'Engelska, Storbritannien', @@ -41,7 +41,7 @@ 'mi-NZ'=> 'Maori', 'mn-MN'=> 'Mongoliska', //'no-NO'=> 'Norwegian', - 'nb-NO'=> 'Norwegian Bokmål', + 'nb-NO'=> 'Norsk bokmål', //'nn-NO'=> 'Norwegian Nynorsk', 'fa-IR'=> 'Persiska', 'pl-PL'=> 'Polska', @@ -68,7 +68,7 @@ 'zu-ZA'=> 'Zulu', ], - 'select_country' => 'Select a Country', + 'select_country' => 'Välj ett land', 'countries' => [ 'AC'=>'Ön Ascension', @@ -234,7 +234,7 @@ 'NG'=>'Nigeria', 'NI'=>'Nicaragua', 'NL'=>'Nederländerna', - 'GB-NIR' => 'Northern Ireland', + 'GB-NIR' => 'Nordirland', 'NO'=>'Norge', 'NP'=>'Nepal', 'NR'=>'Nauru', diff --git a/resources/lang/sv-SE/mail.php b/resources/lang/sv-SE/mail.php index 2c082759f53a..e3027986e3db 100644 --- a/resources/lang/sv-SE/mail.php +++ b/resources/lang/sv-SE/mail.php @@ -23,7 +23,7 @@ 'Item_Requested' => 'Artikel som begärs', 'License_Checkin_Notification' => 'Licensen har checkats in', 'License_Checkout_Notification' => 'Licens utcheckad', - 'license_for' => 'License for', + 'license_for' => 'Licens för', 'Low_Inventory_Report' => 'Meddelande om lågt lagersaldo', 'a_user_canceled' => 'En användare har avbrutit en artikelförfrågan på webbplatsen', 'a_user_requested' => 'En användare har efterfrågat en artikel webbplatsen', @@ -41,7 +41,7 @@ 'best_regards' => 'Vänliga hälsningar,', 'canceled' => 'Avbruten', 'checkin_date' => 'Incheckningsdatum', - 'checkout_date' => 'Checkout Date', + 'checkout_date' => 'Utcheckningsdatum', 'checkedout_from' => 'Checkade ut från', 'checkedin_from' => 'Incheckad från', 'checked_into' => 'Incheckad', @@ -50,17 +50,17 @@ 'click_to_confirm' => 'Vänligen klicka på följande länk för att bekräfta ditt: webbkonto:', 'current_QTY' => 'Nuvarande antal', 'days' => 'dagar', - 'expecting_checkin_date' => 'Förväntad incheckningsdatum', + 'expecting_checkin_date' => 'Förväntat incheckningsdatum', 'expires' => 'Utgår', 'hello' => 'Hallå', 'hi' => 'Hej', 'i_have_read' => 'Jag har läst och godkänt användarvillkoren och har fått den här produkten.', 'inventory_report' => 'Inventarierapport', 'item' => 'Artikel', - 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', + 'item_checked_reminder' => 'Detta är en påminnelse om att du för närvarande har :count objekt utcheckade till dig som du inte har accepterat eller nekat. Klicka på länken nedan för att bekräfta ditt beslut.', 'license_expiring_alert' => ':count licens löper ut inom :threshold dagar.|:count licenser löper ut inom :threshold days.', 'link_to_update_password' => 'Vänligen klicka på följande länk för att uppdatera ditt: webblösenord:', - 'login' => 'Logga in:', + 'login' => 'Logga in', 'login_first_admin' => 'Logga in på din nya Snipe-IT-installation med hjälp av inloggningsuppgifterna nedan:', 'low_inventory_alert' => ':count artikel understiger det lägsta tillåtna lagersaldot eller håller på att ta slut.|:count artiklar understiger det lägsta tillåtna lagersaldot eller håller på att ta slut.', 'min_QTY' => 'Min. antal', @@ -81,17 +81,17 @@ 'supplier' => 'Leverantör', 'tag' => 'Tagg', 'test_email' => 'Testa e-post från Snipe-IT', - 'test_mail_text' => 'Detta är ett test från Snipe-IT Asset Management System. Om du får detta, så fungerar mailen :)', + 'test_mail_text' => 'Detta är ett test från Snipe-IT Asset Management System. Om du får detta så fungerar mejlen :)', 'the_following_item' => 'Följande artikel har blivit incheckad: ', 'to_reset' => 'För att återställa ditt :web lösenord, fyll i det här formuläret:', 'type' => 'Typ', 'upcoming-audits' => 'Det finns :count tillgång som kommer upp för revision inom :threshold days.|Det finns :count tillgångar som kommer upp för revision inom :threshold dagar.', 'user' => 'Användare', 'username' => 'Användarnamn', - 'unaccepted_asset_reminder' => 'You have Unaccepted Assets.', + 'unaccepted_asset_reminder' => 'Du har oaccepterade tillgångar.', 'welcome' => 'Välkommen: namn', - 'welcome_to' => 'Välkommen till: web!', + 'welcome_to' => 'Välkommen till :web!', 'your_assets' => 'Visa dina tillgångar', 'your_credentials' => 'Dina Snipe-IT användaruppgifter', - 'mail_sent' => 'Mail sent successfully!', + 'mail_sent' => 'E-post har skickats!', ]; diff --git a/resources/lang/sv-SE/table.php b/resources/lang/sv-SE/table.php index 40a20a319da2..811bfc3981fb 100644 --- a/resources/lang/sv-SE/table.php +++ b/resources/lang/sv-SE/table.php @@ -6,6 +6,6 @@ 'action' => 'Handling', 'by' => 'Av', 'item' => 'Artikel', - 'no_matching_records' => 'No matching records found', + 'no_matching_records' => 'Inga matchande resultat', ); diff --git a/resources/lang/sv-SE/validation.php b/resources/lang/sv-SE/validation.php index 257899a3aaae..57b9e15ef224 100644 --- a/resources/lang/sv-SE/validation.php +++ b/resources/lang/sv-SE/validation.php @@ -13,148 +13,148 @@ | */ - 'accepted' => 'The :attribute field must be accepted.', - 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', - 'active_url' => 'The :attribute field must be a valid URL.', - 'after' => 'The :attribute field must be a date after :date.', - 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', - 'alpha' => 'The :attribute field must only contain letters.', - 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', - 'alpha_num' => 'The :attribute field must only contain letters and numbers.', - 'array' => 'The :attribute field must be an array.', - 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', - 'before' => 'The :attribute field must be a date before :date.', - 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', + 'accepted' => ':attribute-fältet måste accepteras.', + 'accepted_if' => ':attribute-fältet måste accepteras när :other är :value.', + 'active_url' => ':attribute-fältet måste vara en giltig URL.', + 'after' => ':attribute-fältet måste vara ett datum efter :date.', + 'after_or_equal' => ':attribute-fältet-fältet måste vara ett datum efter eller samma som :date.', + 'alpha' => ':attribute-fältet får endast innehålla bokstäver.', + 'alpha_dash' => ':attribute-fältet får endast innehålla bokstäver, siffror, bindestreck eller understreck.', + 'alpha_num' => ':attribute-fältet får endast innehålla bokstäver och siffror.', + 'array' => ':attribute-fältet måste vara en array.', + 'ascii' => ':attribute-fältet får endast innehålla en single-byte alfanumeriska tecken och symboler.', + 'before' => ':attribute-fältet måste vara ett datum före :date.', + 'before_or_equal' => ':attribute-fältet måste vara ett datum före eller samma som :date.', 'between' => [ - 'array' => 'The :attribute field must have between :min and :max items.', - 'file' => 'The :attribute field must be between :min and :max kilobytes.', - 'numeric' => 'The :attribute field must be between :min and :max.', - 'string' => 'The :attribute field must be between :min and :max characters.', + 'array' => ':attribute-fältet måste ha mellan :min och :max artiklar.', + 'file' => ':attribute-fältet måste vara mellan :min och :max kilobyte.', + 'numeric' => ':attribute-fältet måste vara mellan :min och :max.', + 'string' => ':attribute-fältet måste vara mellan :min och :max tecken.', ], 'boolean' => 'Attributfältet måste vara sant eller felaktigt.', - 'can' => 'The :attribute field contains an unauthorized value.', - 'confirmed' => 'The :attribute field confirmation does not match.', - 'contains' => 'The :attribute field is missing a required value.', - 'current_password' => 'The password is incorrect.', - 'date' => 'The :attribute field must be a valid date.', - 'date_equals' => 'The :attribute field must be a date equal to :date.', - 'date_format' => 'The :attribute field must match the format :format.', - 'decimal' => 'The :attribute field must have :decimal decimal places.', - 'declined' => 'The :attribute field must be declined.', - 'declined_if' => 'The :attribute field must be declined when :other is :value.', - 'different' => 'The :attribute field and :other must be different.', - 'digits' => 'The :attribute field must be :digits digits.', - 'digits_between' => 'The :attribute field must be between :min and :max digits.', - 'dimensions' => 'The :attribute field has invalid image dimensions.', + 'can' => ':attribute-fältet innehåller ett otillåtet värde.', + 'confirmed' => ':attribute-fältets bekräftelse matchar inte.', + 'contains' => ':attribute-fältet saknar ett obligatoriskt värde.', + 'current_password' => 'Lösenordet är felaktigt.', + 'date' => ':attribute-fältet måste ha ett giltigt datum.', + 'date_equals' => ':attribute-fältets datum måste vara samma som :date.', + 'date_format' => ':attribute-fältet måste matcha formatet :format.', + 'decimal' => ':attribute-fältet måste ha :decimal decimaltecken.', + 'declined' => ':attribute-fältet måste nekas.', + 'declined_if' => ':attribute-fältet måste nekas när :other är :value.', + 'different' => ':attribute-fältet och :annat måste vara unika.', + 'digits' => ':attribute-fältet måste vara :digits siffror.', + 'digits_between' => ':attribute-fältet måste vara mellan :min och :max siffror.', + 'dimensions' => ':attribute-fältet has inkorrekta bilddimensioner.', 'distinct' => ':attribute fältet har samma värde.', - 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', - 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', - 'email' => 'The :attribute field must be a valid email address.', - 'ends_with' => 'The :attribute field must end with one of the following: :values.', + 'doesnt_end_with' => ':attribute-fältet får inte sluta med en av följande värden: :values.', + 'doesnt_start_with' => ':attribute-fältet får inte börja med en av följande värden: :values.', + 'email' => ':attribute-fältet måste vara en giltig e-postadress.', + 'ends_with' => ':attribute-fältet måste sluta med en av följande värden: :values.', 'enum' => 'Det valda :attribute är ogiltigt.', 'exists' => 'Det valda :attribute är ogiltigt.', - 'extensions' => 'The :attribute field must have one of the following extensions: :values.', - 'file' => 'The :attribute field must be a file.', + 'extensions' => ':attribute-fältet måste ha någon av följande tillval: :values.', + 'file' => ':attribute-fältet måste vara en fil.', 'filled' => ':attribute fältet måste ha ett värde.', 'gt' => [ - 'array' => 'The :attribute field must have more than :value items.', - 'file' => 'The :attribute field must be greater than :value kilobytes.', - 'numeric' => 'The :attribute field must be greater than :value.', - 'string' => 'The :attribute field must be greater than :value characters.', + 'array' => ':attribute-fältet måste ha mer än :value artiklar.', + 'file' => ':attribute-fältet måste vara större än :value kilobyte.', + 'numeric' => ':attribute-fältet måste vara större än :value.', + 'string' => ':attribute-fältet måste vara större än :value tecken.', ], 'gte' => [ - 'array' => 'The :attribute field must have :value items or more.', - 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', - 'numeric' => 'The :attribute field must be greater than or equal to :value.', - 'string' => 'The :attribute field must be greater than or equal to :value characters.', + 'array' => ':attribute-fältet måste ha :value artiklar eller fler.', + 'file' => ':attribute-fältet måste vara större än eller lika med :value kilobyte.', + 'numeric' => ':attribute-fältet måste vara större än eller lika med :value.', + 'string' => ':attribute-fältet måste vara större än eller lika med :value tecken.', ], - 'hex_color' => 'The :attribute field must be a valid hexadecimal color.', - 'image' => 'The :attribute field must be an image.', + 'hex_color' => ':attribute-fältet måste vara en giltig hexadecimalfärg.', + 'image' => ':attribute-fältet måste vara en bild.', 'import_field_empty' => 'Värdet för :fieldname kan inte vara noll.', 'in' => 'Det valda :attribute är ogiltigt.', - 'in_array' => 'The :attribute field must exist in :other.', - 'integer' => 'The :attribute field must be an integer.', - 'ip' => 'The :attribute field must be a valid IP address.', - 'ipv4' => 'The :attribute field must be a valid IPv4 address.', - 'ipv6' => 'The :attribute field must be a valid IPv6 address.', - 'json' => 'The :attribute field must be a valid JSON string.', - 'list' => 'The :attribute field must be a list.', - 'lowercase' => 'The :attribute field must be lowercase.', + 'in_array' => ':attribute-fältet måste existera i :other.', + 'integer' => ':attribute-fältet måste vara en integer.', + 'ip' => ':attribute-fältet måste vara en giltig IP-adress.', + 'ipv4' => ':attribute-fältet måste vara en giltig IPv4-adress.', + 'ipv6' => ':attribute-fältet måste vara en giltig IPv6-adress.', + 'json' => ':attribute-fältet måste vara en giltig JSON-sträng.', + 'list' => ':attribute-fältet måste vara en lista.', + 'lowercase' => ':attribute-fältet måste skrivas med gemener.', 'lt' => [ - 'array' => 'The :attribute field must have less than :value items.', - 'file' => 'The :attribute field must be less than :value kilobytes.', - 'numeric' => 'The :attribute field must be less than :value.', - 'string' => 'The :attribute field must be less than :value characters.', + 'array' => ':attribute-fältet måste ha färre än :value artiklar.', + 'file' => ':attribute-fältet måste vara mindre än :value kilobyte.', + 'numeric' => ':attribute-fältet måste vara mindre än :value.', + 'string' => ':attribute-fältet måste vara färre än :value tecken.', ], 'lte' => [ - 'array' => 'The :attribute field must not have more than :value items.', - 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', - 'numeric' => 'The :attribute field must be less than or equal to :value.', - 'string' => 'The :attribute field must be less than or equal to :value characters.', + 'array' => ':attribute-fältet får inte ha fler än :value artiklar.', + 'file' => ':attribute-fältet måste vara mindre än eller lika med :value kilobyte.', + 'numeric' => ':attribute-fältet måste vara mindre än eller lika med :value.', + 'string' => ':attribute-fältet måste vara färre än eller lika med :value tecken.', ], - 'mac_address' => 'The :attribute field must be a valid MAC address.', + 'mac_address' => ':attribute-fältet måste vara en giltig MAC-adress.', 'max' => [ - 'array' => 'The :attribute field must not have more than :max items.', - 'file' => 'The :attribute field must not be greater than :max kilobytes.', - 'numeric' => 'The :attribute field must not be greater than :max.', - 'string' => 'The :attribute field must not be greater than :max characters.', + 'array' => ':attribute-fältet får inte ha fler än :max artiklar.', + 'file' => ':attribute-fältet får inte vara större än :max kilobyte.', + 'numeric' => ':attribute-fältet får inte vara större än :max.', + 'string' => ':attribute-fältet får inte vara fler än :max tecken.', ], - 'max_digits' => 'The :attribute field must not have more than :max digits.', - 'mimes' => 'The :attribute field must be a file of type: :values.', - 'mimetypes' => 'The :attribute field must be a file of type: :values.', + 'max_digits' => ':attribute-fältet får inte ha fler än :max siffror.', + 'mimes' => ':attribute-fältet måste vara av filtyp: :values.', + 'mimetypes' => ':attribute-fältet måste vara av filtyp: :values.', 'min' => [ - 'array' => 'The :attribute field must have at least :min items.', - 'file' => 'The :attribute field must be at least :min kilobytes.', - 'numeric' => 'The :attribute field must be at least :min.', - 'string' => 'The :attribute field must be at least :min characters.', + 'array' => ':attribute-fältet måste ha färre än :min artiklar.', + 'file' => ':attribute-fältet måste vara minst :min kilobyte.', + 'numeric' => ':attribute-fältet måste vara minst :min.', + 'string' => ':attribute-fältet måste innehålla minst :min tecken.', ], - 'min_digits' => 'The :attribute field must have at least :min digits.', - 'missing' => 'The :attribute field must be missing.', - 'missing_if' => 'The :attribute field must be missing when :other is :value.', - 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', - 'missing_with' => 'The :attribute field must be missing when :values is present.', - 'missing_with_all' => 'The :attribute field must be missing when :values are present.', - 'multiple_of' => 'The :attribute field must be a multiple of :value.', + 'min_digits' => ':attribute-fältet måste vara minst :min siffror.', + 'missing' => ':attribute-fältet måste vara tom.', + 'missing_if' => ':attribute-fältet måste vara tom när :other är :value.', + 'missing_unless' => ':attribute-fältet måste vara tom om inte :other är :value.', + 'missing_with' => ':attribute-fältet måste vara tom när :values finns.', + 'missing_with_all' => ':attribute-fältet måste vara tom när :values finns.', + 'multiple_of' => ':attribute-fältet måste vara multipel av :value.', 'not_in' => 'Det valda :attribute är ogiltigt.', - 'not_regex' => 'The :attribute field format is invalid.', - 'numeric' => 'The :attribute field must be a number.', + 'not_regex' => ':attribute-fältets format är ogiltigt.', + 'numeric' => ':attribute-fältet måste vara ett nummer.', 'password' => [ - 'letters' => 'The :attribute field must contain at least one letter.', - 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', - 'numbers' => 'The :attribute field must contain at least one number.', - 'symbols' => 'The :attribute field must contain at least one symbol.', - 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + 'letters' => ':attribute-fältet måste innehålla minst en bokstav.', + 'mixed' => ':attribute-fältet måste innehåller minst en stor och en liten bokstav.', + 'numbers' => ':attribute-fältet måste innehålla minst ett nummer.', + 'symbols' => ':attribute-fältet måste innehåll minst en symbol.', + 'uncompromised' => ':attribute-fältet har upptäckts i en dataläcka. Vänligen ange ett annat :attribute.', ], - 'percent' => 'The depreciation minimum must be between 0 and 100 when depreciation type is percentage.', + 'percent' => 'Avskrivningsminimum måste vara mellan 0 och 100 när avskrivningstypen är i procent.', 'present' => ':attribute fältet måste finnas.', - 'present_if' => 'The :attribute field must be present when :other is :value.', - 'present_unless' => 'The :attribute field must be present unless :other is :value.', - 'present_with' => 'The :attribute field must be present when :values is present.', - 'present_with_all' => 'The :attribute field must be present when :values are present.', - 'prohibited' => 'The :attribute field is prohibited.', - 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', - 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', - 'prohibits' => 'The :attribute field prohibits :other from being present.', - 'regex' => 'The :attribute field format is invalid.', + 'present_if' => ':attribute-fältet måste vara ifyllt om :other är :value.', + 'present_unless' => ':attribute-fältet måste vara ifyllt så länge inte :other är :value.', + 'present_with' => ':attribute-fältet måste vara ifyllt om :values är angivet.', + 'present_with_all' => ':attribute-fältet måste vara ifyllt om :values är angivna.', + 'prohibited' => ':attribute-fältet är förbjudet.', + 'prohibited_if' => ':attribute-fältet är förbjudet när :other är :value.', + 'prohibited_unless' => ':attribute-fältet är förbjudet om inte :other finns i :values.', + 'prohibits' => ':attribute-fältet förbjuder :other från att vara angivet.', + 'regex' => ':attribute-fältets format är ogiltigt.', 'required' => 'Fältet: :attribute är obligatoriskt.', - 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_array_keys' => ':attribute-fältet måste innehålla värden för: :values.', 'required_if' => 'Fältet :attribute krävs när :other är :value.', - 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', - 'required_if_declined' => 'The :attribute field is required when :other is declined.', + 'required_if_accepted' => ':attribute-fältet är obligatoriskt när :other är accepterat.', + 'required_if_declined' => ':attribute-fältet är obligatoriskt om :other är nekat.', 'required_unless' => 'Fältet :attribute krävs om inte :other anges i :values.', 'required_with' => 'Fältet :attribute krävs när :values angivits.', - 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_with_all' => ':attribute-fältet är obligatoriskt när :values är angivet.', 'required_without' => 'Fältet :attribute krävs när :values saknas.', 'required_without_all' => 'Fältet :attribute krävs när inga :values har angetts.', - 'same' => 'The :attribute field must match :other.', + 'same' => ':attribute-fältet måste matcha :other.', 'size' => [ - 'array' => 'The :attribute field must contain :size items.', - 'file' => 'The :attribute field must be :size kilobytes.', - 'numeric' => 'The :attribute field must be :size.', - 'string' => 'The :attribute field must be :size characters.', + 'array' => ':attribute-fältet måste innehålla :size objekt.', + 'file' => ':attribute-fältet måste vara :size kilobyte.', + 'numeric' => ':attribute-fältet måste vara :size.', + 'string' => ':attribute-fältet måste vara :size tecken.', ], - 'starts_with' => 'The :attribute field must start with one of the following: :values.', + 'starts_with' => ':attribute-fältet måste starta med minst ett av följande: :values.', 'string' => ':attribute måste vara en sträng.', 'two_column_unique_undeleted' => ':attribute måste vara unikt i :table1 och :table2. ', 'unique_undeleted' => ':attribute måste vara unikt.', @@ -165,13 +165,13 @@ 'numbers' => 'Lösenord måste innehålla minst en siffra.', 'case_diff' => 'Lösenordet måste innehålla både versaler och gemener.', 'symbols' => 'Lösenordet måste innehålla symboler.', - 'timezone' => 'The :attribute field must be a valid timezone.', + 'timezone' => ':attribute-fältet måste vara en giltig tidszon.', 'unique' => ':attribute är upptaget.', 'uploaded' => 'Uppladdningen av :attribute misslyckades.', - 'uppercase' => 'The :attribute field must be uppercase.', - 'url' => 'The :attribute field must be a valid URL.', - 'ulid' => 'The :attribute field must be a valid ULID.', - 'uuid' => 'The :attribute field must be a valid UUID.', + 'uppercase' => ':attribute-fältet måste vara versaler.', + 'url' => ':attribute-fältet måste vara en giltig URL.', + 'ulid' => ':attribute-fältet måste vara ett giltigt ULID.', + 'uuid' => ':attribute-fältet måste vara ett giltigt UUID.', /* @@ -191,8 +191,8 @@ 'hashed_pass' => 'Ditt nuvarande lösenord är felaktigt', 'dumbpwd' => 'Det angivna lösenordet är för vanligt.', 'statuslabel_type' => 'Du måste ange en giltig typ av statusetikett', - 'custom_field_not_found' => 'This field does not seem to exist, please double check your custom field names.', - 'custom_field_not_found_on_model' => 'This field seems to exist, but is not available on this Asset Model\'s fieldset.', + 'custom_field_not_found' => 'Detta fält verkar inte existera, vänligen dubbelkolla dina anpassade fält.', + 'custom_field_not_found_on_model' => 'Detta fält verkar existera, men är inte tillgängligt på denna tillgångsmodells fältuppsättning.', // date_format validation with slightly less stupid messages. It duplicates a lot, but it gets the job done :( // We use this because the default error message for date_format reflects php Y-m-d, which non-PHP @@ -209,10 +209,10 @@ 'invalid_value_in_field' => 'Ogiltigt värde som ingår i detta fält', 'ldap_username_field' => [ - 'not_in' => 'sAMAccountName (mixed case) will likely not work. You should use samaccountname (lowercase) instead.' + 'not_in' => 'sAMAccountName (blandade gemener och versaler) kommer sannolikt inte att fungera. Du bör använda samaccountname (gemener) istället.' ], - 'ldap_auth_filter_query' => ['not_in' => 'uid=samaccountname is probably not a valid auth filter. You probably want uid= '], - 'ldap_filter' => ['regex' => 'This value should probably not be wrapped in parentheses.'], + 'ldap_auth_filter_query' => ['not_in' => 'uid=samaccountname är förmodligen inte ett giltigt aut-filter. Du vill förmodligen ha uid= '], + 'ldap_filter' => ['regex' => 'Detta värde bör förmodligen inte vara inom parantes.'], ], /* @@ -237,8 +237,8 @@ 'generic' => [ 'invalid_value_in_field' => 'Ogiltigt värde som ingår i detta fält', - 'required' => 'This field is required', - 'email' => 'Please enter a valid email address', + 'required' => 'Detta fält är obligatoriskt', + 'email' => 'Vänligen ange en giltig e-postadress', ], diff --git a/resources/lang/ta-IN/admin/hardware/message.php b/resources/lang/ta-IN/admin/hardware/message.php index c1551e660d68..b9058ed0bdca 100644 --- a/resources/lang/ta-IN/admin/hardware/message.php +++ b/resources/lang/ta-IN/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'சொத்து இல்லை.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'சொத்து இல்லை.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'இந்த சொத்து தற்போது ஒரு பயனர் வெளியே சோதிக்கப்பட்டது மற்றும் நீக்க முடியாது. முதலில் சொத்தை சரிபார்த்து, மீண்டும் நீக்கி முயற்சிக்கவும்.', + 'assoc_users' => 'இந்த சொத்து தற்போது ஒரு பயனர் வெளியே சோதிக்கப்பட்டது மற்றும் நீக்க முடியாது. முதலில் சொத்தை சரிபார்த்து, மீண்டும் நீக்கி முயற்சிக்கவும்.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'சொத்து உருவாக்கப்படவில்லை, மீண்டும் முயற்சிக்கவும். :(', diff --git a/resources/lang/ta-IN/mail.php b/resources/lang/ta-IN/mail.php index 4feb629e2cac..9f63cd9ac7c0 100644 --- a/resources/lang/ta-IN/mail.php +++ b/resources/lang/ta-IN/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'தயவுசெய்து புதுப்பிக்க பின்வரும் இணைப்பை கிளிக் செய்யவும்: உங்கள் இணைய கடவுச்சொல்:', - 'login' => 'உள் நுழை:', + 'login' => 'உள் நுழை', 'login_first_admin' => 'கீழே உள்ள சான்றுகளை பயன்படுத்தி உங்கள் புதிய Snipe-IT நிறுவலுக்கு உள்நுழையவும்:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'குறைந்தது QTY', diff --git a/resources/lang/th-TH/admin/hardware/message.php b/resources/lang/th-TH/admin/hardware/message.php index 885f8455e824..60d065c3c0a7 100644 --- a/resources/lang/th-TH/admin/hardware/message.php +++ b/resources/lang/th-TH/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'ไม่มีสินทรัพย์', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'ไม่มีสินทรัพย์', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'สินทรัพย์นั้นไม่มีอยู่หรือไม่สามารถร้องขอได้', - 'assoc_users' => 'ขณะนี้มีการตรวจสอบเนื้อหานี้แก่ผู้ใช้และไม่สามารถลบออกได้ โปรดตรวจสอบเนื้อหาเป็นครั้งแรกจากนั้นลองลบอีกครั้ง', + 'assoc_users' => 'ขณะนี้มีการตรวจสอบเนื้อหานี้แก่ผู้ใช้และไม่สามารถลบออกได้ โปรดตรวจสอบเนื้อหาเป็นครั้งแรกจากนั้นลองลบอีกครั้ง', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'ไม่ได้สร้างเนื้อหาโปรดลองอีกครั้ง :(', diff --git a/resources/lang/th-TH/mail.php b/resources/lang/th-TH/mail.php index 9f240e1b4989..d720d835ee50 100644 --- a/resources/lang/th-TH/mail.php +++ b/resources/lang/th-TH/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'มี: ใบอนุญาตที่จะหมดอายุในวันถัดไป: วันที่กำหนด|มี: ใบอนุญาตที่จะหมดอายุในวันถัดไป: วันที่กำหนด', 'link_to_update_password' => 'โปรดคลิกลิงก์ต่อไปนี้เพื่ออัปเดต: รหัสผ่านเว็บ:', - 'login' => 'เข้าสู่ระบบ:', + 'login' => 'เข้าสู่ระบบ', 'login_first_admin' => 'เข้าสู่ระบบการติดตั้ง Snipe-IT ใหม่ของคุณโดยใช้ข้อมูลรับรองด้านล่าง:', 'low_inventory_alert' => 'มี: นับสินค้าที่ต่ำกว่าสินค้าคงคลังขั้นต่ำหรือเร็ว ๆ นี้จะต่ำ|มี: นับสินค้าที่ต่ำกว่าสินค้าคงคลังขั้นต่ำหรือจะเร็วเกินไป', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/tl-PH/admin/hardware/message.php b/resources/lang/tl-PH/admin/hardware/message.php index df68f28395bd..222cbc439e6a 100644 --- a/resources/lang/tl-PH/admin/hardware/message.php +++ b/resources/lang/tl-PH/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/tl-PH/mail.php b/resources/lang/tl-PH/mail.php index c3f42a05ea49..b0ca4ffcb1a5 100644 --- a/resources/lang/tl-PH/mail.php +++ b/resources/lang/tl-PH/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/tr-TR/admin/hardware/message.php b/resources/lang/tr-TR/admin/hardware/message.php index 78777e622e5c..80fdf963d660 100644 --- a/resources/lang/tr-TR/admin/hardware/message.php +++ b/resources/lang/tr-TR/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Uyarı: Bu demirbaş dağıtılamaz durumdadır. Eğer bu durum değişti ise demirbaş durumunu değiştiriniz.', - 'does_not_exist' => 'Demirbaş mevcut değil.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Uyarı: Bu demirbaş dağıtılamaz durumdadır. Eğer bu durum değişti ise demirbaş durumunu değiştiriniz.', + 'does_not_exist' => 'Demirbaş mevcut değil.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Bu varlık mevcut değil veya talep edilebilir değil.', - 'assoc_users' => 'Bu demirbaş kullanıcıya çıkış yapılmış olaran görülüyor ve silinemez. Lütfen önce demirbaş girişi yapınız, ardından tekrar siliniz. ', + 'assoc_users' => 'Bu demirbaş kullanıcıya çıkış yapılmış olaran görülüyor ve silinemez. Lütfen önce demirbaş girişi yapınız, ardından tekrar siliniz. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Demirbaş oluşturulamadı, lütfen tekrar deneyin. ', diff --git a/resources/lang/tr-TR/mail.php b/resources/lang/tr-TR/mail.php index 74bf4ee6d7ea..2655f79d832c 100644 --- a/resources/lang/tr-TR/mail.php +++ b/resources/lang/tr-TR/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Şu var: bir sonraki günlerde süren lisans sayımı: eşik günleri. | Şunlar var: bir sonraki günlerde süren sayım lisansları: eşik günleri.', 'link_to_update_password' => 'Şifrenizi güncellemek için aşağıdaki linke tıklayınız :web password:', - 'login' => 'Giriş:', + 'login' => 'Giriş', 'login_first_admin' => 'Yeni Snipe-IT Kurulumu oturum açma kimlik bilgilerini aşağıdaki gibidir. ', 'low_inventory_alert' => 'Şu var: Minimum envanterin altında olan veya yakında düşük olacak olan sayı maddesi. | Şunlar var: Minimum envanterin altında olan veya yakında olacak olan sayım maddeleri.', 'min_QTY' => 'Min. Miktar', diff --git a/resources/lang/uk-UA/admin/hardware/message.php b/resources/lang/uk-UA/admin/hardware/message.php index 3dd5b07943ce..cffa11bdda12 100644 --- a/resources/lang/uk-UA/admin/hardware/message.php +++ b/resources/lang/uk-UA/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Медіафайл не існує.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Медіафайл не існує.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Цей актив не існує або його не можна запитувати.', - 'assoc_users' => 'Цей актив в даний час відмічений користувачу і не може бути видалений. Спочатку перевірте активи, а потім спробуйте видалити знову. ', + 'assoc_users' => 'Цей актив в даний час відмічений користувачу і не може бути видалений. Спочатку перевірте активи, а потім спробуйте видалити знову. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Актив не був створений, будь ласка, спробуйте ще раз :(', diff --git a/resources/lang/uk-UA/mail.php b/resources/lang/uk-UA/mail.php index b6278eba1aa1..0730387cecce 100644 --- a/resources/lang/uk-UA/mail.php +++ b/resources/lang/uk-UA/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'Нагадуємо, що у вас є :count активів що видані вам, але не що не були підтверджені вами або відхилені. Будь ласка, натисніть на посилання нижче, щоб підтвердити своє рішення.', 'license_expiring_alert' => 'В наступні :threshold днів закінчується :count термін дії ліцензії для наступних :threshold днів.|В наступному :threshold строк дії ліцензії.', 'link_to_update_password' => 'Будь-ласка, натисніть на це посилання, щоб оновити свій пароль:', - 'login' => 'Логін:', + 'login' => 'Вхід', 'login_first_admin' => 'Увійдіть до вашої нової установки Snipe-IT за допомогою нижче:', 'low_inventory_alert' => 'Є :count елемент, який нижчий мінімальний інвентар або низький. Є :count предмети, які нижче мінімального інвентарю, або скоро будуть низькими.', 'min_QTY' => 'Мін. кількість', diff --git a/resources/lang/ur-PK/admin/hardware/message.php b/resources/lang/ur-PK/admin/hardware/message.php index df68f28395bd..222cbc439e6a 100644 --- a/resources/lang/ur-PK/admin/hardware/message.php +++ b/resources/lang/ur-PK/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/ur-PK/mail.php b/resources/lang/ur-PK/mail.php index 76c0c1773d28..7663a0167bb6 100644 --- a/resources/lang/ur-PK/mail.php +++ b/resources/lang/ur-PK/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/vi-VN/admin/hardware/message.php b/resources/lang/vi-VN/admin/hardware/message.php index 658fc23de204..d5735f15709f 100644 --- a/resources/lang/vi-VN/admin/hardware/message.php +++ b/resources/lang/vi-VN/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Tài sản không tồn tại.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Tài sản không tồn tại.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'Tài sản không tồn tại hoặc không cho phép đề xuất.', - 'assoc_users' => 'Tài sản này hiện tại đã được checkout đến một người dùng và không thể xóa. Đầu tiên xin vui lòng kiểm tra lại tài sản, và cố gắng thử lần nữa. ', + 'assoc_users' => 'Tài sản này hiện tại đã được checkout đến một người dùng và không thể xóa. Đầu tiên xin vui lòng kiểm tra lại tài sản, và cố gắng thử lần nữa. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Tài sản chưa được tạo, xin vui lòng thử lại. :(', diff --git a/resources/lang/vi-VN/mail.php b/resources/lang/vi-VN/mail.php index fd91de9d3ff2..ca17e8cd38f0 100644 --- a/resources/lang/vi-VN/mail.php +++ b/resources/lang/vi-VN/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'Có: giấy phép bản quyền sắp hết hạn trong ngày mai:threshold days. | Có nhiều: giấy phép bản quyên sắp hết hạn trong lần tiếp theo: threshold days.', 'link_to_update_password' => 'Vui lòng nhấp vào liên kết sau để cập nhật: mật khẩu web:', - 'login' => 'Đăng nhập:', + 'login' => 'Đăng nhập', 'login_first_admin' => 'Đăng nhập vào hệ thống Snipe-IT mới bằng các thông tin dưới đây:', 'low_inventory_alert' => 'Có: mặt hàng tồn dưới mức tối thiểu hoặc sẽ sớm ở mức thấp. | Có nhiều: mặt hàng tồn dưới mức tồn kho tối thiểu hoặc sẽ sớm ở mức thấp.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/zh-CN/admin/hardware/form.php b/resources/lang/zh-CN/admin/hardware/form.php index 6fdc69a7c71d..f37f182d5843 100644 --- a/resources/lang/zh-CN/admin/hardware/form.php +++ b/resources/lang/zh-CN/admin/hardware/form.php @@ -60,5 +60,5 @@ 'processing_spinner' => '处理中...(对于大型文件可能需要一些时间)', 'optional_infos' => '可选信息', 'order_details' => '订单相关信息', - 'calc_eol' => 'If nulling the EOL date, use automatic EOL calculation based on the purchase date and EOL rate.', + 'calc_eol' => '如果将 EOL 日期设为零,则根据购买日期和EOL率自动计算EOL。', ]; diff --git a/resources/lang/zh-CN/admin/hardware/message.php b/resources/lang/zh-CN/admin/hardware/message.php index e03b25994eba..02aa6f015588 100644 --- a/resources/lang/zh-CN/admin/hardware/message.php +++ b/resources/lang/zh-CN/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => '警告: 此资产已被标记为当前不可借出。如果此状态已经改变,请更新资产状态。', - 'does_not_exist' => '资产不存在', - 'does_not_exist_var'=> '找不到标签为 :asset_tag 的资产', - 'no_tag' => '未提供资产标签。', + 'undeployable' => '警告: 此资产已被标记为当前不可借出。如果此状态已经改变,请更新资产状态。', + 'does_not_exist' => '资产不存在', + 'does_not_exist_var' => '找不到标签为 :asset_tag 的资产', + 'no_tag' => '未提供资产标签。', 'does_not_exist_or_not_requestable' => '该资产不存在或不可申领。', - 'assoc_users' => '这个资产目前已经借给某个用户,不能被删除,请检查资产信息,然后再尝试删除。', + 'assoc_users' => '这个资产目前已经借给某个用户,不能被删除,请检查资产信息,然后再尝试删除。', 'warning_audit_date_mismatch' => '此资产的下一个盘点日期 (:next_audit_date) 早于上一个盘点日期 (:last_audit_date)。请更新下一个盘点日期。', + 'labels_generated' => '标签已成功生成。', + 'error_generating_labels' => '生成标签时出错。', + 'no_assets_selected' => '没有选择资产。', 'create' => [ 'error' => '资产创建失败,请重试。:(', diff --git a/resources/lang/zh-CN/general.php b/resources/lang/zh-CN/general.php index f6b37192de88..473cd18ca826 100644 --- a/resources/lang/zh-CN/general.php +++ b/resources/lang/zh-CN/general.php @@ -560,7 +560,7 @@ 'something_went_wrong' => '您的请求出了点问题。', 'close' => '关闭', 'expires' => '过期', - 'map_fields'=> 'Map :item_type Fields', + 'map_fields'=> '映射 :item_type 字段', 'remaining_var' => '剩余:count个', 'label' => '标签', 'import_asset_tag_exists' => '资产标签为:asset_tag的资产已经存在,且未请求更新。没有做任何更改。', diff --git a/resources/lang/zh-CN/mail.php b/resources/lang/zh-CN/mail.php index 8f7aca7cd887..feca99410eb7 100644 --- a/resources/lang/zh-CN/mail.php +++ b/resources/lang/zh-CN/mail.php @@ -23,7 +23,7 @@ 'Item_Requested' => '已申领物品', 'License_Checkin_Notification' => '许可证已签入', 'License_Checkout_Notification' => '许可证已借出', - 'license_for' => 'License for', + 'license_for' => '授权给', 'Low_Inventory_Report' => '低库存报告', 'a_user_canceled' => '用户已取消物品申请', 'a_user_requested' => '用户已申请物品', @@ -60,7 +60,7 @@ 'item_checked_reminder' => '提醒,当前借出给您 :count 件物品,您还没有签收或拒绝。 请点击下面的链接以确认您的决定。', 'license_expiring_alert' => '有:个许可将在:天后到期。|有:个许可将在:天后到期。', 'link_to_update_password' => '请点击以下链接以更新 :web 的密码:', - 'login' => '登录:', + 'login' => '登录', 'login_first_admin' => '请使用以下凭据登录新安装的 Snipe-IT:', 'low_inventory_alert' => '有:种物品已经低于或者接近最小库存。|有:种物品已经低于或者接近最小库存。', 'min_QTY' => '最小数量', diff --git a/resources/lang/zh-HK/admin/hardware/message.php b/resources/lang/zh-HK/admin/hardware/message.php index df68f28395bd..222cbc439e6a 100644 --- a/resources/lang/zh-HK/admin/hardware/message.php +++ b/resources/lang/zh-HK/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Asset does not exist.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Asset does not exist.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', + 'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Asset was not created, please try again. :(', diff --git a/resources/lang/zh-HK/mail.php b/resources/lang/zh-HK/mail.php index 79600ecc1e25..af6c8d9577af 100644 --- a/resources/lang/zh-HK/mail.php +++ b/resources/lang/zh-HK/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Please click on the following link to update your :web password:', - 'login' => 'Login:', + 'login' => 'Login', 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'Min QTY', diff --git a/resources/lang/zh-TW/admin/hardware/message.php b/resources/lang/zh-TW/admin/hardware/message.php index 9a59d05767bf..852ae47f2eec 100644 --- a/resources/lang/zh-TW/admin/hardware/message.php +++ b/resources/lang/zh-TW/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => '資產不存在', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => '資產不存在', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => '該資產不存在或無法申請。', - 'assoc_users' => '此資產目前已借給某個使用者,不能被刪除,請檢查資產狀態,然後再嘗試刪除。', + 'assoc_users' => '此資產目前已借給某個使用者,不能被刪除,請檢查資產狀態,然後再嘗試刪除。', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => '新增資產失敗,請重試。', diff --git a/resources/lang/zu-ZA/admin/hardware/message.php b/resources/lang/zu-ZA/admin/hardware/message.php index 4a241d59de39..0ab6eaf7aac4 100644 --- a/resources/lang/zu-ZA/admin/hardware/message.php +++ b/resources/lang/zu-ZA/admin/hardware/message.php @@ -2,13 +2,16 @@ return [ - 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', - 'does_not_exist' => 'Impahla ayikho.', - 'does_not_exist_var'=> 'Asset with tag :asset_tag not found.', - 'no_tag' => 'No asset tag provided.', + 'undeployable' => 'Warning: This asset has been marked as currently undeployable. If this status has changed, please update the asset status.', + 'does_not_exist' => 'Impahla ayikho.', + 'does_not_exist_var' => 'Asset with tag :asset_tag not found.', + 'no_tag' => 'No asset tag provided.', 'does_not_exist_or_not_requestable' => 'That asset does not exist or is not requestable.', - 'assoc_users' => 'Leli fayela okwamanje lihlolwe kumsebenzisi futhi alikwazi ukususwa. Sicela uhlole ifa ekuqaleni, bese uzama ukususa futhi.', + 'assoc_users' => 'Leli fayela okwamanje lihlolwe kumsebenzisi futhi alikwazi ukususwa. Sicela uhlole ifa ekuqaleni, bese uzama ukususa futhi.', 'warning_audit_date_mismatch' => 'This asset\'s next audit date (:next_audit_date) is before the last audit date (:last_audit_date). Please update the next audit date.', + 'labels_generated' => 'Labels were successfully generated.', + 'error_generating_labels' => 'Error while generating labels.', + 'no_assets_selected' => 'No assets selected.', 'create' => [ 'error' => 'Impahla ayidalwanga, sicela uzame futhi. :(', diff --git a/resources/lang/zu-ZA/mail.php b/resources/lang/zu-ZA/mail.php index b9126b65edad..1b129a64783d 100644 --- a/resources/lang/zu-ZA/mail.php +++ b/resources/lang/zu-ZA/mail.php @@ -60,7 +60,7 @@ 'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.', 'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.', 'link_to_update_password' => 'Sicela uchofoze kusixhumanisi esilandelayo ukuze ubuyekeze: iphasiwedi yakho yewebhu:', - 'login' => 'Ngena ngemvume:', + 'login' => 'Ngena ngemvume', 'login_first_admin' => 'Ngena ngemvume ekufakweni kwakho okusha kwe-Snipe-IT usebenzisa iziqinisekiso ezingezansi:', 'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.', 'min_QTY' => 'I-Min QTY', From 30b481bc9342d6b052015fc8ae811e50131bdeee Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 25 Nov 2024 14:18:31 +0000 Subject: [PATCH 303/318] Updated version Signed-off-by: snipe --- config/version.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/version.php b/config/version.php index ea22a52cd2c5..439a7cb8d17a 100644 --- a/config/version.php +++ b/config/version.php @@ -1,10 +1,10 @@ 'v7.1.14', - 'full_app_version' => 'v7.1.14 - build 15942-g3bf33aa68', - 'build_version' => '15942', + 'app_version' => 'v7.1.15', + 'full_app_version' => 'v7.1.15 - build 16052-g25bfd3e84', + 'build_version' => '16052', 'prerelease_version' => '', - 'hash_version' => 'g3bf33aa68', - 'full_hash' => 'v7.1.14-420-g3bf33aa68', + 'hash_version' => 'g25bfd3e84', + 'full_hash' => 'v7.1.15-105-g25bfd3e84', 'branch' => 'develop', ); \ No newline at end of file From 60642cd9028e863211c01089fc0fd3fb29f31cc8 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 26 Nov 2024 09:58:17 -0800 Subject: [PATCH 304/318] fix user api update from clearing location_id unnecessarily --- app/Http/Controllers/Api/UsersController.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index a9c8c26f14ca..bd7ae1a6689d 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -480,10 +480,11 @@ public function update(SaveUserRequest $request, User $user): JsonResponse $user->permissions = $permissions_array; } - // Update the location of any assets checked out to this user - Asset::where('assigned_type', User::class) - ->where('assigned_to', $user->id)->update(['location_id' => $request->input('location_id', null)]); - + if($request->has('location_id')) { + // Update the location of any assets checked out to this user + Asset::where('assigned_type', User::class) + ->where('assigned_to', $user->id)->update(['location_id' => $request->input('location_id', null)]); + } app('App\Http\Requests\ImageUploadRequest')->handleImages($user, 600, 'image', 'avatars', 'avatar'); if ($user->save()) { From 021e82927e3f4e95ecc00d7f3154feecee7e8a24 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 26 Nov 2024 10:42:59 -0800 Subject: [PATCH 305/318] fixed mobile view of assets --- resources/assets/less/overrides.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/assets/less/overrides.less b/resources/assets/less/overrides.less index 34b0c59065d7..57d0d695b1e0 100644 --- a/resources/assets/less/overrides.less +++ b/resources/assets/less/overrides.less @@ -876,9 +876,11 @@ th.css-component > .th-inner::before } @media screen and (max-width: 992px){ .info-stack-container { - display: flex; flex-direction: column; } + .row-new-striped div { + width:100%; + } .col-md-3.col-xs-12.col-sm-push-9.info-stack{ left:auto; order:1; From 15c9df0ab175c0ca14d7506a6a85349dcb7243a6 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 26 Nov 2024 10:59:31 -0800 Subject: [PATCH 306/318] fix mobile view for asset and user --- resources/assets/less/overrides.less | 9 ++++++--- resources/views/users/view.blade.php | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/resources/assets/less/overrides.less b/resources/assets/less/overrides.less index 57d0d695b1e0..b7ba55a01c6f 100644 --- a/resources/assets/less/overrides.less +++ b/resources/assets/less/overrides.less @@ -878,9 +878,6 @@ th.css-component > .th-inner::before .info-stack-container { flex-direction: column; } - .row-new-striped div { - width:100%; - } .col-md-3.col-xs-12.col-sm-push-9.info-stack{ left:auto; order:1; @@ -894,6 +891,12 @@ th.css-component > .th-inner::before float:none; } } +@media screen and (max-width: 992px){ + .row-new-striped div{ + width:100%; + } +} + @media screen and (max-width: 1318px) and (min-width: 1200px){ .admin.box{ height:170px; diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index b59a5ac12646..51e343780edb 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -309,10 +309,10 @@
-
+
{{ trans('admin/users/table.name') }}
-
+
{{ $user->present()->fullName() }}
@@ -751,7 +751,7 @@ {{Helper::formatCurrencyOutput($user->getUserTotalCost()->total_user_cost)}} -
+ {{ trans('admin/hardware/form.optional_infos') }}
From fcbd5dcae530f6c5c09b850dba3dd783986e490d Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 26 Nov 2024 11:33:17 -0800 Subject: [PATCH 307/318] Harden asset checkout validation by requiring ints --- app/Http/Requests/AssetCheckoutRequest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Requests/AssetCheckoutRequest.php b/app/Http/Requests/AssetCheckoutRequest.php index f48a7d5e534f..5234dcac482a 100644 --- a/app/Http/Requests/AssetCheckoutRequest.php +++ b/app/Http/Requests/AssetCheckoutRequest.php @@ -22,9 +22,9 @@ public function authorize() public function rules() { $rules = [ - 'assigned_user' => 'required_without_all:assigned_asset,assigned_location', - 'assigned_asset' => 'required_without_all:assigned_user,assigned_location', - 'assigned_location' => 'required_without_all:assigned_user,assigned_asset', + 'assigned_user' => 'integer|required_without_all:assigned_asset,assigned_location', + 'assigned_asset' => 'integer|required_without_all:assigned_user,assigned_location', + 'assigned_location' => 'integer|required_without_all:assigned_user,assigned_asset', 'status_id' => 'exists:status_labels,id,deployable,1', 'checkout_to_type' => 'required|in:asset,location,user', 'checkout_at' => [ From 2727210c78a6dcc616bd50c6a368741c52804dbd Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 26 Nov 2024 15:04:54 -0500 Subject: [PATCH 308/318] requested changes from pr --- app/Http/Requests/AssetCheckinRequest.php | 2 +- resources/lang/en-US/admin/hardware/message.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Requests/AssetCheckinRequest.php b/app/Http/Requests/AssetCheckinRequest.php index 2a716e00a8e5..8980cea095b4 100644 --- a/app/Http/Requests/AssetCheckinRequest.php +++ b/app/Http/Requests/AssetCheckinRequest.php @@ -26,7 +26,7 @@ public function rules() $rules = []; if($settings->require_checkinout_notes) { - $rules['note'] = 'string|nullable'; + $rules['note'] = 'string|required'; } return $rules; } diff --git a/resources/lang/en-US/admin/hardware/message.php b/resources/lang/en-US/admin/hardware/message.php index 32358cb6dd8d..c92c0b0ab73f 100644 --- a/resources/lang/en-US/admin/hardware/message.php +++ b/resources/lang/en-US/admin/hardware/message.php @@ -23,7 +23,6 @@ 'nothing_updated' => 'No fields were selected, so nothing was updated.', 'no_assets_selected' => 'No assets were selected, so nothing was updated.', 'assets_do_not_exist_or_are_invalid' => 'Selected assets cannot be updated.', - 'no_note' => 'Note field is empty', ], 'restore' => [ From a7dae10a82eb11f5dedd5df3c8e1e56ad5d0290a Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 26 Nov 2024 15:06:25 -0500 Subject: [PATCH 309/318] fixing line --- resources/lang/en-US/admin/hardware/message.php | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/lang/en-US/admin/hardware/message.php b/resources/lang/en-US/admin/hardware/message.php index c92c0b0ab73f..041d32f56c90 100644 --- a/resources/lang/en-US/admin/hardware/message.php +++ b/resources/lang/en-US/admin/hardware/message.php @@ -77,7 +77,6 @@ 'user_does_not_exist' => 'That user is invalid. Please try again.', 'not_available' => 'That asset is not available for checkout!', 'no_assets_selected' => 'You must select at least one asset from the list', - ], 'checkin' => [ From 0f1d10bd698b93519a9fd7e99f8c4671db7ed881 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 26 Nov 2024 20:12:09 +0000 Subject: [PATCH 310/318] Dev assets Signed-off-by: snipe --- public/css/build/app.css | 6 +++++- public/css/build/overrides.css | 6 +++++- public/css/dist/all.css | 12 ++++++++++-- public/mix-manifest.json | 6 +++--- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/public/css/build/app.css b/public/css/build/app.css index 1637a78a1ef6..83e5d5885628 100644 --- a/public/css/build/app.css +++ b/public/css/build/app.css @@ -1160,7 +1160,6 @@ th.css-component > .th-inner::before { } @media screen and (max-width: 992px) { .info-stack-container { - display: flex; flex-direction: column; } .col-md-3.col-xs-12.col-sm-push-9.info-stack { @@ -1176,6 +1175,11 @@ th.css-component > .th-inner::before { float: none; } } +@media screen and (max-width: 992px) { + .row-new-striped div { + width: 100%; + } +} @media screen and (max-width: 1318px) and (min-width: 1200px) { .admin.box { height: 170px; diff --git a/public/css/build/overrides.css b/public/css/build/overrides.css index fee947601a2a..5bae690fa3e6 100644 --- a/public/css/build/overrides.css +++ b/public/css/build/overrides.css @@ -792,7 +792,6 @@ th.css-component > .th-inner::before { } @media screen and (max-width: 992px) { .info-stack-container { - display: flex; flex-direction: column; } .col-md-3.col-xs-12.col-sm-push-9.info-stack { @@ -808,6 +807,11 @@ th.css-component > .th-inner::before { float: none; } } +@media screen and (max-width: 992px) { + .row-new-striped div { + width: 100%; + } +} @media screen and (max-width: 1318px) and (min-width: 1200px) { .admin.box { height: 170px; diff --git a/public/css/dist/all.css b/public/css/dist/all.css index 5107d4446e4d..ea42eb7ad282 100644 --- a/public/css/dist/all.css +++ b/public/css/dist/all.css @@ -22458,7 +22458,6 @@ th.css-component > .th-inner::before { } @media screen and (max-width: 992px) { .info-stack-container { - display: flex; flex-direction: column; } .col-md-3.col-xs-12.col-sm-push-9.info-stack { @@ -22474,6 +22473,11 @@ th.css-component > .th-inner::before { float: none; } } +@media screen and (max-width: 992px) { + .row-new-striped div { + width: 100%; + } +} @media screen and (max-width: 1318px) and (min-width: 1200px) { .admin.box { height: 170px; @@ -23939,7 +23943,6 @@ th.css-component > .th-inner::before { } @media screen and (max-width: 992px) { .info-stack-container { - display: flex; flex-direction: column; } .col-md-3.col-xs-12.col-sm-push-9.info-stack { @@ -23955,6 +23958,11 @@ th.css-component > .th-inner::before { float: none; } } +@media screen and (max-width: 992px) { + .row-new-striped div { + width: 100%; + } +} @media screen and (max-width: 1318px) and (min-width: 1200px) { .admin.box { height: 170px; diff --git a/public/mix-manifest.json b/public/mix-manifest.json index c034c4b925b0..811fda54f38e 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -2,8 +2,8 @@ "/js/build/app.js": "/js/build/app.js?id=65d7af7b9fa7fd0e05737526a0d1d282", "/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=06c13e817cc022028b3f4a33c0ca303a", "/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=e71ef4171dee5da63af390966ac60ffc", - "/css/build/overrides.css": "/css/build/overrides.css?id=835426a1099db0ae4ee3aaa077e68035", - "/css/build/app.css": "/css/build/app.css?id=91ffc6625d6af7a1cef7bb1a68a30ba0", + "/css/build/overrides.css": "/css/build/overrides.css?id=5b8f0ac249624a9dbe1b6fb6c756dbf6", + "/css/build/app.css": "/css/build/app.css?id=b359fb605b4c47220b57d19652142031", "/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=4ea0068716c1bb2434d87a16d51b98c9", "/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=7b315b9612b8fde8f9c5b0ddb6bba690", "/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=ea22079836a432d7f46a5d390c445e13", @@ -19,7 +19,7 @@ "/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374", "/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=6ea836d8126de101081c49abbdb89417", "/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb", - "/css/dist/all.css": "/css/dist/all.css?id=c91bb566ac8ec8e72a2ab9d6ee2f8a2d", + "/css/dist/all.css": "/css/dist/all.css?id=26fc12b01211349d0a244c39cc9555a6", "/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7", "/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7", "/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde", From 2cb1b6d462783ffdeca1bb4cdc85632a2ba93aad Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 27 Nov 2024 13:51:53 +0000 Subject: [PATCH 311/318] Use transformer on API update Signed-off-by: snipe --- app/Http/Controllers/Api/AssetsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 7a9f5822134d..7a6566d34e81 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -765,9 +765,9 @@ public function update(UpdateAssetRequest $request, Asset $asset): JsonResponse } if ($problems_updating_encrypted_custom_fields) { - return response()->json(Helper::formatStandardApiResponse('success', $asset, trans('admin/hardware/message.update.encrypted_warning'))); + return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset), trans('admin/hardware/message.update.encrypted_warning'))); } else { - return response()->json(Helper::formatStandardApiResponse('success', $asset, trans('admin/hardware/message.update.success'))); + return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset), trans('admin/hardware/message.update.success'))); } } return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()), 200); From ee4a54be247840ccf427295739975eb882f311c2 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 27 Nov 2024 15:48:13 +0000 Subject: [PATCH 312/318] Fixed order by notes for users Signed-off-by: snipe --- app/Http/Controllers/Api/UsersController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index bd7ae1a6689d..61aad1073445 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -283,6 +283,7 @@ public function index(Request $request) : array 'autoassign_licenses', 'website', 'locale', + 'notes', ]; $sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'first_name'; From 716c67d4b858f45d0d59a2fde808a9a35f6aff48 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 2 Dec 2024 15:45:07 +0000 Subject: [PATCH 313/318] Fixed #15901 - re-added required indicator on text and select custom fields Signed-off-by: snipe --- .../views/models/custom_fields_form.blade.php | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/resources/views/models/custom_fields_form.blade.php b/resources/views/models/custom_fields_form.blade.php index 8d414f337d09..87d58874b98d 100644 --- a/resources/views/models/custom_fields_form.blade.php +++ b/resources/views/models/custom_fields_form.blade.php @@ -2,20 +2,22 @@ @foreach($model->fieldset->fields AS $field)
-
+
@if ($field->element!='text') - + @if ($field->element=='listbox') + {{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(), - old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }} + old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))), ['class' => 'format select2 form-control', ($field->pivot->required=='1' ? ' required' : '') ]) }} @elseif ($field->element=='textarea') - + + @elseif ($field->element=='checkbox') - + @foreach ($field->formatFieldValuesAsArray() as $key => $value)