react-native-timacare 3.3.11 → 3.3.13

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 (238) hide show
  1. package/lib/commonjs/RNTimacare.js +1 -1
  2. package/lib/commonjs/RNTimacare.js.flow +2 -11
  3. package/lib/commonjs/RNTimacare.js.map +1 -1
  4. package/lib/commonjs/assets/digital_topup/index.js +2 -0
  5. package/lib/commonjs/assets/digital_topup/index.js.flow +28 -0
  6. package/lib/commonjs/assets/digital_topup/index.js.map +1 -0
  7. package/lib/commonjs/assets/digital_topup/step1.svg +31 -0
  8. package/lib/commonjs/assets/digital_topup/step1_disable.svg +31 -0
  9. package/lib/commonjs/assets/digital_topup/step1_success.svg +21 -0
  10. package/lib/commonjs/assets/digital_topup/step2.svg +39 -0
  11. package/lib/commonjs/assets/digital_topup/step2_disable.svg +16 -0
  12. package/lib/commonjs/assets/digital_topup/step2_success.svg +21 -0
  13. package/lib/commonjs/assets/digital_topup/step3.svg +23 -0
  14. package/lib/commonjs/assets/digital_topup/step3_disable.svg +10 -0
  15. package/lib/commonjs/assets/digital_topup/step3_success.svg +21 -0
  16. package/lib/commonjs/assets/digital_topup/step4_disable.svg +16 -0
  17. package/lib/commonjs/assets/digital_topup/step4_success.svg +21 -0
  18. package/lib/commonjs/components/AlertLoan.js +1 -1
  19. package/lib/commonjs/components/AlertLoan.js.flow +1 -1
  20. package/lib/commonjs/components/AlertLoan.js.map +1 -1
  21. package/lib/commonjs/components/ItemTimaOneV3.js +1 -1
  22. package/lib/commonjs/components/ItemTimaOneV3.js.flow +1 -5
  23. package/lib/commonjs/components/ItemTimaOneV3.js.map +1 -1
  24. package/lib/commonjs/components/MHeader.js +1 -1
  25. package/lib/commonjs/components/MHeader.js.flow +3 -2
  26. package/lib/commonjs/components/MHeader.js.map +1 -1
  27. package/lib/commonjs/components/ModalOptionLoan.js +1 -1
  28. package/lib/commonjs/components/ModalOptionLoan.js.flow +4 -2
  29. package/lib/commonjs/components/ModalOptionLoan.js.map +1 -1
  30. package/lib/commonjs/components/ModalOptionLoanDigital.js +2 -0
  31. package/lib/commonjs/components/ModalOptionLoanDigital.js.flow +297 -0
  32. package/lib/commonjs/components/ModalOptionLoanDigital.js.map +1 -0
  33. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  34. package/lib/commonjs/navigation/primary-navigator.js.flow +0 -3
  35. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  36. package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
  37. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +299 -126
  38. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
  39. package/lib/commonjs/screens/detail-loan/QrPayment.js +1 -1
  40. package/lib/commonjs/screens/detail-loan/QrPayment.js.flow +1 -0
  41. package/lib/commonjs/screens/detail-loan/QrPayment.js.map +1 -1
  42. package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
  43. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +1 -1
  44. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
  45. package/lib/commonjs/screens/home/DigitalTopupItem.js +2 -0
  46. package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +562 -0
  47. package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -0
  48. package/lib/commonjs/screens/home/index.js +1 -1
  49. package/lib/commonjs/screens/home/index.js.flow +49 -4
  50. package/lib/commonjs/screens/home/index.js.map +1 -1
  51. package/lib/commonjs/screens/liveness-v2/index.js +1 -1
  52. package/lib/commonjs/screens/liveness-v2/index.js.flow +12 -9
  53. package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
  54. package/lib/commonjs/screens/nationalID/index.js +1 -1
  55. package/lib/commonjs/screens/nationalID/index.js.flow +4 -2
  56. package/lib/commonjs/screens/nationalID/index.js.map +1 -1
  57. package/lib/commonjs/screens/nationalIDBack/index.js +1 -1
  58. package/lib/commonjs/screens/nationalIDBack/index.js.flow +3 -1
  59. package/lib/commonjs/screens/nationalIDBack/index.js.map +1 -1
  60. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  61. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +3 -1
  62. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
  63. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +1 -1
  64. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +1 -375
  65. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  66. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
  67. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.flow +12 -9
  68. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
  69. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js +1 -1
  70. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.flow +16 -10
  71. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
  72. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  73. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +18 -15
  74. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  75. package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
  76. package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.flow +1 -1
  77. package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
  78. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
  79. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +8 -1
  80. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  81. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js +1 -1
  82. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.flow +20 -17
  83. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
  84. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
  85. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.flow +14 -9
  86. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
  87. package/lib/commonjs/screens/uploadVideo/index.js +1 -1
  88. package/lib/commonjs/screens/uploadVideo/index.js.flow +109 -61
  89. package/lib/commonjs/screens/uploadVideo/index.js.map +1 -1
  90. package/lib/commonjs/screens/uploadVideo/videoStore.js +1 -1
  91. package/lib/commonjs/screens/uploadVideo/videoStore.js.flow +4 -4
  92. package/lib/commonjs/screens/uploadVideo/videoStore.js.map +1 -1
  93. package/lib/commonjs/sdkConfig.js +1 -1
  94. package/lib/commonjs/sdkConfig.js.flow +6 -0
  95. package/lib/commonjs/sdkConfig.js.map +1 -1
  96. package/lib/commonjs/services/api/api.js +1 -1
  97. package/lib/commonjs/services/api/api.js.flow +32 -0
  98. package/lib/commonjs/services/api/api.js.map +1 -1
  99. package/lib/module/RNTimacare.js +1 -1
  100. package/lib/module/RNTimacare.js.map +1 -1
  101. package/lib/module/assets/digital_topup/index.js +2 -0
  102. package/lib/module/assets/digital_topup/index.js.map +1 -0
  103. package/lib/module/assets/digital_topup/step1.svg +31 -0
  104. package/lib/module/assets/digital_topup/step1_disable.svg +31 -0
  105. package/lib/module/assets/digital_topup/step1_success.svg +21 -0
  106. package/lib/module/assets/digital_topup/step2.svg +39 -0
  107. package/lib/module/assets/digital_topup/step2_disable.svg +16 -0
  108. package/lib/module/assets/digital_topup/step2_success.svg +21 -0
  109. package/lib/module/assets/digital_topup/step3.svg +23 -0
  110. package/lib/module/assets/digital_topup/step3_disable.svg +10 -0
  111. package/lib/module/assets/digital_topup/step3_success.svg +21 -0
  112. package/lib/module/assets/digital_topup/step4_disable.svg +16 -0
  113. package/lib/module/assets/digital_topup/step4_success.svg +21 -0
  114. package/lib/module/components/AlertLoan.js +1 -1
  115. package/lib/module/components/AlertLoan.js.map +1 -1
  116. package/lib/module/components/ItemTimaOneV3.js +1 -1
  117. package/lib/module/components/ItemTimaOneV3.js.map +1 -1
  118. package/lib/module/components/MHeader.js +1 -1
  119. package/lib/module/components/MHeader.js.map +1 -1
  120. package/lib/module/components/ModalOptionLoan.js +1 -1
  121. package/lib/module/components/ModalOptionLoan.js.map +1 -1
  122. package/lib/module/components/ModalOptionLoanDigital.js +2 -0
  123. package/lib/module/components/ModalOptionLoanDigital.js.map +1 -0
  124. package/lib/module/navigation/primary-navigator.js +1 -1
  125. package/lib/module/navigation/primary-navigator.js.map +1 -1
  126. package/lib/module/screens/camera/CCCDCameraScreen.js +1 -1
  127. package/lib/module/screens/camera/CCCDCameraScreen.js.map +1 -1
  128. package/lib/module/screens/detail-loan/QrPayment.js +1 -1
  129. package/lib/module/screens/detail-loan/QrPayment.js.map +1 -1
  130. package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
  131. package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
  132. package/lib/module/screens/home/DigitalTopupItem.js +2 -0
  133. package/lib/module/screens/home/DigitalTopupItem.js.map +1 -0
  134. package/lib/module/screens/home/index.js +1 -1
  135. package/lib/module/screens/home/index.js.map +1 -1
  136. package/lib/module/screens/liveness-v2/index.js +1 -1
  137. package/lib/module/screens/liveness-v2/index.js.map +1 -1
  138. package/lib/module/screens/nationalID/index.js +1 -1
  139. package/lib/module/screens/nationalID/index.js.map +1 -1
  140. package/lib/module/screens/nationalIDBack/index.js +1 -1
  141. package/lib/module/screens/nationalIDBack/index.js.map +1 -1
  142. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  143. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
  144. package/lib/module/screens/toan-trinh-so/ReviewLoan.js +1 -1
  145. package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  146. package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
  147. package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
  148. package/lib/module/screens/toan-trinh-so/TTSSelfie.js +1 -1
  149. package/lib/module/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
  150. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  151. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  152. package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
  153. package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
  154. package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
  155. package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  156. package/lib/module/screens/toan-trinh-so/VehicleRegistration.js +1 -1
  157. package/lib/module/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
  158. package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
  159. package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
  160. package/lib/module/screens/uploadVideo/index.js +1 -1
  161. package/lib/module/screens/uploadVideo/index.js.map +1 -1
  162. package/lib/module/screens/uploadVideo/videoStore.js +1 -1
  163. package/lib/module/screens/uploadVideo/videoStore.js.map +1 -1
  164. package/lib/module/sdkConfig.js +1 -1
  165. package/lib/module/sdkConfig.js.map +1 -1
  166. package/lib/module/services/api/api.js +1 -1
  167. package/lib/module/services/api/api.js.map +1 -1
  168. package/lib/typescript/RNTimacare.d.ts +1 -1
  169. package/lib/typescript/RNTimacare.d.ts.map +1 -1
  170. package/lib/typescript/assets/digital_topup/index.d.ts +14 -0
  171. package/lib/typescript/assets/digital_topup/index.d.ts.map +1 -0
  172. package/lib/typescript/components/ItemTimaOneV3.d.ts.map +1 -1
  173. package/lib/typescript/components/MHeader.d.ts.map +1 -1
  174. package/lib/typescript/components/ModalOptionLoan.d.ts.map +1 -1
  175. package/lib/typescript/components/ModalOptionLoanDigital.d.ts +9 -0
  176. package/lib/typescript/components/ModalOptionLoanDigital.d.ts.map +1 -0
  177. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  178. package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
  179. package/lib/typescript/screens/detail-loan/QrPayment.d.ts.map +1 -1
  180. package/lib/typescript/screens/home/DigitalTopupItem.d.ts +7 -0
  181. package/lib/typescript/screens/home/DigitalTopupItem.d.ts.map +1 -0
  182. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  183. package/lib/typescript/screens/liveness-v2/index.d.ts.map +1 -1
  184. package/lib/typescript/screens/nationalID/index.d.ts.map +1 -1
  185. package/lib/typescript/screens/nationalIDBack/index.d.ts.map +1 -1
  186. package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
  187. package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -1
  188. package/lib/typescript/screens/toan-trinh-so/TTSNationalIDFront.d.ts.map +1 -1
  189. package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts.map +1 -1
  190. package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -1
  191. package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
  192. package/lib/typescript/screens/toan-trinh-so/VehicleRegistration.d.ts.map +1 -1
  193. package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationFront.d.ts.map +1 -1
  194. package/lib/typescript/screens/uploadVideo/index.d.ts.map +1 -1
  195. package/lib/typescript/sdkConfig.d.ts.map +1 -1
  196. package/lib/typescript/services/api/api.d.ts +32 -0
  197. package/lib/typescript/services/api/api.d.ts.map +1 -1
  198. package/package.json +3 -2
  199. package/src/RNTimacare.tsx +2 -11
  200. package/src/assets/digital_topup/index.tsx +28 -0
  201. package/src/assets/digital_topup/step1.svg +31 -0
  202. package/src/assets/digital_topup/step1_disable.svg +31 -0
  203. package/src/assets/digital_topup/step1_success.svg +21 -0
  204. package/src/assets/digital_topup/step2.svg +39 -0
  205. package/src/assets/digital_topup/step2_disable.svg +16 -0
  206. package/src/assets/digital_topup/step2_success.svg +21 -0
  207. package/src/assets/digital_topup/step3.svg +23 -0
  208. package/src/assets/digital_topup/step3_disable.svg +10 -0
  209. package/src/assets/digital_topup/step3_success.svg +21 -0
  210. package/src/assets/digital_topup/step4_disable.svg +16 -0
  211. package/src/assets/digital_topup/step4_success.svg +21 -0
  212. package/src/components/AlertLoan.tsx +1 -1
  213. package/src/components/ItemTimaOneV3.tsx +1 -5
  214. package/src/components/MHeader.tsx +3 -2
  215. package/src/components/ModalOptionLoan.tsx +4 -2
  216. package/src/components/ModalOptionLoanDigital.tsx +297 -0
  217. package/src/navigation/primary-navigator.tsx +0 -3
  218. package/src/screens/camera/CCCDCameraScreen.tsx +299 -126
  219. package/src/screens/detail-loan/QrPayment.tsx +1 -0
  220. package/src/screens/detail-loan/ShowQrCode.tsx +1 -1
  221. package/src/screens/home/DigitalTopupItem.tsx +562 -0
  222. package/src/screens/home/index.tsx +49 -4
  223. package/src/screens/liveness-v2/index.tsx +12 -9
  224. package/src/screens/nationalID/index.tsx +4 -2
  225. package/src/screens/nationalIDBack/index.tsx +3 -1
  226. package/src/screens/toan-trinh-so/OCR.tsx +3 -1
  227. package/src/screens/toan-trinh-so/ReviewLoan.tsx +1 -375
  228. package/src/screens/toan-trinh-so/TTSNationalIDFront.tsx +12 -9
  229. package/src/screens/toan-trinh-so/TTSSelfie.tsx +16 -10
  230. package/src/screens/toan-trinh-so/TTSSignLoan.tsx +18 -15
  231. package/src/screens/toan-trinh-so/TopupLoanInfo.tsx +1 -1
  232. package/src/screens/toan-trinh-so/VehicleCamera.tsx +8 -1
  233. package/src/screens/toan-trinh-so/VehicleRegistration.tsx +20 -17
  234. package/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx +14 -9
  235. package/src/screens/uploadVideo/index.tsx +109 -61
  236. package/src/screens/uploadVideo/videoStore.tsx +4 -4
  237. package/src/sdkConfig.ts +6 -0
  238. package/src/services/api/api.ts +32 -0
