Skip to content

Commit

Permalink
Dispaly notices from toEstimatedCall.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbrunvoll committed Aug 14, 2024
1 parent 82a009a commit 43726c5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/api/types/generated/TripsQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ export type TripFragment = {
quay: {publicCode?: string; name: string};
notices: Array<{id: string; text?: string}>;
};
toEstimatedCall?: {
notices: Array<{id: string; text?: string}>;
};
situations: Array<{
id: string;
situationNumber?: string;
Expand Down Expand Up @@ -127,7 +130,11 @@ export type TripFragment = {
notices: Array<{id: string; text?: string}>;
journeyPattern?: {notices: Array<{id: string; text?: string}>};
};
interchangeTo?: {guaranteed?: boolean; toServiceJourney?: {id: string}; maximumWaitTime?: number};
interchangeTo?: {
guaranteed?: boolean;
toServiceJourney?: {id: string};
maximumWaitTime?: number;
};
pointsOnLink?: {points?: string; length?: number};
intermediateEstimatedCalls: Array<{
date: any;
Expand Down
3 changes: 3 additions & 0 deletions src/api/types/generated/fragments/trips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export type TripPatternFragment = {
quay: {publicCode?: string; name: string};
notices: Array<{id: string; text?: string}>;
};
toEstimatedCall?: {
notices: Array<{id: string; text?: string}>;
};
situations: Array<{
id: string;
situationNumber?: string;
Expand Down
1 change: 1 addition & 0 deletions src/travel-details-screens/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const getNoticesForLeg = (leg: Leg) =>
...(leg.serviceJourney?.notices || []),
...(leg.serviceJourney?.journeyPattern?.notices || []),
...(leg.fromEstimatedCall?.notices || []),
...(leg.toEstimatedCall?.notices || []),
]);

export const getNoticesForServiceJourney = (
Expand Down

0 comments on commit 43726c5

Please sign in to comment.