feat(nav): single Calendar menu — hide Appointments resource from sidebar

AppointmentResource::\$shouldRegisterNavigation = false so only
CalendarBoard shows in the sidebar as "Calendar". The board already
has a "Listă" view-mode button alongside Zi/Săpt/Lună/Custom, so both
use cases are covered from a single entry. CRUD routes
(/app/appointments/create, /{id}/edit) stay accessible from the
board's click handlers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-10 19:04:54 +00:00
parent 1029181526
commit 517d32c4d4
2 changed files with 8 additions and 11 deletions
+2 -11
View File
@@ -17,7 +17,7 @@ class CalendarBoard extends Page
public static function getNavigationLabel(): string public static function getNavigationLabel(): string
{ {
return __('nav.label.Calendar vizual'); return __('nav.label.Calendar');
} }
public static function getNavigationGroup(): ?string public static function getNavigationGroup(): ?string
@@ -25,16 +25,7 @@ class CalendarBoard extends Page
return __('nav.group.CRM'); return __('nav.group.CRM');
} }
/** protected static ?int $navigationSort = 7;
* Nest this page under the "Calendar" (Programări) list resource so the
* two show up as a single expandable menu item in the sidebar.
*/
public static function getNavigationParentItem(): ?string
{
return __('nav.label.Calendar');
}
protected static ?int $navigationSort = 8;
protected static ?string $title = null; protected static ?string $title = null;
@@ -22,6 +22,12 @@ class AppointmentResource extends Resource
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-calendar-days'; protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-calendar-days';
/**
* Hidden from sidebar CalendarBoard is the single Calendar entry.
* Create/edit routes remain reachable from board click handlers.
*/
protected static bool $shouldRegisterNavigation = false;
public static function getNavigationLabel(): string public static function getNavigationLabel(): string
{ {
return __('nav.label.Calendar'); return __('nav.label.Calendar');