Skip to content

Commit

Permalink
OLMIS-7906: Added facilityType and permissions check for BUQs for fin…
Browse files Browse the repository at this point in the history
…al approval (#60)
  • Loading branch information
sradziszewski authored Apr 11, 2024
1 parent 333c7ce commit eca367f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,10 @@ public Page<BottomUpQuantification> getBottomUpQuantificationsForFinalApproval(
List<ProductGroup> productGroups = productGroupRepository.findAll();

return bottomUpQuantifications.stream()
.filter(buq -> {
FacilityDto facility = facilityReferenceDataService.findOne(buq.getFacilityId());
return checkFacilityTypeAndPermission(facility);
})
.map(buq -> buildBottomUpQuantificationGroupCostsData(buq, productGroups))
.collect(Collectors.toList());
}
Expand Down

0 comments on commit eca367f

Please sign in to comment.