Json temp changes || Aman Singh (#41)
* bug fix and json changes * bug fix and json changes
This commit is contained in:
committed by
GitHub Enterprise
parent
976f736a37
commit
6d11e91d2b
Submodule RN-UI-LIB updated: ba1b0da69a...08b924ba18
@@ -139,7 +139,7 @@ android {
|
||||
applicationId "com.avapp"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 11
|
||||
versionCode 15
|
||||
versionName "Address verification"
|
||||
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ export const getAllCases =
|
||||
|
||||
export const getAllCaseDetails =
|
||||
(data: Array<ICaseItem>) => (dispatch: AppDispatch) => {
|
||||
console.log('***************', data);
|
||||
const caseList = data.map(caseItem => caseItem?.caseReferenceId);
|
||||
const url = getApiUrl(ApiKeys.CASE_DETAIL);
|
||||
axiosInstance
|
||||
@@ -69,7 +68,6 @@ export const postPinnedList =
|
||||
(dispatch: AppDispatch) => {
|
||||
dispatch(setTodoListOffline(updatedCaseList));
|
||||
navigateToScreen('Home');
|
||||
console.log(pinnedCases);
|
||||
const payload = pinnedCases
|
||||
.map(caseItem => caseItem.caseReferenceId)
|
||||
.join('&pins=');
|
||||
@@ -85,7 +83,6 @@ export const postPinnedList =
|
||||
};
|
||||
|
||||
export const syncCaseDetail = (data: any) => (dispatch: AppDispatch) => {
|
||||
console.log(data, "sync case")
|
||||
dispatch(updateCaseDetailAfterApiCall({caseId: data.id}))
|
||||
const url = getApiUrl(ApiKeys.FEEDBACK);
|
||||
axiosInstance
|
||||
@@ -103,7 +100,6 @@ export const getFilters = () => (dispatch: AppDispatch) => {
|
||||
const url = getApiUrl(ApiKeys.FILTERS);
|
||||
dispatch(setLoading(true));
|
||||
axiosInstance.get(url).then(response => {
|
||||
console.log('filters', JSON.stringify(response.data));
|
||||
dispatch(setFilters(response.data));
|
||||
});
|
||||
};
|
||||
|
||||
@@ -87,7 +87,6 @@ const CheckBoxGroup: React.FC<ICheckBoxGroup> = props => {
|
||||
required: question.type === 'mandatory',
|
||||
}}
|
||||
render={({field: {onChange, value}}) => {
|
||||
console.log(value);
|
||||
return (
|
||||
<RNCheckboxGroup
|
||||
onSelectionChange={change =>
|
||||
@@ -100,7 +99,7 @@ const CheckBoxGroup: React.FC<ICheckBoxGroup> = props => {
|
||||
}}
|
||||
name={`widgetContext.${widgetId}.sectionContext.${props.sectionId}.questionContext.${questionId}`}
|
||||
/>
|
||||
<ErrorMessage show={error?.sectionContext?.[sectionId]?.questionContext?.[questionId]} />
|
||||
<ErrorMessage show={error?.widgetContext?.[widgetId]?.sectionContext?.[sectionId]?.questionContext?.[questionId]} />
|
||||
{associatedQuestions?.map((nextQuestion: string, index) => {
|
||||
if (
|
||||
template.questions[
|
||||
|
||||
@@ -84,6 +84,7 @@ const DropDown: React.FC<IDropDown> = props => {
|
||||
<RNDropDown
|
||||
bottomSheetHeight={question.options.length - 1 * 10}
|
||||
onValueChange={change => handleChange(change, onChange)}
|
||||
placeholder={question.metadata?.placeholder}
|
||||
value={value?.answer}>
|
||||
{question.options.map(
|
||||
(option: keyof typeof options) => {
|
||||
|
||||
@@ -63,7 +63,6 @@ const ImageUpload: React.FC<IImageUpload> = props => {
|
||||
});
|
||||
};
|
||||
|
||||
console.log(image)
|
||||
|
||||
return (
|
||||
<View style={[GenericStyles.mt12]}>
|
||||
|
||||
@@ -59,7 +59,7 @@ const Rating: React.FC<IRating> = props => {
|
||||
)}
|
||||
name={`widgetContext.${widgetId}.sectionContext.${props.sectionId}.questionContext.${questionId}`}
|
||||
/>
|
||||
<ErrorMessage show={error?.sectionContext?.[sectionId]?.questionContext?.[questionId]} />
|
||||
<ErrorMessage show={error?.widgetContext?.[widgetId]?.sectionContext?.[sectionId]?.questionContext?.[questionId]} />
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -54,6 +54,7 @@ const TextInput: React.FC<ITextInput> = props => {
|
||||
onChangeText={(text) => handleChange(text, onChange)}
|
||||
value={value?.answer}
|
||||
containerStyle={[GenericStyles.mt12]}
|
||||
placeholder={'Enter here'}
|
||||
/>
|
||||
)}
|
||||
name={`widgetContext.${widgetId}.sectionContext.${props.sectionId}.questionContext.${questionId}`}
|
||||
|
||||
@@ -66,13 +66,11 @@ const Widget: React.FC<IWidget> = props => {
|
||||
state => state.case.caseForm?.[caseId]?.[journey],
|
||||
);
|
||||
|
||||
console.log(dataToBeValidated);
|
||||
|
||||
const journeyData = useSelector(
|
||||
(state: RootState) => state.case.caseForm?.[caseId]?.[journey],
|
||||
);
|
||||
|
||||
console.log(journeyData);
|
||||
|
||||
const {control, handleSubmit} = useForm({
|
||||
defaultValues: {
|
||||
@@ -82,10 +80,6 @@ const Widget: React.FC<IWidget> = props => {
|
||||
});
|
||||
|
||||
const evaluateLeaf = (leaf: ILeaf, data: any): boolean => {
|
||||
console.log(
|
||||
leaf.operator,
|
||||
"leaf evaluate"
|
||||
);
|
||||
switch (leaf.operator) {
|
||||
case 'MATCHES':
|
||||
return (
|
||||
@@ -99,12 +93,6 @@ const Widget: React.FC<IWidget> = props => {
|
||||
};
|
||||
|
||||
const evaluateLeafJourney = (leaf: ILeaf): boolean => {
|
||||
console.log(
|
||||
leaf.operator,
|
||||
journeyData.widgetContext[leaf.widgetId]?.sectionContext?.[
|
||||
leaf.section
|
||||
]?.questionContext?.[leaf.left], "leaf journey"
|
||||
);
|
||||
switch (leaf.operator) {
|
||||
case 'MATCHES':
|
||||
return (
|
||||
@@ -119,7 +107,6 @@ const Widget: React.FC<IWidget> = props => {
|
||||
};
|
||||
|
||||
const evaluateComposite = (composite: IDecision, data: any): boolean => {
|
||||
console.log(data, composite, "composite")
|
||||
let left = false,
|
||||
right = false;
|
||||
if (composite.left.conditionType === ConditionType.COMPOSITE) {
|
||||
@@ -144,12 +131,10 @@ const Widget: React.FC<IWidget> = props => {
|
||||
let nextScreenName = '';
|
||||
if (rules !== null) {
|
||||
if (rules.conditionType === 'LEAF_NODE') {
|
||||
console.log("in Leaf node")
|
||||
const answer = String(evaluateLeaf(rules, data));
|
||||
nextScreenName = actions[answer as keyof typeof actions];
|
||||
} else {
|
||||
const answer = String(evaluateComposite(rules, data));
|
||||
console.log("in composite node")
|
||||
nextScreenName = actions[answer as keyof typeof actions];
|
||||
}
|
||||
} else {
|
||||
@@ -162,7 +147,6 @@ const Widget: React.FC<IWidget> = props => {
|
||||
};
|
||||
|
||||
const onSubmit = (data: any) => {
|
||||
console.log(data, 'submit');
|
||||
dispatch(
|
||||
updateInteraction({
|
||||
caseId,
|
||||
@@ -198,16 +182,11 @@ const Widget: React.FC<IWidget> = props => {
|
||||
nextActions =
|
||||
screeenAction[String(evaluateLeafJourney(rules as ILeaf))];
|
||||
} else {
|
||||
console.log("evulate composite")
|
||||
const answer = String(evaluateComposite(rules as IDecision, data));
|
||||
nextActions = screeenAction[answer];
|
||||
}
|
||||
|
||||
console.log(nextActions, data);
|
||||
|
||||
if(nextActions?.metadata){
|
||||
console.log("metaData", nextActions?.metadata)
|
||||
}
|
||||
|
||||
// dispatch some actions to redux store
|
||||
dispatch(
|
||||
|
||||
@@ -187,7 +187,6 @@ const FiltersContainer: React.FC<FilterContainerProps> = props => {
|
||||
{keys: ['label']},
|
||||
).map(option => option.obj)
|
||||
: filters[selectedFilterKey].options;
|
||||
console.log('options..........', options);
|
||||
switch (filters[selectedFilterKey].selectionType) {
|
||||
case SELECTION_TYPES.MULTIPLE:
|
||||
// const options = filters[selectedFilterKey].options?.filter(
|
||||
|
||||
@@ -5,7 +5,6 @@ export const getObjectValueFromKeys: (
|
||||
if (keysArray.length && obj[keysArray[0]]) {
|
||||
return getObjectValueFromKeys(obj[keysArray[0]], keysArray.slice(1));
|
||||
} else if (obj) {
|
||||
console.log(obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const BASE_AV_APP_URL = 'https://dev-longhorn-portal.np.navi-tech.in/av';
|
||||
export const BASE_AV_APP_URL = 'https://dev-longhorn-server.np.navi-tech.in/av';
|
||||
export const SENTRY_DSN = 'https://877396e88a2b4f78b911016c64f9121a@glitchtip.cmd.navi-tech.in/155';
|
||||
@@ -43,7 +43,7 @@
|
||||
"operator": "MATCHES",
|
||||
"conditionType": "LEAF_NODE",
|
||||
"left": "q24",
|
||||
"right": "o3",
|
||||
"right": "o4",
|
||||
"section": "s12",
|
||||
"widgetId": "w7"
|
||||
},
|
||||
@@ -513,7 +513,7 @@
|
||||
"q9": {
|
||||
"text": "Type of industry customer works in",
|
||||
"inputType": "Dropdown",
|
||||
"type": "notMandatory",
|
||||
"type": "mandatory",
|
||||
"options": [
|
||||
"o38",
|
||||
"o40",
|
||||
@@ -521,7 +521,8 @@
|
||||
"o42"
|
||||
],
|
||||
"metadata": {
|
||||
"formattingType": "Dropdown"
|
||||
"formattingType": "Dropdown",
|
||||
"placeholder": "Select industry"
|
||||
}
|
||||
},
|
||||
"q10": {
|
||||
@@ -650,13 +651,13 @@
|
||||
"o47"
|
||||
],
|
||||
"metadata": {
|
||||
"buttonType": "radio",
|
||||
"buttonType": "button",
|
||||
"orientation": "vertical"
|
||||
}
|
||||
},
|
||||
"q19": {
|
||||
"text": "Language of interaction",
|
||||
"type": "notMandatory",
|
||||
"type": "mandatory",
|
||||
"inputType": "Dropdown",
|
||||
"options": [
|
||||
"o48",
|
||||
@@ -671,7 +672,8 @@
|
||||
],
|
||||
"metadata": {
|
||||
"buttonType": "radio",
|
||||
"orientation": "vertical"
|
||||
"orientation": "vertical",
|
||||
"placeholder": "Please select language"
|
||||
}
|
||||
},
|
||||
"q20": {
|
||||
@@ -692,7 +694,7 @@
|
||||
},
|
||||
"q24": {
|
||||
"text": "Is the permanent address same as communication address?",
|
||||
"type": "Mandatory",
|
||||
"type": "mandatory",
|
||||
"inputType": "RadioButton",
|
||||
"options": [
|
||||
"o3",
|
||||
@@ -708,7 +710,7 @@
|
||||
},
|
||||
"q25": {
|
||||
"text": "Is the permanent address within 5 kms as communication address?",
|
||||
"type": "Mandatory",
|
||||
"type": "mandatory",
|
||||
"inputType": "RadioButton",
|
||||
"options": [
|
||||
"o3",
|
||||
@@ -723,7 +725,7 @@
|
||||
},
|
||||
"q26": {
|
||||
"text": "Last geo location within 5 kms of your current location?",
|
||||
"type": "Mandatory",
|
||||
"type": "mandatory",
|
||||
"inputType": "RadioButton",
|
||||
"options": [
|
||||
"o3",
|
||||
@@ -738,7 +740,7 @@
|
||||
},
|
||||
"q27": {
|
||||
"text": "Mode of communication",
|
||||
"type": "Mandatory",
|
||||
"type": "mandatory",
|
||||
"inputType": "RadioButton",
|
||||
"options": [
|
||||
"o58",
|
||||
@@ -752,7 +754,7 @@
|
||||
},
|
||||
"q28": {
|
||||
"text": "Did the customer pick up the phone call?",
|
||||
"type": "Mandatory",
|
||||
"type": "mandatory",
|
||||
"inputType": "RadioButton",
|
||||
"options": [
|
||||
"o3",
|
||||
@@ -765,7 +767,7 @@
|
||||
},
|
||||
"q29": {
|
||||
"text": "Interaction status",
|
||||
"type": "Mandatory",
|
||||
"type": "mandatory",
|
||||
"inputType": "RadioButton",
|
||||
"options": [
|
||||
"o61",
|
||||
@@ -778,7 +780,7 @@
|
||||
},
|
||||
"q30": {
|
||||
"text": "Reason for change in address",
|
||||
"type": "Mandatory",
|
||||
"type": "mandatory",
|
||||
"inputType": "RadioButton",
|
||||
"options": [
|
||||
"o63",
|
||||
|
||||
@@ -76,7 +76,6 @@ const useFirestoreUpdates = () => {
|
||||
auth()
|
||||
.signInWithCustomToken(sessionDetails?.firebaseToken)
|
||||
.then(userCredential => {
|
||||
console.log('user....', userCredential.user);
|
||||
casesSubscriber = subscribeToCases();
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
@@ -225,7 +225,6 @@ const allCasesSlice = createSlice({
|
||||
const { caseUpdates } = action.payload as {
|
||||
caseUpdates: CaseUpdates[];
|
||||
};
|
||||
console.log('firestore case updates', caseUpdates);
|
||||
caseUpdates.forEach(({ updateType, updatedCaseDetail }) => {
|
||||
const {
|
||||
updatedAt,
|
||||
@@ -303,11 +302,12 @@ const allCasesSlice = createSlice({
|
||||
updateCaseDetail: (state, action) => {
|
||||
const { caseId, journeyId, answer, caseData, nextActions } =
|
||||
action.payload;
|
||||
// console.log(action.payload, caseData, 'payload');
|
||||
const updatedValue = { ...caseData };
|
||||
updatedValue.isSynced = false;
|
||||
updatedValue.isApiCalled = false;
|
||||
console.log("UPDATED value", updatedValue)
|
||||
if (!updatedValue.context || updatedValue.context === null) {
|
||||
console.log("inside first if")
|
||||
updatedValue.currentTask = updatedValue.tasks.find(
|
||||
task => task.taskType === nextActions.nextJourney,
|
||||
);
|
||||
@@ -323,6 +323,7 @@ const allCasesSlice = createSlice({
|
||||
},
|
||||
};
|
||||
} else if (updatedValue.context.taskContext?.[journeyId]) {
|
||||
console.log("inside second if")
|
||||
updatedValue.currentTask = updatedValue.tasks.find(
|
||||
task => task.taskType === nextActions.nextJourney,
|
||||
);
|
||||
@@ -336,6 +337,7 @@ const allCasesSlice = createSlice({
|
||||
updatedValue.context = {
|
||||
currentTask: nextActions.nextJourney,
|
||||
taskContext: {
|
||||
...updatedValue.context.taskContext,
|
||||
[journeyId]: journey,
|
||||
},
|
||||
};
|
||||
@@ -358,7 +360,6 @@ const allCasesSlice = createSlice({
|
||||
},
|
||||
});
|
||||
}
|
||||
// console.log(updatedValue, 'updated value');
|
||||
state.caseDetails[caseId] = updatedValue;
|
||||
},
|
||||
|
||||
@@ -394,12 +395,6 @@ const allCasesSlice = createSlice({
|
||||
state.newlyPinnedCases--;
|
||||
},
|
||||
filterData: (state, action) => {
|
||||
// console.log(action.payload, state.casesList);
|
||||
// console.log(
|
||||
// Search(action.payload, state.casesList, {
|
||||
// key: ['caseVerdict'],
|
||||
// }),
|
||||
// );
|
||||
},
|
||||
resetTodoList: state => {
|
||||
state.intermediateTodoListMap = {};
|
||||
@@ -430,10 +425,8 @@ const allCasesSlice = createSlice({
|
||||
},
|
||||
updateSingleCase: (state, action) => {
|
||||
const { data, id } = action.payload;
|
||||
// console.log(data);
|
||||
|
||||
if (data) {
|
||||
// console.log('is side data found');
|
||||
state.caseDetails[id] = {
|
||||
...data,
|
||||
currentTask: data.tasks.find(
|
||||
@@ -443,7 +436,6 @@ const allCasesSlice = createSlice({
|
||||
isApiCallMade: false
|
||||
};
|
||||
} else {
|
||||
// console.log('is side data notfound');
|
||||
state.caseDetails[id].isSynced = false;
|
||||
}
|
||||
},
|
||||
@@ -470,7 +462,6 @@ const allCasesSlice = createSlice({
|
||||
state.filterCount = filterCount;
|
||||
},
|
||||
setFilterList: (state, action) => {
|
||||
// console.log('filterList.....', action.payload);
|
||||
state.filterList = action.payload;
|
||||
},
|
||||
setSearchQuery: (state, action) => {
|
||||
|
||||
@@ -171,14 +171,12 @@ export const caseSlice = createSlice({
|
||||
},
|
||||
deleteInteraction: (state, action) => {
|
||||
const { caseId, journeyId, widgetId, answer } = action.payload;
|
||||
console.log({ caseId, journeyId, widgetId, answer });
|
||||
const data = state.caseForm;
|
||||
delete data[caseId][journeyId].widgetContext[widgetId];
|
||||
state.caseForm = data;
|
||||
},
|
||||
deleteJourney: (state, action) => {
|
||||
const { caseId, journeyId, widgetId, answer } = action.payload;
|
||||
console.log({ caseId, journeyId, widgetId, answer });
|
||||
const data = state.caseForm;
|
||||
delete data[caseId][journeyId];
|
||||
state.caseForm = data;
|
||||
|
||||
@@ -20,7 +20,6 @@ const CaseItemAvatar: React.FC<ICaseItemAvatar> = ({
|
||||
const caseDetails: CaseDetail = useAppSelector(
|
||||
state => state.allCases.caseDetails?.[caseReferenceId],
|
||||
);
|
||||
console.log(caseDetails, "avatar")
|
||||
if (caseSelected) {
|
||||
return <RoundCheckIcon />;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ const ListItem: React.FC<IListItem> = props => {
|
||||
|
||||
const detail = caseDetails[caseId];
|
||||
|
||||
console.log(detail, caseDetails, 'inside list item');
|
||||
|
||||
const handleAvatarClick = () => {
|
||||
if (isTodoItem || caseData.caseStatus === CaseStatuses.CLOSED) {
|
||||
|
||||
@@ -34,7 +34,6 @@ const UserDetailsSection: React.FC<IUserDetailsSection> = props => {
|
||||
const {caseDetail = {} as CaseDetail} = props;
|
||||
const {customerInfo, loanDetails} = caseDetail;
|
||||
|
||||
console.log(customerInfo)
|
||||
const disbursalDate = dateFormat(
|
||||
new Date(loanDetails?.disbursalDate),
|
||||
'DD MMM, YYYY',
|
||||
|
||||
@@ -12,9 +12,7 @@ const interactionsHandler = () => {
|
||||
useEffect(() => {
|
||||
let notSyncedCases: Array<any> = [];
|
||||
_map(allCasesDetails, (el)=> {
|
||||
console.log("interaction handler", allCasesDetails[el])
|
||||
if(allCasesDetails[el]?.isSynced === false && allCasesDetails[el].isApiCalled === false){
|
||||
console.log("inside array", notSyncedCases)
|
||||
const caseId = allCasesDetails[el].id
|
||||
const allocationReferenceId = allCasesDetails[el]?.currentAllocationReferenceId
|
||||
notSyncedCases.push({...allCasesDetails[el], caseId, allocationReferenceId })
|
||||
|
||||
@@ -30,7 +30,7 @@ const TaskContent = ({
|
||||
</Text>
|
||||
)}
|
||||
<View style={[GenericStyles.row , GenericStyles.mt12]}>
|
||||
{geolocationUrl && (
|
||||
{!!geolocationUrl && (
|
||||
<Button
|
||||
style={styles.geolocationBtn}
|
||||
variant="secondary"
|
||||
|
||||
@@ -44,7 +44,6 @@ interface ITaskStepper {
|
||||
|
||||
const TaskStepper: React.FC<ITaskStepper> = props => {
|
||||
const {caseDetail} = props;
|
||||
console.log(caseDetail);
|
||||
const [showPhoneNumberBottomSheet, setShowPhoneNumberBottomSheet] =
|
||||
React.useState(false);
|
||||
const [showCallingBottomSheet, setShowCallingBottomSheet] =
|
||||
@@ -134,7 +133,7 @@ const TaskStepper: React.FC<ITaskStepper> = props => {
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
{/* <Button
|
||||
<Button
|
||||
style={[styles.callCustomerButton]}
|
||||
title="Trigger journey"
|
||||
variant="secondary"
|
||||
@@ -167,7 +166,7 @@ const TaskStepper: React.FC<ITaskStepper> = props => {
|
||||
title="Trigger add new address"
|
||||
variant="secondary"
|
||||
onPress={() => navigateToScreen('w10', {caseId: caseDetail.id, journey: 'CALLING_TASK'})}
|
||||
/> */}
|
||||
/>
|
||||
{caseDetail.caseStatus !== CaseStatuses.CLOSED ||
|
||||
caseDetail.caseStatus !== CaseStatuses.FORCE_CLOSE ||
|
||||
(caseDetail.caseStatus !== CaseStatuses.EXPIRED && (
|
||||
|
||||
Reference in New Issue
Block a user