NTP-58010 Customer outreach Open Map option (#1144)

This commit is contained in:
Shri Prakash Bajpai
2025-04-22 17:42:15 +05:30
committed by GitHub
parent 3eb2b00fba
commit 19624660ee
3 changed files with 13 additions and 10 deletions

View File

@@ -8,6 +8,7 @@ import { copyAddressToClipboard } from '@screens/addressGeolocation/utils/copyAd
import CopyOutlineIcon from '@assets/icons/CopyOutlineIcon';
import { addClickstreamEvent } from '@services/clickstreamEventService';
import { CLICKSTREAM_EVENT_NAMES } from '@common/Constants';
import { isGeolocation } from '../utils';
const AddressItemAddressString = (props: ITopAddressItemAddressString) => {
const { locationDetails, caseId } = props;
@@ -21,9 +22,6 @@ const AddressItemAddressString = (props: ITopAddressItemAddressString) => {
copyAddressToClipboard(addressText);
};
const isGeoLocation =
locationSubType === LocationType.GEO_LOCATION ||
locationSubType === LocationType.SKIP_TRACE_ADDRESS;
return (
<View style={styles.container}>
@@ -33,7 +31,7 @@ const AddressItemAddressString = (props: ITopAddressItemAddressString) => {
<View style={styles.fs1}>
<Text dark>
{addressText}
{!isGeoLocation && (
{!isGeolocation(locationSubType) && (
<Text>
{' '}
<Pressable

View File

@@ -12,6 +12,7 @@ import Button from '@rn-ui-lib/components/Button';
import MapDirectionIcon from '@assets/icons/MapDirectionIcon';
import { addClickstreamEvent } from '@services/clickstreamEventService';
import { CLICKSTREAM_EVENT_NAMES } from '@common/Constants';
import { isGeolocation } from '../utils';
const AddressItemHeader = (props: ITopAddressItemHeader) => {
const { locationDetails, isOtherAddressView, containerStyle, isCoachMarkVisible } = props;
@@ -29,10 +30,6 @@ const AddressItemHeader = (props: ITopAddressItemHeader) => {
return `${relativeDistanceFormatter(distance)} km`;
}, [deviceGeolocationCoordinate]);
const isGeoLocation =
locationSubType === LocationType.GEO_LOCATION ||
locationSubType === LocationType.SKIP_TRACE_ADDRESS;
const addressString = useMemo(() => {
return [pinCode, city].filter(Boolean).join(', ');
}, [pinCode, city]);
@@ -70,7 +67,7 @@ const AddressItemHeader = (props: ITopAddressItemHeader) => {
) : (
<TopAddressItemRankTag rank={rank} visited={visited} />
)}
{!isGeoLocation ? (
{!isGeolocation(locationSubType) ? (
<Text style={[GenericStyles.fw700, GenericStyles.fontSize12, GenericStyles.pr16]}>
{relativeDistanceBwLatLong}
</Text>

View File

@@ -2,7 +2,7 @@ import { CLICKSTREAM_EVENT_NAMES } from '@common/Constants';
import { getTemplateRoute, navigateToScreen } from '@components/utlis/navigationUtlis';
import { CaseDetailStackEnum } from '@screens/caseDetails/CaseDetailStack';
import { addClickstreamEvent } from '@services/clickstreamEventService';
import { INavigateToAddFeedbackScreen, IOpenOldFeedbacks } from './interfaces';
import { INavigateToAddFeedbackScreen, IOpenOldFeedbacks, LocationType } from './interfaces';
import { CaseAllocationType, TaskTitleUIMapping } from '@screens/allCases/interface';
import { getCollectionFeedbackOnAddressPreDefinedJourney } from '@components/utlis/addressGeolocationUtils';
import { updatePreDefinedCaseFormJourney } from '@reducers/caseReducer';
@@ -75,3 +75,11 @@ export const getFeedbackColors = (
: COLORS.BACKGROUND.LIGHT_RED_1,
};
};
export const isGeolocation = (locationSubType: string) => {
return (
locationSubType === LocationType.GEO_LOCATION ||
locationSubType === LocationType.SKIP_TRACE_ADDRESS ||
locationSubType === LocationType.CUSTOMER_OUTREACH_ADDRESS
);
}