react-native-timacare 1.0.20 → 1.0.22

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 (278) hide show
  1. package/lib/commonjs/components/CIMBLoading.js +1 -1
  2. package/lib/commonjs/components/CIMBLoading.js.map +1 -1
  3. package/lib/commonjs/components/CommonSelect.js +1 -1
  4. package/lib/commonjs/components/CommonSelect.js.map +1 -1
  5. package/lib/commonjs/components/Loading.js +1 -1
  6. package/lib/commonjs/components/Loading.js.map +1 -1
  7. package/lib/commonjs/components/MButton.js +1 -1
  8. package/lib/commonjs/components/MButton.js.map +1 -1
  9. package/lib/commonjs/components/MText.js +1 -1
  10. package/lib/commonjs/components/MText.js.map +1 -1
  11. package/lib/commonjs/components/MyTextInput.js +1 -1
  12. package/lib/commonjs/components/MyTextInput.js.map +1 -1
  13. package/lib/commonjs/components/keyboardspace/index.js +1 -1
  14. package/lib/commonjs/components/keyboardspace/index.js.map +1 -1
  15. package/lib/commonjs/components/logoTima/index.js +1 -1
  16. package/lib/commonjs/components/logoTima/index.js.map +1 -1
  17. package/lib/commonjs/components/select/index.js +1 -1
  18. package/lib/commonjs/components/select/index.js.map +1 -1
  19. package/lib/commonjs/index.js +1 -1
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  22. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  23. package/lib/commonjs/navigation/root-navigator.js +1 -1
  24. package/lib/commonjs/navigation/root-navigator.js.map +1 -1
  25. package/lib/commonjs/screens/Selector.js +1 -1
  26. package/lib/commonjs/screens/Selector.js.map +1 -1
  27. package/lib/commonjs/screens/camera/index.js +1 -1
  28. package/lib/commonjs/screens/camera/index.js.map +1 -1
  29. package/lib/commonjs/screens/cimb-sign/index.js +1 -1
  30. package/lib/commonjs/screens/cimb-sign/index.js.map +1 -1
  31. package/lib/commonjs/screens/contract/index.js +1 -1
  32. package/lib/commonjs/screens/contract/index.js.map +1 -1
  33. package/lib/commonjs/screens/detail-loan/Info.js +1 -1
  34. package/lib/commonjs/screens/detail-loan/Info.js.map +1 -1
  35. package/lib/commonjs/screens/detail-loan/Payment.js +1 -1
  36. package/lib/commonjs/screens/detail-loan/Payment.js.map +1 -1
  37. package/lib/commonjs/screens/detail-loan/PaymentAll.js +1 -1
  38. package/lib/commonjs/screens/detail-loan/PaymentAll.js.map +1 -1
  39. package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
  40. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
  41. package/lib/commonjs/screens/detail-loan/index.js +1 -1
  42. package/lib/commonjs/screens/detail-loan/index.js.map +1 -1
  43. package/lib/commonjs/screens/digital-lending/Step1.js +1 -1
  44. package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -1
  45. package/lib/commonjs/screens/digital-lending/Step2.js +1 -1
  46. package/lib/commonjs/screens/digital-lending/Step2.js.map +1 -1
  47. package/lib/commonjs/screens/digital-lending/Step3.js +1 -1
  48. package/lib/commonjs/screens/digital-lending/Step3.js.map +1 -1
  49. package/lib/commonjs/screens/digital-lending/Step4.js +1 -1
  50. package/lib/commonjs/screens/digital-lending/Step4.js.map +1 -1
  51. package/lib/commonjs/screens/digital-lending/Step5.js +1 -1
  52. package/lib/commonjs/screens/digital-lending/Step5.js.map +1 -1
  53. package/lib/commonjs/screens/digital-lending/Step6.js +1 -1
  54. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -1
  55. package/lib/commonjs/screens/digital-lending/index.js +1 -1
  56. package/lib/commonjs/screens/digital-lending/index.js.map +1 -1
  57. package/lib/commonjs/screens/eSign/index.js +1 -1
  58. package/lib/commonjs/screens/eSign/index.js.map +1 -1
  59. package/lib/commonjs/screens/forgotPassword/index.js +1 -1
  60. package/lib/commonjs/screens/forgotPassword/index.js.map +1 -1
  61. package/lib/commonjs/screens/full-submit/accept_policy.js +1 -1
  62. package/lib/commonjs/screens/full-submit/accept_policy.js.flow +218 -23
  63. package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -1
  64. package/lib/commonjs/screens/full-submit/index.js +1 -1
  65. package/lib/commonjs/screens/full-submit/index.js.map +1 -1
  66. package/lib/commonjs/screens/full-submit/selfie.js +1 -1
  67. package/lib/commonjs/screens/full-submit/selfie.js.map +1 -1
  68. package/lib/commonjs/screens/full-submit/update-document.js +1 -1
  69. package/lib/commonjs/screens/full-submit/update-document.js.map +1 -1
  70. package/lib/commonjs/screens/full-submit/update-info.js +1 -1
  71. package/lib/commonjs/screens/full-submit/update-info.js.map +1 -1
  72. package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js +1 -1
  73. package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
  74. package/lib/commonjs/screens/guide-transfer-bank/index.js +1 -1
  75. package/lib/commonjs/screens/guide-transfer-bank/index.js.map +1 -1
  76. package/lib/commonjs/screens/home/CIMBxTima.js +1 -1
  77. package/lib/commonjs/screens/home/CIMBxTima.js.map +1 -1
  78. package/lib/commonjs/screens/home/index.js +1 -1
  79. package/lib/commonjs/screens/home/index.js.flow +6 -3
  80. package/lib/commonjs/screens/home/index.js.map +1 -1
  81. package/lib/commonjs/screens/intro/index.js +1 -1
  82. package/lib/commonjs/screens/intro/index.js.map +1 -1
  83. package/lib/commonjs/screens/introduction/index.js +1 -1
  84. package/lib/commonjs/screens/introduction/index.js.map +1 -1
  85. package/lib/commonjs/screens/liveness/index.js +1 -1
  86. package/lib/commonjs/screens/liveness/index.js.map +1 -1
  87. package/lib/commonjs/screens/loginWithPassword/index.js +1 -1
  88. package/lib/commonjs/screens/loginWithPassword/index.js.map +1 -1
  89. package/lib/commonjs/screens/main/index.js +1 -1
  90. package/lib/commonjs/screens/main/index.js.map +1 -1
  91. package/lib/commonjs/screens/nationalID/index.js +1 -1
  92. package/lib/commonjs/screens/nationalID/index.js.map +1 -1
  93. package/lib/commonjs/screens/nationalIDBack/index.js +1 -1
  94. package/lib/commonjs/screens/nationalIDBack/index.js.map +1 -1
  95. package/lib/commonjs/screens/notification/index.js +1 -1
  96. package/lib/commonjs/screens/notification/index.js.map +1 -1
  97. package/lib/commonjs/screens/otp/index.js +1 -1
  98. package/lib/commonjs/screens/otp/index.js.map +1 -1
  99. package/lib/commonjs/screens/payment-evidence/Guideline.js +1 -1
  100. package/lib/commonjs/screens/payment-evidence/Guideline.js.map +1 -1
  101. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js +1 -1
  102. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.map +1 -1
  103. package/lib/commonjs/screens/payment-evidence/index.js +1 -1
  104. package/lib/commonjs/screens/payment-evidence/index.js.map +1 -1
  105. package/lib/commonjs/screens/personal/index.js +1 -1
  106. package/lib/commonjs/screens/personal/index.js.map +1 -1
  107. package/lib/commonjs/screens/qualify/index.js +1 -1
  108. package/lib/commonjs/screens/qualify/index.js.map +1 -1
  109. package/lib/commonjs/screens/quick-submit/index.js +1 -1
  110. package/lib/commonjs/screens/quick-submit/index.js.map +1 -1
  111. package/lib/commonjs/screens/register/index.js +1 -1
  112. package/lib/commonjs/screens/register/index.js.map +1 -1
  113. package/lib/commonjs/screens/schedule-payment/index.js +1 -1
  114. package/lib/commonjs/screens/schedule-payment/index.js.map +1 -1
  115. package/lib/commonjs/screens/schedule-payment/payment-list.js +1 -1
  116. package/lib/commonjs/screens/schedule-payment/payment-list.js.map +1 -1
  117. package/lib/commonjs/screens/selfie/index.js +1 -1
  118. package/lib/commonjs/screens/selfie/index.js.map +1 -1
  119. package/lib/commonjs/screens/setPassword/confirmPassword.js +1 -1
  120. package/lib/commonjs/screens/setPassword/confirmPassword.js.map +1 -1
  121. package/lib/commonjs/screens/setPassword/index.js +1 -1
  122. package/lib/commonjs/screens/setPassword/index.js.map +1 -1
  123. package/lib/commonjs/screens/sign-tima/ConfirmContract.js +1 -1
  124. package/lib/commonjs/screens/sign-tima/ConfirmContract.js.map +1 -1
  125. package/lib/commonjs/screens/sign-tima/ViewContract.js +1 -1
  126. package/lib/commonjs/screens/sign-tima/ViewContract.js.map +1 -1
  127. package/lib/commonjs/screens/splash/index.js +1 -1
  128. package/lib/commonjs/screens/splash/index.js.map +1 -1
  129. package/lib/commonjs/screens/terms/QuickTerm.js +1 -1
  130. package/lib/commonjs/screens/terms/QuickTerm.js.map +1 -1
  131. package/lib/commonjs/screens/terms/TermScreen.js +1 -1
  132. package/lib/commonjs/screens/terms/TermScreen.js.map +1 -1
  133. package/lib/commonjs/screens/uploadVideo/index.js +1 -1
  134. package/lib/commonjs/screens/uploadVideo/index.js.map +1 -1
  135. package/lib/commonjs/services/api/api.js +1 -1
  136. package/lib/commonjs/services/api/api.js.flow +2 -0
  137. package/lib/commonjs/services/api/api.js.map +1 -1
  138. package/lib/module/components/CIMBLoading.js +1 -1
  139. package/lib/module/components/CIMBLoading.js.map +1 -1
  140. package/lib/module/components/CommonSelect.js +1 -1
  141. package/lib/module/components/CommonSelect.js.map +1 -1
  142. package/lib/module/components/Loading.js +1 -1
  143. package/lib/module/components/Loading.js.map +1 -1
  144. package/lib/module/components/MButton.js +1 -1
  145. package/lib/module/components/MButton.js.map +1 -1
  146. package/lib/module/components/MText.js +1 -1
  147. package/lib/module/components/MText.js.map +1 -1
  148. package/lib/module/components/MyTextInput.js +1 -1
  149. package/lib/module/components/MyTextInput.js.map +1 -1
  150. package/lib/module/components/keyboardspace/index.js +1 -1
  151. package/lib/module/components/keyboardspace/index.js.map +1 -1
  152. package/lib/module/components/logoTima/index.js +1 -1
  153. package/lib/module/components/logoTima/index.js.map +1 -1
  154. package/lib/module/components/select/index.js +1 -1
  155. package/lib/module/components/select/index.js.map +1 -1
  156. package/lib/module/index.js +1 -1
  157. package/lib/module/index.js.map +1 -1
  158. package/lib/module/navigation/primary-navigator.js +1 -1
  159. package/lib/module/navigation/primary-navigator.js.map +1 -1
  160. package/lib/module/navigation/root-navigator.js +1 -1
  161. package/lib/module/navigation/root-navigator.js.map +1 -1
  162. package/lib/module/screens/Selector.js +1 -1
  163. package/lib/module/screens/Selector.js.map +1 -1
  164. package/lib/module/screens/camera/index.js +1 -1
  165. package/lib/module/screens/camera/index.js.map +1 -1
  166. package/lib/module/screens/cimb-sign/index.js +1 -1
  167. package/lib/module/screens/cimb-sign/index.js.map +1 -1
  168. package/lib/module/screens/contract/index.js +1 -1
  169. package/lib/module/screens/contract/index.js.map +1 -1
  170. package/lib/module/screens/detail-loan/Info.js +1 -1
  171. package/lib/module/screens/detail-loan/Info.js.map +1 -1
  172. package/lib/module/screens/detail-loan/Payment.js +1 -1
  173. package/lib/module/screens/detail-loan/Payment.js.map +1 -1
  174. package/lib/module/screens/detail-loan/PaymentAll.js +1 -1
  175. package/lib/module/screens/detail-loan/PaymentAll.js.map +1 -1
  176. package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
  177. package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
  178. package/lib/module/screens/detail-loan/index.js +1 -1
  179. package/lib/module/screens/detail-loan/index.js.map +1 -1
  180. package/lib/module/screens/digital-lending/Step1.js +1 -1
  181. package/lib/module/screens/digital-lending/Step1.js.map +1 -1
  182. package/lib/module/screens/digital-lending/Step2.js +1 -1
  183. package/lib/module/screens/digital-lending/Step2.js.map +1 -1
  184. package/lib/module/screens/digital-lending/Step3.js +1 -1
  185. package/lib/module/screens/digital-lending/Step3.js.map +1 -1
  186. package/lib/module/screens/digital-lending/Step4.js +1 -1
  187. package/lib/module/screens/digital-lending/Step4.js.map +1 -1
  188. package/lib/module/screens/digital-lending/Step5.js +1 -1
  189. package/lib/module/screens/digital-lending/Step5.js.map +1 -1
  190. package/lib/module/screens/digital-lending/Step6.js +1 -1
  191. package/lib/module/screens/digital-lending/Step6.js.map +1 -1
  192. package/lib/module/screens/digital-lending/index.js +1 -1
  193. package/lib/module/screens/digital-lending/index.js.map +1 -1
  194. package/lib/module/screens/eSign/index.js +1 -1
  195. package/lib/module/screens/eSign/index.js.map +1 -1
  196. package/lib/module/screens/forgotPassword/index.js +1 -1
  197. package/lib/module/screens/forgotPassword/index.js.map +1 -1
  198. package/lib/module/screens/full-submit/accept_policy.js +1 -1
  199. package/lib/module/screens/full-submit/accept_policy.js.map +1 -1
  200. package/lib/module/screens/full-submit/index.js +1 -1
  201. package/lib/module/screens/full-submit/index.js.map +1 -1
  202. package/lib/module/screens/full-submit/selfie.js +1 -1
  203. package/lib/module/screens/full-submit/selfie.js.map +1 -1
  204. package/lib/module/screens/full-submit/update-document.js +1 -1
  205. package/lib/module/screens/full-submit/update-document.js.map +1 -1
  206. package/lib/module/screens/full-submit/update-info.js +1 -1
  207. package/lib/module/screens/full-submit/update-info.js.map +1 -1
  208. package/lib/module/screens/guide-transfer-bank/TransferDetail.js +1 -1
  209. package/lib/module/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
  210. package/lib/module/screens/guide-transfer-bank/index.js +1 -1
  211. package/lib/module/screens/guide-transfer-bank/index.js.map +1 -1
  212. package/lib/module/screens/home/CIMBxTima.js +1 -1
  213. package/lib/module/screens/home/CIMBxTima.js.map +1 -1
  214. package/lib/module/screens/home/index.js +1 -1
  215. package/lib/module/screens/home/index.js.map +1 -1
  216. package/lib/module/screens/intro/index.js +1 -1
  217. package/lib/module/screens/intro/index.js.map +1 -1
  218. package/lib/module/screens/introduction/index.js +1 -1
  219. package/lib/module/screens/introduction/index.js.map +1 -1
  220. package/lib/module/screens/liveness/index.js +1 -1
  221. package/lib/module/screens/liveness/index.js.map +1 -1
  222. package/lib/module/screens/loginWithPassword/index.js +1 -1
  223. package/lib/module/screens/loginWithPassword/index.js.map +1 -1
  224. package/lib/module/screens/main/index.js +1 -1
  225. package/lib/module/screens/main/index.js.map +1 -1
  226. package/lib/module/screens/nationalID/index.js +1 -1
  227. package/lib/module/screens/nationalID/index.js.map +1 -1
  228. package/lib/module/screens/nationalIDBack/index.js +1 -1
  229. package/lib/module/screens/nationalIDBack/index.js.map +1 -1
  230. package/lib/module/screens/notification/index.js +1 -1
  231. package/lib/module/screens/notification/index.js.map +1 -1
  232. package/lib/module/screens/otp/index.js +1 -1
  233. package/lib/module/screens/otp/index.js.map +1 -1
  234. package/lib/module/screens/payment-evidence/Guideline.js +1 -1
  235. package/lib/module/screens/payment-evidence/Guideline.js.map +1 -1
  236. package/lib/module/screens/payment-evidence/ModalGuideline.js +1 -1
  237. package/lib/module/screens/payment-evidence/ModalGuideline.js.map +1 -1
  238. package/lib/module/screens/payment-evidence/index.js +1 -1
  239. package/lib/module/screens/payment-evidence/index.js.map +1 -1
  240. package/lib/module/screens/personal/index.js +1 -1
  241. package/lib/module/screens/personal/index.js.map +1 -1
  242. package/lib/module/screens/qualify/index.js +1 -1
  243. package/lib/module/screens/qualify/index.js.map +1 -1
  244. package/lib/module/screens/quick-submit/index.js +1 -1
  245. package/lib/module/screens/quick-submit/index.js.map +1 -1
  246. package/lib/module/screens/register/index.js +1 -1
  247. package/lib/module/screens/register/index.js.map +1 -1
  248. package/lib/module/screens/schedule-payment/index.js +1 -1
  249. package/lib/module/screens/schedule-payment/index.js.map +1 -1
  250. package/lib/module/screens/schedule-payment/payment-list.js +1 -1
  251. package/lib/module/screens/schedule-payment/payment-list.js.map +1 -1
  252. package/lib/module/screens/selfie/index.js +1 -1
  253. package/lib/module/screens/selfie/index.js.map +1 -1
  254. package/lib/module/screens/setPassword/confirmPassword.js +1 -1
  255. package/lib/module/screens/setPassword/confirmPassword.js.map +1 -1
  256. package/lib/module/screens/setPassword/index.js +1 -1
  257. package/lib/module/screens/setPassword/index.js.map +1 -1
  258. package/lib/module/screens/sign-tima/ConfirmContract.js +1 -1
  259. package/lib/module/screens/sign-tima/ConfirmContract.js.map +1 -1
  260. package/lib/module/screens/sign-tima/ViewContract.js +1 -1
  261. package/lib/module/screens/sign-tima/ViewContract.js.map +1 -1
  262. package/lib/module/screens/splash/index.js +1 -1
  263. package/lib/module/screens/splash/index.js.map +1 -1
  264. package/lib/module/screens/terms/QuickTerm.js +1 -1
  265. package/lib/module/screens/terms/QuickTerm.js.map +1 -1
  266. package/lib/module/screens/terms/TermScreen.js +1 -1
  267. package/lib/module/screens/terms/TermScreen.js.map +1 -1
  268. package/lib/module/screens/uploadVideo/index.js +1 -1
  269. package/lib/module/screens/uploadVideo/index.js.map +1 -1
  270. package/lib/module/services/api/api.js +1 -1
  271. package/lib/module/services/api/api.js.map +1 -1
  272. package/lib/typescript/screens/full-submit/accept_policy.d.ts.map +1 -1
  273. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  274. package/lib/typescript/services/api/api.d.ts.map +1 -1
  275. package/package.json +3 -5
  276. package/src/screens/full-submit/accept_policy.tsx +218 -23
  277. package/src/screens/home/index.tsx +6 -3
  278. package/src/services/api/api.ts +2 -0
