diff --git a/src/entities/activity/model/mappers.ts b/src/entities/activity/model/mappers.ts index 78b1e0a8f..6a3d60961 100644 --- a/src/entities/activity/model/mappers.ts +++ b/src/entities/activity/model/mappers.ts @@ -129,8 +129,6 @@ function mapConditionalLogic(dto: ConditionalLogicDto | null) { updatedCondition.payload = { time: condition.payload.time }; break; - case 'OUTSIDE_OF_TIMES_RANGE': - case 'BETWEEN_TIMES_RANGE': case 'BETWEEN_TIMES': case 'OUTSIDE_OF_TIMES': updatedCondition.payload = { @@ -139,6 +137,15 @@ function mapConditionalLogic(dto: ConditionalLogicDto | null) { }; break; + case 'OUTSIDE_OF_TIMES_RANGE': + case 'BETWEEN_TIMES_RANGE': + updatedCondition.payload = { + minTime: condition.payload.minTime, + maxTime: condition.payload.maxTime, + fieldName: condition.payload.fieldName, + }; + break; + case 'GREATER_THAN_TIME_RANGE': case 'LESS_THAN_TIME_RANGE': case 'EQUAL_TO_TIME_RANGE': diff --git a/src/entities/conditional-logic/model/conditions.ts b/src/entities/conditional-logic/model/conditions.ts index 91679ef77..343c63370 100644 --- a/src/entities/conditional-logic/model/conditions.ts +++ b/src/entities/conditional-logic/model/conditions.ts @@ -253,8 +253,8 @@ export const isBetweenTimesRange = ( return ( selectedTimeInMinutes !== null && - selectedTimeInMinutes >= timeToMinutes(minTime) && - selectedTimeInMinutes <= timeToMinutes(maxTime) + selectedTimeInMinutes > timeToMinutes(minTime) && + selectedTimeInMinutes < timeToMinutes(maxTime) ); };