Replace Alpine.js with Stimulus controller for header navigation

- Create header_controller.js to handle mobile menu and user dropdown
- Replace Alpine.js directives with Stimulus data attributes in header component
- Add proper event handling for click outside to close menus
- Maintain all existing functionality with improved code consistency
This commit is contained in:
kbe
2025-08-30 14:30:32 +02:00
parent 907e51fc60
commit 9404f10c93
3 changed files with 87 additions and 12 deletions

View File

@@ -2,10 +2,8 @@
// Run that command whenever you add a new controller or create them with
// ./bin/rails generate stimulus controllerName
// Import the main Stimulus application
import { application } from "./application"
// Import all controllers
import LogoutController from "./logout_controller";
application.register("logout", LogoutController);
@@ -18,6 +16,9 @@ application.register("flash-message", FlashMessageController);
import TicketSelectionController from "./ticket_selection_controller"
application.register("ticket-selection", TicketSelectionController);
import HeaderController from "./header_controller"
application.register("header", HeaderController);