Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Console/Commands/SyncAddonDueDatesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions resources/views/admin/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,8 @@
<li><a href="{{ route('admin.config.notifications') }}" @if($routeName === 'admin.config.notifications') class="active" @endif>{{ __('admin.nav.notification_channels') }}</a></li>
<li><a href="{{ route('admin.config.ticket-spam') }}" @if($routeName === 'admin.config.ticket-spam') class="active" @endif>{{ __('admin.nav.ticket_spam_filter') }}</a></li>
<li><a href="{{ route('admin.config.addons') }}" @if($routeName === 'admin.config.addons') class="active" @endif>{{ __('admin.nav.product_addons') }}</a></li>
<li><a href="{{ route('admin.config.addons.modules') }}">{{ __('admin.nav.addon_modules') }}</a></li>
<li><a href="{{ route('admin.config.server-modules') }}">{{ __('admin.modules.type_server') }}</a></li>
<li><a href="{{ route('admin.config.addons.modules') }}" @if($routeName === 'admin.config.addons.modules') class="active" @endif>{{ __('admin.nav.addon_modules') }}</a></li>
<li><a href="{{ route('admin.config.server-modules') }}" @if($routeName === 'admin.config.server-modules') class="active" @endif>{{ __('admin.modules.type_server') }}</a></li>
<li><a href="{{ route('admin.config.bundles') }}" @if($routeName === 'admin.config.bundles') class="active" @endif>{{ __('admin.nav.product_bundles') }}</a></li>
@if(auth('admin')->user()?->hasPermission('manage_updates'))
<li><a href="{{ route('admin.config.updates') }}" @if($routeName === 'admin.config.updates') class="active" @endif><i class="fas fa-cloud-download-alt"></i> {{ __('admin.nav.updates') }}</a></li>
Expand Down
10 changes: 10 additions & 0 deletions tests/Feature/AdminNavLinksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('#<a href="'.preg_quote(route($route), '#').'"\s+class="active"\s*>#');
}
});
Loading