From fe868978776cb899ac32a040090f22e02edbca25 Mon Sep 17 00:00:00 2001 From: "aishwarya.srivastava" Date: Wed, 19 Feb 2025 16:54:40 +0530 Subject: [PATCH] NTP-39327| adding address source for skip tracing --- .../addressGeolocation/AddressItem.tsx | 50 +++++++++++++++++-- .../SkipTracingAddressItem.tsx | 2 + 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/src/screens/addressGeolocation/AddressItem.tsx b/src/screens/addressGeolocation/AddressItem.tsx index 0b5150dd..1204c537 100644 --- a/src/screens/addressGeolocation/AddressItem.tsx +++ b/src/screens/addressGeolocation/AddressItem.tsx @@ -14,7 +14,10 @@ import { useAppDispatch, useAppSelector } from '../../hooks'; import Tag, { TagVariant } from '../../../RN-UI-LIB/src/components/Tag'; import { CaseAllocationType, TaskTitleUIMapping } from '../allCases/interface'; import { updatePreDefinedCaseFormJourney } from '../../reducer/caseReducer'; -import { getCollectionFeedbackOnAddressPreDefinedJourney, getCollectionFeedbackOnSkipTracingPreDefinedJourney } from '../../components/utlis/addressGeolocationUtils'; +import { + getCollectionFeedbackOnAddressPreDefinedJourney, + getCollectionFeedbackOnSkipTracingPreDefinedJourney, +} from '../../components/utlis/addressGeolocationUtils'; import { _map } from '../../../RN-UI-LIB/src/utlis/common'; import { getTemplateRoute, navigateToScreen } from '../../components/utlis/navigationUtlis'; import { type GenericFunctionArgs } from '../../common/GenericTypes'; @@ -42,6 +45,7 @@ interface IAddressItem { showOpenMap?: boolean; showCopy?: boolean; isSkipTracing?: boolean; + showAddressSource?: boolean; } function AddressItem({ @@ -60,6 +64,7 @@ function AddressItem({ showOpenMap = false, showCopy = true, isSkipTracing = false, + showAddressSource= false, }: IAddressItem) { const { currentGeolocationCoordinates, prefilledAddressScreenTemplate } = useAppSelector( (state) => ({ @@ -243,7 +248,33 @@ function AddressItem({ {sanitizeString(addressItem?.addressText)} - + {showAddressSource ? ( + + + {dayjs(addressItem?.createdAt).format('DD MMM, YYYY')} + + + + {addressItem?.secondarySource} + + + ) : null} {showActionButtons ? ( {showOpenMap ? ( @@ -257,8 +288,7 @@ function AddressItem({ Open map - ) : null - } + ) : null} {showCopy ? ( Copy - ): null} + ) : null} { }); } }; + const showAddressSource = !!(skipTracingAddress?.secondarySource && skipTracingAddress?.createdAt); return ( { showOpenMap={true} showCopy={false} isSkipTracing={true} + showAddressSource={showAddressSource} /> } onExpanded={(isExpanded) => {