react-native-timacare 3.1.66 → 3.1.67

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 (250) hide show
  1. package/lib/commonjs/AppStore.js +1 -1
  2. package/lib/commonjs/AppStore.js.flow +4 -2
  3. package/lib/commonjs/AppStore.js.map +1 -1
  4. package/lib/commonjs/assets/v3/home.svg +5 -0
  5. package/lib/commonjs/assets/v3/index.js +2 -0
  6. package/lib/commonjs/assets/v3/index.js.flow +38 -0
  7. package/lib/commonjs/assets/v3/index.js.map +1 -0
  8. package/lib/commonjs/assets/v3/option1.svg +27 -0
  9. package/lib/commonjs/assets/v3/option2.svg +25 -0
  10. package/lib/commonjs/assets/v3/step1-success.svg +39 -0
  11. package/lib/commonjs/assets/v3/step1.svg +90 -0
  12. package/lib/commonjs/assets/v3/step2-disable.svg +14 -0
  13. package/lib/commonjs/assets/v3/step2-success.svg +8 -0
  14. package/lib/commonjs/assets/v3/step2.svg +37 -0
  15. package/lib/commonjs/assets/v3/step3-disable.svg +17 -0
  16. package/lib/commonjs/assets/v3/step3-success.svg +17 -0
  17. package/lib/commonjs/assets/v3/step3.svg +45 -0
  18. package/lib/commonjs/assets/v3/step4-disable.svg +11 -0
  19. package/lib/commonjs/assets/v3/step4-success.svg +11 -0
  20. package/lib/commonjs/assets/v3/step4.svg +29 -0
  21. package/lib/commonjs/assets/v3/step5-disable.svg +17 -0
  22. package/lib/commonjs/assets/v3/step5-success.svg +17 -0
  23. package/lib/commonjs/assets/v3/step5.svg +45 -0
  24. package/lib/commonjs/components/ItemTimaOneV2.js +2 -0
  25. package/lib/commonjs/components/ItemTimaOneV2.js.flow +617 -0
  26. package/lib/commonjs/components/ItemTimaOneV2.js.map +1 -0
  27. package/lib/commonjs/components/ItemTimaOneV3.js +2 -0
  28. package/lib/commonjs/components/ItemTimaOneV3.js.flow +558 -0
  29. package/lib/commonjs/components/ItemTimaOneV3.js.map +1 -0
  30. package/lib/commonjs/components/MText.js +1 -1
  31. package/lib/commonjs/components/MText.js.flow +1 -1
  32. package/lib/commonjs/components/ModalOptionLoan.js +2 -0
  33. package/lib/commonjs/components/ModalOptionLoan.js.flow +242 -0
  34. package/lib/commonjs/components/ModalOptionLoan.js.map +1 -0
  35. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  36. package/lib/commonjs/navigation/primary-navigator.js.flow +12 -0
  37. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  38. package/lib/commonjs/screens/eSign/index.js +1 -1
  39. package/lib/commonjs/screens/eSign/index.js.flow +22 -16
  40. package/lib/commonjs/screens/eSign/index.js.map +1 -1
  41. package/lib/commonjs/screens/home/index.js +1 -1
  42. package/lib/commonjs/screens/home/index.js.flow +64 -625
  43. package/lib/commonjs/screens/home/index.js.map +1 -1
  44. package/lib/commonjs/screens/mySignViettel/Layer_3.png +0 -0
  45. package/lib/commonjs/screens/mySignViettel/index.js +2 -0
  46. package/lib/commonjs/screens/mySignViettel/index.js.flow +278 -0
  47. package/lib/commonjs/screens/mySignViettel/index.js.map +1 -0
  48. package/lib/commonjs/screens/sign-tima/ViewContract.js +1 -1
  49. package/lib/commonjs/screens/sign-tima/ViewContract.js.flow +22 -16
  50. package/lib/commonjs/screens/sign-tima/ViewContract.js.map +1 -1
  51. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  52. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +1 -1
  53. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
  54. package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js +1 -1
  55. package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js.flow +9 -2
  56. package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js.map +1 -1
  57. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +1 -1
  58. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +110 -7
  59. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  60. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  61. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +9 -8
  62. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  63. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +1 -1
  64. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +43 -169
  65. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  66. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js +1 -1
  67. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.flow +1 -1
  68. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -1
  69. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
  70. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.flow +1 -1
  71. package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
  72. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js +1 -1
  73. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.flow +17 -14
  74. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
  75. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  76. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +38 -19
  77. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  78. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
  79. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +133 -43
  80. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  81. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js +1 -1
  82. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.flow +1 -1
  83. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
  84. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js +1 -1
  85. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.flow +1 -1
  86. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -1
  87. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
  88. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.flow +1 -1
  89. package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
  90. package/lib/commonjs/screens/toan-trinh-so/store.js +1 -1
  91. package/lib/commonjs/screens/toan-trinh-so/store.js.flow +1 -1
  92. package/lib/commonjs/screens/toan-trinh-so/store.js.map +1 -1
  93. package/lib/commonjs/screens/v3/AssetInformation.js +2 -0
  94. package/lib/commonjs/screens/v3/AssetInformation.js.flow +690 -0
  95. package/lib/commonjs/screens/v3/AssetInformation.js.map +1 -0
  96. package/lib/commonjs/services/api/api.js +1 -1
  97. package/lib/commonjs/services/api/api.js.flow +196 -0
  98. package/lib/commonjs/services/api/api.js.map +1 -1
  99. package/lib/commonjs/utils/index.js +1 -1
  100. package/lib/commonjs/utils/index.js.flow +2 -0
  101. package/lib/commonjs/utils/index.js.map +1 -1
  102. package/lib/module/AppStore.js +1 -1
  103. package/lib/module/AppStore.js.map +1 -1
  104. package/lib/module/assets/v3/home.svg +5 -0
  105. package/lib/module/assets/v3/index.js +2 -0
  106. package/lib/module/assets/v3/index.js.map +1 -0
  107. package/lib/module/assets/v3/option1.svg +27 -0
  108. package/lib/module/assets/v3/option2.svg +25 -0
  109. package/lib/module/assets/v3/step1-success.svg +39 -0
  110. package/lib/module/assets/v3/step1.svg +90 -0
  111. package/lib/module/assets/v3/step2-disable.svg +14 -0
  112. package/lib/module/assets/v3/step2-success.svg +8 -0
  113. package/lib/module/assets/v3/step2.svg +37 -0
  114. package/lib/module/assets/v3/step3-disable.svg +17 -0
  115. package/lib/module/assets/v3/step3-success.svg +17 -0
  116. package/lib/module/assets/v3/step3.svg +45 -0
  117. package/lib/module/assets/v3/step4-disable.svg +11 -0
  118. package/lib/module/assets/v3/step4-success.svg +11 -0
  119. package/lib/module/assets/v3/step4.svg +29 -0
  120. package/lib/module/assets/v3/step5-disable.svg +17 -0
  121. package/lib/module/assets/v3/step5-success.svg +17 -0
  122. package/lib/module/assets/v3/step5.svg +45 -0
  123. package/lib/module/components/ItemTimaOneV2.js +2 -0
  124. package/lib/module/components/ItemTimaOneV2.js.map +1 -0
  125. package/lib/module/components/ItemTimaOneV3.js +2 -0
  126. package/lib/module/components/ItemTimaOneV3.js.map +1 -0
  127. package/lib/module/components/MText.js +1 -1
  128. package/lib/module/components/ModalOptionLoan.js +2 -0
  129. package/lib/module/components/ModalOptionLoan.js.map +1 -0
  130. package/lib/module/navigation/primary-navigator.js +1 -1
  131. package/lib/module/navigation/primary-navigator.js.map +1 -1
  132. package/lib/module/screens/eSign/index.js +1 -1
  133. package/lib/module/screens/eSign/index.js.map +1 -1
  134. package/lib/module/screens/home/index.js +1 -1
  135. package/lib/module/screens/home/index.js.map +1 -1
  136. package/lib/module/screens/mySignViettel/Layer_3.png +0 -0
  137. package/lib/module/screens/mySignViettel/index.js +2 -0
  138. package/lib/module/screens/mySignViettel/index.js.map +1 -0
  139. package/lib/module/screens/sign-tima/ViewContract.js +1 -1
  140. package/lib/module/screens/sign-tima/ViewContract.js.map +1 -1
  141. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  142. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
  143. package/lib/module/screens/toan-trinh-so/RegisterBack.js +1 -1
  144. package/lib/module/screens/toan-trinh-so/RegisterBack.js.map +1 -1
  145. package/lib/module/screens/toan-trinh-so/ReviewInformation.js +1 -1
  146. package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  147. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  148. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  149. package/lib/module/screens/toan-trinh-so/ReviewLoan.js +1 -1
  150. package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  151. package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js +1 -1
  152. package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -1
  153. package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
  154. package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
  155. package/lib/module/screens/toan-trinh-so/TTSSelfie.js +1 -1
  156. package/lib/module/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
  157. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  158. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  159. package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
  160. package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  161. package/lib/module/screens/toan-trinh-so/VehicleRegistration.js +1 -1
  162. package/lib/module/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
  163. package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js +1 -1
  164. package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -1
  165. package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
  166. package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
  167. package/lib/module/screens/toan-trinh-so/store.js +1 -1
  168. package/lib/module/screens/toan-trinh-so/store.js.map +1 -1
  169. package/lib/module/screens/v3/AssetInformation.js +2 -0
  170. package/lib/module/screens/v3/AssetInformation.js.map +1 -0
  171. package/lib/module/services/api/api.js +1 -1
  172. package/lib/module/services/api/api.js.map +1 -1
  173. package/lib/module/utils/index.js +1 -1
  174. package/lib/module/utils/index.js.map +1 -1
  175. package/lib/typescript/AppStore.d.ts +2 -2
  176. package/lib/typescript/AppStore.d.ts.map +1 -1
  177. package/lib/typescript/assets/v3/index.d.ts +19 -0
  178. package/lib/typescript/assets/v3/index.d.ts.map +1 -0
  179. package/lib/typescript/components/ItemTimaOneV2.d.ts +7 -0
  180. package/lib/typescript/components/ItemTimaOneV2.d.ts.map +1 -0
  181. package/lib/typescript/components/ItemTimaOneV3.d.ts +7 -0
  182. package/lib/typescript/components/ItemTimaOneV3.d.ts.map +1 -0
  183. package/lib/typescript/components/ModalOptionLoan.d.ts +8 -0
  184. package/lib/typescript/components/ModalOptionLoan.d.ts.map +1 -0
  185. package/lib/typescript/navigation/primary-navigator.d.ts +2 -0
  186. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  187. package/lib/typescript/screens/eSign/index.d.ts.map +1 -1
  188. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  189. package/lib/typescript/screens/mySignViettel/index.d.ts +2 -0
  190. package/lib/typescript/screens/mySignViettel/index.d.ts.map +1 -0
  191. package/lib/typescript/screens/sign-tima/ViewContract.d.ts.map +1 -1
  192. package/lib/typescript/screens/toan-trinh-so/RegisterBack.d.ts.map +1 -1
  193. package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts.map +1 -1
  194. package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts.map +1 -1
  195. package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -1
  196. package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts.map +1 -1
  197. package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -1
  198. package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
  199. package/lib/typescript/screens/v3/AssetInformation.d.ts +2 -0
  200. package/lib/typescript/screens/v3/AssetInformation.d.ts.map +1 -0
  201. package/lib/typescript/services/api/api.d.ts +192 -0
  202. package/lib/typescript/services/api/api.d.ts.map +1 -1
  203. package/lib/typescript/utils/index.d.ts.map +1 -1
  204. package/package.json +1 -1
  205. package/src/AppStore.tsx +4 -2
  206. package/src/assets/v3/home.svg +5 -0
  207. package/src/assets/v3/index.tsx +38 -0
  208. package/src/assets/v3/option1.svg +27 -0
  209. package/src/assets/v3/option2.svg +25 -0
  210. package/src/assets/v3/step1-success.svg +39 -0
  211. package/src/assets/v3/step1.svg +90 -0
  212. package/src/assets/v3/step2-disable.svg +14 -0
  213. package/src/assets/v3/step2-success.svg +8 -0
  214. package/src/assets/v3/step2.svg +37 -0
  215. package/src/assets/v3/step3-disable.svg +17 -0
  216. package/src/assets/v3/step3-success.svg +17 -0
  217. package/src/assets/v3/step3.svg +45 -0
  218. package/src/assets/v3/step4-disable.svg +11 -0
  219. package/src/assets/v3/step4-success.svg +11 -0
  220. package/src/assets/v3/step4.svg +29 -0
  221. package/src/assets/v3/step5-disable.svg +17 -0
  222. package/src/assets/v3/step5-success.svg +17 -0
  223. package/src/assets/v3/step5.svg +45 -0
  224. package/src/components/ItemTimaOneV2.tsx +617 -0
  225. package/src/components/ItemTimaOneV3.tsx +558 -0
  226. package/src/components/MText.tsx +1 -1
  227. package/src/components/ModalOptionLoan.tsx +242 -0
  228. package/src/navigation/primary-navigator.tsx +12 -0
  229. package/src/screens/eSign/index.tsx +22 -16
  230. package/src/screens/home/index.tsx +64 -625
  231. package/src/screens/mySignViettel/Layer_3.png +0 -0
  232. package/src/screens/mySignViettel/index.tsx +278 -0
  233. package/src/screens/sign-tima/ViewContract.tsx +22 -16
  234. package/src/screens/toan-trinh-so/OCR.tsx +1 -1
  235. package/src/screens/toan-trinh-so/RegisterBack.tsx +9 -2
  236. package/src/screens/toan-trinh-so/ReviewInformation.tsx +110 -7
  237. package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +9 -8
  238. package/src/screens/toan-trinh-so/ReviewLoan.tsx +43 -169
  239. package/src/screens/toan-trinh-so/TTSNationalIDBack.tsx +1 -1
  240. package/src/screens/toan-trinh-so/TTSNationalIDFront.tsx +1 -1
  241. package/src/screens/toan-trinh-so/TTSSelfie.tsx +17 -14
  242. package/src/screens/toan-trinh-so/TTSSignLoan.tsx +38 -19
  243. package/src/screens/toan-trinh-so/VehicleCamera.tsx +133 -43
  244. package/src/screens/toan-trinh-so/VehicleRegistration.tsx +1 -1
  245. package/src/screens/toan-trinh-so/VehicleRegistrationBack.tsx +1 -1
  246. package/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx +1 -1
  247. package/src/screens/toan-trinh-so/store.ts +1 -1
  248. package/src/screens/v3/AssetInformation.tsx +690 -0
  249. package/src/services/api/api.ts +196 -0
  250. package/src/utils/index.tsx +2 -0
