changes
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
import React, {useEffect} from 'react';
|
||||
import {View} from 'react-native';
|
||||
import React, { useEffect } from 'react';
|
||||
import { View } from 'react-native';
|
||||
|
||||
import {useState} from 'react';
|
||||
import {Control, Controller} from 'react-hook-form';
|
||||
import {useSelector} from 'react-redux';
|
||||
import { useState } from 'react';
|
||||
import { Control, Controller } from 'react-hook-form';
|
||||
import { useSelector } from 'react-redux';
|
||||
import RNCheckboxGroup from '../../../../RN-UI-LIB/src/components/chechbox/CheckboxGroup';
|
||||
import {ICheckboxOption} from '../../../../RN-UI-LIB/src/components/chechbox/types';
|
||||
import Text from '../../../../RN-UI-LIB/src/components/Text';
|
||||
import {GenericStyles} from '../../../../RN-UI-LIB/src/styles';
|
||||
import {RootState} from '../../../store/store';
|
||||
import {AnswerType} from '../interface';
|
||||
import { GenericStyles } from '../../../../RN-UI-LIB/src/styles';
|
||||
import { useAppSelector } from '../../../hooks';
|
||||
import { RootState } from '../../../store/store';
|
||||
import { AnswerType } from '../interface';
|
||||
import QuestionRenderingEngine from '../QuestionRenderingEngine';
|
||||
import ErrorMessage from './ErrorMessage';
|
||||
import {useAppSelector } from '../../../hooks';
|
||||
|
||||
interface ICheckBoxGroup {
|
||||
questionType: string;
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
updateInteraction,
|
||||
} from '../../reducer/caseReducre';
|
||||
import {RootState} from '../../store/store';
|
||||
import {goBack, navigateToScreen} from '../utlis/navigationUtlis';
|
||||
import {goBack, navigateToScreen, popToScreen, pushToScreen} from '../utlis/navigationUtlis';
|
||||
import {ConditionType, IDecision, ILeaf} from './interface';
|
||||
import RenderQuestion from './RenderQuestion';
|
||||
|
||||
@@ -58,7 +58,10 @@ const Widget: React.FC<IWidget> = props => {
|
||||
console.log(journeyData);
|
||||
|
||||
const {control, handleSubmit} = useForm({
|
||||
defaultValues: dataToBeValidated,
|
||||
defaultValues: {
|
||||
...dataToBeValidated,
|
||||
externalAllocationId: caseData.currentExternalAllocationId
|
||||
},
|
||||
});
|
||||
|
||||
const evaluateLeaf = (leaf: ILeaf, data: any): boolean => {
|
||||
@@ -216,7 +219,7 @@ const Widget: React.FC<IWidget> = props => {
|
||||
paddingHorizontal: 16,
|
||||
}}>
|
||||
<View style={[GenericStyles.row]}>
|
||||
<Pressable onPress={() => navigateToScreen('Home')}>
|
||||
<Pressable onPress={() => pushToScreen('Home')}>
|
||||
<CloseIcon color="#ffffff" />
|
||||
</Pressable>
|
||||
<View style={{marginLeft: 16}}>
|
||||
|
||||
@@ -236,8 +236,8 @@
|
||||
},
|
||||
"q9": {
|
||||
"text": "Type of industry customer works in",
|
||||
"type": "mandatory",
|
||||
"inputType": "Dropdown",
|
||||
"type": "notMandatory",
|
||||
"options": [
|
||||
"o38",
|
||||
"o40",
|
||||
@@ -343,7 +343,7 @@
|
||||
"o34"
|
||||
],
|
||||
"metadata": {
|
||||
"buttonType": "radio",
|
||||
"buttonType": "button",
|
||||
"orientation": "verticle"
|
||||
}
|
||||
},
|
||||
@@ -358,7 +358,7 @@
|
||||
"o34"
|
||||
],
|
||||
"metadata": {
|
||||
"buttonType": "radio",
|
||||
"buttonType": "button",
|
||||
"orientation": "verticle"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useEffect} from 'react';
|
||||
import React, {useEffect, useMemo} from 'react';
|
||||
import {Pressable, StyleSheet, View} from 'react-native';
|
||||
import Heading from '../../../RN-UI-LIB/src/components/Heading';
|
||||
import Tabs from '../../../RN-UI-LIB/src/components/tabs/Tabs';
|
||||
@@ -59,7 +59,7 @@ const AllCasesMain = () => {
|
||||
caseData.caseStatus === CaseStatuses.CLOSED,
|
||||
);
|
||||
const dispatch = useAppDispatch();
|
||||
const tabItems = [
|
||||
const tabItems = useMemo(() => [
|
||||
{
|
||||
key: 'first',
|
||||
title: `Pending (${casesList.length - completed.length})`,
|
||||
@@ -70,7 +70,7 @@ const AllCasesMain = () => {
|
||||
title: `Completed (${completed.length})`,
|
||||
content: ComplatedCase,
|
||||
},
|
||||
];
|
||||
], [casesList]);
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(getAllCases());
|
||||
|
||||
@@ -16,11 +16,11 @@ const interactionsHandler = () => {
|
||||
if(!allCasesDetails[el].isSynced){
|
||||
console.log("inside array", notSyncedCases)
|
||||
const caseId = allCasesDetails[el].id
|
||||
const externalAllocationId = allCasesDetails[el].currentExternalAllocationId
|
||||
notSyncedCases.push({...allCasesDetails[el], caseId, externalAllocationId })
|
||||
notSyncedCases.push({...allCasesDetails[el], caseId })
|
||||
}
|
||||
})
|
||||
_map(notSyncedCases,(caseItem)=> dispatch(syncCaseDetail(caseItem)))
|
||||
console.log(notSyncedCases)
|
||||
// _map(notSyncedCases,(caseItem)=> dispatch(syncCaseDetail(caseItem)))
|
||||
}, [allCasesDetails])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user