Merge pull request #631 from navi-medici/feat/TP-39795
TP-39795 | enigma address cluster changes
This commit is contained in:
@@ -131,8 +131,8 @@ def reactNativeArchitectures() {
|
||||
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
||||
}
|
||||
|
||||
def VERSION_CODE = 95
|
||||
def VERSION_NAME = "2.5.0"
|
||||
def VERSION_CODE = 96
|
||||
def VERSION_NAME = "2.5.1"
|
||||
|
||||
android {
|
||||
ndkVersion rootProject.ext.ndkVersion
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "AV_APP",
|
||||
"version": "2.5.0",
|
||||
"version": "2.5.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android:dev": "yarn move:dev && react-native run-android",
|
||||
|
||||
@@ -28,6 +28,28 @@ function SeparatorBorderComponent() {
|
||||
return <View style={[styles.borderLine, GenericStyles.mv16]} />;
|
||||
}
|
||||
|
||||
const getAllAddressIds = (groupedAddress: IGroupedAddressesItem) => {
|
||||
// Set for unique address IDs
|
||||
const addressIds = new Set();
|
||||
|
||||
if (groupedAddress?.metaAddress?.id) {
|
||||
addressIds.add(groupedAddress.metaAddress.id);
|
||||
}
|
||||
|
||||
groupedAddress?.similarAddresses?.forEach((similarAddress) => {
|
||||
if (similarAddress?.id) {
|
||||
addressIds.add(similarAddress.id);
|
||||
}
|
||||
similarAddress.metaAddressReferences?.forEach((metaAddress) => {
|
||||
if (metaAddress?.addressId) {
|
||||
addressIds.add(metaAddress.addressId);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return Array.from(addressIds);
|
||||
};
|
||||
|
||||
const AddressContainer: React.FC<IAddressContainer> = ({
|
||||
groupedAddressList,
|
||||
caseId,
|
||||
@@ -38,10 +60,10 @@ const AddressContainer: React.FC<IAddressContainer> = ({
|
||||
currentGeolocationCoordinates: state.foregroundService?.deviceGeolocationCoordinate,
|
||||
}));
|
||||
const handleOpenOldFeedbacks = (groupedAddress: IGroupedAddressesItem) => {
|
||||
const similarAddressIds = groupedAddress?.similarAddresses?.map((item) => item.id) || [];
|
||||
const addressIds = getAllAddressIds(groupedAddress);
|
||||
const commonParams = {
|
||||
addressText: groupedAddress?.metaAddress?.addressText,
|
||||
addressReferenceIds: [groupedAddress?.metaAddress?.id, ...similarAddressIds].join(','),
|
||||
addressReferenceIds: addressIds.join(','),
|
||||
};
|
||||
handlePageRouting?.(PageRouteEnum.PAST_FEEDBACK_DETAIL, commonParams);
|
||||
};
|
||||
@@ -66,7 +88,7 @@ const AddressContainer: React.FC<IAddressContainer> = ({
|
||||
addressFeedback?.addressReferenceId === groupedAddress?.metaAddress?.id
|
||||
);
|
||||
return (
|
||||
<View>
|
||||
<View key={groupedAddress?.metaAddress?.id}>
|
||||
<Accordion
|
||||
accordionStyle={[GenericStyles.pv24, GenericStyles.ph16]}
|
||||
isExpansionDisabled={!groupedAddress?.similarAddresses.length}
|
||||
|
||||
@@ -28,6 +28,13 @@ export enum PrimarySourcesType {
|
||||
ACCOUNT_AGGREGATOR = 'ACCOUNT_AGGREGATOR',
|
||||
}
|
||||
|
||||
interface IMetaAddress {
|
||||
addressId: string;
|
||||
promptVersionId: string;
|
||||
runId: string;
|
||||
taggedAt: string;
|
||||
}
|
||||
|
||||
export interface IAddress {
|
||||
id: string;
|
||||
pinCode: string;
|
||||
@@ -41,6 +48,7 @@ export interface IAddress {
|
||||
groupId: string;
|
||||
primarySource?: PrimarySourcesType;
|
||||
secondarySource?: string;
|
||||
metaAddressReferences: IMetaAddress[];
|
||||
similarAddresses?: IAddress[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user