From 517d32c4d4182f81fef2f1c5743463cfc23d956c Mon Sep 17 00:00:00 2001 From: Vasyka Date: Mon, 10 Aug 2026 19:04:54 +0000 Subject: [PATCH] =?UTF-8?q?feat(nav):=20single=20Calendar=20menu=20?= =?UTF-8?q?=E2=80=94=20hide=20Appointments=20resource=20from=20sidebar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- app/Filament/Tenant/Pages/CalendarBoard.php | 13 ++----------- .../Tenant/Resources/AppointmentResource.php | 6 ++++++ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/app/Filament/Tenant/Pages/CalendarBoard.php b/app/Filament/Tenant/Pages/CalendarBoard.php index 97a443c..0925c35 100644 --- a/app/Filament/Tenant/Pages/CalendarBoard.php +++ b/app/Filament/Tenant/Pages/CalendarBoard.php @@ -17,7 +17,7 @@ class CalendarBoard extends Page public static function getNavigationLabel(): string { - return __('nav.label.Calendar vizual'); + return __('nav.label.Calendar'); } public static function getNavigationGroup(): ?string @@ -25,16 +25,7 @@ class CalendarBoard extends Page return __('nav.group.CRM'); } - /** - * 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 ?int $navigationSort = 7; protected static ?string $title = null; diff --git a/app/Filament/Tenant/Resources/AppointmentResource.php b/app/Filament/Tenant/Resources/AppointmentResource.php index 886cd32..90ce231 100644 --- a/app/Filament/Tenant/Resources/AppointmentResource.php +++ b/app/Filament/Tenant/Resources/AppointmentResource.php @@ -22,6 +22,12 @@ class AppointmentResource extends Resource 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 { return __('nav.label.Calendar');