-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -35,6 +37,12 @@ export function AssistantDetails({ tripPattern }: AssistantDetailsProps) { | |||
tripSearchParams.append('filter', router.query.filter as string); | |||
} | |||
|
|||
const requireTicketBooking = tripPattern.legs.some( |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
planner-web/src/page-modules/assistant/details/trip-section/index.tsx
Lines 75 to 79 in a4453ce
const bookingStatus = getBookingStatus( | |
leg.bookingArrangements, | |
leg.aimedStartTime, | |
7, | |
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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.
Originally posted by @mortennordseth in #17560
Illustrations
screenshots/video/figma
Proposed solution
Display the same message in planner web as already shown in the app.
Acceptance Criteria