Skip to content

Commit

Permalink
Merge pull request #17 from ministryofjustice/CBA-10-utils-form-pages…
Browse files Browse the repository at this point in the history
…-services

Add utils, form-pages and services folders
  • Loading branch information
patrickjfl authored Nov 29, 2024
2 parents 1b25d84 + a5e51a8 commit 0f26346
Show file tree
Hide file tree
Showing 239 changed files with 20,453 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"@typescript-eslint/no-use-before-define": 0,
"class-methods-use-this": 0,
"no-useless-constructor": 0,
"import/prefer-default-export": 0,
"max-classes-per-file": "off",
"@typescript-eslint/no-unused-vars": [
1,
{
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,26 @@ jobs:
name: node build
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_build.yml@v1 # WORKFLOW_VERSION
secrets: inherit
with:
node_version: 22
# generic node unit tests - feel free to override with local tests if required
node_unit_tests:
name: node unit tests
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_unit_tests.yml@v1 # WORKFLOW_VERSION
needs: [node_build]
secrets: inherit
with:
node_version: 22
# generic node integration tests using wiremock - feel free to override with local tests if required
node_integration_tests:
name: node integration tests
# skip integration tests until testing strategy is established
if: false
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_integration_tests.yml@v1 # WORKFLOW_VERSION
needs: [node_build]
secrets: inherit
with:
node_version: 22
helm_lint:
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ integration_tests/screenshots/
*/*.iml
**/Chart.lock
**/.DS_Store
tmp
358 changes: 358 additions & 0 deletions integration_tests/fixtures/applicationData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,358 @@
{
"confirm-eligibility": {
"confirm-eligibility": {
"isEligible": "yes"
}
},
"confirm-consent": {
"confirm-consent": {
"hasGivenConsent": "yes",
"consentDate": "2023-01-01",
"consentDate-year": "2023",
"consentDate-month": "1",
"consentDate-day": "1"
}
},
"hdc-licence-dates": {
"hdc-licence-dates": {
"hdcEligibilityDate": "2026-02-22",
"hdcEligibilityDate-year": "2026",
"hdcEligibilityDate-month": "2",
"hdcEligibilityDate-day": "22",
"conditionalReleaseDate": "2026-03-28",
"conditionalReleaseDate-year": "2026",
"conditionalReleaseDate-month": "3",
"conditionalReleaseDate-day": "28"
},
"hdc-warning": {},
"hdc-ineligible": {}
},
"referrer-details": {
"confirm-details": { "name": "Eric Dier", "email": "eric.dier@moj.gov.uk" },
"job-title": { "jobTitle": "POM" },
"contact-number": { "telephone": "1234567" }
},
"information-needed-from-applicant": {
"information-needed-from-applicant": {
"hasInformationNeeded": "yes"
}
},
"area-information": {
"first-preferred-area": {
"preferredArea": "London",
"preferenceReason": "They have family there"
},
"second-preferred-area": {
"preferredArea": "Birmingham",
"preferenceReason": "They have a job there"
},
"exclusion-zones": {
"hasExclusionZones": "yes",
"exclusionZonesDetail": "Avoid Liverpool"
},
"gang-affiliations": {
"hasGangAffiliations": "yes",
"gangName": "Gang name",
"gangOperationArea": "Derby",
"rivalGangDetail": "Rival gang detail"
},
"family-accommodation": {
"familyProperty": "yes"
}
},
"funding-information": {
"funding-source": {
"fundingSource": "benefits"
},
"identification": {
"idDocuments": "passport"
},
"national-insurance": {
"nationalInsuranceNumber": "12345"
}
},
"personal-information": {
"working-mobile-phone": {
"hasWorkingMobilePhone": "yes",
"mobilePhoneNumber": "11111111111",
"isSmartPhone": "yes"
},
"immigration-status": {
"immigrationStatus": "UK citizen"
},
"pregnancy-information": {
"isPregnant": "yes",
"dueDate-day": "5",
"dueDate-month": "6",
"dueDate-year": "2024"
},
"support-worker-preference": {
"hasSupportWorkerPreference": "yes",
"supportWorkerPreference": "female"
}
},
"address-history": {
"previous-address": {
"hasPreviousAddress": "yes",
"previousAddressLine1": "1 Example Road",
"previousAddressLine2": "Pretend Close",
"previousTownOrCity": "Aberdeen",
"previousCounty": "Gloucestershire",
"previousPostcode": "AB1 2CD"
}
},
"equality-and-diversity-monitoring": {
"will-answer-equality-questions": {
"willAnswer": "yes"
},
"disability": {
"hasDisability": "no"
},
"sex-and-gender": {
"sex": "female",
"gender": "yes"
},
"sexual-orientation": {
"orientation": "gay"
},
"ethnic-group": {
"ethnicGroup": "white"
},
"white-background": {
"whiteBackground": "english"
},
"religion": {
"religion": "atheist"
},
"military-veteran": {
"isVeteran": "yes"
},
"care-leaver": {
"isCareLeaver": "no"
},
"parental-carer-responsibilities": {
"hasParentalOrCarerResponsibilities": "yes"
},
"marital-status": {
"maritalStatus": "widowed"
}
},
"health-needs": {
"guidance": {},
"substance-misuse": {
"usesIllegalSubstances": "no",
"substanceMisuse": "",
"pastSubstanceMisuse": "no",
"pastSubstanceMisuseDetail": "",
"engagedWithDrugAndAlcoholService": "no",
"intentToReferToServiceOnRelease": "no",
"drugAndAlcoholServiceDetail": "",
"requiresSubstituteMedication": "no",
"substituteMedicationDetail": "",
"releasedWithNaloxone": "no"
},
"physical-health": {
"hasPhyHealthNeeds": "no",
"needsDetail": "",
"isReceivingMedicationOrTreatment": "no",
"medicationOrTreatmentDetail": "",
"canLiveIndependently": "yes",
"indyLivingDetail": "",
"requiresAdditionalSupport": "no",
"addSupportDetail": ""
},
"mental-health": {
"hasMentalHealthNeeds": "no",
"needsDetail": "",
"needsPresentation": "",
"isEngagedWithCommunity": "no",
"servicesDetail": "",
"isEngagedWithServicesInCustody": "no",
"areIntendingToEngageWithServicesAfterCustody": "no",
"canManageMedication": "notPrescribedMedication",
"canManageMedicationNotes": "",
"medicationIssues": "",
"cantManageMedicationNotes": ""
},
"communication-and-language": {
"requiresInterpreter": "no",
"interpretationDetail": "",
"hasSupportNeeds": "no",
"supportDetail": "",
"oldQuestion": "this answer should not appear"
},
"learning-difficulties": {
"hasLearningNeeds": "no",
"needsDetail": "",
"isVulnerable": "no",
"vulnerabilityDetail": "",
"hasDifficultyInteracting": "no",
"interactionDetail": "",
"requiresAdditionalSupport": "no",
"addSupportDetail": ""
},
"brain-injury": {
"hasBrainInjury": "no",
"injuryDetail": "",
"isVulnerable": "no",
"vulnerabilityDetail": "",
"hasDifficultyInteracting": "no",
"interactionDetail": "",
"requiresAdditionalSupport": "no",
"addSupportDetail": ""
},
"other-health": {
"hasLongTermHealthCondition": "no",
"healthConditionDetail": "",
"hasSeizures": "no",
"seizuresDetail": "",
"beingTreatedForCancer": "no"
}
},
"risk-to-self": {
"oasys-import": {
"oasysImportedDate": "2023-09-21T15:47:51.430Z",
"oasysStartedDate": "2023-09-10",
"oasysCompletedDate": "2023-09-11"
},
"current-risk": {
"currentRiskDetail": "[R8.1.1] Review 06.10.21:\r\n\r\n There have been numerous ACCTs opened since 2013 and every subsequent year he has been in custody. In 2021...",
"confirmation": "confirmed"
},
"vulnerability": {
"vulnerabilityDetail": "example answer vulnerability",
"confirmation": "confirmed"
},
"historical-risk": {
"historicalRiskDetail": "example answer historical risk",
"confirmation": "confirmed"
},
"acct": {},
"acct-data": [
{
"createdDate-day": "1",
"createdDate-month": "2",
"createdDate-year": "2012",
"isOngoing": "no",
"closedDate-day": "10",
"closedDate-month": "10",
"closedDate-year": "2013",
"referringInstitution": "HMPPS prison",
"acctDetails": "ACCT details\nsome more details on another line"
},
{
"createdDate-day": "2",
"createdDate-month": "3",
"createdDate-year": "2013",
"isOngoing": "yes",
"referringInstitution": "HMPPS prison 2",
"acctDetails": "ACCT details 2"
}
],
"additional-information": {
"hasAdditionalInformation": "yes",
"additionalInformationDetail": "some information"
}
},
"risk-of-serious-harm": {
"oasys-import": { "oasysImportedDate": "2023-09-21T15:47:51.430Z" },
"summary-data": {
"oasysImportedDate": "2023-09-21T15:47:51.430Z",
"oasysStartedDate": "2023-09-10",
"oasysCompletedDate": "2023-09-11",
"status": "retrieved",
"value": {
"overallRisk": "High",
"riskToChildren": "High",
"riskToPublic": "Very High",
"riskToKnownAdult": "Medium",
"riskToStaff": "Low"
}
},
"summary": {
"additionalComments": "some rosh comments"
},
"risk-to-others": {
"whoIsAtRisk": "a person",
"natureOfRisk": "a nature",
"confirmation": "confirmed"
},
"risk-management-arrangements": {
"arrangements": ["mappa", "marac", "iom"],
"mappaDetails": "mappa details",
"maracDetails": "marac details",
"iomDetails": "iom details"
},
"cell-share-information": {
"hasCellShareComments": "yes",
"cellShareInformationDetail": "some information"
},
"additional-risk-information": {
"hasAdditionalInformation": "yes",
"additionalInformationDetail": "some information"
}
},
"current-offences": {
"current-offence-data": [
{
"titleAndNumber": "Arson",
"offenceCategory": "Arson",
"offenceDate-day": "5",
"offenceDate-month": "6",
"offenceDate-year": "1940",
"sentenceLength": "3 years",
"summary": "summary detail",
"outstandingCharges": "yes",
"outstandingChargesDetail": "outstanding charges detail"
},
{
"titleAndNumber": "Stalking",
"offenceCategory": "Stalking",
"offenceDate-day": "6",
"offenceDate-month": "7",
"offenceDate-year": "2023",
"sentenceLength": "2 months",
"summary": "more summary detail",
"outstandingCharges": "no"
}
],
"current-offences": {}
},
"offending-history": {
"any-previous-convictions": { "hasAnyPreviousConvictions": "yesRelevantRisk" },
"offence-history-data": [
{
"offenceGroupName": "Arson",
"offenceCategory": "arson",
"numberOfOffences": "3",
"sentenceTypes": "1 custodial",
"summary": "summary detail"
},
{
"offenceGroupName": "Stalking",
"offenceCategory": "stalkingOrHarassment",
"numberOfOffences": "3",
"sentenceTypes": "1 suspended",
"summary": "more summary detail"
}
],
"offence-history": {}
},
"cpp-details-and-hdc-licence-conditions": {
"cpp-details": {
"name": "A. CPP",
"probationRegion": "some region",
"email": "cpp@moj.gov.uk",
"telephone": "012345"
},
"non-standard-licence-conditions": {
"nonStandardLicenceConditions": "yes",
"nonStandardLicenceConditionsDetail": "some detail"
}
},
"check-your-answers": {
"check-your-answers": {
"checkYourAnswers": "confirmed"
}
}
}
Loading

0 comments on commit 0f26346

Please sign in to comment.