Skip to content

Commit 1fb9b83

Browse files
committed
front: editor, remove direction field on range in catenary form
1 parent 3e1a8da commit 1fb9b83

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

front/src/applications/editor/tools/rangeEdition/components.tsx

+21-19
Original file line numberDiff line numberDiff line change
@@ -151,25 +151,27 @@ export const TrackRangesList: FC = () => {
151151
</div>
152152
<div className="flex-grow-1 flex-shrink-1">
153153
<EntitySumUp entity={trackState.track} />
154-
<div>
155-
<select
156-
id="filterLevel"
157-
className="form-control"
158-
value={range.applicable_directions}
159-
onChange={(e) => {
160-
const newEntity = cloneDeep(entity);
161-
const newRange = (newEntity.properties.track_ranges || [])[i];
162-
newRange.applicable_directions = e.target.value as ApplicableDirection;
163-
setState({ entity: newEntity, hoveredItem: null });
164-
}}
165-
>
166-
{APPLICABLE_DIRECTIONS.map((direction) => (
167-
<option key={direction} value={direction}>
168-
{t(`Editor.directions.${direction}`)}
169-
</option>
170-
))}
171-
</select>
172-
</div>
154+
{entity.objType !== 'Catenary' && (
155+
<div>
156+
<select
157+
id="filterLevel"
158+
className="form-control"
159+
value={range.applicable_directions}
160+
onChange={(e) => {
161+
const newEntity = cloneDeep(entity);
162+
const newRange = (newEntity.properties.track_ranges || [])[i];
163+
newRange.applicable_directions = e.target.value as ApplicableDirection;
164+
setState({ entity: newEntity, hoveredItem: null });
165+
}}
166+
>
167+
{APPLICABLE_DIRECTIONS.map((direction) => (
168+
<option key={direction} value={direction}>
169+
{t(`Editor.directions.${direction}`)}
170+
</option>
171+
))}
172+
</select>
173+
</div>
174+
)}
173175
</div>
174176
</>
175177
)}

0 commit comments

Comments
 (0)