TP-79857 | Allocation on geolocation
This commit is contained in:
@@ -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 ? (
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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) => ({
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user