Skip to content

Commit

Permalink
front: bump ui from 0.0.59 to 0.0.61 except ui core
Browse files Browse the repository at this point in the history
Signed-off-by: theocrsb <[email protected]>
  • Loading branch information
theocrsb committed Jan 9, 2025
1 parent fdfd8ac commit c8bed95
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 65 deletions.
85 changes: 29 additions & 56 deletions front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
"@osrd-project/netzgrafik-frontend": "0.0.0-snapshot.37949a66933e8e1552c9b8e54f702ec491afd415",
"@osrd-project/ui-core": "^0.0.61",
"@osrd-project/ui-icons": "^0.0.59",
"@osrd-project/ui-manchette": "^0.0.59",
"@osrd-project/ui-manchette-with-spacetimechart": "^0.0.59",
"@osrd-project/ui-spacetimechart": "^0.0.59",
"@osrd-project/ui-speedspacechart": "^0.0.59",
"@osrd-project/ui-icons": "^0.0.61",
"@osrd-project/ui-manchette": "^0.0.61",
"@osrd-project/ui-manchette-with-spacetimechart": "^0.0.61",
"@osrd-project/ui-spacetimechart": "^0.0.61",
"@osrd-project/ui-speedspacechart": "^0.0.61",
"@react-pdf/renderer": "^4.1.6",
"@redux-devtools/extension": "^3.3.0",
"@reduxjs/toolkit": "^2.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ describe('formatStops', () => {
weight: null,
},
];
const expected = [{ position: { start: 0 }, value: 'name ch' }];
const expected = [
{
position: { start: 0 },
value: {
name: 'name ch',
weight: null,
},
},
];
expect(formatStops(operationalPoints)).toEqual(expected);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,14 @@ const formatMrsp = (mrsp: SimulationResponseSuccess['mrsp']) => ({
});

export const formatStops = (operationalPoints: PathPropertiesFormatted['operationalPoints']) =>
operationalPoints.map(({ position, extensions: { identifier, sncf } = {} }) => ({
operationalPoints.map(({ position, weight, extensions: { identifier, sncf } = {} }) => ({
position: {
start: mmToKm(position),
},
value: identifier ? `${identifier.name} ${sncf ? sncf.ch : ''}` : '',
value: {
name: identifier ? `${identifier.name} ${sncf ? sncf.ch : ''}` : '',
weight: weight!,
},
}));

export const formatElectrifications = (
Expand Down Expand Up @@ -202,7 +205,9 @@ export const formatData = (
const pathLength = simulation.base.positions[simulation.base.positions.length - 1];
const speeds: LayerData<number>[] = formatSpeeds(simulation.base);
const ecoSpeeds: LayerData<number>[] = formatSpeeds(simulation.final_output);
const stops: LayerData<string>[] = formatStops(pathProperties!.operationalPoints);
const stops: LayerData<{ name: string; weight: number }>[] = formatStops(
pathProperties!.operationalPoints
);
const electrifications: LayerData<ElectrificationValues>[] = formatElectrifications(
pathProperties!.electrifications
);
Expand Down

0 comments on commit c8bed95

Please sign in to comment.