react-native-timacare 0.0.8 → 0.0.10

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 (171) hide show
  1. package/lib/commonjs/assets/icons/call.svg +6 -0
  2. package/lib/commonjs/assets/icons/call_black.svg +6 -0
  3. package/lib/commonjs/assets/icons/call_red.svg +4 -0
  4. package/lib/commonjs/assets/icons/index.js +1 -1
  5. package/lib/commonjs/assets/icons/index.js.flow +10 -0
  6. package/lib/commonjs/assets/icons/index.js.map +1 -1
  7. package/lib/commonjs/assets/icons/tick2.svg +6 -0
  8. package/lib/commonjs/assets/icons/tima3.svg +44 -0
  9. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  10. package/lib/commonjs/navigation/primary-navigator.js.flow +4 -1
  11. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  12. package/lib/commonjs/screens/camera/index.js +1 -1
  13. package/lib/commonjs/screens/camera/index.js.flow +6 -14
  14. package/lib/commonjs/screens/camera/index.js.map +1 -1
  15. package/lib/commonjs/screens/full-submit/accept_policy.js +2 -0
  16. package/lib/commonjs/screens/full-submit/accept_policy.js.flow +494 -0
  17. package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -0
  18. package/lib/commonjs/screens/full-submit/store.js +1 -1
  19. package/lib/commonjs/screens/full-submit/store.js.flow +43 -1
  20. package/lib/commonjs/screens/full-submit/store.js.map +1 -1
  21. package/lib/commonjs/screens/home/CIMBxTima.js +1 -1
  22. package/lib/commonjs/screens/home/CIMBxTima.js.flow +27 -11
  23. package/lib/commonjs/screens/home/CIMBxTima.js.map +1 -1
  24. package/lib/commonjs/screens/home/Store.js +1 -1
  25. package/lib/commonjs/screens/home/Store.js.flow +1 -1
  26. package/lib/commonjs/screens/home/Store.js.map +1 -1
  27. package/lib/commonjs/screens/home/accept.png +0 -0
  28. package/lib/commonjs/screens/home/index.js +1 -1
  29. package/lib/commonjs/screens/home/index.js.flow +994 -424
  30. package/lib/commonjs/screens/home/index.js.map +1 -1
  31. package/lib/commonjs/screens/home/reject.png +0 -0
  32. package/lib/commonjs/screens/liveness/index.js +1 -1
  33. package/lib/commonjs/screens/liveness/index.js.flow +194 -191
  34. package/lib/commonjs/screens/liveness/index.js.map +1 -1
  35. package/lib/commonjs/screens/payment-evidence/Guideline.js +1 -1
  36. package/lib/commonjs/screens/payment-evidence/Guideline.js.flow +28 -3
  37. package/lib/commonjs/screens/payment-evidence/Guideline.js.map +1 -1
  38. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js +1 -1
  39. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.flow +12 -3
  40. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.map +1 -1
  41. package/lib/commonjs/screens/payment-evidence/index.js +1 -1
  42. package/lib/commonjs/screens/payment-evidence/index.js.flow +20 -6
  43. package/lib/commonjs/screens/payment-evidence/index.js.map +1 -1
  44. package/lib/commonjs/screens/quick-submit/index.js +1 -1
  45. package/lib/commonjs/screens/quick-submit/index.js.flow +15 -29
  46. package/lib/commonjs/screens/quick-submit/index.js.map +1 -1
  47. package/lib/commonjs/screens/register/index.js +1 -1
  48. package/lib/commonjs/screens/register/index.js.flow +1 -1
  49. package/lib/commonjs/screens/register/index.js.map +1 -1
  50. package/lib/commonjs/screens/selfie/index.js +1 -1
  51. package/lib/commonjs/screens/selfie/index.js.flow +1 -25
  52. package/lib/commonjs/screens/selfie/index.js.map +1 -1
  53. package/lib/commonjs/screens/sign-tima/ConfirmContract.js +1 -1
  54. package/lib/commonjs/screens/sign-tima/ConfirmContract.js.flow +0 -1
  55. package/lib/commonjs/screens/sign-tima/ConfirmContract.js.map +1 -1
  56. package/lib/commonjs/screens/splash/index.js +1 -1
  57. package/lib/commonjs/screens/splash/index.js.flow +11 -2
  58. package/lib/commonjs/screens/splash/index.js.map +1 -1
  59. package/lib/commonjs/screens/terms/QuickTerm.js +1 -1
  60. package/lib/commonjs/screens/terms/QuickTerm.js.flow +4 -0
  61. package/lib/commonjs/screens/terms/QuickTerm.js.map +1 -1
  62. package/lib/commonjs/screens/terms/TermScreen.js +1 -1
  63. package/lib/commonjs/screens/terms/TermScreen.js.flow +0 -1
  64. package/lib/commonjs/screens/terms/TermScreen.js.map +1 -1
  65. package/lib/commonjs/services/api/api-config.js +1 -1
  66. package/lib/commonjs/services/api/api-config.js.flow +2 -2
  67. package/lib/commonjs/services/api/api-config.js.map +1 -1
  68. package/lib/commonjs/services/api/api.js +1 -1
  69. package/lib/commonjs/services/api/api.js.flow +71 -0
  70. package/lib/commonjs/services/api/api.js.map +1 -1
  71. package/lib/module/assets/icons/call.svg +6 -0
  72. package/lib/module/assets/icons/call_black.svg +6 -0
  73. package/lib/module/assets/icons/call_red.svg +4 -0
  74. package/lib/module/assets/icons/index.js +1 -1
  75. package/lib/module/assets/icons/index.js.map +1 -1
  76. package/lib/module/assets/icons/tick2.svg +6 -0
  77. package/lib/module/assets/icons/tima3.svg +44 -0
  78. package/lib/module/navigation/primary-navigator.js +1 -1
  79. package/lib/module/navigation/primary-navigator.js.map +1 -1
  80. package/lib/module/screens/camera/index.js +1 -1
  81. package/lib/module/screens/camera/index.js.map +1 -1
  82. package/lib/module/screens/full-submit/accept_policy.js +2 -0
  83. package/lib/module/screens/full-submit/accept_policy.js.map +1 -0
  84. package/lib/module/screens/full-submit/store.js +1 -1
  85. package/lib/module/screens/full-submit/store.js.map +1 -1
  86. package/lib/module/screens/home/CIMBxTima.js +1 -1
  87. package/lib/module/screens/home/CIMBxTima.js.map +1 -1
  88. package/lib/module/screens/home/Store.js +1 -1
  89. package/lib/module/screens/home/Store.js.map +1 -1
  90. package/lib/module/screens/home/accept.png +0 -0
  91. package/lib/module/screens/home/index.js +1 -1
  92. package/lib/module/screens/home/index.js.map +1 -1
  93. package/lib/module/screens/home/reject.png +0 -0
  94. package/lib/module/screens/liveness/index.js +1 -1
  95. package/lib/module/screens/liveness/index.js.map +1 -1
  96. package/lib/module/screens/payment-evidence/Guideline.js +1 -1
  97. package/lib/module/screens/payment-evidence/Guideline.js.map +1 -1
  98. package/lib/module/screens/payment-evidence/ModalGuideline.js +1 -1
  99. package/lib/module/screens/payment-evidence/ModalGuideline.js.map +1 -1
  100. package/lib/module/screens/payment-evidence/index.js +1 -1
  101. package/lib/module/screens/payment-evidence/index.js.map +1 -1
  102. package/lib/module/screens/quick-submit/index.js +1 -1
  103. package/lib/module/screens/quick-submit/index.js.map +1 -1
  104. package/lib/module/screens/register/index.js +1 -1
  105. package/lib/module/screens/register/index.js.map +1 -1
  106. package/lib/module/screens/selfie/index.js +1 -1
  107. package/lib/module/screens/selfie/index.js.map +1 -1
  108. package/lib/module/screens/sign-tima/ConfirmContract.js +1 -1
  109. package/lib/module/screens/sign-tima/ConfirmContract.js.map +1 -1
  110. package/lib/module/screens/splash/index.js +1 -1
  111. package/lib/module/screens/splash/index.js.map +1 -1
  112. package/lib/module/screens/terms/QuickTerm.js +1 -1
  113. package/lib/module/screens/terms/QuickTerm.js.map +1 -1
  114. package/lib/module/screens/terms/TermScreen.js +1 -1
  115. package/lib/module/screens/terms/TermScreen.js.map +1 -1
  116. package/lib/module/services/api/api-config.js +1 -1
  117. package/lib/module/services/api/api-config.js.map +1 -1
  118. package/lib/module/services/api/api.js +1 -1
  119. package/lib/module/services/api/api.js.map +1 -1
  120. package/lib/typescript/assets/icons/index.d.ts +6 -1
  121. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  122. package/lib/typescript/navigation/primary-navigator.d.ts +1 -0
  123. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  124. package/lib/typescript/screens/camera/index.d.ts.map +1 -1
  125. package/lib/typescript/screens/full-submit/accept_policy.d.ts +2 -0
  126. package/lib/typescript/screens/full-submit/accept_policy.d.ts.map +1 -0
  127. package/lib/typescript/screens/full-submit/store.d.ts +4 -0
  128. package/lib/typescript/screens/full-submit/store.d.ts.map +1 -1
  129. package/lib/typescript/screens/home/CIMBxTima.d.ts.map +1 -1
  130. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  131. package/lib/typescript/screens/liveness/index.d.ts.map +1 -1
  132. package/lib/typescript/screens/payment-evidence/Guideline.d.ts.map +1 -1
  133. package/lib/typescript/screens/payment-evidence/ModalGuideline.d.ts.map +1 -1
  134. package/lib/typescript/screens/payment-evidence/index.d.ts.map +1 -1
  135. package/lib/typescript/screens/quick-submit/index.d.ts.map +1 -1
  136. package/lib/typescript/screens/selfie/index.d.ts.map +1 -1
  137. package/lib/typescript/screens/sign-tima/ConfirmContract.d.ts.map +1 -1
  138. package/lib/typescript/screens/splash/index.d.ts.map +1 -1
  139. package/lib/typescript/screens/terms/QuickTerm.d.ts.map +1 -1
  140. package/lib/typescript/screens/terms/TermScreen.d.ts.map +1 -1
  141. package/lib/typescript/services/api/api.d.ts +64 -0
  142. package/lib/typescript/services/api/api.d.ts.map +1 -1
  143. package/package.json +2 -1
  144. package/src/assets/icons/call.svg +6 -0
  145. package/src/assets/icons/call_black.svg +6 -0
  146. package/src/assets/icons/call_red.svg +4 -0
  147. package/src/assets/icons/index.tsx +10 -0
  148. package/src/assets/icons/tick2.svg +6 -0
  149. package/src/assets/icons/tima3.svg +44 -0
  150. package/src/navigation/primary-navigator.tsx +4 -1
  151. package/src/screens/camera/index.tsx +6 -14
  152. package/src/screens/full-submit/accept_policy.tsx +494 -0
  153. package/src/screens/full-submit/store.tsx +43 -1
  154. package/src/screens/home/CIMBxTima.tsx +27 -11
  155. package/src/screens/home/Store.tsx +1 -1
  156. package/src/screens/home/accept.png +0 -0
  157. package/src/screens/home/index.tsx +994 -424
  158. package/src/screens/home/reject.png +0 -0
  159. package/src/screens/liveness/index.tsx +194 -191
  160. package/src/screens/payment-evidence/Guideline.tsx +28 -3
  161. package/src/screens/payment-evidence/ModalGuideline.tsx +12 -3
  162. package/src/screens/payment-evidence/index.tsx +20 -6
  163. package/src/screens/quick-submit/index.tsx +15 -29
  164. package/src/screens/register/index.tsx +1 -1
  165. package/src/screens/selfie/index.tsx +1 -25
  166. package/src/screens/sign-tima/ConfirmContract.tsx +0 -1
  167. package/src/screens/splash/index.tsx +11 -2
  168. package/src/screens/terms/QuickTerm.tsx +4 -0
  169. package/src/screens/terms/TermScreen.tsx +0 -1
  170. package/src/services/api/api-config.ts +2 -2
  171. package/src/services/api/api.ts +71 -0
