Skip to content

Commit 719b6ee

Browse files
simonhampclaude
andcommitted
Allow inactive approved plugins in support ticket plugin selector
Replace the approved() scope (which requires is_active) with a direct status check so disabled plugins still appear for support purposes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c6ff077 commit 719b6ee

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

app/Livewire/Customer/Support/Create.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Livewire\Customer\Support;
44

5+
use App\Enums\PluginStatus;
56
use App\Models\Plugin;
67
use App\Models\SupportTicket;
78
use App\Notifications\SupportTicketSubmitted;
@@ -208,7 +209,7 @@ public function render()
208209

209210
if ($this->selectedProduct === 'mobile') {
210211
$officialPlugins = Plugin::query()
211-
->approved()
212+
->where('status', PluginStatus::Approved)
212213
->where('is_official', true)
213214
->orderBy('name')
214215
->pluck('name', 'id');

tests/Feature/SupportTicketTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,25 @@ public function plugin_type_shows_approved_official_plugins_in_select(): void
570570
->assertSee('Jump');
571571
}
572572

573+
#[Test]
574+
public function plugin_type_shows_inactive_approved_official_plugins(): void
575+
{
576+
$user = $this->createUltraUser();
577+
578+
Plugin::factory()->approved()->inactive()->create([
579+
'name' => 'nativephp/mobile-inactive',
580+
'is_official' => true,
581+
'user_id' => $user->id,
582+
]);
583+
584+
Livewire::actingAs($user)
585+
->test(Create::class)
586+
->set('selectedProduct', 'mobile')
587+
->call('nextStep')
588+
->set('mobileAreaType', 'plugin')
589+
->assertSee('nativephp/mobile-inactive');
590+
}
591+
573592
#[Test]
574593
public function plugin_type_does_not_show_unapproved_official_plugins(): void
575594
{

0 commit comments

Comments
 (0)