diff --git a/responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/support-details.component.ts b/responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/support-details.component.ts index 373e0a877..ee24f666b 100644 --- a/responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/support-details.component.ts +++ b/responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/support-details.component.ts @@ -404,11 +404,18 @@ export class SupportDetailsComponent implements OnInit, OnDestroy { thisSupport.toTime ); const overlappingSupports = existingSupports.filter( - (s) => - this.generateSupportType(s) === - this.stepSupportsService.supportTypeToAdd.description && - moment(to).isSameOrAfter(moment(s.from)) && - moment(from).isSameOrBefore(moment(s.to)) + (s) => { + if (this.stepSupportsService.supportTypeToAdd.description === SupportSubCategory.Food_Groceries || this.stepSupportsService.supportTypeToAdd.description === SupportSubCategory.Food_Restaurant) { + this.generateSupportType(s) === SupportSubCategory.Food_Groceries || this.generateSupportType(s) === SupportSubCategory.Food_Restaurant && + moment(to).isSameOrAfter(moment(s.from)) && + moment(from).isSameOrBefore(moment(s.to)) + } else { + this.generateSupportType(s) === + this.stepSupportsService.supportTypeToAdd.description && + moment(to).isSameOrAfter(moment(s.from)) && + moment(from).isSameOrBefore(moment(s.to)) + } + } ); hasConflict = overlappingSupports.length > 0;