diff --git a/RN-UI-LIB b/RN-UI-LIB index ba1b0da6..08b924ba 160000 --- a/RN-UI-LIB +++ b/RN-UI-LIB @@ -1 +1 @@ -Subproject commit ba1b0da69a3144126f1235ab62d289d4f2ccbc30 +Subproject commit 08b924ba18f528476ac72bbec513c27c95dfc2d7 diff --git a/android/app/build.gradle b/android/app/build.gradle index d5b63239..1809c583 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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() diff --git a/src/action/dataActions.ts b/src/action/dataActions.ts index 17aef3e7..18e472b0 100644 --- a/src/action/dataActions.ts +++ b/src/action/dataActions.ts @@ -35,7 +35,6 @@ export const getAllCases = export const getAllCaseDetails = (data: Array) => (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)); }); }; diff --git a/src/components/form/components/CheckboxGroup.tsx b/src/components/form/components/CheckboxGroup.tsx index d51813ef..6dc69c14 100644 --- a/src/components/form/components/CheckboxGroup.tsx +++ b/src/components/form/components/CheckboxGroup.tsx @@ -87,7 +87,6 @@ const CheckBoxGroup: React.FC = props => { required: question.type === 'mandatory', }} render={({field: {onChange, value}}) => { - console.log(value); return ( @@ -100,7 +99,7 @@ const CheckBoxGroup: React.FC = props => { }} name={`widgetContext.${widgetId}.sectionContext.${props.sectionId}.questionContext.${questionId}`} /> - + {associatedQuestions?.map((nextQuestion: string, index) => { if ( template.questions[ diff --git a/src/components/form/components/Dropdown.tsx b/src/components/form/components/Dropdown.tsx index c5506396..4319de18 100644 --- a/src/components/form/components/Dropdown.tsx +++ b/src/components/form/components/Dropdown.tsx @@ -84,6 +84,7 @@ const DropDown: React.FC = props => { handleChange(change, onChange)} + placeholder={question.metadata?.placeholder} value={value?.answer}> {question.options.map( (option: keyof typeof options) => { diff --git a/src/components/form/components/ImageUpload.tsx b/src/components/form/components/ImageUpload.tsx index 0c77b6bd..1cecb41f 100644 --- a/src/components/form/components/ImageUpload.tsx +++ b/src/components/form/components/ImageUpload.tsx @@ -63,7 +63,6 @@ const ImageUpload: React.FC = props => { }); }; - console.log(image) return ( diff --git a/src/components/form/components/Rating.tsx b/src/components/form/components/Rating.tsx index 42ae1bf8..568e9f2a 100644 --- a/src/components/form/components/Rating.tsx +++ b/src/components/form/components/Rating.tsx @@ -59,7 +59,7 @@ const Rating: React.FC = props => { )} name={`widgetContext.${widgetId}.sectionContext.${props.sectionId}.questionContext.${questionId}`} /> - + ); }; diff --git a/src/components/form/components/TextInput.tsx b/src/components/form/components/TextInput.tsx index 7378fe97..396d4dbf 100644 --- a/src/components/form/components/TextInput.tsx +++ b/src/components/form/components/TextInput.tsx @@ -54,6 +54,7 @@ const TextInput: React.FC = props => { onChangeText={(text) => handleChange(text, onChange)} value={value?.answer} containerStyle={[GenericStyles.mt12]} + placeholder={'Enter here'} /> )} name={`widgetContext.${widgetId}.sectionContext.${props.sectionId}.questionContext.${questionId}`} diff --git a/src/components/form/index.tsx b/src/components/form/index.tsx index 2e4b994e..16cd3661 100644 --- a/src/components/form/index.tsx +++ b/src/components/form/index.tsx @@ -66,13 +66,11 @@ const Widget: React.FC = 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 = 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 = 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 = 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 = 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 = props => { }; const onSubmit = (data: any) => { - console.log(data, 'submit'); dispatch( updateInteraction({ caseId, @@ -198,16 +182,11 @@ const Widget: React.FC = 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( diff --git a/src/components/screens/allCases/allCasesFilters/FiltersContainer.tsx b/src/components/screens/allCases/allCasesFilters/FiltersContainer.tsx index 89434771..66245732 100644 --- a/src/components/screens/allCases/allCasesFilters/FiltersContainer.tsx +++ b/src/components/screens/allCases/allCasesFilters/FiltersContainer.tsx @@ -187,7 +187,6 @@ const FiltersContainer: React.FC = 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( diff --git a/src/components/utlis/parsers.ts b/src/components/utlis/parsers.ts index 30c9fd88..8b40e8c3 100644 --- a/src/components/utlis/parsers.ts +++ b/src/components/utlis/parsers.ts @@ -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; } diff --git a/src/constants/config.js b/src/constants/config.js index 05fc6ba1..39392cd3 100644 --- a/src/constants/config.js +++ b/src/constants/config.js @@ -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'; \ No newline at end of file diff --git a/src/data/RealTemplateData.json b/src/data/RealTemplateData.json index c7de5d1e..49cff445 100644 --- a/src/data/RealTemplateData.json +++ b/src/data/RealTemplateData.json @@ -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", diff --git a/src/hooks/useFirestoreUpdates.ts b/src/hooks/useFirestoreUpdates.ts index 9ca0e924..6a85512a 100644 --- a/src/hooks/useFirestoreUpdates.ts +++ b/src/hooks/useFirestoreUpdates.ts @@ -76,7 +76,6 @@ const useFirestoreUpdates = () => { auth() .signInWithCustomToken(sessionDetails?.firebaseToken) .then(userCredential => { - console.log('user....', userCredential.user); casesSubscriber = subscribeToCases(); }) .catch(error => { diff --git a/src/reducer/allCasesSlice.ts b/src/reducer/allCasesSlice.ts index a21413cf..4b74f516 100644 --- a/src/reducer/allCasesSlice.ts +++ b/src/reducer/allCasesSlice.ts @@ -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) => { diff --git a/src/reducer/caseReducre.ts b/src/reducer/caseReducre.ts index 1745c4a0..e664d6bb 100644 --- a/src/reducer/caseReducre.ts +++ b/src/reducer/caseReducre.ts @@ -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; diff --git a/src/screens/allCases/CaseItemAvatar.tsx b/src/screens/allCases/CaseItemAvatar.tsx index 7f0a615f..1237d316 100644 --- a/src/screens/allCases/CaseItemAvatar.tsx +++ b/src/screens/allCases/CaseItemAvatar.tsx @@ -20,7 +20,6 @@ const CaseItemAvatar: React.FC = ({ const caseDetails: CaseDetail = useAppSelector( state => state.allCases.caseDetails?.[caseReferenceId], ); - console.log(caseDetails, "avatar") if (caseSelected) { return ; } diff --git a/src/screens/allCases/ListItem.tsx b/src/screens/allCases/ListItem.tsx index 520f46f4..cd49a9d9 100644 --- a/src/screens/allCases/ListItem.tsx +++ b/src/screens/allCases/ListItem.tsx @@ -42,7 +42,6 @@ const ListItem: React.FC = props => { const detail = caseDetails[caseId]; - console.log(detail, caseDetails, 'inside list item'); const handleAvatarClick = () => { if (isTodoItem || caseData.caseStatus === CaseStatuses.CLOSED) { diff --git a/src/screens/caseDetails/UserDetailsSection.tsx b/src/screens/caseDetails/UserDetailsSection.tsx index 64f6de8f..16c67c88 100644 --- a/src/screens/caseDetails/UserDetailsSection.tsx +++ b/src/screens/caseDetails/UserDetailsSection.tsx @@ -34,7 +34,6 @@ const UserDetailsSection: React.FC = props => { const {caseDetail = {} as CaseDetail} = props; const {customerInfo, loanDetails} = caseDetail; - console.log(customerInfo) const disbursalDate = dateFormat( new Date(loanDetails?.disbursalDate), 'DD MMM, YYYY', diff --git a/src/screens/caseDetails/interactionsHandler.tsx b/src/screens/caseDetails/interactionsHandler.tsx index 534b391f..598ddc70 100644 --- a/src/screens/caseDetails/interactionsHandler.tsx +++ b/src/screens/caseDetails/interactionsHandler.tsx @@ -12,9 +12,7 @@ const interactionsHandler = () => { useEffect(() => { let notSyncedCases: Array = []; _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 }) diff --git a/src/screens/caseDetails/journeyStepper/TaskContent.tsx b/src/screens/caseDetails/journeyStepper/TaskContent.tsx index f9c6f917..92af3f32 100644 --- a/src/screens/caseDetails/journeyStepper/TaskContent.tsx +++ b/src/screens/caseDetails/journeyStepper/TaskContent.tsx @@ -30,7 +30,7 @@ const TaskContent = ({ )} - {geolocationUrl && ( + {!!geolocationUrl && (