Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Add DateTime support to trip planning API #402

Merged

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Nov 30, 2024

TL;DR

Added support for departure/arrival time selection in trip planning

What changed?

  • Extended the trip planning API to support departure and arrival time preferences
  • Added new parameters for date (YYYYMMDD) and time (HHMM) in the trip planning service
  • Introduced a DepArr enum to handle departure/arrival preferences
  • Added utility functions in DateTimeSelectionItem to format date and time
  • Updated TimeTableViewModel to incorporate user-selected date/time preferences

How to test?

  1. Set a departure or arrival time in the date/time selector
  2. Plan a trip between two stops
  3. Verify that the returned journeys respect the selected time preference
  4. Test both departure and arrival scenarios
  5. Verify date/time formatting matches the required format (YYYYMMDD for date, HHMM for time)

Why make this change?

To provide users with more control over their journey planning by allowing them to specify whether they want to arrive by or depart at a specific time, rather than only showing current departure times.

Copy link
Owner Author

ksharma-xyz commented Nov 30, 2024

@ksharma-xyz ksharma-xyz changed the title Update API to accept date and time parameters UI: Add DateTime support to trip planning API Nov 30, 2024
@ksharma-xyz ksharma-xyz marked this pull request as ready for review November 30, 2024 05:21
@ksharma-xyz ksharma-xyz changed the base branch from 11-30-navigation_pass_datetimeselectionitem_object_so_it_can_be_used_for_api_calls_or_other_decision_making_process to graphite-base/402 November 30, 2024 05:27
@ksharma-xyz ksharma-xyz force-pushed the 11-30-update_api_to_accept_date_and_time_parameters branch from 79fead7 to 8ba3765 Compare November 30, 2024 05:27
@ksharma-xyz ksharma-xyz changed the base branch from graphite-base/402 to main November 30, 2024 05:28
@ksharma-xyz ksharma-xyz force-pushed the 11-30-update_api_to_accept_date_and_time_parameters branch from 8ba3765 to 17e4db6 Compare November 30, 2024 05:28
@ksharma-xyz ksharma-xyz merged commit 1b1ef36 into main Nov 30, 2024
2 checks passed
Copy link
Owner Author

Merge activity

  • Nov 30, 12:37 AM EST: A user merged this pull request with Graphite.

@ksharma-xyz ksharma-xyz deleted the 11-30-update_api_to_accept_date_and_time_parameters branch November 30, 2024 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant