TP-54744 | Data Sutram GLs (#708)

This commit is contained in:
Shri Prakash Bajpai
2024-01-22 13:27:36 +05:30
committed by GitHub
parent 421e233067
commit acdc13c7ac

View File

@@ -1,6 +1,6 @@
import { Linking, StyleSheet, TouchableOpacity, View } from 'react-native';
import React, { useMemo } from 'react';
import { IGeolocation } from '../../../screens/caseDetails/interface';
import { GeolocationSource, IGeolocation } from '../../../screens/caseDetails/interface';
import { useAppDispatch, useAppSelector } from '../../../hooks';
import { getDistanceFromLatLonInKm, getGoogleMapUrl } from '../../utlis/commonFunctions';
import Text from '../../../../RN-UI-LIB/src/components/Text';
@@ -41,7 +41,7 @@ const GeolocationAddress: React.FC<IGeolocationAddress> = ({
isFeedbackView,
handlePageRouting,
}) => {
const { latitude, longitude, capturedTimestamp, tag, id } = address;
const { latitude, longitude, capturedTimestamp, tag, id, primarySource } = address;
const { deviceGeolocationCoordinate, prefilledAddressScreenTemplate } = useAppSelector(
(state) => ({
deviceGeolocationCoordinate: state.foregroundService?.deviceGeolocationCoordinate,
@@ -134,7 +134,7 @@ const GeolocationAddress: React.FC<IGeolocationAddress> = ({
{tag}
</Text>
{roundoffRelativeDistanceBwLatLong ? (
<Text>({roundoffRelativeDistanceBwLatLong}km away)</Text>
<Text>({roundoffRelativeDistanceBwLatLong} km away)</Text>
) : null}
</View>
<View style={GenericStyles.row}>
@@ -145,6 +145,12 @@ const GeolocationAddress: React.FC<IGeolocationAddress> = ({
<Text small>{addressTime}</Text>
</View>
) : null}
{(primarySource && primarySource === GeolocationSource.DATA_SUTRAM) ? (
<View style={[GenericStyles.row, GenericStyles.alignCenter]}>
<View style={styles.circleSeparator} />
<Text small>Skip Tracing</Text>
</View>
) : null}
</View>
{!isFeedbackView ? (
isFeedbackPresent ? (