@@ -40,6 +40,8 @@ export const AcceptPolicy = observer(function AcceptPolicy(props: any) {
40
40
  const ref = useRef<any>();
41
41
  const [BuyInsuranceOfCustomer, setBuyInsuranceOfCustomer] = useState(true);
42
42
  const [BuyInsuranceOfProperty, setBuyInsuranceOfProperty] = useState(true);
43
+ const [BuyInsuranceHospital, setBuyInsuranceHospital] = useState(true);
44
+
43
45
  const [ruleCIMB, setRuleCIMB] = useState(true);
44
46
  const [ruleTima, setRuleTima] = useState(true);
45
47
  const [isLoading, setIsLoading] = useState(false);
@@ -82,8 +84,11 @@ export const AcceptPolicy = observer(function AcceptPolicy(props: any) {
82
84
  onPress: () => {
83
85
  const body = {
84
86
  FeeInsuranceOfCustomer: data?.feeInsuranceOfCustomer,
85
- BuyInsuranceOfCustomer: BuyInsuranceOfCustomer,
86
- BuyInsuranceOfProperty: BuyInsuranceOfProperty,
87
+ // tái vay thì mặc định truyền true
88
+ BuyInsuranceOfCustomer:
89
+ loan?.typeLoan === 2 ? true : BuyInsuranceOfCustomer,
90
+ BuyInsuranceOfProperty:
91
+ loan?.typeLoan === 2 ? true : BuyInsuranceOfProperty,
87
92
  FeeInsuranceOfProperty: data?.feeInsuranceOfProperty,
88
93
  };
89
94
  setIsLoading(true);
@@ -119,9 +124,14 @@ export const AcceptPolicy = observer(function AcceptPolicy(props: any) {
119
124
  onPress: () => {
120
125
  const body = {
121
126
  FeeInsuranceOfCustomer: data?.feeInsuranceOfCustomer,
122
- BuyInsuranceOfCustomer: BuyInsuranceOfCustomer,
123
- BuyInsuranceOfProperty: BuyInsuranceOfProperty,
127
+ // tái vay thì mặc định truyền true
128
+ BuyInsuranceOfCustomer:
129
+ loan?.typeLoan === 2 ? true : BuyInsuranceOfCustomer,
130
+ BuyInsuranceOfProperty:
131
+ loan?.typeLoan === 2 ? true : BuyInsuranceOfProperty,
124
132
  FeeInsuranceOfProperty: data?.feeInsuranceOfProperty,
133
+ BuyInsuranceHospital: BuyInsuranceHospital,
134
+ FeeInsuranceHospital: data?.feeInsuranceHospital,
125
135
  };
126
136
  setIsLoading(true);
127
137
  FullSubmitStore.confirmInsurance(body, () => {
@@ -378,24 +388,128 @@ export const AcceptPolicy = observer(function AcceptPolicy(props: any) {
378
388
  <MText style={{ color: '#828282', fontSize: 14 }}>
379
389
  Số tiền thực nhận (Trừ phí)
380
390
  </MText>
381
- <MText
382
- style={{ fontWeight: 'bold', fontSize: 14, color: color.primary }}
383
- >
384
- {!BuyInsuranceOfCustomer && !BuyInsuranceOfProperty
385
- ? formatMoney(data?.loanAmount)
386
- : !BuyInsuranceOfCustomer && BuyInsuranceOfProperty
387
- ? formatMoney(data?.loanAmount - data?.feeInsuranceOfProperty)
388
- : BuyInsuranceOfCustomer && !BuyInsuranceOfProperty
389
- ? formatMoney(data?.loanAmount - data?.feeInsuranceOfCustomer)
390
- : BuyInsuranceOfCustomer && BuyInsuranceOfProperty
391
- ? formatMoney(
391
+
392
+ {BuyInsuranceOfCustomer &&
393
+ BuyInsuranceOfProperty &&
394
+ BuyInsuranceHospital && (
395
+ <MText
396
+ style={{
397
+ fontWeight: 'bold',
398
+ fontSize: 14,
399
+ color: color.primary,
400
+ }}
401
+ >
402
+ {formatMoney(data?.loanAmount)}
403
+ </MText>
404
+ )}
405
+ {!BuyInsuranceOfCustomer &&
406
+ BuyInsuranceOfProperty &&
407
+ BuyInsuranceHospital && (
408
+ <MText
409
+ style={{
410
+ fontWeight: 'bold',
411
+ fontSize: 14,
412
+ color: color.primary,
413
+ }}
414
+ >
415
+ {formatMoney(data?.loanAmount - data?.feeInsuranceOfCustomer)}
416
+ </MText>
417
+ )}
418
+ {BuyInsuranceOfCustomer &&
419
+ BuyInsuranceOfProperty &&
420
+ !BuyInsuranceHospital && (
421
+ <MText
422
+ style={{
423
+ fontWeight: 'bold',
424
+ fontSize: 14,
425
+ color: color.primary,
426
+ }}
427
+ >
428
+ {formatMoney(data?.loanAmount - data?.feeInsuranceHospital)}
429
+ </MText>
430
+ )}
431
+ {BuyInsuranceOfCustomer &&
432
+ !BuyInsuranceOfProperty &&
433
+ BuyInsuranceHospital && (
434
+ <MText
435
+ style={{
436
+ fontWeight: 'bold',
437
+ fontSize: 14,
438
+ color: color.primary,
439
+ }}
440
+ >
441
+ {formatMoney(data?.loanAmount - data?.feeInsuranceOfProperty)}
442
+ </MText>
443
+ )}
444
+ {!BuyInsuranceOfCustomer &&
445
+ !BuyInsuranceOfProperty &&
446
+ BuyInsuranceHospital && (
447
+ <MText
448
+ style={{
449
+ fontWeight: 'bold',
450
+ fontSize: 14,
451
+ color: color.primary,
452
+ }}
453
+ >
454
+ {formatMoney(
455
+ data?.loanAmount -
456
+ data?.feeInsuranceOfProperty -
457
+ data?.feeInsuranceOfCustomer
458
+ )}
459
+ </MText>
460
+ )}
461
+ {!BuyInsuranceOfCustomer &&
462
+ BuyInsuranceOfProperty &&
463
+ !BuyInsuranceHospital && (
464
+ <MText
465
+ style={{
466
+ fontWeight: 'bold',
467
+ fontSize: 14,
468
+ color: color.primary,
469
+ }}
470
+ >
471
+ {formatMoney(
392
472
  data?.loanAmount -
393
473
  data?.feeInsuranceOfCustomer -
394
- data?.feeInsuranceOfProperty
395
- )
396
- : ''}
397
- đ
398
- </MText>
474
+ data?.feeInsuranceHospital
475
+ )}
476
+ </MText>
477
+ )}
478
+ {BuyInsuranceOfCustomer &&
479
+ !BuyInsuranceOfProperty &&
480
+ !BuyInsuranceHospital && (
481
+ <MText
482
+ style={{
483
+ fontWeight: 'bold',
484
+ fontSize: 14,
485
+ color: color.primary,
486
+ }}
487
+ >
488
+ {formatMoney(
489
+ data?.loanAmount -
490
+ data?.feeInsuranceOfProperty -
491
+ data?.feeInsuranceHospital
492
+ )}
493
+ </MText>
494
+ )}
495
+ {!BuyInsuranceOfCustomer &&
496
+ !BuyInsuranceOfProperty &&
497
+ !BuyInsuranceHospital && (
498
+ <MText
499
+ style={{
500
+ fontWeight: 'bold',
501
+ fontSize: 14,
502
+ color: color.primary,
503
+ }}
504
+ >
505
+ {formatMoney(
506
+ data?.loanAmount -
507
+ data?.feeInsuranceOfProperty -
508
+ data?.feeInsuranceHospital -
509
+ data?.feeInsuranceOfCustomer
510
+ )}
511
+ </MText>
512
+ )}
399
513
  </View>
400
514
  </View>
401
515
  <View style={[styles.box, { marginTop: 8 }]}>
@@ -453,6 +567,31 @@ export const AcceptPolicy = observer(function AcceptPolicy(props: any) {
453
567
  {formatMoney(data?.feeInsuranceOfProperty)}đ
454
568
  </MText>
455
569
  </View>
570
+ <View
571
+ style={{
572
+ marginTop: 8,
573
+ flexDirection: 'row',
574
+ justifyContent: 'space-between',
575
+ }}
576
+ >
577
+ <TouchableOpacity
578
+ style={{
579
+ flexDirection: 'row',
580
+ alignItems: 'center',
581
+ }}
582
+ onPress={() => {
583
+ setBuyInsuranceHospital(!BuyInsuranceHospital);
584
+ }}
585
+ >
586
+ {BuyInsuranceHospital ? <CheckBoxActive /> : <CheckBox />}
587
+ <MText style={{ color: '#828282', marginLeft: 5, fontSize: 14 }}>
588
+ Phí BH nằm viện
589
+ </MText>
590
+ </TouchableOpacity>
591
+ <MText style={{ fontSize: 14, fontWeight: 'bold' }}>
592
+ {formatMoney(data?.feeInsuranceHospital)}đ
593
+ </MText>
594
+ </View>
456
595
  <View
457
596
  style={{
458
597
  height: 2,
@@ -514,6 +653,34 @@ export const AcceptPolicy = observer(function AcceptPolicy(props: any) {
514
653
  100% từ Bảo Minh
515
654
  </MText>
516
655
  </View>
656
+ <View
657
+ style={{
658
+ flexDirection: 'row',
659
+ alignItems: 'center',
660
+ marginTop: 5,
661
+ }}
662
+ >
663
+ <Tick2 />
664
+ <MText style={{ color: '#828282', fontSize: 10 }}>
665
+ Quyền lợi
666
+ </MText>
667
+ <View>
668
+ <MText
669
+ style={{
670
+ color: '#828282',
671
+ // color: '#2F80ED',
672
+ fontSize: 10,
673
+ // textDecorationLine: 'underline',
674
+ }}
675
+ >
676
+ {' '}
677
+ bảo hiểm nằm viện{' '}
678
+ </MText>
679
+ </View>
680
+ <MText style={{ color: '#828282', fontSize: 10 }}>
681
+ 100% từ Bảo Minh
682
+ </MText>
683
+ </View>
517
684
  </View>
518
685
  </View>
519
686
  <View style={{ marginTop: 16, marginBottom: 24 }}>
@@ -596,9 +763,25 @@ export const AcceptPolicy = observer(function AcceptPolicy(props: any) {
596
763
  </View>
597
764
  </ScrollView>
598
765
  <View>
599
- <MButton style={{ paddingHorizontal: 16 }} onPress={() => onSubmit()}>
766
+ <MButton
767
+ style={{ paddingHorizontal: 16 }}
768
+ disable={
769
+ loan?.typeLoan === 2 &&
770
+ !BuyInsuranceOfCustomer &&
771
+ !BuyInsuranceOfProperty
772
+ ? true
773
+ : false
774
+ }
775
+ onPress={() => onSubmit()}
776
+ >
600
777
  <LinearGradient
601
- colors={['#FF7A00', '#EF4123']}
778
+ colors={
779
+ loan?.typeLoan === 2 &&
780
+ !BuyInsuranceOfCustomer &&
781
+ !BuyInsuranceOfProperty
782
+ ? ['#BDBDBD', '#BDBDBD']
783
+ : ['#FF7A00', '#EF4123']
784
+ }
602
785
  style={[
603
786
  commonStyles.alignCenter,
604
787
  commonStyles.justifyCenter,
@@ -609,7 +792,19 @@ export const AcceptPolicy = observer(function AcceptPolicy(props: any) {
609
792
  },
610
793
  ]}
611
794
  >
612
- <MText style={[commonStyles.textNormalBold, { color: 'white' }]}>
795
+ <MText
796
+ style={[
797
+ commonStyles.textNormalBold,
798
+ {
799
+ color:
800
+ loan?.typeLoan === 2 &&
801
+ !BuyInsuranceOfCustomer &&
802
+ !BuyInsuranceOfProperty
803
+ ? '#333333'
804
+ : 'white',
805
+ },
806
+ ]}
807
+ >
613
808
  Hoàn thành
614
809
  </MText>
615
810
  </LinearGradient>
@@ -109,8 +109,8 @@ export const Home = observer(function Home() {
109
109
  }, 200);
110
110
  }
111
111
  if (
112
- item?.typeLoan === 4 ||
113
- (item?.typeLoan === 2 && item?.isCimbApproveFull !== null)
112
+ (item?.typeLoan === 4 || item?.typeLoan === 2) &&
113
+ item?.isCimbApproveFull !== null
114
114
  ) {
115
115
  const checkShow = await load(`SHOW_${item?.id}`);
116
116
  if (!checkShow || checkShow !== true) {
@@ -848,7 +848,10 @@ export const Home = observer(function Home() {
848
848
  {/* // cho phép update thông tin */}
849
849
  {item?.isUpdateLoanReBorrow ? (
850
850
  <TouchableOpacity
851
- style={{ marginTop: 14 }}
851
+ style={{
852
+ marginTop: 14,
853
+ marginBottom: 16,
854
+ }}
852
855
  onPress={() => {
853
856
  navigation.push(
854
857
  'DigitalLending',
@@ -2306,6 +2306,8 @@ export class Api {
2306
2306
  async updateLoanReborrow(body) {
2307
2307
  // make the api call
2308
2308
  const response: ApiResponse<any> = await this.apisauce.post(`api/v2.0/loanbrief/init_reborrow`, body)
2309
+ console.log(response);
2310
+
2309
2311
  if (!response.ok) {
2310
2312
  const problem = getGeneralApiProblem(response)
2311
2313
  if (problem) return problem