From 66a9cad1f6f2a3297a90b7bc29ebd06d92761f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertu=C4=9Frul=20Keyvan?= Date: Mon, 30 Nov 2026 01:21:33 +0300 Subject: [PATCH] fix(admin): mark the add-on and server module pages in the setup menu The Add-ons and Server modules entries in the setup sidebar were the only ones without the active state, so their own pages showed no current entry. The addon due-date sync command also described itself as touching active, pending and draft addons; it updates every addon that has not ended, suspended ones included, and now says so. --- app/Console/Commands/SyncAddonDueDatesCommand.php | 2 +- resources/views/admin/layouts/app.blade.php | 4 ++-- tests/Feature/AdminNavLinksTest.php | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/SyncAddonDueDatesCommand.php b/app/Console/Commands/SyncAddonDueDatesCommand.php index 12dc42d54..5c9e756c0 100644 --- a/app/Console/Commands/SyncAddonDueDatesCommand.php +++ b/app/Console/Commands/SyncAddonDueDatesCommand.php @@ -16,7 +16,7 @@ class SyncAddonDueDatesCommand extends Command { protected $signature = 'pnlcs:sync-addon-due-dates {--dry-run : Report changes without saving them}'; - protected $description = 'Set active, pending and draft addon due dates to their service date'; + protected $description = 'Set the due date of every addon that has not ended to its service date'; public function handle(): int { diff --git a/resources/views/admin/layouts/app.blade.php b/resources/views/admin/layouts/app.blade.php index e94d89f3f..0531d7493 100644 --- a/resources/views/admin/layouts/app.blade.php +++ b/resources/views/admin/layouts/app.blade.php @@ -507,8 +507,8 @@
  • {{ __('admin.nav.notification_channels') }}
  • {{ __('admin.nav.ticket_spam_filter') }}
  • {{ __('admin.nav.product_addons') }}
  • -
  • {{ __('admin.nav.addon_modules') }}
  • -
  • {{ __('admin.modules.type_server') }}
  • +
  • {{ __('admin.nav.addon_modules') }}
  • +
  • {{ __('admin.modules.type_server') }}
  • {{ __('admin.nav.product_bundles') }}
  • @if(auth('admin')->user()?->hasPermission('manage_updates'))
  • {{ __('admin.nav.updates') }}
  • diff --git a/tests/Feature/AdminNavLinksTest.php b/tests/Feature/AdminNavLinksTest.php index a861041a6..80f161328 100644 --- a/tests/Feature/AdminNavLinksTest.php +++ b/tests/Feature/AdminNavLinksTest.php @@ -30,3 +30,13 @@ ->toContain($entry('admin.config.addons.modules', __('admin.nav.addon_modules'))) ->toContain($entry('admin.config.server-modules', __('admin.modules.type_server'))); }); + +test('the config menu marks the add-on and server module pages as the current page', function () { + $admin = Admin::factory()->create(['role_id' => AdminRole::factory()->fullAdmin()->create()->id]); + + foreach (['admin.config.addons.modules', 'admin.config.server-modules'] as $route) { + $html = $this->actingAs($admin, 'admin')->get(route($route))->assertOk()->getContent(); + + expect($html)->toMatch('##'); + } +});