TP-34630 | Image Cache Fix
This commit is contained in:
@@ -15,7 +15,7 @@ const styles = StyleSheet.create({
|
||||
container: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-around',
|
||||
marginLeft: 60,
|
||||
marginLeft: 70,
|
||||
marginTop: -10,
|
||||
},
|
||||
buttonText: {
|
||||
|
||||
@@ -19,7 +19,7 @@ const LineChart = () => {
|
||||
width={GRAPH_WIDTH}
|
||||
data={graphData}
|
||||
bottomPadding={20}
|
||||
leftPadding={0}
|
||||
leftPadding={18}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -283,9 +283,12 @@ export const formatNumberWithSuffix = (number: number): string => {
|
||||
if (number >= 10000000) {
|
||||
const formatted = (number / 10000000).toFixed(1);
|
||||
return formatted.endsWith('.0') ? formatted.slice(0, -2) + 'Cr' : formatted + 'Cr';
|
||||
} else if (number >= 1000) {
|
||||
const formatted = (number / 100000).toFixed(2);
|
||||
} else if (number >= 100000) {
|
||||
const formatted = (number / 100000).toFixed(1);
|
||||
return formatted.endsWith('.0') ? formatted.slice(0, -2) + 'L' : formatted + 'L';
|
||||
} else if (number >= 1000) {
|
||||
const formatted = (number / 1000).toFixed(1);
|
||||
return formatted.endsWith('.0') ? formatted.slice(0, -2) + 'k' : formatted + 'k';
|
||||
} else {
|
||||
return number.toString();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import CaseItemAvatar from '@screens/allCases/CaseItemAvatar';
|
||||
import React from 'react';
|
||||
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
||||
import Avatar from '../../../RN-UI-LIB/src/components/Avatar';
|
||||
import Text from '../../../RN-UI-LIB/src/components/Text';
|
||||
import Chevron from '../../../RN-UI-LIB/src/Icons/Chevron';
|
||||
import { GenericStyles, getShadowStyle } from '../../../RN-UI-LIB/src/styles';
|
||||
import { COLORS } from '../../../RN-UI-LIB/src/styles/colors';
|
||||
import { formatAmount } from '../../../RN-UI-LIB/src/utlis/amount';
|
||||
import { sanitizeString } from '../../components/utlis/commonFunctions';
|
||||
import { getDocumentList, sanitizeString } from '../../components/utlis/commonFunctions';
|
||||
import { navigateToScreen } from '../../components/utlis/navigationUtlis';
|
||||
import { PageRouteEnum } from '../auth/ProtectedRouter';
|
||||
import { CashCollectedItemProps } from './interface';
|
||||
@@ -14,7 +14,15 @@ import { CashCollectedItemProps } from './interface';
|
||||
const CashCollectedItem = (props: CashCollectedItemProps) => {
|
||||
const { cashCollectedItem, isLast, caseDetails } = props;
|
||||
const { amountCollected = 0, isClosed, caseId } = cashCollectedItem || {};
|
||||
const { totalOverdueAmount = 0, imageUri = '', customerName = '' } = caseDetails || {};
|
||||
const { totalOverdueAmount = 0, imageUri = '', customerName = '', isSynced } = caseDetails || {};
|
||||
|
||||
const caseItemAvatarCaseDetailObj = {
|
||||
customerName,
|
||||
isCaseSynced: isSynced,
|
||||
imageUri,
|
||||
caseId,
|
||||
documentList: getDocumentList(caseDetails) || [],
|
||||
};
|
||||
|
||||
return (
|
||||
<TouchableOpacity
|
||||
@@ -34,7 +42,7 @@ const CashCollectedItem = (props: CashCollectedItemProps) => {
|
||||
]}
|
||||
>
|
||||
<View style={[GenericStyles.row, GenericStyles.alignCenter, styles.flexBasis96]}>
|
||||
<Avatar loading={false} size={40} name={customerName} dataURI={imageUri} />
|
||||
<CaseItemAvatar caseDetailObj={caseItemAvatarCaseDetailObj} shouldBatchAvatar={false} />
|
||||
<View style={GenericStyles.pl12}>
|
||||
<Text style={styles.textHeading}>{sanitizeString(customerName)}</Text>
|
||||
<Text style={styles.subText}>
|
||||
|
||||
Reference in New Issue
Block a user