diff --git a/android/app/build.gradle b/android/app/build.gradle index 978aac1c..8a382048 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -134,8 +134,8 @@ def reactNativeArchitectures() { return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] } -def VERSION_CODE = 205 -def VERSION_NAME = "2.14.5" +def VERSION_CODE = 206 +def VERSION_NAME = "2.14.6" android { ndkVersion rootProject.ext.ndkVersion diff --git a/package.json b/package.json index 1edc8735..8854b95b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "AV_APP", - "version": "2.14.5", - "buildNumber": "205", + "version": "2.14.6", + "buildNumber": "206", "private": true, "scripts": { "android:dev": "yarn move:dev && react-native run-android", diff --git a/src/screens/registerPayements/ForeclosureBreakupAccordion.tsx b/src/screens/registerPayements/ForeclosureBreakupAccordion.tsx index b6bf94b5..a9d5b5a6 100644 --- a/src/screens/registerPayements/ForeclosureBreakupAccordion.tsx +++ b/src/screens/registerPayements/ForeclosureBreakupAccordion.tsx @@ -21,8 +21,8 @@ export interface IForeclosureBreakup { penaltyCharges: number; closingInterest: number; excessAvailable: number; - totalAmountPreWaiver?: number | null; - penaltyChargesPreWaiver?: number | null; + totalAmountPreWaiver?: number; + penaltyChargesPreWaiver?: number; } const ForeclosureBreakupAccordion: React.FC = ({ title, @@ -37,7 +37,7 @@ const ForeclosureBreakupAccordion: React.FC = ({ excessAvailable, closingInterest, totalAmountPreWaiver, - penaltyChargesPreWaiver, + penaltyChargesPreWaiver = 0, } = foreclosureBreakup; const foreclosureBreakupMap = useMemo( () => [ @@ -52,8 +52,8 @@ const ForeclosureBreakupAccordion: React.FC = ({ { label: 'Penalty charges', value: penaltyCharges, - subValue: penaltyChargesPreWaiver, - showSubValue: (penaltyChargesPreWaiver !== null) ? true: false + preAmount: penaltyChargesPreWaiver, + showPreAmount: penaltyChargesPreWaiver > 0, }, { label: 'Closing interest', @@ -64,14 +64,7 @@ const ForeclosureBreakupAccordion: React.FC = ({ value: excessAvailable, }, ], - [ - principal, - interest, - penaltyCharges, - excessAvailable, - closingInterest, - penaltyChargesPreWaiver, - ] + [principal, interest, penaltyCharges, excessAvailable, closingInterest, penaltyChargesPreWaiver] ); return ( @@ -93,8 +86,8 @@ const ForeclosureBreakupAccordion: React.FC = ({ containerStyle={GenericStyles.silverBackground} defaultExpanded={defaultExpanded} > - {foreclosureBreakupMap.map(({ label, value, subValue, showSubValue }) => - value > 0 ? ( + {foreclosureBreakupMap.map(({ label, value, preAmount, showPreAmount }) => + value > 0 || showPreAmount ? ( = ({ fallBack={} > - {formatAmount(value)} - {showSubValue ? ({formatAmount(subValue)}) : null} + + {formatAmount(value)} + + {showPreAmount ? ( + + {formatAmount(preAmount)} + + ) : null} @@ -131,6 +130,6 @@ const styles = StyleSheet.create({ marginRight: 14, }, strikethrough: { - textDecorationLine: 'line-through' + textDecorationLine: 'line-through', }, });