react-native-timacare 3.3.57-cccd → 3.3.59-cccd

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 (130) hide show
  1. package/lib/commonjs/components/AlertLoan.js +1 -1
  2. package/lib/commonjs/components/AlertLoan.js.flow +1 -1
  3. package/lib/commonjs/components/AlertLoan.js.map +1 -1
  4. package/lib/commonjs/components/AppModal.js +1 -1
  5. package/lib/commonjs/components/AppModal.js.flow +40 -2
  6. package/lib/commonjs/components/AppModal.js.map +1 -1
  7. package/lib/commonjs/components/ItemTimaOne.js +1 -1
  8. package/lib/commonjs/components/ItemTimaOne.js.flow +1 -1
  9. package/lib/commonjs/components/ItemTimaOne.js.map +1 -1
  10. package/lib/commonjs/components/ModalNotification/AlertGlobal.js +1 -1
  11. package/lib/commonjs/components/ModalNotification/AlertGlobal.js.flow +92 -33
  12. package/lib/commonjs/components/ModalNotification/AlertGlobal.js.map +1 -1
  13. package/lib/commonjs/components/ModalNotification/index.js +1 -1
  14. package/lib/commonjs/components/ModalNotification/index.js.flow +7 -0
  15. package/lib/commonjs/components/ModalNotification/index.js.map +1 -1
  16. package/lib/commonjs/components/ModalOptionLoan.js +1 -1
  17. package/lib/commonjs/components/ModalOptionLoan.js.flow +1 -1
  18. package/lib/commonjs/components/ModalOptionLoan.js.map +1 -1
  19. package/lib/commonjs/components/ModalOptionLoanDigital.js +1 -1
  20. package/lib/commonjs/components/ModalOptionLoanDigital.js.flow +1 -1
  21. package/lib/commonjs/components/ModalOptionLoanDigital.js.map +1 -1
  22. package/lib/commonjs/components/modalStack.js +2 -0
  23. package/lib/commonjs/components/modalStack.js.flow +47 -0
  24. package/lib/commonjs/components/modalStack.js.map +1 -0
  25. package/lib/commonjs/screens/camera/index.js +1 -1
  26. package/lib/commonjs/screens/camera/index.js.flow +1 -1
  27. package/lib/commonjs/screens/camera/index.js.map +1 -1
  28. package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
  29. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.flow +1 -1
  30. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
  31. package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
  32. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +1 -1
  33. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
  34. package/lib/commonjs/screens/digital-lending/Step6.js +1 -1
  35. package/lib/commonjs/screens/digital-lending/Step6.js.flow +1 -1
  36. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -1
  37. package/lib/commonjs/screens/eSign/index.js +1 -1
  38. package/lib/commonjs/screens/eSign/index.js.flow +1 -1
  39. package/lib/commonjs/screens/eSign/index.js.map +1 -1
  40. package/lib/commonjs/screens/home/DigitalTopupItem.js +1 -1
  41. package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +1 -1
  42. package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -1
  43. package/lib/commonjs/screens/home/ItemMotoBikeLoan.js +1 -1
  44. package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.flow +1 -1
  45. package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.map +1 -1
  46. package/lib/commonjs/screens/home/index.js +1 -1
  47. package/lib/commonjs/screens/home/index.js.flow +33 -19
  48. package/lib/commonjs/screens/home/index.js.map +1 -1
  49. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js +1 -1
  50. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.flow +1 -1
  51. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.map +1 -1
  52. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  53. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +1 -1
  54. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
  55. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
  56. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +1 -1
  57. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  58. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
  59. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +1 -1
  60. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  61. package/lib/module/components/AlertLoan.js +1 -1
  62. package/lib/module/components/AlertLoan.js.map +1 -1
  63. package/lib/module/components/AppModal.js +1 -1
  64. package/lib/module/components/AppModal.js.map +1 -1
  65. package/lib/module/components/ItemTimaOne.js +1 -1
  66. package/lib/module/components/ItemTimaOne.js.map +1 -1
  67. package/lib/module/components/ModalNotification/AlertGlobal.js +1 -1
  68. package/lib/module/components/ModalNotification/AlertGlobal.js.map +1 -1
  69. package/lib/module/components/ModalNotification/index.js +1 -1
  70. package/lib/module/components/ModalNotification/index.js.map +1 -1
  71. package/lib/module/components/ModalOptionLoan.js +1 -1
  72. package/lib/module/components/ModalOptionLoan.js.map +1 -1
  73. package/lib/module/components/ModalOptionLoanDigital.js +1 -1
  74. package/lib/module/components/ModalOptionLoanDigital.js.map +1 -1
  75. package/lib/module/components/modalStack.js +2 -0
  76. package/lib/module/components/modalStack.js.map +1 -0
  77. package/lib/module/screens/camera/index.js +1 -1
  78. package/lib/module/screens/camera/index.js.map +1 -1
  79. package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
  80. package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
  81. package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
  82. package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
  83. package/lib/module/screens/digital-lending/Step6.js +1 -1
  84. package/lib/module/screens/digital-lending/Step6.js.map +1 -1
  85. package/lib/module/screens/eSign/index.js +1 -1
  86. package/lib/module/screens/eSign/index.js.map +1 -1
  87. package/lib/module/screens/home/DigitalTopupItem.js +1 -1
  88. package/lib/module/screens/home/DigitalTopupItem.js.map +1 -1
  89. package/lib/module/screens/home/ItemMotoBikeLoan.js +1 -1
  90. package/lib/module/screens/home/ItemMotoBikeLoan.js.map +1 -1
  91. package/lib/module/screens/home/index.js +1 -1
  92. package/lib/module/screens/home/index.js.map +1 -1
  93. package/lib/module/screens/payment-evidence/ModalGuideline.js +1 -1
  94. package/lib/module/screens/payment-evidence/ModalGuideline.js.map +1 -1
  95. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  96. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
  97. package/lib/module/screens/toan-trinh-so/RegisterCamera.js +1 -1
  98. package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  99. package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
  100. package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  101. package/lib/typescript/components/AppModal.d.ts +6 -1
  102. package/lib/typescript/components/AppModal.d.ts.map +1 -1
  103. package/lib/typescript/components/ModalNotification/AlertGlobal.d.ts +20 -4
  104. package/lib/typescript/components/ModalNotification/AlertGlobal.d.ts.map +1 -1
  105. package/lib/typescript/components/ModalNotification/index.d.ts +6 -1
  106. package/lib/typescript/components/ModalNotification/index.d.ts.map +1 -1
  107. package/lib/typescript/components/modalStack.d.ts +11 -0
  108. package/lib/typescript/components/modalStack.d.ts.map +1 -0
  109. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  110. package/package.json +1 -1
  111. package/src/components/AlertLoan.tsx +1 -1
  112. package/src/components/AppModal.tsx +40 -2
  113. package/src/components/ItemTimaOne.tsx +1 -1
  114. package/src/components/ModalNotification/AlertGlobal.tsx +92 -33
  115. package/src/components/ModalNotification/index.tsx +7 -0
  116. package/src/components/ModalOptionLoan.tsx +1 -1
  117. package/src/components/ModalOptionLoanDigital.tsx +1 -1
  118. package/src/components/modalStack.ts +47 -0
  119. package/src/screens/camera/index.tsx +1 -1
  120. package/src/screens/detail-loan/PaymentInfo.tsx +1 -1
  121. package/src/screens/detail-loan/ShowQrCode.tsx +1 -1
  122. package/src/screens/digital-lending/Step6.tsx +1 -1
  123. package/src/screens/eSign/index.tsx +1 -1
  124. package/src/screens/home/DigitalTopupItem.tsx +1 -1
  125. package/src/screens/home/ItemMotoBikeLoan.tsx +1 -1
  126. package/src/screens/home/index.tsx +33 -19
  127. package/src/screens/payment-evidence/ModalGuideline.tsx +1 -1
  128. package/src/screens/toan-trinh-so/OCR.tsx +1 -1
  129. package/src/screens/toan-trinh-so/RegisterCamera.tsx +1 -1
  130. package/src/screens/toan-trinh-so/VehicleCamera.tsx +1 -1
