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

feat: add note informing users about having to buy external ticket #294

Merged
merged 3 commits into from
May 14, 2024

Conversation

jonasbrunvoll
Copy link
Contributor

Closes https://github.com/AtB-AS/kundevendt/issues/18065

Background

As mentioned in the conversation, the same note informing the users out the need to buy tickets from other sources than in the app, should also be shown in the planner web.

The booking phone number and/or URL is only shown if the booking status is "bookable", see https://github.com/AtB-AS/planner-web/blob/main/src/page-modules/assistant/details/trip-section/booking-section.tsx#L57.

This is the same as what the app does. However, the app also has a note saying "This journey requires a ticket that is not available from this app, or must be purchased from a provider other than AtB." This doesn't answer all of the questions a customer might have, but it's some more information. A better approach could be to show the booking URL / phone number at all times, but if so we should probably update the app as well.

I suggest that we add the note from the app to the planner-web and then discuss with the designers at AtB how we can improve this in both the app and planner-web.

Screenshot of the OMS-app

Image

Originally posted by @mortennordseth in #17560

Illustrations

screenshots/video/figma

Image

Proposed solution

Display the same message in planner web as already shown in the app.

Acceptance Criteria

  • The info box should appear the same way in panner-web as in the app.

Copy link

vercel bot commented May 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
planner-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 7:00am

@@ -35,6 +37,12 @@ export function AssistantDetails({ tripPattern }: AssistantDetailsProps) {
tripSearchParams.append('filter', router.query.filter as string);
}

const requireTicketBooking = tripPattern.legs.some(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the same done in the app to know if booking is required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the app, there is a function to check whether a leg in the trip requires a ticket that can not be must be bought through the app. https://github.com/AtB-AS/mittatb-app/blob/eb680679c754e8e56848ffe7983779c0794468ba/src/travel-details-screens/components/Trip.tsx#L106-L109.

The solution I used in this PR is pretty much the same approach to determine whether the BookingSection should appear.

const bookingStatus = getBookingStatus(
leg.bookingArrangements,
leg.aimedStartTime,
7,
);

Copy link
Contributor

@adriansberg adriansberg left a comment

Choose a reason for hiding this comment

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

LGTM!

@jonasbrunvoll jonasbrunvoll merged commit 9c7d22e into main May 14, 2024
5 of 6 checks passed
@jonasbrunvoll jonasbrunvoll deleted the jonas/add_require_booking_message branch May 14, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants