react-native-timacare 3.1.2 → 3.1.3-beta

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 (582) hide show
  1. package/lib/commonjs/assets/icons/cam2.svg +5 -0
  2. package/lib/commonjs/assets/icons/chip.svg +20 -0
  3. package/lib/commonjs/assets/icons/index.js +1 -1
  4. package/lib/commonjs/assets/icons/index.js.flow +8 -0
  5. package/lib/commonjs/assets/icons/index.js.map +1 -1
  6. package/lib/commonjs/assets/icons/ocr.svg +11 -0
  7. package/lib/commonjs/assets/icons/takePhoto.svg +20 -0
  8. package/lib/commonjs/assets/icons/tima_small.svg +12 -23
  9. package/lib/commonjs/assets/svgs/back.svg +4 -0
  10. package/lib/commonjs/assets/svgs/complete.svg +27 -0
  11. package/lib/commonjs/assets/svgs/currentStep.svg +28 -0
  12. package/lib/commonjs/assets/svgs/edit.svg +42 -0
  13. package/lib/commonjs/assets/svgs/edit_success.svg +15 -0
  14. package/lib/commonjs/assets/svgs/ekyc.svg +18 -0
  15. package/lib/commonjs/assets/svgs/ekyc_success.svg +6 -0
  16. package/lib/commonjs/assets/svgs/index.js +2 -0
  17. package/lib/commonjs/assets/svgs/index.js.flow +21 -0
  18. package/lib/commonjs/assets/svgs/index.js.map +1 -0
  19. package/lib/commonjs/assets/svgs/nextStep.svg +21 -0
  20. package/lib/commonjs/assets/svgs/orc_success.svg +11 -0
  21. package/lib/commonjs/assets/tts/1000009864.png +0 -0
  22. package/lib/commonjs/assets/tts/1000009872.png +0 -0
  23. package/lib/commonjs/assets/tts/1000011964.png +0 -0
  24. package/lib/commonjs/assets/tts/Frame 1000011947.png +0 -0
  25. package/lib/commonjs/assets/tts/Frame1000011946.png +0 -0
  26. package/lib/commonjs/assets/tts/Frame1000011953.png +0 -0
  27. package/lib/commonjs/assets/tts/back.png +0 -0
  28. package/lib/commonjs/assets/tts/front.png +0 -0
  29. package/lib/commonjs/assets/tts/vehicleRegistration.png +0 -0
  30. package/lib/commonjs/assets/tts/vehicleStep.png +0 -0
  31. package/lib/commonjs/components/CIMBLoading.js +1 -1
  32. package/lib/commonjs/components/CIMBLoading.js.map +1 -1
  33. package/lib/commonjs/components/CommonSelect.js +1 -1
  34. package/lib/commonjs/components/CommonSelect.js.map +1 -1
  35. package/lib/commonjs/components/Loading.js +1 -1
  36. package/lib/commonjs/components/Loading.js.map +1 -1
  37. package/lib/commonjs/components/MButton.js +1 -1
  38. package/lib/commonjs/components/MButton.js.map +1 -1
  39. package/lib/commonjs/components/MHeader.js +1 -1
  40. package/lib/commonjs/components/MHeader.js.flow +1 -1
  41. package/lib/commonjs/components/MHeader.js.map +1 -1
  42. package/lib/commonjs/components/MSelect.js +2 -0
  43. package/lib/commonjs/components/MSelect.js.flow +78 -0
  44. package/lib/commonjs/components/MSelect.js.map +1 -0
  45. package/lib/commonjs/components/MText.js +1 -1
  46. package/lib/commonjs/components/MText.js.map +1 -1
  47. package/lib/commonjs/components/MyTextInput.js +1 -1
  48. package/lib/commonjs/components/MyTextInput.js.map +1 -1
  49. package/lib/commonjs/components/StepIndicator.js +2 -0
  50. package/lib/commonjs/components/StepIndicator.js.flow +85 -0
  51. package/lib/commonjs/components/StepIndicator.js.map +1 -0
  52. package/lib/commonjs/components/keyboardspace/index.js +1 -1
  53. package/lib/commonjs/components/keyboardspace/index.js.map +1 -1
  54. package/lib/commonjs/components/logoTima/index.js +1 -1
  55. package/lib/commonjs/components/logoTima/index.js.map +1 -1
  56. package/lib/commonjs/components/select/index.js +1 -1
  57. package/lib/commonjs/components/select/index.js.flow +19 -3
  58. package/lib/commonjs/components/select/index.js.map +1 -1
  59. package/lib/commonjs/index.js +1 -1
  60. package/lib/commonjs/index.js.flow +3 -1
  61. package/lib/commonjs/index.js.map +1 -1
  62. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  63. package/lib/commonjs/navigation/primary-navigator.js.flow +68 -0
  64. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  65. package/lib/commonjs/navigation/root-navigator.js +1 -1
  66. package/lib/commonjs/navigation/root-navigator.js.map +1 -1
  67. package/lib/commonjs/screens/Selector.js +1 -1
  68. package/lib/commonjs/screens/Selector.js.map +1 -1
  69. package/lib/commonjs/screens/camera/index.js +1 -1
  70. package/lib/commonjs/screens/camera/index.js.flow +1 -1
  71. package/lib/commonjs/screens/camera/index.js.map +1 -1
  72. package/lib/commonjs/screens/cimb-sign/index.js +1 -1
  73. package/lib/commonjs/screens/cimb-sign/index.js.map +1 -1
  74. package/lib/commonjs/screens/contract/index.js +1 -1
  75. package/lib/commonjs/screens/contract/index.js.map +1 -1
  76. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js +1 -1
  77. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.map +1 -1
  78. package/lib/commonjs/screens/detail-loan/Info.js +1 -1
  79. package/lib/commonjs/screens/detail-loan/Info.js.map +1 -1
  80. package/lib/commonjs/screens/detail-loan/Payment.js +1 -1
  81. package/lib/commonjs/screens/detail-loan/Payment.js.map +1 -1
  82. package/lib/commonjs/screens/detail-loan/PaymentAll.js +1 -1
  83. package/lib/commonjs/screens/detail-loan/PaymentAll.js.map +1 -1
  84. package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
  85. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
  86. package/lib/commonjs/screens/detail-loan/QrPayment.js +1 -1
  87. package/lib/commonjs/screens/detail-loan/QrPayment.js.map +1 -1
  88. package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
  89. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
  90. package/lib/commonjs/screens/detail-loan/index.js +1 -1
  91. package/lib/commonjs/screens/detail-loan/index.js.map +1 -1
  92. package/lib/commonjs/screens/digital-lending/Step1.js +1 -1
  93. package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -1
  94. package/lib/commonjs/screens/digital-lending/Step2.js +1 -1
  95. package/lib/commonjs/screens/digital-lending/Step2.js.map +1 -1
  96. package/lib/commonjs/screens/digital-lending/Step3.js +1 -1
  97. package/lib/commonjs/screens/digital-lending/Step3.js.map +1 -1
  98. package/lib/commonjs/screens/digital-lending/Step4.js +1 -1
  99. package/lib/commonjs/screens/digital-lending/Step4.js.map +1 -1
  100. package/lib/commonjs/screens/digital-lending/Step5.js +1 -1
  101. package/lib/commonjs/screens/digital-lending/Step5.js.map +1 -1
  102. package/lib/commonjs/screens/digital-lending/Step6.js +1 -1
  103. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -1
  104. package/lib/commonjs/screens/digital-lending/index.js +1 -1
  105. package/lib/commonjs/screens/digital-lending/index.js.map +1 -1
  106. package/lib/commonjs/screens/eSign/PreviewContract.js +1 -1
  107. package/lib/commonjs/screens/eSign/PreviewContract.js.map +1 -1
  108. package/lib/commonjs/screens/eSign/Store.js +1 -1
  109. package/lib/commonjs/screens/eSign/Store.js.flow +9 -2
  110. package/lib/commonjs/screens/eSign/Store.js.map +1 -1
  111. package/lib/commonjs/screens/eSign/index.js +1 -1
  112. package/lib/commonjs/screens/eSign/index.js.flow +4 -1
  113. package/lib/commonjs/screens/eSign/index.js.map +1 -1
  114. package/lib/commonjs/screens/forgotPassword/index.js +1 -1
  115. package/lib/commonjs/screens/forgotPassword/index.js.map +1 -1
  116. package/lib/commonjs/screens/full-submit/accept_policy.js +1 -1
  117. package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -1
  118. package/lib/commonjs/screens/full-submit/index.js +1 -1
  119. package/lib/commonjs/screens/full-submit/index.js.flow +7 -7
  120. package/lib/commonjs/screens/full-submit/index.js.map +1 -1
  121. package/lib/commonjs/screens/full-submit/selfie.js +1 -1
  122. package/lib/commonjs/screens/full-submit/selfie.js.map +1 -1
  123. package/lib/commonjs/screens/full-submit/update-document.js +1 -1
  124. package/lib/commonjs/screens/full-submit/update-document.js.flow +1 -1
  125. package/lib/commonjs/screens/full-submit/update-document.js.map +1 -1
  126. package/lib/commonjs/screens/full-submit/update-info.js +1 -1
  127. package/lib/commonjs/screens/full-submit/update-info.js.flow +1 -1
  128. package/lib/commonjs/screens/full-submit/update-info.js.map +1 -1
  129. package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js +1 -1
  130. package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
  131. package/lib/commonjs/screens/guide-transfer-bank/index.js +1 -1
  132. package/lib/commonjs/screens/guide-transfer-bank/index.js.map +1 -1
  133. package/lib/commonjs/screens/home/CIMBxTima.js +1 -1
  134. package/lib/commonjs/screens/home/CIMBxTima.js.map +1 -1
  135. package/lib/commonjs/screens/home/index.js +1 -1
  136. package/lib/commonjs/screens/home/index.js.flow +1687 -1417
  137. package/lib/commonjs/screens/home/index.js.map +1 -1
  138. package/lib/commonjs/screens/intro/index.js +1 -1
  139. package/lib/commonjs/screens/intro/index.js.map +1 -1
  140. package/lib/commonjs/screens/introduction/index.js +1 -1
  141. package/lib/commonjs/screens/introduction/index.js.map +1 -1
  142. package/lib/commonjs/screens/liveness/LivenessStore.js.flow +0 -1
  143. package/lib/commonjs/screens/liveness/LivenessStore.js.map +1 -1
  144. package/lib/commonjs/screens/liveness/index.js +1 -1
  145. package/lib/commonjs/screens/liveness/index.js.map +1 -1
  146. package/lib/commonjs/screens/liveness-v2/index.js +1 -1
  147. package/lib/commonjs/screens/liveness-v2/index.js.flow +0 -7
  148. package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
  149. package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js +1 -1
  150. package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js.map +1 -1
  151. package/lib/commonjs/screens/loan/UpdateLoan.js +1 -1
  152. package/lib/commonjs/screens/loan/UpdateLoan.js.map +1 -1
  153. package/lib/commonjs/screens/loginWithPassword/index.js +1 -1
  154. package/lib/commonjs/screens/loginWithPassword/index.js.map +1 -1
  155. package/lib/commonjs/screens/main/index.js +1 -1
  156. package/lib/commonjs/screens/main/index.js.map +1 -1
  157. package/lib/commonjs/screens/mrz-scanner/index.js +1 -1
  158. package/lib/commonjs/screens/mrz-scanner/index.js.flow +2 -2
  159. package/lib/commonjs/screens/mrz-scanner/index.js.map +1 -1
  160. package/lib/commonjs/screens/nationalID/index.js +1 -1
  161. package/lib/commonjs/screens/nationalID/index.js.map +1 -1
  162. package/lib/commonjs/screens/nationalIDBack/index.js +1 -1
  163. package/lib/commonjs/screens/nationalIDBack/index.js.map +1 -1
  164. package/lib/commonjs/screens/notification/index.js +1 -1
  165. package/lib/commonjs/screens/notification/index.js.map +1 -1
  166. package/lib/commonjs/screens/otp/index.js +1 -1
  167. package/lib/commonjs/screens/otp/index.js.map +1 -1
  168. package/lib/commonjs/screens/payment-evidence/Guideline.js +1 -1
  169. package/lib/commonjs/screens/payment-evidence/Guideline.js.map +1 -1
  170. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js +1 -1
  171. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.map +1 -1
  172. package/lib/commonjs/screens/payment-evidence/index.js +1 -1
  173. package/lib/commonjs/screens/payment-evidence/index.js.map +1 -1
  174. package/lib/commonjs/screens/personal/index.js +1 -1
  175. package/lib/commonjs/screens/personal/index.js.map +1 -1
  176. package/lib/commonjs/screens/qualify/index.js +1 -1
  177. package/lib/commonjs/screens/qualify/index.js.map +1 -1
  178. package/lib/commonjs/screens/quick-submit/index.js +1 -1
  179. package/lib/commonjs/screens/quick-submit/index.js.map +1 -1
  180. package/lib/commonjs/screens/register/index.js +1 -1
  181. package/lib/commonjs/screens/register/index.js.flow +3 -1
  182. package/lib/commonjs/screens/register/index.js.map +1 -1
  183. package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js +1 -1
  184. package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js.map +1 -1
  185. package/lib/commonjs/screens/schedule-payment/index.js +1 -1
  186. package/lib/commonjs/screens/schedule-payment/index.js.map +1 -1
  187. package/lib/commonjs/screens/schedule-payment/payment-list.js +1 -1
  188. package/lib/commonjs/screens/schedule-payment/payment-list.js.map +1 -1
  189. package/lib/commonjs/screens/selfie/index.js +1 -1
  190. package/lib/commonjs/screens/selfie/index.js.map +1 -1
  191. package/lib/commonjs/screens/setPassword/confirmPassword.js +1 -1
  192. package/lib/commonjs/screens/setPassword/confirmPassword.js.map +1 -1
  193. package/lib/commonjs/screens/setPassword/index.js +1 -1
  194. package/lib/commonjs/screens/setPassword/index.js.map +1 -1
  195. package/lib/commonjs/screens/sign-tima/ConfirmContract.js +1 -1
  196. package/lib/commonjs/screens/sign-tima/ConfirmContract.js.map +1 -1
  197. package/lib/commonjs/screens/sign-tima/ViewContract.js +1 -1
  198. package/lib/commonjs/screens/sign-tima/ViewContract.js.map +1 -1
  199. package/lib/commonjs/screens/splash/index.js +1 -1
  200. package/lib/commonjs/screens/splash/index.js.map +1 -1
  201. package/lib/commonjs/screens/terms/QuickTerm.js +1 -1
  202. package/lib/commonjs/screens/terms/QuickTerm.js.map +1 -1
  203. package/lib/commonjs/screens/terms/TermScreen.js +1 -1
  204. package/lib/commonjs/screens/terms/TermScreen.js.map +1 -1
  205. package/lib/commonjs/screens/toan-trinh-so/OCR.js +2 -0
  206. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +831 -0
  207. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -0
  208. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +2 -0
  209. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +467 -0
  210. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -0
  211. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +2 -0
  212. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +1007 -0
  213. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -0
  214. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +2 -0
  215. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +790 -0
  216. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -0
  217. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +2 -0
  218. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +1101 -0
  219. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -0
  220. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js +2 -0
  221. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.flow +242 -0
  222. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -0
  223. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js +2 -0
  224. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.flow +247 -0
  225. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -0
  226. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js +2 -0
  227. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.flow +267 -0
  228. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.map +1 -0
  229. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +2 -0
  230. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +477 -0
  231. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -0
  232. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js +2 -0
  233. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.flow +197 -0
  234. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.map +1 -0
  235. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js +2 -0
  236. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.flow +239 -0
  237. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -0
  238. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js +2 -0
  239. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.flow +240 -0
  240. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -0
  241. package/lib/commonjs/screens/toan-trinh-so/store.js +2 -0
  242. package/lib/commonjs/screens/toan-trinh-so/store.js.flow +237 -0
  243. package/lib/commonjs/screens/toan-trinh-so/store.js.map +1 -0
  244. package/lib/commonjs/screens/uploadVideo/index.js +1 -1
  245. package/lib/commonjs/screens/uploadVideo/index.js.map +1 -1
  246. package/lib/commonjs/services/api/api-config.js +1 -1
  247. package/lib/commonjs/services/api/api-config.js.flow +2 -2
  248. package/lib/commonjs/services/api/api-config.js.map +1 -1
  249. package/lib/commonjs/services/api/api.js +1 -1
  250. package/lib/commonjs/services/api/api.js.flow +218 -0
  251. package/lib/commonjs/services/api/api.js.map +1 -1
  252. package/lib/commonjs/utils/storage/storage.js +1 -1
  253. package/lib/commonjs/utils/storage/storage.js.flow +4 -0
  254. package/lib/commonjs/utils/storage/storage.js.map +1 -1
  255. package/lib/module/assets/icons/cam2.svg +5 -0
  256. package/lib/module/assets/icons/chip.svg +20 -0
  257. package/lib/module/assets/icons/index.js +1 -1
  258. package/lib/module/assets/icons/index.js.map +1 -1
  259. package/lib/module/assets/icons/ocr.svg +11 -0
  260. package/lib/module/assets/icons/takePhoto.svg +20 -0
  261. package/lib/module/assets/icons/tima_small.svg +12 -23
  262. package/lib/module/assets/svgs/back.svg +4 -0
  263. package/lib/module/assets/svgs/complete.svg +27 -0
  264. package/lib/module/assets/svgs/currentStep.svg +28 -0
  265. package/lib/module/assets/svgs/edit.svg +42 -0
  266. package/lib/module/assets/svgs/edit_success.svg +15 -0
  267. package/lib/module/assets/svgs/ekyc.svg +18 -0
  268. package/lib/module/assets/svgs/ekyc_success.svg +6 -0
  269. package/lib/module/assets/svgs/index.js +2 -0
  270. package/lib/module/assets/svgs/index.js.map +1 -0
  271. package/lib/module/assets/svgs/nextStep.svg +21 -0
  272. package/lib/module/assets/svgs/orc_success.svg +11 -0
  273. package/lib/module/assets/tts/1000009864.png +0 -0
  274. package/lib/module/assets/tts/1000009872.png +0 -0
  275. package/lib/module/assets/tts/1000011964.png +0 -0
  276. package/lib/module/assets/tts/Frame 1000011947.png +0 -0
  277. package/lib/module/assets/tts/Frame1000011946.png +0 -0
  278. package/lib/module/assets/tts/Frame1000011953.png +0 -0
  279. package/lib/module/assets/tts/back.png +0 -0
  280. package/lib/module/assets/tts/front.png +0 -0
  281. package/lib/module/assets/tts/vehicleRegistration.png +0 -0
  282. package/lib/module/assets/tts/vehicleStep.png +0 -0
  283. package/lib/module/components/CIMBLoading.js +1 -1
  284. package/lib/module/components/CIMBLoading.js.map +1 -1
  285. package/lib/module/components/CommonSelect.js +1 -1
  286. package/lib/module/components/CommonSelect.js.map +1 -1
  287. package/lib/module/components/Loading.js +1 -1
  288. package/lib/module/components/Loading.js.map +1 -1
  289. package/lib/module/components/MButton.js +1 -1
  290. package/lib/module/components/MButton.js.map +1 -1
  291. package/lib/module/components/MHeader.js +1 -1
  292. package/lib/module/components/MHeader.js.map +1 -1
  293. package/lib/module/components/MSelect.js +2 -0
  294. package/lib/module/components/MSelect.js.map +1 -0
  295. package/lib/module/components/MText.js +1 -1
  296. package/lib/module/components/MText.js.map +1 -1
  297. package/lib/module/components/MyTextInput.js +1 -1
  298. package/lib/module/components/MyTextInput.js.map +1 -1
  299. package/lib/module/components/StepIndicator.js +2 -0
  300. package/lib/module/components/StepIndicator.js.map +1 -0
  301. package/lib/module/components/keyboardspace/index.js +1 -1
  302. package/lib/module/components/keyboardspace/index.js.map +1 -1
  303. package/lib/module/components/logoTima/index.js +1 -1
  304. package/lib/module/components/logoTima/index.js.map +1 -1
  305. package/lib/module/components/select/index.js +1 -1
  306. package/lib/module/components/select/index.js.map +1 -1
  307. package/lib/module/index.js +1 -1
  308. package/lib/module/index.js.map +1 -1
  309. package/lib/module/navigation/primary-navigator.js +1 -1
  310. package/lib/module/navigation/primary-navigator.js.map +1 -1
  311. package/lib/module/navigation/root-navigator.js +1 -1
  312. package/lib/module/navigation/root-navigator.js.map +1 -1
  313. package/lib/module/screens/Selector.js +1 -1
  314. package/lib/module/screens/Selector.js.map +1 -1
  315. package/lib/module/screens/camera/index.js +1 -1
  316. package/lib/module/screens/camera/index.js.map +1 -1
  317. package/lib/module/screens/cimb-sign/index.js +1 -1
  318. package/lib/module/screens/cimb-sign/index.js.map +1 -1
  319. package/lib/module/screens/contract/index.js +1 -1
  320. package/lib/module/screens/contract/index.js.map +1 -1
  321. package/lib/module/screens/detail-loan/DetailLoanTima.js +1 -1
  322. package/lib/module/screens/detail-loan/DetailLoanTima.js.map +1 -1
  323. package/lib/module/screens/detail-loan/Info.js +1 -1
  324. package/lib/module/screens/detail-loan/Info.js.map +1 -1
  325. package/lib/module/screens/detail-loan/Payment.js +1 -1
  326. package/lib/module/screens/detail-loan/Payment.js.map +1 -1
  327. package/lib/module/screens/detail-loan/PaymentAll.js +1 -1
  328. package/lib/module/screens/detail-loan/PaymentAll.js.map +1 -1
  329. package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
  330. package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
  331. package/lib/module/screens/detail-loan/QrPayment.js +1 -1
  332. package/lib/module/screens/detail-loan/QrPayment.js.map +1 -1
  333. package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
  334. package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
  335. package/lib/module/screens/detail-loan/index.js +1 -1
  336. package/lib/module/screens/detail-loan/index.js.map +1 -1
  337. package/lib/module/screens/digital-lending/Step1.js +1 -1
  338. package/lib/module/screens/digital-lending/Step1.js.map +1 -1
  339. package/lib/module/screens/digital-lending/Step2.js +1 -1
  340. package/lib/module/screens/digital-lending/Step2.js.map +1 -1
  341. package/lib/module/screens/digital-lending/Step3.js +1 -1
  342. package/lib/module/screens/digital-lending/Step3.js.map +1 -1
  343. package/lib/module/screens/digital-lending/Step4.js +1 -1
  344. package/lib/module/screens/digital-lending/Step4.js.map +1 -1
  345. package/lib/module/screens/digital-lending/Step5.js +1 -1
  346. package/lib/module/screens/digital-lending/Step5.js.map +1 -1
  347. package/lib/module/screens/digital-lending/Step6.js +1 -1
  348. package/lib/module/screens/digital-lending/Step6.js.map +1 -1
  349. package/lib/module/screens/digital-lending/index.js +1 -1
  350. package/lib/module/screens/digital-lending/index.js.map +1 -1
  351. package/lib/module/screens/eSign/PreviewContract.js +1 -1
  352. package/lib/module/screens/eSign/PreviewContract.js.map +1 -1
  353. package/lib/module/screens/eSign/Store.js +1 -1
  354. package/lib/module/screens/eSign/Store.js.map +1 -1
  355. package/lib/module/screens/eSign/index.js +1 -1
  356. package/lib/module/screens/eSign/index.js.map +1 -1
  357. package/lib/module/screens/forgotPassword/index.js +1 -1
  358. package/lib/module/screens/forgotPassword/index.js.map +1 -1
  359. package/lib/module/screens/full-submit/accept_policy.js +1 -1
  360. package/lib/module/screens/full-submit/accept_policy.js.map +1 -1
  361. package/lib/module/screens/full-submit/index.js +1 -1
  362. package/lib/module/screens/full-submit/index.js.map +1 -1
  363. package/lib/module/screens/full-submit/selfie.js +1 -1
  364. package/lib/module/screens/full-submit/selfie.js.map +1 -1
  365. package/lib/module/screens/full-submit/update-document.js +1 -1
  366. package/lib/module/screens/full-submit/update-document.js.map +1 -1
  367. package/lib/module/screens/full-submit/update-info.js +1 -1
  368. package/lib/module/screens/full-submit/update-info.js.map +1 -1
  369. package/lib/module/screens/guide-transfer-bank/TransferDetail.js +1 -1
  370. package/lib/module/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
  371. package/lib/module/screens/guide-transfer-bank/index.js +1 -1
  372. package/lib/module/screens/guide-transfer-bank/index.js.map +1 -1
  373. package/lib/module/screens/home/CIMBxTima.js +1 -1
  374. package/lib/module/screens/home/CIMBxTima.js.map +1 -1
  375. package/lib/module/screens/home/index.js +1 -1
  376. package/lib/module/screens/home/index.js.map +1 -1
  377. package/lib/module/screens/intro/index.js +1 -1
  378. package/lib/module/screens/intro/index.js.map +1 -1
  379. package/lib/module/screens/introduction/index.js +1 -1
  380. package/lib/module/screens/introduction/index.js.map +1 -1
  381. package/lib/module/screens/liveness/LivenessStore.js.map +1 -1
  382. package/lib/module/screens/liveness/index.js +1 -1
  383. package/lib/module/screens/liveness/index.js.map +1 -1
  384. package/lib/module/screens/liveness-v2/index.js +1 -1
  385. package/lib/module/screens/liveness-v2/index.js.map +1 -1
  386. package/lib/module/screens/loan/PreviewSchedulePaymentTopup.js +1 -1
  387. package/lib/module/screens/loan/PreviewSchedulePaymentTopup.js.map +1 -1
  388. package/lib/module/screens/loan/UpdateLoan.js +1 -1
  389. package/lib/module/screens/loan/UpdateLoan.js.map +1 -1
  390. package/lib/module/screens/loginWithPassword/index.js +1 -1
  391. package/lib/module/screens/loginWithPassword/index.js.map +1 -1
  392. package/lib/module/screens/main/index.js +1 -1
  393. package/lib/module/screens/main/index.js.map +1 -1
  394. package/lib/module/screens/mrz-scanner/index.js +1 -1
  395. package/lib/module/screens/mrz-scanner/index.js.map +1 -1
  396. package/lib/module/screens/nationalID/index.js +1 -1
  397. package/lib/module/screens/nationalID/index.js.map +1 -1
  398. package/lib/module/screens/nationalIDBack/index.js +1 -1
  399. package/lib/module/screens/nationalIDBack/index.js.map +1 -1
  400. package/lib/module/screens/notification/index.js +1 -1
  401. package/lib/module/screens/notification/index.js.map +1 -1
  402. package/lib/module/screens/otp/index.js +1 -1
  403. package/lib/module/screens/otp/index.js.map +1 -1
  404. package/lib/module/screens/payment-evidence/Guideline.js +1 -1
  405. package/lib/module/screens/payment-evidence/Guideline.js.map +1 -1
  406. package/lib/module/screens/payment-evidence/ModalGuideline.js +1 -1
  407. package/lib/module/screens/payment-evidence/ModalGuideline.js.map +1 -1
  408. package/lib/module/screens/payment-evidence/index.js +1 -1
  409. package/lib/module/screens/payment-evidence/index.js.map +1 -1
  410. package/lib/module/screens/personal/index.js +1 -1
  411. package/lib/module/screens/personal/index.js.map +1 -1
  412. package/lib/module/screens/qualify/index.js +1 -1
  413. package/lib/module/screens/qualify/index.js.map +1 -1
  414. package/lib/module/screens/quick-submit/index.js +1 -1
  415. package/lib/module/screens/quick-submit/index.js.map +1 -1
  416. package/lib/module/screens/register/index.js +1 -1
  417. package/lib/module/screens/register/index.js.map +1 -1
  418. package/lib/module/screens/schedule-payment/DigitalSchedulePayment.js +1 -1
  419. package/lib/module/screens/schedule-payment/DigitalSchedulePayment.js.map +1 -1
  420. package/lib/module/screens/schedule-payment/index.js +1 -1
  421. package/lib/module/screens/schedule-payment/index.js.map +1 -1
  422. package/lib/module/screens/schedule-payment/payment-list.js +1 -1
  423. package/lib/module/screens/schedule-payment/payment-list.js.map +1 -1
  424. package/lib/module/screens/selfie/index.js +1 -1
  425. package/lib/module/screens/selfie/index.js.map +1 -1
  426. package/lib/module/screens/setPassword/confirmPassword.js +1 -1
  427. package/lib/module/screens/setPassword/confirmPassword.js.map +1 -1
  428. package/lib/module/screens/setPassword/index.js +1 -1
  429. package/lib/module/screens/setPassword/index.js.map +1 -1
  430. package/lib/module/screens/sign-tima/ConfirmContract.js +1 -1
  431. package/lib/module/screens/sign-tima/ConfirmContract.js.map +1 -1
  432. package/lib/module/screens/sign-tima/ViewContract.js +1 -1
  433. package/lib/module/screens/sign-tima/ViewContract.js.map +1 -1
  434. package/lib/module/screens/splash/index.js +1 -1
  435. package/lib/module/screens/splash/index.js.map +1 -1
  436. package/lib/module/screens/terms/QuickTerm.js +1 -1
  437. package/lib/module/screens/terms/QuickTerm.js.map +1 -1
  438. package/lib/module/screens/terms/TermScreen.js +1 -1
  439. package/lib/module/screens/terms/TermScreen.js.map +1 -1
  440. package/lib/module/screens/toan-trinh-so/OCR.js +2 -0
  441. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -0
  442. package/lib/module/screens/toan-trinh-so/RegisterCamera.js +2 -0
  443. package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -0
  444. package/lib/module/screens/toan-trinh-so/ReviewInformation.js +2 -0
  445. package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -0
  446. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +2 -0
  447. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -0
  448. package/lib/module/screens/toan-trinh-so/ReviewLoan.js +2 -0
  449. package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -0
  450. package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js +2 -0
  451. package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -0
  452. package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js +2 -0
  453. package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -0
  454. package/lib/module/screens/toan-trinh-so/TTSSelfie.js +2 -0
  455. package/lib/module/screens/toan-trinh-so/TTSSelfie.js.map +1 -0
  456. package/lib/module/screens/toan-trinh-so/VehicleCamera.js +2 -0
  457. package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -0
  458. package/lib/module/screens/toan-trinh-so/VehicleRegistration.js +2 -0
  459. package/lib/module/screens/toan-trinh-so/VehicleRegistration.js.map +1 -0
  460. package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js +2 -0
  461. package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -0
  462. package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js +2 -0
  463. package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -0
  464. package/lib/module/screens/toan-trinh-so/store.js +2 -0
  465. package/lib/module/screens/toan-trinh-so/store.js.map +1 -0
  466. package/lib/module/screens/uploadVideo/index.js +1 -1
  467. package/lib/module/screens/uploadVideo/index.js.map +1 -1
  468. package/lib/module/services/api/api-config.js +1 -1
  469. package/lib/module/services/api/api-config.js.map +1 -1
  470. package/lib/module/services/api/api.js +1 -1
  471. package/lib/module/services/api/api.js.map +1 -1
  472. package/lib/module/utils/storage/storage.js +1 -1
  473. package/lib/module/utils/storage/storage.js.map +1 -1
  474. package/lib/typescript/assets/icons/index.d.ts +5 -1
  475. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  476. package/lib/typescript/assets/svgs/index.d.ts +11 -0
  477. package/lib/typescript/assets/svgs/index.d.ts.map +1 -0
  478. package/lib/typescript/components/MSelect.d.ts +2 -0
  479. package/lib/typescript/components/MSelect.d.ts.map +1 -0
  480. package/lib/typescript/components/StepIndicator.d.ts +5 -0
  481. package/lib/typescript/components/StepIndicator.d.ts.map +1 -0
  482. package/lib/typescript/components/select/index.d.ts.map +1 -1
  483. package/lib/typescript/index.d.ts.map +1 -1
  484. package/lib/typescript/navigation/primary-navigator.d.ts +13 -0
  485. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  486. package/lib/typescript/screens/eSign/Store.d.ts +1 -1
  487. package/lib/typescript/screens/eSign/Store.d.ts.map +1 -1
  488. package/lib/typescript/screens/eSign/index.d.ts.map +1 -1
  489. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  490. package/lib/typescript/screens/liveness/LivenessStore.d.ts.map +1 -1
  491. package/lib/typescript/screens/liveness-v2/index.d.ts.map +1 -1
  492. package/lib/typescript/screens/register/index.d.ts.map +1 -1
  493. package/lib/typescript/screens/toan-trinh-so/OCR.d.ts +2 -0
  494. package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -0
  495. package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts +2 -0
  496. package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts.map +1 -0
  497. package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts +2 -0
  498. package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts.map +1 -0
  499. package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts +2 -0
  500. package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts.map +1 -0
  501. package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts +2 -0
  502. package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -0
  503. package/lib/typescript/screens/toan-trinh-so/TTSNationalIDBack.d.ts +2 -0
  504. package/lib/typescript/screens/toan-trinh-so/TTSNationalIDBack.d.ts.map +1 -0
  505. package/lib/typescript/screens/toan-trinh-so/TTSNationalIDFront.d.ts +2 -0
  506. package/lib/typescript/screens/toan-trinh-so/TTSNationalIDFront.d.ts.map +1 -0
  507. package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts +2 -0
  508. package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts.map +1 -0
  509. package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts +2 -0
  510. package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -0
  511. package/lib/typescript/screens/toan-trinh-so/VehicleRegistration.d.ts +2 -0
  512. package/lib/typescript/screens/toan-trinh-so/VehicleRegistration.d.ts.map +1 -0
  513. package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationBack.d.ts +2 -0
  514. package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationBack.d.ts.map +1 -0
  515. package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationFront.d.ts +2 -0
  516. package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationFront.d.ts.map +1 -0
  517. package/lib/typescript/screens/toan-trinh-so/store.d.ts +26 -0
  518. package/lib/typescript/screens/toan-trinh-so/store.d.ts.map +1 -0
  519. package/lib/typescript/services/api/api.d.ts +208 -0
  520. package/lib/typescript/services/api/api.d.ts.map +1 -1
  521. package/lib/typescript/utils/storage/storage.d.ts +3 -0
  522. package/lib/typescript/utils/storage/storage.d.ts.map +1 -1
  523. package/package.json +1 -1
  524. package/src/assets/icons/cam2.svg +5 -0
  525. package/src/assets/icons/chip.svg +20 -0
  526. package/src/assets/icons/index.tsx +8 -0
  527. package/src/assets/icons/ocr.svg +11 -0
  528. package/src/assets/icons/takePhoto.svg +20 -0
  529. package/src/assets/icons/tima_small.svg +12 -23
  530. package/src/assets/svgs/back.svg +4 -0
  531. package/src/assets/svgs/complete.svg +27 -0
  532. package/src/assets/svgs/currentStep.svg +28 -0
  533. package/src/assets/svgs/edit.svg +42 -0
  534. package/src/assets/svgs/edit_success.svg +15 -0
  535. package/src/assets/svgs/ekyc.svg +18 -0
  536. package/src/assets/svgs/ekyc_success.svg +6 -0
  537. package/src/assets/svgs/index.tsx +21 -0
  538. package/src/assets/svgs/nextStep.svg +21 -0
  539. package/src/assets/svgs/orc_success.svg +11 -0
  540. package/src/assets/tts/1000009864.png +0 -0
  541. package/src/assets/tts/1000009872.png +0 -0
  542. package/src/assets/tts/1000011964.png +0 -0
  543. package/src/assets/tts/Frame 1000011947.png +0 -0
  544. package/src/assets/tts/Frame1000011946.png +0 -0
  545. package/src/assets/tts/Frame1000011953.png +0 -0
  546. package/src/assets/tts/back.png +0 -0
  547. package/src/assets/tts/front.png +0 -0
  548. package/src/assets/tts/vehicleRegistration.png +0 -0
  549. package/src/assets/tts/vehicleStep.png +0 -0
  550. package/src/components/MHeader.tsx +1 -1
  551. package/src/components/MSelect.tsx +78 -0
  552. package/src/components/StepIndicator.tsx +85 -0
  553. package/src/components/select/index.tsx +19 -3
  554. package/src/index.tsx +3 -1
  555. package/src/navigation/primary-navigator.tsx +68 -0
  556. package/src/screens/camera/index.tsx +1 -1
  557. package/src/screens/eSign/Store.tsx +9 -2
  558. package/src/screens/eSign/index.tsx +4 -1
  559. package/src/screens/full-submit/index.tsx +7 -7
  560. package/src/screens/full-submit/update-document.tsx +1 -1
  561. package/src/screens/full-submit/update-info.tsx +1 -1
  562. package/src/screens/home/index.tsx +1687 -1417
  563. package/src/screens/liveness/LivenessStore.tsx +0 -1
  564. package/src/screens/liveness-v2/index.tsx +0 -7
  565. package/src/screens/mrz-scanner/index.tsx +2 -2
  566. package/src/screens/register/index.tsx +3 -1
  567. package/src/screens/toan-trinh-so/OCR.tsx +831 -0
  568. package/src/screens/toan-trinh-so/RegisterCamera.tsx +467 -0
  569. package/src/screens/toan-trinh-so/ReviewInformation.tsx +1007 -0
  570. package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +790 -0
  571. package/src/screens/toan-trinh-so/ReviewLoan.tsx +1101 -0
  572. package/src/screens/toan-trinh-so/TTSNationalIDBack.tsx +242 -0
  573. package/src/screens/toan-trinh-so/TTSNationalIDFront.tsx +247 -0
  574. package/src/screens/toan-trinh-so/TTSSelfie.tsx +267 -0
  575. package/src/screens/toan-trinh-so/VehicleCamera.tsx +477 -0
  576. package/src/screens/toan-trinh-so/VehicleRegistration.tsx +197 -0
  577. package/src/screens/toan-trinh-so/VehicleRegistrationBack.tsx +239 -0
  578. package/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx +240 -0
  579. package/src/screens/toan-trinh-so/store.ts +237 -0
  580. package/src/services/api/api-config.ts +2 -2
  581. package/src/services/api/api.ts +218 -0
  582. package/src/utils/storage/storage.ts +4 -0
