From f5122b01b11e04292259fcb56194e7f3b6603914 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 4 Apr 2023 15:51:04 -0400 Subject: [PATCH 01/28] Mock Up of the Buttons --- resources/views/hardware/view.blade.php | 70 +++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index e5fc43b613..584d70311b 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -864,15 +864,74 @@
@if (($asset->image) || (($asset->model) && ($asset->model->image!=''))) - - + @else + @endif + + + @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1')) + @if (($asset->assigned_to != '') && ($asset->deleted_at=='')) + @can('checkin', \App\Models\Asset::class) + + @endcan + @elseif (($asset->assigned_to == '') && ($asset->deleted_at=='')) + @can('checkout', \App\Models\Asset::class) + + @endcan + @endif + @endif + + + @can('update', $asset) + + @endcan + + @can('create', $asset) + + @endcan + + @can('audit', \App\Models\Asset::class) + + @endcan + + @can('delete', $asset) + @if ($asset->deleted_at=='') +
+
+ {{csrf_field()}} + {{ method_field("DELETE")}} + +
+
+ @endif + @endcan + @if ($asset->deleted_at!='')
@@ -887,11 +946,13 @@ @endif @if (($asset->assignedTo) && ($asset->deleted_at=='')) -

{{ trans('admin/hardware/form.checkedout_to') }}

+
+

{{ trans('admin/hardware/form.checkedout_to') }}

@if($asset->checkedOutToUser()) - {{ $asset->assignedTo->present()->fullName() }} + {{ $asset->assignedTo->present()->fullName() }} @endif +

{!! $asset->assignedTo->present()->glyph() . ' ' .$asset->assignedTo->present()->nameUrl() !!}

@@ -926,6 +987,7 @@ @endif +
@endif
From cc88a361ca462104e9ea947d13d0b5cdb4311d6e Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 6 Apr 2023 15:01:01 -0400 Subject: [PATCH 02/28] commiting --- resources/views/hardware/view.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 584d70311b..866e8464b6 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -946,7 +946,7 @@ @endif @if (($asset->assignedTo) && ($asset->deleted_at=='')) -
+

{{ trans('admin/hardware/form.checkedout_to') }}

