diff --git a/pom.xml b/pom.xml index 4bb5c2e9..e84468a7 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ uk.gov.ons.ssdc ssdc-rm-common-entity-model - 4.21.0 + 4.22.0 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 3924ff35..7dbe8264 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; @@ -126,6 +127,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()); @@ -254,6 +256,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 b1ad20e1..28b2203c 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 @@ -30,5 +31,7 @@ public class ActionRuleDto { private boolean hasTriggered; + private ActionRuleStatus actionRuleStatus; + private Integer selectedCaseCount; } 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 ( 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