Skip to content

Commit 3dbc04d

Browse files
committed
Enable return trip feature for STOS, STOW, and STWS permit types
1 parent 589e61e commit 3dbc04d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

frontend/src/features/permits/helpers/route/getDefaultManualRoute.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ export const getDefaultManualRoute = (
2121
totalDistance: permitType === PERMIT_TYPES.MFP
2222
? getDefaultRequiredVal(null, manualRoute?.totalDistance)
2323
: null,
24-
isReturnTrip: permitType === PERMIT_TYPES.STOS
24+
isReturnTrip: ([
25+
PERMIT_TYPES.STOS,
26+
PERMIT_TYPES.STOW,
27+
PERMIT_TYPES.STWS,
28+
] as PermitType[]).includes(permitType)
2529
? getDefaultRequiredVal(false, manualRoute?.isReturnTrip)
2630
: null,
2731
};

frontend/src/features/permits/pages/Application/components/form/TripDetailsSection/TripOriginDestination.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ export const TripOriginDestination = ({
4747
}) => {
4848
const showExitPoint = permitType === PERMIT_TYPES.MFP;
4949
const showTotalDistance = permitType === PERMIT_TYPES.MFP;
50-
const showReturnTrip = permitType === PERMIT_TYPES.STOS;
50+
const showReturnTrip = ([
51+
PERMIT_TYPES.STOS,
52+
PERMIT_TYPES.STOW,
53+
PERMIT_TYPES.STWS,
54+
] as PermitType[]).includes(permitType);
5155

5256
const origin = getDefaultRequiredVal("", tripOrigin);
5357

0 commit comments

Comments
 (0)