NTP-67246 | Pulkit | Address validation api (#1186)

This commit is contained in:
Pulkit Barwal
2025-06-02 17:47:18 +05:30
committed by GitHub
parent ee67a615ea
commit 9ef129f749
4 changed files with 12 additions and 1 deletions

View File

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

View File

@@ -9,9 +9,10 @@ import { GenericStyles, getShadowStyle } from '@rn-ui-lib/styles';
import { getGoogleMapUrl, getGoogleMapUrlForAddressText } from '@components/utlis/commonFunctions';
import { addClickstreamEvent } from '@services/clickstreamEventService';
import { CLICKSTREAM_EVENT_NAMES } from '@common/Constants';
import Tag, { TagVariant } from '@rn-ui-lib/components/Tag';
const OpenMapOptionsPopUp = (props: IOpenMapOptionsPopUpProps) => {
const { latitude, longitude, addressString } = props;
const { latitude, longitude, addressString, isGeoCoordinatesReliable } = props;
const handleSearchByGeolocation = () => {
const mapUrl = getGoogleMapUrl(latitude, longitude);
@@ -38,6 +39,9 @@ const OpenMapOptionsPopUp = (props: IOpenMapOptionsPopUpProps) => {
<Text style={styles.buttonColor}>{`Open location (${latitude?.toFixed(
3
)}, ${longitude?.toFixed(3)})`}</Text>
{isGeoCoordinatesReliable && (
<Tag text="Recommended" variant={TagVariant.success} style={styles.tagStyle} />
)}
</TouchableOpacity>
<View style={styles.line} />
<TouchableOpacity
@@ -74,6 +78,10 @@ const styles = StyleSheet.create({
marginBottom: 6,
},
buttonColor: { color: COLORS.TEXT.BLUE },
tagStyle: {
marginLeft: 8,
marginTop: 2,
},
});
export default OpenMapOptionsPopUp;

View File

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

View File

@@ -35,6 +35,7 @@ export interface ILocationData {
relatedLocationIds: string[];
latestFeedback: ILatestFeedback;
locationSubType: string;
isGeoCoordinatesReliable: boolean;
}
export interface ILocationDetails {