From 1bb6e2c01cd895cda243121a9685e3e90508949d Mon Sep 17 00:00:00 2001 From: Aman Chaturvedi Date: Fri, 31 Mar 2023 15:13:59 +0530 Subject: [PATCH] TP-22961 | Bottom sheet fix, collection completed case (#195) --- src/components/form/components/Dropdown.tsx | 11 ++++++++++- src/screens/allCases/constants.ts | 4 +--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/form/components/Dropdown.tsx b/src/components/form/components/Dropdown.tsx index 6824c833..1b70f970 100644 --- a/src/components/form/components/Dropdown.tsx +++ b/src/components/form/components/Dropdown.tsx @@ -15,6 +15,7 @@ import { addClickstreamEvent } from '../../../services/clickstreamEventService'; import { CLICKSTREAM_EVENT_NAMES } from '../../../common/Constants'; import { isQuestionMandatory, validateInput } from "../services/validation.service"; import { CaseAllocationType } from "../../../screens/allCases/interface"; +import { getDynamicBottomSheetHeightPercentageFn } from '../../utlis/commonFunctions'; interface IDropDown { questionType: string; @@ -27,6 +28,9 @@ interface IDropDown { error: any; } +const HEADER_HEIGHT = 100; +const ROW_HEIGHT = 50; + const DropDown: React.FC = props => { const {questionId, widgetId, journeyId, caseId, sectionId, error, questionType} = props; const caseType = useAppSelector(state => state.allCases.caseDetails[caseId]?.caseType || CaseAllocationType.ADDRESS_VERIFICATION_CASE) @@ -73,6 +77,11 @@ const DropDown: React.FC = props => { }); }; + const getBottomSheetHeight = getDynamicBottomSheetHeightPercentageFn( + HEADER_HEIGHT, + ROW_HEIGHT, + ); + return ( @@ -87,7 +96,7 @@ const DropDown: React.FC = props => { render={({field: {onChange, value}}) => ( handleChange(change, onChange)} placeholder={question.metadata?.placeholder} value={value?.answer}> diff --git a/src/screens/allCases/constants.ts b/src/screens/allCases/constants.ts index 819797ee..75c3fa5e 100644 --- a/src/screens/allCases/constants.ts +++ b/src/screens/allCases/constants.ts @@ -1,8 +1,6 @@ import { CaseTypes } from './interface'; -export const COMPLETED_STATUSES = ['CLOSED', 'EXPIRED', 'FORCED_CLOSE']; - -export const COMPLETED_COLLECTION_STATUSES = ['COMPLETED']; +export const COMPLETED_STATUSES = ['CLOSED', 'EXPIRED', 'FORCED_CLOSE', 'ACTIVE_COMPLETED']; export const ListHeaderItems = { BANNER: {