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

Configure the ability to save trip for only one day #1280

Merged
merged 6 commits into from
Sep 30, 2024

Conversation

amy-corson-ibigroup
Copy link
Contributor

Description:

  • Add config item that removes the option to save a trip for one day
  • Adds yup validation to prevent users from being able to save a trip if they have not selected a day to monitor.

PR Checklist:

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?
disableSingleItineraryDays !disableSingleItineraryDays
image image

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work, but please see some code tweaks.

lib/components/user/monitored-trip/trip-basics-pane.tsx Outdated Show resolved Hide resolved
lib/components/user/monitored-trip/trip-basics-pane.tsx Outdated Show resolved Hide resolved
lib/components/user/monitored-trip/trip-basics-pane.tsx Outdated Show resolved Hide resolved
lib/components/user/monitored-trip/trip-basics-pane.tsx Outdated Show resolved Hide resolved
lib/components/user/monitored-trip/trip-basics-pane.tsx Outdated Show resolved Hide resolved
lib/util/config-types.ts Show resolved Hide resolved
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes

}: {
errorCheckingTrip: boolean
errorSelectingDays?: 'error' | null
finalItineraryExistence: ItineraryExistence | undefined
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, use ?:

Copy link
Contributor

@josh-willis-arcadis josh-willis-arcadis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amy-corson-ibigroup amy-corson-ibigroup merged commit 8c85cb8 into dev Sep 30, 2024
9 checks passed
@amy-corson-ibigroup amy-corson-ibigroup deleted the disable-sinlge-itinerary-days branch September 30, 2024 20:16
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.

3 participants