@@ -59,27 +59,15 @@ export default function ReviewLoan(props: any) {
59
59
  timeInsuranceProperty: values?.timeInsuranceProperty?.id ?? 0,
60
60
  moneyInsurenceCustomer: values.moneyInsurenceCustomer,
61
61
  moneyInsuranceProperty: values.moneyInsuranceProperty,
62
- bankId: values.bankId,
63
- bankAccountName: values?.bankAccountName,
64
- bankAccountNumber: values?.bankAccountNumber,
65
- brand: values?.brand,
66
- yearCar: Number(values.yearCar),
67
- vehicles: values?.vehicles,
68
- plateNumber: values?.plateNumber,
69
- chassis: values?.chassis,
70
- engine: values?.engine,
71
- ownerFullName: values?.ownerFullName,
72
- motobikeCertificateNumber: values?.motobikeCertificateNumber,
73
- motobikeCertificateDate: values?.motobikeCertificateDate,
74
- typeLoanBrief: values?.typeLoanBrief,
75
- carTypeId: values?.carTypeId,
76
62
  };
77
- const response = await Api.getInstance().updateInfoLoan(body);
63
+
64
+ const response = await Api.getInstance().updateInfoLoanV2(body);
78
65
  setIsLoading(false);
79
66
  if (response.kind === 'ok') {
80
67
  if (response.data?.meta?.errorCode === 200) {
81
- navigation.push(ScreenNames.ReviewInformationOther, {
68
+ navigation.push(ScreenNames.OCR, {
82
69
  loan: props.route?.params?.loan,
70
+ front: true,
83
71
  });
84
72
  } else {
85
73
  Alert.alert('Thông báo', response.data?.meta?.errorMessage);
@@ -96,28 +84,12 @@ export default function ReviewLoan(props: any) {
96
84
  const getData = async () => {
97
85
  try {
98
86
  setIsLoading(true);
99
- const response = await Api.getInstance().getInfoLoan(
87
+ const response = await Api.getInstance().getInfoLoanAutoDEV2(
100
88
  props.route?.params?.loan?.id
101
89
  );
102
90
  setIsLoading(false);
103
91
  if (response.kind === 'ok') {
104
92
  if (response.data?.meta.errorCode === 200) {
105
- formRef.current.setFieldValue(
106
- 'bankAccountName',
107
- response?.data?.data?.bankAccountName ?? ''
108
- );
109
- formRef.current.setFieldValue(
110
- 'bankAccountNumber',
111
- response?.data?.data?.bankAccountNumber ?? ''
112
- );
113
- formRef.current.setFieldValue(
114
- 'bankId',
115
- response?.data?.data?.bankId ?? null
116
- );
117
- formRef.current.setFieldValue(
118
- 'bankName',
119
- response?.data?.data?.bankName ?? ''
120
- );
121
93
  formRef.current.setFieldValue(
122
94
  'loanAmount',
123
95
  response?.data?.data?.loanAmount ?? 0
@@ -176,61 +148,6 @@ export default function ReviewLoan(props: any) {
176
148
  'timeInsuranceProperty',
177
149
  timeInsuranceProperty
178
150
  );
179
- formRef.current?.setFieldValue(
180
- 'brand',
181
- response.data.data?.brand ?? null
182
- );
183
- formRef.current?.setFieldValue(
184
- 'yearCar',
185
- response.data.data?.yearCar ?? null
186
- );
187
- formRef.current?.setFieldValue(
188
- 'vehicles',
189
- response.data.data?.vehicles ?? null
190
- );
191
- formRef.current?.setFieldValue(
192
- 'plateNumber',
193
- response.data.data?.plateNumber ?? ''
194
- );
195
- formRef.current?.setFieldValue(
196
- 'chassis',
197
- response.data.data?.chassis ?? ''
198
- );
199
- formRef.current?.setFieldValue(
200
- 'engine',
201
- response.data.data?.engine ?? ''
202
- );
203
- formRef.current?.setFieldValue(
204
- 'ownerFullName',
205
- response.data.data?.ownerFullName ?? ''
206
- );
207
- formRef.current?.setFieldValue(
208
- 'motobikeCertificateNumber',
209
- response.data.data?.motobikeCertificateNumber ?? ''
210
- );
211
- formRef.current?.setFieldValue(
212
- 'motobikeCertificateDate',
213
- response.data.data?.motobikeCertificateDate ?? ''
214
- );
215
-
216
- if (response.data?.data?.brand) {
217
- ttsStore.getListYearCar(response.data?.data?.brand);
218
- }
219
- if (response.data?.data?.brand && response.data?.data?.yearCar) {
220
- ttsStore.getListCar(
221
- response.data?.data?.brand,
222
- response.data?.data?.yearCar
223
- );
224
- }
225
-
226
- formRef.current?.setFieldValue(
227
- 'typeLoanBrief',
228
- response.data.data?.typeLoanBrief ?? null
229
- );
230
- formRef.current?.setFieldValue(
231
- 'carTypeId',
232
- response.data.data?.carTypeId ?? null
233
- );
234
151
  } else {
235
152
  }
236
153
  }
@@ -242,8 +159,8 @@ export default function ReviewLoan(props: any) {
242
159
 
243
160
  useEffect(() => {
244
161
  getData();
245
- ttsStore.getListBrand();
246
162
  ttsStore.getFirstPayment(props.route?.params?.loan?.id);
163
+ appStore.getRateTypeAll();
247
164
  }, []);
248
165
 
249
166
  const getInfoInsurence = async (
@@ -322,14 +239,14 @@ export default function ReviewLoan(props: any) {
322
239
  zIndex: 1000,
323
240
  }}
324
241
  onPress={() => {
325
- navigation.goBack();
242
+ navigation.navigate(ScreenNames.Main);
326
243
  }}
327
244
  >
328
245
  <IconBack />
329
246
  </TouchableOpacity>
330
247
  <MText style={$title}>Thông tin chi tiết</MText>
331
248
  </View>
332
- <StepIndicator steps={3} currentStep={1} />
249
+ {/* <StepIndicator steps={3} currentStep={1} /> */}
333
250
  <Formik
334
251
  validateOnBlur={false}
335
252
  validateOnChange={false}
@@ -346,21 +263,6 @@ export default function ReviewLoan(props: any) {
346
263
  timeInsuranceProperty: null,
347
264
  moneyInsurenceCustomer: null,
348
265
  moneyInsuranceProperty: null,
349
- bankId: null,
350
- bankName: '',
351
- bankAccountName: '',
352
- bankAccountNumber: '',
353
- brand: '',
354
- yearCar: null,
355
- vehicles: '',
356
- plateNumber: '',
357
- chassis: '',
358
- engine: '',
359
- ownerFullName: '',
360
- motobikeCertificateNumber: '',
361
- motobikeCertificateDate: '',
362
- typeLoanBrief: null,
363
- carTypeId: null,
364
266
  }}
365
267
  validationSchema={yup.object().shape({
366
268
  loanAmount: yup.string().required('Số tiền là bắt buộc'),
@@ -372,35 +274,6 @@ export default function ReviewLoan(props: any) {
372
274
  firstPaymentDate: yup
373
275
  .string()
374
276
  .required('Ngày thanh toán đầu kỳ là bắt buộc'),
375
- bankName: yup.string().required('Vui lòng chọn ngân hàng'),
376
- bankAccountName: yup.string().required('Vui lòng nhập chủ thẻ'),
377
- bankAccountNumber: yup
378
- .string()
379
- .required('Vui lòng nhập số tài khoản'),
380
- brand: yup.string().required('Vui lòng chọn hãng xe'),
381
- yearCar: yup
382
- .string()
383
- .required('Vui lòng chọn năm sản xuất')
384
- .nullable(),
385
- vehicles: yup.string().required('Vui lòng chọn xe').nullable(),
386
- plateNumber: yup.string().required('Vui lòng nhập biển số'),
387
- chassis: yup.string().required('Vui lòng nhập số khung'),
388
- engine: yup.string().required('Vui lòng nhập số máy'),
389
- ownerFullName: yup.string().required('Vui lòng nhập chủ xe'),
390
- motobikeCertificateNumber: yup
391
- .string()
392
- .required('Vui lòng nhập số đăng ký xe'),
393
- motobikeCertificateDate: yup
394
- .string()
395
- .required('Vui lòng nhập ngày đăng ký'),
396
- typeLoanBrief: yup
397
- .number()
398
- .required('Vui lòng chọn loại tài sản')
399
- .nullable(),
400
- carTypeId: yup
401
- .number()
402
- .required('Vui lòng chọn loại xe')
403
- .nullable(),
404
277
  })}
405
278
  >
406
279
  {({
@@ -413,7 +286,7 @@ export default function ReviewLoan(props: any) {
413
286
  <ScrollView
414
287
  style={[commonStyles.fill, { paddingHorizontal: 16 }]}
415
288
  >
416
- <MText style={$title2}>2.1 Thông tin đề nghị khoản vay</MText>
289
+ <MText style={$title2}>Thông tin đề nghị khoản vay</MText>
417
290
  <View style={$row}>
418
291
  <View style={{ flex: 1 }}>
419
292
  <MText style={$label}>Số tiền đề nghị vay</MText>
@@ -422,7 +295,7 @@ export default function ReviewLoan(props: any) {
422
295
  style={[
423
296
  $textInput,
424
297
  {
425
- color: '#333333',
298
+ color: '#EF592E',
426
299
  fontSize: 16,
427
300
  fontWeight: '500',
428
301
  },
@@ -781,7 +654,7 @@ export default function ReviewLoan(props: any) {
781
654
  </View>
782
655
  </View>
783
656
 
784
- <MText style={[$title2, { marginTop: 10 }]}>
657
+ {/* <MText style={[$title2, { marginTop: 10 }]}>
785
658
  2.2 Thông tin giải ngân
786
659
  </MText>
787
660
  <MText style={$label}>Ngân hàng</MText>
@@ -1153,40 +1026,41 @@ export default function ReviewLoan(props: any) {
1153
1026
  <MText style={$error}>{errors.carTypeId}</MText>
1154
1027
  )}
1155
1028
  </View>
1156
- </View>
1157
- <MButton
1158
- onPress={() => {
1159
- handleSubmit();
1160
- }}
1161
- style={{
1162
- marginVertical: 24,
1163
- }}
1164
- >
1165
- <LinearGradient
1166
- start={{ x: 1, y: 0 }}
1167
- end={{ x: 0, y: 1 }}
1168
- style={{
1169
- height: 40,
1170
- marginVertical: 16,
1171
- borderRadius: 30,
1172
- alignItems: 'center',
1173
- justifyContent: 'center',
1174
- }}
1175
- colors={['#FF7A00', '#EF4123']}
1176
- >
1177
- <MText
1178
- style={{
1179
- color: 'white',
1180
- fontSize: 16,
1181
- }}
1182
- >
1183
- Tiếp tục
1184
- </MText>
1185
- </LinearGradient>
1186
- </MButton>
1029
+ </View> */}
1187
1030
  </ScrollView>
1188
1031
  )}
1189
1032
  </Formik>
1033
+ <MButton
1034
+ onPress={() => {
1035
+ formRef.current?.handleSubmit();
1036
+ }}
1037
+ style={{
1038
+ marginVertical: 24,
1039
+ marginHorizontal: 16,
1040
+ }}
1041
+ >
1042
+ <LinearGradient
1043
+ start={{ x: 1, y: 0 }}
1044
+ end={{ x: 0, y: 1 }}
1045
+ style={{
1046
+ height: 40,
1047
+ marginVertical: 16,
1048
+ borderRadius: 30,
1049
+ alignItems: 'center',
1050
+ justifyContent: 'center',
1051
+ }}
1052
+ colors={['#FF7A00', '#EF4123']}
1053
+ >
1054
+ <MText
1055
+ style={{
1056
+ color: 'white',
1057
+ fontSize: 16,
1058
+ }}
1059
+ >
1060
+ Tiếp tục
1061
+ </MText>
1062
+ </LinearGradient>
1063
+ </MButton>
1190
1064
  <KeyboardSpacer />
1191
1065
  </View>
1192
1066
  </View>
@@ -70,7 +70,7 @@ export default function TTSNationalIDBack(props) {
70
70
  name: 'image.jpg',
71
71
  });
72
72
 
73
- const response = await Api.getInstance().uploadImageOcr(formData);
73
+ const response = await Api.getInstance().uploadImageAutoDE(formData);
74
74
  setIsLoading(false);
75
75
  if (response.kind === 'ok') {
76
76
  if (response.data?.meta?.errorCode === 200) {
@@ -84,7 +84,7 @@ export const TTSNationalIDFront = observer(function TTSNationalIDFront(props) {
84
84
  name: 'image.jpg',
85
85
  });
86
86
 
87
- const response = await Api.getInstance().uploadImageOcr(formData);
87
+ const response = await Api.getInstance().uploadImageAutoDE(formData);
88
88
  setIsLoading(false);
89
89
  if (response.kind === 'ok') {
90
90
  if (response.data?.meta?.errorCode === 200) {
@@ -172,23 +172,26 @@ export default function TTSSelfie(props: any) {
172
172
  type: 'image/jpg',
173
173
  name: 'image.jpg',
174
174
  });
175
- const response = await Api.getInstance().uploadImageOcr(formData);
175
+ const response = await Api.getInstance().uploadImageAutoDE(formData);
176
176
  setIsLoading(false);
177
177
  if (response.kind === 'ok') {
178
178
  if (response.data?.meta.errorCode === 200) {
179
- if (props?.route?.params?.loan?.typeLoan === 5) {
180
- navigation.push(ScreenNames.VehicleCamera, {
181
- front: true,
182
- loan: props?.route?.params?.loan,
183
- });
184
- } else {
185
- navigation.dispatch(
186
- CommonActions.reset({
187
- index: 1,
188
- routes: [{ name: ScreenNames.Main }],
189
- })
190
- );
191
- }
179
+ // if (props?.route?.params?.loan?.typeLoan === 5) {
180
+ // navigation.push(ScreenNames.VehicleCamera, {
181
+ // front: true,
182
+ // loan: props?.route?.params?.loan,
183
+ // });
184
+ // } else {
185
+ // navigation.dispatch(
186
+ // CommonActions.reset({
187
+ // index: 1,
188
+ // routes: [{ name: ScreenNames.Main }],
189
+ // })
190
+ // );
191
+ // }
192
+ navigation.push(ScreenNames.ReviewInformation, {
193
+ loan: props?.route?.params?.loan,
194
+ });
192
195
  } else {
193
196
  Alert.alert('Thông báo', response.data?.meta?.errorMessage);
194
197
  }
@@ -39,7 +39,20 @@ export default function TTSSignLoan(props) {
39
39
  Alert.alert(
40
40
  'Thông báo',
41
41
  response.data?.meta?.errorMessage ||
42
- 'Có lỗi xảy ra. Vui lòng thử lại sau.'
42
+ 'Có lỗi xảy ra. Vui lòng thử lại sau.',
43
+ [
44
+ {
45
+ text: 'Đồng ý',
46
+ onPress: () => {
47
+ navigation.dispatch(
48
+ CommonActions.reset({
49
+ index: 1,
50
+ routes: [{ name: ScreenNames.Main }],
51
+ })
52
+ );
53
+ },
54
+ },
55
+ ]
43
56
  );
44
57
  }
45
58
  } else {
@@ -47,6 +60,8 @@ export default function TTSSignLoan(props) {
47
60
  }
48
61
  } catch (error) {
49
62
  setIsLoading(false);
63
+ } finally {
64
+ setIsLoading(false);
50
65
  }
51
66
  };
52
67
 
@@ -78,7 +93,6 @@ export default function TTSSignLoan(props) {
78
93
  );
79
94
  return;
80
95
  }
81
-
82
96
  if (contract === null) {
83
97
  Alert.alert('Thông báo', 'Không tạo được hợp đồng');
84
98
  return;
@@ -101,30 +115,35 @@ export default function TTSSignLoan(props) {
101
115
  );
102
116
  return;
103
117
  }
104
- // navigation.push(ScreenNames.TTSOTP, { loan });
105
118
  try {
106
119
  setIsLoading(true);
107
120
  const response = await Api.getInstance().sign_viettel_for_borrower({
108
121
  loanBriefId: loan?.id,
109
122
  });
110
123
  if (response.kind === 'ok' && response.data.meta.errorCode === 200) {
111
- Alert.alert(
112
- 'Thông báo',
113
- 'Vui lòng kiểm tra tin nhắn để hoàn tất ký hợp đồng',
114
- [
115
- {
116
- text: 'Xác nhận',
117
- onPress: () => {
118
- navigation.dispatch(
119
- CommonActions.reset({
120
- index: 1,
121
- routes: [{ name: ScreenNames.Main }],
122
- })
123
- );
124
+ if (response.data?.data) {
125
+ navigation.push(ScreenNames.MySignViettel, {
126
+ url: response?.data?.data,
127
+ });
128
+ } else {
129
+ Alert.alert(
130
+ 'Thông báo',
131
+ 'Vui lòng kiểm tra tin nhắn để hoàn tất ký hợp đồng',
132
+ [
133
+ {
134
+ text: 'Xác nhận',
135
+ onPress: () => {
136
+ navigation.dispatch(
137
+ CommonActions.reset({
138
+ index: 1,
139
+ routes: [{ name: ScreenNames.Main }],
140
+ })
141
+ );
142
+ },
124
143
  },
125
- },
126
- ]
127
- );
144
+ ]
145
+ );
146
+ }
128
147
  } else {
129
148
  Alert.alert(
130
149
  'Thông báo',
@@ -7,6 +7,7 @@ import {
7
7
  ImageStyle,
8
8
  Platform,
9
9
  SafeAreaView,
10
+ StyleSheet,
10
11
  TextStyle,
11
12
  TouchableOpacity,
12
13
  View,
@@ -41,6 +42,12 @@ import { IconUpload } from '../../assets/svgs';
41
42
  import ImagePicker from 'react-native-image-crop-picker';
42
43
  import { launchImageLibrary } from 'react-native-image-picker';
43
44
 
45
+ const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
46
+ const frameWidth = screenWidth * 0.85;
47
+ const frameHeight = frameWidth * 0.63; // tỷ lệ giống CCCD
48
+ const frameLeft = (screenWidth - frameWidth) / 2;
49
+ const frameTop = ((screenWidth * 4) / 3 - frameHeight) / 2;
50
+
44
51
  export default function VehicleCamera(props: any) {
45
52
  const isFocused = useIsFocused();
46
53
  const [shouldRenderCamera, setShouldRenderCamera] = useState(false);
@@ -244,30 +251,16 @@ export default function VehicleCamera(props: any) {
244
251
 
245
252
  return (
246
253
  <View
247
- style={[$flex, { backgroundColor: 'black' }]}
254
+ style={[$flex, { backgroundColor: '#000' }]}
248
255
  pointerEvents={'box-none'}
249
256
  >
250
257
  {passPermission && shouldRenderCamera ? (
251
- <View
252
- style={[
253
- commonStyles.alignCenter,
254
- commonStyles.fill,
255
- commonStyles.justifyCenter,
256
- {
257
- position: 'absolute',
258
- width: Dimensions.get('window').width,
259
- height: Dimensions.get('window').height,
260
- zIndex: 1000,
261
- },
262
- ]}
263
- >
258
+ <View style={{ flex: 1 }}>
264
259
  <RNCamera
265
260
  ref={myCamera}
266
261
  defaultVideoQuality={RNCamera.Constants.VideoQuality['720p']}
267
262
  style={{
268
- width: Dimensions.get('window').width,
269
- height: 260,
270
- overflow: 'hidden',
263
+ flex: 1,
271
264
  }}
272
265
  maxZoom={1}
273
266
  androidCameraPermissionOptions={{
@@ -279,32 +272,61 @@ export default function VehicleCamera(props: any) {
279
272
  quality={0.8}
280
273
  pictureSize="1280x720"
281
274
  >
282
- {({ camera, status, recordAudioPermissionStatus }) => {
283
- if (status !== 'READY') return <ActivityIndicator />;
284
- }}
275
+ <View style={$overlay}>
276
+ <View style={$darkOverlayTop} />
277
+ <View style={$row}>
278
+ <View style={$darkOverlaySide} />
279
+ <View style={$frameBorder}>
280
+ {/* Top Left */}
281
+ <Corner
282
+ style={{
283
+ top: 0,
284
+ left: 0,
285
+ borderTopWidth: CORNER_WIDTH,
286
+ borderLeftWidth: CORNER_WIDTH,
287
+ borderColor: BORDER_COLOR,
288
+ }}
289
+ />
290
+
291
+ {/* Top Right */}
292
+ <Corner
293
+ style={{
294
+ top: 0,
295
+ right: 0,
296
+ borderTopWidth: CORNER_WIDTH,
297
+ borderRightWidth: CORNER_WIDTH,
298
+ borderColor: BORDER_COLOR,
299
+ }}
300
+ />
301
+
302
+ {/* Bottom Left */}
303
+ <Corner
304
+ style={{
305
+ bottom: 0,
306
+ left: 0,
307
+ borderBottomWidth: CORNER_WIDTH,
308
+ borderLeftWidth: CORNER_WIDTH,
309
+ borderColor: BORDER_COLOR,
310
+ }}
311
+ />
312
+
313
+ {/* Bottom Right */}
314
+ <Corner
315
+ style={{
316
+ bottom: 0,
317
+ right: 0,
318
+ borderBottomWidth: CORNER_WIDTH,
319
+ borderRightWidth: CORNER_WIDTH,
320
+ borderColor: BORDER_COLOR,
321
+ }}
322
+ />
323
+ </View>
324
+ <View style={$darkOverlaySide} />
325
+ </View>
326
+ <View style={$darkOverlayBottom} />
327
+ </View>
285
328
  </RNCamera>
286
- <TouchableOpacity
287
- onPress={() => {
288
- pickImageFromGallery();
289
- }}
290
- style={{
291
- flexDirection: 'row',
292
- alignItems: 'center',
293
- gap: 8,
294
- marginTop: 16,
295
- zIndex: 1000,
296
- }}
297
- >
298
- <IconUpload />
299
- <MText
300
- style={{
301
- color: 'white',
302
- fontSize: 12,
303
- }}
304
- >
305
- Tải ảnh từ thư viện
306
- </MText>
307
- </TouchableOpacity>
329
+
308
330
  <View
309
331
  style={{
310
332
  position: 'absolute',
@@ -314,6 +336,28 @@ export default function VehicleCamera(props: any) {
314
336
  zIndex: 1000,
315
337
  }}
316
338
  >
339
+ <TouchableOpacity
340
+ onPress={() => {
341
+ pickImageFromGallery();
342
+ }}
343
+ style={{
344
+ flexDirection: 'row',
345
+ alignItems: 'center',
346
+ justifyContent: 'center',
347
+ gap: 8,
348
+ marginBottom: 50,
349
+ }}
350
+ >
351
+ <IconUpload />
352
+ <MText
353
+ style={{
354
+ color: 'white',
355
+ fontSize: 12,
356
+ }}
357
+ >
358
+ Tải ảnh từ thư viện
359
+ </MText>
360
+ </TouchableOpacity>
317
361
  {!taking && (
318
362
  <>
319
363
  <MText
@@ -388,7 +432,7 @@ export default function VehicleCamera(props: any) {
388
432
  </SafeAreaView>
389
433
  </View>
390
434
  ) : (
391
- <></>
435
+ <View></View>
392
436
  )}
393
437
  <Modal
394
438
  isVisible={showModal}
@@ -514,6 +558,52 @@ export default function VehicleCamera(props: any) {
514
558
  );
515
559
  }
516
560
 
561
+ const CORNER_SIZE = 20;
562
+ const CORNER_WIDTH = 2;
563
+ const BORDER_COLOR = '#FDFDFD';
564
+
565
+ const Corner = ({ style }: { style: ViewStyle }) => (
566
+ <View
567
+ style={[
568
+ style,
569
+ {
570
+ position: 'absolute',
571
+ width: CORNER_SIZE,
572
+ height: CORNER_SIZE,
573
+ },
574
+ ]}
575
+ />
576
+ );
577
+
578
+ const overlayColor = 'rgba(22, 22, 22, 0.7)';
579
+
580
+ const $overlay: ViewStyle = {
581
+ ...StyleSheet.absoluteFillObject,
582
+ justifyContent: 'center',
583
+ alignItems: 'center',
584
+ };
585
+
586
+ const $darkOverlayTop: ViewStyle = {
587
+ width: '100%',
588
+ height: (screenHeight - frameHeight) / 2,
589
+ backgroundColor: overlayColor,
590
+ };
591
+
592
+ const $darkOverlayBottom: ViewStyle = {
593
+ width: '100%',
594
+ height: (screenHeight - frameHeight) / 2,
595
+ backgroundColor: overlayColor,
596
+ };
597
+ const $darkOverlaySide: ViewStyle = {
598
+ width: (screenWidth - frameWidth) / 2,
599
+ height: frameHeight,
600
+ backgroundColor: overlayColor,
601
+ };
602
+ const $frameBorder: ViewStyle = {
603
+ width: frameWidth,
604
+ height: frameHeight,
605
+ };
606
+
517
607
  const $row: ViewStyle = {
518
608
  flexDirection: 'row',
519
609
  alignItems: 'center',