react-native-timacare 3.3.55 → 3.3.57-cccd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (612) hide show
  1. package/lib/commonjs/AppStore.js +1 -1
  2. package/lib/commonjs/AppStore.js.flow +7 -2
  3. package/lib/commonjs/AppStore.js.map +1 -1
  4. package/lib/commonjs/RNTimacare.js +1 -1
  5. package/lib/commonjs/RNTimacare.js.flow +7 -1
  6. package/lib/commonjs/RNTimacare.js.map +1 -1
  7. package/lib/commonjs/assets/icons/index.js +1 -1
  8. package/lib/commonjs/assets/icons/index.js.flow +10 -0
  9. package/lib/commonjs/assets/icons/index.js.map +1 -1
  10. package/lib/commonjs/assets/icons/modal_confirm.svg +15 -0
  11. package/lib/commonjs/assets/icons/modal_notice.svg +74 -0
  12. package/lib/commonjs/assets/icons/modal_success.svg +55 -0
  13. package/lib/commonjs/assets/icons/modal_warning.svg +48 -0
  14. package/lib/commonjs/assets/icons/user_security.svg +10 -0
  15. package/lib/commonjs/assets/tts/Frame1000011947.png +0 -0
  16. package/lib/commonjs/components/AppModal.js +2 -0
  17. package/lib/commonjs/components/AppModal.js.flow +34 -0
  18. package/lib/commonjs/components/AppModal.js.map +1 -0
  19. package/lib/commonjs/components/ItemTimaOne.js +2 -0
  20. package/lib/commonjs/components/{ItemTimaOneV3.js.flow → ItemTimaOne.js.flow} +1 -1
  21. package/lib/commonjs/components/ItemTimaOne.js.map +1 -0
  22. package/lib/commonjs/components/ModalNotification/AlertGlobal.js +2 -0
  23. package/lib/commonjs/components/ModalNotification/AlertGlobal.js.flow +100 -0
  24. package/lib/commonjs/components/ModalNotification/AlertGlobal.js.map +1 -0
  25. package/lib/commonjs/components/ModalNotification/index.js +2 -0
  26. package/lib/commonjs/components/ModalNotification/index.js.flow +224 -0
  27. package/lib/commonjs/components/ModalNotification/index.js.map +1 -0
  28. package/lib/commonjs/components/ModalOptionLoan.js +1 -1
  29. package/lib/commonjs/components/ModalOptionLoan.js.flow +15 -7
  30. package/lib/commonjs/components/ModalOptionLoan.js.map +1 -1
  31. package/lib/commonjs/components/ModalOptionLoanDigital.js +1 -1
  32. package/lib/commonjs/components/ModalOptionLoanDigital.js.flow +15 -7
  33. package/lib/commonjs/components/ModalOptionLoanDigital.js.map +1 -1
  34. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  35. package/lib/commonjs/navigation/primary-navigator.js.flow +7 -0
  36. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  37. package/lib/commonjs/screens/NFC/OcrStart.js +2 -0
  38. package/lib/commonjs/screens/NFC/OcrStart.js.flow +171 -0
  39. package/lib/commonjs/screens/NFC/OcrStart.js.map +1 -0
  40. package/lib/commonjs/screens/NFC/ScanMRZ.js +2 -0
  41. package/lib/commonjs/screens/NFC/ScanMRZ.js.flow +563 -0
  42. package/lib/commonjs/screens/NFC/ScanMRZ.js.map +1 -0
  43. package/lib/commonjs/screens/SelectorStore.js +1 -1
  44. package/lib/commonjs/screens/SelectorStore.js.flow +7 -2
  45. package/lib/commonjs/screens/SelectorStore.js.map +1 -1
  46. package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
  47. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +253 -187
  48. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
  49. package/lib/commonjs/screens/camera/index.js +1 -1
  50. package/lib/commonjs/screens/camera/index.js.flow +50 -54
  51. package/lib/commonjs/screens/camera/index.js.map +1 -1
  52. package/lib/commonjs/screens/cimb-sign/index.js +1 -1
  53. package/lib/commonjs/screens/cimb-sign/index.js.flow +10 -14
  54. package/lib/commonjs/screens/cimb-sign/index.js.map +1 -1
  55. package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
  56. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.flow +75 -54
  57. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
  58. package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
  59. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +77 -54
  60. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
  61. package/lib/commonjs/screens/detail-loan/store.js +1 -1
  62. package/lib/commonjs/screens/detail-loan/store.js.flow +39 -7
  63. package/lib/commonjs/screens/detail-loan/store.js.map +1 -1
  64. package/lib/commonjs/screens/detail-loan-tima/InforLoan.js +1 -1
  65. package/lib/commonjs/screens/detail-loan-tima/InforLoan.js.flow +20 -4
  66. package/lib/commonjs/screens/detail-loan-tima/InforLoan.js.map +1 -1
  67. package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js +1 -1
  68. package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js.flow +19 -4
  69. package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js.map +1 -1
  70. package/lib/commonjs/screens/digital-lending/Step6.js +1 -1
  71. package/lib/commonjs/screens/digital-lending/Step6.js.flow +24 -29
  72. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -1
  73. package/lib/commonjs/screens/digital-lending/store.js +1 -1
  74. package/lib/commonjs/screens/digital-lending/store.js.flow +113 -20
  75. package/lib/commonjs/screens/digital-lending/store.js.map +1 -1
  76. package/lib/commonjs/screens/eSign/Store.js +1 -1
  77. package/lib/commonjs/screens/eSign/Store.js.flow +69 -34
  78. package/lib/commonjs/screens/eSign/Store.js.map +1 -1
  79. package/lib/commonjs/screens/eSign/index.js +1 -1
  80. package/lib/commonjs/screens/eSign/index.js.flow +33 -34
  81. package/lib/commonjs/screens/eSign/index.js.map +1 -1
  82. package/lib/commonjs/screens/full-submit/accept_policy.js +1 -1
  83. package/lib/commonjs/screens/full-submit/accept_policy.js.flow +101 -85
  84. package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -1
  85. package/lib/commonjs/screens/full-submit/store.js +1 -1
  86. package/lib/commonjs/screens/full-submit/store.js.flow +157 -27
  87. package/lib/commonjs/screens/full-submit/store.js.map +1 -1
  88. package/lib/commonjs/screens/full-submit/update-info.js +1 -1
  89. package/lib/commonjs/screens/full-submit/update-info.js.flow +0 -1
  90. package/lib/commonjs/screens/full-submit/update-info.js.map +1 -1
  91. package/lib/commonjs/screens/home/DigitalTopupItem.js +1 -1
  92. package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +15 -7
  93. package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -1
  94. package/lib/commonjs/screens/home/ItemMotoBikeLoan.js +1 -1
  95. package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.flow +16 -7
  96. package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.map +1 -1
  97. package/lib/commonjs/screens/home/Store.js +1 -1
  98. package/lib/commonjs/screens/home/Store.js.flow +44 -23
  99. package/lib/commonjs/screens/home/Store.js.map +1 -1
  100. package/lib/commonjs/screens/home/index.js +1 -1
  101. package/lib/commonjs/screens/home/index.js.flow +306 -298
  102. package/lib/commonjs/screens/home/index.js.map +1 -1
  103. package/lib/commonjs/screens/liveness/LivenessStore.js +1 -1
  104. package/lib/commonjs/screens/liveness/LivenessStore.js.flow +111 -89
  105. package/lib/commonjs/screens/liveness/LivenessStore.js.map +1 -1
  106. package/lib/commonjs/screens/liveness/index.js +1 -1
  107. package/lib/commonjs/screens/liveness/index.js.flow +67 -68
  108. package/lib/commonjs/screens/liveness/index.js.map +1 -1
  109. package/lib/commonjs/screens/liveness-v2/index.js +1 -1
  110. package/lib/commonjs/screens/liveness-v2/index.js.flow +52 -52
  111. package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
  112. package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js +1 -1
  113. package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js.flow +20 -10
  114. package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js.map +1 -1
  115. package/lib/commonjs/screens/loan/UpdateLoan.js +1 -1
  116. package/lib/commonjs/screens/loan/UpdateLoan.js.flow +56 -23
  117. package/lib/commonjs/screens/loan/UpdateLoan.js.map +1 -1
  118. package/lib/commonjs/screens/motobike/InfoLoanMotobike.js +1 -1
  119. package/lib/commonjs/screens/motobike/InfoLoanMotobike.js.flow +43 -29
  120. package/lib/commonjs/screens/motobike/InfoLoanMotobike.js.map +1 -1
  121. package/lib/commonjs/screens/motobike/PolicyF88.js +1 -1
  122. package/lib/commonjs/screens/motobike/PolicyF88.js.flow +15 -6
  123. package/lib/commonjs/screens/motobike/PolicyF88.js.map +1 -1
  124. package/lib/commonjs/screens/motobike/ReviewLoanMotobike.js +1 -1
  125. package/lib/commonjs/screens/motobike/ReviewLoanMotobike.js.flow +13 -3
  126. package/lib/commonjs/screens/motobike/ReviewLoanMotobike.js.map +1 -1
  127. package/lib/commonjs/screens/mrz-scanner/index.js +1 -1
  128. package/lib/commonjs/screens/mrz-scanner/index.js.flow +56 -55
  129. package/lib/commonjs/screens/mrz-scanner/index.js.map +1 -1
  130. package/lib/commonjs/screens/mrz-scanner/store.js +1 -1
  131. package/lib/commonjs/screens/mrz-scanner/store.js.flow +13 -3
  132. package/lib/commonjs/screens/mrz-scanner/store.js.map +1 -1
  133. package/lib/commonjs/screens/nationalID/Store.js +1 -1
  134. package/lib/commonjs/screens/nationalID/Store.js.flow +50 -29
  135. package/lib/commonjs/screens/nationalID/Store.js.map +1 -1
  136. package/lib/commonjs/screens/nationalID/index.js +1 -1
  137. package/lib/commonjs/screens/nationalID/index.js.flow +123 -219
  138. package/lib/commonjs/screens/nationalID/index.js.map +1 -1
  139. package/lib/commonjs/screens/nationalIDBack/Store.js +1 -1
  140. package/lib/commonjs/screens/nationalIDBack/Store.js.flow +44 -26
  141. package/lib/commonjs/screens/nationalIDBack/Store.js.map +1 -1
  142. package/lib/commonjs/screens/nationalIDBack/index.js +1 -1
  143. package/lib/commonjs/screens/nationalIDBack/index.js.flow +129 -210
  144. package/lib/commonjs/screens/nationalIDBack/index.js.map +1 -1
  145. package/lib/commonjs/screens/notification/ListLoanStore.js +1 -1
  146. package/lib/commonjs/screens/notification/ListLoanStore.js.flow +19 -4
  147. package/lib/commonjs/screens/notification/ListLoanStore.js.map +1 -1
  148. package/lib/commonjs/screens/notification/index.js +1 -1
  149. package/lib/commonjs/screens/notification/index.js.flow +0 -1
  150. package/lib/commonjs/screens/notification/index.js.map +1 -1
  151. package/lib/commonjs/screens/notification/store.js +1 -1
  152. package/lib/commonjs/screens/notification/store.js.flow +7 -2
  153. package/lib/commonjs/screens/notification/store.js.map +1 -1
  154. package/lib/commonjs/screens/personal/index.js +1 -1
  155. package/lib/commonjs/screens/personal/index.js.flow +21 -19
  156. package/lib/commonjs/screens/personal/index.js.map +1 -1
  157. package/lib/commonjs/screens/qualify/Store.js.flow +0 -1
  158. package/lib/commonjs/screens/qualify/Store.js.map +1 -1
  159. package/lib/commonjs/screens/quick-submit/store.js +1 -1
  160. package/lib/commonjs/screens/quick-submit/store.js.flow +85 -15
  161. package/lib/commonjs/screens/quick-submit/store.js.map +1 -1
  162. package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js +1 -1
  163. package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js.flow +20 -4
  164. package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js.map +1 -1
  165. package/lib/commonjs/screens/schedule-payment/store.js +1 -1
  166. package/lib/commonjs/screens/schedule-payment/store.js.flow +13 -5
  167. package/lib/commonjs/screens/schedule-payment/store.js.map +1 -1
  168. package/lib/commonjs/screens/selfie/SelfieStore.js +1 -1
  169. package/lib/commonjs/screens/selfie/SelfieStore.js.flow +25 -9
  170. package/lib/commonjs/screens/selfie/SelfieStore.js.map +1 -1
  171. package/lib/commonjs/screens/selfie/index.js +1 -1
  172. package/lib/commonjs/screens/selfie/index.js.flow +0 -1
  173. package/lib/commonjs/screens/selfie/index.js.map +1 -1
  174. package/lib/commonjs/screens/sign-tima/ViewContract.js +1 -1
  175. package/lib/commonjs/screens/sign-tima/ViewContract.js.flow +17 -18
  176. package/lib/commonjs/screens/sign-tima/ViewContract.js.map +1 -1
  177. package/lib/commonjs/screens/sign-tima/store.js +1 -1
  178. package/lib/commonjs/screens/sign-tima/store.js.flow +37 -7
  179. package/lib/commonjs/screens/sign-tima/store.js.map +1 -1
  180. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js +1 -1
  181. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.flow +36 -10
  182. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
  183. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  184. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +321 -609
  185. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
  186. package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js +1 -1
  187. package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js.flow +21 -4
  188. package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js.map +1 -1
  189. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
  190. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +50 -54
  191. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  192. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +1 -1
  193. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +31 -25
  194. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  195. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  196. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +88 -82
  197. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  198. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +1 -1
  199. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +25 -5
  200. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  201. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js +1 -1
  202. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.flow +19 -4
  203. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -1
  204. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
  205. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.flow +19 -4
  206. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
  207. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js +1 -1
  208. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.flow +42 -25
  209. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.map +1 -1
  210. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js +1 -1
  211. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.flow +63 -56
  212. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
  213. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  214. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +63 -55
  215. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  216. package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
  217. package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.flow +50 -43
  218. package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
  219. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
  220. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +275 -341
  221. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  222. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js +1 -1
  223. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.flow +19 -4
  224. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
  225. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js +1 -1
  226. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.flow +19 -4
  227. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -1
  228. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
  229. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.flow +19 -4
  230. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
  231. package/lib/commonjs/screens/toan-trinh-so/store.js +1 -1
  232. package/lib/commonjs/screens/toan-trinh-so/store.js.flow +82 -37
  233. package/lib/commonjs/screens/toan-trinh-so/store.js.map +1 -1
  234. package/lib/commonjs/screens/uploadVideo/index.js +1 -1
  235. package/lib/commonjs/screens/uploadVideo/index.js.flow +26 -21
  236. package/lib/commonjs/screens/uploadVideo/index.js.map +1 -1
  237. package/lib/commonjs/screens/uploadVideo/videoStore.js +1 -1
  238. package/lib/commonjs/screens/uploadVideo/videoStore.js.flow +19 -4
  239. package/lib/commonjs/screens/uploadVideo/videoStore.js.map +1 -1
  240. package/lib/commonjs/screens/v3/AssetInformation.js +1 -1
  241. package/lib/commonjs/screens/v3/AssetInformation.js.flow +35 -16
  242. package/lib/commonjs/screens/v3/AssetInformation.js.map +1 -1
  243. package/lib/commonjs/screens/v3/LoanBuyCar.js +1 -1
  244. package/lib/commonjs/screens/v3/LoanBuyCar.js.flow +35 -16
  245. package/lib/commonjs/screens/v3/LoanBuyCar.js.map +1 -1
  246. package/lib/commonjs/services/api/api.js +1 -1
  247. package/lib/commonjs/services/api/api.js.flow +23 -26
  248. package/lib/commonjs/services/api/api.js.map +1 -1
  249. package/lib/commonjs/utils/cameraCrop.js +2 -0
  250. package/lib/commonjs/utils/cameraCrop.js.flow +96 -0
  251. package/lib/commonjs/utils/cameraCrop.js.map +1 -0
  252. package/lib/module/AppStore.js +1 -1
  253. package/lib/module/AppStore.js.map +1 -1
  254. package/lib/module/RNTimacare.js +1 -1
  255. package/lib/module/RNTimacare.js.map +1 -1
  256. package/lib/module/assets/icons/index.js +1 -1
  257. package/lib/module/assets/icons/index.js.map +1 -1
  258. package/lib/module/assets/icons/modal_confirm.svg +15 -0
  259. package/lib/module/assets/icons/modal_notice.svg +74 -0
  260. package/lib/module/assets/icons/modal_success.svg +55 -0
  261. package/lib/module/assets/icons/modal_warning.svg +48 -0
  262. package/lib/module/assets/icons/user_security.svg +10 -0
  263. package/lib/module/assets/tts/Frame1000011947.png +0 -0
  264. package/lib/module/components/AppModal.js +2 -0
  265. package/lib/module/components/AppModal.js.map +1 -0
  266. package/lib/module/components/ItemTimaOne.js +2 -0
  267. package/lib/module/components/ItemTimaOne.js.map +1 -0
  268. package/lib/module/components/ModalNotification/AlertGlobal.js +2 -0
  269. package/lib/module/components/ModalNotification/AlertGlobal.js.map +1 -0
  270. package/lib/module/components/ModalNotification/index.js +2 -0
  271. package/lib/module/components/ModalNotification/index.js.map +1 -0
  272. package/lib/module/components/ModalOptionLoan.js +1 -1
  273. package/lib/module/components/ModalOptionLoan.js.map +1 -1
  274. package/lib/module/components/ModalOptionLoanDigital.js +1 -1
  275. package/lib/module/components/ModalOptionLoanDigital.js.map +1 -1
  276. package/lib/module/navigation/primary-navigator.js +1 -1
  277. package/lib/module/navigation/primary-navigator.js.map +1 -1
  278. package/lib/module/screens/NFC/OcrStart.js +2 -0
  279. package/lib/module/screens/NFC/OcrStart.js.map +1 -0
  280. package/lib/module/screens/NFC/ScanMRZ.js +2 -0
  281. package/lib/module/screens/NFC/ScanMRZ.js.map +1 -0
  282. package/lib/module/screens/SelectorStore.js +1 -1
  283. package/lib/module/screens/SelectorStore.js.map +1 -1
  284. package/lib/module/screens/camera/CCCDCameraScreen.js +1 -1
  285. package/lib/module/screens/camera/CCCDCameraScreen.js.map +1 -1
  286. package/lib/module/screens/camera/index.js +1 -1
  287. package/lib/module/screens/camera/index.js.map +1 -1
  288. package/lib/module/screens/cimb-sign/index.js +1 -1
  289. package/lib/module/screens/cimb-sign/index.js.map +1 -1
  290. package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
  291. package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
  292. package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
  293. package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
  294. package/lib/module/screens/detail-loan/store.js +1 -1
  295. package/lib/module/screens/detail-loan/store.js.map +1 -1
  296. package/lib/module/screens/detail-loan-tima/InforLoan.js +1 -1
  297. package/lib/module/screens/detail-loan-tima/InforLoan.js.map +1 -1
  298. package/lib/module/screens/detail-loan-tima/PaymentSchedule.js +1 -1
  299. package/lib/module/screens/detail-loan-tima/PaymentSchedule.js.map +1 -1
  300. package/lib/module/screens/digital-lending/Step6.js +1 -1
  301. package/lib/module/screens/digital-lending/Step6.js.map +1 -1
  302. package/lib/module/screens/digital-lending/store.js +1 -1
  303. package/lib/module/screens/digital-lending/store.js.map +1 -1
  304. package/lib/module/screens/eSign/Store.js +1 -1
  305. package/lib/module/screens/eSign/Store.js.map +1 -1
  306. package/lib/module/screens/eSign/index.js +1 -1
  307. package/lib/module/screens/eSign/index.js.map +1 -1
  308. package/lib/module/screens/full-submit/accept_policy.js +1 -1
  309. package/lib/module/screens/full-submit/accept_policy.js.map +1 -1
  310. package/lib/module/screens/full-submit/store.js +1 -1
  311. package/lib/module/screens/full-submit/store.js.map +1 -1
  312. package/lib/module/screens/full-submit/update-info.js +1 -1
  313. package/lib/module/screens/full-submit/update-info.js.map +1 -1
  314. package/lib/module/screens/home/DigitalTopupItem.js +1 -1
  315. package/lib/module/screens/home/DigitalTopupItem.js.map +1 -1
  316. package/lib/module/screens/home/ItemMotoBikeLoan.js +1 -1
  317. package/lib/module/screens/home/ItemMotoBikeLoan.js.map +1 -1
  318. package/lib/module/screens/home/Store.js +1 -1
  319. package/lib/module/screens/home/Store.js.map +1 -1
  320. package/lib/module/screens/home/index.js +1 -1
  321. package/lib/module/screens/home/index.js.map +1 -1
  322. package/lib/module/screens/liveness/LivenessStore.js +1 -1
  323. package/lib/module/screens/liveness/LivenessStore.js.map +1 -1
  324. package/lib/module/screens/liveness/index.js +1 -1
  325. package/lib/module/screens/liveness/index.js.map +1 -1
  326. package/lib/module/screens/liveness-v2/index.js +1 -1
  327. package/lib/module/screens/liveness-v2/index.js.map +1 -1
  328. package/lib/module/screens/loan/PreviewSchedulePaymentTopup.js +1 -1
  329. package/lib/module/screens/loan/PreviewSchedulePaymentTopup.js.map +1 -1
  330. package/lib/module/screens/loan/UpdateLoan.js +1 -1
  331. package/lib/module/screens/loan/UpdateLoan.js.map +1 -1
  332. package/lib/module/screens/motobike/InfoLoanMotobike.js +1 -1
  333. package/lib/module/screens/motobike/InfoLoanMotobike.js.map +1 -1
  334. package/lib/module/screens/motobike/PolicyF88.js +1 -1
  335. package/lib/module/screens/motobike/PolicyF88.js.map +1 -1
  336. package/lib/module/screens/motobike/ReviewLoanMotobike.js +1 -1
  337. package/lib/module/screens/motobike/ReviewLoanMotobike.js.map +1 -1
  338. package/lib/module/screens/mrz-scanner/index.js +1 -1
  339. package/lib/module/screens/mrz-scanner/index.js.map +1 -1
  340. package/lib/module/screens/mrz-scanner/store.js +1 -1
  341. package/lib/module/screens/mrz-scanner/store.js.map +1 -1
  342. package/lib/module/screens/nationalID/Store.js +1 -1
  343. package/lib/module/screens/nationalID/Store.js.map +1 -1
  344. package/lib/module/screens/nationalID/index.js +1 -1
  345. package/lib/module/screens/nationalID/index.js.map +1 -1
  346. package/lib/module/screens/nationalIDBack/Store.js +1 -1
  347. package/lib/module/screens/nationalIDBack/Store.js.map +1 -1
  348. package/lib/module/screens/nationalIDBack/index.js +1 -1
  349. package/lib/module/screens/nationalIDBack/index.js.map +1 -1
  350. package/lib/module/screens/notification/ListLoanStore.js +1 -1
  351. package/lib/module/screens/notification/ListLoanStore.js.map +1 -1
  352. package/lib/module/screens/notification/index.js +1 -1
  353. package/lib/module/screens/notification/index.js.map +1 -1
  354. package/lib/module/screens/notification/store.js +1 -1
  355. package/lib/module/screens/notification/store.js.map +1 -1
  356. package/lib/module/screens/personal/index.js +1 -1
  357. package/lib/module/screens/personal/index.js.map +1 -1
  358. package/lib/module/screens/qualify/Store.js.map +1 -1
  359. package/lib/module/screens/quick-submit/store.js +1 -1
  360. package/lib/module/screens/quick-submit/store.js.map +1 -1
  361. package/lib/module/screens/schedule-payment/DigitalSchedulePayment.js +1 -1
  362. package/lib/module/screens/schedule-payment/DigitalSchedulePayment.js.map +1 -1
  363. package/lib/module/screens/schedule-payment/store.js +1 -1
  364. package/lib/module/screens/schedule-payment/store.js.map +1 -1
  365. package/lib/module/screens/selfie/SelfieStore.js +1 -1
  366. package/lib/module/screens/selfie/SelfieStore.js.map +1 -1
  367. package/lib/module/screens/selfie/index.js +1 -1
  368. package/lib/module/screens/selfie/index.js.map +1 -1
  369. package/lib/module/screens/sign-tima/ViewContract.js +1 -1
  370. package/lib/module/screens/sign-tima/ViewContract.js.map +1 -1
  371. package/lib/module/screens/sign-tima/store.js +1 -1
  372. package/lib/module/screens/sign-tima/store.js.map +1 -1
  373. package/lib/module/screens/toan-trinh-so/LoanInterestRate.js +1 -1
  374. package/lib/module/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
  375. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  376. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
  377. package/lib/module/screens/toan-trinh-so/RegisterBack.js +1 -1
  378. package/lib/module/screens/toan-trinh-so/RegisterBack.js.map +1 -1
  379. package/lib/module/screens/toan-trinh-so/RegisterCamera.js +1 -1
  380. package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  381. package/lib/module/screens/toan-trinh-so/ReviewInformation.js +1 -1
  382. package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  383. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  384. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  385. package/lib/module/screens/toan-trinh-so/ReviewLoan.js +1 -1
  386. package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  387. package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js +1 -1
  388. package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -1
  389. package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
  390. package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
  391. package/lib/module/screens/toan-trinh-so/TTSOTP.js +1 -1
  392. package/lib/module/screens/toan-trinh-so/TTSOTP.js.map +1 -1
  393. package/lib/module/screens/toan-trinh-so/TTSSelfie.js +1 -1
  394. package/lib/module/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
  395. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  396. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  397. package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
  398. package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
  399. package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
  400. package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  401. package/lib/module/screens/toan-trinh-so/VehicleRegistration.js +1 -1
  402. package/lib/module/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
  403. package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js +1 -1
  404. package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -1
  405. package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
  406. package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
  407. package/lib/module/screens/toan-trinh-so/store.js +1 -1
  408. package/lib/module/screens/toan-trinh-so/store.js.map +1 -1
  409. package/lib/module/screens/uploadVideo/index.js +1 -1
  410. package/lib/module/screens/uploadVideo/index.js.map +1 -1
  411. package/lib/module/screens/uploadVideo/videoStore.js +1 -1
  412. package/lib/module/screens/uploadVideo/videoStore.js.map +1 -1
  413. package/lib/module/screens/v3/AssetInformation.js +1 -1
  414. package/lib/module/screens/v3/AssetInformation.js.map +1 -1
  415. package/lib/module/screens/v3/LoanBuyCar.js +1 -1
  416. package/lib/module/screens/v3/LoanBuyCar.js.map +1 -1
  417. package/lib/module/services/api/api.js +1 -1
  418. package/lib/module/services/api/api.js.map +1 -1
  419. package/lib/module/utils/cameraCrop.js +2 -0
  420. package/lib/module/utils/cameraCrop.js.map +1 -0
  421. package/lib/typescript/AppStore.d.ts.map +1 -1
  422. package/lib/typescript/RNTimacare.d.ts.map +1 -1
  423. package/lib/typescript/assets/icons/index.d.ts +6 -1
  424. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  425. package/lib/typescript/components/AppModal.d.ts +18 -0
  426. package/lib/typescript/components/AppModal.d.ts.map +1 -0
  427. package/lib/typescript/components/ItemTimaOne.d.ts +7 -0
  428. package/lib/typescript/components/ItemTimaOne.d.ts.map +1 -0
  429. package/lib/typescript/components/ModalNotification/AlertGlobal.d.ts +30 -0
  430. package/lib/typescript/components/ModalNotification/AlertGlobal.d.ts.map +1 -0
  431. package/lib/typescript/components/ModalNotification/index.d.ts +35 -0
  432. package/lib/typescript/components/ModalNotification/index.d.ts.map +1 -0
  433. package/lib/typescript/components/ModalOptionLoan.d.ts.map +1 -1
  434. package/lib/typescript/components/ModalOptionLoanDigital.d.ts.map +1 -1
  435. package/lib/typescript/navigation/primary-navigator.d.ts +3 -0
  436. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  437. package/lib/typescript/screens/NFC/OcrStart.d.ts +2 -0
  438. package/lib/typescript/screens/NFC/OcrStart.d.ts.map +1 -0
  439. package/lib/typescript/screens/NFC/ScanMRZ.d.ts +15 -0
  440. package/lib/typescript/screens/NFC/ScanMRZ.d.ts.map +1 -0
  441. package/lib/typescript/screens/SelectorStore.d.ts.map +1 -1
  442. package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
  443. package/lib/typescript/screens/camera/index.d.ts.map +1 -1
  444. package/lib/typescript/screens/cimb-sign/index.d.ts.map +1 -1
  445. package/lib/typescript/screens/detail-loan/ShowQrCode.d.ts.map +1 -1
  446. package/lib/typescript/screens/detail-loan/store.d.ts.map +1 -1
  447. package/lib/typescript/screens/detail-loan-tima/InforLoan.d.ts.map +1 -1
  448. package/lib/typescript/screens/detail-loan-tima/PaymentSchedule.d.ts.map +1 -1
  449. package/lib/typescript/screens/digital-lending/Step6.d.ts.map +1 -1
  450. package/lib/typescript/screens/digital-lending/store.d.ts.map +1 -1
  451. package/lib/typescript/screens/eSign/Store.d.ts.map +1 -1
  452. package/lib/typescript/screens/eSign/index.d.ts.map +1 -1
  453. package/lib/typescript/screens/full-submit/accept_policy.d.ts.map +1 -1
  454. package/lib/typescript/screens/full-submit/store.d.ts.map +1 -1
  455. package/lib/typescript/screens/full-submit/update-info.d.ts.map +1 -1
  456. package/lib/typescript/screens/home/DigitalTopupItem.d.ts.map +1 -1
  457. package/lib/typescript/screens/home/ItemMotoBikeLoan.d.ts.map +1 -1
  458. package/lib/typescript/screens/home/Store.d.ts.map +1 -1
  459. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  460. package/lib/typescript/screens/liveness/LivenessStore.d.ts.map +1 -1
  461. package/lib/typescript/screens/liveness/index.d.ts.map +1 -1
  462. package/lib/typescript/screens/loan/PreviewSchedulePaymentTopup.d.ts.map +1 -1
  463. package/lib/typescript/screens/loan/UpdateLoan.d.ts.map +1 -1
  464. package/lib/typescript/screens/motobike/InfoLoanMotobike.d.ts.map +1 -1
  465. package/lib/typescript/screens/motobike/PolicyF88.d.ts.map +1 -1
  466. package/lib/typescript/screens/motobike/ReviewLoanMotobike.d.ts.map +1 -1
  467. package/lib/typescript/screens/mrz-scanner/index.d.ts.map +1 -1
  468. package/lib/typescript/screens/mrz-scanner/store.d.ts.map +1 -1
  469. package/lib/typescript/screens/nationalID/Store.d.ts.map +1 -1
  470. package/lib/typescript/screens/nationalID/index.d.ts.map +1 -1
  471. package/lib/typescript/screens/nationalIDBack/Store.d.ts.map +1 -1
  472. package/lib/typescript/screens/nationalIDBack/index.d.ts.map +1 -1
  473. package/lib/typescript/screens/notification/ListLoanStore.d.ts.map +1 -1
  474. package/lib/typescript/screens/notification/index.d.ts.map +1 -1
  475. package/lib/typescript/screens/notification/store.d.ts.map +1 -1
  476. package/lib/typescript/screens/personal/index.d.ts.map +1 -1
  477. package/lib/typescript/screens/qualify/Store.d.ts.map +1 -1
  478. package/lib/typescript/screens/quick-submit/store.d.ts.map +1 -1
  479. package/lib/typescript/screens/schedule-payment/DigitalSchedulePayment.d.ts.map +1 -1
  480. package/lib/typescript/screens/schedule-payment/store.d.ts.map +1 -1
  481. package/lib/typescript/screens/selfie/SelfieStore.d.ts.map +1 -1
  482. package/lib/typescript/screens/selfie/index.d.ts.map +1 -1
  483. package/lib/typescript/screens/sign-tima/ViewContract.d.ts.map +1 -1
  484. package/lib/typescript/screens/sign-tima/store.d.ts.map +1 -1
  485. package/lib/typescript/screens/toan-trinh-so/LoanInterestRate.d.ts.map +1 -1
  486. package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
  487. package/lib/typescript/screens/toan-trinh-so/RegisterBack.d.ts.map +1 -1
  488. package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts.map +1 -1
  489. package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts.map +1 -1
  490. package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts.map +1 -1
  491. package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -1
  492. package/lib/typescript/screens/toan-trinh-so/TTSNationalIDBack.d.ts.map +1 -1
  493. package/lib/typescript/screens/toan-trinh-so/TTSNationalIDFront.d.ts.map +1 -1
  494. package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts.map +1 -1
  495. package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts.map +1 -1
  496. package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -1
  497. package/lib/typescript/screens/toan-trinh-so/TopupLoanInfo.d.ts.map +1 -1
  498. package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
  499. package/lib/typescript/screens/toan-trinh-so/VehicleRegistration.d.ts.map +1 -1
  500. package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationBack.d.ts.map +1 -1
  501. package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationFront.d.ts.map +1 -1
  502. package/lib/typescript/screens/toan-trinh-so/store.d.ts.map +1 -1
  503. package/lib/typescript/screens/uploadVideo/index.d.ts.map +1 -1
  504. package/lib/typescript/screens/uploadVideo/videoStore.d.ts.map +1 -1
  505. package/lib/typescript/screens/v3/AssetInformation.d.ts.map +1 -1
  506. package/lib/typescript/screens/v3/LoanBuyCar.d.ts.map +1 -1
  507. package/lib/typescript/services/api/api.d.ts.map +1 -1
  508. package/lib/typescript/utils/cameraCrop.d.ts +43 -0
  509. package/lib/typescript/utils/cameraCrop.d.ts.map +1 -0
  510. package/package.json +2 -1
  511. package/src/AppStore.tsx +7 -2
  512. package/src/RNTimacare.tsx +7 -1
  513. package/src/assets/icons/index.tsx +10 -0
  514. package/src/assets/icons/modal_confirm.svg +15 -0
  515. package/src/assets/icons/modal_notice.svg +74 -0
  516. package/src/assets/icons/modal_success.svg +55 -0
  517. package/src/assets/icons/modal_warning.svg +48 -0
  518. package/src/assets/icons/user_security.svg +10 -0
  519. package/src/assets/tts/Frame1000011947.png +0 -0
  520. package/src/components/AppModal.tsx +34 -0
  521. package/src/components/{ItemTimaOneV3.tsx → ItemTimaOne.tsx} +1 -1
  522. package/src/components/ModalNotification/AlertGlobal.tsx +100 -0
  523. package/src/components/ModalNotification/index.tsx +224 -0
  524. package/src/components/ModalOptionLoan.tsx +15 -7
  525. package/src/components/ModalOptionLoanDigital.tsx +15 -7
  526. package/src/navigation/primary-navigator.tsx +7 -0
  527. package/src/screens/NFC/OcrStart.tsx +171 -0
  528. package/src/screens/NFC/ScanMRZ.tsx +563 -0
  529. package/src/screens/SelectorStore.tsx +7 -2
  530. package/src/screens/camera/CCCDCameraScreen.tsx +253 -187
  531. package/src/screens/camera/index.tsx +50 -54
  532. package/src/screens/cimb-sign/index.tsx +10 -14
  533. package/src/screens/detail-loan/PaymentInfo.tsx +75 -54
  534. package/src/screens/detail-loan/ShowQrCode.tsx +77 -54
  535. package/src/screens/detail-loan/store.tsx +39 -7
  536. package/src/screens/detail-loan-tima/InforLoan.tsx +20 -4
  537. package/src/screens/detail-loan-tima/PaymentSchedule.tsx +19 -4
  538. package/src/screens/digital-lending/Step6.tsx +24 -29
  539. package/src/screens/digital-lending/store.tsx +113 -20
  540. package/src/screens/eSign/Store.tsx +69 -34
  541. package/src/screens/eSign/index.tsx +33 -34
  542. package/src/screens/full-submit/accept_policy.tsx +101 -85
  543. package/src/screens/full-submit/store.tsx +157 -27
  544. package/src/screens/full-submit/update-info.tsx +0 -1
  545. package/src/screens/home/DigitalTopupItem.tsx +15 -7
  546. package/src/screens/home/ItemMotoBikeLoan.tsx +16 -7
  547. package/src/screens/home/Store.tsx +44 -23
  548. package/src/screens/home/index.tsx +306 -298
  549. package/src/screens/liveness/LivenessStore.tsx +111 -89
  550. package/src/screens/liveness/index.tsx +67 -68
  551. package/src/screens/liveness-v2/index.tsx +52 -52
  552. package/src/screens/loan/PreviewSchedulePaymentTopup.tsx +20 -10
  553. package/src/screens/loan/UpdateLoan.tsx +56 -23
  554. package/src/screens/motobike/InfoLoanMotobike.tsx +43 -29
  555. package/src/screens/motobike/PolicyF88.tsx +15 -6
  556. package/src/screens/motobike/ReviewLoanMotobike.tsx +13 -3
  557. package/src/screens/mrz-scanner/index.tsx +56 -55
  558. package/src/screens/mrz-scanner/store.ts +13 -3
  559. package/src/screens/nationalID/Store.tsx +50 -29
  560. package/src/screens/nationalID/index.tsx +123 -219
  561. package/src/screens/nationalIDBack/Store.tsx +44 -26
  562. package/src/screens/nationalIDBack/index.tsx +129 -210
  563. package/src/screens/notification/ListLoanStore.tsx +19 -4
  564. package/src/screens/notification/index.tsx +0 -1
  565. package/src/screens/notification/store.tsx +7 -2
  566. package/src/screens/personal/index.tsx +21 -19
  567. package/src/screens/qualify/Store.tsx +0 -1
  568. package/src/screens/quick-submit/store.tsx +85 -15
  569. package/src/screens/schedule-payment/DigitalSchedulePayment.tsx +20 -4
  570. package/src/screens/schedule-payment/store.tsx +13 -5
  571. package/src/screens/selfie/SelfieStore.tsx +25 -9
  572. package/src/screens/selfie/index.tsx +0 -1
  573. package/src/screens/sign-tima/ViewContract.tsx +17 -18
  574. package/src/screens/sign-tima/store.tsx +37 -7
  575. package/src/screens/toan-trinh-so/LoanInterestRate.tsx +36 -10
  576. package/src/screens/toan-trinh-so/OCR.tsx +321 -609
  577. package/src/screens/toan-trinh-so/RegisterBack.tsx +21 -4
  578. package/src/screens/toan-trinh-so/RegisterCamera.tsx +50 -54
  579. package/src/screens/toan-trinh-so/ReviewInformation.tsx +31 -25
  580. package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +88 -82
  581. package/src/screens/toan-trinh-so/ReviewLoan.tsx +25 -5
  582. package/src/screens/toan-trinh-so/TTSNationalIDBack.tsx +19 -4
  583. package/src/screens/toan-trinh-so/TTSNationalIDFront.tsx +19 -4
  584. package/src/screens/toan-trinh-so/TTSOTP.tsx +42 -25
  585. package/src/screens/toan-trinh-so/TTSSelfie.tsx +63 -56
  586. package/src/screens/toan-trinh-so/TTSSignLoan.tsx +63 -55
  587. package/src/screens/toan-trinh-so/TopupLoanInfo.tsx +50 -43
  588. package/src/screens/toan-trinh-so/VehicleCamera.tsx +275 -341
  589. package/src/screens/toan-trinh-so/VehicleRegistration.tsx +19 -4
  590. package/src/screens/toan-trinh-so/VehicleRegistrationBack.tsx +19 -4
  591. package/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx +19 -4
  592. package/src/screens/toan-trinh-so/store.ts +82 -37
  593. package/src/screens/uploadVideo/index.tsx +26 -21
  594. package/src/screens/uploadVideo/videoStore.tsx +19 -4
  595. package/src/screens/v3/AssetInformation.tsx +35 -16
  596. package/src/screens/v3/LoanBuyCar.tsx +35 -16
  597. package/src/services/api/api.ts +23 -26
  598. package/src/utils/cameraCrop.ts +96 -0
  599. package/lib/commonjs/components/ItemTimaOneV2.js +0 -2
  600. package/lib/commonjs/components/ItemTimaOneV2.js.flow +0 -617
  601. package/lib/commonjs/components/ItemTimaOneV2.js.map +0 -1
  602. package/lib/commonjs/components/ItemTimaOneV3.js +0 -2
  603. package/lib/commonjs/components/ItemTimaOneV3.js.map +0 -1
  604. package/lib/module/components/ItemTimaOneV2.js +0 -2
  605. package/lib/module/components/ItemTimaOneV2.js.map +0 -1
  606. package/lib/module/components/ItemTimaOneV3.js +0 -2
  607. package/lib/module/components/ItemTimaOneV3.js.map +0 -1
  608. package/lib/typescript/components/ItemTimaOneV2.d.ts +0 -7
  609. package/lib/typescript/components/ItemTimaOneV2.d.ts.map +0 -1
  610. package/lib/typescript/components/ItemTimaOneV3.d.ts +0 -7
  611. package/lib/typescript/components/ItemTimaOneV3.d.ts.map +0 -1
  612. package/src/components/ItemTimaOneV2.tsx +0 -617
