diff --git a/hrm-form-definitions/form-definitions/nz/v1/tabbedForms/CaseInformationTab.json b/hrm-form-definitions/form-definitions/nz/v1/tabbedForms/CaseInformationTab.json index 68121eab93..f6f58aba28 100644 --- a/hrm-form-definitions/form-definitions/nz/v1/tabbedForms/CaseInformationTab.json +++ b/hrm-form-definitions/form-definitions/nz/v1/tabbedForms/CaseInformationTab.json @@ -19,50 +19,226 @@ "type": "listbox-multiselect", "options": [ { - "value": "Support provided by Youthline", - "label": "Support provided by Youthline" + "value": "Resources given around helplines available", + "label": "Resources given around helplines available" }, { - "value": "Recommendations of resources", - "label": "Recommendations of resources" + "value": "Resources given around local services and organisations", + "label": "Resources given around local services and organisations" }, { - "value": "Resourcing to Oranga Tamariki", - "label": "Resourcing to Oranga Tamariki" + "value": "Resources given around Emergency Services/111", + "label": "Resources given around Emergency Services/111" }, { - "value": "Resourcing to general healthcare services", - "label": "Resourcing to general healthcare services" + "value": "Resources given around Mental Health Crisis Teams", + "label": "Resources given around Mental Health Crisis Teams" }, { - "value": "Resourcing to law enforcement agencies", - "label": "Resourcing to law enforcement agencies" + "value": "Resources given around Oranga Tamariki", + "label": "Resources given around Oranga Tamariki" }, { - "value": "Resourcing to mental health services", - "label": "Resourcing to mental health services" + "value": "Resources given around accommodation or financial support", + "label": "Resources given around accommodation or financial support" }, { - "value": "Resourcing to other organisations", - "label": "Resourcing to other organisations" + "value": "Resources given around accessing healthcare services", + "label": "Resources given around accessing healthcare services" }, { - "value": "Resourcing to school counsellors", - "label": "Resourcing to school counsellors" + "value": "Resources given around digital harm or online exploitation", + "label": "Resources given around digital harm or online exploitation" }, { - "value": "Reports to Child Sexual Abuse Material", - "label": "Reports to Child Sexual Abuse Material" + "value": "Resources given around other Youthline services", + "label": "Resources given around other Youthline services" }, { - "value": "Other", - "label": "Other" + "value": "I've talked to Triage about this contact", + "label": "I've talked to Triage about this contact" + }, + { + "value": "I've talked to OSS about this contact", + "label": "I've talked to OSS about this contact" + } + ] + }, + { + "name": "referredTo", + "label": "Referred To", + "type": "select", + "unknownOption": "No Referral Made", + "options": [ + { + "value": "No Referral Made", + "label": "" + }, + { + "value": "Abuse & Violence - It's Not OK", + "label": "Abuse & Violence - It's Not OK" + }, + { + "value": "Abuse & Violence - Rape/sexual abuse service", + "label": "Abuse & Violence - Rape/sexual abuse service" + }, + { + "value": "Abuse & Violence - Shine", + "label": "Abuse & Violence - Shine" + }, + { + "value": "Abuse & Violence - Victims of Crime", + "label": "Abuse & Violence - Victims of Crime" + }, + { + "value": "Alcohol & Drug - CADS", + "label": "Alcohol & Drug - CADS" + }, + { + "value": "Depression - Depression Helpline", + "label": "Depression - Depression Helpline" + }, + { + "value": "Depression - Lowdown", + "label": "Depression - Lowdown" + }, + { + "value": "Directory - 211 Directory Services", + "label": "Directory - 211 Directory Services" + }, + { + "value": "Directory - CAB", + "label": "Directory - CAB" + }, + { + "value": "Education - School", + "label": "Education - School" + }, + { + "value": "Emergency - Ambulance", + "label": "Emergency - Ambulance" + }, + { + "value": "Emergency - Fire Dept", + "label": "Emergency - Fire Dept" + }, + { + "value": "Emergency - Police", + "label": "Emergency - Police" + }, + { + "value": "Face to face counselling - Youthline", + "label": "Face to face counselling - Youthline" + }, + { + "value": "Face to face counselling - School counsellor", + "label": "Face to face counselling - School counsellor" + }, + { + "value": "Face to face counselling - ACC registered", + "label": "Face to face counselling - ACC registered" + }, + { + "value": "Face to face counselling - Other", + "label": "Face to face counselling - Other" + }, + { + "value": "Family Support - Barnardos", + "label": "Family Support - Barnardos" + }, + { + "value": "Family Support - Oranga Tamariki", + "label": "Family Support - Oranga Tamariki" + }, + { + "value": "Financial - WINZ", + "label": "Financial - WINZ" + }, + { + "value": "Harmful Digital Comms - Netsafe", + "label": "Harmful Digital Comms - Netsafe" + }, + { + "value": "Health - A&E", + "label": "Health - A&E" + }, + { + "value": "Health - GP", + "label": "Health - GP" + }, + { + "value": "Health - Healthline", + "label": "Health - Healthline" + }, + { + "value": "Helpline - 1737", + "label": "Helpline - 1737" + }, + { + "value": "Helpline - Lifeline", + "label": "Helpline - Lifeline" + }, + { + "value": "Homelessness - City Mission", + "label": "Homelessness - City Mission" + }, + { + "value": "Homelessness - Salvation Army", + "label": "Homelessness - Salvation Army" + }, + { + "value": "Human Rights - Disability Support", + "label": "Human Rights - Disability Support" + }, + { + "value": "Human Rights - Human Rights Commission", + "label": "Human Rights - Human Rights Commission" + }, + { + "value": "Legal - Youthlaw", + "label": "Legal - Youthlaw" + }, + { + "value": "Legal - Community Law", + "label": "Legal - Community Law" + }, + { + "value": "Mental Health - Crisis & Assessment Team", + "label": "Mental Health - Crisis & Assessment Team" + }, + { + "value": "Mental Health - EDANZ", + "label": "Mental Health - EDANZ" + }, + { + "value": "Sexual Health - Family Planning", + "label": "Sexual Health - Family Planning" + }, + { + "value": "Sexual/Gender Identity - Rainbow Youth", + "label": "Sexual/Gender Identity - Rainbow Youth" + }, + { + "value": "Sexual/Gender Identity - Outline", + "label": "Sexual/Gender Identity - Outline" + }, + { + "value": "Youthline Office", + "label": "Youthline Office" + }, + { + "value": "Youthline - Other service", + "label": "Youthline - Other service" + }, + { + "value": "Other referral not listed here", + "label": "Other referral not listed here" } ] }, { "name": "howDidYouKnowAboutOurLine", - "label": "How did the client know about us?", + "label": "How did the client hear about the Helpline?", "type": "select", "unknownOption": "Unknown", "options": [ @@ -71,35 +247,70 @@ "label": "" }, { - "value": "Word of mouth", - "label": "Word of mouth" + "value": "Family", + "label": "Family" + }, + { + "value": "Friends", + "label": "Friends" + }, + { + "value": "Youthline Service, e.g. Helpline/Youth Worker/Counselling", + "label": "Youthline Service, e.g. Helpline/Youth Worker/Counselling" + }, + { + "value": "Social Media Post, e.g., Instagram/Facebook", + "label": "Social Media Post, e.g., Instagram/Facebook" + }, + { + "value": "Social Media Influencer", + "label": "Social Media Influencer" + }, + { + "value": "Online Advertising, e.g., Google", + "label": "Online Advertising, e.g., Google" + }, + { + "value": "Youthline Website", + "label": "Youthline Website" }, { - "value": "Media", - "label": "Media" + "value": "Social Worker or Youth Worker", + "label": "Social Worker or Youth Worker" }, { - "value": "Friend", - "label": "Friend" + "value": "Mental Health Professional", + "label": "Mental Health Professional" }, { - "value": "School", - "label": "School" + "value": "Doctor/GP", + "label": "Doctor/GP" }, { - "value": "Others", - "label": "Others" + "value": "School or University Program", + "label": "School or University Program" + }, + { + "value": "Community Event", + "label": "Community Event" + }, + { + "value": "Physical Advertisements, e.g., Billboard", + "label": "Physical Advertisements, e.g., Billboard" + }, + { + "value": "Other", + "label": "Other" + }, + { + "value": "Unknown", + "label": "Unknown" } ] }, { - "name": "didTheChildFeelWeSolvedTheirProblem", - "label": "Did the client feel supported after contacting us?", - "type": "mixed-checkbox" - }, - { - "name": "didYouDiscussConfidentialityWithClient", + "name": "didYouDiscussRightsWithTheChild", "label": "Did you discuss confidentiality and limits of confidentiality with the client?", "type": "mixed-checkbox" } -] +] \ No newline at end of file diff --git a/plugin-hrm-form/src/HrmFormPlugin.tsx b/plugin-hrm-form/src/HrmFormPlugin.tsx index fac6eadd73..a4dd4aa37b 100644 --- a/plugin-hrm-form/src/HrmFormPlugin.tsx +++ b/plugin-hrm-form/src/HrmFormPlugin.tsx @@ -115,6 +115,7 @@ const setUpComponents = ( } if (featureFlags.enable_case_management) Components.setUpCaseList(); + if (featureFlags.enable_client_profiles) Components.setUpClientProfileList(); if (!Boolean(setupObject.helpline)) Components.setUpDeveloperComponents(translateUI); // utilities for developers only diff --git a/plugin-hrm-form/src/___tests__/components/Pagination.test.js b/plugin-hrm-form/src/___tests__/components/Pagination.test.js index 780846d92f..0bac82c00e 100644 --- a/plugin-hrm-form/src/___tests__/components/Pagination.test.js +++ b/plugin-hrm-form/src/___tests__/components/Pagination.test.js @@ -20,8 +20,8 @@ import { StorelessThemeProvider } from '@twilio/flex-ui'; import { range } from 'lodash'; import HrmTheme from '../../styles/HrmTheme'; -import { PaginationButton } from '../../styles/caseList'; -import Pagination, { getPaginationNumbers } from '../../components/Pagination'; +import { PaginationButton } from '../../components/pagination/styles'; +import Pagination, { getPaginationNumbers } from '../../components/pagination'; const themeConf = { colorTheme: HrmTheme, diff --git a/plugin-hrm-form/src/components/caseList/CaseList.tsx b/plugin-hrm-form/src/components/caseList/CaseList.tsx index 4dbe9de0e3..d3fb8625b7 100644 --- a/plugin-hrm-form/src/components/caseList/CaseList.tsx +++ b/plugin-hrm-form/src/components/caseList/CaseList.tsx @@ -22,7 +22,8 @@ import { DefinitionVersion } from 'hrm-form-definitions'; import Case from '../case'; import { StandaloneITask, Case as CaseType } from '../../types/types'; import CaseListTable from './CaseListTable'; -import { CaseListContainer, CenteredContainer, SomethingWentWrongText } from '../../styles/caseList'; +import { ListContainer, CenteredContainer, SomethingWentWrongText } from '../../styles/table'; +import { listCases } from '../../services/CaseService'; import { CaseLayout } from '../../styles/case'; import * as ConfigActions from '../../states/configuration/actions'; import { StandaloneSearchContainer } from '../../styles/search'; @@ -136,14 +137,14 @@ const CaseList: React.FC = ({ } return ( <> - + - + ); }; diff --git a/plugin-hrm-form/src/components/caseList/CaseListTable.tsx b/plugin-hrm-form/src/components/caseList/CaseListTable.tsx index 1b1cf44bfc..f152e06b9d 100644 --- a/plugin-hrm-form/src/components/caseList/CaseListTable.tsx +++ b/plugin-hrm-form/src/components/caseList/CaseListTable.tsx @@ -20,11 +20,11 @@ import { TableBody, CircularProgress } from '@material-ui/core'; import { connect, ConnectedProps } from 'react-redux'; import { Template } from '@twilio/flex-ui'; -import { TableContainer, CLTable, CLTableRow, CLNamesCell, CLTableCell, CLTableBodyFont } from '../../styles/caseList'; +import { TableContainer, StandardTable, DataTableRow, LoadingCell, DataCell, TableBodyFont } from '../../styles/table'; import Filters from './filters/Filters'; import CaseListTableHead from './CaseListTableHead'; import CaseListTableRow from './CaseListTableRow'; -import Pagination from '../Pagination'; +import Pagination from '../pagination'; import { CASES_PER_PAGE } from './CaseList'; import type { Case } from '../../types/types'; import * as CaseListSettingsActions from '../../states/caseList/settings'; @@ -63,11 +63,11 @@ const CaseListTable: React.FC = ({ <> - + {loading && ( - = ({ height: `${(caseList.length || CASES_PER_PAGE) * ROW_HEIGHT}px`, }} > - + - - + + )} {!loading && ( @@ -98,17 +98,17 @@ const CaseListTable: React.FC = ({ ); }) ) : ( - - - + + +