From 9ca163e8cf701b700c71f7f49d6848a13a145909 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 2 Aug 2023 19:22:35 -0600 Subject: [PATCH 01/23] Stop asset acceptances from shown to user if full company support is enabled and companies not match --- app/Http/Controllers/Account/AcceptanceController.php | 2 +- resources/lang/en/general.php | 1 + resources/views/account/accept/index.blade.php | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index 645e2624b2..99e4562888 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -69,7 +69,7 @@ class AcceptanceController extends Controller } if (! Company::isCurrentUserHasAccess($acceptance->checkoutable)) { - return redirect()->route('account.accept')->with('error', trans('general.insufficient_permissions')); + return redirect()->route('account.accept')->with('error', trans('general.error_user_company')); } return view('account/accept.create', compact('acceptance')); diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 4831845721..3b1d0787d5 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -452,6 +452,7 @@ return [ 'serial_number' => 'Serial Number', 'item_notes' => ':item Notes', 'item_name_var' => ':item Name', + 'error_user_company' => 'User and Asset companies missmatch', 'importer' => [ 'checked_out_to_fullname' => 'Checked Out to: Full Name', 'checked_out_to_first_name' => 'Checked Out to: First Name', diff --git a/resources/views/account/accept/index.blade.php b/resources/views/account/accept/index.blade.php index f2a9bc56f2..58ed542dc6 100755 --- a/resources/views/account/accept/index.blade.php +++ b/resources/views/account/accept/index.blade.php @@ -41,9 +41,11 @@ @foreach ($acceptances as $acceptance) + @if ($acceptance->checkoutable) {{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }} {{ trans('general.accept_decline') }} + @endif @endforeach From 053d3fc9ed55f8e687dc252f624128c7b3484b6e Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 2 Aug 2023 19:23:28 -0600 Subject: [PATCH 02/23] Prevent asset to be checked out if full company support is enabled and companies not match --- app/Http/Controllers/Assets/AssetCheckoutController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Http/Controllers/Assets/AssetCheckoutController.php b/app/Http/Controllers/Assets/AssetCheckoutController.php index e6326da6b1..bc5465e4be 100644 --- a/app/Http/Controllers/Assets/AssetCheckoutController.php +++ b/app/Http/Controllers/Assets/AssetCheckoutController.php @@ -89,6 +89,14 @@ class AssetCheckoutController extends Controller } } + $settings = \App\Models\Setting::getSettings(); + + if ($settings->full_multiple_companies_support){ + if ($target->company_id != $asset->company_id){ + return redirect()->to("hardware/$assetId/checkout")->with('error', trans('general.error_user_company')); + } + } + if ($asset->checkOut($target, $admin, $checkout_at, $expected_checkin, e($request->get('note')), $request->get('name'))) { return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.checkout.success')); } From 4796598bb6967eb569c0290e9c7ba4b9e3b4ae99 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 14 Aug 2023 14:35:31 -0600 Subject: [PATCH 03/23] Add declinedCheckout method to Accessory model --- app/Models/Accessory.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Models/Accessory.php b/app/Models/Accessory.php index 7576cc644f..e1da483b97 100755 --- a/app/Models/Accessory.php +++ b/app/Models/Accessory.php @@ -32,6 +32,16 @@ class Accessory extends SnipeModel use Searchable; use Acceptable; + + public function declinedCheckout(User $declinedBy, $signature) + { + if (is_null($accessory_user = \DB::table('accessories_users')->where('assigned_to', $declinedBy->id)->where('accessory_id', $this->id)->latest('created_at'))) { + // Redirect to the accessory management page with error + return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist')); + } + + $accessory_user->limit(1)->delete(); + } /** * The attributes that should be included when searching the model. From 8da2a8a79c6ca6592db4df6e11e5755a366a051f Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 14 Aug 2023 14:58:10 -0600 Subject: [PATCH 04/23] Allows to save signature for declined items --- .../Account/AcceptanceController.php | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index 645e2624b2..8ad24a60f2 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -245,6 +245,36 @@ class AcceptanceController extends Controller $return_msg = trans('admin/users/message.accepted'); } else { + + /** + * Check for the eula-pdfs directory + */ + if (! Storage::exists('private_uploads/eula-pdfs')) { + Storage::makeDirectory('private_uploads/eula-pdfs', 775); + } + + if (Setting::getSettings()->require_accept_signature == '1') { + + // Check if the signature directory exists, if not create it + if (!Storage::exists('private_uploads/signatures')) { + Storage::makeDirectory('private_uploads/signatures', 775); + } + + // The item was accepted, check for a signature + if ($request->filled('signature_output')) { + $sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png'; + $data_uri = $request->input('signature_output'); + $encoded_image = explode(',', $data_uri); + $decoded_image = base64_decode($encoded_image[1]); + Storage::put('private_uploads/signatures/' . $sig_filename, (string)$decoded_image); + + // No image data is present, kick them back. + // This mostly only applies to users on super-duper crapola browsers *cough* IE *cough* + } else { + return redirect()->back()->with('error', trans('general.shitty_browser')); + } + } + // Format the data to send the declined notification $branding_settings = SettingsController::getPDFBranding(); @@ -281,11 +311,18 @@ class AcceptanceController extends Controller 'item_model' => $display_model, 'item_serial' => $item->serial, 'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'), + 'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null, 'assigned_to' => $assigned_to, 'company_name' => $branding_settings->site_name, 'date_settings' => $branding_settings->date_display_format, ]; + if ($pdf_view_route!='') { + \Log::debug($pdf_filename.' is the filename, and the route was specified.'); + $pdf = Pdf::loadView($pdf_view_route, $data); + Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf->output()); + } + $acceptance->decline($sig_filename); $acceptance->notify(new AcceptanceAssetDeclinedNotification($data)); event(new CheckoutDeclined($acceptance)); From 96440834bd1e354f126d94c4c4e4b40ffbf250d8 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 14 Aug 2023 16:16:28 -0600 Subject: [PATCH 05/23] Move the declinedCheckout function so it don/'t separate the class properties --- app/Models/Accessory.php | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/app/Models/Accessory.php b/app/Models/Accessory.php index e1da483b97..86502dc7e7 100755 --- a/app/Models/Accessory.php +++ b/app/Models/Accessory.php @@ -32,16 +32,6 @@ class Accessory extends SnipeModel use Searchable; use Acceptable; - - public function declinedCheckout(User $declinedBy, $signature) - { - if (is_null($accessory_user = \DB::table('accessories_users')->where('assigned_to', $declinedBy->id)->where('accessory_id', $this->id)->latest('created_at'))) { - // Redirect to the accessory management page with error - return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist')); - } - - $accessory_user->limit(1)->delete(); - } /** * The attributes that should be included when searching the model. @@ -359,6 +349,22 @@ class Accessory extends SnipeModel return (int) $remaining; } + /** + * Run after the checkout acceptance was declined by the user + * + * @param User $acceptedBy + * @param string $signature + */ + public function declinedCheckout(User $declinedBy, $signature) + { + if (is_null($accessory_user = \DB::table('accessories_users')->where('assigned_to', $declinedBy->id)->where('accessory_id', $this->id)->latest('created_at'))) { + // Redirect to the accessory management page with error + return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist')); + } + + $accessory_user->limit(1)->delete(); + } + /** * Query builder scope to order on company * From d365565b6d0ff95b5ba843532c2d64fa95f00e0a Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 14 Aug 2023 20:51:04 -0600 Subject: [PATCH 06/23] Add message in the acceptance assets view to indicate when the user can\'t accept nor deny the asset --- resources/lang/en/general.php | 1 + resources/views/account/accept/index.blade.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 3b1d0787d5..2268008bf7 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -453,6 +453,7 @@ return [ 'item_notes' => ':item Notes', 'item_name_var' => ':item Name', 'error_user_company' => 'User and Asset companies missmatch', + 'error_user_company_accpept_view' => 'User and Asset companies doesn\'t match so you can\'t accept nor deny it, please check with your manager', 'importer' => [ 'checked_out_to_fullname' => 'Checked Out to: Full Name', 'checked_out_to_first_name' => 'Checked Out to: First Name', diff --git a/resources/views/account/accept/index.blade.php b/resources/views/account/accept/index.blade.php index 58ed542dc6..71949f6383 100755 --- a/resources/views/account/accept/index.blade.php +++ b/resources/views/account/accept/index.blade.php @@ -44,8 +44,11 @@ @if ($acceptance->checkoutable) {{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }} {{ trans('general.accept_decline') }} + @else + ----- + {{ trans('general.error_user_company_accpept_view') }} + @endif - @endif @endforeach From 71cb16118d6afb16deae916671f92e9b59d287df Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 14 Aug 2023 20:52:00 -0600 Subject: [PATCH 07/23] Change error string for a better (?) one --- resources/lang/en/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 2268008bf7..acbf23c2c2 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -453,7 +453,7 @@ return [ 'item_notes' => ':item Notes', 'item_name_var' => ':item Name', 'error_user_company' => 'User and Asset companies missmatch', - 'error_user_company_accpept_view' => 'User and Asset companies doesn\'t match so you can\'t accept nor deny it, please check with your manager', + 'error_user_company_accpept_view' => 'An Asset assigned to you belongs to a different company so you can\'t accept nor deny it, please check with your manager', 'importer' => [ 'checked_out_to_fullname' => 'Checked Out to: Full Name', 'checked_out_to_first_name' => 'Checked Out to: First Name', From 25c58a84864a4a2339f3c841a1a43b3a2f058c9b Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 15 Aug 2023 14:17:39 -0600 Subject: [PATCH 08/23] Fix typo in language variable name --- resources/lang/en/general.php | 2 +- resources/views/account/accept/index.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index acbf23c2c2..e4596d0cd0 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -453,7 +453,7 @@ return [ 'item_notes' => ':item Notes', 'item_name_var' => ':item Name', 'error_user_company' => 'User and Asset companies missmatch', - 'error_user_company_accpept_view' => 'An Asset assigned to you belongs to a different company so you can\'t accept nor deny it, please check with your manager', + 'error_user_company_accept_view' => 'An Asset assigned to you belongs to a different company so you can\'t accept nor deny it, please check with your manager', 'importer' => [ 'checked_out_to_fullname' => 'Checked Out to: Full Name', 'checked_out_to_first_name' => 'Checked Out to: First Name', diff --git a/resources/views/account/accept/index.blade.php b/resources/views/account/accept/index.blade.php index 71949f6383..b627135a4d 100755 --- a/resources/views/account/accept/index.blade.php +++ b/resources/views/account/accept/index.blade.php @@ -46,7 +46,7 @@ {{ trans('general.accept_decline') }} @else ----- - {{ trans('general.error_user_company_accpept_view') }} + {{ trans('general.error_user_company_accept_view') }} @endif @endforeach From 749002b76862e80ee8f2b32551c78ad8511569bc Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:09:48 +0100 Subject: [PATCH 09/23] Added migration to add name order to settings Signed-off-by: snipe --- ...1_064609_add_name_ordering_to_settings.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 database/migrations/2023_08_21_064609_add_name_ordering_to_settings.php diff --git a/database/migrations/2023_08_21_064609_add_name_ordering_to_settings.php b/database/migrations/2023_08_21_064609_add_name_ordering_to_settings.php new file mode 100644 index 0000000000..7a0afc5456 --- /dev/null +++ b/database/migrations/2023_08_21_064609_add_name_ordering_to_settings.php @@ -0,0 +1,32 @@ +string('name_display_format', 10)->after('alert_threshold')->nullable()->default('first_last'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('settings', function (Blueprint $table) { + $table->dropColumn('name_display_format'); + }); + } +} From 474c03e3fcc48889d7616d01d51d5f9b794832d7 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:10:03 +0100 Subject: [PATCH 10/23] Added name order to settings save controller method Signed-off-by: snipe --- app/Http/Controllers/SettingsController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 497ab7cea6..7a7aa45b6e 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -590,6 +590,7 @@ class SettingsController extends Controller $setting->date_display_format = $request->input('date_display_format'); $setting->time_display_format = $request->input('time_display_format'); $setting->digit_separator = $request->input('digit_separator'); + $setting->name_display_format = $request->input('name_display_format'); if ($setting->save()) { return redirect()->route('settings.index') From f3460b5a4f33713be8b655937bc27975d86840af Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:10:48 +0100 Subject: [PATCH 11/23] Switch to getFullNameAttribute() in user transformer Signed-off-by: snipe --- app/Http/Transformers/UsersTransformer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Transformers/UsersTransformer.php b/app/Http/Transformers/UsersTransformer.php index 76c0288073..45de50fa7d 100644 --- a/app/Http/Transformers/UsersTransformer.php +++ b/app/Http/Transformers/UsersTransformer.php @@ -24,7 +24,7 @@ class UsersTransformer $array = [ 'id' => (int) $user->id, 'avatar' => e($user->present()->gravatar), - 'name' => e($user->first_name).' '.e($user->last_name), + 'name' => e($user->getFullNameAttribute()), 'first_name' => e($user->first_name), 'last_name' => e($user->last_name), 'username' => e($user->username), From 354550b52e830d5c139ef259c1c9a03838aaa2ef Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:11:17 +0100 Subject: [PATCH 12/23] Removed getCompleteNameAttribute(), modified getFullNameAttribute() Signed-off-by: snipe --- app/Models/User.php | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 98a3ec346b..0d49b977c4 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -247,21 +247,12 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo */ public function getFullNameAttribute() { - return $this->first_name.' '.$this->last_name; - } + $setting = Setting::getSettings(); - /** - * Returns the complete name attribute with username - * - * @todo refactor this so it's less repetitive and dumb - * - * @author A. Gianotto - * @since [v2.0] - * @return string - */ - public function getCompleteNameAttribute() - { - return $this->last_name.', '.$this->first_name.' ('.$this->username.')'; + if ($setting->name_display_format=='last_first') { + return ($this->last_name) ? $this->last_name.' '.$this->first_name : $this->first_name; + } + return $this->last_name ? $this->first_name.' '.$this->last_name : $this->first_name; } From c39579b1701d3907f483bc5336c4f58c362365b6 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:11:25 +0100 Subject: [PATCH 13/23] New strings Signed-off-by: snipe --- resources/lang/en/general.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 4831845721..1b60951d29 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -120,6 +120,10 @@ return [ 'firstname_lastname_underscore_format' => 'First Name Last Name (jane_smith@example.com)', 'lastnamefirstinitial_format' => 'Last Name First Initial (smithj@example.com)', 'firstintial_dot_lastname_format' => 'First Initial Last Name (j.smith@example.com)', + 'firstname_lastname_display' => 'First Name Last Name (Jane Smith)', + 'lastname_firstname_display' => 'Last Name First Name (Smith Jane)', + 'name_display_format' => 'Name Display Format', + 'name_display_help' => 'This is generally only used in countries where it is common to write ', 'first' => 'First', 'firstnamelastname' => 'First Name Last Name (janesmith@example.com)', 'lastname_firstinitial' => 'Last Name First Initial (smith_j@example.com)', From 8660d41aa369857db0b6b7b3e91d5d1c18ceb77e Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:11:45 +0100 Subject: [PATCH 14/23] Changed width of locale field Signed-off-by: snipe --- resources/macros/macros.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/macros/macros.php b/resources/macros/macros.php index 43dc2cc2e0..92c8ecedac 100644 --- a/resources/macros/macros.php +++ b/resources/macros/macros.php @@ -11,7 +11,7 @@ Form::macro('locales', function ($name = 'locale', $selected = null, $class = nu $idclause = (!is_null($id)) ? $id : ''; - $select = ''; $select .= ''; // Pull the autoglossonym array from the localizations translation file From d73d15b8a2436ef3de45592d93cb42eb50a9bae6 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:11:59 +0100 Subject: [PATCH 15/23] Added form macro for name format Signed-off-by: snipe --- resources/macros/macros.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/resources/macros/macros.php b/resources/macros/macros.php index 92c8ecedac..c5c7824edc 100644 --- a/resources/macros/macros.php +++ b/resources/macros/macros.php @@ -109,6 +109,23 @@ Form::macro('digit_separator', function ($name = 'digit_separator', $selected = return $select; }); + +Form::macro('name_display_format', function ($name = 'name_display_format', $selected = null, $class = null) { + $formats = [ + 'first_last' => trans('general.firstname_lastname_display'), + 'last_first' => trans('general.lastname_firstname_display'), + ]; + + $select = ''; + + return $select; +}); + /** * Barcode macro * Generates the dropdown menu of available 1D barcodes From bfd674b622d08b50c59b8a86a7363b4567ef40a2 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:12:25 +0100 Subject: [PATCH 16/23] Switched to getFullNameAttribute() from fullName() in User Presenter Signed-off-by: snipe --- app/Presenters/UserPresenter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index 080a2d10e9..f70ddf8af6 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -433,7 +433,7 @@ class UserPresenter extends Presenter */ public function nameUrl() { - return (string) link_to_route('users.show', $this->fullName(), $this->id); + return (string) link_to_route('users.show', $this->getFullNameAttribute(), $this->id); } /** From ba0643f6a40e422113d3f9394f4ef02b281dbf9c Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:13:28 +0100 Subject: [PATCH 17/23] Added name display format, tweaked some Signed-off-by: snipe --- .../views/settings/localization.blade.php | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/resources/views/settings/localization.blade.php b/resources/views/settings/localization.blade.php index a74387b32d..4f800511f1 100644 --- a/resources/views/settings/localization.blade.php +++ b/resources/views/settings/localization.blade.php @@ -42,26 +42,39 @@
-
+
{{ Form::label('site_name', trans('admin/settings/general.default_language')) }}
-
+
{!! Form::locales('locale', Request::old('locale', $setting->locale), 'select2') !!} {!! $errors->first('locale', '') !!}
+ +
+
+ {{ Form::label('name_display_format', trans('general.name_display_format')) }} +
+
+ {!! Form::name_display_format('name_display_format', Request::old('name_display_format', $setting->name_display_format), 'select2') !!} + + {!! $errors->first('name_display_format', '') !!} +
+
+ +
-
+
{{ Form::label('time_display_format', trans('general.time_and_date_display')) }}
-
+
{!! Form::date_display_format('date_display_format', Request::old('date_display_format', $setting->date_display_format), 'select2') !!}
-
+
{!! Form::time_display_format('time_display_format', Request::old('time_display_format', $setting->time_display_format), 'select2') !!}
@@ -71,10 +84,10 @@
-
+
{{ Form::label('default_currency', trans('admin/settings/general.default_currency')) }}
-
+
{{ Form::text('default_currency', old('default_currency', $setting->default_currency), array('class' => 'form-control select2-container','placeholder' => 'USD', 'maxlength'=>'3', 'style'=>'width: 60px; display: inline-block; ')) }} {!! Form::digit_separator('digit_separator', old('digit_separator', $setting->digit_separator), 'select2') !!} @@ -84,9 +97,6 @@
- - -
From c617bf89b6d5202ff9f0c430d159066cd4158adf Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:13:45 +0100 Subject: [PATCH 18/23] Tweak layout Signed-off-by: snipe --- resources/views/account/profile.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/account/profile.blade.php b/resources/views/account/profile.blade.php index 2c3158c88f..a42c91e7a1 100755 --- a/resources/views/account/profile.blade.php +++ b/resources/views/account/profile.blade.php @@ -46,7 +46,7 @@
-
+
@if (!config('app.lock_passwords')) {!! Form::locales('locale', old('locale', $user->locale), 'select2') !!} From 36a343365e7777f4b914e1fa67a6d09e1bd067af Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 Aug 2023 20:14:07 +0100 Subject: [PATCH 19/23] Switched from fullName() to getFullNameAttribute() Signed-off-by: snipe --- resources/views/account/view-assets.blade.php | 2 +- resources/views/layouts/default.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/account/view-assets.blade.php b/resources/views/account/view-assets.blade.php index b77bddcf0d..10b09602ab 100755 --- a/resources/views/account/view-assets.blade.php +++ b/resources/views/account/view-assets.blade.php @@ -2,7 +2,7 @@ {{-- Page title --}} @section('title') -{{ trans('general.hello_name', array('name' => $user->present()->fullName())) }} +{{ trans('general.hello_name', array('name' => $user->present()->getFullNameAttribute())) }} @parent @stop diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 13a65bf28b..a9f547f4f5 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -328,7 +328,7 @@ @endif -