@@ -1 +1 @@
1
- {"version":3,"names":["_mobx","require","_api","_log","_reactNative","_class","_descriptor","_descriptor2","_descriptor3","_descriptor4","Store","_classCallCheck2","default","_initializerDefineProperty2","_createClass2","key","value","uploadImage","body","onSuccess","onFailure","response","_regenerator","async","_context","prev","next","isLoading","awrap","Api","getInstance","sent","myLog","kind","data","meta","errorCode","isError","Alert","alert","errorMessage","text","stop","Promise","checkSelfieImage","loanBriefId","onError","_context2","_applyDecoratedDescriptor2","prototype","observable","configurable","enumerable","writable","initializer","undefined","action","Object","getOwnPropertyDescriptor","selfieStore","_default","exports"],"sourceRoot":"../../../../src","sources":["screens/selfie/SelfieStore.tsx"],"mappings":"81BACA,IAAAA,KAAA,CAAAC,OAAA,SACA,IAAAC,IAAA,CAAAD,OAAA,uBACA,IAAAE,IAAA,CAAAF,OAAA,oBACA,IAAAG,Y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AA,CAAAC,wBAAA,CAAArD,MAAA,CAAA4C,SAAA,gBAAA5C,MAAA,CAAA4C,SAAA,EAAA5C,MAAA,EAyDT,GAAM,CAAAsD,WAAW,CAAG,GAAI,CAAAjD,KAAK,CAAC,CAAC,CAAC,IAAAkD,QAAA,CAAAC,OAAA,CAAAjD,OAAA,CAEjB+C,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["_mobx","require","_api","_log","_AlertGlobal","_class","_descriptor","_descriptor2","_descriptor3","_descriptor4","Store","_classCallCheck2","default","_initializerDefineProperty2","_createClass2","key","value","uploadImage","body","onSuccess","onFailure","response","_regenerator","async","_context","prev","next","isLoading","awrap","Api","getInstance","sent","myLog","kind","data","meta","errorCode","isError","AlertGlobal","show","type","title","message","errorMessage","primaryText","stop","Promise","checkSelfieImage","loanBriefId","onError","_context2","_applyDecoratedDescriptor2","prototype","observable","configurable","enumerable","writable","initializer","undefined","action","Object","getOwnPropertyDescriptor","selfieStore","_default","exports"],"sourceRoot":"../../../../src","sources":["screens/selfie/SelfieStore.tsx"],"mappings":"81BACA,IAAAA,KAAA,CAAAC,OAAA,SACA,IAAAC,IAAA,CAAAD,OAAA,uBACA,IAAAE,IAAA,CAAAF,OAAA,oBACA,IAAAG,YAAA,CAAAH,OAAA,mDAA6E,IAAAI,MAAA,CAAAC,WAAA,CAAAC,YAAA,CAAAC,YAAA,CAAAC,YAAA,IAEvE,CAAAC,KAAK,EAAAL,MAAA,qBAAAK,MAAA,KAAAC,gBAAA,CAAAC,OAAA,OAAAF,KAAA,KAAAG,2BAAA,CAAAD,OAAA,eAAAN,WAAA,UAAAO,2BAAA,CAAAD,OAAA,mBAAAL,YAAA,UAAAM,2BAAA,CAAAD,OAAA,iBAAAJ,YAAA,UAAAK,2BAAA,CAAAD,OAAA,qBAAAH,YAAA,iBAAAK,aAAA,CAAAF,OAAA,EAAAF,KAAA,GAAAK,GAAA,eAAAC,KAAA,CAMT,QACM,CAAAC,WAAWA,CAACC,IAAI,CAAEC,S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BkD,WAAW","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Selfie=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _CommonStyles=require("../CommonStyles");var _keyboardspace=_interopRequireDefault(require("../../components/keyboardspace"));var _MButton=_interopRequireDefault(require("../../components/MButton"));var _MText=require("../../components/MText");var _icons=require("../../assets/icons");var _navigation=require("../../navigation");var _AppStore=_interopRequireDefault(require("../../AppStore"));var _SelfieStore=_interopRequireDefault(require("./SelfieStore"));var _Store=_interopRequireDefault(require("../nationalID/Store"));var _Loading=_interopRequireDefault(require("../../components/Loading"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _LivenessStore=_interopRequireDefault(require("../liveness/LivenessStore"));var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/selfie/index.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var logoView={position:'absolute',width:'100%',height:'100%',resizeMode:'cover'};var Selfie=exports.Selfie=(0,_mobxReactLite.observer)(function Selfie(props){var _props$route$params,_this=this;var navigation=(0,_native.useNavigation)();var step=3;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isLoading=_useState2[0],setIsLoading=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2.default)(_useState3,2),photo=_useState4[0],setPhoto=_useState4[1];var _useState5=(0,_react.useState)(null),_useState6=(0,_slicedToArray2.default)(_useState5,2),base64=_useState6[0],setBase64=_useState6[1];var loan=(_props$route$params=props.route.params)==null?void 0:_props$route$params.loan;var nextStep=function nextStep(values){var form=new FormData();setIsLoading(true);form.append('images',{uri:photo,type:'image/jpg',name:'image.jpg'});form.append('loanbriefId',loan.id);form.append('TypeDocumentId',125);form.append('UploadFrom',3);var formSelfie=new FormData();formSelfie.append('NationalCard',{uri:_Store.default.photo,type:'image/jpg',name:'national-card.jpg'});formSelfie.append('Selfie',{uri:photo,type:'image/jpg',name:'selfie.jpg'});_SelfieStore.default.checkSelfieImage(formSelfie,loan.id,function(){_SelfieStore.default.uploadImage(form,function(){setIsLoading(false);_LivenessStore.default.getConfigLiveness(function(data){if(data===1){navigation.dispatch(_native.StackActions.push(_navigation.ScreenNames.LiveNess,{loan:loan}));}else{navigation.dispatch(_native.StackActions.push(_navigation.ScreenNames.LivenessV2,{loan:loan}));}});},function(){setIsLoading(false);});},function(){setIsLoading(false);});};var takePhoto=function takePhoto(){navigation.push(_navigation.ScreenNames.Camera,{front:true,selfie:true,callback:function callback(photo){_SelfieStore.default.photo=photo;setPhoto(photo);},base64:function base64(data){setBase64(data);_SelfieStore.default.photoBase64=data;}});};return _react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:129,columnNumber:5}},_react.default.createElement(_reactNative.Image,{source:require('../../assets/img/EKYC.png'),style:logoView,__self:this,__source:{fileName:_jsxFileName,lineNumber:130,columnNumber:7}}),_react.default.createElement(_MHeader.default,{title:"X\xE1c th\u1EF1c kh\xE1ch h\xE0ng",onBack:function onBack(){return navigation.goBack();},__self:this,__source:{fileName:_jsxFileName,lineNumber:131,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:132,columnNumber:7}},_react.default.createElement(_reactNative.ScrollView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:133,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{paddingHorizontal:16,paddingVertical:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:134,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:135,columnNumber:13}},_react.default.createElement(_icons.TimaSmallWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:142,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:16,color:'#FFFFFF',marginLeft:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:143,columnNumber:15}},"\u1EA2nh ch\u1EE5p khu\xF4n m\u1EB7t")),_react.default.createElement(_reactNative.Image,{source:photo?{uri:photo}:require('../../assets/img/selfie.png'),style:{width:_reactNative.Dimensions.get('window').width-32,height:(_reactNative.Dimensions.get('window').width-32)*534/564,borderWidth:8,borderRadius:6,borderColor:'#FFFFFF',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:152,columnNumber:13}}))),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',paddingHorizontal:16,marginBottom:30},__self:this,__source:{fileName:_jsxFileName,lineNumber:167,columnNumber:9}},_react.default.createElement(_MButton.default,{onPress:function onPress(){takePhoto();},disabled:_AppStore.default.isLoading||_SelfieStore.default.isLoading,style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'#FFFFFF',height:40,borderRadius:30,flex:1,marginRight:8,borderWidth:1,borderColor:'#EF4123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:174,columnNumber:11}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'#F05123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:195,columnNumber:13}},"Ch\u1EE5p \u1EA3nh")),_react.default.createElement(_mobxReactLite.Observer,{__self:this,__source:{fileName:_jsxFileName,lineNumber:199,columnNumber:11}},function(){return _react.default.createElement(_MButton.default,{disabled:!photo||isLoading,onPress:nextStep,style:{flex:1},__self:_this,__source:{fileName:_jsxFileName,lineNumber:201,columnNumber:15}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF7A00','#EF4123'],style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{height:40,borderRadius:30,marginLeft:8}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:206,columnNumber:17}},isLoading?_react.default.createElement(_reactNative.ActivityIndicator,{color:'white',size:"small",__self:_this,__source:{fileName:_jsxFileName,lineNumber:219,columnNumber:21}}):_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'white'}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:221,columnNumber:21}},"Ti\u1EBFp t\u1EE5c")));})),(loan==null?void 0:loan.isPipelineCIMB)&&_react.default.createElement(_reactNative.View,{style:{marginBottom:24,marginTop:8,flexDirection:'row',justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:233,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:241,columnNumber:13}},"Cung c\u1EA5p b\u1EDFi",' '),_react.default.createElement(_icons.CIMBBank,{__self:this,__source:{fileName:_jsxFileName,lineNumber:244,columnNumber:13}})),_react.default.createElement(_keyboardspace.default,{__self:this,__source:{fileName:_jsxFileName,lineNumber:247,columnNumber:9}})),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:249,columnNumber:7}}));});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Selfie=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _CommonStyles=require("../CommonStyles");var _keyboardspace=_interopRequireDefault(require("../../components/keyboardspace"));var _MButton=_interopRequireDefault(require("../../components/MButton"));var _MText=require("../../components/MText");var _icons=require("../../assets/icons");var _navigation=require("../../navigation");var _AppStore=_interopRequireDefault(require("../../AppStore"));var _SelfieStore=_interopRequireDefault(require("./SelfieStore"));var _Store=_interopRequireDefault(require("../nationalID/Store"));var _Loading=_interopRequireDefault(require("../../components/Loading"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _LivenessStore=_interopRequireDefault(require("../liveness/LivenessStore"));var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/selfie/index.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var logoView={position:'absolute',width:'100%',height:'100%',resizeMode:'cover'};var Selfie=exports.Selfie=(0,_mobxReactLite.observer)(function Selfie(props){var _props$route$params,_this=this;var navigation=(0,_native.useNavigation)();var step=3;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isLoading=_useState2[0],setIsLoading=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2.default)(_useState3,2),photo=_useState4[0],setPhoto=_useState4[1];var _useState5=(0,_react.useState)(null),_useState6=(0,_slicedToArray2.default)(_useState5,2),base64=_useState6[0],setBase64=_useState6[1];var loan=(_props$route$params=props.route.params)==null?void 0:_props$route$params.loan;var nextStep=function nextStep(values){var form=new FormData();setIsLoading(true);form.append('images',{uri:photo,type:'image/jpg',name:'image.jpg'});form.append('loanbriefId',loan.id);form.append('TypeDocumentId',125);form.append('UploadFrom',3);var formSelfie=new FormData();formSelfie.append('NationalCard',{uri:_Store.default.photo,type:'image/jpg',name:'national-card.jpg'});formSelfie.append('Selfie',{uri:photo,type:'image/jpg',name:'selfie.jpg'});_SelfieStore.default.checkSelfieImage(formSelfie,loan.id,function(){_SelfieStore.default.uploadImage(form,function(){setIsLoading(false);_LivenessStore.default.getConfigLiveness(function(data){if(data===1){navigation.dispatch(_native.StackActions.push(_navigation.ScreenNames.LiveNess,{loan:loan}));}else{navigation.dispatch(_native.StackActions.push(_navigation.ScreenNames.LivenessV2,{loan:loan}));}});},function(){setIsLoading(false);});},function(){setIsLoading(false);});};var takePhoto=function takePhoto(){navigation.push(_navigation.ScreenNames.Camera,{front:true,selfie:true,callback:function callback(photo){_SelfieStore.default.photo=photo;setPhoto(photo);},base64:function base64(data){setBase64(data);_SelfieStore.default.photoBase64=data;}});};return _react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:128,columnNumber:5}},_react.default.createElement(_reactNative.Image,{source:require('../../assets/img/EKYC.png'),style:logoView,__self:this,__source:{fileName:_jsxFileName,lineNumber:129,columnNumber:7}}),_react.default.createElement(_MHeader.default,{title:"X\xE1c th\u1EF1c kh\xE1ch h\xE0ng",onBack:function onBack(){return navigation.goBack();},__self:this,__source:{fileName:_jsxFileName,lineNumber:130,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:131,columnNumber:7}},_react.default.createElement(_reactNative.ScrollView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:132,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{paddingHorizontal:16,paddingVertical:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:133,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:134,columnNumber:13}},_react.default.createElement(_icons.TimaSmallWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:141,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:16,color:'#FFFFFF',marginLeft:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:142,columnNumber:15}},"\u1EA2nh ch\u1EE5p khu\xF4n m\u1EB7t")),_react.default.createElement(_reactNative.Image,{source:photo?{uri:photo}:require('../../assets/img/selfie.png'),style:{width:_reactNative.Dimensions.get('window').width-32,height:(_reactNative.Dimensions.get('window').width-32)*534/564,borderWidth:8,borderRadius:6,borderColor:'#FFFFFF',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:151,columnNumber:13}}))),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',paddingHorizontal:16,marginBottom:30},__self:this,__source:{fileName:_jsxFileName,lineNumber:166,columnNumber:9}},_react.default.createElement(_MButton.default,{onPress:function onPress(){takePhoto();},disabled:_AppStore.default.isLoading||_SelfieStore.default.isLoading,style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'#FFFFFF',height:40,borderRadius:30,flex:1,marginRight:8,borderWidth:1,borderColor:'#EF4123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:173,columnNumber:11}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'#F05123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:194,columnNumber:13}},"Ch\u1EE5p \u1EA3nh")),_react.default.createElement(_mobxReactLite.Observer,{__self:this,__source:{fileName:_jsxFileName,lineNumber:198,columnNumber:11}},function(){return _react.default.createElement(_MButton.default,{disabled:!photo||isLoading,onPress:nextStep,style:{flex:1},__self:_this,__source:{fileName:_jsxFileName,lineNumber:200,columnNumber:15}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF7A00','#EF4123'],style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{height:40,borderRadius:30,marginLeft:8}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:205,columnNumber:17}},isLoading?_react.default.createElement(_reactNative.ActivityIndicator,{color:'white',size:"small",__self:_this,__source:{fileName:_jsxFileName,lineNumber:218,columnNumber:21}}):_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'white'}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:220,columnNumber:21}},"Ti\u1EBFp t\u1EE5c")));})),(loan==null?void 0:loan.isPipelineCIMB)&&_react.default.createElement(_reactNative.View,{style:{marginBottom:24,marginTop:8,flexDirection:'row',justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:232,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:240,columnNumber:13}},"Cung c\u1EA5p b\u1EDFi",' '),_react.default.createElement(_icons.CIMBBank,{__self:this,__source:{fileName:_jsxFileName,lineNumber:243,columnNumber:13}})),_react.default.createElement(_keyboardspace.default,{__self:this,__source:{fileName:_jsxFileName,lineNumber:246,columnNumber:9}})),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:248,columnNumber:7}}));});
2
2
  //# sourceMappingURL=index.js.map
