NTP-39327 | adding address source for skip tracing (#1101)

This commit is contained in:
Aishwarya Srivastava
2025-02-20 20:00:20 +05:30
committed by GitHub
4 changed files with 55 additions and 9 deletions

View File

@@ -113,8 +113,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
def enableHermes = project.ext.react.get("enableHermes", false);
def VERSION_CODE = 236
def VERSION_NAME = "2.17.3"
def VERSION_CODE = 237
def VERSION_NAME = "2.17.4"
android {
namespace "com.avapp"

View File

@@ -1,7 +1,7 @@
{
"name": "AV_APP",
"version": "2.17.3",
"buildNumber": "236",
"version": "2.17.4",
"buildNumber": "237",
"private": true,
"scripts": {
"android:dev": "yarn move:dev && react-native run-android",

View File

@@ -14,7 +14,10 @@ import { useAppDispatch, useAppSelector } from '../../hooks';
import Tag, { TagVariant } from '../../../RN-UI-LIB/src/components/Tag';
import { CaseAllocationType, TaskTitleUIMapping } from '../allCases/interface';
import { updatePreDefinedCaseFormJourney } from '../../reducer/caseReducer';
import { getCollectionFeedbackOnAddressPreDefinedJourney, getCollectionFeedbackOnSkipTracingPreDefinedJourney } from '../../components/utlis/addressGeolocationUtils';
import {
getCollectionFeedbackOnAddressPreDefinedJourney,
getCollectionFeedbackOnSkipTracingPreDefinedJourney,
} from '../../components/utlis/addressGeolocationUtils';
import { _map } from '../../../RN-UI-LIB/src/utlis/common';
import { getTemplateRoute, navigateToScreen } from '../../components/utlis/navigationUtlis';
import { type GenericFunctionArgs } from '../../common/GenericTypes';
@@ -42,6 +45,7 @@ interface IAddressItem {
showOpenMap?: boolean;
showCopy?: boolean;
isSkipTracing?: boolean;
showAddressSource?: boolean;
}
function AddressItem({
@@ -60,6 +64,7 @@ function AddressItem({
showOpenMap = false,
showCopy = true,
isSkipTracing = false,
showAddressSource = false,
}: IAddressItem) {
const { currentGeolocationCoordinates, prefilledAddressScreenTemplate } = useAppSelector(
(state) => ({
@@ -243,7 +248,33 @@ function AddressItem({
<Text style={[styles.textContainer, styles.cardLightTitle, { color: COLORS.TEXT.BLACK }]}>
{sanitizeString(addressItem?.addressText)}
</Text>
{showAddressSource ? (
<View
style={[
GenericStyles.mv16,
GenericStyles.mb2,
GenericStyles.row,
GenericStyles.wrap,
styles.addressContainer,
]}
>
<Text numberOfLines={1} style={GenericStyles.fontSize12}>
{dayjs(addressItem?.createdAt).format('DD MMM, YYYY')}
</Text>
<View
style={[
GenericStyles.mv8,
GenericStyles.row,
GenericStyles.wrap,
styles.dot,
GenericStyles.mh8,
]}
/>
<Text dark numberOfLines={1} style={styles.addressSource}>
{addressItem?.secondarySource}
</Text>
</View>
) : null}
{showActionButtons ? (
<View style={[styles.container, GenericStyles.row, GenericStyles.pt12]}>
{showOpenMap ? (
@@ -257,8 +288,7 @@ function AddressItem({
Open map
</Text>
</TouchableOpacity>
) : null
}
) : null}
{showCopy ? (
<TouchableOpacity
activeOpacity={0.7}
@@ -271,7 +301,7 @@ function AddressItem({
<Text style={styles.actionBtn}>Copy</Text>
</View>
</TouchableOpacity>
): null}
) : null}
<TouchableOpacity
activeOpacity={0.7}
@@ -345,6 +375,20 @@ const styles = StyleSheet.create({
color: COLORS.TEXT.BLUE,
opacity: 0.5,
},
addressContainer: {
alignItems: 'center',
},
dot: {
height: 4,
width: 4,
borderRadius: 2,
marginHorizontal: 8,
backgroundColor: COLORS.TEXT.LIGHT,
},
addressSource: {
fontSize: 12,
fontWeight: 'bold',
},
});
export default AddressItem;

View File

@@ -55,6 +55,7 @@ const SkipTracingAddressItem = (props: ISkipTracingAddressItem) => {
});
}
};
const showAddressSource = !!(skipTracingAddress?.secondarySource && skipTracingAddress?.createdAt);
return (
<View key={skipTracingAddress?.id}>
<Accordion
@@ -79,6 +80,7 @@ const SkipTracingAddressItem = (props: ISkipTracingAddressItem) => {
showOpenMap={true}
showCopy={false}
isSkipTracing={true}
showAddressSource={showAddressSource}
/>
}
onExpanded={(isExpanded) => {