== Implementation of user scenarios in the prototype In the technical prototype of the application implemented so far, the following scenarios have been implemented: ||= ID =||||= !UseCase =|| ||1||||'''[wiki:SearchRoutesUseCase Search Routes]'''|| ||2||||'''[wiki:OrganizeTripUseCase Organize Trip]'''|| ||3||||'''[wiki:ManageTripUseCase Manage Trip]'''|| ||4||||'''[wiki:ViewMyTripsUseCase View My Trips]'''|| ||5||||'''[wiki:LoginUseCase Login]'''|| ||6||||'''[wiki:RegisterUseCase Register]'''|| === ID 1 - Search Routes === The `/search-routes` endpoint provides users with the ability to search for available transport routes from different organizers. It supports both **viewing all routes** by default and **filtering routes** based on user input (departure and arrival locations). The request is handled by `UserRouteController`, which interacts with `RouteService` to retrieve the relevant data. ==== Controller Details: - **URL Mapping:** `/search-routes` - **Method:** `GET` - **Functionality:** - Displays **all routes** when the page is accessed without search criteria. - Filters results based on the user's input (`from` and `to`). - **View:** Uses the `master` template and dynamically embeds `user/search-routes`. ==== Breakdown: - When users first visit `/search-routes`, the controller calls `routeService.findAll()` to display all available routes. - When users provide search criteria (`from` and/or `to`), it filters results using `routeService.findRouteByFromAndToDest(from, to)`. - If no matching routes are found, a **"No routes found for your search."** message is displayed instead of an empty table. - The retrieved data is added to the `Model`, ensuring the front-end can render the appropriate content.