NTP-71625| added attributes in clickstreams
This commit is contained in:
@@ -132,6 +132,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
|
||||
latitude={caseDetails?.addressLocation?.latitude}
|
||||
longitude={caseDetails?.addressLocation?.longitude}
|
||||
addressString={caseDetails?.addressString}
|
||||
caseId={caseId}
|
||||
/>
|
||||
</Tooltip>
|
||||
</View>
|
||||
|
||||
@@ -123,6 +123,7 @@ const AddressItemHeader = (props: ITopAddressItemHeader) => {
|
||||
longitude={locationDetails?.longitude}
|
||||
addressString={locationDetails?.addressText}
|
||||
isGeoCoordinatesReliable={locationDetails?.isGeoCoordinatesReliable}
|
||||
caseId={caseId}
|
||||
/>
|
||||
</Tooltip>
|
||||
</View>
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -3,4 +3,5 @@ export interface IOpenMapOptionsPopUpProps {
|
||||
longitude: number;
|
||||
addressString: string;
|
||||
isGeoCoordinatesReliable?: boolean;
|
||||
caseId: string;
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ const AllocatedAddressDetails = (props: IAllocatedAddressDetails) => {
|
||||
latitude={addressLocation?.latitude}
|
||||
longitude={addressLocation?.longitude}
|
||||
addressString={addressString as string}
|
||||
caseId={caseId}
|
||||
/>
|
||||
</Tooltip>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user