TP-79857 | Allocation on geolocation

This commit is contained in:
yashmantri
2024-08-28 19:34:21 +05:30
parent 3909b61f28
commit 7628328575
5 changed files with 28 additions and 8 deletions

View File

@@ -204,9 +204,9 @@ const GeolocationAddress: React.FC<IGeolocationAddress> = ({
</View>
{showSimilarGeolocationsCTA ? <ArrowSolidIcon rotateY={180} /> : null}
</View>
{address?.sourceAddress ? (
{address?.addressString ? (
<Text dark ellipsizeMode="tail">
{address?.sourceAddress}
{address?.addressString}
</Text>
) : null}
{!isFeedbackView ? (

View File

@@ -35,6 +35,11 @@ export enum AddressGeolocationTabEnum {
GEOLOCATION = 'geolocation',
}
export enum AddressTabType {
META_ADDRESS = 'META_ADDRESS',
GEO_LOCATION = 'GEO_LOCATION',
}
export interface IAddressGeolocation {
route: {
params: {

View File

@@ -39,7 +39,12 @@ const PAGE_TITLE = 'All addresses';
const AddressGeolocation: React.FC<IAddressGeolocation> = ({ route: routeParams }) => {
const {
params: { loanAccountNumber, customerReferenceId, caseId, tab },
params: {
loanAccountNumber,
customerReferenceId,
caseId,
tab = AddressGeolocationTabEnum.ADDRESS,
},
} = routeParams;
const { addressGeolocation, isLoading } = useAppSelector((state: RootState) => ({

View File

@@ -11,7 +11,7 @@ import { RootState } from '@store';
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { CaseDetailStackEnum } from './CaseDetailStack';
import { AddressGeolocationTabEnum } from '@screens/addressGeolocation/constant';
import { AddressGeolocationTabEnum, AddressTabType } from '@screens/addressGeolocation/constant';
interface IViewAddressSection {
caseId: string;
@@ -19,7 +19,17 @@ interface IViewAddressSection {
const ViewAddressSection = ({ caseId }: IViewAddressSection) => {
const caseDetail = useAppSelector((state: RootState) => state.allCases.caseDetails[caseId]) || {};
const { addressString, loanAccountNumber, customerReferenceId, addressSourceText = AddressGeolocationTabEnum.ADDRESS } = caseDetail;
const { addressString, loanAccountNumber, customerReferenceId, addressStringType } = caseDetail;
const getTabName = () => {
if (addressStringType === AddressTabType.META_ADDRESS) {
return AddressGeolocationTabEnum.ADDRESS;
}
if (addressStringType === AddressTabType.GEO_LOCATION) {
return AddressGeolocationTabEnum.GEOLOCATION;
}
return AddressGeolocationTabEnum.ADDRESS;
};
const viewAllAddressHandler = () => {
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_VIEW_ADDRESSES_CLICKED, {
@@ -29,7 +39,7 @@ const ViewAddressSection = ({ caseId }: IViewAddressSection) => {
loanAccountNumber,
customerReferenceId,
caseId,
tab: addressSourceText
tab: getTabName(),
};
navigateToScreen(CaseDetailStackEnum.ADDRESS_GEO, commonParams);
};

View File

@@ -255,7 +255,7 @@ export interface IGeolocation {
clusterLabels: string[];
clusterId: string;
minTimestamp: string;
sourceAddress?: string;
addressString?: string;
}
export interface EmploymentDetails {
employmentType: string;
@@ -313,7 +313,7 @@ export interface CaseDetail {
geolocations?: IGeolocation[];
employmentDetail?: EmploymentDetails;
unpaidDays?: number;
addressSourceText?: string;
addressStringType?: string;
}
export interface AddressesGeolocationPayload {