Skip to content

Commit

Permalink
front: use the rs name for the suggestions label
Browse files Browse the repository at this point in the history
Signed-off-by: Clara Ni <[email protected]>
  • Loading branch information
clarani committed Oct 11, 2024
1 parent 2bdeb66 commit b1886c1
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions front/src/applications/stdcmV2/components/StdcmConsist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,7 @@ const StdcmConsist = ({ setCurrentSimulationInputs, disabled = false }: StdcmCon
useFilterRollingStock({ isStdcm: true });

const getLabel = (rs: LightRollingStockWithLiveries) => {
let res = '';
const { metadata, name } = rs;

if (metadata) {
const series = metadata.series ?? metadata.reference;
const subseries =
metadata.series && metadata.series !== metadata.subseries
? metadata.subseries
: metadata.detail;
if (series) res += series;
if (subseries) res += series ? ` (${subseries})` : subseries;
}
if (name) res += ` -- ${name}`;
return res;
return rs.name;
};

const onInputClick = () => {
Expand Down

0 comments on commit b1886c1

Please sign in to comment.