From 30c1a4ee6fa8cd103d8bfb38e9bfedaf7a287f7d Mon Sep 17 00:00:00 2001 From: yashmantri Date: Wed, 28 Aug 2024 13:15:58 +0530 Subject: [PATCH] TP-79857 | Allocation on geolocation --- src/components/form/components/GeolocationAddress.tsx | 2 +- src/screens/addressGeolocation/constant.ts | 1 + src/screens/addressGeolocation/index.tsx | 8 +++++++- src/screens/caseDetails/ViewAddressSection.tsx | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/form/components/GeolocationAddress.tsx b/src/components/form/components/GeolocationAddress.tsx index c5767541..e8d02887 100644 --- a/src/components/form/components/GeolocationAddress.tsx +++ b/src/components/form/components/GeolocationAddress.tsx @@ -204,7 +204,7 @@ const GeolocationAddress: React.FC = ({ {showSimilarGeolocationsCTA ? : null} - + Address sus wdgwud wdvwhdgw gduwygd uwgd wgdw dgw udw udgu wgd uwd wdgwuduw dwydgw {!isFeedbackView ? ( {isFeedbackPresent ? ( diff --git a/src/screens/addressGeolocation/constant.ts b/src/screens/addressGeolocation/constant.ts index ebd82fbf..6d4b3315 100644 --- a/src/screens/addressGeolocation/constant.ts +++ b/src/screens/addressGeolocation/constant.ts @@ -41,6 +41,7 @@ export interface IAddressGeolocation { loanAccountNumber: string; customerReferenceId: string; caseId: string; + tab: AddressGeolocationTabEnum; }; }; } diff --git a/src/screens/addressGeolocation/index.tsx b/src/screens/addressGeolocation/index.tsx index c75dfcf1..ee1ebf63 100644 --- a/src/screens/addressGeolocation/index.tsx +++ b/src/screens/addressGeolocation/index.tsx @@ -39,7 +39,7 @@ const PAGE_TITLE = 'All addresses'; const AddressGeolocation: React.FC = ({ route: routeParams }) => { const { - params: { loanAccountNumber, customerReferenceId, caseId }, + params: { loanAccountNumber, customerReferenceId, caseId, tab = AddressGeolocationTabEnum.ADDRESS }, } = routeParams; const { addressGeolocation, isLoading } = useAppSelector((state: RootState) => ({ @@ -96,6 +96,12 @@ const AddressGeolocation: React.FC = ({ route: routeParams dispatch(getUngroupedAddress(loanAccountNumber)); }, []); + useEffect(() => { + if (tab) { + setSelectedTab(tab); + } + }, [tab]); + const handleTabChange = (tab: string) => { if (tab !== selectedTab) { if (tab === AddressGeolocationTabEnum.GEOLOCATION) { diff --git a/src/screens/caseDetails/ViewAddressSection.tsx b/src/screens/caseDetails/ViewAddressSection.tsx index 1dc37a8a..44c95efb 100644 --- a/src/screens/caseDetails/ViewAddressSection.tsx +++ b/src/screens/caseDetails/ViewAddressSection.tsx @@ -11,6 +11,7 @@ import { RootState } from '@store'; import React from 'react'; import { StyleSheet, View } from 'react-native'; import { CaseDetailStackEnum } from './CaseDetailStack'; +import { AddressGeolocationTabEnum } from '@screens/addressGeolocation/constant'; interface IViewAddressSection { caseId: string; @@ -28,6 +29,7 @@ const ViewAddressSection = ({ caseId }: IViewAddressSection) => { loanAccountNumber, customerReferenceId, caseId, + tab: AddressGeolocationTabEnum.GEOLOCATION }; navigateToScreen(CaseDetailStackEnum.ADDRESS_GEO, commonParams); };