@@ -1,10 +1,12 @@
1
1
  //@ts-nocheck
2
- import React, { useEffect, useRef, useState } from 'react';
2
+ import React, { useEffect, useState } from 'react';
3
+ import { Dimensions, Platform, StyleSheet, View } from 'react-native';
4
+ import { addModalStackListener, getTopModalId } from '../modalStack';
3
5
  import ModalNotification, { ModalNotificationProps } from './index';
4
6
 
5
7
  export type AlertGlobalOptions = Omit<
6
8
  ModalNotificationProps,
7
- 'open' | 'onModalHide'
9
+ 'open' | 'onModalHide' | 'coverScreen'
8
10
  > & {
9
11
  /** false => bấm nút không tự đóng modal (mặc định true) */
10
12
  autoDismiss?: boolean;
@@ -12,15 +14,19 @@ export type AlertGlobalOptions = Omit<
12
14
  dismissable?: boolean;
13
15
  };
14
16
 
15
- interface AlertController {
16
- show: (options: AlertGlobalOptions) => void;
17
- hide: () => void;
18
- }
17
+ // ===== State giữ ở module-level để mọi outlet cùng đọc chung =====
18
+ let alertVisible = false;
19
+ let alertOptions: AlertGlobalOptions = { title: '' };
20
+ // Callback chờ modal đóng xong animation mới được gọi
21
+ let pendingCallback: (() => void) | undefined;
22
+ const listeners = new Set<() => void>();
19
23
 
