From f10807661d0e412c16265ac2570822515edcb32a Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 30 Oct 2024 19:26:52 -0400 Subject: [PATCH 1/7] fixing bulk delete table --- resources/views/hardware/bulk-delete.blade.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/hardware/bulk-delete.blade.php b/resources/views/hardware/bulk-delete.blade.php index 59ba82ff5c..2e36049997 100644 --- a/resources/views/hardware/bulk-delete.blade.php +++ b/resources/views/hardware/bulk-delete.blade.php @@ -42,15 +42,15 @@ {{ $asset->id }} {{ $asset->present()->name() }} - @if ($asset->location) + @if ($asset->location_id) {{ $asset->location->name }} + @elseif($asset->rtd_location_id) + {{ $asset->defaultLoc->name }} @endif - - {{ $asset->assigned_to }} - @if ($asset->assignedTo) - {{ $asset->assignedTo->present()->name()}} + @if ($asset->assigned_to) + {{ $asset->assigned->present()->name() }} @endif From 2f5e468b3c6fae837149d27ed10ff0cc98fcf5f9 Mon Sep 17 00:00:00 2001 From: akemidx Date: Mon, 4 Nov 2024 19:48:34 -0500 Subject: [PATCH 2/7] this fixes the assigned to piece --- resources/views/hardware/bulk-delete.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/hardware/bulk-delete.blade.php b/resources/views/hardware/bulk-delete.blade.php index 2e36049997..fd48f89100 100644 --- a/resources/views/hardware/bulk-delete.blade.php +++ b/resources/views/hardware/bulk-delete.blade.php @@ -42,9 +42,9 @@ {{ $asset->id }} {{ $asset->present()->name() }} - @if ($asset->location_id) + @if ($asset->location) {{ $asset->location->name }} - @elseif($asset->rtd_location_id) + @elseif($asset->rtd_location) {{ $asset->defaultLoc->name }} @endif From 82c38a8b181dcb64b83ce03a2d1001ad36cf4024 Mon Sep 17 00:00:00 2001 From: akemidx Date: Mon, 4 Nov 2024 20:43:18 -0500 Subject: [PATCH 3/7] or statement for if/else --- resources/views/hardware/bulk-delete.blade.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/hardware/bulk-delete.blade.php b/resources/views/hardware/bulk-delete.blade.php index fd48f89100..0e9f24ae50 100644 --- a/resources/views/hardware/bulk-delete.blade.php +++ b/resources/views/hardware/bulk-delete.blade.php @@ -42,10 +42,10 @@ {{ $asset->id }} {{ $asset->present()->name() }} - @if ($asset->location) - {{ $asset->location->name }} - @elseif($asset->rtd_location) - {{ $asset->defaultLoc->name }} + @if ($asset->location || $asset->location_id) + {{ $asset->location->present()->name() }} + @elseif($asset->rtd_location || $asset->rtd_location_id) + {{ $asset->defaultLoc->present()->name() }} @endif From efeef5cdc46760ff51ee9bec9b3c8392c7e4c6ac Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 13 Nov 2024 18:29:58 -0500 Subject: [PATCH 4/7] removing || parts of if else --- resources/views/hardware/bulk-delete.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/hardware/bulk-delete.blade.php b/resources/views/hardware/bulk-delete.blade.php index 0e9f24ae50..37977ca1e2 100644 --- a/resources/views/hardware/bulk-delete.blade.php +++ b/resources/views/hardware/bulk-delete.blade.php @@ -42,9 +42,9 @@ {{ $asset->id }} {{ $asset->present()->name() }} - @if ($asset->location || $asset->location_id) + @if ($asset->location) {{ $asset->location->present()->name() }} - @elseif($asset->rtd_location || $asset->rtd_location_id) + @elseif($asset->rtd_location) {{ $asset->defaultLoc->present()->name() }} @endif From 0209d270810e1cfa1cebba15de5eee5302f3ea4a Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Mon, 18 Nov 2024 12:24:47 -0800 Subject: [PATCH 5/7] Fix rollback for created_by --- .../2024_09_17_204302_change_user_id_to_created_by.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/migrations/2024_09_17_204302_change_user_id_to_created_by.php b/database/migrations/2024_09_17_204302_change_user_id_to_created_by.php index a57406ce10..3bef5948b6 100644 --- a/database/migrations/2024_09_17_204302_change_user_id_to_created_by.php +++ b/database/migrations/2024_09_17_204302_change_user_id_to_created_by.php @@ -42,7 +42,7 @@ return new class extends Migration } foreach ($this->existing_table_list() as $table) { - if (Schema::hasColumn($table, 'user_id')) { + if (Schema::hasColumn($table, 'created_by')) { Schema::table($table, function (Blueprint $table) { $table->renameColumn('created_by', 'user_id'); }); From f5206078d46004e190f69de3f9b4f073019dfab9 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Mon, 18 Nov 2024 12:25:02 -0800 Subject: [PATCH 6/7] Fix rollback for webhook_endpoint by using correct column type --- .../2023_08_01_174150_change_webhook_settings_variable_type.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 59c9728e2e..ddce33e903 100644 --- 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 @@ -26,7 +26,7 @@ class ChangeWebhookSettingsVariableType extends Migration public function down() { Schema::table('settings', function (Blueprint $table) { - $table->varchar('webhook_endpoint')->change(); + $table->string('webhook_endpoint')->change(); }); } From 15a31bd1412bee4b06b9da14bc272227e5417fdb Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 19 Nov 2024 13:22:44 +0000 Subject: [PATCH 7/7] Fixed variable name Signed-off-by: snipe --- app/Http/Controllers/Users/BulkUsersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Users/BulkUsersController.php b/app/Http/Controllers/Users/BulkUsersController.php index fbf08c9820..5541f7a15d 100644 --- a/app/Http/Controllers/Users/BulkUsersController.php +++ b/app/Http/Controllers/Users/BulkUsersController.php @@ -323,7 +323,7 @@ class BulkUsersController extends Controller $logAction->item_type = $itemType; $logAction->target_id = $item->assigned_to; $logAction->target_type = User::class; - $logAction->created_at = auth()->id(); + $logAction->created_by = auth()->id(); $logAction->note = 'Bulk checkin items'; $logAction->logaction('checkin from'); }