@if($asset->checkedOutToUser()) From a65b8025b61a568b347ce82490a986c18276069e Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 11 Apr 2023 13:52:14 -0400 Subject: [PATCH 03/28] push for testing --- app/Http/Controllers/Assets/AssetsController.php | 2 +- resources/views/hardware/view.blade.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index 3b2ff4623f..d6c4732d29 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -767,7 +767,7 @@ class AssetsController extends Controller } /** - * Retore a deleted asset. + * Restore a deleted asset. * * @author [A. Gianotto] [] * @param int $assetId diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 866e8464b6..60fd2cab97 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -873,7 +873,7 @@ @endif - + @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1')) @if (($asset->assigned_to != '') && ($asset->deleted_at=='')) @@ -923,10 +923,10 @@ @can('delete', $asset) @if ($asset->deleted_at=='')

- + {{csrf_field()}} {{ method_field("DELETE")}} - +
@endif From af549a0be9430ae141270c72f62bad4310c18183 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 4 Apr 2023 15:51:04 -0400 Subject: [PATCH 04/28] Mock Up of the Buttons --- resources/views/hardware/view.blade.php | 70 +++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index ccd3f86536..89bd1ad7c3 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -864,15 +864,74 @@
@if (($asset->image) || (($asset->model) && ($asset->model->image!=''))) - - + @else + @endif + + + @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1')) + @if (($asset->assigned_to != '') && ($asset->deleted_at=='')) + @can('checkin', \App\Models\Asset::class) + + @endcan + @elseif (($asset->assigned_to == '') && ($asset->deleted_at=='')) + @can('checkout', \App\Models\Asset::class) + + @endcan + @endif + @endif + + + @can('update', $asset) + + @endcan + + @can('create', $asset) + + @endcan + + @can('audit', \App\Models\Asset::class) + + @endcan + + @can('delete', $asset) + @if ($asset->deleted_at=='') +
+
+ {{csrf_field()}} + {{ method_field("DELETE")}} + +
+
+ @endif + @endcan + @if ($asset->deleted_at!='')
@@ -887,11 +946,13 @@ @endif @if (($asset->assignedTo) && ($asset->deleted_at=='')) -

{{ trans('admin/hardware/form.checkedout_to') }}

+
+

{{ trans('admin/hardware/form.checkedout_to') }}

@if($asset->checkedOutToUser()) - {{ $asset->assignedTo->present()->fullName() }} + {{ $asset->assignedTo->present()->fullName() }} @endif +

{!! $asset->assignedTo->present()->glyph() . ' ' .$asset->assignedTo->present()->nameUrl() !!}

@@ -926,6 +987,7 @@ @endif +
@endif
From aabcf22b40756c2cd0e2bc81d5e7c28326432722 Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 6 Apr 2023 15:01:01 -0400 Subject: [PATCH 05/28] commiting --- resources/views/hardware/view.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 89bd1ad7c3..34045945af 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -946,7 +946,7 @@ @endif @if (($asset->assignedTo) && ($asset->deleted_at=='')) -
+

{{ trans('admin/hardware/form.checkedout_to') }}

@if($asset->checkedOutToUser()) From d94bed3f57136f82f140d33ac9b096e64a139214 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 11 Apr 2023 13:52:14 -0400 Subject: [PATCH 06/28] push for testing --- app/Http/Controllers/Assets/AssetsController.php | 2 +- resources/views/hardware/view.blade.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index 2a93845507..fe540f56cb 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -767,7 +767,7 @@ class AssetsController extends Controller } /** - * Retore a deleted asset. + * Restore a deleted asset. * * @author [A. Gianotto] [] * @param int $assetId diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 34045945af..86783fc4c4 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -873,7 +873,7 @@ @endif - + @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1')) @if (($asset->assigned_to != '') && ($asset->deleted_at=='')) @@ -923,10 +923,10 @@ @can('delete', $asset) @if ($asset->deleted_at=='')

- + {{csrf_field()}} {{ method_field("DELETE")}} - +
@endif From b1e68be54528dc74320bfb1e454d3985aaa2428e Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 12 Apr 2023 18:33:44 -0400 Subject: [PATCH 07/28] delete button progress --- resources/lang/en/admin/hardware/general.php | 1 + resources/views/hardware/view.blade.php | 65 +------------------- routes/web/hardware.php | 6 +- 3 files changed, 6 insertions(+), 66 deletions(-) diff --git a/resources/lang/en/admin/hardware/general.php b/resources/lang/en/admin/hardware/general.php index b0a48f2ce4..bf1ec4283c 100644 --- a/resources/lang/en/admin/hardware/general.php +++ b/resources/lang/en/admin/hardware/general.php @@ -12,6 +12,7 @@ return [ 'clone' => 'Clone Asset', 'deployable' => 'Deployable', 'deleted' => 'This asset has been deleted.', + 'delete_confirm' => 'Are you sure you want to delete this asset?', 'edit' => 'Edit Asset', 'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.', 'model_invalid' => 'The Model of this Asset is invalid.', diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 86783fc4c4..a7d05998f7 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -6,67 +6,6 @@ @parent @stop -{{-- Right header --}} -@section('header_right') - - - @can('manage', \App\Models\Asset::class) - @if ($asset->deleted_at=='') - - @endif - @endcan -@stop - {{-- Page content --}} @section('content') @@ -923,10 +862,10 @@ @can('delete', $asset) @if ($asset->deleted_at=='')
-
+ {{csrf_field()}} {{ method_field("DELETE")}} - +
@endif diff --git a/routes/web/hardware.php b/routes/web/hardware.php index 690d8e0d1c..765cf9afc7 100644 --- a/routes/web/hardware.php +++ b/routes/web/hardware.php @@ -146,9 +146,9 @@ Route::group( [AssetFilesController::class, 'show'] )->name('show/assetfile'); - Route::delete('{assetId}/showfile/{fileId}/delete', - [AssetFilesController::class, 'destroy'] - )->name('delete/assetfile'); + Route::delete('{assetId}/delete', + [AssetsController::class, 'destroy'] + )->name('hardware/delete'); Route::post( 'bulkedit', From 84134b45e6c445601abbf0bd18ef156c3f02b64d Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 26 Apr 2023 17:03:07 -0400 Subject: [PATCH 08/28] form work --- resources/views/hardware/view.blade.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index a7d05998f7..90b5fc8087 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -862,17 +862,18 @@ @can('delete', $asset) @if ($asset->deleted_at=='')
-
- {{csrf_field()}} - {{ method_field("DELETE")}} + + {{ csrf_field() }} + {{ method_field("DELETE") }} + {{ trans('general.delete') }}
@endif @endcan @if ($asset->deleted_at!='') -
+
@csrf From d3675831bb1ed8e0287de4264423c55cbacc0ed8 Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 27 Apr 2023 18:58:55 -0400 Subject: [PATCH 09/28] snippet rewrite --- resources/views/hardware/view.blade.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 90b5fc8087..9277a0d797 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -862,12 +862,8 @@ @can('delete', $asset) @if ($asset->deleted_at=='')
- - {{ csrf_field() }} - {{ method_field("DELETE") }} - - {{ trans('general.delete') }} - + + {{ trans('general.delete') }}
@endif @endcan From cd389368f72ae674a7458bd2ff99c8a89ffd2da8 Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 27 Apr 2023 19:00:17 -0400 Subject: [PATCH 10/28] adding in script --- resources/views/hardware/view.blade.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 9277a0d797..2dd8ecb957 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -1376,6 +1376,16 @@ @stop @section('moar_scripts') + @include ('partials.bootstrap-table') @stop From ad7a1d6c3bd4e103d88769e1c44558e395a0a4ee Mon Sep 17 00:00:00 2001 From: akemidx Date: Mon, 1 May 2023 15:50:48 -0400 Subject: [PATCH 11/28] edits from Github comments --- resources/lang/en/general.php | 3 +-- resources/views/hardware/view.blade.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 328eb32090..0abc3b0dc0 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -91,7 +91,6 @@ return [ 'debug_warning' => 'Warning!', 'debug_warning_text' => 'This application is running in production mode with debugging enabled. This can expose sensitive data if your application is accessible to the outside world. Disable debug mode by setting the APP_DEBUG value in your .env file to false.', 'delete' => 'Delete', - 'delete_confirm' => 'Are you sure you wish to delete :item?', 'deleted' => 'Deleted', 'delete_seats' => 'Deleted Seats', 'deletion_failed' => 'Deletion failed', @@ -263,7 +262,7 @@ return [ 'accept_eula' => 'Acceptance Agreement', 'supplier' => 'Supplier', 'suppliers' => 'Suppliers', - 'sure_to_delete' => 'Are you sure you wish to delete', + 'sure_to_delete' => 'Are you sure you wish to delete :item?', 'submit' => 'Submit', 'target' => 'Target', 'time_and_date_display' => 'Time and Date Display', diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 2dd8ecb957..9a58b163b0 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -862,7 +862,7 @@ @can('delete', $asset) @if ($asset->deleted_at=='')
- + {{ trans('general.delete') }}
@endif @@ -886,7 +886,7 @@

{{ trans('admin/hardware/form.checkedout_to') }}

@if($asset->checkedOutToUser()) - {{ $asset->assignedTo->present()->fullName() }} + {{ $asset->assignedTo->present()->fullName() }} @endif

{!! $asset->assignedTo->present()->glyph() . ' ' .$asset->assignedTo->present()->nameUrl() !!} From 2cb1545b8358df1ecb7219a570a579f7fd224285 Mon Sep 17 00:00:00 2001 From: akemidx Date: Mon, 1 May 2023 19:51:52 -0400 Subject: [PATCH 12/28] removing route --- routes/web/hardware.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/routes/web/hardware.php b/routes/web/hardware.php index 765cf9afc7..7bd9c19c67 100644 --- a/routes/web/hardware.php +++ b/routes/web/hardware.php @@ -146,10 +146,6 @@ Route::group( [AssetFilesController::class, 'show'] )->name('show/assetfile'); - Route::delete('{assetId}/delete', - [AssetsController::class, 'destroy'] - )->name('hardware/delete'); - Route::post( 'bulkedit', [BulkAssetsController::class, 'edit'] From 889be83762528169599da2e3a48cf600267a8059 Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 3 May 2023 14:14:18 -0400 Subject: [PATCH 13/28] replacing route. sorry! --- routes/web/hardware.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routes/web/hardware.php b/routes/web/hardware.php index 7bd9c19c67..690d8e0d1c 100644 --- a/routes/web/hardware.php +++ b/routes/web/hardware.php @@ -146,6 +146,10 @@ Route::group( [AssetFilesController::class, 'show'] )->name('show/assetfile'); + Route::delete('{assetId}/showfile/{fileId}/delete', + [AssetFilesController::class, 'destroy'] + )->name('delete/assetfile'); + Route::post( 'bulkedit', [BulkAssetsController::class, 'edit'] From 1916594d274cff13a858d0f0c97c30d0a3f9f2fc Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 10 May 2023 19:16:11 -0400 Subject: [PATCH 14/28] fixing translation --- 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 0abc3b0dc0..4874158bc9 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -262,7 +262,7 @@ return [ 'accept_eula' => 'Acceptance Agreement', 'supplier' => 'Supplier', 'suppliers' => 'Suppliers', - 'sure_to_delete' => 'Are you sure you wish to delete :item?', + 'sure_to_delete' => 'Are you sure you wish to delete', 'submit' => 'Submit', 'target' => 'Target', 'time_and_date_display' => 'Time and Date Display', From e0df8cc4aa97a5a75abd145aac262183ca90090a Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 11 Jul 2023 17:21:32 -0600 Subject: [PATCH 15/28] Add admin role to show encrypted customfield values --- app/Http/Transformers/AssetsTransformer.php | 4 ++-- resources/views/hardware/view.blade.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Transformers/AssetsTransformer.php b/app/Http/Transformers/AssetsTransformer.php index 0ad93b43ef..9f70d14e8f 100644 --- a/app/Http/Transformers/AssetsTransformer.php +++ b/app/Http/Transformers/AssetsTransformer.php @@ -101,10 +101,10 @@ class AssetsTransformer foreach ($asset->model->fieldset->fields as $field) { if ($field->isFieldDecryptable($asset->{$field->db_column})) { $decrypted = Helper::gracefulDecrypt($field, $asset->{$field->db_column}); - $value = (Gate::allows('superadmin')) ? $decrypted : strtoupper(trans('admin/custom_fields/general.encrypted')); + $value = (Gate::allows('superadmin') || Gate::allows('admin')) ? $decrypted : strtoupper(trans('admin/custom_fields/general.encrypted')); if ($field->format == 'DATE'){ - if (Gate::allows('superadmin')){ + if (Gate::allows('superadmin') || Gate::allows('admin')){ $value = Helper::getFormattedDateObject($value, 'date', false); } else { $value = strtoupper(trans('admin/custom_fields/general.encrypted')); diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index d183df09b3..df6ea83d2e 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -460,7 +460,7 @@ @endif @if ($field->isFieldDecryptable($asset->{$field->db_column_name()} )) - @can('superuser') + @canany(['superuser', 'admin']) @if (($field->format=='URL') && ($asset->{$field->db_column_name()}!='')) {{ Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }} @elseif (($field->format=='DATE') && ($asset->{$field->db_column_name()}!='')) @@ -470,7 +470,7 @@ @endif @else {{ strtoupper(trans('admin/custom_fields/general.encrypted')) }} - @endcan + @endcanany @else @if (($field->format=='BOOLEAN') && ($asset->{$field->db_column_name()}!='')) From ecac4718fe3c2961a4e693f2038657b90cae98dc Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Thu, 13 Jul 2023 16:02:47 -0600 Subject: [PATCH 16/28] Add date casting to the SQL query, so the BETWEEN range doesn't care about time of day in custom report datetimes --- app/Http/Controllers/ReportsController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 4fa7990a22..2e05b0ae70 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -639,10 +639,10 @@ class ReportsController extends Controller } if (($request->filled('created_start')) && ($request->filled('created_end'))) { - $assets->whereBetween('assets.created_at', [$request->input('created_start'), $request->input('created_end')]); + $assets->whereBetween(\DB::raw('DATE(assets.created_at)'), [$request->input('created_start'), $request->input('created_end')]); } if (($request->filled('checkout_date_start')) && ($request->filled('checkout_date_end'))) { - $assets->whereBetween('assets.last_checkout', [$request->input('checkout_date_start'), $request->input('checkout_date_end')]); + $assets->whereBetween(\DB::raw('DATE(assets.last_checkout)'), [$request->input('checkout_date_start'), $request->input('checkout_date_end') ]); } if (($request->filled('expected_checkin_start')) && ($request->filled('expected_checkin_end'))) { @@ -650,7 +650,7 @@ class ReportsController extends Controller } if (($request->filled('last_audit_start')) && ($request->filled('last_audit_end'))) { - $assets->whereBetween('assets.last_audit_date', [$request->input('last_audit_start'), $request->input('last_audit_end')]); + $assets->whereBetween(\DB::raw('DATE(assets.last_audit_date)'), [$request->input('last_audit_start'), $request->input('last_audit_end')]); } if (($request->filled('next_audit_start')) && ($request->filled('next_audit_end'))) { From 3b4a2b0f5baea9b60bd0b45e1570e69c5ae39bcf Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 19 Jul 2023 14:57:57 -0600 Subject: [PATCH 17/28] Add permission to view and modify encrypted custom fields --- config/permissions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/permissions.php b/config/permissions.php index 0b65a4e26b..10c44a1896 100644 --- a/config/permissions.php +++ b/config/permissions.php @@ -106,6 +106,13 @@ return [ 'display' => true, ], + [ + 'permission' => 'assets.view.encrypted_custom_fields', + 'label' => 'View and Modify Encrypted Custom Fields', + 'note' => '', + 'display' => true, + ], + ], 'Accessories' => [ From 705411eb4d363e2f3941283f7ae9ca62be58b074 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 19 Jul 2023 19:44:59 -0600 Subject: [PATCH 18/28] Create the Gate that goes with the permission --- app/Providers/AuthServiceProvider.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index f1e817ca16..9d493e85bb 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -146,6 +146,11 @@ class AuthServiceProvider extends ServiceProvider } }); + Gate::define('assets.view.encrypted_custom_fields', function ($user) { + if($user->hasAccess('assets.view.encrypted_custom_fields')){ + return true; + } + }); // ----------------------------------------- // Reports From ecf522243b8f08e4c2ae1d9bf68516b94fe980ae Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 19 Jul 2023 19:52:03 -0600 Subject: [PATCH 19/28] Add the new rule to proper views and also in the Asset Transformer --- app/Http/Transformers/AssetsTransformer.php | 4 ++-- resources/views/hardware/view.blade.php | 4 ++-- resources/views/models/custom_fields_form.blade.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Transformers/AssetsTransformer.php b/app/Http/Transformers/AssetsTransformer.php index 9f70d14e8f..9413defec6 100644 --- a/app/Http/Transformers/AssetsTransformer.php +++ b/app/Http/Transformers/AssetsTransformer.php @@ -101,10 +101,10 @@ class AssetsTransformer foreach ($asset->model->fieldset->fields as $field) { if ($field->isFieldDecryptable($asset->{$field->db_column})) { $decrypted = Helper::gracefulDecrypt($field, $asset->{$field->db_column}); - $value = (Gate::allows('superadmin') || Gate::allows('admin')) ? $decrypted : strtoupper(trans('admin/custom_fields/general.encrypted')); + $value = (Gate::allows('assets.view.encrypted_custom_fields')) ? $decrypted : strtoupper(trans('admin/custom_fields/general.encrypted')); if ($field->format == 'DATE'){ - if (Gate::allows('superadmin') || Gate::allows('admin')){ + if (Gate::allows('assets.view.encrypted_custom_fields')){ $value = Helper::getFormattedDateObject($value, 'date', false); } else { $value = strtoupper(trans('admin/custom_fields/general.encrypted')); diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index df6ea83d2e..a154065ed9 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -460,7 +460,7 @@ @endif @if ($field->isFieldDecryptable($asset->{$field->db_column_name()} )) - @canany(['superuser', 'admin']) + @can('assets.view.encrypted_custom_fields') @if (($field->format=='URL') && ($asset->{$field->db_column_name()}!='')) {{ Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }} @elseif (($field->format=='DATE') && ($asset->{$field->db_column_name()}!='')) @@ -470,7 +470,7 @@ @endif @else {{ strtoupper(trans('admin/custom_fields/general.encrypted')) }} - @endcanany + @endcan @else @if (($field->format=='BOOLEAN') && ($asset->{$field->db_column_name()}!='')) diff --git a/resources/views/models/custom_fields_form.blade.php b/resources/views/models/custom_fields_form.blade.php index cbc6a731ab..011ad4ca9b 100644 --- a/resources/views/models/custom_fields_form.blade.php +++ b/resources/views/models/custom_fields_form.blade.php @@ -53,7 +53,7 @@ @else - @if (($field->field_encrypted=='0') || (Gate::allows('admin'))) + @if (($field->field_encrypted=='0') || (Gate::allows('assets.view.encrypted_custom_fields'))) @else From cb4ed92639d1510e4ea8be7337fe0753f3e724e8 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Thu, 20 Jul 2023 16:17:06 -0600 Subject: [PATCH 20/28] Use Carbon date objects instead of casting using DB::raw() --- app/Http/Controllers/ReportsController.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 2e05b0ae70..11b829f3be 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -639,10 +639,16 @@ class ReportsController extends Controller } if (($request->filled('created_start')) && ($request->filled('created_end'))) { - $assets->whereBetween(\DB::raw('DATE(assets.created_at)'), [$request->input('created_start'), $request->input('created_end')]); + $created_start = \Carbon::parse($request->input('created_start'))->startOfDay(); + $created_end = \Carbon::parse($request->input('created_end'))->endOfDay(); + + $assets->whereBetween('assets.created_at', [$created_start, $created_end]); } if (($request->filled('checkout_date_start')) && ($request->filled('checkout_date_end'))) { - $assets->whereBetween(\DB::raw('DATE(assets.last_checkout)'), [$request->input('checkout_date_start'), $request->input('checkout_date_end') ]); + $checkout_start = \Carbon::parse($request->input('checkout_date_start'))->startOfDay(); + $checkout_end = \Carbon::parse($request->input('checkout_date_end'))->endOfDay(); + + $assets->whereBetween('assets.last_checkout', [$checkout_start, $checkout_end]); } if (($request->filled('expected_checkin_start')) && ($request->filled('expected_checkin_end'))) { @@ -650,7 +656,10 @@ class ReportsController extends Controller } if (($request->filled('last_audit_start')) && ($request->filled('last_audit_end'))) { - $assets->whereBetween(\DB::raw('DATE(assets.last_audit_date)'), [$request->input('last_audit_start'), $request->input('last_audit_end')]); + $last_audit_start = \Carbon::parse($request->input('last_audit_start'))->startOfDay(); + $last_audit_end = \Carbon::parse($request->input('last_audit_end'))->endOfDay(); + + $assets->whereBetween('assets.last_audit_date', [$last_audit_start, $last_audit_end]); } if (($request->filled('next_audit_start')) && ($request->filled('next_audit_end'))) { From b082d27c420653c1218819eafb980babd79f2d5a Mon Sep 17 00:00:00 2001 From: akemidx Date: Mon, 24 Jul 2023 17:12:12 -0400 Subject: [PATCH 21/28] removing :item --- 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 674dec6e47..765fc98d44 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -264,7 +264,7 @@ return [ 'accept_eula' => 'Acceptance Agreement', 'supplier' => 'Supplier', 'suppliers' => 'Suppliers', - 'sure_to_delete' => 'Are you sure you wish to delete', + 'sure_to_delete' => 'Are you sure you wish to delete?', 'submit' => 'Submit', 'target' => 'Target', 'time_and_date_display' => 'Time and Date Display', From e289e95721fff0a012c141f370fcca49662b8d0f Mon Sep 17 00:00:00 2001 From: akemidx Date: Mon, 24 Jul 2023 17:22:10 -0400 Subject: [PATCH 22/28] no ? needed --- 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 765fc98d44..674dec6e47 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -264,7 +264,7 @@ return [ 'accept_eula' => 'Acceptance Agreement', 'supplier' => 'Supplier', 'suppliers' => 'Suppliers', - 'sure_to_delete' => 'Are you sure you wish to delete?', + 'sure_to_delete' => 'Are you sure you wish to delete', 'submit' => 'Submit', 'target' => 'Target', 'time_and_date_display' => 'Time and Date Display', From 11e348726378dcf931b2fabc1fbaa380835e19a1 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 25 Jul 2023 11:40:00 -0700 Subject: [PATCH 23/28] custom field set order starts at 1 now --- app/Http/Controllers/CustomFieldsetsController.php | 3 +-- resources/views/custom_fields/fieldsets/view.blade.php | 2 +- resources/views/settings/ldap.blade.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/CustomFieldsetsController.php b/app/Http/Controllers/CustomFieldsetsController.php index dbee97b776..dc9bd6056e 100644 --- a/app/Http/Controllers/CustomFieldsetsController.php +++ b/app/Http/Controllers/CustomFieldsetsController.php @@ -51,13 +51,12 @@ class CustomFieldsetsController extends Controller $maxid = 0; foreach ($cfset->fields as $field) { if ($field->pivot->order > $maxid) { - $maxid = $field->pivot->order; + $maxid = ($field->pivot->order); } if (isset($custom_fields_list[$field->id])) { unset($custom_fields_list[$field->id]); } } - return view('custom_fields.fieldsets.view')->with('custom_fieldset', $cfset)->with('maxid', $maxid + 1)->with('custom_fields_list', $custom_fields_list); } diff --git a/resources/views/custom_fields/fieldsets/view.blade.php b/resources/views/custom_fields/fieldsets/view.blade.php index c330522cc1..003ee0cd84 100644 --- a/resources/views/custom_fields/fieldsets/view.blade.php +++ b/resources/views/custom_fields/fieldsets/view.blade.php @@ -51,7 +51,7 @@ @endcan - {{$field->pivot->order}} + {{$field->pivot->order + 1}} {{$field->name}} {{$field->format}} {{$field->element}} diff --git a/resources/views/settings/ldap.blade.php b/resources/views/settings/ldap.blade.php index b3070e13e1..fc8dd5161a 100644 --- a/resources/views/settings/ldap.blade.php +++ b/resources/views/settings/ldap.blade.php @@ -20,7 +20,7 @@ } - @if ((!function_exists('ldap_connect')) || (!function_exists('ldap_set_option')) || (!function_exists('ldap_bind'))) + git checkout -b bug/sc-19126if ((!function_exists('ldap_connect')) || (!function_exists('ldap_set_option')) || (!function_exists('ldap_bind')))
From 9c6e8d57aa0e069a3c0f9fc6b30befa94dfe0f92 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 25 Jul 2023 11:44:16 -0700 Subject: [PATCH 24/28] removes typos --- app/Http/Controllers/CustomFieldsetsController.php | 3 ++- resources/views/settings/ldap.blade.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/CustomFieldsetsController.php b/app/Http/Controllers/CustomFieldsetsController.php index dc9bd6056e..dbee97b776 100644 --- a/app/Http/Controllers/CustomFieldsetsController.php +++ b/app/Http/Controllers/CustomFieldsetsController.php @@ -51,12 +51,13 @@ class CustomFieldsetsController extends Controller $maxid = 0; foreach ($cfset->fields as $field) { if ($field->pivot->order > $maxid) { - $maxid = ($field->pivot->order); + $maxid = $field->pivot->order; } if (isset($custom_fields_list[$field->id])) { unset($custom_fields_list[$field->id]); } } + return view('custom_fields.fieldsets.view')->with('custom_fieldset', $cfset)->with('maxid', $maxid + 1)->with('custom_fields_list', $custom_fields_list); } diff --git a/resources/views/settings/ldap.blade.php b/resources/views/settings/ldap.blade.php index fc8dd5161a..b3070e13e1 100644 --- a/resources/views/settings/ldap.blade.php +++ b/resources/views/settings/ldap.blade.php @@ -20,7 +20,7 @@ } - git checkout -b bug/sc-19126if ((!function_exists('ldap_connect')) || (!function_exists('ldap_set_option')) || (!function_exists('ldap_bind'))) + @if ((!function_exists('ldap_connect')) || (!function_exists('ldap_set_option')) || (!function_exists('ldap_bind')))
From c01526418178454b67e90a7aa0f4e5e5034809f1 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 25 Jul 2023 16:23:33 -0600 Subject: [PATCH 25/28] Adjust the license offset if it exceeds the total of license seats --- app/Http/Controllers/Api/LicenseSeatsController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/Api/LicenseSeatsController.php b/app/Http/Controllers/Api/LicenseSeatsController.php index 884c9c59c4..a091741e85 100644 --- a/app/Http/Controllers/Api/LicenseSeatsController.php +++ b/app/Http/Controllers/Api/LicenseSeatsController.php @@ -42,6 +42,11 @@ class LicenseSeatsController extends Controller // Make sure the offset and limit are actually integers and do not exceed system limits $offset = ($request->input('offset') > $seats->count()) ? $seats->count() : abs($request->input('offset')); + + if ($offset >= $total ){ + $offset = 0; + } + $limit = app('api_limit_value'); $seats = $seats->skip($offset)->take($limit)->get(); From 0a841ddbb8f1c60c19e2ed66b59af3745f9d3a7c Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Thu, 27 Jul 2023 20:22:13 -0600 Subject: [PATCH 26/28] Change component validator to the correct asset id we're passing in the API call --- app/Http/Controllers/Api/ComponentsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/ComponentsController.php b/app/Http/Controllers/Api/ComponentsController.php index 8b51344424..4806caf8a3 100644 --- a/app/Http/Controllers/Api/ComponentsController.php +++ b/app/Http/Controllers/Api/ComponentsController.php @@ -235,7 +235,7 @@ class ComponentsController extends Controller $this->authorize('checkout', $component); $validator = Validator::make($request->all(), [ - 'asset_id' => 'required|exists:assets,id', + 'assigned_to' => 'required|exists:assets,id', 'assigned_qty' => "required|numeric|min:1|digits_between:1,".$component->numRemaining(), ]); From 96d69b654df704c928c3cea41e6c45537895eff1 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 31 Jul 2023 13:45:15 +0100 Subject: [PATCH 27/28] Updated BS table and table export plugins Signed-off-by: snipe --- package-lock.json | 164 +++++++++++++++++++++++++++------------------- package.json | 4 +- 2 files changed, 97 insertions(+), 71 deletions(-) diff --git a/package-lock.json b/package-lock.json index a27782777e..2c334fd025 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1431,9 +1431,9 @@ }, "dependencies": { "tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" } } }, @@ -2215,6 +2215,15 @@ "picomatch": "^2.0.4" } }, + "array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "requires": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + } + }, "array-filter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", @@ -3154,9 +3163,9 @@ "integrity": "sha1-EQPWvADPv6jPyaJZmrUYxVZD2j8=" }, "bootstrap-table": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.22.0.tgz", - "integrity": "sha512-N1MLgPcIOa9cfwr7CaoLOekKJ9nHq/z8lk6LsC3mLUZq77VeMC/vTh+EqN7+iT8JADmoAsX7RqQbYfVxF9ZCig==" + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.22.1.tgz", + "integrity": "sha512-Nw8p+BmaiMDSfoer/p49YeI3vJQAWhudxhyKMuqnJBb3NRvCRewMk7JDgiN9SQO3YeSejOirKtcdWpM0dtddWg==" }, "brace-expansion": { "version": "1.1.11", @@ -3555,9 +3564,9 @@ }, "dependencies": { "core-js": { - "version": "3.29.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.29.1.tgz", - "integrity": "sha512-+jwgnhg6cQxKYIIjGtAHq2nwUOolo9eoFZ4sHfUH09BLXBgxnH4gA0zEd+t+BO2cNB8idaBtZFcFTRjQJRJmAw==", + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.0.tgz", + "integrity": "sha512-rd4rYZNlF3WuoYuRIDEmbR/ga9CeuWX9U05umAvgrrZoHY4Z++cp/xwPQMvUpBB4Ag6J8KfD80G0zwCyaSxDww==", "optional": true }, "regenerator-runtime": { @@ -4350,15 +4359,16 @@ } }, "deep-equal": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz", - "integrity": "sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.2.tgz", + "integrity": "sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==", "requires": { + "array-buffer-byte-length": "^1.0.0", "call-bind": "^1.0.2", - "es-get-iterator": "^1.1.2", - "get-intrinsic": "^1.1.3", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.1", "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.1", + "is-array-buffer": "^3.0.2", "is-date-object": "^1.0.5", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", @@ -4366,7 +4376,7 @@ "object-is": "^1.1.5", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", + "regexp.prototype.flags": "^1.5.0", "side-channel": "^1.0.4", "which-boxed-primitive": "^1.0.2", "which-collection": "^1.0.1", @@ -4388,12 +4398,13 @@ } }, "get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, @@ -4428,18 +4439,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - } - }, "isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", @@ -4457,16 +4456,15 @@ } }, "which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", "requires": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" + "has-tostringtag": "^1.0.0" } } } @@ -4645,9 +4643,9 @@ } }, "dompurify": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.5.tgz", - "integrity": "sha512-jggCCd+8Iqp4Tsz0nIvpcb22InKEBrGz5dw3EQJMs8HPJDsKbFIO3STYtAvCfDx26Muevn1MHVI0XxjgFfmiSA==", + "version": "2.4.7", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz", + "integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ==", "optional": true }, "domutils": { @@ -4830,12 +4828,13 @@ }, "dependencies": { "get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, @@ -14868,12 +14867,13 @@ }, "dependencies": { "get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, @@ -14955,6 +14955,11 @@ "get-intrinsic": "^1.1.1" } }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" + }, "has-symbols": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", @@ -15472,12 +15477,13 @@ }, "dependencies": { "get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, @@ -15543,12 +15549,13 @@ "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" }, "get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, @@ -15558,9 +15565,17 @@ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, "is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "requires": { + "which-typed-array": "^1.1.11" + } + }, + "which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", "requires": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -15939,9 +15954,9 @@ }, "dependencies": { "core-js": { - "version": "3.29.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.29.1.tgz", - "integrity": "sha512-+jwgnhg6cQxKYIIjGtAHq2nwUOolo9eoFZ4sHfUH09BLXBgxnH4gA0zEd+t+BO2cNB8idaBtZFcFTRjQJRJmAw==", + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.0.tgz", + "integrity": "sha512-rd4rYZNlF3WuoYuRIDEmbR/ga9CeuWX9U05umAvgrrZoHY4Z++cp/xwPQMvUpBB4Ag6J8KfD80G0zwCyaSxDww==", "optional": true } } @@ -18337,13 +18352,24 @@ } }, "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + }, + "dependencies": { + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + } } }, "regexpu-core": { @@ -18909,9 +18935,9 @@ "dev": true }, "stackblur-canvas": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz", - "integrity": "sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.6.0.tgz", + "integrity": "sha512-8S1aIA+UoF6erJYnglGPug6MaHYGo1Ot7h5fuXx4fUPvcvQfcdw2o/ppCse63+eZf8PPidSu4v1JnmEVtEDnpg==", "optional": true }, "statuses": { @@ -19204,11 +19230,11 @@ } }, "tableexport.jquery.plugin": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/tableexport.jquery.plugin/-/tableexport.jquery.plugin-1.27.0.tgz", - "integrity": "sha512-aJ6XBeqtPqV8P2v8vvKNa54SGp9R4V4CIwaIhA1WTkflvoYaWqCyTmf/O6WH5kKBvDpva+RhLnYwsPHEPwdSsg==", + "version": "1.28.0", + "resolved": "https://registry.npmjs.org/tableexport.jquery.plugin/-/tableexport.jquery.plugin-1.28.0.tgz", + "integrity": "sha512-ydDjOhw8A+LOu+801zPXDeMF8MoU1q2HtS2msphCuny0tdXgbXG9GJfA4ll1hBs0ABiAnOaVVZaRuxBmW/qHtw==", "requires": { - "file-saver": ">=2.0.1", + "file-saver": ">=2.0.4", "html2canvas": ">=1.0.0", "jquery": ">=3.2.1", "jspdf": ">=2.0.0", diff --git a/package.json b/package.json index 774fa63b4a..0752f284e7 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "bootstrap-colorpicker": "^2.5.3", "bootstrap-datepicker": "^1.10.0", "bootstrap-less": "^3.3.8", - "bootstrap-table": "1.22.0", + "bootstrap-table": "1.22.1", "chart.js": "^2.9.4", "css-loader": "^4.0.0", "ekko-lightbox": "^5.1.1", @@ -51,7 +51,7 @@ "papaparse": "^4.3.3", "select2": "4.0.13", "sheetjs": "^2.0.0", - "tableexport.jquery.plugin": "1.27.0", + "tableexport.jquery.plugin": "1.28.0", "tether": "^1.4.0", "vue-resource": "^1.5.2", "webpack": "^5.87.0" From 7560afb8c476afcb960ea1de02d7e9c62f8330b4 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 1 Aug 2023 10:45:39 -0700 Subject: [PATCH 28/28] changes webhook_endpoint var to a text --- ..._change_webhook_settings_variable_type.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 database/migrations/2023_08_01_174150_change_webhook_settings_variable_type.php diff --git a/database/migrations/2023_08_01_174150_change_webhook_settings_variable_type.php b/database/migrations/2023_08_01_174150_change_webhook_settings_variable_type.php new file mode 100644 index 0000000000..59c9728e2e --- /dev/null +++ b/database/migrations/2023_08_01_174150_change_webhook_settings_variable_type.php @@ -0,0 +1,33 @@ +text('webhook_endpoint')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('settings', function (Blueprint $table) { + $table->varchar('webhook_endpoint')->change(); + }); + + } +}