|
|
|
@ -92,6 +92,7 @@ public class GrantService extends ActivityService<GrantListDto, Grant, GrantDto>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected Grant copyFromDto(Grant grant, GrantDto grantDto) throws IOException {
|
|
|
|
|
grant.setId(grantDto.getId());
|
|
|
|
|
grant.setComment(grantDto.getComment());
|
|
|
|
|
grant.setStatus(grantDto.getStatus() == null ? APPLICATION : grantDto.getStatus());
|
|
|
|
|
grant.setTitle(grantDto.getTitle());
|
|
|
|
@ -157,10 +158,12 @@ public class GrantService extends ActivityService<GrantListDto, Grant, GrantDto>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageableItems<GrantDashboardDto> findAllActiveDto(int offset, int count) {
|
|
|
|
|
return convertPageable(findAllActive(offset, count), GrantDashboardDto::new);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageableItems<Grant> findAllActive(int offset, int count) {
|
|
|
|
|
Page<Grant> activeGrantsPage = grantRepository.findAllActive(new OffsetablePageRequest(offset, count));
|
|
|
|
|
return new PageableItems<>(activeGrantsPage.getTotalElements(), activeGrantsPage.getContent());
|
|
|
|
|