@@ -0,0 +1,1101 @@
1
+ //@ts-nocheck
2
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
3
+ import {
4
+ Alert,
5
+ Dimensions,
6
+ ScrollView,
7
+ TextInput,
8
+ TextStyle,
9
+ TouchableOpacity,
10
+ View,
11
+ ViewStyle,
12
+ } from 'react-native';
13
+ import MHeader from '../../components/MHeader';
14
+ import { commonStyles } from '../CommonStyles';
15
+ import { CommonActions, useNavigation } from '@react-navigation/native';
16
+ import StepIndicator from '../../components/StepIndicator';
17
+ import { IconBack } from '../../assets/svgs';
18
+ import { MText } from '../../components/MText';
19
+ import { Formik } from 'formik';
20
+ import { CheckBox, CheckBoxActive, DropDown2, Tick2 } from '../../assets/icons';
21
+ import { color } from '../../theme';
22
+ import { formatDDMMYYY, formatMoney } from '../../utils';
23
+ import appStore from '../../AppStore';
24
+ import { ScreenNames } from '../../navigation';
25
+ import KeyboardSpacer from '../../components/keyboardspace';
26
+ import MButton from '../../components/MButton';
27
+ import LinearGradient from 'react-native-linear-gradient';
28
+ import { Api } from '../../services/api';
29
+ import Loading from '../../components/Loading';
30
+ import { debounce } from 'lodash';
31
+ import moment from 'moment';
32
+ import ttsStore from './store';
33
+ import * as yup from 'yup';
34
+
35
+ export default function ReviewLoan(props: any) {
36
+ const navigation = useNavigation();
37
+ const formRef = useRef(null);
38
+ const [isLoading, setIsLoading] = useState(false);
39
+
40
+ const onSubmit = async (values) => {
41
+ try {
42
+ setIsLoading(true);
43
+ const body = {
44
+ loanBriefId: props.route?.params?.loan?.id,
45
+ loanAmount: Number(values.loanAmount),
46
+ rateTypeId: values.rateTypeId,
47
+ loanTime: values.loanTime,
48
+ buyInsurenceCustomer: values?.buyInsurenceCustomer,
49
+ buyInsuranceProperty: values?.buyInsuranceProperty,
50
+ timeInsurenceCustomer: values?.timeInsurenceCustomer?.id,
51
+ timeInsuranceProperty: values?.timeInsuranceProperty?.id,
52
+ moneyInsurenceCustomer: values.moneyInsurenceCustomer,
53
+ moneyInsuranceProperty: values.moneyInsuranceProperty,
54
+ bankId: values.bankId,
55
+ bankAccountName: values?.bankAccountName,
56
+ bankAccountNumber: values?.bankAccountNumber,
57
+ brand: values?.brand,
58
+ yearCar: Number(values.yearCar),
59
+ vehicles: values?.vehicles,
60
+ plateNumber: values?.plateNumber,
61
+ chassis: values?.chassis,
62
+ engine: values?.engine,
63
+ ownerFullName: values?.ownerFullName,
64
+ motobikeCertificateNumber: values?.motobikeCertificateNumber,
65
+ motobikeCertificateDate: values?.motobikeCertificateDate,
66
+ };
67
+ const response = await Api.getInstance().updateInfoLoan(body);
68
+ setIsLoading(false);
69
+ if (response.kind === 'ok') {
70
+ if (response.data?.meta?.errorCode === 200) {
71
+ navigation.push(ScreenNames.ReviewInformationOther, {
72
+ loan: props.route?.params?.loan,
73
+ });
74
+ } else {
75
+ Alert.alert('Thông báo', response.data?.meta?.errorMessage);
76
+ }
77
+ } else {
78
+ Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau');
79
+ }
80
+ } catch (error) {
81
+ setIsLoading(false);
82
+ console.log(error);
83
+ }
84
+ };
85
+
86
+ const getData = async () => {
87
+ try {
88
+ setIsLoading(true);
89
+ const response = await Api.getInstance().getInfoLoan(
90
+ props.route?.params?.loan?.id
91
+ );
92
+ setIsLoading(false);
93
+ if (response.kind === 'ok') {
94
+ if (response.data?.meta.errorCode === 200) {
95
+ formRef.current.setFieldValue(
96
+ 'bankAccountName',
97
+ response?.data?.data?.bankAccountName ?? ''
98
+ );
99
+ formRef.current.setFieldValue(
100
+ 'bankAccountNumber',
101
+ response?.data?.data?.bankAccountNumber ?? ''
102
+ );
103
+ formRef.current.setFieldValue(
104
+ 'bankId',
105
+ response?.data?.data?.bankId ?? null
106
+ );
107
+ formRef.current.setFieldValue(
108
+ 'bankName',
109
+ response?.data?.data?.bankName ?? ''
110
+ );
111
+ formRef.current.setFieldValue(
112
+ 'loanAmount',
113
+ response?.data?.data?.loanAmount ?? 0
114
+ );
115
+ formRef.current.setFieldValue(
116
+ 'rateTypeId',
117
+ response?.data?.data?.rateTypeId ?? null
118
+ );
119
+ formRef.current.setFieldValue(
120
+ 'loanTime',
121
+ response?.data?.data?.loanTime ?? null
122
+ );
123
+ formRef.current.setFieldValue(
124
+ 'moneyInsuranceProperty',
125
+ response?.data?.data?.moneyInsuranceProperty ?? null
126
+ );
127
+ formRef.current.setFieldValue(
128
+ 'moneyInsurenceCustomer',
129
+ response?.data?.data?.moneyInsurenceCustomer ?? null
130
+ );
131
+ formRef.current.setFieldValue(
132
+ 'buyInsuranceProperty',
133
+ response?.data?.data?.buyInsuranceProperty
134
+ ? response?.data?.data?.buyInsuranceProperty
135
+ : false
136
+ );
137
+ formRef.current.setFieldValue(
138
+ 'buyInsurenceCustomer',
139
+ response?.data?.data?.buyInsurenceCustomer
140
+ ? response?.data?.data?.buyInsurenceCustomer
141
+ : false
142
+ );
143
+
144
+ const timeInsurenceCustomer = appStore.listInsurenceTimeAll.find(
145
+ (x) => x.id === response.data.data?.timeInsurenceCustomer
146
+ );
147
+ formRef.current?.setFieldValue(
148
+ 'timeInsurenceCustomer',
149
+ timeInsurenceCustomer
150
+ );
151
+ const timeInsuranceProperty = appStore.listInsurenceTimeAll.find(
152
+ (x) => x.id === response.data.data?.timeInsuranceProperty
153
+ );
154
+ formRef.current?.setFieldValue(
155
+ 'timeInsuranceProperty',
156
+ timeInsuranceProperty
157
+ );
158
+ formRef.current?.setFieldValue(
159
+ 'brand',
160
+ response.data.data?.brand ?? null
161
+ );
162
+ formRef.current?.setFieldValue(
163
+ 'yearCar',
164
+ response.data.data?.yearCar ?? null
165
+ );
166
+ formRef.current?.setFieldValue(
167
+ 'vehicles',
168
+ response.data.data?.vehicles ?? null
169
+ );
170
+ formRef.current?.setFieldValue(
171
+ 'plateNumber',
172
+ response.data.data?.plateNumber ?? ''
173
+ );
174
+ formRef.current?.setFieldValue(
175
+ 'chassis',
176
+ response.data.data?.chassis ?? ''
177
+ );
178
+ formRef.current?.setFieldValue(
179
+ 'engine',
180
+ response.data.data?.engine ?? ''
181
+ );
182
+ formRef.current?.setFieldValue(
183
+ 'ownerFullName',
184
+ response.data.data?.ownerFullName ?? ''
185
+ );
186
+ formRef.current?.setFieldValue(
187
+ 'motobikeCertificateNumber',
188
+ response.data.data?.motobikeCertificateNumber ?? ''
189
+ );
190
+ formRef.current?.setFieldValue(
191
+ 'motobikeCertificateDate',
192
+ response.data.data?.motobikeCertificateDate ?? ''
193
+ );
194
+
195
+ if (response.data?.data?.brand) {
196
+ ttsStore.getListYearCar(response.data?.data?.brand);
197
+ }
198
+ if (response.data?.data?.brand && response.data?.data?.yearCar) {
199
+ ttsStore.getListCar(
200
+ response.data?.data?.brand,
201
+ response.data?.data?.yearCar
202
+ );
203
+ }
204
+ } else {
205
+ }
206
+ }
207
+ } catch (error) {
208
+ setIsLoading(false);
209
+ console.log(error);
210
+ }
211
+ };
212
+
213
+ useEffect(() => {
214
+ getData();
215
+ ttsStore.getListBrand();
216
+ ttsStore.getRelationship();
217
+ }, []);
218
+
219
+ const getInfoInsurence = async (
220
+ loanAmount,
221
+ loanTime,
222
+ rateTypeId,
223
+ timeInsurenceCustomer,
224
+ timeInsuranceProperty
225
+ ) => {
226
+ try {
227
+ setIsLoading(true);
228
+ const response = await Api.getInstance().getInfoInsurence2(
229
+ props.route.params?.loan?.id,
230
+ loanAmount,
231
+ loanTime,
232
+ rateTypeId,
233
+ timeInsurenceCustomer,
234
+ timeInsuranceProperty
235
+ );
236
+ setIsLoading(false);
237
+
238
+ if (response.kind === 'ok') {
239
+ if (response.data?.meta?.errorCode === 200) {
240
+ formRef.current?.setFieldValue(
241
+ 'moneyInsurenceCustomer',
242
+ response.data.data?.moneyInsurenceCustomer
243
+ );
244
+ formRef.current?.setFieldValue(
245
+ 'moneyInsuranceProperty',
246
+ response.data.data?.moneyInsuranceProperty
247
+ );
248
+ formRef.current?.setFieldValue(
249
+ 'moneyInsurranceHospitalization',
250
+ response.data.data?.moneyInsurranceHospitalization
251
+ );
252
+ } else {
253
+ Alert.alert('Thông báo', response.data?.meta?.errorMessage);
254
+ }
255
+ } else {
256
+ // Alert.alert('Thông báo', 'Có lỗi xảy ra trong quá trình lấy dữ liệu');
257
+ }
258
+ } catch (error) {
259
+ setIsLoading(false);
260
+ }
261
+ };
262
+
263
+ const debounceCall = useCallback(
264
+ debounce((textParam) => {
265
+ getInfoInsurence(
266
+ Number(textParam.replace(/\D/g, '')),
267
+ formRef.current.values.loanTime?.id,
268
+ formRef.current.values?.rateTypeId?.id,
269
+ formRef.current.values.timeInsurenceCustomer?.id,
270
+ formRef.current.values.timeInsuranceProperty?.id
271
+ );
272
+ }, 500),
273
+ []
274
+ );
275
+
276
+ return (
277
+ <View style={{ flex: 1 }}>
278
+ <MHeader title="Vay nhanh 24/7" />
279
+ <View style={commonStyles.fill}>
280
+ <View style={$h} />
281
+ <View style={$bg}>
282
+ <View
283
+ style={{
284
+ paddingVertical: 10,
285
+ flexDirection: 'row',
286
+ alignItems: 'center',
287
+ paddingHorizontal: 16,
288
+ }}
289
+ >
290
+ <TouchableOpacity
291
+ style={{
292
+ zIndex: 1000,
293
+ }}
294
+ onPress={() => {
295
+ navigation.goBack();
296
+ }}
297
+ >
298
+ <IconBack />
299
+ </TouchableOpacity>
300
+ <MText style={$title}>Thông tin chi tiết</MText>
301
+ </View>
302
+ <StepIndicator steps={3} currentStep={1} />
303
+ <Formik
304
+ innerRef={formRef}
305
+ onSubmit={onSubmit}
306
+ initialValues={{
307
+ loanAmount: '',
308
+ rateTypeId: null,
309
+ loanTime: null,
310
+ buyInsurenceCustomer: false,
311
+ buyInsuranceProperty: false,
312
+ timeInsurenceCustomer: null,
313
+ timeInsuranceProperty: null,
314
+ moneyInsurenceCustomer: null,
315
+ moneyInsuranceProperty: null,
316
+ bankId: null,
317
+ bankName: '',
318
+ bankAccountName: '',
319
+ bankAccountNumber: '',
320
+ brand: '',
321
+ yearCar: null,
322
+ vehicles: '',
323
+ plateNumber: '',
324
+ chassis: '',
325
+ engine: '',
326
+ ownerFullName: '',
327
+ motobikeCertificateNumber: '',
328
+ motobikeCertificateDate: '',
329
+ }}
330
+ validationSchema={yup.object().shape({
331
+ loanAmount: yup.string().required('Số tiền là bắt buộc'),
332
+ rateTypeId: yup.number().required('Vui lòng chọn').nullable(),
333
+ loanTime: yup.number().required('Vui lòng chọn').nullable(),
334
+ bankName: yup.string().required('Vui lòng chọn ngân hàng'),
335
+ bankAccountName: yup.string().required('Vui lòng nhập chủ thẻ'),
336
+ bankAccountNumber: yup
337
+ .string()
338
+ .required('Vui lòng nhập số tài khoản'),
339
+ brand: yup.string().required('Vui lòng chọn hãng xe'),
340
+ yearCar: yup
341
+ .string()
342
+ .required('Vui lòng chọn năm sản xuất')
343
+ .nullable(),
344
+ vehicles: yup.string().required('Vui lòng chọn xe').nullable(),
345
+ plateNumber: yup.string().required('Vui lòng nhập biển số'),
346
+ chassis: yup.string().required('Vui lòng nhập số khung'),
347
+ engine: yup.string().required('Vui lòng nhập số máy'),
348
+ ownerFullName: yup.string().required('Vui lòng nhập chủ xe'),
349
+ motobikeCertificateNumber: yup
350
+ .string()
351
+ .required('Vui lòng nhập số đăng ký xe'),
352
+ motobikeCertificateDate: yup
353
+ .string()
354
+ .required('Vui lòng nhập ngày đăng ký'),
355
+ })}
356
+ >
357
+ {({
358
+ values,
359
+ setFieldValue,
360
+ errors,
361
+ handleSubmit,
362
+ handleChange,
363
+ }) => (
364
+ <ScrollView
365
+ style={[commonStyles.fill, { paddingHorizontal: 16 }]}
366
+ >
367
+ <MText style={$title2}>2.1 Thông tin đề nghị khoản vay</MText>
368
+ <View style={$row}>
369
+ <View style={{ flex: 1 }}>
370
+ <MText style={$label}>Số tiền đề nghị vay</MText>
371
+ <TextInput
372
+ numberOfLines={1}
373
+ style={[
374
+ $textInput,
375
+ {
376
+ color: '#333333',
377
+ fontSize: 16,
378
+ fontWeight: '500',
379
+ },
380
+ ]}
381
+ value={formatMoney(values.loanAmount)}
382
+ onChangeText={(text) => {
383
+ setFieldValue('loanAmount', text.replaceAll(',', ''));
384
+ debounceCall(text);
385
+ }}
386
+ />
387
+ {errors && errors.loanAmount && (
388
+ <MText style={$error}>{errors.loanAmount}</MText>
389
+ )}
390
+ </View>
391
+ <View style={{ flex: 1 }}>
392
+ <MText style={$label}>Hình thức thanh toán</MText>
393
+ <TouchableOpacity
394
+ style={$select}
395
+ onPress={() => {
396
+ navigation.push(ScreenNames.MSelect, {
397
+ title: 'Chọn hình thức thanh toán',
398
+ data: appStore.listRateType,
399
+ callback: (value) => {
400
+ setFieldValue('rateTypeId', value?.id);
401
+ setFieldValue('loanTime', null);
402
+ },
403
+ });
404
+ }}
405
+ >
406
+ <MText
407
+ numberOfLines={1}
408
+ style={{
409
+ color: '#333333',
410
+ fontSize: 16,
411
+ fontWeight: '500',
412
+ flex: 1,
413
+ fontFamily: 'Be Vietnam Pro Medium',
414
+ }}
415
+ >
416
+ {
417
+ appStore.listRateType?.find(
418
+ (x) => x?.id === values.rateTypeId
419
+ )?.name
420
+ }
421
+ </MText>
422
+ <DropDown2 />
423
+ </TouchableOpacity>
424
+ {errors && errors.rateTypeId && (
425
+ <MText style={$error}>{errors.rateTypeId}</MText>
426
+ )}
427
+ </View>
428
+ </View>
429
+
430
+ <MText style={$label}>Thời gian vay</MText>
431
+ <TouchableOpacity
432
+ style={$select}
433
+ onPress={() => {
434
+ navigation.push(ScreenNames.MSelect, {
435
+ title: 'Chọn thời gian vay',
436
+ data:
437
+ values.rateTypeId === 14
438
+ ? appStore.listLoanTime.filter((x) => x.id <= 12)
439
+ : appStore.listLoanTime,
440
+ callback: (value) => {
441
+ setFieldValue('loanTime', value?.id);
442
+ },
443
+ });
444
+ }}
445
+ >
446
+ <MText
447
+ numberOfLines={1}
448
+ style={{
449
+ color: '#333333',
450
+ fontSize: 16,
451
+ fontWeight: '500',
452
+ flex: 1,
453
+ fontFamily: 'Be Vietnam Pro Medium',
454
+ }}
455
+ >
456
+ {values?.loanTime ? `${values?.loanTime} tháng` : ''}
457
+ </MText>
458
+ <DropDown2 />
459
+ </TouchableOpacity>
460
+ {errors && errors.loanTime && (
461
+ <MText style={$error}>{errors.loanTime}</MText>
462
+ )}
463
+
464
+ <View
465
+ style={{
466
+ backgroundColor: '#FFF8F2',
467
+ borderLeftWidth: 1,
468
+ borderRadius: 8,
469
+ padding: 16,
470
+ borderColor: color.primary,
471
+ marginTop: 10,
472
+ }}
473
+ >
474
+ <MText
475
+ style={{
476
+ color: color.primary,
477
+ fontWeight: 'bold',
478
+ }}
479
+ >
480
+ Bảo hiểm
481
+ </MText>
482
+ <View
483
+ style={{
484
+ flexDirection: 'row',
485
+ alignItems: 'center',
486
+ gap: 10,
487
+ marginTop: 10,
488
+ }}
489
+ >
490
+ <TouchableOpacity
491
+ onPress={() => {
492
+ setFieldValue(
493
+ 'buyInsurenceCustomer',
494
+ !values.buyInsurenceCustomer
495
+ );
496
+ }}
497
+ >
498
+ {values.buyInsurenceCustomer === true ? (
499
+ <CheckBoxActive />
500
+ ) : (
501
+ <CheckBox />
502
+ )}
503
+ </TouchableOpacity>
504
+ <View style={{ flex: 1 }}>
505
+ <MText
506
+ style={{
507
+ color: '#333333',
508
+ fontSize: 12,
509
+ fontWeight: 'bold',
510
+ }}
511
+ >
512
+ BH sức khoẻ người vay
513
+ </MText>
514
+ <MText
515
+ style={{
516
+ color: '#828282',
517
+ fontSize: 12,
518
+ marginTop: 5,
519
+ }}
520
+ >
521
+ Số tiền{' '}
522
+ <MText
523
+ style={{
524
+ fontSize: 12,
525
+ color: '#333333',
526
+ }}
527
+ >
528
+ {formatMoney(values.moneyInsurenceCustomer)} đ
529
+ </MText>
530
+ </MText>
531
+ </View>
532
+ <TouchableOpacity
533
+ onPress={() => {
534
+ navigation.push(ScreenNames.MSelect, {
535
+ title: 'Chọn thời gian',
536
+ data: appStore.listInsurenceTimeAll,
537
+ callback: (value) => {
538
+ setFieldValue('timeInsurenceCustomer', value);
539
+ getInfoInsurence(
540
+ values.loanAmount,
541
+ values.loanTime,
542
+ values?.rateTypeId,
543
+ value?.id,
544
+ values.timeInsuranceProperty?.id
545
+ );
546
+ },
547
+ });
548
+ }}
549
+ style={{
550
+ backgroundColor: '#FFFFFF',
551
+ height: 40,
552
+ borderRadius: 6,
553
+ alignItems: 'center',
554
+ justifyContent: 'space-between',
555
+ flexDirection: 'row',
556
+ paddingHorizontal: 10,
557
+ borderWidth: 1,
558
+ borderColor: '#F5F5F5',
559
+ width: Dimensions.get('window').width / 3,
560
+ }}
561
+ >
562
+ <MText style={{ fontSize: 12, color: '#333333' }}>
563
+ {values.timeInsurenceCustomer?.name}
564
+ </MText>
565
+ <DropDown2 />
566
+ </TouchableOpacity>
567
+ </View>
568
+ <View
569
+ style={{
570
+ height: 1,
571
+ backgroundColor: '#EFEFEF',
572
+ marginVertical: 8,
573
+ }}
574
+ />
575
+ <View
576
+ style={{
577
+ flexDirection: 'row',
578
+ alignItems: 'center',
579
+ gap: 10,
580
+ marginTop: 10,
581
+ }}
582
+ >
583
+ <TouchableOpacity
584
+ onPress={() => {
585
+ setFieldValue(
586
+ 'buyInsuranceProperty',
587
+ !values.buyInsuranceProperty
588
+ );
589
+ }}
590
+ >
591
+ {values.buyInsuranceProperty === true ? (
592
+ <CheckBoxActive />
593
+ ) : (
594
+ <CheckBox />
595
+ )}
596
+ </TouchableOpacity>
597
+ <View style={{ flex: 1 }}>
598
+ <MText
599
+ style={{
600
+ color: '#333333',
601
+ fontSize: 12,
602
+ fontWeight: 'bold',
603
+ }}
604
+ >
605
+ BH vật chất
606
+ </MText>
607
+ <MText
608
+ style={{
609
+ color: '#828282',
610
+ fontSize: 12,
611
+ marginTop: 5,
612
+ }}
613
+ >
614
+ Số tiền{' '}
615
+ <MText
616
+ style={{
617
+ fontSize: 12,
618
+ color: '#333333',
619
+ }}
620
+ >
621
+ {formatMoney(values.moneyInsuranceProperty)} đ
622
+ </MText>
623
+ </MText>
624
+ </View>
625
+ <TouchableOpacity
626
+ onPress={() => {
627
+ navigation.push(ScreenNames.MSelect, {
628
+ title: 'Chọn thời gian',
629
+ data: appStore.listInsurenceTimeAll,
630
+ callback: (value) => {
631
+ setFieldValue('timeInsuranceProperty', value);
632
+ getInfoInsurence(
633
+ values.loanAmount,
634
+ values.loanTime,
635
+ values?.rateTypeId,
636
+ values?.timeInsurenceCustomer?.id,
637
+ value?.id
638
+ );
639
+ },
640
+ });
641
+ }}
642
+ style={{
643
+ backgroundColor: '#FFFFFF',
644
+ height: 40,
645
+ borderRadius: 6,
646
+ alignItems: 'center',
647
+ justifyContent: 'space-between',
648
+ flexDirection: 'row',
649
+ paddingHorizontal: 10,
650
+ borderWidth: 1,
651
+ borderColor: '#F5F5F5',
652
+ width: Dimensions.get('window').width / 3,
653
+ }}
654
+ >
655
+ <MText style={{ fontSize: 12, color: '#333333' }}>
656
+ {values.timeInsuranceProperty?.name}
657
+ </MText>
658
+ <DropDown2 />
659
+ </TouchableOpacity>
660
+ </View>
661
+ <View
662
+ style={{
663
+ height: 1,
664
+ backgroundColor: '#BDBDBD',
665
+ marginVertical: 8,
666
+ }}
667
+ />
668
+ <View style={{ flexDirection: 'row', gap: 5 }}>
669
+ <Tick2 />
670
+ <MText
671
+ style={{
672
+ fontSize: 10,
673
+ color: '#828282',
674
+ }}
675
+ >
676
+ Quyền lợi bảo hiểm sức khoẻ lên tới 100% từ Bảo Minh
677
+ {'\n'}
678
+ (Tai nạn, thương tật,...)
679
+ </MText>
680
+ </View>
681
+ <View style={{ marginTop: 8, flexDirection: 'row', gap: 5 }}>
682
+ <Tick2 />
683
+ <MText
684
+ style={{
685
+ fontSize: 10,
686
+ color: '#828282',
687
+ }}
688
+ >
689
+ Quyền lợi bảo hiểm vật chất 100% từ Bảo Minh
690
+ </MText>
691
+ </View>
692
+ </View>
693
+
694
+ <MText style={[$title2, { marginTop: 10 }]}>
695
+ 2.2 Thông tin giải ngân
696
+ </MText>
697
+ <MText style={$label}>Ngân hàng</MText>
698
+ <TouchableOpacity
699
+ style={$select}
700
+ onPress={() => {
701
+ navigation.push(ScreenNames.CommonSelect, {
702
+ title: 'Chọn ngân hàng',
703
+ data: ttsStore.listBank,
704
+ callback: (value) => {
705
+ setFieldValue('bankName', value.name);
706
+ setFieldValue('bankId', value.id);
707
+ },
708
+ });
709
+ }}
710
+ >
711
+ <MText
712
+ numberOfLines={1}
713
+ style={{
714
+ color: '#333333',
715
+ fontSize: 16,
716
+ fontWeight: '500',
717
+ flex: 1,
718
+ fontFamily: 'Be Vietnam Pro Medium',
719
+ }}
720
+ >
721
+ {values.bankName}
722
+ </MText>
723
+ <DropDown2 />
724
+ </TouchableOpacity>
725
+ {errors && errors.bankName && (
726
+ <MText style={$error}>{errors.bankName}</MText>
727
+ )}
728
+ <MText style={[$label, { marginTop: 16 }]}>Tên chủ thẻ</MText>
729
+ <TextInput
730
+ numberOfLines={1}
731
+ style={[
732
+ $textInput,
733
+ {
734
+ color: '#333333',
735
+ fontSize: 16,
736
+ fontWeight: '500',
737
+ },
738
+ ]}
739
+ value={values.bankAccountName}
740
+ onChangeText={handleChange('bankAccountName')}
741
+ />
742
+ {errors && errors.bankAccountName && (
743
+ <MText style={$error}>{errors.bankAccountName}</MText>
744
+ )}
745
+ <MText style={[$label, { marginTop: 16 }]}>Số tài khoản</MText>
746
+ <TextInput
747
+ keyboardType="number-pad"
748
+ numberOfLines={1}
749
+ style={[
750
+ $textInput,
751
+ {
752
+ color: '#333333',
753
+ fontSize: 16,
754
+ fontWeight: '500',
755
+ },
756
+ ]}
757
+ value={values.bankAccountNumber}
758
+ onChangeText={handleChange('bankAccountNumber')}
759
+ />
760
+ {errors && errors.bankAccountNumber && (
761
+ <MText style={$error}>{errors.bankAccountNumber}</MText>
762
+ )}
763
+
764
+ <MText style={[$title2, { marginTop: 10 }]}>
765
+ 2.3 Thông tin tài sản
766
+ </MText>
767
+ <View style={$row}>
768
+ <View style={{ flex: 1 }}>
769
+ <MText style={$label}>Hãng xe</MText>
770
+ <TouchableOpacity
771
+ style={$select}
772
+ onPress={() => {
773
+ navigation.push(ScreenNames.CommonSelect, {
774
+ title: 'Hãng xe',
775
+ data: ttsStore.listBrand,
776
+ callback: (value) => {
777
+ setFieldValue('brand', value.name);
778
+ setFieldValue('yearCar', null);
779
+ setFieldValue('vehicles', null);
780
+ ttsStore.getListYearCar(value.name);
781
+ },
782
+ });
783
+ }}
784
+ >
785
+ <MText
786
+ numberOfLines={1}
787
+ style={{
788
+ color: '#333333',
789
+ fontSize: 16,
790
+ fontWeight: '500',
791
+ flex: 1,
792
+ fontFamily: 'Be Vietnam Pro Medium',
793
+ }}
794
+ >
795
+ {values?.brand}
796
+ </MText>
797
+ <DropDown2 />
798
+ </TouchableOpacity>
799
+ {errors && errors.brand && (
800
+ <MText style={$error}>{errors.brand}</MText>
801
+ )}
802
+ </View>
803
+ <View style={{ flex: 1 }}>
804
+ <MText style={$label}>Năm sản xuất</MText>
805
+ <TouchableOpacity
806
+ style={$select}
807
+ onPress={() => {
808
+ navigation.push(ScreenNames.CommonSelect, {
809
+ title: 'Năm sản xuất',
810
+ data: ttsStore.listYear,
811
+ callback: (value) => {
812
+ setFieldValue('yearCar', value.name);
813
+ setFieldValue('vehicles', null);
814
+ ttsStore.getListCar(values.brand, value.name);
815
+ },
816
+ });
817
+ }}
818
+ >
819
+ <MText
820
+ numberOfLines={1}
821
+ style={{
822
+ color: '#333333',
823
+ fontSize: 16,
824
+ fontWeight: '500',
825
+ flex: 1,
826
+ fontFamily: 'Be Vietnam Pro Medium',
827
+ }}
828
+ >
829
+ {values?.yearCar}
830
+ </MText>
831
+ <DropDown2 />
832
+ </TouchableOpacity>
833
+ {errors && errors.yearCar && (
834
+ <MText style={$error}>{errors.yearCar}</MText>
835
+ )}
836
+ </View>
837
+ </View>
838
+ <MText style={$label}>Tên xe/ Phiên bản xe</MText>
839
+ <TouchableOpacity
840
+ style={$select}
841
+ onPress={() => {
842
+ navigation.push(ScreenNames.CommonSelect, {
843
+ title: 'Tên xe/ Phiên bản xe',
844
+ data: ttsStore.listCar,
845
+ callback: (value) => {
846
+ setFieldValue('vehicles', value.name);
847
+ },
848
+ });
849
+ }}
850
+ >
851
+ <MText
852
+ numberOfLines={1}
853
+ style={{
854
+ color: '#333333',
855
+ fontSize: 16,
856
+ fontWeight: '500',
857
+ flex: 1,
858
+ fontFamily: 'Be Vietnam Pro Medium',
859
+ }}
860
+ >
861
+ {values.vehicles}
862
+ </MText>
863
+ <DropDown2 />
864
+ </TouchableOpacity>
865
+ {errors && errors.vehicles && (
866
+ <MText style={$error}>{errors.vehicles}</MText>
867
+ )}
868
+
869
+ <MText style={[$label, { marginTop: 16 }]}>Biển số xe</MText>
870
+ <TextInput
871
+ numberOfLines={1}
872
+ style={[
873
+ $textInput,
874
+ {
875
+ color: '#333333',
876
+ fontSize: 16,
877
+ fontWeight: '500',
878
+ },
879
+ ]}
880
+ value={values.plateNumber}
881
+ onChangeText={handleChange('plateNumber')}
882
+ />
883
+ {errors && errors.plateNumber && (
884
+ <MText style={$error}>{errors.plateNumber}</MText>
885
+ )}
886
+
887
+ <View style={[$row, { marginTop: 16 }]}>
888
+ <View style={{ flex: 1 }}>
889
+ <MText style={$label}>Số khung</MText>
890
+ <TextInput
891
+ numberOfLines={1}
892
+ style={[
893
+ $textInput,
894
+ {
895
+ color: '#333333',
896
+ fontSize: 16,
897
+ fontWeight: '500',
898
+ },
899
+ ]}
900
+ value={values.chassis}
901
+ onChangeText={handleChange('chassis')}
902
+ />
903
+ {errors && errors.chassis && (
904
+ <MText style={$error}>{errors.chassis}</MText>
905
+ )}
906
+ </View>
907
+ <View style={{ flex: 1 }}>
908
+ <MText style={$label}>Số máy</MText>
909
+ <TextInput
910
+ numberOfLines={1}
911
+ style={[
912
+ $textInput,
913
+ {
914
+ color: '#333333',
915
+ fontSize: 16,
916
+ fontWeight: '500',
917
+ },
918
+ ]}
919
+ value={values.engine}
920
+ onChangeText={handleChange('engine')}
921
+ />
922
+ {errors && errors.engine && (
923
+ <MText style={$error}>{errors.engine}</MText>
924
+ )}
925
+ </View>
926
+ </View>
927
+
928
+ <MText style={$label}>Họ tên chủ xe</MText>
929
+ <TextInput
930
+ numberOfLines={1}
931
+ style={[
932
+ $textInput,
933
+ {
934
+ color: '#333333',
935
+ fontSize: 16,
936
+ fontWeight: '500',
937
+ },
938
+ ]}
939
+ value={values.ownerFullName}
940
+ onChangeText={handleChange('ownerFullName')}
941
+ />
942
+ {errors && errors.ownerFullName && (
943
+ <MText style={$error}>{errors.ownerFullName}</MText>
944
+ )}
945
+
946
+ <View style={[$row, { marginTop: 16 }]}>
947
+ <View style={{ flex: 1 }}>
948
+ <MText style={$label}>Số đăng ký xe</MText>
949
+ <TextInput
950
+ numberOfLines={1}
951
+ style={[
952
+ $textInput,
953
+ {
954
+ color: '#333333',
955
+ fontSize: 16,
956
+ fontWeight: '500',
957
+ },
958
+ ]}
959
+ value={values.motobikeCertificateNumber}
960
+ onChangeText={handleChange('motobikeCertificateNumber')}
961
+ />
962
+ {errors && errors.motobikeCertificateNumber && (
963
+ <MText style={$error}>
964
+ {errors.motobikeCertificateNumber}
965
+ </MText>
966
+ )}
967
+ </View>
968
+ <View style={{ flex: 1 }}>
969
+ <MText style={$label}>Ngày đăng ký</MText>
970
+ <TextInput
971
+ numberOfLines={1}
972
+ style={[
973
+ $textInput,
974
+ {
975
+ color: '#333333',
976
+ fontSize: 16,
977
+ fontWeight: '500',
978
+ },
979
+ ]}
980
+ value={values.motobikeCertificateDate}
981
+ onChangeText={handleChange('motobikeCertificateDate')}
982
+ />
983
+ {errors && errors.motobikeCertificateDate && (
984
+ <MText style={$error}>
985
+ {errors.motobikeCertificateDate}
986
+ </MText>
987
+ )}
988
+ </View>
989
+ </View>
990
+ <MButton
991
+ onPress={() => {
992
+ handleSubmit();
993
+ }}
994
+ style={{
995
+ marginVertical: 24,
996
+ }}
997
+ >
998
+ <LinearGradient
999
+ start={{ x: 1, y: 0 }}
1000
+ end={{ x: 0, y: 1 }}
1001
+ style={{
1002
+ height: 40,
1003
+ marginVertical: 16,
1004
+ borderRadius: 30,
1005
+ alignItems: 'center',
1006
+ justifyContent: 'center',
1007
+ }}
1008
+ colors={['#FF7A00', '#EF4123']}
1009
+ >
1010
+ <MText
1011
+ style={{
1012
+ color: 'white',
1013
+ fontSize: 16,
1014
+ }}
1015
+ >
1016
+ Tiếp tục
1017
+ </MText>
1018
+ </LinearGradient>
1019
+ </MButton>
1020
+
1021
+ <KeyboardSpacer />
1022
+ </ScrollView>
1023
+ )}
1024
+ </Formik>
1025
+ </View>
1026
+ </View>
1027
+ <Loading isLoading={isLoading} />
1028
+ </View>
1029
+ );
1030
+ }
1031
+
1032
+ const $select: ViewStyle = {
1033
+ flexDirection: 'row',
1034
+ height: 40,
1035
+ alignItems: 'center',
1036
+ paddingHorizontal: 8,
1037
+ borderWidth: 1,
1038
+ borderRadius: 4,
1039
+ borderColor: '#E0E0E0',
1040
+ };
1041
+
1042
+ const $row: ViewStyle = {
1043
+ flexDirection: 'row',
1044
+ // alignItems: 'center',
1045
+ marginBottom: 16,
1046
+ gap: 16,
1047
+ };
1048
+
1049
+ const $textInput: ViewStyle = {
1050
+ borderWidth: 1,
1051
+ borderRadius: 4,
1052
+ borderColor: '#E0E0E0',
1053
+ height: 40,
1054
+ paddingHorizontal: 8,
1055
+ fontFamily: 'Be Vietnam Pro Medium',
1056
+ };
1057
+
1058
+ const $label: TextStyle = {
1059
+ fontSize: 14,
1060
+ color: '#333333',
1061
+ paddingBottom: 5,
1062
+ };
1063
+
1064
+ const $title2: TextStyle = {
1065
+ fontSize: 16,
1066
+ fontWeight: 'bold',
1067
+ color: '#333333',
1068
+ paddingBottom: 10,
1069
+ marginTop: 6,
1070
+ };
1071
+ const $title: TextStyle = {
1072
+ fontSize: 16,
1073
+ fontWeight: 'bold',
1074
+ color: '#333333',
1075
+ position: 'absolute',
1076
+ left: 0,
1077
+ right: 0,
1078
+ textAlign: 'center',
1079
+ };
1080
+ const $h: ViewStyle = {
1081
+ backgroundColor: '#EF592E',
1082
+ position: 'absolute',
1083
+ height: 30,
1084
+ width: '100%',
1085
+ };
1086
+
1087
+ const $bg: ViewStyle = {
1088
+ borderTopLeftRadius: 30,
1089
+ borderTopRightRadius: 30,
1090
+ backgroundColor: 'white',
1091
+ flex: 1,
1092
+ };
1093
+
1094
+ const $error: TextStyle = {
1095
+ color: '#EB5757',
1096
+ fontSize: 14,
1097
+ fontStyle: 'italic',
1098
+ fontFamily: 'Be Vietnam Pro Thin',
1099
+ fontWeight: '300',
1100
+ marginTop: 5,
1101
+ };