From e3e5c31c579cf00ed12ddff6a414ff0fda9b51b9 Mon Sep 17 00:00:00 2001 From: Mantri Ramkishor Date: Mon, 6 Jan 2025 13:58:01 +0530 Subject: [PATCH] NTP-23488 | Feedback from refactor double scrollview (#1049) --- android/app/build.gradle | 4 +- package.json | 4 +- src/action/dataActions.ts | 3 ++ src/common/Constants.ts | 4 ++ src/components/form/Submit.tsx | 82 +++++++++++++++++----------------- src/components/form/index.tsx | 65 +++++++++++++-------------- 6 files changed, 82 insertions(+), 80 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 63d9efe3..7433ba7a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -113,8 +113,8 @@ def jscFlavor = 'org.webkit:android-jsc:+' def enableHermes = project.ext.react.get("enableHermes", false); -def VERSION_CODE = 228 -def VERSION_NAME = "2.16.5" +def VERSION_CODE = 229 +def VERSION_NAME = "2.16.6" android { namespace "com.avapp" diff --git a/package.json b/package.json index 57a0a009..c938ea87 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "AV_APP", - "version": "2.16.5", - "buildNumber": "228", + "version": "2.16.6", + "buildNumber": "229", "private": true, "scripts": { "android:dev": "yarn move:dev && react-native run-android", diff --git a/src/action/dataActions.ts b/src/action/dataActions.ts index ad044591..ea864184 100644 --- a/src/action/dataActions.ts +++ b/src/action/dataActions.ts @@ -94,6 +94,9 @@ export const syncCaseDetail = .then((res) => { const caseType = payload.caseType; const interactionId = res.data?.referenceId; + addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_FEEDBACK_SUCCESS, { + data: res?.data, + }); dispatch( updateSingleCase({ data: res.data, diff --git a/src/common/Constants.ts b/src/common/Constants.ts index 68101d9b..9c2a81d2 100644 --- a/src/common/Constants.ts +++ b/src/common/Constants.ts @@ -1345,6 +1345,10 @@ export const CLICKSTREAM_EVENT_NAMES = { name: 'FA_UNSYNC_FEEDBACK_CAPTURE_SUCCESS', description: 'Feedback capture success' }, + FA_FEEDBACK_SUCCESS: { + name: 'FA_FEEDBACK_SUCCESS', + description: 'Feedback capture success' + }, FA_ORIGINAL_IMAGE_UPLOADING: { name: 'FA_ORIGINAL_IMAGE_UPLOADING', description: 'Original image uploading' diff --git a/src/components/form/Submit.tsx b/src/components/form/Submit.tsx index 6f5458e0..ab2e4c26 100644 --- a/src/components/form/Submit.tsx +++ b/src/components/form/Submit.tsx @@ -74,49 +74,47 @@ const Submit: React.FC = (props) => { }, []); return ( - - - - {verifiedVisitedWidgets?.map((visited) => { - const sectionsArray = templateData?.widget?.[visited]?.sections; + + + {verifiedVisitedWidgets?.map((visited) => { + const sectionsArray = templateData?.widget?.[visited]?.sections; - return ( - - {sectionsArray?.map((section: string) => ( - - {sections?.[section]?.questions?.map((question: string) => { - const answer = - data?.widgetContext?.[visited]?.sectionContext?.[section]?.questionContext?.[ - question - ]; - return answer ? ( - - {questions[question].text} - - - - ) : ( - <> - ); - })} - - ))} - - ); - })} - - - + return ( + + {sectionsArray?.map((section: string) => ( + + {sections?.[section]?.questions?.map((question: string) => { + const answer = + data?.widgetContext?.[visited]?.sectionContext?.[section]?.questionContext?.[ + question + ]; + return answer ? ( + + {questions[question].text} + + + + ) : ( + <> + ); + })} + + ))} + + ); + })} + + ); }; diff --git a/src/components/form/index.tsx b/src/components/form/index.tsx index a784effb..a453b7f4 100644 --- a/src/components/form/index.tsx +++ b/src/components/form/index.tsx @@ -423,39 +423,36 @@ const Widget: React.FC = (props) => { icon={Icon.close} onBack={handleCloseIconPress} /> - - {name === CommonCaseWidgetId.END ? ( - - ) : ( - <> - {sections?.map((section: any, index: number) => { - return ( - - - - ); - })} - - )} - + {name === CommonCaseWidgetId.END ? ( + + ) : ( + + {sections?.map((section: any, index: number) => { + return ( + + + + ); + })} + + )} = (props) => { style={[styles.autoFlex, styles.mH16]} title={isLeaf ? 'Submit' : 'Next'} showLoader={isLeaf && isSubmitting} - disabled={(isLeaf && isSubmitting)} + disabled={isLeaf && isSubmitting} onPress={ isLeaf ? handleSubmit(submitJourneyWithGeoLocation, onError)