diff --git a/src/components/LineChart/Xaxis.tsx b/src/components/LineChart/Xaxis.tsx index 813fe0cc..1289ac5d 100644 --- a/src/components/LineChart/Xaxis.tsx +++ b/src/components/LineChart/Xaxis.tsx @@ -15,7 +15,7 @@ const styles = StyleSheet.create({ container: { flexDirection: 'row', justifyContent: 'space-around', - marginLeft: 60, + marginLeft: 70, marginTop: -10, }, buttonText: { diff --git a/src/components/LineChart/index.tsx b/src/components/LineChart/index.tsx index 74d41d35..8923e8af 100644 --- a/src/components/LineChart/index.tsx +++ b/src/components/LineChart/index.tsx @@ -19,7 +19,7 @@ const LineChart = () => { width={GRAPH_WIDTH} data={graphData} bottomPadding={20} - leftPadding={0} + leftPadding={18} /> ); diff --git a/src/screens/Dashboard/utils.ts b/src/screens/Dashboard/utils.ts index 174f5a62..cce2990c 100644 --- a/src/screens/Dashboard/utils.ts +++ b/src/screens/Dashboard/utils.ts @@ -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(); } diff --git a/src/screens/cashCollected/CashCollectedItem.tsx b/src/screens/cashCollected/CashCollectedItem.tsx index 10dde32f..235e4fa5 100644 --- a/src/screens/cashCollected/CashCollectedItem.tsx +++ b/src/screens/cashCollected/CashCollectedItem.tsx @@ -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 ( { ]} > - + {sanitizeString(customerName)}