Skip to content

Commit

Permalink
update recenty viewed cases page sentence column for pre-sentence and…
Browse files Browse the repository at this point in the history
… no active case crn records (#231)
  • Loading branch information
achimber-moj authored Dec 9, 2024
1 parent fa2472a commit 4a974a7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
5 changes: 4 additions & 1 deletion server/views/pages/overview.njk
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@
{% endif %}
{% endset %}
{% set mainOffence %}
{% if loop.first %}
<input type="hidden" id="mainOffence" name="mainOffence" value="{{ sentence.mainOffence.description }}">
{% endif %}
{{ sentence.mainOffence.description }}
{%- if sentence.additionalOffences.length > 0 %}
{%- switch sentence.additionalOffences.length -%}
Expand Down Expand Up @@ -456,7 +459,7 @@
const dob = document.getElementById("dob").value
const age = document.getElementById("age").value
const tier = document.getElementById("tier").value
const sentence = document.getElementById("sentence") && document.getElementById("sentence").value
const sentence = document.getElementById("sentence") ? document.getElementById("sentence").value : document.getElementById("mainOffence") ? "Pre-sentence" : "No active sentence"
const numberOfAdditionalSentences = document.getElementById("numberOfAdditionalSentences").value
let recentCases = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"mappings": [
{
"request": {
"urlPattern": "/mas/overview/X808126",
"urlPattern": "/mas/overview/X777916",
"method": "GET"
},
"response": {
Expand All @@ -12,14 +12,14 @@
"absencesWithoutEvidence": 1,
"personalDetails": {
"name": {
"forename": "Cody",
"surname": "Watsica"
"forename": "Wendell",
"surname": "Dooley"
},
"telephoneNumber": "0208333777",
"mobileNumber": "077123456",
"preferredName": "Cody",
"preferredName": "Wendell",
"preferredGender": "Male",
"dateOfBirth": "1984-10-03",
"dateOfBirth": "2001-02-14",
"disabilities": [],
"provisions": [],
"personalCircumstances": []
Expand Down Expand Up @@ -74,7 +74,7 @@
},
{
"request": {
"urlPattern": "/arns/risks/crn/X808126",
"urlPattern": "/arns/risks/crn/X777916",
"method": "GET"
},
"response": {
Expand Down Expand Up @@ -145,7 +145,7 @@
},
{
"request": {
"urlPattern": "/mas/personal-details/X808126",
"urlPattern": "/mas/personal-details/X777916",
"method": "GET"
},
"response": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"mappings": [
{
"request": {
"urlPattern": "/mas/sentence/X808126",
"urlPattern": "/mas/sentence/X777916",
"method": "GET"
},
"response": {
"status": 200,
"jsonBody": {
"personSummary": {
"name": {
"forename": "Cody",
"surname": "Watsica"
"forename": "Wendell",
"surname": "Dooley"
},
"crn": "X808126",
"dateOfBirth": "1984-10-03"
"crn": "X777916",
"dateOfBirth": "2001-02-14"
},
"sentenceSummaryList": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"mappings": [
{
"request": {
"urlPattern": "/tier/crn/X808126/tier/details",
"urlPattern": "/tier/crn/X777916/tier/details",
"method": "GET"
},
"response": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"mappings": [
{
"request": {
"urlPattern": "/mas/user/.*/access/X808126",
"urlPattern": "/mas/user/.*/access/X777916",
"method": "GET"
},
"response": {
"status": 200,
"jsonBody": {
"crn": "X808126",
"crn": "X777916",
"userExcluded": false,
"userRestricted": false
},
Expand Down

0 comments on commit 4a974a7

Please sign in to comment.