NTP-71625| added attributes in clickstreams

This commit is contained in:
aishwarya.srivastava
2025-06-11 15:00:31 +05:30
parent 43aee5c515
commit c0952b1f7e
5 changed files with 18 additions and 4 deletions

View File

@@ -132,6 +132,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
latitude={caseDetails?.addressLocation?.latitude}
longitude={caseDetails?.addressLocation?.longitude}
addressString={caseDetails?.addressString}
caseId={caseId}
/>
</Tooltip>
</View>

View File

@@ -123,6 +123,7 @@ const AddressItemHeader = (props: ITopAddressItemHeader) => {
longitude={locationDetails?.longitude}
addressString={locationDetails?.addressText}
isGeoCoordinatesReliable={locationDetails?.isGeoCoordinatesReliable}
caseId={caseId}
/>
</Tooltip>
</View>

View File

@@ -10,20 +10,30 @@ import { getGoogleMapUrl, getGoogleMapUrlForAddressText } from '@components/utli
import { addClickstreamEvent } from '@services/clickstreamEventService';
import { CLICKSTREAM_EVENT_NAMES } from '@common/Constants';
import Tag, { TagVariant } from '@rn-ui-lib/components/Tag';
import { useAppSelector } from '@hooks';
const OpenMapOptionsPopUp = (props: IOpenMapOptionsPopUpProps) => {
const { latitude, longitude, addressString, isGeoCoordinatesReliable } = props;
const { latitude, longitude, addressString, isGeoCoordinatesReliable, caseId } = props;
const caseDetails = useAppSelector((state) => state?.allCases?.caseDetails?.[caseId]);
const handleSearchByGeolocation = () => {
const mapUrl = getGoogleMapUrl(latitude, longitude);
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_LAT_LONG_OPTION_CLICKED, {});
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_LAT_LONG_OPTION_CLICKED, {
attempted_at_address: caseDetails?.addressReferenceId,
address_rank: caseDetails?.pinRank,
caseId
});
if (!mapUrl) return;
return Linking.openURL(mapUrl);
};
const handleSearchByAddressString = () => {
const mapUrl = getGoogleMapUrlForAddressText(addressString);
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_SEARCH_ADDRESS_OPTION_CLICKED, {});
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_SEARCH_ADDRESS_OPTION_CLICKED, {
attempted_at_address: caseDetails?.addressReferenceId,
address_rank: caseDetails?.pinRank,
caseId
});
if (!mapUrl) return;
return Linking.openURL(mapUrl);
};

View File

@@ -3,4 +3,5 @@ export interface IOpenMapOptionsPopUpProps {
longitude: number;
addressString: string;
isGeoCoordinatesReliable?: boolean;
caseId: string;
}

View File

@@ -109,6 +109,7 @@ const AllocatedAddressDetails = (props: IAllocatedAddressDetails) => {
latitude={addressLocation?.latitude}
longitude={addressLocation?.longitude}
addressString={addressString as string}
caseId={caseId}
/>
</Tooltip>
</View>