Implement ticket selection with Stimulus controller and improve code documentation
- Add ticket selection functionality to event show page using Stimulus - Create ticket_selection_controller.js for handling ticket quantity changes - Update ticket card component and event show view to work with Stimulus - Add comprehensive comments to all JavaScript files for better maintainability - Remove dependent: :destroy from event ticket_types association
This commit is contained in:
@@ -2,22 +2,25 @@
|
||||
// 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 LogoutController from "./logout_controller"
|
||||
import FlashMessageController from "./flash_message_controller"
|
||||
// Import all controllers
|
||||
import LogoutController from "./logout_controller";
|
||||
application.register("logout", LogoutController);
|
||||
|
||||
import CounterController from "./counter_controller"
|
||||
// import FeaturedEventController from "./featured_event_controller"
|
||||
application.register("counter", CounterController);
|
||||
|
||||
import FlashMessageController from "./flash_message_controller"
|
||||
application.register("flash-message", FlashMessageController);
|
||||
|
||||
import TicketSelectionController from "./ticket_selection_controller"
|
||||
application.register("ticket-selection", TicketSelectionController);
|
||||
|
||||
|
||||
// application.register("logout", LogoutController) // Allow logout using js
|
||||
// application.register("flash-message", FlashMessageController) // Dismiss notification after 5 secondes
|
||||
// application.register("counter", CounterController) // Simple counter for homepage
|
||||
// application.register("featured-event", FeaturedEventController) // Featured event controller for homepage
|
||||
|
||||
|
||||
|
||||
// import ShadcnTestController from "./shadcn_test_controller"
|
||||
// application.register("shadcn-test", ShadcnTestController) // Test controller for Shadcn
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user