Fixed hub validation issue
This commit is contained in:
@@ -60,7 +60,7 @@ public class DashboardDao {
|
||||
}
|
||||
|
||||
private void setActiveCalls(Widget1 widget1, UserEntity requestedUserEntity) {
|
||||
Long activeCalls = callRepository.countByStatus(CallStatusEnum.PUBLISH.getValue());
|
||||
Long activeCalls = callRepository.countByStatusAndHubId(CallStatusEnum.PUBLISH.getValue(), requestedUserEntity.getHub().getId());
|
||||
if (activeCalls != null) {
|
||||
widget1.setNumberOfActiveCalls(activeCalls);
|
||||
}
|
||||
@@ -74,8 +74,8 @@ public class DashboardDao {
|
||||
}
|
||||
}
|
||||
|
||||
private void setTotalActiveFinancing(Widget1 widget1, UserEntity requestedUserEntity) {
|
||||
BigDecimal totalActiveFinancing = callRepository.findTotalAmountOfPublishedCalls();
|
||||
private void setTotalActiveFinancing(Widget1 widget1, UserEntity requestedUser) {
|
||||
BigDecimal totalActiveFinancing = callRepository.findTotalAmountOfPublishedCallsAndHubId(requestedUser.getHub().getId());
|
||||
widget1.setTotalActiveFinancing(totalActiveFinancing);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public class DashboardDao {
|
||||
CompanyEntity company) {
|
||||
BeneficiaryWidgetResponseBean beneficiaryWidgetResponseBean = BeneficiaryWidgetResponseBean.builder()
|
||||
.numberOfApplications(0L).numberOfCalls(0L).numberOfIntegratedDocuments(0L).build();
|
||||
Long activeCalls = callRepository.countByStatus(CallStatusEnum.PUBLISH.getValue());
|
||||
Long activeCalls = callRepository.countByStatusAndHubId(CallStatusEnum.PUBLISH.getValue(), userEntity.getHub().getId());
|
||||
if (activeCalls != null) {
|
||||
beneficiaryWidgetResponseBean.setNumberOfCalls(activeCalls);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user