@@ -3,6 +3,7 @@ import React, { useEffect, useState } from 'react';
3
3
  import {
4
4
  ActivityIndicator,
5
5
  Alert,
6
+ Dimensions,
6
7
  Image,
7
8
  ImageBackground,
8
9
  Platform,
@@ -24,11 +25,13 @@ import { ScreenNames } from '../../navigation';
24
25
  import {
25
26
  AddInfo,
26
27
  AddInfoDisable,
28
+ Call,
27
29
  CIMBSmall,
28
30
  CloseIcon,
29
31
  Contract,
30
32
  ContractActive,
31
33
  ContractTimeIcon,
34
+ IconBackWhite,
32
35
  IconEviden,
33
36
  IconNavClose,
34
37
  IconNotify,
@@ -60,6 +63,8 @@ import {
60
63
  } from 'react-native-permissions';
61
64
  import appStore from '../../AppStore';
62
65
  import Modal from 'react-native-modal';
66
+ import { Api } from '../../services/api';
67
+ import { load, save } from '../../utils/storage';
63
68
 
64
69
  const listBanners = [
65
70
  require('../../assets/img/banner1.png'),
@@ -69,23 +74,35 @@ const listBanners = [
69
74
  export const Home = observer(function Home() {
70
75
  const navigation = useNavigation();
71
76
  const [showModal, setShowModal] = useState(false);
77
+ const [showModal2, setShowModal2] = useState(false);
78
+
72
79
  const onRefresh = () => {
73
80
  homeStore.getListLoan();
74
- homeStore.getListLoanPending((loan) => {
81
+ homeStore.getListLoanPending(async (loan) => {
75
82
  homeStore.getCheckEKYC({ loanBriefId: loan.id });
76
- if (loan.messageErrorCIMB !== '' && loan?.messageErrorCIMB) {
83
+ if (
84
+ loan.messageErrorCIMB !== '' &&
85
+ loan?.messageErrorCIMB &&
86
+ loan?.isCimbApproveFull === null
87
+ ) {
77
88
  setShowModal(true);
78
89
  }
90
+ if (loan?.typeLoan === 4 && loan?.isCimbApproveFull !== null) {
91
+ const checkShow = await load(`SHOW_${loan?.id}`);
92
+ if (!checkShow) {
93
+ setShowModal2(true);
94
+ }
95
+ }
79
96
  });
80
97
  };
81
98
  useEffect(() => {
82
99
  onRefresh();
83
100
  }, []);
84
101
 
85
- useEffect(() => {
86
- FullSubmitStore.getTypeMerried();
87
- FullSubmitStore.getListBank();
88
- }, []);
102
+ // useEffect(() => {
103
+ // FullSubmitStore.getTypeMerried();
104
+ // FullSubmitStore.getListBank();
105
+ // }, []);
89
106
 
90
107
  useEffect(() => {
91
108
  return navigation.addListener('focus', () => {
@@ -215,85 +232,93 @@ export const Home = observer(function Home() {
215
232
  <View
216
233
  style={[commonStyles.fill, { zIndex: 1, backgroundColor: '#FFFFFF' }]}
217
234
  >
218
- <StatusBar barStyle={'light-content'} />
219
- {homeStore.isLoading ? (
220
- <View
221
- style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}
235
+ <LinearGradient colors={['#FF8E4F', '#EF592E']}>
236
+ <SafeAreaView
237
+ style={{
238
+ flexDirection: 'row',
239
+ justifyContent: 'center',
240
+ paddingHorizontal: 16,
241
+ alignItems: 'center',
242
+ height: 60,
243
+ }}
222
244
  >
223
- <ActivityIndicator size={'small'} color={color.primary} />
224
- </View>
225
- ) : (
226
- <>
227
- <SafeAreaView>
228
- <LinearGradient colors={['#FF8E4F', '#EF592E']}>
229
- <View
230
- style={{
231
- flexDirection: 'row',
232
- justifyContent: 'space-between',
233
- paddingHorizontal: 16,
234
- paddingVertical: 16,
235
- alignItems: 'center',
236
- }}
237
- >
238
- <MText
239
- style={{
240
- fontWeight: 'bold',
241
- color: 'white',
242
- fontSize: 16,
243
- }}
244
- >
245
- Vay nhanh 24/7
246
- </MText>
247
- <TouchableOpacity
248
- style={{
249
- width: 32,
250
- height: 32,
251
- borderRadius: 20,
252
- justifyContent: 'center',
253
- alignItems: 'center',
254
- borderWidth: 1,
255
- borderColor: 'white',
256
- }}
257
- onPress={() => {
258
- navigation.push(ScreenNames.PaymentEvidence);
259
- }}
260
- >
261
- <CloseIcon />
262
- </TouchableOpacity>
263
- </View>
264
- </LinearGradient>
265
- </SafeAreaView>
266
- <ScrollView
267
- refreshControl={
268
- <RefreshControl
269
- refreshing={homeStore.isLoading}
270
- onRefresh={onRefresh}
271
- />
272
- }
273
- style={{ flex: 1, marginBottom: 16 }}
245
+ <TouchableOpacity
246
+ style={{
247
+ height: 32,
248
+ width: 32,
249
+ borderRadius: 30,
250
+ alignItems: 'center',
251
+ justifyContent: 'center',
252
+ position: 'absolute',
253
+ left: 16,
254
+ }}
255
+ onPress={() => {
256
+ // Linking.openURL()
257
+ navigation.pop();
258
+ }}
259
+ >
260
+ <IconBackWhite />
261
+ </TouchableOpacity>
262
+ <MText
263
+ style={{
264
+ fontWeight: 'bold',
265
+ color: 'white',
266
+ fontSize: 16,
267
+ }}
268
+ >
269
+ Vay nhanh 24/7
270
+ </MText>
271
+
272
+ <TouchableOpacity
273
+ style={{
274
+ height: 32,
275
+ width: 32,
276
+ borderRadius: 30,
277
+ borderWidth: 1,
278
+ borderColor: 'white',
279
+ alignItems: 'center',
280
+ justifyContent: 'center',
281
+ position: 'absolute',
282
+ right: 16,
283
+ }}
284
+ onPress={() => {
285
+ navigation.push(ScreenNames.PaymentEvidence);
286
+ }}
274
287
  >
275
- <View
276
- style={[
277
- commonStyles.fill,
278
- { backgroundColor: 'white', padding: 16 },
279
- ]}
288
+ <Call />
289
+ </TouchableOpacity>
290
+ </SafeAreaView>
291
+ </LinearGradient>
292
+ <ScrollView
293
+ refreshControl={
294
+ <RefreshControl
295
+ refreshing={homeStore.isLoading}
296
+ onRefresh={onRefresh}
297
+ />
298
+ }
299
+ style={{ flex: 1, marginBottom: 16 }}
300
+ >
301
+ <View
302
+ style={[commonStyles.fill, { backgroundColor: 'white', padding: 16 }]}
303
+ >
304
+ <View>
305
+ <MText
306
+ style={{ fontSize: 16, fontWeight: 'bold', marginBottom: 16 }}
280
307
  >
281
- <View>
282
- <MText
283
- style={{ fontSize: 16, fontWeight: 'bold', marginBottom: 16 }}
284
- >
285
- Danh sách đơn mới
308
+ Danh sách đơn mới
309
+ </MText>
310
+ {!homeStore.listLoanPending ? (
311
+ <View style={{ alignItems: 'center', marginTop: 20 }}>
312
+ <MText style={[commonStyles.textNormal]}>
313
+ Không có đơn vay
286
314
  </MText>
287
- {!homeStore.listLoanPending ? (
288
- <View style={{ alignItems: 'center', marginTop: 20 }}>
289
- <MText style={[commonStyles.textNormal]}>
290
- Không có đơn vay
291
- </MText>
292
- </View>
293
- ) : (
294
- <>
295
- {homeStore.listLoanPending &&
296
- homeStore.listLoanPending?.isPipelineCIMB ? (
315
+ </View>
316
+ ) : (
317
+ <>
318
+ {homeStore.listLoanPending &&
319
+ homeStore.listLoanPending?.isPipelineCIMB ? (
320
+ <View>
321
+ {homeStore.listLoanPending?.typeLoan === 4 ? (
297
322
  <View
298
323
  style={{
299
324
  backgroundColor: '#FFFFFF',
@@ -358,36 +383,16 @@ export const Home = observer(function Home() {
358
383
  }}
359
384
  />
360
385
  <View style={{ flexDirection: 'row' }}>
361
- {homeStore?.listLoanPending?.isUpdateLoan ||
362
- homeStore?.listLoanPending?.isUpdateInformation ? (
386
+ {homeStore.listLoanPending?.loanStatus === null ||
387
+ homeStore.listLoanPending?.loanStatus === '' ? (
363
388
  <TouchableOpacity
364
389
  style={{ alignItems: 'center' }}
365
390
  onPress={() => {
366
- if (
367
- homeStore.listLoanPending?.loanStatus ===
368
- null ||
369
- homeStore.listLoanPending?.loanStatus === ''
370
- ) {
371
- navigation.dispatch(
372
- StackActions.push(ScreenNames.CIMBxTima, {
373
- loan: homeStore.listLoanPending,
374
- })
375
- );
376
- } else if (
377
- homeStore.listLoanPending?.isUpdateLoan
378
- ) {
379
- navigation.dispatch(
380
- StackActions.push(ScreenNames.CimbSelfie, {
381
- loan: homeStore.listLoanPending,
382
- })
383
- );
384
- } else {
385
- navigation.dispatch(
386
- StackActions.push(ScreenNames.QuickSubmit, {
387
- loan: homeStore.listLoanPending,
388
- })
389
- );
390
- }
391
+ navigation.dispatch(
392
+ StackActions.push(ScreenNames.CIMBxTima, {
393
+ loan: homeStore.listLoanPending,
394
+ })
395
+ );
391
396
  }}
392
397
  >
393
398
  <AddInfo />
@@ -406,23 +411,72 @@ export const Home = observer(function Home() {
406
411
  </MText>
407
412
  </TouchableOpacity>
408
413
  ) : (
409
- <View style={{ alignItems: 'center' }}>
410
- <AddInfoDisable />
411
- <MText
412
- style={[
413
- commonStyles.textNormal,
414
- {
415
- fontSize: 12,
416
- fontWeight: '300',
417
- marginTop: 8,
418
- textAlign: 'center',
419
- },
420
- ]}
421
- >
422
- Hoàn thiện{'\n'}cung cấp thông tin
423
- </MText>
414
+ <View>
415
+ {homeStore?.listLoanPending?.isUpdateLoan ||
416
+ homeStore?.listLoanPending
417
+ ?.isUpdateInformation ? (
418
+ <TouchableOpacity
419
+ style={{ alignItems: 'center' }}
420
+ onPress={() => {
421
+ if (
422
+ homeStore.listLoanPending?.isUpdateLoan
423
+ ) {
424
+ navigation.dispatch(
425
+ StackActions.push(
426
+ ScreenNames.CimbSelfie,
427
+ {
428
+ loan: homeStore.listLoanPending,
429
+ }
430
+ )
431
+ );
432
+ } else {
433
+ navigation.dispatch(
434
+ StackActions.push(
435
+ ScreenNames.QuickSubmit,
436
+ {
437
+ loan: homeStore.listLoanPending,
438
+ }
439
+ )
440
+ );
441
+ }
442
+ }}
443
+ >
444
+ <AddInfo />
445
+ <MText
446
+ style={[
447
+ commonStyles.textNormal,
448
+ {
449
+ fontSize: 12,
450
+ fontWeight: '300',
451
+ marginTop: 8,
452
+ textAlign: 'center',
453
+ },
454
+ ]}
455
+ >
456
+ Hoàn thiện{'\n'}cung cấp thông tin
457
+ </MText>
458
+ </TouchableOpacity>
459
+ ) : (
460
+ <View style={{ alignItems: 'center' }}>
461
+ <AddInfoDisable />
462
+ <MText
463
+ style={[
464
+ commonStyles.textNormal,
465
+ {
466
+ fontSize: 12,
467
+ fontWeight: '300',
468
+ marginTop: 8,
469
+ textAlign: 'center',
470
+ },
471
+ ]}
472
+ >
473
+ Hoàn thiện{'\n'}cung cấp thông tin
474
+ </MText>
475
+ </View>
476
+ )}
424
477
  </View>
425
478
  )}
479
+
426
480
  {homeStore.listLoanPending?.isSignContract && (
427
481
  <TouchableOpacity
428
482
  style={{
@@ -591,368 +645,744 @@ export const Home = observer(function Home() {
591
645
  </View>
592
646
  </View>
593
647
  ) : (
594
- <View
595
- style={{
596
- backgroundColor: '#FFFFFF',
597
- paddingHorizontal: 16,
598
- paddingTop: 16,
599
- borderRadius: 8,
600
- borderWidth: 0.5,
601
- borderColor: '#E0E0E0',
602
- }}
603
- >
604
- <View
605
- style={{ flexDirection: 'row', alignItems: 'center' }}
606
- >
607
- <Contract />
608
- <View style={{ flex: 1, paddingLeft: 8 }}>
609
- <MText style={commonStyles.textNormalBold}>
610
- Đơn vay {homeStore.listLoanPending?.id}
611
- </MText>
612
- <MText style={commonStyles.textNormal}>
613
- Số tiền vay (VND):{' '}
614
- {homeStore.listLoanPending?.loanAmount
615
- ? formatMoney(
616
- homeStore.listLoanPending?.loanAmount
617
- )
618
- : 'Chưa xác định'}
619
- </MText>
620
- </View>
621
- </View>
622
- <View
623
- style={{
624
- height: 1,
625
- backgroundColor: '#E0E0E0',
626
- marginVertical: 16,
627
- }}
628
- />
629
- <View
630
- style={{
631
- flexDirection: 'row',
632
- justifyContent: 'space-between',
633
- }}
634
- >
635
- <MText style={commonStyles.textNormal}>
636
- Trạng thái
637
- </MText>
638
- <MText
639
- style={[
640
- commonStyles.textNormalBold,
641
- { color: '#F05123' },
642
- ]}
648
+ <View>
649
+ {homeStore.listLoanPending?.loanStatus !== null &&
650
+ homeStore.listLoanPending?.loanStatus !== '' ? (
651
+ <View
652
+ style={{
653
+ backgroundColor: '#FFFFFF',
654
+ paddingHorizontal: 16,
655
+ paddingTop: 16,
656
+ borderRadius: 8,
657
+ borderWidth: 0.5,
658
+ borderColor: '#E0E0E0',
659
+ }}
643
660
  >
644
- {homeStore?.listLoanPending?.loanStatus}
645
- </MText>
646
- </View>
647
- <View
648
- style={{
649
- height: 0.5,
650
- backgroundColor: '#E0E0E0',
651
- marginVertical: 16,
652
- }}
653
- />
654
- <View style={{ flexDirection: 'row' }}>
655
- {!homeStore.checkEKYC[
656
- homeStore.listLoanPending?.id
657
- ] ? (
658
- <TouchableOpacity
659
- style={{ alignItems: 'center' }}
660
- onPress={() => {
661
- navigation.dispatch(
662
- StackActions.push(ScreenNames.NationalID, {
663
- loan: homeStore.listLoanPending,
664
- reLoan: true,
665
- })
666
- );
661
+ <View
662
+ style={{
663
+ flexDirection: 'row',
664
+ alignItems: 'center',
667
665
  }}
668
666
  >
669
- <AddInfo />
667
+ <Contract />
668
+ <View style={{ flex: 1, paddingLeft: 8 }}>
669
+ <MText style={commonStyles.textNormalBold}>
670
+ Mã Đơn vay-{homeStore.listLoanPending?.id}
671
+ </MText>
672
+ <MText style={commonStyles.textNormal}>
673
+ Số tiền vay (VND):{' '}
674
+ {homeStore.listLoanPending?.loanAmountOffer
675
+ ? formatMoney(
676
+ homeStore.listLoanPending
677
+ ?.loanAmountOffer
678
+ )
679
+ : 'Chưa xác định'}
680
+ </MText>
681
+ </View>
682
+ </View>
683
+ <View
684
+ style={{
685
+ height: 1,
686
+ backgroundColor: '#E0E0E0',
687
+ marginVertical: 16,
688
+ }}
689
+ />
690
+ <View
691
+ style={{
692
+ flexDirection: 'row',
693
+ justifyContent: 'space-between',
694
+ }}
695
+ >
696
+ <MText style={commonStyles.textNormal}>
697
+ Trạng thái
698
+ </MText>
670
699
  <MText
671
700
  style={[
672
- commonStyles.textNormal,
673
- {
674
- fontSize: 12,
675
- fontWeight: '300',
676
- marginTop: 8,
677
- },
701
+ commonStyles.textNormalBold,
702
+ { color: '#F05123' },
678
703
  ]}
679
704
  >
680
- EKYC
705
+ {homeStore?.listLoanPending?.loanStatus}
681
706
  </MText>
682
- </TouchableOpacity>
683
- ) : (
684
- <View style={{ alignItems: 'center' }}>
685
- <AddInfoDisable />
707
+ </View>
708
+ <View
709
+ style={{
710
+ height: 0.5,
711
+ backgroundColor: '#E0E0E0',
712
+ marginVertical: 16,
713
+ }}
714
+ />
715
+ <View style={{ flexDirection: 'row' }}>
716
+ {homeStore?.listLoanPending?.isUpdateLoan ||
717
+ homeStore?.listLoanPending
718
+ ?.isUpdateInformation ? (
719
+ <TouchableOpacity
720
+ style={{ alignItems: 'center' }}
721
+ onPress={() => {
722
+ if (
723
+ homeStore.listLoanPending?.isUpdateLoan
724
+ ) {
725
+ navigation.dispatch(
726
+ StackActions.push(
727
+ ScreenNames.CimbSelfie,
728
+ {
729
+ loan: homeStore.listLoanPending,
730
+ }
731
+ )
732
+ );
733
+ } else {
734
+ navigation.dispatch(
735
+ StackActions.push(
736
+ ScreenNames.QuickSubmit,
737
+ {
738
+ loan: homeStore.listLoanPending,
739
+ }
740
+ )
741
+ );
742
+ }
743
+ }}
744
+ >
745
+ <AddInfo />
746
+ <MText
747
+ style={[
748
+ commonStyles.textNormal,
749
+ {
750
+ fontSize: 12,
751
+ fontWeight: '300',
752
+ marginTop: 8,
753
+ textAlign: 'center',
754
+ },
755
+ ]}
756
+ >
757
+ Hoàn thiện{'\n'}cung cấp thông tin
758
+ </MText>
759
+ </TouchableOpacity>
760
+ ) : (
761
+ <View style={{ alignItems: 'center' }}>
762
+ <AddInfoDisable />
763
+ <MText
764
+ style={[
765
+ commonStyles.textNormal,
766
+ {
767
+ fontSize: 12,
768
+ fontWeight: '300',
769
+ marginTop: 8,
770
+ textAlign: 'center',
771
+ },
772
+ ]}
773
+ >
774
+ Hoàn thiện{'\n'}cung cấp thông tin
775
+ </MText>
776
+ </View>
777
+ )}
778
+ {homeStore.listLoanPending?.isSignContract && (
779
+ <TouchableOpacity
780
+ style={{
781
+ alignItems: 'center',
782
+ marginLeft: 20,
783
+ }}
784
+ onPress={() => {
785
+ if (
786
+ homeStore.listLoanPending?.urlSignContract
787
+ ) {
788
+ navigation.dispatch(
789
+ StackActions.push(
790
+ ScreenNames.CIMBSign,
791
+ {
792
+ url: homeStore.listLoanPending
793
+ ?.urlSignContract,
794
+ }
795
+ )
796
+ );
797
+ } else {
798
+ Alert.alert(
799
+ 'Thông báo',
800
+ 'Bạn chưa thể ký hợp đồng bây giờ?'
801
+ );
802
+ }
803
+ }}
804
+ >
805
+ <IconSign2 />
806
+ <MText
807
+ style={[
808
+ commonStyles.textNormal,
809
+ {
810
+ fontSize: 12,
811
+ fontWeight: '300',
812
+ marginTop: 8,
813
+ },
814
+ ]}
815
+ >
816
+ Ký hợp đồng
817
+ </MText>
818
+ </TouchableOpacity>
819
+ )}
820
+ {homeStore.listLoanPending
821
+ ?.isSignContractTima && (
822
+ <TouchableOpacity
823
+ style={{
824
+ alignItems: 'center',
825
+ marginLeft: 20,
826
+ }}
827
+ onPress={() => {
828
+ navigation.dispatch(
829
+ StackActions.push(
830
+ ScreenNames.ViewContract,
831
+ {
832
+ loan: homeStore.listLoanPending,
833
+ }
834
+ )
835
+ );
836
+ }}
837
+ >
838
+ <ContractTimeIcon />
839
+ <MText
840
+ style={[
841
+ commonStyles.textNormal,
842
+ {
843
+ fontSize: 12,
844
+ fontWeight: '300',
845
+ marginTop: 8,
846
+ textAlign: 'center',
847
+ },
848
+ ]}
849
+ >
850
+ Hợp đồng{'\n'}dịch vụ
851
+ </MText>
852
+ </TouchableOpacity>
853
+ )}
854
+ {homeStore.listLoanPending
855
+ ?.paymentEvidenceUrl && (
856
+ <TouchableOpacity
857
+ style={{
858
+ alignItems: 'center',
859
+ marginLeft: 20,
860
+ }}
861
+ onPress={() => {
862
+ navigation.dispatch(
863
+ StackActions.push(
864
+ ScreenNames.PaymentEvidence,
865
+ {
866
+ url: homeStore.listLoanPending
867
+ ?.paymentEvidenceUrl,
868
+ }
869
+ )
870
+ );
871
+ }}
872
+ >
873
+ <IconEviden />
874
+ <MText
875
+ style={[
876
+ commonStyles.textNormal,
877
+ {
878
+ fontSize: 12,
879
+ fontWeight: '300',
880
+ marginTop: 8,
881
+ textAlign: 'center',
882
+ },
883
+ ]}
884
+ >
885
+ Mục đích {'\n'}sử dụng
886
+ </MText>
887
+ </TouchableOpacity>
888
+ )}
889
+ {homeStore.listLoanPending?.showPaymentPlan && (
890
+ <TouchableOpacity
891
+ style={{
892
+ alignItems: 'center',
893
+ marginLeft: 20,
894
+ }}
895
+ onPress={() => {
896
+ navigation.dispatch(
897
+ StackActions.push(
898
+ ScreenNames.SchedulePayment,
899
+ {
900
+ loan: homeStore.listLoanPending,
901
+ }
902
+ )
903
+ );
904
+ }}
905
+ >
906
+ <IconSchedule />
907
+ <MText
908
+ style={[
909
+ commonStyles.textNormal,
910
+ {
911
+ fontSize: 12,
912
+ fontWeight: '300',
913
+ marginTop: 8,
914
+ },
915
+ ]}
916
+ >
917
+ Lịch dự kiến
918
+ </MText>
919
+ </TouchableOpacity>
920
+ )}
921
+ </View>
922
+ <View
923
+ style={{
924
+ flexDirection: 'row',
925
+ alignItems: 'center',
926
+ backgroundColor: '#FBEFE7',
927
+ marginHorizontal: -16,
928
+ paddingVertical: 8,
929
+ marginTop: 16,
930
+ borderBottomRightRadius: 8,
931
+ borderBottomLeftRadius: 8,
932
+ paddingHorizontal: 16,
933
+ }}
934
+ >
935
+ <Info />
686
936
  <MText
687
937
  style={[
688
- commonStyles.textNormal,
689
938
  {
690
- fontSize: 12,
691
939
  fontWeight: '300',
692
- marginTop: 8,
940
+ fontSize: 10,
941
+ fontStyle: 'italic',
942
+ color: '#333333',
943
+ marginLeft: 8,
693
944
  },
694
945
  ]}
695
946
  >
696
- EKYC
947
+ {homeStore.listLoanPending?.suggestion
948
+ ? homeStore.listLoanPending?.suggestion
949
+ : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
697
950
  </MText>
698
951
  </View>
699
- )}
700
-
701
- <TouchableOpacity
702
- style={{ alignItems: 'center', marginLeft: 20 }}
703
- onPress={() => {
704
- navigation.dispatch(
705
- StackActions.push(ScreenNames.Video, {
706
- loan: homeStore.listLoanPending,
707
- })
708
- );
709
- }}
952
+ </View>
953
+ ) : (
954
+ <ImageBackground
955
+ source={require('../../assets/img/bann.png')}
956
+ style={{ flex: 1, padding: 16 }}
957
+ resizeMode="cover"
958
+ height={220}
959
+ borderRadius={8}
710
960
  >
711
- <IconVideo />
712
961
  <MText
713
- style={[
714
- commonStyles.textNormal,
715
- {
716
- fontSize: 12,
717
- fontWeight: '300',
718
- marginTop: 8,
719
- },
720
- ]}
962
+ style={{
963
+ color: '#333333',
964
+ fontWeight: 'bold',
965
+ fontSize: 12,
966
+ }}
721
967
  >
722
- Quay video
968
+ BẠN ĐỦ ĐIỀU KIỆN VAY TIÊU DÙNG{'\n'}THEO THÔNG TIN
969
+ TÀI SẢN SỞ HỮU
970
+ {'\n'}
971
+ (XE MÁY/ Ô TÔ)
972
+ </MText>
973
+ <MText
974
+ style={{
975
+ marginTop: 12,
976
+ fontSize: 24,
977
+ fontWeight: 'bold',
978
+ color: '#EF4123',
979
+ }}
980
+ >
981
+ {formatMoney(
982
+ homeStore.listLoanPending?.loanAmount
983
+ )}{' '}
984
+ VND
723
985
  </MText>
724
- </TouchableOpacity>
725
-
726
- {homeStore.checkEKYC[
727
- homeStore.listLoanPending?.id
728
- ] ? (
729
986
  <TouchableOpacity
730
- style={{ alignItems: 'center', marginLeft: 20 }}
731
987
  onPress={() => {
732
- signLoan(homeStore.listLoanPending);
988
+ navigation.dispatch(
989
+ StackActions.push(ScreenNames.CIMBxTima, {
990
+ loan: homeStore.listLoanPending,
991
+ })
992
+ );
733
993
  }}
734
994
  >
735
- <IconSign2 />
736
- <MText
737
- style={[
738
- commonStyles.textNormal,
739
- {
740
- fontSize: 12,
741
- fontWeight: '300',
742
- marginTop: 8,
743
- },
744
- ]}
995
+ <LinearGradient
996
+ colors={['#FF7A00', '#EF4123']}
997
+ style={{
998
+ backgroundColor: '#F36D21cd ',
999
+ marginTop: 12,
1000
+ alignItems: 'center',
1001
+ borderRadius: 30,
1002
+ paddingVertical: 10,
1003
+ width: '50%',
1004
+ }}
745
1005
  >
746
- Ký HĐ
747
- </MText>
1006
+ <MText
1007
+ style={{
1008
+ color: '#FFFFFF',
1009
+ fontWeight: 'bold',
1010
+ }}
1011
+ >
1012
+ Hoàn thiện hồ sơ
1013
+ </MText>
1014
+ </LinearGradient>
748
1015
  </TouchableOpacity>
749
- ) : (
750
1016
  <View
751
- style={{ alignItems: 'center', marginLeft: 20 }}
1017
+ style={{
1018
+ flexDirection: 'row',
1019
+ alignItems: 'center',
1020
+ alignContent: 'center',
1021
+ marginTop: 16,
1022
+ }}
752
1023
  >
753
- <SignDisable />
754
- <MText
755
- style={[
756
- commonStyles.textNormal,
757
- {
758
- fontSize: 12,
759
- fontWeight: '300',
760
- marginTop: 8,
761
- },
762
- ]}
763
- >
764
- Ký HĐ
1024
+ <MText style={{ fontSize: 10, color: '#333333' }}>
1025
+ SẢN PHẨM VAY TIÊU DÙNG HỢP TÁC GIỮA{' '}
1026
+ </MText>
1027
+ <LogoSmall />
1028
+ <MText style={{ fontSize: 12, color: '#333333' }}>
1029
+ {' '}
1030
+ VÀ{' '}
765
1031
  </MText>
1032
+ <CIMBSmall />
766
1033
  </View>
767
- )}
768
- </View>
769
- <View
770
- style={{
771
- flexDirection: 'row',
772
- alignItems: 'center',
773
- backgroundColor: '#FBEFE7',
774
- marginHorizontal: -16,
775
- paddingVertical: 8,
776
- marginTop: 16,
777
- borderBottomRightRadius: 8,
778
- borderBottomLeftRadius: 8,
779
- paddingHorizontal: 16,
1034
+ </ImageBackground>
1035
+ )}
1036
+ </View>
1037
+ )}
1038
+ </View>
1039
+ ) : (
1040
+ <View
1041
+ style={{
1042
+ backgroundColor: '#FFFFFF',
1043
+ paddingHorizontal: 16,
1044
+ paddingTop: 16,
1045
+ borderRadius: 8,
1046
+ borderWidth: 0.5,
1047
+ borderColor: '#E0E0E0',
1048
+ }}
1049
+ >
1050
+ <View
1051
+ style={{ flexDirection: 'row', alignItems: 'center' }}
1052
+ >
1053
+ <Contract />
1054
+ <View style={{ flex: 1, paddingLeft: 8 }}>
1055
+ <MText style={commonStyles.textNormalBold}>
1056
+ Đơn vay {homeStore.listLoanPending?.id}
1057
+ </MText>
1058
+ <MText style={commonStyles.textNormal}>
1059
+ Số tiền vay (VND):{' '}
1060
+ {homeStore.listLoanPending?.loanAmount
1061
+ ? formatMoney(homeStore.listLoanPending?.loanAmount)
1062
+ : 'Chưa xác định'}
1063
+ </MText>
1064
+ </View>
1065
+ </View>
1066
+ <View
1067
+ style={{
1068
+ height: 1,
1069
+ backgroundColor: '#E0E0E0',
1070
+ marginVertical: 16,
1071
+ }}
1072
+ />
1073
+ <View
1074
+ style={{
1075
+ flexDirection: 'row',
1076
+ justifyContent: 'space-between',
1077
+ }}
1078
+ >
1079
+ <MText style={commonStyles.textNormal}>Trạng thái</MText>
1080
+ <MText
1081
+ style={[
1082
+ commonStyles.textNormalBold,
1083
+ { color: '#F05123' },
1084
+ ]}
1085
+ >
1086
+ {homeStore?.listLoanPending?.loanStatus}
1087
+ </MText>
1088
+ </View>
1089
+ <View
1090
+ style={{
1091
+ height: 0.5,
1092
+ backgroundColor: '#E0E0E0',
1093
+ marginVertical: 16,
1094
+ }}
1095
+ />
1096
+ <View style={{ flexDirection: 'row' }}>
1097
+ {!homeStore.checkEKYC[homeStore.listLoanPending?.id] ? (
1098
+ <TouchableOpacity
1099
+ style={{ alignItems: 'center' }}
1100
+ onPress={() => {
1101
+ navigation.dispatch(
1102
+ StackActions.push(ScreenNames.NationalID, {
1103
+ loan: homeStore.listLoanPending,
1104
+ reLoan: true,
1105
+ })
1106
+ );
780
1107
  }}
781
1108
  >
782
- <Info />
1109
+ <AddInfo />
783
1110
  <MText
784
1111
  style={[
1112
+ commonStyles.textNormal,
785
1113
  {
1114
+ fontSize: 12,
786
1115
  fontWeight: '300',
1116
+ marginTop: 8,
1117
+ },
1118
+ ]}
1119
+ >
1120
+ EKYC
1121
+ </MText>
1122
+ </TouchableOpacity>
1123
+ ) : (
1124
+ <View style={{ alignItems: 'center' }}>
1125
+ <AddInfoDisable />
1126
+ <MText
1127
+ style={[
1128
+ commonStyles.textNormal,
1129
+ {
787
1130
  fontSize: 12,
788
- fontStyle: 'italic',
789
- color: '#333333',
790
- marginLeft: 8,
1131
+ fontWeight: '300',
1132
+ marginTop: 8,
791
1133
  },
792
1134
  ]}
793
1135
  >
794
- Thực hiện đầy đủ các bước để giải ngân nhanh nhất
1136
+ EKYC
795
1137
  </MText>
796
1138
  </View>
797
- </View>
798
- )}
799
- </>
800
- )}
801
- </View>
802
- <View>
803
- <MText
804
- style={{
805
- fontSize: 16,
806
- fontWeight: 'bold',
807
- marginBottom: 16,
808
- marginTop: 16,
809
- }}
810
- >
811
- Danh sách đơn đang vay
812
- </MText>
813
- {homeStore.listLoan && homeStore.listLoan.length === 0 && (
814
- <View style={{ alignItems: 'center', marginTop: 20 }}>
815
- <MText style={[commonStyles.textNormal]}>
816
- Không có đơn vay
817
- </MText>
818
- </View>
819
- )}
820
- {homeStore?.listLoan &&
821
- homeStore?.listLoan.map((loan, index) => (
822
- <View key={index}>
1139
+ )}
1140
+
823
1141
  <TouchableOpacity
824
- disabled={
825
- loan?.disbursementPartner === 'CIMB' ? false : true
826
- }
827
- style={{
828
- backgroundColor: '#FFFFFF',
829
- paddingHorizontal: 16,
830
- paddingTop: 16,
831
- borderRadius: 8,
832
- borderWidth: 0.5,
833
- borderColor: '#E0E0E0',
834
- marginBottom: 16,
835
- }}
1142
+ style={{ alignItems: 'center', marginLeft: 20 }}
836
1143
  onPress={() => {
837
- if (loan?.disbursementPartner === 'CIMB') {
838
- navigation.dispatch(
839
- StackActions.push(ScreenNames.DetailLoan, {
840
- loan,
841
- })
842
- );
843
- }
1144
+ navigation.dispatch(
1145
+ StackActions.push(ScreenNames.Video, {
1146
+ loan: homeStore.listLoanPending,
1147
+ })
1148
+ );
844
1149
  }}
845
1150
  >
846
- <View
847
- style={{ flexDirection: 'row', alignItems: 'center' }}
848
- >
849
- <ContractActive />
850
- <View style={{ flex: 1, paddingLeft: 8 }}>
851
- <MText style={commonStyles.textNormalBold}>
852
- Đơn vay-{loan?.id}
853
- </MText>
854
- <MText style={commonStyles.textNormal}>
855
- Số tiền vay (VND): {formatMoney(loan?.loanAmount)}
856
- </MText>
857
- </View>
858
- </View>
859
- <View
860
- style={{
861
- height: 1,
862
- backgroundColor: '#E0E0E0',
863
- marginVertical: 16,
864
- }}
865
- />
866
- <View
867
- style={{
868
- flexDirection: 'row',
869
- justifyContent: 'space-between',
870
- }}
871
- >
872
- <MText style={commonStyles.textNormal}>
873
- Ngày giải ngân
874
- </MText>
875
- <MText style={commonStyles.textNormalBold}>
876
- {formatDDMMYYY(loan?.disbursementAt)}
877
- </MText>
878
- </View>
879
- <View
880
- style={{
881
- height: 0.5,
882
- backgroundColor: '#E0E0E0',
883
- marginVertical: 16,
884
- }}
885
- />
886
- <View
887
- style={{
888
- flexDirection: 'row',
889
- justifyContent: 'space-between',
890
- }}
891
- >
892
- <MText style={commonStyles.textNormal}>
893
- Ngày kết thúc khoản vay
894
- </MText>
895
- <MText style={commonStyles.textNormalBold}>
896
- {formatDDMMYYY(loan?.finishAt)}
897
- </MText>
898
- </View>
899
- <View
900
- style={{
901
- height: 0.5,
902
- backgroundColor: '#E0E0E0',
903
- marginVertical: 16,
904
- }}
905
- />
906
- <View
907
- style={{
908
- flexDirection: 'row',
909
- justifyContent: 'space-between',
910
- }}
1151
+ <IconVideo />
1152
+ <MText
1153
+ style={[
1154
+ commonStyles.textNormal,
1155
+ {
1156
+ fontSize: 12,
1157
+ fontWeight: '300',
1158
+ marginTop: 8,
1159
+ },
1160
+ ]}
911
1161
  >
912
- <MText style={commonStyles.textNormal}>
913
- Ngày đến hạn tiếp theo
914
- </MText>
915
- <MText style={commonStyles.textNormalBold}>
916
- {formatDDMMYYY(loan?.nextDate)}
917
- </MText>
918
- </View>
919
- <View
920
- style={{
921
- flexDirection: 'row',
922
- alignItems: 'center',
923
- backgroundColor: '#EAF5E4',
924
- marginHorizontal: -16,
925
- paddingVertical: 8,
926
- marginTop: 16,
927
- borderBottomRightRadius: 8,
928
- borderBottomLeftRadius: 8,
929
- paddingHorizontal: 16,
1162
+ Quay video
1163
+ </MText>
1164
+ </TouchableOpacity>
1165
+
1166
+ {homeStore.checkEKYC[homeStore.listLoanPending?.id] ? (
1167
+ <TouchableOpacity
1168
+ style={{ alignItems: 'center', marginLeft: 20 }}
1169
+ onPress={() => {
1170
+ signLoan(homeStore.listLoanPending);
930
1171
  }}
931
1172
  >
932
- <Info />
1173
+ <IconSign2 />
933
1174
  <MText
934
1175
  style={[
1176
+ commonStyles.textNormal,
935
1177
  {
1178
+ fontSize: 12,
936
1179
  fontWeight: '300',
1180
+ marginTop: 8,
1181
+ },
1182
+ ]}
1183
+ >
1184
+ Ký HĐ
1185
+ </MText>
1186
+ </TouchableOpacity>
1187
+ ) : (
1188
+ <View style={{ alignItems: 'center', marginLeft: 20 }}>
1189
+ <SignDisable />
1190
+ <MText
1191
+ style={[
1192
+ commonStyles.textNormal,
1193
+ {
937
1194
  fontSize: 12,
938
- fontStyle: 'italic',
939
- color: '#333333',
940
- marginLeft: 8,
1195
+ fontWeight: '300',
1196
+ marginTop: 8,
941
1197
  },
942
1198
  ]}
943
1199
  >
944
- Thời gian tất toán còn lại là{' '}
945
- {diffDays(new Date(), loan?.finishAt)} ngày
1200
+
946
1201
  </MText>
947
1202
  </View>
948
- </TouchableOpacity>
1203
+ )}
949
1204
  </View>
950
- ))}
951
- </View>
952
- </View>
953
- </ScrollView>
954
- </>
955
- )}
1205
+ <View
1206
+ style={{
1207
+ flexDirection: 'row',
1208
+ alignItems: 'center',
1209
+ backgroundColor: '#FBEFE7',
1210
+ marginHorizontal: -16,
1211
+ paddingVertical: 8,
1212
+ marginTop: 16,
1213
+ borderBottomRightRadius: 8,
1214
+ borderBottomLeftRadius: 8,
1215
+ paddingHorizontal: 16,
1216
+ }}
1217
+ >
1218
+ <Info />
1219
+ <MText
1220
+ style={[
1221
+ {
1222
+ fontWeight: '300',
1223
+ fontSize: 12,
1224
+ fontStyle: 'italic',
1225
+ color: '#333333',
1226
+ marginLeft: 8,
1227
+ },
1228
+ ]}
1229
+ >
1230
+ Thực hiện đầy đủ các bước để giải ngân nhanh nhất
1231
+ </MText>
1232
+ </View>
1233
+ </View>
1234
+ )}
1235
+ </>
1236
+ )}
1237
+ </View>
1238
+ <View>
1239
+ {homeStore.listLoan && homeStore.listLoan.length > 0 && (
1240
+ <MText
1241
+ style={{
1242
+ fontSize: 16,
1243
+ fontWeight: 'bold',
1244
+ marginBottom: 16,
1245
+ marginTop: 16,
1246
+ }}
1247
+ >
1248
+ Danh sách đơn đang vay
1249
+ </MText>
1250
+ )}
1251
+ {homeStore?.listLoan &&
1252
+ homeStore?.listLoan.map((loan, index) => (
1253
+ <View key={index}>
1254
+ <TouchableOpacity
1255
+ disabled={
1256
+ loan?.disbursementPartner === 'CIMB' ? false : true
1257
+ }
1258
+ style={{
1259
+ backgroundColor: '#FFFFFF',
1260
+ paddingHorizontal: 16,
1261
+ paddingTop: 16,
1262
+ borderRadius: 8,
1263
+ borderWidth: 0.5,
1264
+ borderColor: '#E0E0E0',
1265
+ marginBottom: 16,
1266
+ }}
1267
+ onPress={() => {
1268
+ if (loan?.disbursementPartner === 'CIMB') {
1269
+ navigation.dispatch(
1270
+ StackActions.push(ScreenNames.DetailLoan, {
1271
+ loan,
1272
+ })
1273
+ );
1274
+ }
1275
+ }}
1276
+ >
1277
+ <View
1278
+ style={{ flexDirection: 'row', alignItems: 'center' }}
1279
+ >
1280
+ <ContractActive />
1281
+ <View style={{ flex: 1, paddingLeft: 8 }}>
1282
+ <MText style={commonStyles.textNormalBold}>
1283
+ Đơn vay-{loan?.id}
1284
+ </MText>
1285
+ <MText style={commonStyles.textNormal}>
1286
+ Số tiền vay (VND): {formatMoney(loan?.loanAmount)}
1287
+ </MText>
1288
+ </View>
1289
+ </View>
1290
+ <View
1291
+ style={{
1292
+ height: 1,
1293
+ backgroundColor: '#E0E0E0',
1294
+ marginVertical: 16,
1295
+ }}
1296
+ />
1297
+ <View
1298
+ style={{
1299
+ flexDirection: 'row',
1300
+ justifyContent: 'space-between',
1301
+ }}
1302
+ >
1303
+ <MText style={commonStyles.textNormal}>
1304
+ Ngày giải ngân
1305
+ </MText>
1306
+ <MText style={commonStyles.textNormalBold}>
1307
+ {formatDDMMYYY(loan?.disbursementAt)}
1308
+ </MText>
1309
+ </View>
1310
+ <View
1311
+ style={{
1312
+ height: 0.5,
1313
+ backgroundColor: '#E0E0E0',
1314
+ marginVertical: 16,
1315
+ }}
1316
+ />
1317
+ <View
1318
+ style={{
1319
+ flexDirection: 'row',
1320
+ justifyContent: 'space-between',
1321
+ }}
1322
+ >
1323
+ <MText style={commonStyles.textNormal}>
1324
+ Ngày kết thúc khoản vay
1325
+ </MText>
1326
+ <MText style={commonStyles.textNormalBold}>
1327
+ {formatDDMMYYY(loan?.finishAt)}
1328
+ </MText>
1329
+ </View>
1330
+ <View
1331
+ style={{
1332
+ height: 0.5,
1333
+ backgroundColor: '#E0E0E0',
1334
+ marginVertical: 16,
1335
+ }}
1336
+ />
1337
+ <View
1338
+ style={{
1339
+ flexDirection: 'row',
1340
+ justifyContent: 'space-between',
1341
+ }}
1342
+ >
1343
+ <MText style={commonStyles.textNormal}>
1344
+ Ngày đến hạn tiếp theo
1345
+ </MText>
1346
+ <MText style={commonStyles.textNormalBold}>
1347
+ {formatDDMMYYY(loan?.nextDate)}
1348
+ </MText>
1349
+ </View>
1350
+ <View
1351
+ style={{
1352
+ flexDirection: 'row',
1353
+ alignItems: 'center',
1354
+ backgroundColor: '#EAF5E4',
1355
+ marginHorizontal: -16,
1356
+ paddingVertical: 8,
1357
+ marginTop: 16,
1358
+ borderBottomRightRadius: 8,
1359
+ borderBottomLeftRadius: 8,
1360
+ paddingHorizontal: 16,
1361
+ }}
1362
+ >
1363
+ <Info />
1364
+ <MText
1365
+ style={[
1366
+ {
1367
+ fontWeight: '300',
1368
+ fontSize: 12,
1369
+ fontStyle: 'italic',
1370
+ color: '#333333',
1371
+ marginLeft: 8,
1372
+ },
1373
+ ]}
1374
+ >
1375
+ Thời gian tất toán còn lại là{' '}
1376
+ {diffDays(new Date(), loan?.finishAt)} ngày
1377
+ </MText>
1378
+ </View>
1379
+ </TouchableOpacity>
1380
+ </View>
1381
+ ))}
1382
+ </View>
1383
+ </View>
1384
+ </ScrollView>
1385
+
956
1386
  <Modal
957
1387
  isVisible={showModal}
958
1388
  onDismiss={() => setShowModal(false)}
@@ -986,6 +1416,146 @@ export const Home = observer(function Home() {
986
1416
  </View>
987
1417
  </SafeAreaView>
988
1418
  </Modal>
1419
+ <Modal isVisible={showModal2}>
1420
+ <SafeAreaView style={{ backgroundColor: '#FFFFFF', borderRadius: 8 }}>
1421
+ <View>
1422
+ <Image
1423
+ source={
1424
+ homeStore?.listLoanPending?.isCimbApproveFull === true
1425
+ ? require('./accept.png')
1426
+ : require('./reject.png')
1427
+ }
1428
+ resizeMode="stretch"
1429
+ style={{
1430
+ width: '100%',
1431
+ height: (Dimensions.get('window').height / 2) * 0.8,
1432
+ }}
1433
+ />
1434
+ {homeStore?.listLoanPending?.isCimbApproveFull === true ? (
1435
+ <View style={{ padding: 24 }}>
1436
+ <MText
1437
+ style={{
1438
+ textAlign: 'center',
1439
+ fontWeight: 'bold',
1440
+ fontSize: 16,
1441
+ }}
1442
+ >
1443
+ Chúc mừng bạn!
1444
+ </MText>
1445
+ <MText
1446
+ style={[
1447
+ commonStyles.textNormal,
1448
+ { textAlign: 'center', color: '#828282', marginTop: 8 },
1449
+ ]}
1450
+ >
1451
+ Bạn đã được phê duyệt khoản vay từ CIMB với số tiền là{' '}
1452
+ {formatMoney(homeStore?.listLoanPending?.loanAmount)} VNĐ!
1453
+ </MText>
1454
+ <View
1455
+ style={{
1456
+ flexDirection: 'row',
1457
+ justifyContent: 'center',
1458
+ marginTop: 24,
1459
+ }}
1460
+ >
1461
+ <TouchableOpacity
1462
+ style={{
1463
+ borderWidth: 1,
1464
+ borderColor: color.primary,
1465
+ borderRadius: 30,
1466
+ paddingHorizontal: 48,
1467
+ paddingVertical: 8,
1468
+ }}
1469
+ onPress={() => {
1470
+ setShowModal2(false);
1471
+ navigation.push(ScreenNames.AcceptPolicy, {
1472
+ loan: homeStore?.listLoanPending,
1473
+ isCimb: true,
1474
+ });
1475
+ }}
1476
+ >
1477
+ <MText style={{ color: color.primary }}>Xác nhận</MText>
1478
+ </TouchableOpacity>
1479
+ </View>
1480
+ <TouchableOpacity
1481
+ style={{
1482
+ flexDirection: 'row',
1483
+ justifyContent: 'center',
1484
+ marginTop: 8,
1485
+ }}
1486
+ onPress={async () => {
1487
+ const response = await Api.getInstance().customerCancel({
1488
+ LoanBriefId: homeStore?.listLoanPending?.id,
1489
+ });
1490
+ if (response.kind === 'ok') {
1491
+ if (response.data.meta.errorCode === 200) {
1492
+ setShowModal2(false);
1493
+ const key = `SHOW_${homeStore.listLoanPending.id}`;
1494
+ save(key, true);
1495
+ Alert.alert('Thông báo', 'Huỷ đơn thành công');
1496
+ onRefresh();
1497
+ }
1498
+ } else {
1499
+ Alert.alert('Có lỗi xảy ra. Vui lòng thử lại sau!');
1500
+ }
1501
+ }}
1502
+ >
1503
+ <MText style={{ color: '#BDBDBD' }}>Huỷ</MText>
1504
+ </TouchableOpacity>
1505
+ </View>
1506
+ ) : (
1507
+ <View style={{ padding: 24 }}>
1508
+ <MText
1509
+ style={{
1510
+ color: color.primary,
1511
+ textAlign: 'center',
1512
+ fontWeight: 'bold',
1513
+ }}
1514
+ >
1515
+ Hồ sơ của bạn chưa thỏa mãn điều kiện cho vay của ngân hàng
1516
+ CIMB
1517
+ </MText>
1518
+ <MText
1519
+ style={{
1520
+ textAlign: 'center',
1521
+ marginTop: 8,
1522
+ fontSize: 12,
1523
+ }}
1524
+ >
1525
+ Bạn vui lòng hoàn thiện các bước tiếp theo để được giới thiệu
1526
+ vay qua nhà đầu tư khác.
1527
+ </MText>
1528
+ <View
1529
+ style={{
1530
+ flexDirection: 'row',
1531
+ justifyContent: 'center',
1532
+ marginTop: 24,
1533
+ }}
1534
+ >
1535
+ <TouchableOpacity
1536
+ style={{
1537
+ borderWidth: 1,
1538
+ borderColor: color.primary,
1539
+ borderRadius: 30,
1540
+ paddingHorizontal: 48,
1541
+ paddingVertical: 8,
1542
+ }}
1543
+ onPress={() => {
1544
+ setShowModal2(false);
1545
+ navigation.push(ScreenNames.AcceptPolicy, {
1546
+ loan: homeStore?.listLoanPending,
1547
+ isCimb: false,
1548
+ });
1549
+ }}
1550
+ >
1551
+ <MText style={{ color: color.primary }}>Tiếp tục</MText>
1552
+ </TouchableOpacity>
1553
+ </View>
1554
+ </View>
1555
+ )}
1556
+ </View>
1557
+ </SafeAreaView>
1558
+ </Modal>
989
1559
  </View>
990
1560
  );
991
1561
  });