@@ -2,7 +2,6 @@
2
2
  import React, { useState, Fragment } from 'react';
3
3
  import {
4
4
  ActivityIndicator,
5
- Alert,
6
5
  Dimensions,
7
6
  Image,
8
7
  ImageStyle,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_native","_mobxReactLite","_CommonStyles","_keyboardspace","_interopRequireDefault","_MButton","_MText","_icons","_navigation","_AppStore","_SelfieStore","_Store","_Loading","_reactNativeLinearGradient","_LivenessStore","_MHeader","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","logoView","position","width","height","resizeMode","Selfie","exports","observer","props","_props$route$params","_this","navigation","useNavigation","step","_useState","useState","_useState2","_slicedToArray2","isLoading","setIsLoading","_useState3","_useState4","photo","setPhoto","_useState5","_useState6","base64","setBase64","loan","route","params","nextStep","values","form","FormData","append","uri","type","name","id","formSelfie","nationalIDStore","selfieStore","checkSelfieImage","uploadImage","livenessStore","getConfigLiveness","data","dispatch","StackActions","push","ScreenNames","LiveNess","LivenessV2","takePhoto","Camera","front","selfie","callback","photoBase64","createElement","View","style","flex","__self","__source","fileName","lineNumber","columnNumber","Image","source","title","onBack","goBack","SafeAreaView","commonStyles","fill","ScrollView","paddingHorizontal","paddingVertical","flexDirection","alignItems","marginTop","TimaSmallWhite","MText","textNormalBold","fontSize","color","marginLeft","Dimensions","borderWidth","borderRadius","borderColor","marginBottom","onPress","disabled","appStore","row","alignCenter","justifyCenter","backgroundColor","marginRight","textNormal","Observer","colors","ActivityIndicator","size","isPipelineCIMB","justifyContent","CIMBBank"],"sourceRoot":"../../../../src","sources":["screens/selfie/index.tsx"],"mappings":"8PACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAaA,IAAAE,OAAA,CAAAF,OAAA,6BAKA,IAAAG,cAAA,CAAAH,OAAA,oBACA,IAAAI,aAAA,CAAAJ,OAAA,oBACA,IAAAK,cAAA,CAAAC,sBAAA,CAAAN,OAAA,oCACA,IAAAO,QAAA,CAA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EAAE,CAChBX,SAAS,CAAE,CAAC,CACZF,aAAa,CAAE,KAAK,CACpB4B,cAAc,CAAE,QAClB,CAAE,CAAA5C,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAvF,YAAA,CAAAwF,UAAA,KAAAC,YAAA,MAEF7G,MAAA,CAAA+B,OAAA,CAAAsE,aAAA,CAAC3F,MAAA,CAAAmH,KAAK,EAACtB,KAAK,CAAE,CAAEwB,QAAQ,CAAE,EAAE,CAAEC,KAAK,CAAE,SAAU,CAAE,CAAAvB,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAvF,YAAA,CAAAwF,UAAA,KAAAC,YAAA,MAAC,wBACpC,CAAC,GACR,CAAC,CACR7G,MAAA,CAAA+B,OAAA,CAAAsE,aAAA,CAAC1F,MAAA,CAAA2I,QAAQ,EAAA7C,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAvF,YAAA,CAAAwF,UAAA,KAAAC,YAAA,KAAE,CACP,CACP,CACD7G,MAAA,CAAA+B,OAAA,CAAAsE,aAAA,CAAC9F,cAAA,CAAAwB,OAAc,EAAA0E,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAvF,YAAA,CAAAwF,UAAA,KAAAC,YAAA,IAAE,CACL,CAAC,CACf7G,MAAA,CAAA+B,OAAA,CAAAsE,aAAA,CAACrF,QAAA,CAAAe,OAAO,EAAC4B,SAAS,CAAEA,SAAU,CAAA8C,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAvF,YAAA,CAAAwF,UAAA,KAAAC,YAAA,IAAE,CAC5B,CAAC,CAEX,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_native","_mobxReactLite","_CommonStyles","_keyboardspace","_interopRequireDefault","_MButton","_MText","_icons","_navigation","_AppStore","_SelfieStore","_Store","_Loading","_reactNativeLinearGradient","_LivenessStore","_MHeader","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","logoView","position","width","height","resizeMode","Selfie","exports","observer","props","_props$route$params","_this","navigation","useNavigation","step","_useState","useState","_useState2","_slicedToArray2","isLoading","setIsLoading","_useState3","_useState4","photo","setPhoto","_useState5","_useState6","base64","setBase64","loan","route","params","nextStep","values","form","FormData","append","uri","type","name","id","formSelfie","nationalIDStore","selfieStore","checkSelfieImage","uploadImage","livenessStore","getConfigLiveness","data","dispatch","StackActions","push","ScreenNames","LiveNess","LivenessV2","takePhoto","Camera","front","selfie","callback","photoBase64","createElement","View","style","flex","__self","__source","fileName","lineNumber","columnNumber","Image","source","title","onBack","goBack","SafeAreaView","commonStyles","fill","ScrollView","paddingHorizontal","paddingVertical","flexDirection","alignItems","marginTop","TimaSmallWhite","MText","textNormalBold","fontSize","color","marginLeft","Dimensions","borderWidth","borderRadius","borderColor","marginBottom","onPress","disabled","appStore","row","alignCenter","justifyCenter","backgroundColor","marginRight","textNormal","Observer","colors","ActivityIndicator","size","isPipelineCIMB","justifyContent","CIMBBank"],"sourceRoot":"../../../../src","sources":["screens/selfie/index.tsx"],"mappings":"8PACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAYA,IAAAE,OAAA,CAAAF,OAAA,6BAKA,IAAAG,cAAA,CAAAH,OAAA,oBACA,IAAAI,aAAA,CAAAJ,OAAA,oBACA,IAAAK,cAAA,CAAAC,sBAAA,CAAAN,OAAA,oCACA,IAAAO,QAAA,CAAAD,sBAAA,CAAAN,OAAA,8BAEA,IAAAQ,MAAA,CAAAR,OAAA,2BACA,IAAAS,MAAA,CAAAT,OAAA,uBAOA,IAAAU,WAAA,CAAAV,OAAA,qBACA,IAAAW,SAAA,CAAAL,sBAAA,CAAAN,OAAA,oBACA,IAAAY,YAAA,CAAAN,sBAAA,CAAAN,OAAA,mBACA,IAAAa,MAAA,CAAAP,sBAAA,CAAAN,OAAA,yBACA,IAAA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,CAAE,EAAE,CAAEC,KAAK,CAAE,SAAU,CAAE,CAAAvB,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAvF,YAAA,CAAAwF,UAAA,KAAAC,YAAA,MAAC,wBACpC,CAAC,GACR,CAAC,CACR7G,MAAA,CAAA+B,OAAA,CAAAsE,aAAA,CAAC1F,MAAA,CAAA2I,QAAQ,EAAA7C,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAvF,YAAA,CAAAwF,UAAA,KAAAC,YAAA,KAAE,CACP,CACP,CACD7G,MAAA,CAAA+B,OAAA,CAAAsE,aAAA,CAAC9F,cAAA,CAAAwB,OAAc,EAAA0E,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAvF,YAAA,CAAAwF,UAAA,KAAAC,YAAA,IAAE,CACL,CAAC,CACf7G,MAAA,CAAA+B,OAAA,CAAAsE,aAAA,CAACrF,QAAA,CAAAe,OAAO,EAAC4B,SAAS,CAAEA,SAAU,CAAA8C,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAvF,YAAA,CAAAwF,UAAA,KAAAC,YAAA,IAAE,CAC5B,CAAC,CAEX,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ViewContract=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _reactNativePdf=_interopRequireDefault(require("react-native-pdf"));var _icons=require("../../assets/icons");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _MText=require("../../components/MText");var _navigation=require("../../navigation");var _CommonStyles=require("../CommonStyles");var _store=_interopRequireDefault(require("./store"));var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _api=require("../../services/api");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/sign-tima/ViewContract.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}var ViewContract=exports.ViewContract=(0,_mobxReactLite.observer)(function ViewContract(props){var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)({}),_useState2=(0,_slicedToArray2.default)(_useState,2),source=_useState2[0],setSource=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),check=_useState4[0],setCheck=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=(0,_slicedToArray2.default)(_useState5,2),isLoading=_useState6[0],setIsLoading=_useState6[1];(0,_react.useEffect)(function(){_store.default.getContract(props.route.params.loan.id,function(data){setSource({uri:'data:application/pdf;base64,'+data});});},[]);var sign=function _callee(){var _response$data,_response$data$meta,response,_response$data2,_response$data3,_response$data3$meta,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;setIsLoading(true);_context.next=1;return _regenerator.default.awrap(_api.Api.getInstance().sign_viettel_for_borrower_cimb({loanBriefId:props.route.params.loan.id,isTermesEtConditions:true}));case 1:response=_context.sent;if(response.kind==='ok'&&((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.MySignViettel,{url:response==null?void 0:(_response$data2=response.data)==null?void 0:_response$data2.data,id:props.route.params.loan.id});}else{_reactNative.Alert.alert('Thông báo',((_response$data3=response.data)==null?void 0:(_response$data3$meta=_response$data3.meta)==null?void 0:_response$data3$meta.errorMessage)||'Có lỗi xảy ra, vui lòng thử lại sau',[{text:'OK',onPress:function onPress(){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));}}]);}_context.next=3;break;case 2:_context.prev=2;_t=_context["catch"](0);console.log(_t);setIsLoading(false);case 3:_context.prev=3;setIsLoading(false);return _context.finish(3);case 4:case"end":return _context.stop();}},null,null,[[0,2,3,4]],Promise);};return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'#FFFFFF'},__self:this,__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"H\u1EE3p \u0111\u1ED3ng d\u1ECBch v\u1EE5",onBack:function onBack(){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));},__self:this,__source:{fileName:_jsxFileName,lineNumber:76,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:87,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:88,columnNumber:9}},_react.default.createElement(_reactNativePdf.default,{source:source,onLoadComplete:function onLoadComplete(numberOfPages,filePath){console.log("Number of pages: "+numberOfPages);},onPageChanged:function onPageChanged(page,numberOfPages){console.log("Current page: "+page);},onError:function onError(error){console.log(error);},onPressLink:function onPressLink(uri){console.log("Link pressed: "+uri);},style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:89,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'white',marginVertical:16,paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:108,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row'},__self:this,__source:{fileName:_jsxFileName,lineNumber:115,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{style:{marginLeft:8},onPress:function onPress(){return setCheck(!check);},__self:this,__source:{fileName:_jsxFileName,lineNumber:116,columnNumber:13}},check?_react.default.createElement(_icons.CheckBoxActive,{__self:this,__source:{fileName:_jsxFileName,lineNumber:120,columnNumber:24}}):_react.default.createElement(_icons.CheckBox,{__self:this,__source:{fileName:_jsxFileName,lineNumber:120,columnNumber:45}})),_react.default.createElement(_MText.MText,{style:{color:'#333333',paddingLeft:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:122,columnNumber:13}},"T\xF4i \u0111\u1ED3ng \xFD v\u1EDBi t\u1EA5t c\u1EA3 nh\u1EEFng \u0111i\u1EC1u ki\u1EC7n trong",'\n'," h\u1EE3p \u0111\u1ED3ng.")),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){sign();},disabled:!check||isLoading,style:{marginTop:32,marginBottom:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:127,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:check?['#FF7A00','#EF4123']:['#BDBDBD','#BDBDBD'],style:{alignItems:'center',borderRadius:30,height:40,justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:137,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{color:check?'white':'#333333'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:146,columnNumber:15}},"K\xFD h\u1EE3p \u0111\u1ED3ng"))))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:158,columnNumber:7}}));});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ViewContract=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _reactNativePdf=_interopRequireDefault(require("react-native-pdf"));var _icons=require("../../assets/icons");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _AlertGlobal=require("../../components/ModalNotification/AlertGlobal");var _MText=require("../../components/MText");var _navigation=require("../../navigation");var _CommonStyles=require("../CommonStyles");var _store=_interopRequireDefault(require("./store"));var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _api=require("../../services/api");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/sign-tima/ViewContract.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}var ViewContract=exports.ViewContract=(0,_mobxReactLite.observer)(function ViewContract(props){var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)({}),_useState2=(0,_slicedToArray2.default)(_useState,2),source=_useState2[0],setSource=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),check=_useState4[0],setCheck=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=(0,_slicedToArray2.default)(_useState5,2),isLoading=_useState6[0],setIsLoading=_useState6[1];(0,_react.useEffect)(function(){_store.default.getContract(props.route.params.loan.id,function(data){setSource({uri:'data:application/pdf;base64,'+data});});},[]);var sign=function _callee(){var _response$data,_response$data$meta,response,_response$data2,_response$data3,_response$data3$meta,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;setIsLoading(true);_context.next=1;return _regenerator.default.awrap(_api.Api.getInstance().sign_viettel_for_borrower_cimb({loanBriefId:props.route.params.loan.id,isTermesEtConditions:true}));case 1:response=_context.sent;if(response.kind==='ok'&&((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.MySignViettel,{url:response==null?void 0:(_response$data2=response.data)==null?void 0:_response$data2.data,id:props.route.params.loan.id});}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:((_response$data3=response.data)==null?void 0:(_response$data3$meta=_response$data3.meta)==null?void 0:_response$data3$meta.errorMessage)||'Có lỗi xảy ra, vui lòng thử lại sau',primaryText:'OK',onPrimaryPress:function onPrimaryPress(){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));}});}_context.next=3;break;case 2:_context.prev=2;_t=_context["catch"](0);console.log(_t);setIsLoading(false);case 3:_context.prev=3;setIsLoading(false);return _context.finish(3);case 4:case"end":return _context.stop();}},null,null,[[0,2,3,4]],Promise);};return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'#FFFFFF'},__self:this,__source:{fileName:_jsxFileName,lineNumber:74,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"H\u1EE3p \u0111\u1ED3ng d\u1ECBch v\u1EE5",onBack:function onBack(){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));},__self:this,__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:86,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:87,columnNumber:9}},_react.default.createElement(_reactNativePdf.default,{source:source,onLoadComplete:function onLoadComplete(numberOfPages,filePath){console.log("Number of pages: "+numberOfPages);},onPageChanged:function onPageChanged(page,numberOfPages){console.log("Current page: "+page);},onError:function onError(error){console.log(error);},onPressLink:function onPressLink(uri){console.log("Link pressed: "+uri);},style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:88,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'white',marginVertical:16,paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:107,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row'},__self:this,__source:{fileName:_jsxFileName,lineNumber:114,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{style:{marginLeft:8},onPress:function onPress(){return setCheck(!check);},__self:this,__source:{fileName:_jsxFileName,lineNumber:115,columnNumber:13}},check?_react.default.createElement(_icons.CheckBoxActive,{__self:this,__source:{fileName:_jsxFileName,lineNumber:119,columnNumber:24}}):_react.default.createElement(_icons.CheckBox,{__self:this,__source:{fileName:_jsxFileName,lineNumber:119,columnNumber:45}})),_react.default.createElement(_MText.MText,{style:{color:'#333333',paddingLeft:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:121,columnNumber:13}},"T\xF4i \u0111\u1ED3ng \xFD v\u1EDBi t\u1EA5t c\u1EA3 nh\u1EEFng \u0111i\u1EC1u ki\u1EC7n trong",'\n'," h\u1EE3p \u0111\u1ED3ng.")),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){sign();},disabled:!check||isLoading,style:{marginTop:32,marginBottom:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:126,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:check?['#FF7A00','#EF4123']:['#BDBDBD','#BDBDBD'],style:{alignItems:'center',borderRadius:30,height:40,justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:136,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{color:check?'white':'#333333'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:145,columnNumber:15}},"K\xFD h\u1EE3p \u0111\u1ED3ng"))))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:157,columnNumber:7}}));});
2
2
  //# sourceMappingURL=ViewContract.js.map
@@ -6,11 +6,12 @@ import {
6
6
  } from '@react-navigation/native';
7
7
  import { observer } from 'mobx-react-lite';
8
8
  import React, { useEffect, useState } from 'react';
9
- import { Alert, SafeAreaView, TouchableOpacity, View } from 'react-native';
9
+ import { SafeAreaView, TouchableOpacity, View } from 'react-native';
10
10
  import LinearGradient from 'react-native-linear-gradient';
11
11
  import Pdf from 'react-native-pdf';
12
12
  import { CheckBox, CheckBoxActive, IconBack } from '../../assets/icons';
13
13
  import Loading from '../../components/Loading';
14
+ import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
14
15
  import { MText } from '../../components/MText';
15
16
  import { ScreenNames } from '../../navigation';
16
17
  import { color } from '../../theme';
@@ -45,24 +46,22 @@ export const ViewContract = observer(function ViewContract(props: any) {
45
46
  id: props.route.params.loan.id,
46
47
  });
47
48
  } else {
48
- Alert.alert(
49
- 'Thông báo',
50
- response.data?.meta?.errorMessage ||
49
+ AlertGlobal.show({
50
+ type: 'warning',
51
+ title: 'Thông báo',
52
+ message:
53
+ response.data?.meta?.errorMessage ||
51
54
  'Có lỗi xảy ra, vui lòng thử lại sau',
52
- [
53
- {
54
- text: 'OK',
55
- onPress: () => {
56
- navigation.dispatch(
57
- CommonActions.reset({
58
- index: 1,
59
- routes: [{ name: ScreenNames.Main }],
60
- })
61
- );
62
- },
63
- },
64
- ]
65
- );
55
+ primaryText: 'OK',
56
+ onPrimaryPress: () => {
57
+ navigation.dispatch(
58
+ CommonActions.reset({
59
+ index: 1,
60
+ routes: [{ name: ScreenNames.Main }],
61
+ })
62
+ );
63
+ },
64
+ });
66
65
  }
67
66
  } catch (error) {
68
67
  console.log(error);
@@ -1 +1 @@
1
- {"version":3,"names":["_native","require","_mobxReactLite","_react","_interopRequireWildcard","_reactNative","_reactNativeLinearGradient","_interopRequireDefault","_reactNativePdf","_icons","_Loading","_MText","_navigation","_CommonStyles","_store","_MHeader","_api","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ViewContract","exports","observer","props","navigation","useNavigation","_useState","useState","_useState2","_slicedToArray2","source","setSource","_useState3","_useState4","check","setCheck","_useState5","_useState6","isLoading","setIsLoading","useEffect","SignTimaStore","getContract","route","params","loan","id","data","uri","sign","_callee","_response$data","_response$data$meta","response","_response$data2","_response$data3","_response$data3$meta","_t","_regenerator","async","_context","prev","next","awrap","Api","getInstance","sign_viettel_for_borrower_cimb","loanBriefId","isTermesEtConditions","sent","kind","meta","errorCode","push","ScreenNames","MySignViettel","url","Alert","alert","errorMessage","text","onPress","dispatch","CommonActions","reset","index","routes","name","Main","console","log","finish","stop","Promise","createElement","View","style","flex","backgroundColor","__self","__source","fileName","lineNumber","columnNumber","title","onBack","SafeAreaView","onLoadComplete","numberOfPages","filePath","onPageChanged","page","onError","error","onPressLink","marginVertical","paddingHorizontal","flexDirection","TouchableOpacity","marginLeft","CheckBoxActive","CheckBox","MText","color","paddingLeft","disabled","marginTop","marginBottom","colors","alignItems","borderRadius","height","justifyContent","commonStyles","textNormalBold"],"sourceRoot":"../../../../src","sources":["screens/sign-tima/ViewContract.tsx"],"mappings":"mVACA,IAAAA,OAAA,CAAAC,OAAA,6BAKA,IAAAC,cAAA,CAAAD,OAAA,oBACA,IAAAE,MAAA,CAAAC,uBAAA,CAAAH,OAAA,WACA,IAAAI,YAAA,CAAAJ,OAAA,iBACA,IAAAK,0BAAA,CAAAC,sBAAA,CAAAN,OAAA,kCACA,IAAAO,eAAA,CAAAD,sBAAA,CAAAN,OAAA,sBACA,IAAAQ,MAAA,CAAAR,OAAA,uBACA,IAAA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C,CAAC,CACR,CAAE,CACF4E,QAAQ,CAAE,CAAC3F,KAAK,EAAII,SAAU,CAC9B0D,KAAK,CAAE,CACL8B,SAAS,CAAE,EAAE,CACbC,YAAY,CAAE,EAChB,CAAE,CAAA5B,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAtG,YAAA,CAAAuG,UAAA,KAAAC,YAAA,MAEFtH,MAAA,CAAAyB,OAAA,CAAAoF,aAAA,CAAC1G,0BAAA,CAAAsB,OAAc,EACbsH,MAAM,CAAE9F,KAAK,CAAG,CAAC,SAAS,CAAE,SAAS,CAAC,CAAG,CAAC,SAAS,CAAE,SAAS,CAAE,CAChE8D,KAAK,CAAE,CACLiC,UAAU,CAAE,QAAQ,CACpBC,YAAY,CAAE,EAAE,CAChBC,MAAM,CAAE,EAAE,CACVC,cAAc,CAAE,QAClB,CAAE,CAAAjC,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAtG,YAAA,CAAAuG,UAAA,KAAAC,YAAA,MAEFtH,MAAA,CAAAyB,OAAA,CAAAoF,aAAA,CAACrG,MAAA,CAAAiI,KAAK,EACJ1B,KAAK,CAAE,CACLqC,0BAAY,CAACC,cAAc,CAC3B,CAAEX,KAAK,CAAEzF,KAAK,CAAG,OAAO,CAAG,SAAU,CAAC,CACtC,CAAAiE,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAtG,YAAA,CAAAuG,UAAA,KAAAC,YAAA,MACH,+BAEM,CACO,CACA,CACd,CACM,CAAC,CACftH,MAAA,CAAAyB,OAAA,CAAAoF,aAAA,CAACtG,QAAA,CAAAkB,OAAO,EAAC4B,SAAS,CAAEA,SAAU,CAAA6D,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAtG,YAAA,CAAAuG,UAAA,KAAAC,YAAA,IAAE,CAC5B,CAAC,CAEX,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_native","require","_mobxReactLite","_react","_interopRequireWildcard","_reactNative","_reactNativeLinearGradient","_interopRequireDefault","_reactNativePdf","_icons","_Loading","_AlertGlobal","_MText","_navigation","_CommonStyles","_store","_MHeader","_api","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ViewContract","exports","observer","props","navigation","useNavigation","_useState","useState","_useState2","_slicedToArray2","source","setSource","_useState3","_useState4","check","setCheck","_useState5","_useState6","isLoading","setIsLoading","useEffect","SignTimaStore","getContract","route","params","loan","id","data","uri","sign","_callee","_response$data","_response$data$meta","response","_response$data2","_response$data3","_response$data3$meta","_t","_regenerator","async","_context","prev","next","awrap","Api","getInstance","sign_viettel_for_borrower_cimb","loanBriefId","isTermesEtConditions","sent","kind","meta","errorCode","push","ScreenNames","MySignViettel","url","AlertGlobal","show","type","title","message","errorMessage","primaryText","onPrimaryPress","dispatch","CommonActions","reset","index","routes","name","Main","console","log","finish","stop","Promise","createElement","View","style","flex","backgroundColor","__self","__source","fileName","lineNumber","columnNumber","onBack","SafeAreaView","onLoadComplete","numberOfPages","filePath","onPageChanged","page","onError","error","onPressLink","marginVertical","paddingHorizontal","flexDirection","TouchableOpacity","marginLeft","onPress","CheckBoxActive","CheckBox","MText","color","paddingLeft","disabled","marginTop","marginBottom","colors","alignItems","borderRadius","height","justifyContent","commonStyles","textNormalBold"],"sourceRoot":"../../../../src","sources":["screens/sign-tima/ViewContract.tsx"],"mappings":"mVACA,IAAAA,OAAA,CAAAC,OAAA,6BAKA,IAAAC,cAAA,CAAAD,OAAA,oBACA,IAAAE,MAAA,CAAAC,uBAAA,CAAAH,OAAA,WACA,IAAAI,YAAA,CAAAJ,OAAA,iBACA,IAAAK,0BAAA,CAAAC,sBAAA,CAAAN,OAAA,kCACA,IAAAO,eAAA,CAAAD,sBAAA,CAAAN,OAAA,sBACA,IAAAQ,MAAA,CAAAR,OAAA,uBACA,IAAAS,QAAA,CAAAH,sBAAA,CAAAN,OAAA,8BACA,IAAAU,YAAA,CAAAV,OAAA,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");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _initializerDefineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/initializerDefineProperty"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _applyDecoratedDescriptor2=_interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));var _initializerWarningHelper2=_interopRequireDefault(require("@babel/runtime/helpers/initializerWarningHelper"));var _mobx=require("mobx");var _reactNative=require("react-native");var _api=require("../../services/api");var _class,_descriptor;var Store=(_class=function(){function Store(){(0,_classCallCheck2.default)(this,Store);(0,_initializerDefineProperty2.default)(this,"isLoading",_descriptor,this);}return(0,_createClass2.default)(Store,[{key:"getContract",value:function getContract(id,onSuccess){var response,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;this.isLoading=true;_context.next=1;return _regenerator.default.awrap(_api.Api.getInstance().getContract(id));case 1:response=_context.sent;console.log(response);this.isLoading=false;if(response.kind==='ok'){if(response.data.meta.errorCode===200){if(onSuccess)onSuccess(response.data.data);}else{_reactNative.Alert.alert('Thông báo',response.data.meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau!');}_context.next=3;break;case 2:_context.prev=2;_t=_context["catch"](0);console.log(_t);case 3:case"end":return _context.stop();}},null,this,[[0,2]],Promise);}},{key:"getOtpSign",value:function getOtpSign(type){var response,_t2;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=1;return _regenerator.default.awrap(_api.Api.getInstance().getOtpSign(type));case 1:response=_context2.sent;if(response.kind==='ok'){if(response.data.meta.errorCode===200){}else{_reactNative.Alert.alert('Thông báo',response.data.meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau!');}_context2.next=3;break;case 2:_context2.prev=2;_t2=_context2["catch"](0);console.log(_t2);case 3:case"end":return _context2.stop();}},null,null,[[0,2]],Promise);}},{key:"confirmContract",value:function confirmContract(body,onSuccess){var response,_t3;return _regenerator.default.async(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;this.isLoading=true;_context3.next=1;return _regenerator.default.awrap(_api.Api.getInstance().confirmContract(body));case 1:response=_context3.sent;console.log(response);this.isLoading=false;if(response.kind==='ok'){if(response.data.meta.errorCode===200){if(onSuccess)onSuccess(response.data.data);}else{_reactNative.Alert.alert('Thông báo',response.data.meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau!');}_context3.next=3;break;case 2:_context3.prev=2;_t3=_context3["catch"](0);console.log(_t3);case 3:case"end":return _context3.stop();}},null,this,[[0,2]],Promise);}}]);}(),_descriptor=(0,_applyDecoratedDescriptor2.default)(_class.prototype,"isLoading",[_mobx.observable],{configurable:true,enumerable:true,writable:true,initializer:function initializer(){return false;}}),(0,_applyDecoratedDescriptor2.default)(_class.prototype,"getContract",[_mobx.action],Object.getOwnPropertyDescriptor(_class.prototype,"getContract"),_class.prototype),(0,_applyDecoratedDescriptor2.default)(_class.prototype,"getOtpSign",[_mobx.action],Object.getOwnPropertyDescriptor(_class.prototype,"getOtpSign"),_class.prototype),(0,_applyDecoratedDescriptor2.default)(_class.prototype,"confirmContract",[_mobx.action],Object.getOwnPropertyDescriptor(_class.prototype,"confirmContract"),_class.prototype),_class);var SignTimaStore=new Store();var _default=exports.default=SignTimaStore;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _initializerDefineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/initializerDefineProperty"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _applyDecoratedDescriptor2=_interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));var _initializerWarningHelper2=_interopRequireDefault(require("@babel/runtime/helpers/initializerWarningHelper"));var _mobx=require("mobx");var _AlertGlobal=require("../../components/ModalNotification/AlertGlobal");var _api=require("../../services/api");var _class,_descriptor;var Store=(_class=function(){function Store(){(0,_classCallCheck2.default)(this,Store);(0,_initializerDefineProperty2.default)(this,"isLoading",_descriptor,this);}return(0,_createClass2.default)(Store,[{key:"getContract",value:function getContract(id,onSuccess){var response,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;this.isLoading=true;_context.next=1;return _regenerator.default.awrap(_api.Api.getInstance().getContract(id));case 1:response=_context.sent;console.log(response);this.isLoading=false;if(response.kind==='ok'){if(response.data.meta.errorCode===200){if(onSuccess)onSuccess(response.data.data);}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:response.data.meta.errorMessage,primaryText:'Đóng'});}}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Có lỗi xảy ra. Vui lòng thử lại sau!',primaryText:'Đóng'});}_context.next=3;break;case 2:_context.prev=2;_t=_context["catch"](0);console.log(_t);case 3:case"end":return _context.stop();}},null,this,[[0,2]],Promise);}},{key:"getOtpSign",value:function getOtpSign(type){var response,_t2;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=1;return _regenerator.default.awrap(_api.Api.getInstance().getOtpSign(type));case 1:response=_context2.sent;if(response.kind==='ok'){if(response.data.meta.errorCode===200){}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:response.data.meta.errorMessage,primaryText:'Đóng'});}}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Có lỗi xảy ra. Vui lòng thử lại sau!',primaryText:'Đóng'});}_context2.next=3;break;case 2:_context2.prev=2;_t2=_context2["catch"](0);console.log(_t2);case 3:case"end":return _context2.stop();}},null,null,[[0,2]],Promise);}},{key:"confirmContract",value:function confirmContract(body,onSuccess){var response,_t3;return _regenerator.default.async(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;this.isLoading=true;_context3.next=1;return _regenerator.default.awrap(_api.Api.getInstance().confirmContract(body));case 1:response=_context3.sent;console.log(response);this.isLoading=false;if(response.kind==='ok'){if(response.data.meta.errorCode===200){if(onSuccess)onSuccess(response.data.data);}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:response.data.meta.errorMessage,primaryText:'Đóng'});}}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Có lỗi xảy ra. Vui lòng thử lại sau!',primaryText:'Đóng'});}_context3.next=3;break;case 2:_context3.prev=2;_t3=_context3["catch"](0);console.log(_t3);case 3:case"end":return _context3.stop();}},null,this,[[0,2]],Promise);}}]);}(),_descriptor=(0,_applyDecoratedDescriptor2.default)(_class.prototype,"isLoading",[_mobx.observable],{configurable:true,enumerable:true,writable:true,initializer:function initializer(){return false;}}),(0,_applyDecoratedDescriptor2.default)(_class.prototype,"getContract",[_mobx.action],Object.getOwnPropertyDescriptor(_class.prototype,"getContract"),_class.prototype),(0,_applyDecoratedDescriptor2.default)(_class.prototype,"getOtpSign",[_mobx.action],Object.getOwnPropertyDescriptor(_class.prototype,"getOtpSign"),_class.prototype),(0,_applyDecoratedDescriptor2.default)(_class.prototype,"confirmContract",[_mobx.action],Object.getOwnPropertyDescriptor(_class.prototype,"confirmContract"),_class.prototype),_class);var SignTimaStore=new Store();var _default=exports.default=SignTimaStore;
2
2
  //# sourceMappingURL=store.js.map
