From 68632cdedbbfa69f749695f5fcfcfd12cc9f5263 Mon Sep 17 00:00:00 2001 From: Stephen Hand Date: Fri, 8 Dec 2023 11:01:27 +0000 Subject: [PATCH 1/7] Update timeline view to show recent timeline only, with updated header to match --- .../src/components/case/CaseHome.tsx | 4 ++-- .../src/components/case/Timeline.tsx | 20 +++++++++++-------- plugin-hrm-form/src/states/case/timeline.ts | 4 ++-- .../src/translations/en-CA/flexUI.json | 3 ++- .../src/translations/en-MT/flexUI.json | 3 ++- .../src/translations/en-NZ/flexUI.json | 3 ++- .../src/translations/en-US/flexUI.json | 3 ++- .../src/translations/es-CL/flexUI.json | 3 ++- .../src/translations/es-CO/flexUI.json | 3 ++- .../src/translations/es-ES/flexUI.json | 3 ++- .../src/translations/hu-HU/flexUI.json | 3 ++- .../src/translations/pl-PL/flexUI.json | 3 ++- .../src/translations/pt-BR/flexUI.json | 3 ++- .../src/translations/ro-RO/flexUI.json | 3 ++- .../src/translations/th-TH/flexUI.json | 3 ++- 15 files changed, 40 insertions(+), 24 deletions(-) diff --git a/plugin-hrm-form/src/components/case/CaseHome.tsx b/plugin-hrm-form/src/components/case/CaseHome.tsx index c06d9fc125..519c73020c 100644 --- a/plugin-hrm-form/src/components/case/CaseHome.tsx +++ b/plugin-hrm-form/src/components/case/CaseHome.tsx @@ -37,6 +37,7 @@ import { RootState } from '../../states'; import { CaseDetails } from '../../states/case/types'; import { Case, Contact, CustomITask, EntryInfo, StandaloneITask } from '../../types/types'; import * as RoutingActions from '../../states/routing/actions'; +import { newCloseModalAction } from '../../states/routing/actions'; import InformationRow from './InformationRow'; import TimelineInformationRow from './TimelineInformationRow'; import DocumentInformationRow from './DocumentInformationRow'; @@ -49,7 +50,6 @@ import { isStandaloneITask } from './Case'; import selectContactByTaskSid from '../../states/contacts/selectContactByTaskSid'; import asyncDispatch from '../../states/asyncDispatch'; import { connectToCaseAsyncAction } from '../../states/contacts/saveContact'; -import { newCloseModalAction } from '../../states/routing/actions'; import { BannerContainer, Text } from '../caseMergingBanners/styles'; import InfoIcon from '../caseMergingBanners/InfoIcon'; import { selectCurrentTopmostRouteForTask } from '../../states/routing/getRoute'; @@ -279,7 +279,7 @@ const CaseHome: React.FC = ({ - + boolean; taskSid: CustomITask['taskSid']; + pageSize: number; + page: number; + titleCode?: string; }; -const mapStateToProps = (state: RootState, { taskSid }: OwnProps) => { +const mapStateToProps = (state: RootState, { taskSid, pageSize, page }: OwnProps) => { const { connectedCase } = selectCurrentRouteCaseState(state, taskSid) ?? {}; return { - timelineActivities: connectedCase ? selectCaseActivities(state, connectedCase.id) : [], + timelineActivities: connectedCase ? selectCaseActivities(state, connectedCase.id, pageSize, page) : [], connectedCase, }; }; @@ -79,6 +82,7 @@ const Timeline: React.FC = ({ openViewCaseSectionModal, openAddCaseSectionModal, connectedCase, + titleCode = 'Case-TimelineSection', }) => { const [mockedMessage, setMockedMessage] = useState(null); @@ -127,7 +131,7 @@ const Timeline: React.FC = ({ -