@finspringinnovations/fdsdk 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/lib/components/AmountInput.js +1 -2
  2. package/lib/components/CheckboxOption.js +3 -3
  3. package/lib/components/CompanyHeader.js +40 -36
  4. package/lib/components/InterestRateCard.js +3 -2
  5. package/lib/components/OTPInput.js +1 -1
  6. package/lib/components/PaymentDetailsCard.js +8 -7
  7. package/lib/components/PendingFDBottomSheet.js +8 -8
  8. package/lib/components/TextFieldWithLabel.js +1 -1
  9. package/lib/components/TrustBox.js +2 -2
  10. package/lib/config/appDataConfig.d.ts +50 -0
  11. package/lib/config/appDataConfig.js +34 -1
  12. package/lib/hooks/usePaymentSSE.d.ts +27 -0
  13. package/lib/hooks/usePaymentSSE.js +251 -0
  14. package/lib/hooks/usePaymentStatusTimer.d.ts +25 -0
  15. package/lib/hooks/usePaymentStatusTimer.js +122 -0
  16. package/lib/index.d.ts +2 -2
  17. package/lib/index.js +5 -2
  18. package/lib/navigation/RootNavigator.js +5 -0
  19. package/lib/navigation/index.d.ts +2 -0
  20. package/lib/navigation/index.js +13 -11
  21. package/lib/screens/FDCalculator.js +35 -34
  22. package/lib/screens/FDList.js +10 -12
  23. package/lib/screens/NomineeDetail.js +28 -22
  24. package/lib/screens/PayNow.js +6 -6
  25. package/lib/screens/Payment.d.ts +1 -0
  26. package/lib/screens/Payment.js +75 -28
  27. package/lib/screens/PaymentStatus.js +33 -42
  28. package/lib/screens/ReviewKYC.js +2 -2
  29. package/lib/theme/ThemeContext.d.ts +2 -0
  30. package/lib/theme/ThemeContext.js +4 -2
  31. package/lib/theme/index.d.ts +6 -1
  32. package/lib/theme/index.js +24 -8
  33. package/lib/utils/sseParser.d.ts +7 -0
  34. package/lib/utils/sseParser.js +27 -0
  35. package/package.json +2 -2
  36. package/src/components/AmountInput.tsx +5 -1
  37. package/src/components/CheckboxOption.tsx +3 -3
  38. package/src/components/CompanyHeader.tsx +50 -44
  39. package/src/components/InterestRateCard.tsx +3 -2
  40. package/src/components/OTPInput.tsx +1 -1
  41. package/src/components/PaymentDetailsCard.tsx +45 -40
  42. package/src/components/PendingFDBottomSheet.tsx +8 -8
  43. package/src/components/TextFieldWithLabel.tsx +1 -1
  44. package/src/components/TrustBox.tsx +2 -2
  45. package/src/config/appDataConfig.ts +64 -0
  46. package/src/hooks/usePaymentSSE.ts +286 -0
  47. package/src/hooks/usePaymentStatusTimer.ts +169 -0
  48. package/src/index.tsx +4 -1
  49. package/src/navigation/RootNavigator.tsx +6 -0
  50. package/src/navigation/index.tsx +16 -17
  51. package/src/screens/FDCalculator.tsx +37 -38
  52. package/src/screens/FDList.tsx +11 -11
  53. package/src/screens/NomineeDetail.tsx +28 -21
  54. package/src/screens/PayNow.tsx +7 -7
  55. package/src/screens/Payment.tsx +91 -35
  56. package/src/screens/PaymentStatus.tsx +44 -57
  57. package/src/screens/ReviewKYC.tsx +2 -2
  58. package/src/theme/ThemeContext.tsx +6 -1
  59. package/src/theme/index.ts +30 -8
  60. package/src/utils/sseParser.ts +40 -0
@@ -200,16 +200,6 @@ const FDCalculator: React.FC<FDCalculatorProps> = ({ onGoBack, onNavigateToRevie
200
200
  setPayoutValue(defaultOption);
201
201
  }
202
202
  }, [payoutOptions]);