20
- let alertController: AlertController | null = null;
24
+ function notify() {
25
+ listeners.forEach((listener) => listener());
26
+ }
21
27
 
22
28
  /**
23
- * Alert dùng chung toàn app, gọi được từ mọi nơi (kể cả ngoài component):
29
+ * Alert dùng chung toàn SDK, gọi được từ mọi nơi (kể cả ngoài component):
24
30
  *
25
31
  * AlertGlobal.show({
26
32
  * type: 'confirm',
@@ -33,38 +39,73 @@ let alertController: AlertController | null = null;
33
39
  *
34
40
  * Mặc định bấm nút / backdrop sẽ tự đóng modal rồi mới chạy callback
35
41
  * (callback chạy sau khi animation đóng xong => có thể mở tiếp modal khác).
36
- * Yêu cầu <AlertGlobalHost /> đã được mount trong App.tsx.
42
+ * Yêu cầu <AlertGlobalHost /> đã được mount root (RNTimacare).
37
43
  */
38
44
  export const AlertGlobal = {
39
45
  show(options: AlertGlobalOptions) {
40
- alertController?.show(options);
46
+ pendingCallback = undefined;
47
+ alertOptions = options;
48
+ alertVisible = true;
49
+ notify();
41
50
  },
42
51
  hide() {
43
- alertController?.hide();
52
+ alertVisible = false;
53
+ notify();
44
54
  },
45
55
  };
46
56
 