@@ -1,6 +1,6 @@
1
1
  //@ts-nocheck
2
2
  import { action, observable } from 'mobx';
3
- import { Alert } from 'react-native';
3
+ import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
4
4
  import { Api } from '../../services/api';
5
5
 
6
6
  class Store {
@@ -18,10 +18,20 @@ class Store {
18
18
  if (response.data.meta.errorCode === 200) {
19
19
  if (onSuccess) onSuccess(response.data.data);
20
20
  } else {
21
- Alert.alert('Thông báo', response.data.meta.errorMessage);
21
+ AlertGlobal.show({
22
+ type: 'warning',
23
+ title: 'Thông báo',
24
+ message: response.data.meta.errorMessage,
25
+ primaryText: 'Đóng',
26
+ });
22
27
  }
23
28
  } else {
24
- Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau!');
29
+ AlertGlobal.show({
30
+ type: 'warning',
31
+ title: 'Thông báo',
32
+ message: 'Có lỗi xảy ra. Vui lòng thử lại sau!',
33
+ primaryText: 'Đóng',
34
+ });
25
35
  }
26
36
  } catch (error) {
27
37
  console.log(error);
@@ -35,10 +45,20 @@ class Store {
35
45
  if (response.kind === 'ok') {
36
46
  if (response.data.meta.errorCode === 200) {
37
47
  } else {
38
- Alert.alert('Thông báo', response.data.meta.errorMessage);
48
+ AlertGlobal.show({
49
+ type: 'warning',
50
+ title: 'Thông báo',
51
+ message: response.data.meta.errorMessage,
52
+ primaryText: 'Đóng',
53
+ });
39
54
  }
40
55
  } else {
41
- Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau!');
56
+ AlertGlobal.show({
57
+ type: 'warning',
58
+ title: 'Thông báo',
59
+ message: 'Có lỗi xảy ra. Vui lòng thử lại sau!',
60
+ primaryText: 'Đóng',
61
+ });
42
62
  }
43
63
  } catch (error) {
44
64
  console.log(error);
@@ -57,10 +77,20 @@ class Store {
57
77
  if (response.data.meta.errorCode === 200) {
58
78
  if (onSuccess) onSuccess(response.data.data);
59
79
  } else {
60
- Alert.alert('Thông báo', response.data.meta.errorMessage);
80
+ AlertGlobal.show({
81
+ type: 'warning',
82
+ title: 'Thông báo',
83
+ message: response.data.meta.errorMessage,
84
+ primaryText: 'Đóng',
85
+ });
61
86
  }
62
87
  } else {
63
- Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau!');
88
+ AlertGlobal.show({
89
+ type: 'warning',
90
+ title: 'Thông báo',
91
+ message: 'Có lỗi xảy ra. Vui lòng thử lại sau!',
92
+ primaryText: 'Đóng',
93
+ });
64
94
  }
65
95
  } catch (error) {
66
96
  console.log(error);
@@ -1 +1 @@
1
- {"version":3,"names":["_mobx","require","_reactNative","_api","_class","_descriptor","Store","_classCallCheck2","default","_initializerDefineProperty2","_createClass2","key","value","getContract","id","onSuccess","response","_t","_regenerator","async","_context","prev","next","isLoading","awrap","Api","getInstance","sent","console","log","kind","data","meta","errorCode","Alert","alert","errorMessage","stop","Promise","getOtpSign","type","_t2","_context2","confirmContract","body","_t3","_context3","_applyDecoratedDescriptor2","prototype","observable","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","SignTimaStore","_default","exports"],"sourceRoot":"../../../../src","sources":["screens/sign-tima/store.tsx"],"mappings":"81BACA,IAAAA,KAAA,CAAAC,OAAA,SACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,IAAA,CAAAF,OAAA,uBAAyC,IAAAG,MAAA,CAAAC,WAAA,IAEnC,CAAAC,KAAK,EAAAF,MAAA,qBAAAE,MAAA,KAAAC,gBAAA,CAAAC,OAAA,OAAAF,KAAA,KAAAG,2BAAA,CAAAD,OAAA,mBAAAH,WAAA,iBAAAK,aAAA,CAAAF,OAAA,EAAAF,KAAA,GAAAK,GAAA,eAAAC,KAAA,CAGT,QACM,CAAAC,WAAWA,CAACC,EAAE,CAAEC,SAAS,MAAAC,QAAA,CAAAC,EAAA,QAAAC,YAAA,CAAAV,OAAA,CAAAW,KAAA,UAAAC,QAAA,iBAAAA,QAAA,CAAAC,IAAA,CAAAD,QAAA,CAAAE,IAAA,SAAAF,QAAA,CAAAC,IAAA,GAE3B,IAAI,CAACE,SAAS,CAAG,IAAI,CAACH,QAA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 {"version":3,"names":["_mobx","require","_AlertGlobal","_api","_class","_descriptor","Store","_classCallCheck2","default","_initializerDefineProperty2","_createClass2","key","value","getContract","id","onSuccess","response","_t","_regenerator","async","_context","prev","next","isLoading","awrap","Api","getInstance","sent","console","log","kind","data","meta","errorCode","AlertGlobal","show","type","title","message","errorMessage","primaryText","stop","Promise","getOtpSign","_t2","_context2","confirmContract","body","_t3","_context3","_applyDecoratedDescriptor2","prototype","observable","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","SignTimaStore","_default","exports"],"sourceRoot":"../../../../src","sources":["screens/sign-tima/store.tsx"],"mappings":"81BACA,IAAAA,KAAA,CAAAC,OAAA,SACA,IAAAC,YAAA,CAAAD,OAAA,mDACA,IAAAE,IAAA,CAAAF,OAAA,uBAAyC,IAAAG,MAAA,CAAAC,WAAA,IAEnC,CAAAC,KAAK,EAAAF,MAAA,qBAAAE,MAAA,KAAAC,gBAAA,CAAAC,OAAA,OAAAF,KAAA,KAAAG,2BAAA,CAAAD,OAAA,mBAAAH,WAAA,iBAAAK,aAAA,CAAAF,OAAA,EAAAF,KAAA,GAAAK,GAAA,eAAAC,KAAA,CAGT,QACM,CAAAC,WAAWA,CAACC,EAAE,CAAEC,SAAS,MAAAC,QAAA,CAAAC,EAAA,QAAAC,YAAA,CAAAV,OAAA,CAAAW,KAAA,UAAAC,QAAA,iBAAAA,QAAA,CAAAC,IAAA,CAAAD,QAAA,CAAAE,IAAA,SAAAF,QAAA,CAAAC,IAAA,GAE3B,IAAI,CAACE,SAAS,CAAG,IAAI,CAACH,QAAA,CAAAE,IAAA,UAAAJ,YAAA,CAAAV,OAAA,CAAAgB,KAAA,CACCC,QAAG,CAACC,WAAW,CAAC,CAAC,CAACb,WAAW,CAACC,EAAE,CAAC,SAAlDE,QAAQ,CAAAI,QAAA,CAAAO,IAAA,CACdC,OAAO,CAACC,GAAG,CAACb,QAAQ,CAAC,CAErB,IAAI,CAACO,SAAS,CAAG,KAAK,CACtB,GAAI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A+C,SAAA,oBA2BNM,YAAM,EAAAC,MAAA,CAAAC,wBAAA,CAAAvD,MAAA,CAAA+C,SAAA,oBAAA/C,MAAA,CAAA+C,SAAA,EAAA/C,MAAA,EAiCT,GAAM,CAAAwD,aAAa,CAAG,GAAI,CAAAtD,KAAK,CAAC,CAAC,CAAC,IAAAuD,QAAA,CAAAC,OAAA,CAAAtD,OAAA,CACnBoD,aAAa","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=LoanInterestRate;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _CommonStyles=require("../CommonStyles");var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _MText=require("../../components/MText");var _native=require("@react-navigation/native");var _utils=require("../../utils");var _svgs=require("../../assets/svgs");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _navigation=require("../../navigation");var _api=require("../../services/api");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/toan-trinh-so/LoanInterestRate.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t3 in e)"default"!==_t3&&{}.hasOwnProperty.call(e,_t3)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t3))&&(i.get||i.set)?o(f,_t3,i):f[_t3]=e[_t3]);return f;})(e,t);}function LoanInterestRate(props){var _props$route,_props$route$params,_data$listPaymentSche,_this=this;var loan=props==null?void 0:(_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:_props$route$params.loan;var navigation=(0,_native.useNavigation)();var _React$useState=_react.default.useState(false),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),isLoading=_React$useState2[0],setIsLoading=_React$useState2[1];var _React$useState3=_react.default.useState(null),_React$useState4=(0,_slicedToArray2.default)(_React$useState3,2),data=_React$useState4[0],setData=_React$useState4[1];var getData=function _callee(){var response,_response$data,_response$data$meta,_response$data2,_response$data3,_response$data3$meta,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:setIsLoading(true);_context.prev=1;_context.next=2;return _regenerator.default.awrap(_api.Api.getInstance().getPaymentPlan(loan==null?void 0:loan.id));case 2:response=_context.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){setData((_response$data2=response.data)==null?void 0:_response$data2.data);}else{_reactNative.Alert.alert('Thông báo',((_response$data3=response.data)==null?void 0:(_response$data3$meta=_response$data3.meta)==null?void 0:_response$data3$meta.message)||'Có lỗi xảy ra, vui lòng thử lại sau');}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra, vui lòng thử lại sau');}_context.next=4;break;case 3:_context.prev=3;_t=_context["catch"](1);console.error('Error fetching data:',_t);setIsLoading(false);_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra, vui lòng thử lại sau');case 4:case"end":return _context.stop();}},null,null,[[1,3]],Promise);};(0,_react.useEffect)(function(){getData();},[]);var acceptLoan=function _callee2(){var response,_response$data4,_response$data4$meta,_response$data5,_response$data5$meta,_t2;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!((loan==null?void 0:loan.step)===5)){_context2.next=5;break;}setIsLoading(true);_context2.prev=1;_context2.next=2;return _regenerator.default.awrap(_api.Api.getInstance().changePipeline({LoanBriefId:loan==null?void 0:loan.id,TypeId:1}));case 2:response=_context2.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data4=response.data)==null?void 0:(_response$data4$meta=_response$data4.meta)==null?void 0:_response$data4$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.LivenessV2,{loan:loan});}else{_reactNative.Alert.alert('Thông báo',(_response$data5=response.data)==null?void 0:(_response$data5$meta=_response$data5.meta)==null?void 0:_response$data5$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=4;break;case 3:_context2.prev=3;_t2=_context2["catch"](1);setIsLoading(false);case 4:_context2.next=6;break;case 5:navigation.push(_navigation.ScreenNames.LivenessV2,{loan:loan});case 6:case"end":return _context2.stop();}},null,null,[[1,3]],Promise);};return _react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:79,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"Vay tr\u1EF1c tuy\u1EBFn 24/7",__self:this,__source:{fileName:_jsxFileName,lineNumber:80,columnNumber:7}}),_react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:$h,__self:this,__source:{fileName:_jsxFileName,lineNumber:82,columnNumber:9}}),_react.default.createElement(_reactNative.View,{style:$bg,__self:this,__source:{fileName:_jsxFileName,lineNumber:83,columnNumber:9}},_react.default.createElement(_MText.MText,{style:$title,__self:this,__source:{fileName:_jsxFileName,lineNumber:84,columnNumber:11}},"B\u1EA3ng bi\u1EC3u l\xE3i ph\xED \u0111\u01A1n vay"),_react.default.createElement(_reactNative.ScrollView,{__self:this,__source:{fileName:_jsxFileName,lineNumber:85,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:{borderWidth:1,borderColor:'#FF8E4F',borderRadius:8,paddingHorizontal:16,paddingVertical:12,marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:86,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:96,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:103,columnNumber:17}},"M\xE3 H\u0110 gi\u1EA3i ng\xE2n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:111,columnNumber:17}},"HD-",data==null?void 0:data.loanBriefId)),_react.default.createElement(_MText.MText,{ellipsizeMode:"clip",numberOfLines:1,style:{flex:1,color:'#D1D1D6',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:121,columnNumber:15}},"--------------------------------------------------------------------------------------------------------"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:132,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:139,columnNumber:17}},"S\u1ED1 ti\u1EC1n vay (1)+(2)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:147,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalMoney)," \u0111")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:157,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#999999',marginLeft:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:165,columnNumber:17}},"S\u1ED1 ti\u1EC1n gi\u1EA3i ng\xE2n (1)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:174,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalLoanAmount)," \u0111")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:4},__self:this,__source:{fileName:_jsxFileName,lineNumber:183,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#999999',marginLeft:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:191,columnNumber:17}},"S\u1ED1 ti\u1EC1n b\u1EA3o hi\u1EC3m (2)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:200,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalMoneyInsurance)," \u0111")),_react.default.createElement(_MText.MText,{ellipsizeMode:"clip",numberOfLines:1,style:{flex:1,color:'#D1D1D6',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:209,columnNumber:15}},"--------------------------------------------------------------------------------------------------------"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:220,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:227,columnNumber:17}},"Th\u1EDDi h\u1EA1n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:235,columnNumber:17}},data==null?void 0:data.loanTime," th\xE1ng")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:8},__self:this,__source:{fileName:_jsxFileName,lineNumber:245,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:253,columnNumber:17}},"Ng\xE0y d\u1EF1 ki\u1EBFn gi\u1EA3i ng\xE2n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:261,columnNumber:17}},(0,_utils.formatDDMMYYY)(data==null?void 0:data.expectedDisbursementDate)))),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFF3E9',marginTop:16,flexDirection:'row',paddingHorizontal:16,paddingVertical:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:272,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:281,columnNumber:15}},"Ng\xE0y thanh to\xE1n"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:291,columnNumber:15}},"G\u1ED1c tr\u1EA3 k\u1EF3"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:301,columnNumber:15}},"T\u1ED5ng l\xE3i ph\xED"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:311,columnNumber:15}},"T\u1ED5ng tr\u1EA3 k\u1EF3")),data==null?void 0:(_data$listPaymentSche=data.listPaymentSchedule)==null?void 0:_data$listPaymentSche.map(function(item,index){return _react.default.createElement(_reactNative.View,{key:index,style:{flexDirection:'row',paddingHorizontal:16,paddingVertical:16,borderBottomWidth:1,borderBottomColor:'#F0F0F0'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:323,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:333,columnNumber:17}},item==null?void 0:item.payDate),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:343,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.moneyOriginal)," \u0111"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:353,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.totalInterest)," \u0111"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'rgba(239, 89, 46, 1)',width:'25%',textAlign:'center',fontWeight:'bold'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:363,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.totalMoneyNeedPayment)," \u0111"));}),_react.default.createElement(_MText.MText,{style:$des,__self:this,__source:{fileName:_jsxFileName,lineNumber:377,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#E40010'},__self:this,__source:{fileName:_jsxFileName,lineNumber:378,columnNumber:15}},"*")," \u0110\xE2y l\xE0 l\xE3i su\u1EA5t \xE1p d\u1EE5ng cho kh\xE1ch h\xE0ng c\xF3 \u0111i\u1EC3m t\xEDn d\u1EE5ng t\u1ED1t. L\xE3i su\u1EA5t th\u1EF1c t\u1EBF s\u1EBD hi\u1EC3n th\u1ECB sau khi ho\xE0n thi\u1EC7n vay"),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFF8F2',borderRadius:8,paddingHorizontal:12,paddingVertical:8,marginHorizontal:16,marginTop:16,marginBottom:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:382,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',gap:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:393,columnNumber:15}},_react.default.createElement(_svgs.IconNotify,{__self:this,__source:{fileName:_jsxFileName,lineNumber:400,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:401,columnNumber:17}},"B\u01B0\u1EDBc cu\u1ED1i c\xF9ng r\u1ED3i!!!")),_react.default.createElement(_MText.MText,{style:{color:'#828282',marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:410,columnNumber:15}},"Vui l\xF2ng eKYC - ho\xE0n thi\u1EC7n x\xE1c th\u1EF1c khu\xF4n m\u1EB7t v\xE0 k\xFD h\u1EE3p \u0111\u1ED3ng \u0111\u1EC3 \u0111\u01B0\u1EE3c gi\u1EA3i ng\xE2n nhanh nh\u1EA5t!"))),(loan==null?void 0:loan.step)===6?_react.default.createElement(_MButton.default,{onPress:function onPress(){acceptLoan();},style:{marginVertical:24,marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:422,columnNumber:13}},_react.default.createElement(_reactNativeLinearGradient.default,{start:{x:1,y:0},end:{x:0,y:1},style:{height:40,marginVertical:16,borderRadius:30,alignItems:'center',justifyContent:'center'},colors:['#FF7A00','#EF4123'],__self:this,__source:{fileName:_jsxFileName,lineNumber:431,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:443,columnNumber:17}},"\u0110i t\u1EDBi eKYC"))):_react.default.createElement(_react.default.Fragment,null))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:458,columnNumber:7}}));}var $des={fontSize:10,color:'#828282',paddingHorizontal:16,fontStyle:'italic',marginTop:16};var $title={fontSize:16,fontWeight:'bold',color:'#333333',textAlign:'center',paddingVertical:16};var $h={backgroundColor:'#EF592E',position:'absolute',height:30,width:'100%'};var $bg={borderTopLeftRadius:30,borderTopRightRadius:30,backgroundColor:'white',flex:1};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=LoanInterestRate;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _CommonStyles=require("../CommonStyles");var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _MText=require("../../components/MText");var _native=require("@react-navigation/native");var _utils=require("../../utils");var _svgs=require("../../assets/svgs");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _navigation=require("../../navigation");var _api=require("../../services/api");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _AlertGlobal=require("../../components/ModalNotification/AlertGlobal");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/toan-trinh-so/LoanInterestRate.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t3 in e)"default"!==_t3&&{}.hasOwnProperty.call(e,_t3)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t3))&&(i.get||i.set)?o(f,_t3,i):f[_t3]=e[_t3]);return f;})(e,t);}function LoanInterestRate(props){var _props$route,_props$route$params,_data$listPaymentSche,_this=this;var loan=props==null?void 0:(_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:_props$route$params.loan;var navigation=(0,_native.useNavigation)();var _React$useState=_react.default.useState(false),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),isLoading=_React$useState2[0],setIsLoading=_React$useState2[1];var _React$useState3=_react.default.useState(null),_React$useState4=(0,_slicedToArray2.default)(_React$useState3,2),data=_React$useState4[0],setData=_React$useState4[1];var getData=function _callee(){var response,_response$data,_response$data$meta,_response$data2,_response$data3,_response$data3$meta,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:setIsLoading(true);_context.prev=1;_context.next=2;return _regenerator.default.awrap(_api.Api.getInstance().getPaymentPlan(loan==null?void 0:loan.id));case 2:response=_context.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){setData((_response$data2=response.data)==null?void 0:_response$data2.data);}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:((_response$data3=response.data)==null?void 0:(_response$data3$meta=_response$data3.meta)==null?void 0:_response$data3$meta.errorMessage)||'Có lỗi xảy ra, vui lòng thử lại sau',primaryText:'Đóng'});}}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Có lỗi xảy ra, vui lòng thử lại sau',primaryText:'Đóng'});}_context.next=4;break;case 3:_context.prev=3;_t=_context["catch"](1);console.error('Error fetching data:',_t);setIsLoading(false);_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Có lỗi xảy ra, vui lòng thử lại sau',primaryText:'Đóng'});case 4:case"end":return _context.stop();}},null,null,[[1,3]],Promise);};(0,_react.useEffect)(function(){getData();},[]);var acceptLoan=function _callee2(){var response,_response$data4,_response$data4$meta,_response$data$meta$e,_response$data5,_response$data5$meta,_t2;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!((loan==null?void 0:loan.step)===5)){_context2.next=5;break;}setIsLoading(true);_context2.prev=1;_context2.next=2;return _regenerator.default.awrap(_api.Api.getInstance().changePipeline({LoanBriefId:loan==null?void 0:loan.id,TypeId:1}));case 2:response=_context2.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data4=response.data)==null?void 0:(_response$data4$meta=_response$data4.meta)==null?void 0:_response$data4$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.LivenessV2,{loan:loan});}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:(_response$data$meta$e=(_response$data5=response.data)==null?void 0:(_response$data5$meta=_response$data5.meta)==null?void 0:_response$data5$meta.errorMessage)!=null?_response$data$meta$e:'Có lỗi xảy ra, vui lòng thử lại sau',primaryText:'Đóng'});}}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Có lỗi xảy ra, vui lòng thử lại sau',primaryText:'Đóng'});}_context2.next=4;break;case 3:_context2.prev=3;_t2=_context2["catch"](1);setIsLoading(false);case 4:_context2.next=6;break;case 5:navigation.push(_navigation.ScreenNames.LivenessV2,{loan:loan});case 6:case"end":return _context2.stop();}},null,null,[[1,3]],Promise);};return _react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:105,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"Vay tr\u1EF1c tuy\u1EBFn 24/7",__self:this,__source:{fileName:_jsxFileName,lineNumber:106,columnNumber:7}}),_react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:107,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:$h,__self:this,__source:{fileName:_jsxFileName,lineNumber:108,columnNumber:9}}),_react.default.createElement(_reactNative.View,{style:$bg,__self:this,__source:{fileName:_jsxFileName,lineNumber:109,columnNumber:9}},_react.default.createElement(_MText.MText,{style:$title,__self:this,__source:{fileName:_jsxFileName,lineNumber:110,columnNumber:11}},"B\u1EA3ng bi\u1EC3u l\xE3i ph\xED \u0111\u01A1n vay"),_react.default.createElement(_reactNative.ScrollView,{__self:this,__source:{fileName:_jsxFileName,lineNumber:111,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:{borderWidth:1,borderColor:'#FF8E4F',borderRadius:8,paddingHorizontal:16,paddingVertical:12,marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:112,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:122,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:129,columnNumber:17}},"M\xE3 H\u0110 gi\u1EA3i ng\xE2n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:137,columnNumber:17}},"HD-",data==null?void 0:data.loanBriefId)),_react.default.createElement(_MText.MText,{ellipsizeMode:"clip",numberOfLines:1,style:{flex:1,color:'#D1D1D6',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:147,columnNumber:15}},"--------------------------------------------------------------------------------------------------------"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:158,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:165,columnNumber:17}},"S\u1ED1 ti\u1EC1n vay (1)+(2)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:173,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalMoney)," \u0111")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:183,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#999999',marginLeft:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:191,columnNumber:17}},"S\u1ED1 ti\u1EC1n gi\u1EA3i ng\xE2n (1)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:200,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalLoanAmount)," \u0111")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:4},__self:this,__source:{fileName:_jsxFileName,lineNumber:209,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#999999',marginLeft:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:217,columnNumber:17}},"S\u1ED1 ti\u1EC1n b\u1EA3o hi\u1EC3m (2)"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:226,columnNumber:17}},(0,_utils.formatMoney)(data==null?void 0:data.totalMoneyInsurance)," \u0111")),_react.default.createElement(_MText.MText,{ellipsizeMode:"clip",numberOfLines:1,style:{flex:1,color:'#D1D1D6',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:235,columnNumber:15}},"--------------------------------------------------------------------------------------------------------"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:246,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:253,columnNumber:17}},"Th\u1EDDi h\u1EA1n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:261,columnNumber:17}},data==null?void 0:data.loanTime," th\xE1ng")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginTop:8},__self:this,__source:{fileName:_jsxFileName,lineNumber:271,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333'},__self:this,__source:{fileName:_jsxFileName,lineNumber:279,columnNumber:17}},"Ng\xE0y d\u1EF1 ki\u1EBFn gi\u1EA3i ng\xE2n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,color:'#333333',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:287,columnNumber:17}},(0,_utils.formatDDMMYYY)(data==null?void 0:data.expectedDisbursementDate)))),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFF3E9',marginTop:16,flexDirection:'row',paddingHorizontal:16,paddingVertical:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:298,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:307,columnNumber:15}},"Ng\xE0y thanh to\xE1n"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:317,columnNumber:15}},"G\u1ED1c tr\u1EA3 k\u1EF3"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:327,columnNumber:15}},"T\u1ED5ng l\xE3i ph\xED"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:337,columnNumber:15}},"T\u1ED5ng tr\u1EA3 k\u1EF3")),data==null?void 0:(_data$listPaymentSche=data.listPaymentSchedule)==null?void 0:_data$listPaymentSche.map(function(item,index){return _react.default.createElement(_reactNative.View,{key:index,style:{flexDirection:'row',paddingHorizontal:16,paddingVertical:16,borderBottomWidth:1,borderBottomColor:'#F0F0F0'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:349,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:359,columnNumber:17}},item==null?void 0:item.payDate),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:369,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.moneyOriginal)," \u0111"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#333333',width:'25%',textAlign:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:379,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.totalInterest)," \u0111"),_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'rgba(239, 89, 46, 1)',width:'25%',textAlign:'center',fontWeight:'bold'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:389,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.totalMoneyNeedPayment)," \u0111"));}),_react.default.createElement(_MText.MText,{style:$des,__self:this,__source:{fileName:_jsxFileName,lineNumber:403,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{fontSize:10,color:'#E40010'},__self:this,__source:{fileName:_jsxFileName,lineNumber:404,columnNumber:15}},"*")," \u0110\xE2y l\xE0 l\xE3i su\u1EA5t \xE1p d\u1EE5ng cho kh\xE1ch h\xE0ng c\xF3 \u0111i\u1EC3m t\xEDn d\u1EE5ng t\u1ED1t. L\xE3i su\u1EA5t th\u1EF1c t\u1EBF s\u1EBD hi\u1EC3n th\u1ECB sau khi ho\xE0n thi\u1EC7n vay"),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFF8F2',borderRadius:8,paddingHorizontal:12,paddingVertical:8,marginHorizontal:16,marginTop:16,marginBottom:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:408,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',gap:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:419,columnNumber:15}},_react.default.createElement(_svgs.IconNotify,{__self:this,__source:{fileName:_jsxFileName,lineNumber:426,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:427,columnNumber:17}},"B\u01B0\u1EDBc cu\u1ED1i c\xF9ng r\u1ED3i!!!")),_react.default.createElement(_MText.MText,{style:{color:'#828282',marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:436,columnNumber:15}},"Vui l\xF2ng eKYC - ho\xE0n thi\u1EC7n x\xE1c th\u1EF1c khu\xF4n m\u1EB7t v\xE0 k\xFD h\u1EE3p \u0111\u1ED3ng \u0111\u1EC3 \u0111\u01B0\u1EE3c gi\u1EA3i ng\xE2n nhanh nh\u1EA5t!"))),(loan==null?void 0:loan.step)===6?_react.default.createElement(_MButton.default,{onPress:function onPress(){acceptLoan();},style:{marginVertical:24,marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:448,columnNumber:13}},_react.default.createElement(_reactNativeLinearGradient.default,{start:{x:1,y:0},end:{x:0,y:1},style:{height:40,marginVertical:16,borderRadius:30,alignItems:'center',justifyContent:'center'},colors:['#FF7A00','#EF4123'],__self:this,__source:{fileName:_jsxFileName,lineNumber:457,columnNumber:15}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:469,columnNumber:17}},"\u0110i t\u1EDBi eKYC"))):_react.default.createElement(_react.default.Fragment,null))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:484,columnNumber:7}}));}var $des={fontSize:10,color:'#828282',paddingHorizontal:16,fontStyle:'italic',marginTop:16};var $title={fontSize:16,fontWeight:'bold',color:'#333333',textAlign:'center',paddingVertical:16};var $h={backgroundColor:'#EF592E',position:'absolute',height:30,width:'100%'};var $bg={borderTopLeftRadius:30,borderTopRightRadius:30,backgroundColor:'white',flex:1};
2
2
  //# sourceMappingURL=LoanInterestRate.js.map