@@ -57,6 +57,7 @@ const logoView: ImageStyle = {
57
57
  const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
58
58
  const frameWidth = screenWidth * 0.85;
59
59
  const frameHeight = frameWidth * 0.63; // tỷ lệ giống CCCD
60
+ const frameAspectRatio = frameWidth / frameHeight;
60
61
 
61
62
  export const NationalID = observer(function NationalID(props: any) {
62
63
  const navigation = useNavigation();
@@ -99,7 +100,7 @@ export const NationalID = observer(function NationalID(props: any) {
99
100
  (data) => {
100
101
  if (data === 1) {
101
102
  navigation.push(ScreenNames.CCCDCameraScreen, {
102
- front: false,
103
+ front: true,
103
104
  callback: (photo) => {
104
105
  setPhoto(photo);
105
106
  },
@@ -163,7 +164,7 @@ export const NationalID = observer(function NationalID(props: any) {
163
164
  <View
164
165
  style={{
165
166
  width: '100%',
166
- height: frameHeight,
167
+ aspectRatio: frameAspectRatio,
167
168
  borderWidth: 8,
168
169
  borderRadius: 6,
169
170
  borderColor: '#FFFFFF',
@@ -179,6 +180,7 @@ export const NationalID = observer(function NationalID(props: any) {
179
180
  style={{
180
181
  width: '100%',
181
182
  height: '100%',
183
+ resizeMode: 'cover',
182
184
  }}
183
185
  />
184
186
  </View>
@@ -42,6 +42,7 @@ const logoView: ImageStyle = {
42
42
  const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
43
43
  const frameWidth = screenWidth * 0.85;
44
44
  const frameHeight = frameWidth * 0.63; // tỷ lệ giống CCCD
45
+ const frameAspectRatio = frameWidth / frameHeight;
45
46
 
46
47
  export const NationalIDBack = observer(function NationalIDBack(props: any) {
47
48
  const navigation = useNavigation();
@@ -143,7 +144,7 @@ export const NationalIDBack = observer(function NationalIDBack(props: any) {
143
144
  <View
144
145
  style={{
145
146
  width: '100%',
146
- height: frameHeight,
147
+ aspectRatio: frameAspectRatio,
147
148
  borderWidth: 8,
148
149
  borderRadius: 6,
149
150
  borderColor: '#FFFFFF',
@@ -159,6 +160,7 @@ export const NationalIDBack = observer(function NationalIDBack(props: any) {
159
160
  style={{
160
161
  width: '100%',
161
162
  height: '100%',
163
+ resizeMode: 'cover',
162
164
  }}
163
165
  />
164
166
  </View>
@@ -50,10 +50,12 @@ import DeviceInfo from 'react-native-device-info';
50
50
  import { IconUpload } from '../../assets/svgs';
51
51
  import ImagePicker from 'react-native-image-crop-picker';
52
52
  import { launchImageLibrary } from 'react-native-image-picker';
53
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
53
54
 
54
55
  const { NFCReader } = NativeModules;
55
56
 
56
57
  export const OCR = observer(function OCR(props: any) {
58
+ const insets = useSafeAreaInsets();
57
59
  const isFocused = useIsFocused();
58
60
  const [isLoading, setIsLoading] = useState(false);
59
61
  const navigation = useNavigation();
@@ -379,7 +381,7 @@ export const OCR = observer(function OCR(props: any) {
379
381
  style={{
380
382
  alignItems: 'center',
381
383
  position: 'absolute',
382
- top: DeviceInfo.hasNotch() ? 70 : 24,
384
+ top: insets.top + 16,
383
385
  left: 0,
384
386
  right: 0,
385
387
  zIndex: 100,
@@ -222,7 +222,7 @@ export default function ReviewLoan(props: any) {
222
222
 
223
223
  return (
224
224
  <View style={{ flex: 1 }}>
225
- <MHeader title="Vay trực tuyến 24/7" />
225
+ <MHeader title="Vay Online 24/7" />
226
226
  <View style={commonStyles.fill}>
227
227
  <View style={$h} />
228
228
  <View style={$bg}>
@@ -653,380 +653,6 @@ export default function ReviewLoan(props: any) {
653
653
  </MText>
654
654
  </View>
655
655
  </View>
656
-
657
- {/* <MText style={[$title2, { marginTop: 10 }]}>
658
- 2.2 Thông tin giải ngân
659
- </MText>
660
- <MText style={$label}>Ngân hàng</MText>
661
- <TouchableOpacity
662
- style={$select}
663
- onPress={() => {
664
- navigation.push(ScreenNames.CommonSelect, {
665
- title: 'Chọn ngân hàng',
666
- data: ttsStore.listBank,
667
- callback: (value) => {
668
- setFieldValue('bankName', value.name);
669
- setFieldValue('bankId', value.id);
670
- },
671
- });
672
- }}
673
- >
674
- <MText
675
- numberOfLines={1}
676
- style={{
677
- color: '#333333',
678
- fontSize: 16,
679
- fontWeight: '500',
680
- flex: 1,
681
- fontFamily: 'BeVietnamPro-Medium',
682
- }}
683
- >
684
- {values.bankName}
685
- </MText>
686
- <DropDown2 />
687
- </TouchableOpacity>
688
- {errors && errors.bankName && (
689
- <MText style={$error}>{errors.bankName}</MText>
690
- )}
691
- <MText style={[$label, { marginTop: 16 }]}>
692
- Tên số tài khoản
693
- </MText>
694
- <TextInput
695
- numberOfLines={1}
696
- style={[
697
- $textInput,
698
- {
699
- color: '#333333',
700
- fontSize: 16,
701
- fontWeight: '500',
702
- },
703
- ]}
704
- value={values.bankAccountName}
705
- onChangeText={handleChange('bankAccountName')}
706
- />
707
- {errors && errors.bankAccountName && (
708
- <MText style={$error}>{errors.bankAccountName}</MText>
709
- )}
710
- <MText style={[$label, { marginTop: 16 }]}>Số tài khoản</MText>
711
- <TextInput
712
- keyboardType="number-pad"
713
- numberOfLines={1}
714
- style={[
715
- $textInput,
716
- {
717
- color: '#333333',
718
- fontSize: 16,
719
- fontWeight: '500',
720
- },
721
- ]}
722
- value={values.bankAccountNumber}
723
- onChangeText={handleChange('bankAccountNumber')}
724
- />
725
- {errors && errors.bankAccountNumber && (
726
- <MText style={$error}>{errors.bankAccountNumber}</MText>
727
- )}
728
-
729
- <MText style={[$title2, { marginTop: 10 }]}>
730
- 2.3 Thông tin tài sản
731
- </MText>
732
- <View style={$row}>
733
- <View style={{ flex: 1 }}>
734
- <MText style={$label}>Hãng xe</MText>
735
- <TouchableOpacity
736
- style={$select}
737
- onPress={() => {
738
- navigation.push(ScreenNames.CommonSelect, {
739
- title: 'Hãng xe',
740
- data: ttsStore.listBrand,
741
- callback: (value) => {
742
- setFieldValue('brand', value.name);
743
- setFieldValue('yearCar', null);
744
- setFieldValue('vehicles', null);
745
- ttsStore.getListYearCar(value.name);
746
- },
747
- });
748
- }}
749
- >
750
- <MText
751
- numberOfLines={1}
752
- style={{
753
- color: '#333333',
754
- fontSize: 16,
755
- fontWeight: '500',
756
- flex: 1,
757
- fontFamily: 'BeVietnamPro-Medium',
758
- }}
759
- >
760
- {values?.brand}
761
- </MText>
762
- <DropDown2 />
763
- </TouchableOpacity>
764
- {errors && errors.brand && (
765
- <MText style={$error}>{errors.brand}</MText>
766
- )}
767
- </View>
768
- <View style={{ flex: 1 }}>
769
- <MText style={$label}>Năm sản xuất</MText>
770
- <TouchableOpacity
771
- style={$select}
772
- onPress={() => {
773
- navigation.push(ScreenNames.CommonSelect, {
774
- title: 'Năm sản xuất',
775
- data: ttsStore.listYear,
776
- callback: (value) => {
777
- setFieldValue('yearCar', value.name);
778
- setFieldValue('vehicles', null);
779
- ttsStore.getListCar(values.brand, value.name);
780
- },
781
- });
782
- }}
783
- >
784
- <MText
785
- numberOfLines={1}
786
- style={{
787
- color: '#333333',
788
- fontSize: 16,
789
- fontWeight: '500',
790
- flex: 1,
791
- fontFamily: 'BeVietnamPro-Medium',
792
- }}
793
- >
794
- {values?.yearCar}
795
- </MText>
796
- <DropDown2 />
797
- </TouchableOpacity>
798
- {errors && errors.yearCar && (
799
- <MText style={$error}>{errors.yearCar}</MText>
800
- )}
801
- </View>
802
- </View>
803
- <MText style={$label}>Tên xe/ Phiên bản xe</MText>
804
- <TouchableOpacity
805
- style={$select}
806
- onPress={() => {
807
- navigation.push(ScreenNames.CommonSelect, {
808
- title: 'Tên xe/ Phiên bản xe',
809
- data: ttsStore.listCar,
810
- callback: (value) => {
811
- setFieldValue('vehicles', value.name);
812
- },
813
- });
814
- }}
815
- >
816
- <MText
817
- numberOfLines={1}
818
- style={{
819
- color: '#333333',
820
- fontSize: 16,
821
- fontWeight: '500',
822
- flex: 1,
823
- fontFamily: 'BeVietnamPro-Medium',
824
- }}
825
- >
826
- {values.vehicles}
827
- </MText>
828
- <DropDown2 />
829
- </TouchableOpacity>
830
- {errors && errors.vehicles && (
831
- <MText style={$error}>{errors.vehicles}</MText>
832
- )}
833
-
834
- <MText style={[$label, { marginTop: 16 }]}>Số khung</MText>
835
- <TextInput
836
- numberOfLines={1}
837
- style={[
838
- $textInput,
839
- {
840
- color: '#333333',
841
- fontSize: 16,
842
- fontWeight: '500',
843
- },
844
- ]}
845
- value={values.chassis}
846
- onChangeText={handleChange('chassis')}
847
- />
848
- {errors && errors.chassis && (
849
- <MText style={$error}>{errors.chassis}</MText>
850
- )}
851
-
852
- <View style={[$row, { marginTop: 16 }]}>
853
- <View style={{ flex: 1 }}>
854
- <MText style={$label}>Biển số xe</MText>
855
- <TextInput
856
- numberOfLines={1}
857
- style={[
858
- $textInput,
859
- {
860
- color: '#333333',
861
- fontSize: 16,
862
- fontWeight: '500',
863
- },
864
- ]}
865
- value={values.plateNumber}
866
- onChangeText={handleChange('plateNumber')}
867
- />
868
- {errors && errors.plateNumber && (
869
- <MText style={$error}>{errors.plateNumber}</MText>
870
- )}
871
- </View>
872
- <View style={{ flex: 1 }}>
873
- <MText style={$label}>Số máy</MText>
874
- <TextInput
875
- numberOfLines={1}
876
- style={[
877
- $textInput,
878
- {
879
- color: '#333333',
880
- fontSize: 16,
881
- fontWeight: '500',
882
- },
883
- ]}
884
- value={values.engine}
885
- onChangeText={handleChange('engine')}
886
- />
887
- {errors && errors.engine && (
888
- <MText style={$error}>{errors.engine}</MText>
889
- )}
890
- </View>
891
- </View>
892
-
893
- <MText style={$label}>Họ tên chủ xe</MText>
894
- <TextInput
895
- numberOfLines={1}
896
- style={[
897
- $textInput,
898
- {
899
- color: '#333333',
900
- fontSize: 16,
901
- fontWeight: '500',
902
- },
903
- ]}
904
- value={values.ownerFullName}
905
- onChangeText={handleChange('ownerFullName')}
906
- />
907
- {errors && errors.ownerFullName && (
908
- <MText style={$error}>{errors.ownerFullName}</MText>
909
- )}
910
-
911
- <View style={[$row, { marginTop: 16 }]}>
912
- <View style={{ flex: 1 }}>
913
- <MText style={$label}>Số đăng ký xe</MText>
914
- <TextInput
915
- numberOfLines={1}
916
- style={[
917
- $textInput,
918
- {
919
- color: '#333333',
920
- fontSize: 16,
921
- fontWeight: '500',
922
- },
923
- ]}
924
- value={values.motobikeCertificateNumber}
925
- onChangeText={handleChange('motobikeCertificateNumber')}
926
- />
927
- {errors && errors.motobikeCertificateNumber && (
928
- <MText style={$error}>
929
- {errors.motobikeCertificateNumber}
930
- </MText>
931
- )}
932
- </View>
933
- <View style={{ flex: 1 }}>
934
- <MText style={$label}>Ngày đăng ký</MText>
935
- <TextInput
936
- numberOfLines={1}
937
- style={[
938
- $textInput,
939
- {
940
- color: '#333333',
941
- fontSize: 16,
942
- fontWeight: '500',
943
- },
944
- ]}
945
- placeholder="DD/MM/YYYY"
946
- placeholderTextColor="#BDBDBD"
947
- value={values.motobikeCertificateDate}
948
- onChangeText={handleChange('motobikeCertificateDate')}
949
- />
950
- {errors && errors.motobikeCertificateDate && (
951
- <MText style={$error}>
952
- {errors.motobikeCertificateDate}
953
- </MText>
954
- )}
955
- </View>
956
- </View>
957
- <View style={[$row]}>
958
- <View style={{ flex: 1 }}>
959
- <MText style={$label}>Loại tài sản</MText>
960
- <TouchableOpacity
961
- style={$select}
962
- onPress={() => {
963
- navigation.push(ScreenNames.MSelect, {
964
- title: 'Loại tài sản',
965
- data: EnumTypeAsset,
966
- callback: (value) => {
967
- setFieldValue('typeLoanBrief', value.id);
968
- },
969
- });
970
- }}
971
- >
972
- <MText
973
- numberOfLines={1}
974
- style={{
975
- color: '#333333',
976
- fontSize: 16,
977
- fontWeight: '500',
978
- flex: 1,
979
- fontFamily: 'BeVietnamPro-Medium',
980
- }}
981
- >
982
- {
983
- EnumTypeAsset.find(
984
- (x) => x.id === values.typeLoanBrief
985
- )?.name
986
- }
987
- </MText>
988
- <DropDown2 />
989
- </TouchableOpacity>
990
- {errors && errors.typeLoanBrief && (
991
- <MText style={$error}>{errors.typeLoanBrief}</MText>
992
- )}
993
- </View>
994
- <View style={{ flex: 1 }}>
995
- <MText style={$label}>Loại xe</MText>
996
- <TouchableOpacity
997
- style={$select}
998
- onPress={() => {
999
- navigation.push(ScreenNames.MSelect, {
1000
- title: 'Loại xe',
1001
- data: EnumTypeCar,
1002
- callback: (value) => {
1003
- setFieldValue('carTypeId', value.id);
1004
- },
1005
- });
1006
- }}
1007
- >
1008
- <MText
1009
- numberOfLines={1}
1010
- style={{
1011
- color: '#333333',
1012
- fontSize: 16,
1013
- fontWeight: '500',
1014
- flex: 1,
1015
- fontFamily: 'BeVietnamPro-Medium',
1016
- }}
1017
- >
1018
- {
1019
- EnumTypeCar.find((x) => x.id === values.carTypeId)
1020
- ?.name
1021
- }
1022
- </MText>
1023
- <DropDown2 />
1024
- </TouchableOpacity>
1025
- {errors && errors.carTypeId && (
1026
- <MText style={$error}>{errors.carTypeId}</MText>
1027
- )}
1028
- </View>
1029
- </View> */}
1030
656
  </ScrollView>
1031
657
  )}
1032
658
  </Formik>
@@ -47,18 +47,21 @@ export const TTSNationalIDFront = observer(function TTSNationalIDFront(props) {
47
47
  const [photo, setPhoto] = useState(null);
48
48
  const [isLoading, setIsLoading] = useState(false);
49
49
 
50
- useEffect(async () => {
50
+ useEffect(() => {
51
51
  if (props?.route?.params?.uri) {
52
52
  setPhoto(props?.route?.params?.uri);
53
53
  }
54
- await logEvent('cccd_started', {
55
- event: 'cccd_started',
56
- createdAt: new Date(),
57
- deviceId: appStore.deviceId,
58
- loanId: String(props.route?.params?.loan?.id),
59
- utmSource: props.route?.params?.loan?.utmSource,
60
- });
61
- logEventFb('cccd_started');
54
+ const trackEvent = async () => {
55
+ await logEvent('cccd_started', {
56
+ event: 'cccd_started',
57
+ createdAt: new Date(),
58
+ deviceId: appStore.deviceId,
59
+ loanId: String(props.route?.params?.loan?.id),
60
+ utmSource: props.route?.params?.loan?.utmSource,
61
+ });
62
+ logEventFb('cccd_started');
63
+ };
64
+ trackEvent();
62
65
  }, []);
63
66
 
64
67
  const takePhoto = () => {
@@ -124,16 +124,19 @@ export default function TTSSelfie(props: any) {
124
124
  });
125
125
  };
126
126
 
127
- useEffect(async () => {
127
+ useEffect(() => {
128
128
  requestPermissions();
129
- await logEvent('cccd_completed', {
130
- event: 'cccd_completed',
131
- createdAt: new Date(),
132
- deviceId: appStore.deviceId,
133
- loanId: String(props?.route?.params?.loan?.id),
134
- utmSource: props?.route?.params?.loan?.utmSource,
135
- });
136
- logEventFb('cccd_completed');
129
+ const trackEvent = async () => {
130
+ await logEvent('cccd_completed', {
131
+ event: 'cccd_completed',
132
+ createdAt: new Date(),
133
+ deviceId: appStore.deviceId,
134
+ loanId: String(props?.route?.params?.loan?.id),
135
+ utmSource: props?.route?.params?.loan?.utmSource,
136
+ });
137
+ logEventFb('cccd_completed');
138
+ };
139
+ trackEvent();
137
140
  }, []);
138
141
 
139
142
  useEffect(() => {
@@ -176,7 +179,10 @@ export default function TTSSelfie(props: any) {
176
179
  setIsLoading(false);
177
180
  if (response.kind === 'ok') {
178
181
  if (response.data?.meta.errorCode === 200) {
179
- if (props?.route?.params?.loan?.typeLoan === 6) {
182
+ if (
183
+ props?.route?.params?.loan?.typeLoan === 6 ||
184
+ props?.route?.params?.loan?.typeLoan === 4
185
+ ) {
180
186
  navigation.push(ScreenNames.TopupLoanInfo, {
181
187
  loan: props?.route?.params?.loan,
182
188
  });
@@ -65,23 +65,26 @@ export default function TTSSignLoan(props) {
65
65
  }
66
66
  };
67
67
 
68
- useEffect(async () => {
68
+ useEffect(() => {
69
69
  if (loan) {
70
70
  getContract();
71
- await logEvent('kyhopdong_started', {
72
- event: 'kyhopdong_started',
73
- createdAt: new Date(),
74
- deviceId: appStore.deviceId,
75
- loanId: String(props?.route?.params?.loan?.id),
76
- utmSource: props?.route?.params?.loan?.utmSource,
77
- });
78
- logEventFb('kyhopdong_started', {
79
- event: 'kyhopdong_started',
80
- createdAt: new Date(),
81
- deviceId: appStore.deviceId,
82
- loanId: props?.route?.params?.loan?.id,
83
- utmSource: props?.route?.params?.loan?.utmSource,
84
- });
71
+ const trackEvent = async () => {
72
+ await logEvent('kyhopdong_started', {
73
+ event: 'kyhopdong_started',
74
+ createdAt: new Date(),
75
+ deviceId: appStore.deviceId,
76
+ loanId: String(props?.route?.params?.loan?.id),
77
+ utmSource: props?.route?.params?.loan?.utmSource,
78
+ });
79
+ logEventFb('kyhopdong_started', {
80
+ event: 'kyhopdong_started',
81
+ createdAt: new Date(),
82
+ deviceId: appStore.deviceId,
83
+ loanId: props?.route?.params?.loan?.id,
84
+ utmSource: props?.route?.params?.loan?.utmSource,
85
+ });
86
+ };
87
+ trackEvent();
85
88
  }
86
89
  }, []);
87
90
 
@@ -153,7 +153,7 @@ export default function TopupLoanInfo(props) {
153
153
 
154
154
  return (
155
155
  <View style={{ flex: 1 }}>
156
- <MHeader title="Vay trực tuyến 24/7" />
156
+ <MHeader title="Vay Online 24/7" />
157
157
  <View style={commonStyles.fill}>
158
158
  <View style={$h} />
159
159
  <View style={$bg}>
@@ -50,6 +50,13 @@ const frameTop = ((screenWidth * 4) / 3 - frameHeight) / 2;
50
50
 
51
51
  export default function VehicleCamera(props: any) {
52
52
  const isFocused = useIsFocused();
53
+ const [cameraKey, setCameraKey] = useState(0);
54
+
55
+ useEffect(() => {
56
+ if (isFocused) {
57
+ setCameraKey((prev) => prev + 1);
58
+ }
59
+ }, [isFocused]);
53
60
  const [shouldRenderCamera, setShouldRenderCamera] = useState(false);
54
61
  const navigation = useNavigation();
55
62
  const [showModal, setShowModal] = useState(false);
@@ -191,7 +198,6 @@ export default function VehicleCamera(props: any) {
191
198
 
192
199
  useEffect(() => {
193
200
  let timeout: NodeJS.Timeout;
194
-
195
201
  if (isFocused) {
196
202
  // Delay mounting camera to give Android time to release the previous one
197
203
  timeout = setTimeout(() => {
@@ -257,6 +263,7 @@ export default function VehicleCamera(props: any) {
257
263
  {passPermission && shouldRenderCamera ? (
258
264
  <View style={{ flex: 1 }}>
259
265
  <RNCamera
266
+ key={cameraKey}
260
267
  ref={myCamera}
261
268
  defaultVideoQuality={RNCamera.Constants.VideoQuality['720p']}
262
269
  style={{
@@ -39,26 +39,29 @@ export default function VehicleRegistration(props) {
39
39
  const [photo, setPhoto] = useState(null);
40
40
  const [isLoading, setIsLoading] = useState(false);
41
41
 
42
- useEffect(async () => {
42
+ useEffect(() => {
43
43
  if (props?.route?.params?.uri) {
44
44
  setPhoto(props?.route?.params?.uri);
45
45
  }
46
- await logEvent('dangky_completed', {
47
- event: 'dangky_completed',
48
- createdAt: new Date(),
49
- deviceId: appStore.deviceId,
50
- loanId: String(props?.route?.params?.loan?.id),
51
- utmSource: props?.route?.params?.loan?.utmSource,
52
- });
53
- logEventFb('dangky_completed');
54
- await logEvent('dangkiem_started', {
55
- event: 'dangkiem_started',
56
- createdAt: new Date(),
57
- deviceId: appStore.deviceId,
58
- loanId: String(props?.route?.params?.loan?.id),
59
- utmSource: props?.route?.params?.loan?.utmSource,
60
- });
61
- logEventFb('dangkiem_started');
46
+ const trackStarted = async () => {
47
+ await logEvent('dangky_completed', {
48
+ event: 'dangky_completed',
49
+ createdAt: new Date(),
50
+ deviceId: appStore.deviceId,
51
+ loanId: String(props?.route?.params?.loan?.id),
52
+ utmSource: props?.route?.params?.loan?.utmSource,
53
+ });
54
+ logEventFb('dangky_completed');
55
+ await logEvent('dangkiem_started', {
56
+ event: 'dangkiem_started',
57
+ createdAt: new Date(),
58
+ deviceId: appStore.deviceId,
59
+ loanId: String(props?.route?.params?.loan?.id),
60
+ utmSource: props?.route?.params?.loan?.utmSource,
61
+ });
62
+ logEventFb('dangkiem_started');
63
+ };
64
+ trackStarted();
62
65
  }, []);
63
66
 
64
67
  const takePhoto = () => {