From 80e07f226918db5df8b4fcc8af4fe6aae4e050a7 Mon Sep 17 00:00:00 2001 From: "Girma Bewketu (I-10)" Date: Fri, 3 Jul 2026 14:04:29 +0100 Subject: [PATCH 1/2] Fix Defendant Pre Cons filter label --- materials_ui/src/constants/categoryList.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/materials_ui/src/constants/categoryList.ts b/materials_ui/src/constants/categoryList.ts index 010324fc..e94f29ec 100644 --- a/materials_ui/src/constants/categoryList.ts +++ b/materials_ui/src/constants/categoryList.ts @@ -4,7 +4,7 @@ export const materialsCategoryList = [ 'MG Form', 'Other Material', 'Unused Material', - 'Defendant Pre Conns' + 'Defendant Pre Cons' ]; export const communicationsCategoryList = [ From aa359eff76b8bbc451cd7e01130a234b00da1ffc Mon Sep 17 00:00:00 2001 From: "Girma Bewketu (I-10)" Date: Tue, 7 Jul 2026 11:01:33 +0100 Subject: [PATCH 2/2] remove blank space --- .../src/components/Filters/CommsFilters.tsx | 241 +++++++++--------- 1 file changed, 120 insertions(+), 121 deletions(-) diff --git a/materials_ui/src/components/Filters/CommsFilters.tsx b/materials_ui/src/components/Filters/CommsFilters.tsx index 00710e16..6d7de896 100644 --- a/materials_ui/src/components/Filters/CommsFilters.tsx +++ b/materials_ui/src/components/Filters/CommsFilters.tsx @@ -1,121 +1,120 @@ -import { ChangeEvent } from 'react'; -import { - communicationsCategoryList, - communicationsWithList, - typeList -} from '../../constants/categoryList'; -import { READ_STATUS } from '../../constants/readStatus'; -import { useFeatureFlag, useFilters } from '../../hooks'; -import Checkbox from '../Checkbox/Checkbox'; -import { FilterForm } from './FilterForm'; - -export const CommsFilters = () => { - const { - filters, - resetFilters, - shallowFilters, - setCheckboxFilter, - setSearch, - saveFiltersToContext - } = useFilters('communications'); - const hasAccess = useFeatureFlag(); - - const handleCheckboxChange = ( - filterGroup: string, - event: ChangeEvent - ) => { - const { checked, value } = event.target; - - setCheckboxFilter(filterGroup, value, checked); - }; - - const handleFiltersSubmit = () => { - saveFiltersToContext(); - }; - - const handleSearchChange = (searchTerm: string) => { - setSearch(searchTerm); - }; - - const formGroups = [ - { - heading: 'In/Out', - data: ['Incoming', 'Outgoing'], - filterGroup: 'direction' - }, - { - heading: 'Comms type', - data: communicationsCategoryList, - filterGroup: 'method' - }, - { - heading: 'Comms with', - data: communicationsWithList, - filterGroup: 'party' - }, - { heading: 'Type', data: typeList, filterGroup: 'type' } - ]; - - return ( - - - {hasAccess([1, 2, 3, 4, 5]) && ( -
-
-
- -

- New communication -

-
- handleCheckboxChange('readStatus', event)} - value={READ_STATUS.UNREAD} - /> -
-
-
- )} - - {formGroups.map(({ heading, data, filterGroup }, index) => ( -
-
- -

- {heading} -

-
- {data.map((value) => ( - - handleCheckboxChange(`${filterGroup}`, event) - } - value={value} - key={value} - /> - ))} -
-
- ))} -
- ); -}; +import { ChangeEvent } from 'react'; +import { + communicationsCategoryList, + communicationsWithList, + typeList +} from '../../constants/categoryList'; +import { READ_STATUS } from '../../constants/readStatus'; +import { useFeatureFlag, useFilters } from '../../hooks'; +import Checkbox from '../Checkbox/Checkbox'; +import { FilterForm } from './FilterForm'; + +export const CommsFilters = () => { + const { + filters, + resetFilters, + shallowFilters, + setCheckboxFilter, + setSearch, + saveFiltersToContext + } = useFilters('communications'); + const hasAccess = useFeatureFlag(); + + const handleCheckboxChange = ( + filterGroup: string, + event: ChangeEvent + ) => { + const { checked, value } = event.target; + + setCheckboxFilter(filterGroup, value, checked); + }; + + const handleFiltersSubmit = () => { + saveFiltersToContext(); + }; + + const handleSearchChange = (searchTerm: string) => { + setSearch(searchTerm); + }; + + const formGroups = [ + { + heading: 'In/Out', + data: ['Incoming', 'Outgoing'], + filterGroup: 'direction' + }, + { + heading: 'Comms type', + data: communicationsCategoryList, + filterGroup: 'method' + }, + { + heading: 'Comms with', + data: communicationsWithList, + filterGroup: 'party' + }, + { heading: 'Type', data: typeList, filterGroup: 'type' } + ]; + + return ( + + {hasAccess([1, 2, 3, 4, 5]) && ( +
+
+
+ +

+ New communication +

+
+ handleCheckboxChange('readStatus', event)} + value={READ_STATUS.UNREAD} + /> +
+
+
+ )} + + {formGroups.map(({ heading, data, filterGroup }, index) => ( +
+
+ +

+ {heading} +

+
+ {data.map((value) => ( + + handleCheckboxChange(`${filterGroup}`, event) + } + value={value} + key={value} + /> + ))} +
+
+ ))} +
+ ); +};