Skip to content

Commit

Permalink
CCMSPUI-454: Implement EBS Get Notifications Endpoint on PUI UI (#129)
Browse files Browse the repository at this point in the history
* Added reference summary to open-api-specification.yml

Signed-off-by: Jamie Briggs <[email protected]>

* Added CaseReferenceController and NewCaseReferenceRepository

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-378: Added CaseReferenceSummaryMapper and further tests

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-378: Removed CaseReferenceSummaryMapper.java

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-378: Fixed checkstyle issue in NewCaseReferenceService

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-453: Work towards endpoint and NotificationsMapper including mapping XML values

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-453: Fix to NotificationsMapper when XML is empty

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-453: Fixes to codestyle violations

Signed-off-by: Jamie Briggs <[email protected]>

* Started on IT for NotificationRepository

Signed-off-by: Jamie Briggs <[email protected]>

* Added NotificationSpecification to help with filtering Notification entities in NotificationRepository

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-453: Tweaks to open-api-specification.yml, and NotificationControllerTests

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-453: NotificationServiceTest and additional JavaDoc

Signed-off-by: Jamie Briggs <[email protected]>

* Fix issue with NotificationSpecification

Signed-off-by: Jamie Briggs <[email protected]>

* Fix to test

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-454: Stop filtering when param is empty string

Signed-off-by: Jamie Briggs <[email protected]>

---------

Signed-off-by: Jamie Briggs <[email protected]>
  • Loading branch information
JamieBriggs-MoJ authored Jan 9, 2025
1 parent 5a02963 commit 888cf62
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ public static Specification<Notification> withFilters(
List<Predicate> predicates = new ArrayList<>();

// Add predicates for each filter only if they are non-null
if (caseReferenceNumber != null) {
if (caseReferenceNumber != null && !caseReferenceNumber.isBlank()) {
predicates.add(criteriaBuilder.like(root.get("lscCaseRefReference"),
"%" + caseReferenceNumber + "%"));
}
if (providerCaseReference != null) {
if (providerCaseReference != null && !providerCaseReference.isBlank()) {
predicates.add(criteriaBuilder.like(root.get("providerCaseReference"),
"%" + providerCaseReference + "%"));
}
if (assignedToUserId != null) {
if (assignedToUserId != null && !assignedToUserId.isBlank()) {
predicates.add(criteriaBuilder.equal(root.get("assignedTo"), assignedToUserId));
}
if (clientSurname != null) {
if (clientSurname != null && !clientSurname.isBlank()) {
predicates.add(criteriaBuilder.like(root.get("personLastName"), "%" + clientSurname + "%"));
}
if (feeEarnerId != null) {
Expand All @@ -89,7 +89,7 @@ public static Specification<Notification> withFilters(
if (!includeClosed) {
predicates.add(criteriaBuilder.equal(root.get("isOpen"), "true"));
}
if (notificationType != null) {
if (notificationType != null && !notificationType.isBlank()) {
predicates.add(criteriaBuilder.equal(root.get("actionNotificationInd"), notificationType));
}
if (dateFrom != null) {
Expand Down

0 comments on commit 888cf62

Please sign in to comment.