From c896a45d91a8739ba12cb39bf6040f448318bbbc Mon Sep 17 00:00:00 2001 From: Daniel Banks_ONS Date: Thu, 30 May 2024 10:50:24 +0100 Subject: [PATCH 1/5] Added action rule status --- pom.xml | 2 +- .../gov/ons/ssdc/supporttool/endpoint/ActionRuleEndpoint.java | 3 +++ .../gov/ons/ssdc/supporttool/model/dto/ui/ActionRuleDto.java | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3ebcbd6b..b0227116 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ uk.gov.ons.ssdc ssdc-rm-common-entity-model - 4.20.0 + 4.21.0-SNAPSHOT uk.gov.ons.ssdc diff --git a/src/main/java/uk/gov/ons/ssdc/supporttool/endpoint/ActionRuleEndpoint.java b/src/main/java/uk/gov/ons/ssdc/supporttool/endpoint/ActionRuleEndpoint.java index 83f8a19d..520aade9 100644 --- a/src/main/java/uk/gov/ons/ssdc/supporttool/endpoint/ActionRuleEndpoint.java +++ b/src/main/java/uk/gov/ons/ssdc/supporttool/endpoint/ActionRuleEndpoint.java @@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.RestController; import org.springframework.web.server.ResponseStatusException; import uk.gov.ons.ssdc.common.model.entity.ActionRule; +import uk.gov.ons.ssdc.common.model.entity.ActionRuleStatus; import uk.gov.ons.ssdc.common.model.entity.ActionRuleType; import uk.gov.ons.ssdc.common.model.entity.CollectionExercise; import uk.gov.ons.ssdc.common.model.entity.EmailTemplate; @@ -125,6 +126,7 @@ public List findActionRulesByCollex( actionRuleDTO.setHasTriggered(actionRule.isHasTriggered()); actionRuleDTO.setUacMetadata(actionRule.getUacMetadata()); actionRuleDTO.setSelectedCaseCount(actionRule.getSelectedCaseCount()); + actionRuleDTO.setActionRuleStatus(actionRule.getActionRuleStatus()); return actionRuleDTO; }) .collect(Collectors.toList()); @@ -252,6 +254,7 @@ public ResponseEntity insertActionRules( actionRule.setEmailTemplate(emailTemplate); actionRule.setEmailColumn(actionRuleDTO.getEmailColumn()); actionRule.setUacMetadata(actionRuleDTO.getUacMetadata()); + actionRule.setActionRuleStatus(ActionRuleStatus.SCHEDULED); actionRuleRepository.saveAndFlush(actionRule); diff --git a/src/main/java/uk/gov/ons/ssdc/supporttool/model/dto/ui/ActionRuleDto.java b/src/main/java/uk/gov/ons/ssdc/supporttool/model/dto/ui/ActionRuleDto.java index 65b0cd27..a808e20b 100644 --- a/src/main/java/uk/gov/ons/ssdc/supporttool/model/dto/ui/ActionRuleDto.java +++ b/src/main/java/uk/gov/ons/ssdc/supporttool/model/dto/ui/ActionRuleDto.java @@ -3,6 +3,7 @@ import java.time.OffsetDateTime; import java.util.UUID; import lombok.Data; +import uk.gov.ons.ssdc.common.model.entity.ActionRuleStatus; import uk.gov.ons.ssdc.common.model.entity.ActionRuleType; @Data @@ -28,5 +29,7 @@ public class ActionRuleDto { private boolean hasTriggered; + private ActionRuleStatus actionRuleStatus; + private Integer selectedCaseCount; } From ca2c23fe559d6e40f3c79f1cdf61383c3ac94228 Mon Sep 17 00:00:00 2001 From: Kacper Prywata Date: Mon, 17 Jun 2024 16:23:00 +0100 Subject: [PATCH 2/5] Bumped common-entity-model --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0227116..55b725a6 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ uk.gov.ons.ssdc ssdc-rm-common-entity-model - 4.21.0-SNAPSHOT + 4.22.0-SNAPSHOT uk.gov.ons.ssdc From efb12dbf0a27c7ee2274ea7ad406069946b603f2 Mon Sep 17 00:00:00 2001 From: Kacper Prywata Date: Thu, 20 Jun 2024 12:03:39 +0100 Subject: [PATCH 3/5] Changed page titiel --- ui/src/App.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/src/App.js b/ui/src/App.js index 8fc40050..b32753e1 100644 --- a/ui/src/App.js +++ b/ui/src/App.js @@ -20,6 +20,10 @@ import { } from "react-router-dom"; class App extends Component { + componentDidMount() { + document.title = "Support Tool"; + } + render() { return ( From e79f89e4d3e9dc8d6250349c1f6652253746c5e4 Mon Sep 17 00:00:00 2001 From: AdamHawtin Date: Wed, 26 Jun 2024 11:11:19 +0100 Subject: [PATCH 4/5] Replace has triggered with action rule status --- ui/src/CollectionExerciseDetails.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/CollectionExerciseDetails.js b/ui/src/CollectionExerciseDetails.js index 6ce8718d..7ad172e7 100644 --- a/ui/src/CollectionExerciseDetails.js +++ b/ui/src/CollectionExerciseDetails.js @@ -636,8 +636,8 @@ class CollectionExerciseDetails extends Component { ) : null} - - {actionRule.hasTriggered ? "YES" : "NO"} + + {actionRule.actionRuleStatus} {JSON.stringify(actionRule.uacMetadata)} @@ -821,7 +821,7 @@ class CollectionExerciseDetails extends Component { Description Trigger date - Has triggered? + Status UAC Metadata Classifiers Pack Code From 043c2b18184d25170a82d53b2f2ac9cc69f16a4a Mon Sep 17 00:00:00 2001 From: Adam <35268982+AdamHawtin@users.noreply.github.com> Date: Wed, 3 Jul 2024 08:36:57 +0100 Subject: [PATCH 5/5] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 03db2e67..e84468a7 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ uk.gov.ons.ssdc ssdc-rm-common-entity-model - 4.22.0-SNAPSHOT + 4.22.0 uk.gov.ons.ssdc