47
- /** Mount 1 lần duy nhất App.tsx */
48
- export function AlertGlobalHost() {
49
- const [visible, setVisible] = useState(false);
50
- const [options, setOptions] = useState<AlertGlobalOptions>({ title: '' });
51
- // Callback chờ modal đóng xong animation mới được gọi
52
- const pendingCallback = useRef<(() => void) | undefined>(undefined);
53
-
57
+ /** Re-render khi alert state hoặc modal stack thay đổi */
58
+ function useAlertGlobalState() {
59
+ const [, setTick] = useState(0);
54
60
  useEffect(() => {
55
- alertController = {
56
- show: (opts) => {
57
- pendingCallback.current = undefined;
58
- setOptions(opts);
59
- setVisible(true);
60
- },
61
- hide: () => setVisible(false),
62
- };
61
+ const rerender = () => setTick((tick) => tick + 1);
62
+ listeners.add(rerender);
63
+ const unsubscribeStack = addModalStackListener(rerender);
63
64
  return () => {
64
- alertController = null;
65
+ listeners.delete(rerender);
66
+ unsubscribeStack();
65
67
  };
66
68
  }, []);
69
+ }
70
+
71
+ interface OutletProps {
72
+ /** id của AppModal chứa outlet này; không truyền = outlet gốc ở root */
73
+ modalId?: number | null;
74
+ }
75
+
76
+ /**
77
+ * Điểm render thực tế của alert global. Có mặt ở 2 nơi:
78
+ * - AlertGlobalHost (root RNTimacare) — dùng khi không có modal nào đang mở
79
+ * - bên trong mỗi AppModal — dùng khi modal đó đang mở trên cùng (chỉ iOS)
80
+ *
81
+ * iOS không present được 2 native modal chồng nhau (treo app), nên khi có modal
82
+ * khác đang mở, alert được render dạng View thường (coverScreen=false) bên trong
83
+ * modal trên cùng => luôn nằm trên nội dung modal và bấm được bình thường.
84
+ * Android cho phép các Dialog chồng nhau nên luôn dùng native modal ở outlet gốc.
85
+ */
86
+ export function AlertGlobalOutlet({ modalId = null }: OutletProps) {
87
+ useAlertGlobalState();
67
88
 
89
+ if (Platform.OS !== 'ios') {
90
+ return modalId === null ? <AlertRenderer coverScreen /> : null;
91
+ }
92
+
93
+ if (getTopModalId() !== modalId) {
94
+ return null;
95
+ }
96
+ if (modalId === null) {
97
+ return <AlertRenderer coverScreen={false} />;
98
+ }
99
+ // Nội dung modal của react-native-modal có margin mặc định (5% chiều ngang),
100
+ // nới ngược lại để backdrop của alert phủ kín màn hình
101
+ return (
102
+ <View style={styles.insideModalWrapper} pointerEvents="box-none">
103
+ <AlertRenderer coverScreen={false} />
104
+ </View>
105
+ );
106
+ }
107
+
108
+ function AlertRenderer({ coverScreen }: { coverScreen: boolean }) {
68
109
  const {
69
110
  autoDismiss = true,
70
111
  dismissable = true,
@@ -72,29 +113,47 @@ export function AlertGlobalHost() {
72
113
  onPrimaryPress,
73
114
  onSecondaryPress,
74
115
  ...rest
75
- } = options;
116
+ } = alertOptions;
76
117
 
77
118
  const dismissThen = (callback?: () => void) => {
78
119
  if (!autoDismiss) {
79
120
  callback?.();
80
121
  return;
81
122
  }
82
- pendingCallback.current = callback;
83
- setVisible(false);
123
+ pendingCallback = callback;
124
+ AlertGlobal.hide();
84
125
  };
85
126
 
86
127
  return (
87
128
  <ModalNotification
88
129
  {...rest}
89
- open={visible}
130
+ open={alertVisible}
131
+ coverScreen={coverScreen}
90
132
  onClose={dismissable ? () => dismissThen(onClose) : undefined}
91
133
  onPrimaryPress={() => dismissThen(onPrimaryPress)}
92
134
  onSecondaryPress={() => dismissThen(onSecondaryPress)}
93
135
  onModalHide={() => {
94
- const callback = pendingCallback.current;
95
- pendingCallback.current = undefined;
136
+ const callback = pendingCallback;
137
+ pendingCallback = undefined;
96
138
  callback?.();
97
139
  }}
98
140
  />
99
141
  );
100
142
  }
143
+
144
+ /** Mount 1 lần duy nhất ở root (RNTimacare) */
145
+ export function AlertGlobalHost() {
146
+ return <AlertGlobalOutlet />;
147
+ }
148
+
149
+ const DEFAULT_MODAL_MARGIN = Dimensions.get('window').width * 0.05;
150
+
151
+ const styles = StyleSheet.create({
152
+ insideModalWrapper: {
153
+ position: 'absolute',
154
+ top: -DEFAULT_MODAL_MARGIN,
155
+ left: -DEFAULT_MODAL_MARGIN,
156
+ right: -DEFAULT_MODAL_MARGIN,
157
+ bottom: -DEFAULT_MODAL_MARGIN,
158
+ },
159
+ });
@@ -57,6 +57,11 @@ export interface ModalNotificationProps {
57
57
  onSecondaryPress?: () => void;
58
58
  /** Gọi sau khi modal đã đóng xong animation (dùng cho AlertGlobal) */
59
59
  onModalHide?: () => void;
60
+ /**
61
+ * false => render bằng View thường thay vì native Modal
62
+ * (dùng cho AlertGlobal trên iOS để tránh xung đột khi đã có modal khác mở)
63
+ */
64
+ coverScreen?: boolean;
60
65
  }
61
66
 
62
67
  /**
@@ -81,6 +86,7 @@ export default function ModalNotification({
81
86
  secondaryText,
82
87
  onSecondaryPress,
83
88
  onModalHide,
89
+ coverScreen = true,
84
90
  }: ModalNotificationProps) {
85
91
  const IconByType = ICON_BY_TYPE[type];
86
92
  const iconGradient = ICON_GRADIENT_BY_TYPE[type];
@@ -94,6 +100,7 @@ export default function ModalNotification({
94
100
  onBackdropPress={onClose}
95
101
  onBackButtonPress={onClose}
96
102
  onModalHide={onModalHide}
103
+ coverScreen={coverScreen}
97
104
  >
98
105
  <View style={styles.container}>
99
106
  {!!iconGradient && (
@@ -8,7 +8,7 @@ import {
8
8
  View,
9
9
  ViewStyle,
10
10
  } from 'react-native';
11
- import Modal from 'react-native-modal';
11
+ import Modal from './AppModal';
12
12
  import { AlertGlobal } from './ModalNotification/AlertGlobal';
13
13
  import { MText } from './MText';
14
14
  import MButton from './MButton';
@@ -8,7 +8,7 @@ import {
8
8
  View,
9
9
  ViewStyle,
10
10
  } from 'react-native';
11
- import Modal from 'react-native-modal';
11
+ import Modal from './AppModal';
12
12
  import { AlertGlobal } from './ModalNotification/AlertGlobal';
13
13
  import { MText } from './MText';
14
14
  import MButton from './MButton';
@@ -0,0 +1,47 @@
1
+ //@ts-nocheck
2
+ /**
3
+ * Theo dõi các native modal (dựng qua AppModal) đang hiển thị trên toàn SDK.
4
+ * AlertGlobal dựa vào đây để quyết định render alert ở đâu:
5
+ * bên trong modal đang mở trên cùng (iOS) hay ở root khi không có modal nào.
6
+ */
7
+ let nextModalId = 1;
8
+ let stack: number[] = [];
9
+ const listeners = new Set<() => void>();
10
+
11
+ function notify() {
12
+ listeners.forEach((listener) => listener());
13
+ }
14
+
15
+ /** Cấp id duy nhất cho mỗi instance AppModal */
16
+ export function acquireModalId(): number {
17
+ return nextModalId++;
18
+ }
19
+
20
+ /** Modal bắt đầu hiển thị (chiếm native layer) */
21
+ export function pushModal(id: number) {
22
+ if (!stack.includes(id)) {
23
+ stack = [...stack, id];
24
+ notify();
25
+ }
26
+ }
27
+
28
+ /** Modal đã đóng xong animation hoặc unmount */
29
+ export function popModal(id: number) {
30
+ if (stack.includes(id)) {
31
+ stack = stack.filter((modalId) => modalId !== id);
32
+ notify();
33
+ }
34
+ }
35
+
36
+ /** id của modal đang hiển thị trên cùng, null nếu không có modal nào mở */
37
+ export function getTopModalId(): number | null {
38
+ return stack.length > 0 ? stack[stack.length - 1] : null;
39
+ }
40
+
41
+ /** Lắng nghe thay đổi stack. Trả về hàm unsubscribe. */
42
+ export function addModalStackListener(listener: () => void) {
43
+ listeners.add(listener);
44
+ return () => {
45
+ listeners.delete(listener);
46
+ };
47
+ }
@@ -50,7 +50,7 @@ import { Svg, Circle, Defs, ClipPath, Rect } from 'react-native-svg';
50
50
  import Store from './Store';
51
51
  import { MText } from '../../components/MText';
52
52
  import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
53
- import Modal from 'react-native-modal';
53
+ import Modal from '../../components/AppModal';
54
54
  import LinearGradient from 'react-native-linear-gradient';
55
55
  import RNFS from 'react-native-fs';
56
56
 
@@ -35,7 +35,7 @@ import MHeader from '../../components/MHeader';
35
35
  import ReactNativeBlobUtil from 'react-native-blob-util';
36
36
  import { CameraRoll } from '@react-native-camera-roll/camera-roll';
37
37
  import moment from 'moment';
38
- import ReactNativeModal from 'react-native-modal';
38
+ import ReactNativeModal from '../../components/AppModal';
39
39
  import LinearGradient from 'react-native-linear-gradient';
40
40
  import {
41
41
  TourGuideProvider, // Main provider
@@ -28,7 +28,7 @@ import { CameraRoll } from '@react-native-camera-roll/camera-roll';
28
28
  import ReactNativeBlobUtil from 'react-native-blob-util';
29
29
  import { formatMoney } from '../../utils';
30
30
  import MHeader from '../../components/MHeader';
31
- import ReactNativeModal from 'react-native-modal';
31
+ import ReactNativeModal from '../../components/AppModal';
32
32
  import LinearGradient from 'react-native-linear-gradient';
33
33
  import moment from 'moment';
34
34
  import {
@@ -24,7 +24,7 @@ import {
24
24
  import { MText } from '../../components/MText';
25
25
  import digitalLendingStore from './store';
26
26
  import { ScreenNames } from '../../navigation';
27
- import Modal from 'react-native-modal';
27
+ import Modal from '../../components/AppModal';
28
28
  import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
29
29
 
30
30
  export const Step6 = observer(function Step6() {
@@ -31,7 +31,7 @@ import Slack from 'react-native-slack-webhook';
31
31
  import homeStore from '../home/Store';
32
32
  import appStore from '../../AppStore';
33
33
  import Pdf from 'react-native-pdf';
34
- import Modal from 'react-native-modal';
34
+ import Modal from '../../components/AppModal';
35
35
  import KeyboardSpacer from '../../components/keyboardspace';
36
36
  import Loading from '../../components/Loading';
37
37
  import MHeader from '../../components/MHeader';
@@ -12,7 +12,7 @@ import LinearGradient from 'react-native-linear-gradient';
12
12
  import { IconMoney2, IconQuestion, IconTick } from '../../assets/svgs';
13
13
  import { formatMoney } from '../../utils';
14
14
  import { MText } from '../../components/MText';
15
- import Modal from 'react-native-modal';
15
+ import Modal from '../../components/AppModal';
16
16
  import {
17
17
  IconStep1,
18
18
  IconStep1Disable,
@@ -22,7 +22,7 @@ import {
22
22
  } from '../../assets/v3';
23
23
  import { ScreenNames } from '../../navigation';
24
24
  import { CheckBox, CheckBoxActive, Close2Icon, Info } from '../../assets/icons';
25
- import Modal from 'react-native-modal';
25
+ import Modal from '../../components/AppModal';
26
26
  import { Api } from '../../services/api';
27
27
  import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
28
28
 
@@ -57,7 +57,7 @@ import {
57
57
  RESULTS,
58
58
  } from 'react-native-permissions';
59
59
  import appStore from '../../AppStore';
60
- import Modal from 'react-native-modal';
60
+ import Modal from '../../components/AppModal';
61
61
  import Pdf from 'react-native-pdf';
62
62
  import { Api } from '../../services/api';
63
63
  import { load, save } from '../../utils/storage';
@@ -2647,26 +2647,40 @@ export const Home = observer(function Home() {
2647
2647
  }}
2648
2648
  />
2649
2649
  </View>
2650
- <MText
2651
- style={{ color: '#828282', textAlign: 'center', marginTop: 16 }}
2652
- >
2653
- Tima sẽ chuyển thông tin của bạn đến Ngân hàng TNHH MTV CIMB Việt
2654
- Nam (CIMB) để xem xét phê duyệt khoản vay. Khi chọn "Đồng ý & Tiếp
2655
- tục", bạn đồng ý cho các bên liên quan thu thập, sử dụng, xử lý và
2656
- chia sẻ dữ liệu cá nhân theo quy định của pháp luật; đồng thời cho
2657
- phép Tima gửi{' '}
2650
+ {loanTCCIMB?.typeLoan === 7 ? (
2658
2651
  <MText
2659
- style={{
2660
- fontWeight: '600',
2661
- fontFamily: 'BeVietnamPro-SemiBold',
2662
- }}
2652
+ style={{ color: '#828282', textAlign: 'center', marginTop: 16 }}
2663
2653
  >
2664
- "Thông báo kết quả phê duyệt kết nối vay"
2665
- </MText>{' '}
2666
- đến Đại lý/ Showroom nơi bạn hợp đồng mua xe Ô để hoàn tất
2667
- thủ tục giải ngân. Sau khi chuyển giao dữ liệu, Tima bên kiểm
2668
- soát xử dữ liệu cá nhân.
2669
- </MText>
2654
+ Tima sẽ chuyển thông tin của bạn đến Ngân hàng TNHH MTV CIMB
2655
+ Việt Nam (CIMB) để xem xét phê duyệt khoản vay. Khi chọn "Đồng ý
2656
+ & Tiếp tục", bạn đồng ý cho các bên liên quan thu thập, sử dụng,
2657
+ xử chia sẻ dữ liệu nhân theo quy định của pháp luật;
2658
+ đồng thời cho phép Tima gửi{' '}
2659
+ <MText
2660
+ style={{
2661
+ fontWeight: '600',
2662
+ fontFamily: 'BeVietnamPro-SemiBold',
2663
+ }}
2664
+ >
2665
+ "Thông báo kết quả phê duyệt kết nối vay"
2666
+ </MText>{' '}
2667
+ đến Đại lý/ Showroom nơi bạn ký hợp đồng mua xe Ô tô để hoàn tất
2668
+ thủ tục giải ngân. Sau khi chuyển giao dữ liệu, Tima là bên kiểm
2669
+ soát và xử lý dữ liệu cá nhân.
2670
+ </MText>
2671
+ ) : (
2672
+ <MText
2673
+ style={{ color: '#828282', textAlign: 'center', marginTop: 16 }}
2674
+ >
2675
+ Tima sẽ chuyển thông tin của bạn đến Ngân hàng TNHH MTV CIMB
2676
+ Việt Nam (CIMB) để xem xét phê duyệt khoản vay. Khi chọn "Đồng ý
2677
+ & Tiếp tục", bạn đồng ý cho các bên liên quan thu thập, sử dụng,
2678
+ xử lý và chia sẻ dữ liệu cá nhân theo quy định của pháp luật.
2679
+ Sau khi chuyển giao dữ liệu, Tima là bên kiểm soát và xử lý dữ
2680
+ liệu cá nhân.
2681
+ </MText>
2682
+ )}
2683
+
2670
2684
  <View
2671
2685
  style={{
2672
2686
  flexDirection: 'row',
@@ -1,7 +1,7 @@
1
1
  //@ts-nocheck
2
2
  import React, { useEffect, useState } from 'react';
3
3
  import { SafeAreaView, TouchableOpacity, View } from 'react-native';
4
- import Modal from 'react-native-modal';
4
+ import Modal from '../../components/AppModal';
5
5
  import { CallRed, GuideLineIcon, LineIcon } from '../../assets/icons';
6
6
  import { MText } from '../../components/MText';
7
7
 
@@ -26,7 +26,7 @@ import {
26
26
  openSettings,
27
27
  } from 'react-native-permissions';
28
28
  import { Camera as VisionCamera, useCameraDevices } from 'react-native-vision-camera';
29
- import Modal from 'react-native-modal';
29
+ import Modal from '../../components/AppModal';
30
30
  import LinearGradient from 'react-native-linear-gradient';
31
31
  import { CloseIcon, IconBack, TakePhotoSvg, TimaSmall } from '../../assets/icons';
32
32
  import { useNavigation, useIsFocused } from '@react-navigation/native';
@@ -24,7 +24,7 @@ import {
24
24
  useCameraDevice,
25
25
  useCameraFormat,
26
26
  } from 'react-native-vision-camera';
27
- import Modal from 'react-native-modal';
27
+ import Modal from '../../components/AppModal';
28
28
  import { MText } from '../../components/MText';
29
29
  import LinearGradient from 'react-native-linear-gradient';
30
30
  import { CloseIcon, TakePhotoSvg, TimaSmall } from '../../assets/icons';
@@ -17,7 +17,7 @@ import {
17
17
  ViewStyle,
18
18
  } from 'react-native';
19
19
  import { useNavigation, useIsFocused } from '@react-navigation/native';
20
- import Modal from 'react-native-modal';
20
+ import Modal from '../../components/AppModal';
21
21
  import { MText } from '../../components/MText';
22
22
  import LinearGradient from 'react-native-linear-gradient';
23
23
  import { CloseIcon, IconBack, TakePhotoSvg, TimaSmall } from '../../assets/icons';