TP-22961 | Bottom sheet fix, collection completed case (#195)
This commit is contained in:
committed by
GitHub Enterprise
parent
262c8c5872
commit
1bb6e2c01c
@@ -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<IDropDown> = 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<IDropDown> = props => {
|
||||
});
|
||||
};
|
||||
|
||||
const getBottomSheetHeight = getDynamicBottomSheetHeightPercentageFn(
|
||||
HEADER_HEIGHT,
|
||||
ROW_HEIGHT,
|
||||
);
|
||||
|
||||
return (
|
||||
<View style={GenericStyles.mt12}>
|
||||
<Text dark bold style={GenericStyles.mb12}>
|
||||
@@ -87,7 +96,7 @@ const DropDown: React.FC<IDropDown> = props => {
|
||||
render={({field: {onChange, value}}) => (
|
||||
<RNDropDown
|
||||
header={question.metadata?.placeholder}
|
||||
bottomSheetHeight={question.options.length - 1 * 10}
|
||||
bottomSheetHeight={getBottomSheetHeight(question.options.length)}
|
||||
onValueChange={change => handleChange(change, onChange)}
|
||||
placeholder={question.metadata?.placeholder}
|
||||
value={value?.answer}>
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user