203
-
204
- React.useEffect(() => {
205
- if (amount && payoutValue) {
206
- // Only call if amount is valid
207
- const numericValue = parseInt(amount.replace(/,/g, ''), 10);
208
- if (numericValue >= 5000 && numericValue <= 50000000 && numericValue % 1000 === 0) {
209
- handleCalculateFD(amount, payoutValue);
210
- }
211
- }
212
- }, [payoutValue]);
213
203
  // Master data processing complete
214
204
 
215
205
  // FD Calculator API
@@ -232,6 +222,17 @@ const FDCalculator: React.FC<FDCalculatorProps> = ({ onGoBack, onNavigateToRevie
232
222
  }, [interestRates]);
233
223
 
234
224
  const [tenureValue, setTenureValue] = useState<string>('');
225
+
226
+ // Effect to recalculate when payout or tenure changes
227
+ React.useEffect(() => {
228
+ if (amount && payoutValue && tenureValue) {
229
+ // Only call if amount is valid
230
+ const numericValue = parseInt(amount.replace(/,/g, ''), 10);
231
+ if (numericValue >= 5000 && numericValue <= 50000000 && numericValue % 1000 === 0) {
232
+ handleCalculateFD(amount, payoutValue, tenureValue);
233
+ }
234
+ }
235
+ }, [payoutValue, tenureValue]);
235
236
  React.useEffect(() => {
236
237
  if (tenureOptions.length > 0) {
237
238
  // If effectiveFdData has tenure, use it; otherwise use first option
@@ -253,15 +254,16 @@ const FDCalculator: React.FC<FDCalculatorProps> = ({ onGoBack, onNavigateToRevie
253
254
  };
254
255
 
255
256
  // Function to call FD calculator API
256
- const handleCalculateFD = React.useCallback(async (currentAmount?: string, selectedPayout?: string) => {
257
+ const handleCalculateFD = React.useCallback(async (currentAmount?: string, selectedPayout?: string, selectedTenure?: string) => {
257
258
  const payoutToUse = selectedPayout || payoutValue;
258
259
  const amountToUse = currentAmount || amount; // ✅ use latest if provided
260
+ const tenureToUse = selectedTenure || tenureValue; // ✅ use latest if provided
259
261
 
260
- if (!amountToUse || !payoutToUse) return;
262
+ if (!amountToUse || !payoutToUse || !tenureToUse) return;
261
263
 
262
264
  try {
263
265
  const amountValue = parseFloat(amountToUse.replace(/,/g, ''));
264
- const tenureMonths = parseInt(tenureValue.replace(' Months', ''));
266
+ const tenureMonths = parseInt(tenureToUse.replace(' Months', ''));
265
267
 
266
268
  if (isNaN(amountValue) || isNaN(tenureMonths) || amountValue <= 0 || tenureMonths <= 0) return;
267
269
 
@@ -272,7 +274,7 @@ const FDCalculator: React.FC<FDCalculatorProps> = ({ onGoBack, onNavigateToRevie
272
274
 
273
275
  const appData = getAppData();
274
276
  const userDob = appData?.dob || '1990-01-01';
275
- const isWomenDepositor = appData?.gender === 'F';
277
+ const isWomenDepositor = appData?.gender === 'Female';
276
278
 
277
279
  const requestData = {
278
280
  principalAmount: amountValue,
@@ -286,6 +288,7 @@ const FDCalculator: React.FC<FDCalculatorProps> = ({ onGoBack, onNavigateToRevie
286
288
 
287
289
  const result = await calculateFD(requestData).unwrap();
288
290
  setCalculationResult(result);
291
+ console.log(';following is the calculation result', result, 'requestData', requestData, 'appData', appData)
289
292
  } catch (error) {
290
293
  // FD calculation failed
291
294
  } finally {
@@ -326,10 +329,10 @@ const FDCalculator: React.FC<FDCalculatorProps> = ({ onGoBack, onNavigateToRevie
326
329
 
327
330
  // Step 7: Debounced API call
328
331
  const isValidLocal = numericValue >= 5000 && numericValue <= 50000000 && numericValue % 1000 === 0;
329
- if (cleanedText && isValidLocal && payoutValue) {
332
+ if (cleanedText && isValidLocal && payoutValue && tenureValue) {
330
333
  const newTimer = setTimeout(() => {
331
- // Pass latest cleanedText directly to avoid stale state
332
- handleCalculateFD(cleanedText);
334
+ // Pass latest values directly to avoid stale state
335
+ handleCalculateFD(cleanedText, payoutValue, tenureValue);
333
336
  }, 1000);
334
337
  setDebounceTimer(newTimer);
335
338
  }
@@ -591,19 +594,18 @@ const FDCalculator: React.FC<FDCalculatorProps> = ({ onGoBack, onNavigateToRevie
591
594
  <SafeAreaWrapper
592
595
  includeTop={false}
593
596
  bottomPadding={25}
594
- statusBarColor="#000000"
595
- statusBarStyle="light-content"
597
+ statusBarColor={colors.background}
598
+ statusBarStyle={themeName === 'dark' ? 'light-content' : 'dark-content'}
596
599
  >
597
600
  {/* Header */}
598
601
  <View style={styles.header}>
599
602
  <TouchableOpacity onPress={() => navigate('FDList')} style={styles.backButton}>
600
603
  <Image
601
604
  source={{ uri: base64Images.backArrow }}
602
- style={[styles.backIcon, { tintColor: themeName === 'dark' ? colors.headerText : undefined }]}
605
+ style={[styles.backIcon, { tintColor: colors.text }]}
603
606
  resizeMode="contain"
604
607
  width={24}
605
608
  height={24}
606
-
607
609
  />
608
610
  </TouchableOpacity>
609
611
  </View>
@@ -656,8 +658,8 @@ const FDCalculator: React.FC<FDCalculatorProps> = ({ onGoBack, onNavigateToRevie
656
658
  onPress={() => {
657
659
  setTenureValue(option);
658
660
  setShowTenureMenu(false);
659
- // Call API after dropdown value changes
660
- setTimeout(() => handleCalculateFD(), 100);
661
+ // Call API with the new tenure value directly to avoid closure issues
662
+ setTimeout(() => handleCalculateFD(amount, payoutValue, option), 100);
661
663
  }}
662
664
  >
663
665
  <Text style={styles.modalOptionText}>{option}</Text>
@@ -688,9 +690,8 @@ const FDCalculator: React.FC<FDCalculatorProps> = ({ onGoBack, onNavigateToRevie
688
690
  onPress={() => {
689
691
  setPayoutValue(option);
690
692
  setShowPayoutModal(false);
691
- handleCalculateFD(amount, option);
692
- // Pass the selected option directly to avoid stale state
693
- // setTimeout(() => handleCalculateFD(option), 100);
693
+ // Pass all values directly to avoid stale state
694
+ handleCalculateFD(amount, option, tenureValue);
694
695
  }}
695
696
  >
696
697
  <Text style={styles.modalOptionText}>{option}</Text>
@@ -893,34 +894,32 @@ const createStyles = (typography: any, colors: any, themeName: string) => StyleS
893
894
  position: 'relative',
894
895
  },
895
896
  startButton: {
896
- backgroundColor: themeName === 'dark' ? colors.buttonBackground : colors.headerBg,
897
- paddingVertical: themeName === 'dark' ? 1 : 20,
897
+ backgroundColor: colors.buttonBackground || colors.headerBg,
898
+ paddingVertical: 20,
898
899
  paddingHorizontal: 20,
899
- borderRadius: themeName === 'dark' ? 10 : 30,
900
+ borderRadius: 30,
900
901
  marginTop: 30,
901
902
  alignItems: 'center',
902
903
  justifyContent: 'center',
903
- height: themeName === 'dark' ? 50 : 56,
904
+ height: 56,
904
905
  width: '90%',
905
906
  alignSelf: 'center',
906
907
  },
907
908
  startButtonDisabled: {
908
- backgroundColor: '#909090',
909
- color: '#ffffff',
909
+ backgroundColor: colors.muted || '#909090',
910
910
  },
911
911
  startButtonText: {
912
912
  ...typography.styles.button,
913
- color: themeName === 'dark' ? colors.buttonTextColor : colors.background,
914
- lineHeight: themeName === 'dark' ? 24 : typography.styles.button.lineHeight,
913
+ color: colors.buttonTextColor || colors.background,
915
914
  fontSize: 16,
916
915
  },
917
916
  startButtonTextDisabled: {
918
- color: themeName === 'dark' ? "#ffffff" : colors.tabSelected,
917
+ color: colors.textSecondary,
919
918
  },
920
919
  inlineMenu: {
921
- backgroundColor: themeName === 'dark' ? colors.inputBackground : colors.background,
922
- borderWidth: themeName === 'dark' ? 1 : 0.5,
923
- borderColor: themeName === 'dark' ? '#ffffff' : 'rgba(0,0,0,0.2)',
920
+ backgroundColor: colors.inputBackground || colors.background,
921
+ borderWidth: 0.5,
922
+ borderColor: colors.inputBorder || colors.border,
924
923
  borderRadius: 8,
925
924
  marginTop: 6,
926
925
  paddingHorizontal: 12,
@@ -888,7 +888,7 @@ const FDList: React.FC<FDListProps> = ({
888
888
  <SafeAreaWrapper
889
889
  style={customStyles.container}
890
890
  includeTop={false}
891
- statusBarColor="#000000"
891
+ statusBarColor={colors.headerBg}
892
892
  statusBarStyle="light-content"
893
893
  >
894
894
  <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
@@ -903,7 +903,7 @@ const FDList: React.FC<FDListProps> = ({
903
903
  <SafeAreaWrapper
904
904
  style={customStyles.container}
905
905
  includeTop={false}
906
- statusBarColor="#0A1929"
906
+ statusBarColor={colors.headerBg}
907
907
  statusBarStyle="light-content"
908
908
  >
909
909
  {/* Custom FDList Header */}
@@ -923,12 +923,12 @@ const FDList: React.FC<FDListProps> = ({
923
923
  <View style={styles.headerContent}>
924
924
  <Text style={styles.headerTitle}>{FD_STRINGS.CORPORATE_FDS_TITLE}</Text>
925
925
  <View style={styles.poweredByContainer}>
926
- <Text style={styles.poweredByText}>Powered by</Text>
926
+ {/* <Text style={styles.poweredByText}>Powered by</Text>
927
927
  <Image
928
928
  source={{ uri: base64Images.simplfylogo }}
929
929
  style={styles.simplifyLogo}
930
930
  resizeMode="contain"
931
- />
931
+ /> */}
932
932
  </View>
933
933
  </View>
934
934
  </View>
@@ -1105,7 +1105,7 @@ const createStyles = (colors: ColorScheme, typography: any, spacing: any, themeN
1105
1105
  backgroundColor: colors.surface,
1106
1106
  },
1107
1107
  customHeader: {
1108
- backgroundColor: '#0A1929',
1108
+ backgroundColor: colors.headerBg,
1109
1109
  paddingTop: Platform.OS === 'ios' ? 50 : 20,
1110
1110
  paddingBottom: spacing.md,
1111
1111
  paddingHorizontal: spacing.lg,
@@ -1121,7 +1121,7 @@ const createStyles = (colors: ColorScheme, typography: any, spacing: any, themeN
1121
1121
  backIcon: {
1122
1122
  width: 24,
1123
1123
  height: 24,
1124
- tintColor: '#FFFFFF',
1124
+ tintColor: colors.headerText,
1125
1125
  },
1126
1126
  headerContent: {
1127
1127
  flex: 1,
@@ -1130,7 +1130,7 @@ const createStyles = (colors: ColorScheme, typography: any, spacing: any, themeN
1130
1130
  },
1131
1131
  headerTitle: {
1132
1132
  ...typography.styles.h3,
1133
- color: '#FFFFFF',
1133
+ color: colors.headerText,
1134
1134
  marginBottom: spacing.xs,
1135
1135
  },
1136
1136
  poweredByContainer: {
@@ -1139,7 +1139,7 @@ const createStyles = (colors: ColorScheme, typography: any, spacing: any, themeN
1139
1139
  },
1140
1140
  poweredByText: {
1141
1141
  ...typography.styles.text10Regular,
1142
- color: '#FFFFFF',
1142
+ color: colors.headerText,
1143
1143
  opacity: 0.7,
1144
1144
  marginRight: 0,
1145
1145
  },
@@ -1175,14 +1175,14 @@ const createStyles = (colors: ColorScheme, typography: any, spacing: any, themeN
1175
1175
  paddingVertical: spacing.md,
1176
1176
  marginHorizontal: 2,
1177
1177
  borderBottomWidth: 3,
1178
- borderBottomColor: 'white',
1178
+ borderBottomColor: colors.surface,
1179
1179
  borderBottomLeftRadius: 8,
1180
1180
  borderBottomRightRadius: 8,
1181
1181
  backgroundColor: 'transparent',
1182
1182
  },
1183
1183
  activeTab: {
1184
1184
  borderBottomColor: colors.tabSelected,
1185
- backgroundColor: themeName === 'dark' ? '#000000' : '#fff',
1185
+ backgroundColor: colors.background,
1186
1186
  borderBottomLeftRadius: 12,
1187
1187
  borderBottomRightRadius: 12,
1188
1188
  },
@@ -1276,7 +1276,7 @@ const createStyles = (colors: ColorScheme, typography: any, spacing: any, themeN
1276
1276
  },
1277
1277
  showAllButtonText: {
1278
1278
  ...typography.styles.text14Medium,
1279
- color: '#ffffff', // Use white color directly
1279
+ color: colors.headerText, // Use theme header text color
1280
1280
  textAlign: 'center',
1281
1281
  },
1282
1282
  });
@@ -140,7 +140,8 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
140
140
  const year = parseInt(dateParts[2], 10);
141
141
 
142
142
  if (day >= 1 && day <= 31 && month >= 1 && month <= 12 && year >= 1900 && year <= new Date().getFullYear()) {
143
- const parsedDate = new Date(year, month - 1, day);
143
+ // Use noon to avoid timezone issues
144
+ const parsedDate = new Date(year, month - 1, day, 12, 0, 0);
144
145
  if (!isNaN(parsedDate.getTime()) && parsedDate.getDate() === day && parsedDate.getMonth() === month - 1 && parsedDate.getFullYear() === year) {
145
146
  setSelectedDate(parsedDate);
146
147
  }
@@ -286,7 +287,8 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
286
287
 
287
288
  // Validate the parsed values
288
289
  if (day >= 1 && day <= 31 && month >= 1 && month <= 12 && year >= 1900 && year <= new Date().getFullYear()) {
289
- const parsedDate = new Date(year, month - 1, day);
290
+ // Use noon to avoid timezone issues
291
+ const parsedDate = new Date(year, month - 1, day, 12, 0, 0);
290
292
  if (!isNaN(parsedDate.getTime()) && parsedDate.getDate() === day && parsedDate.getMonth() === month - 1 && parsedDate.getFullYear() === year) {
291
293
  setSelectedDate(parsedDate);
292
294
  } else {
@@ -320,12 +322,14 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
320
322
  if (Platform.OS === 'android') {
321
323
  // Android fires with types: 'set' and 'dismissed'
322
324
  if (event?.type === 'set' && selectedDate) {
323
- setSelectedDate(selectedDate);
325
+ // Normalize to noon to avoid timezone issues
326
+ const normalizedDate = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), selectedDate.getDate(), 12, 0, 0);
327
+ setSelectedDate(normalizedDate);
324
328
 
325
329
  const today = new Date();
326
- let age = today.getFullYear() - selectedDate.getFullYear();
327
- const m = today.getMonth() - selectedDate.getMonth();
328
- if (m < 0 || (m === 0 && today.getDate() < selectedDate.getDate())) {
330
+ let age = today.getFullYear() - normalizedDate.getFullYear();
331
+ const m = today.getMonth() - normalizedDate.getMonth();
332
+ if (m < 0 || (m === 0 && today.getDate() < normalizedDate.getDate())) {
329
333
  age--;
330
334
  }
331
335
 
@@ -336,9 +340,9 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
336
340
  return;
337
341
  }
338
342
 
339
- const day = selectedDate.getDate().toString().padStart(2, '0');
340
- const month = (selectedDate.getMonth() + 1).toString().padStart(2, '0');
341
- const year = selectedDate.getFullYear().toString();
343
+ const day = normalizedDate.getDate().toString().padStart(2, '0');
344
+ const month = (normalizedDate.getMonth() + 1).toString().padStart(2, '0');
345
+ const year = normalizedDate.getFullYear().toString();
342
346
  const formattedDate = `${day}/${month}/${year}`;
343
347
  updateField('dateOfBirth', formattedDate);
344
348
  closeDatePicker();
@@ -353,10 +357,12 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
353
357
 
354
358
  // iOS inline/spinner handling
355
359
  if (selectedDate) {
356
- setSelectedDate(selectedDate);
357
- const day = selectedDate.getDate().toString().padStart(2, '0');
358
- const month = (selectedDate.getMonth() + 1).toString().padStart(2, '0');
359
- const year = selectedDate.getFullYear().toString();
360
+ // Normalize to noon to avoid timezone issues
361
+ const normalizedDate = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), selectedDate.getDate(), 12, 0, 0);
362
+ setSelectedDate(normalizedDate);
363
+ const day = normalizedDate.getDate().toString().padStart(2, '0');
364
+ const month = (normalizedDate.getMonth() + 1).toString().padStart(2, '0');
365
+ const year = normalizedDate.getFullYear().toString();
360
366
  const formattedDate = `${day}/${month}/${year}`;
361
367
  updateField('dateOfBirth', formattedDate);
362
368
  }
@@ -393,7 +399,7 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
393
399
  setOpenMenus(prev => ({ ...prev, [menuKey]: false }));
394
400
  }}
395
401
  placeholder={placeholderText}
396
- placeholderColor={themeName === 'dark' ? colors.placeholderColor : 'rgba(0,32,34,0.2)'}
402
+ placeholderColor={colors.placeholderColor || 'rgba(0,0,0,0.2)'}
397
403
  />
398
404
  {openMenus[menuKey] && (
399
405
  <View style={styles.inlineMenu}>
@@ -438,7 +444,7 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
438
444
  updateField('customRelationship' as any, lettersOnly);
439
445
  }}
440
446
  placeholder={'Enter Custom Relationship'}
441
- placeholderColor={themeName === 'dark' ? colors.placeholderColor : 'rgba(0,0,0,0.2)'}
447
+ placeholderColor={colors.placeholderColor || 'rgba(0,0,0,0.2)'}
442
448
  variant="text"
443
449
  />
444
450
  {fieldErrors.customRelationship ? (
@@ -470,7 +476,7 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
470
476
  onFocus={() => { closeAllMenus(); }}
471
477
  textInputRef={nomineeNameRef}
472
478
  placeholder={NOMINEE_STRINGS.NOMINEE_NAME_PLACEHOLDER}
473
- placeholderColor={themeName === 'dark' ? colors.placeholderColor : 'rgba(0,0,0,0.2)'}
479
+ placeholderColor={colors.placeholderColor || 'rgba(0,0,0,0.2)'}
474
480
  variant="text"
475
481
  />
476
482
  </View>
@@ -489,7 +495,7 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
489
495
  onChangeText={(text) => updateField(field, text)}
490
496
  variant="date"
491
497
  placeholder="DD/MM/YYYY"
492
- placeholderColor={themeName === 'dark' ? colors.placeholderColor : 'rgba(0,0,0,0.2)'}
498
+ placeholderColor={colors.placeholderColor || 'rgba(0,0,0,0.2)'}
493
499
  maxLength={10}
494
500
  dateFormat="DD/MM/YYYY"
495
501
  onDatePress={() => {
@@ -499,7 +505,7 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
499
505
  }}
500
506
  editable={false}
501
507
  keepWhiteBackground={true}
502
- inputStyle={{ color: 'white' }}
508
+ inputStyle={{ color: colors.text }}
503
509
  />
504
510
  );
505
511
 
@@ -679,6 +685,7 @@ const NomineeDetail: React.FC<NomineeDetailProps> = ({ onGoBack, onSave, initial
679
685
  mode="date"
680
686
  display={Platform.OS === 'ios' ? 'spinner' : 'default'}
681
687
  onChange={onDateChange}
688
+ minimumDate={new Date(1900, 0, 1)} // January 1, 1900
682
689
  maximumDate={new Date(new Date().getFullYear() - 18, new Date().getMonth(), new Date().getDate())}
683
690
  themeVariant="light"
684
691
  />
@@ -764,7 +771,7 @@ const createStyles = (colors: any, typography: any, themeName: string) => StyleS
764
771
  titleField: { width: 80 },
765
772
  nameField: { flex: 1 },
766
773
  datePickerContainer: {
767
- backgroundColor: '#FFFFFF',
774
+ backgroundColor: colors.background,
768
775
  borderRadius: 12,
769
776
  padding: 16,
770
777
  marginBottom: 20,
@@ -772,12 +779,12 @@ const createStyles = (colors: any, typography: any, themeName: string) => StyleS
772
779
  },
773
780
  checkboxContainer: { flexDirection: 'row', alignItems: 'flex-start', marginBottom: 40, paddingHorizontal: 4, marginTop: 16 },
774
781
  checkbox: { marginRight: 12, marginTop: 2 },
775
- checkboxBox: { width: 20, height: 20, borderWidth: 2, borderColor: themeName === 'dark' ? colors.tabSelected : colors.primary, borderRadius: 4, alignItems: 'center', justifyContent: 'center', backgroundColor: 'white' },
782
+ checkboxBox: { width: 20, height: 20, borderWidth: 2, borderColor: colors.inputBorder || colors.border, borderRadius: 4, alignItems: 'center', justifyContent: 'center', backgroundColor: colors.background },
776
783
  checkboxChecked: {
777
784
  // backgroundColor: colors.primary
778
785
  },
779
786
  checkboxText: { ...typography.styles.bodySmall, color: colors.textLight, flex: 1, lineHeight: 18 },
780
- inlineMenu: { backgroundColor: themeName === 'dark' ? colors.inputBackground : colors.background, borderWidth: themeName === 'dark' ? 1 : 0.5, borderColor: themeName === 'dark' ? '#ffffff' : 'rgba(0,0,0,0.2)', borderRadius: 8, marginTop: -20, marginBottom: 10, paddingHorizontal: 12, paddingVertical: 6 },
787
+ inlineMenu: { backgroundColor: colors.inputBackground || colors.background, borderWidth: 0.5, borderColor: colors.inputBorder || colors.border, borderRadius: 8, marginTop: -20, marginBottom: 10, paddingHorizontal: 12, paddingVertical: 6 },
781
788
  modalOption: { paddingVertical: 14 },
782
789
  modalOptionText: { ...typography.styles.bodyLarge, color: colors.text },
783
790
  // Added to fix TS error where these styles are referenced above
@@ -166,8 +166,8 @@ const PayNow: React.FC<PayNowProps> = ({ onGoBack, onConfirm, fdData }) => {
166
166
  <SafeAreaWrapper
167
167
  includeTop={false}
168
168
  bottomPadding={25}
169
- statusBarColor="#000000"
170
- statusBarStyle="light-content"
169
+ statusBarColor={colors.background}
170
+ statusBarStyle={themeName === 'dark' ? 'light-content' : 'dark-content'}
171
171
  >
172
172
  <View style={styles.container}>
173
173
  <ScrollView showsVerticalScrollIndicator={false} contentContainerStyle={styles.scrollContent}>
@@ -243,13 +243,13 @@ const createStyles = (colors: any, typography: any, themeName: string) => StyleS
243
243
  },
244
244
  backButton: {
245
245
  flex: 1,
246
- backgroundColor: themeName === 'dark' ? colors.cancelButtonBg : 'transparent',
247
- borderWidth: themeName === 'dark' ? 1 : 0,
248
- borderColor: themeName === 'dark' ? '#ffffff' : 'transparent',
249
- borderRadius: themeName === 'dark' ? 10 : 0,
246
+ backgroundColor: colors.cancelButtonBg || 'transparent',
247
+ borderWidth: 0,
248
+ borderColor: 'transparent',
249
+ borderRadius: 10,
250
250
  },
251
251
  backButtonText: {
252
- color: themeName === 'dark' ? '#ffffff' : colors.primary,
252
+ color: colors.primary,
253
253
  },
254
254
  confirmButton: {
255
255
  flex: 1,