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

front: drop TimesStopsRow.isWaypoint #10170

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion front/src/modules/timesStops/TimesStops.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const TimesStops = <T extends TimesStopsRow>({
headerRowHeight={headerRowHeight}
rowClassName={({ rowData, rowIndex }) =>
cx({
activeRow: rowData.isWaypoint,
activeRow: Boolean(rowData.pathStepId),
oddRow: (rowIndex + 1) % 2,
})
}
Expand Down
3 changes: 1 addition & 2 deletions front/src/modules/timesStops/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const matchPathStepAndOpWithKP = (step: PathStep, op: SuggestedOP) => {
};

export const formatSuggestedViasToRowVias = (
operationalPoints: (SuggestedOP & { isWaypoint?: boolean })[],
operationalPoints: SuggestedOP[],
pathSteps: PathStep[],
t: TFunction<'timesStops', undefined>,
startTime?: Date,
Expand Down Expand Up @@ -103,7 +103,6 @@ export const formatSuggestedViasToRowVias = (
shortSlipDistance,
stopFor,
theoreticalMargin,
isWaypoint: op.isWaypoint || pathStep !== undefined,
};
});
};
Expand Down
2 changes: 0 additions & 2 deletions front/src/modules/timesStops/hooks/useOutputTableData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ const useOutputTableData = (
pathStepId: pathStep.id,
name: t('waypoint', { id: pathStep.id }),
ch: undefined,
isWaypoint: true,

arrival,
departure,
Expand Down Expand Up @@ -144,7 +143,6 @@ const useOutputTableData = (
const calculatedArrival = new Date(startDatetime.getTime() + time);

return {
isWaypoint: false,
opId: op.id,
name: op.extensions?.identifier?.name,
ch: op.extensions?.sncf?.ch,
Expand Down
1 change: 0 additions & 1 deletion front/src/modules/timesStops/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export type TimesStopsRow = {
name?: string;
ch?: string;
trackName?: string;
isWaypoint: boolean;

arrival?: TimeExtraDays; // value asked by user
departure?: TimeExtraDays; // value asked by user
Expand Down
Loading