react-native-timacare 0.0.42 → 0.0.43

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 (39) hide show
  1. package/lib/commonjs/assets/fonts/Be Vietnam Pro Black.ttf +0 -0
  2. package/lib/commonjs/assets/fonts/Be Vietnam Pro Bold.ttf +0 -0
  3. package/lib/commonjs/assets/fonts/Be Vietnam Pro ExtraBold.ttf +0 -0
  4. package/lib/commonjs/assets/fonts/Be Vietnam Pro ExtraLight.ttf +0 -0
  5. package/lib/commonjs/assets/fonts/Be Vietnam Pro Light.ttf +0 -0
  6. package/lib/commonjs/assets/fonts/Be Vietnam Pro Medium.ttf +0 -0
  7. package/lib/commonjs/assets/fonts/Be Vietnam Pro Regular.ttf +0 -0
  8. package/lib/commonjs/assets/fonts/Be Vietnam Pro SemiBold.ttf +0 -0
  9. package/lib/commonjs/assets/fonts/Be Vietnam Pro Thin.ttf +0 -0
  10. package/lib/commonjs/screens/home/index.js +1 -1
  11. package/lib/commonjs/screens/home/index.js.flow +1047 -1043
  12. package/lib/commonjs/screens/home/index.js.map +1 -1
  13. package/lib/commonjs/screens/register/index.js +1 -1
  14. package/lib/commonjs/screens/register/index.js.flow +1 -1
  15. package/lib/module/assets/fonts/Be Vietnam Pro Black.ttf +0 -0
  16. package/lib/module/assets/fonts/Be Vietnam Pro Bold.ttf +0 -0
  17. package/lib/module/assets/fonts/Be Vietnam Pro ExtraBold.ttf +0 -0
  18. package/lib/module/assets/fonts/Be Vietnam Pro ExtraLight.ttf +0 -0
  19. package/lib/module/assets/fonts/Be Vietnam Pro Light.ttf +0 -0
  20. package/lib/module/assets/fonts/Be Vietnam Pro Medium.ttf +0 -0
  21. package/lib/module/assets/fonts/Be Vietnam Pro Regular.ttf +0 -0
  22. package/lib/module/assets/fonts/Be Vietnam Pro SemiBold.ttf +0 -0
  23. package/lib/module/assets/fonts/Be Vietnam Pro Thin.ttf +0 -0
  24. package/lib/module/screens/home/index.js +1 -1
  25. package/lib/module/screens/home/index.js.map +1 -1
  26. package/lib/module/screens/register/index.js +1 -1
  27. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  28. package/package.json +1 -1
  29. package/src/assets/fonts/Be Vietnam Pro Black.ttf +0 -0
  30. package/src/assets/fonts/Be Vietnam Pro Bold.ttf +0 -0
  31. package/src/assets/fonts/Be Vietnam Pro ExtraBold.ttf +0 -0
  32. package/src/assets/fonts/Be Vietnam Pro ExtraLight.ttf +0 -0
  33. package/src/assets/fonts/Be Vietnam Pro Light.ttf +0 -0
  34. package/src/assets/fonts/Be Vietnam Pro Medium.ttf +0 -0
  35. package/src/assets/fonts/Be Vietnam Pro Regular.ttf +0 -0
  36. package/src/assets/fonts/Be Vietnam Pro SemiBold.ttf +0 -0
  37. package/src/assets/fonts/Be Vietnam Pro Thin.ttf +0 -0
  38. package/src/screens/home/index.tsx +1047 -1043
  39. package/src/screens/register/index.tsx +1 -1
@@ -86,10 +86,10 @@ export const Home = observer(function Home() {
86
86
  setIsLoading(true);
87
87
  homeStore.getListLoan();
88
88
  homeStore.getListLoanPending(
89
- async (loan) => {
90
- setLoan(loan);
89
+ async (res) => {
90
+ setLoan(res);
91
91
  homeStore.getCheckEKYC(
92
- { loanBriefId: loan.id },
92
+ { loanBriefId: res.id },
93
93
  (data) => {
94
94
  setCheckEKYC(!data);
95
95
  setIsLoading(false);
@@ -98,13 +98,17 @@ export const Home = observer(function Home() {
98
98
  setIsLoading(false);
99
99
  }
100
100
  );
101
- if (loan.messageErrorCIMB !== '' && loan?.messageErrorCIMB) {
102
- setShowModal(true);
101
+ if (res?.messageErrorCIMB && res.messageErrorCIMB !== '') {
102
+ setTimeout(() => {
103
+ setShowModal(true);
104
+ }, 200);
103
105
  }
104
106
  if (loan?.typeLoan === 4 && loan?.isCimbApproveFull !== null) {
105
107
  const checkShow = await load(`SHOW_${loan?.id}`);
106
108
  if (!checkShow || checkShow !== true) {
107
- setShowModal2(true);
109
+ setTimeout(() => {
110
+ setShowModal2(true);
111
+ }, 200);
108
112
  }
109
113
  }
110
114
  },
@@ -245,7 +249,7 @@ export const Home = observer(function Home() {
245
249
  };
246
250
 
247
251
  useEffect(() => {
248
- return navigation.addListener('state', () => {
252
+ return navigation.addListener('focus', () => {
249
253
  getLocation();
250
254
  });
251
255
  }, [navigation]);
@@ -320,804 +324,420 @@ export const Home = observer(function Home() {
320
324
  <View
321
325
  style={[commonStyles.fill, { backgroundColor: 'white', padding: 16 }]}
322
326
  >
323
- <Observer>
324
- {() => (
325
- <View>
326
- <MText
327
- style={{ fontSize: 16, fontWeight: 'bold', marginBottom: 16 }}
328
- >
329
- Danh sách đơn mới
327
+ <View>
328
+ <MText
329
+ style={{ fontSize: 16, fontWeight: 'bold', marginBottom: 16 }}
330
+ >
331
+ Danh sách đơn mới
332
+ </MText>
333
+ {loan === null ? (
334
+ <View style={{ alignItems: 'center', marginTop: 20 }}>
335
+ <MText style={[commonStyles.textNormal]}>
336
+ Không có đơn vay
330
337
  </MText>
331
- {loan === null ? (
332
- <View style={{ alignItems: 'center', marginTop: 20 }}>
333
- <MText style={[commonStyles.textNormal]}>
334
- Không đơn vay
335
- </MText>
336
- </View>
337
- ) : (
338
- <>
339
- {loan && loan?.isPipelineCIMB ? (
338
+ </View>
339
+ ) : (
340
+ <View>
341
+ {loan?.isPipelineCIMB ? (
342
+ <View>
343
+ {loan?.typeLoan === 4 ? (
340
344
  <View>
341
- {loan?.typeLoan === 4 ? (
345
+ <View
346
+ style={{
347
+ backgroundColor: '#FFFFFF',
348
+ paddingHorizontal: 16,
349
+ paddingTop: 16,
350
+ borderRadius: 8,
351
+ borderWidth: 0.5,
352
+ borderColor: '#E0E0E0',
353
+ }}
354
+ >
342
355
  <View
343
356
  style={{
344
- backgroundColor: '#FFFFFF',
345
- paddingHorizontal: 16,
346
- paddingTop: 16,
347
- borderRadius: 8,
348
- borderWidth: 0.5,
349
- borderColor: '#E0E0E0',
357
+ flexDirection: 'row',
358
+ alignItems: 'center',
350
359
  }}
351
360
  >
352
- <View
353
- style={{
354
- flexDirection: 'row',
355
- alignItems: 'center',
356
- }}
357
- >
358
- <Contract />
359
- <View style={{ flex: 1, paddingLeft: 8 }}>
360
- <MText style={commonStyles.textNormalBold}>
361
- Mã Đơn vay-{loan?.id}
362
- </MText>
363
- <MText style={commonStyles.textNormal}>
364
- Số tiền vay (VND):{' '}
365
- {loan?.loanAmountOffer
366
- ? formatMoney(loan?.loanAmountOffer)
367
- : 'Chưa xác định'}
368
- </MText>
369
- </View>
370
- </View>
371
- <View
372
- style={{
373
- height: 1,
374
- backgroundColor: '#E0E0E0',
375
- marginVertical: 16,
376
- }}
377
- />
378
- <View
379
- style={{
380
- flexDirection: 'row',
381
- justifyContent: 'space-between',
382
- }}
383
- >
384
- <MText style={commonStyles.textNormal}>
385
- Trạng thái
361
+ <Contract />
362
+ <View style={{ flex: 1, paddingLeft: 8 }}>
363
+ <MText style={commonStyles.textNormalBold}>
364
+ Đơn vay-{loan?.id}
386
365
  </MText>
387
- <MText
388
- style={[
389
- commonStyles.textNormalBold,
390
- { color: '#F05123' },
391
- ]}
392
- >
393
- {loan?.loanStatus}
366
+ <MText style={commonStyles.textNormal}>
367
+ Số tiền vay (VND):{' '}
368
+ {loan?.loanAmountOffer
369
+ ? formatMoney(loan?.loanAmountOffer)
370
+ : 'Chưa xác định'}
394
371
  </MText>
395
372
  </View>
396
- <View
397
- style={{
398
- height: 0.5,
399
- backgroundColor: '#E0E0E0',
400
- marginVertical: 16,
401
- }}
402
- />
403
- <View style={{ flexDirection: 'row' }}>
404
- {loan?.loanStatus === null ||
405
- loan?.loanStatus === '' ? (
406
- <MButton
407
- style={{ alignItems: 'center' }}
408
- onPress={() => {
409
- navigation.dispatch(
410
- StackActions.push(ScreenNames.CIMBxTima, {
411
- loan: loan,
412
- })
413
- );
414
- }}
373
+ </View>
374
+ <View
375
+ style={{
376
+ height: 1,
377
+ backgroundColor: '#E0E0E0',
378
+ marginVertical: 16,
379
+ }}
380
+ />
381
+ <View
382
+ style={{
383
+ flexDirection: 'row',
384
+ justifyContent: 'space-between',
385
+ }}
386
+ >
387
+ <MText style={commonStyles.textNormal}>
388
+ Trạng thái
389
+ </MText>
390
+ <MText
391
+ style={[
392
+ commonStyles.textNormalBold,
393
+ { color: '#F05123' },
394
+ ]}
395
+ >
396
+ {loan?.loanStatus}
397
+ </MText>
398
+ </View>
399
+ <View
400
+ style={{
401
+ height: 0.5,
402
+ backgroundColor: '#E0E0E0',
403
+ marginVertical: 16,
404
+ }}
405
+ />
406
+ <View style={{ flexDirection: 'row' }}>
407
+ {loan?.loanStatus === null ||
408
+ loan?.loanStatus === '' ? (
409
+ <MButton
410
+ style={{ alignItems: 'center' }}
411
+ onPress={() => {
412
+ navigation.dispatch(
413
+ StackActions.push(ScreenNames.CIMBxTima, {
414
+ loan: loan,
415
+ })
416
+ );
417
+ }}
418
+ >
419
+ <AddInfo />
420
+ <MText
421
+ style={[
422
+ commonStyles.textNormal,
423
+ {
424
+ fontSize: 12,
425
+ fontWeight: '300',
426
+ marginTop: 8,
427
+ textAlign: 'center',
428
+ },
429
+ ]}
415
430
  >
416
- <AddInfo />
417
- <MText
418
- style={[
419
- commonStyles.textNormal,
420
- {
421
- fontSize: 12,
422
- fontWeight: '300',
423
- marginTop: 8,
424
- textAlign: 'center',
425
- },
426
- ]}
431
+ Hoàn thiện{'\n'}cung cấp thông tin
432
+ </MText>
433
+ </MButton>
434
+ ) : (
435
+ <View>
436
+ {loan?.isUpdateLoan ||
437
+ loan?.isUpdateInformation ? (
438
+ <TouchableOpacity
439
+ style={{ alignItems: 'center' }}
440
+ onPress={() => {
441
+ if (loan?.isUpdateLoan) {
442
+ navigation.dispatch(
443
+ StackActions.push(
444
+ ScreenNames.CimbSelfie,
445
+ {
446
+ loan: loan,
447
+ }
448
+ )
449
+ );
450
+ } else {
451
+ navigation.dispatch(
452
+ StackActions.push(
453
+ ScreenNames.QuickSubmit,
454
+ {
455
+ loan: loan,
456
+ }
457
+ )
458
+ );
459
+ }
460
+ }}
427
461
  >
428
- Hoàn thiện{'\n'}cung cấp thông tin
429
- </MText>
430
- </MButton>
431
- ) : (
432
- <View>
433
- {loan?.isUpdateLoan ||
434
- loan?.isUpdateInformation ? (
435
- <TouchableOpacity
436
- style={{ alignItems: 'center' }}
437
- onPress={() => {
438
- if (loan?.isUpdateLoan) {
439
- navigation.dispatch(
440
- StackActions.push(
441
- ScreenNames.CimbSelfie,
442
- {
443
- loan: loan,
444
- }
445
- )
446
- );
447
- } else {
448
- navigation.dispatch(
449
- StackActions.push(
450
- ScreenNames.QuickSubmit,
451
- {
452
- loan: loan,
453
- }
454
- )
455
- );
456
- }
457
- }}
462
+ <AddInfo />
463
+ <MText
464
+ style={[
465
+ commonStyles.textNormal,
466
+ {
467
+ fontSize: 12,
468
+ fontWeight: '300',
469
+ marginTop: 8,
470
+ textAlign: 'center',
471
+ },
472
+ ]}
458
473
  >
459
- <AddInfo />
460
- <MText
461
- style={[
462
- commonStyles.textNormal,
463
- {
464
- fontSize: 12,
465
- fontWeight: '300',
466
- marginTop: 8,
467
- textAlign: 'center',
468
- },
469
- ]}
470
- >
471
- Hoàn thiện{'\n'}cung cấp thông tin
472
- </MText>
473
- </TouchableOpacity>
474
- ) : (
475
- <View style={{ alignItems: 'center' }}>
476
- <AddInfoDisable />
477
- <MText
478
- style={[
479
- commonStyles.textNormal,
480
- {
481
- fontSize: 12,
482
- fontWeight: '300',
483
- marginTop: 8,
484
- textAlign: 'center',
485
- },
486
- ]}
487
- >
488
- Hoàn thiện{'\n'}cung cấp thông tin
489
- </MText>
490
- </View>
491
- )}
492
- </View>
493
- )}
494
-
495
- {loan?.isSignContract && (
496
- <MButton
497
- style={{
498
- alignItems: 'center',
499
- marginLeft: 20,
500
- }}
501
- onPress={() => {
502
- if (loan?.urlSignContract) {
503
- navigation.dispatch(
504
- StackActions.push(
505
- ScreenNames.CIMBSign,
506
- {
507
- url: loan?.urlSignContract,
508
- }
509
- )
510
- );
511
- } else {
512
- Alert.alert(
513
- 'Thông báo',
514
- 'Bạn chưa thể ký hợp đồng bây giờ?'
515
- );
516
- }
517
- }}
518
- >
519
- <IconSign2 />
520
- <MText
521
- style={[
522
- commonStyles.textNormal,
523
- {
524
- fontSize: 12,
525
- fontWeight: '300',
526
- marginTop: 8,
527
- },
528
- ]}
529
- >
530
- Ký hợp đồng
531
- </MText>
532
- </MButton>
533
- )}
534
- {loan?.isSignContractTima && (
535
- <MButton
536
- style={{
537
- alignItems: 'center',
538
- marginLeft: 20,
539
- }}
540
- onPress={() => {
541
- navigation.dispatch(
542
- StackActions.push(
543
- ScreenNames.ViewContract,
474
+ Hoàn thiện{'\n'}cung cấp thông tin
475
+ </MText>
476
+ </TouchableOpacity>
477
+ ) : (
478
+ <View style={{ alignItems: 'center' }}>
479
+ <AddInfoDisable />
480
+ <MText
481
+ style={[
482
+ commonStyles.textNormal,
544
483
  {
545
- loan: loan,
546
- }
547
- )
548
- );
549
- }}
550
- >
551
- <ContractTimeIcon />
552
- <MText
553
- style={[
554
- commonStyles.textNormal,
555
- {
556
- fontSize: 12,
557
- fontWeight: '300',
558
- marginTop: 8,
559
- textAlign: 'center',
560
- },
561
- ]}
562
- >
563
- Hợp đồng{'\n'}dịch vụ
564
- </MText>
565
- </MButton>
566
- )}
567
- {loan?.paymentEvidenceUrl && (
568
- <MButton
569
- style={{
570
- alignItems: 'center',
571
- marginLeft: 20,
572
- }}
573
- onPress={() => {
484
+ fontSize: 12,
485
+ fontWeight: '300',
486
+ marginTop: 8,
487
+ textAlign: 'center',
488
+ },
489
+ ]}
490
+ >
491
+ Hoàn thiện{'\n'}cung cấp thông tin
492
+ </MText>
493
+ </View>
494
+ )}
495
+ </View>
496
+ )}
497
+
498
+ {loan?.isSignContract && (
499
+ <MButton
500
+ style={{
501
+ alignItems: 'center',
502
+ marginLeft: 20,
503
+ }}
504
+ onPress={() => {
505
+ if (loan?.urlSignContract) {
574
506
  navigation.dispatch(
575
- StackActions.push(
576
- ScreenNames.PaymentEvidence,
577
- {
578
- url: loan?.paymentEvidenceUrl,
579
- }
580
- )
507
+ StackActions.push(ScreenNames.CIMBSign, {
508
+ url: loan?.urlSignContract,
509
+ })
581
510
  );
582
- }}
583
- >
584
- <IconEviden />
585
- <MText
586
- style={[
587
- commonStyles.textNormal,
588
- {
589
- fontSize: 12,
590
- fontWeight: '300',
591
- marginTop: 8,
592
- textAlign: 'center',
593
- },
594
- ]}
595
- >
596
- Mục đích {'\n'}sử dụng
597
- </MText>
598
- </MButton>
599
- )}
600
- {loan?.showPaymentPlan && (
601
- <MButton
602
- style={{
603
- alignItems: 'center',
604
- marginLeft: 20,
605
- }}
606
- onPress={() => {
607
- navigation.dispatch(
608
- StackActions.push(
609
- ScreenNames.SchedulePayment,
610
- {
611
- loan: loan,
612
- }
613
- )
511
+ } else {
512
+ Alert.alert(
513
+ 'Thông báo',
514
+ 'Bạn chưa thể ký hợp đồng bây giờ?'
614
515
  );
615
- }}
516
+ }
517
+ }}
518
+ >
519
+ <IconSign2 />
520
+ <MText
521
+ style={[
522
+ commonStyles.textNormal,
523
+ {
524
+ fontSize: 12,
525
+ fontWeight: '300',
526
+ marginTop: 8,
527
+ },
528
+ ]}
616
529
  >
617
- <IconSchedule />
618
- <MText
619
- style={[
620
- commonStyles.textNormal,
621
- {
622
- fontSize: 12,
623
- fontWeight: '300',
624
- marginTop: 8,
625
- },
626
- ]}
627
- >
628
- Lịch dự kiến
629
- </MText>
630
- </MButton>
631
- )}
632
- </View>
633
-
634
- {loan.messageErrorCIMB !== '' &&
635
- loan?.messageErrorCIMB &&
636
- loan?.isCimbApproveFull === null ? (
637
- <View
530
+ hợp đồng
531
+ </MText>
532
+ </MButton>
533
+ )}
534
+ {loan?.isSignContractTima && (
535
+ <MButton
638
536
  style={{
639
- backgroundColor: '#FBEFE7',
640
- marginHorizontal: -16,
641
- paddingVertical: 8,
642
- marginTop: 16,
643
- borderBottomRightRadius: 8,
644
- borderBottomLeftRadius: 8,
645
- paddingHorizontal: 16,
537
+ alignItems: 'center',
538
+ marginLeft: 20,
539
+ }}
540
+ onPress={() => {
541
+ navigation.dispatch(
542
+ StackActions.push(
543
+ ScreenNames.ViewContract,
544
+ {
545
+ loan: loan,
546
+ }
547
+ )
548
+ );
646
549
  }}
647
550
  >
648
- <View
649
- style={{
650
- flexDirection: 'row',
651
- justifyContent: 'space-between',
652
- alignItems: 'center',
653
- }}
551
+ <ContractTimeIcon />
552
+ <MText
553
+ style={[
554
+ commonStyles.textNormal,
555
+ {
556
+ fontSize: 12,
557
+ fontWeight: '300',
558
+ marginTop: 8,
559
+ textAlign: 'center',
560
+ },
561
+ ]}
654
562
  >
655
- <View
656
- style={{
657
- flex: 1,
658
- flexDirection: 'row',
659
- paddingRight: 20,
660
- }}
661
- >
662
- <Image
663
- source={require('./error.png')}
664
- style={{ width: 16, height: 16 }}
665
- />
666
- <MText style={{ marginLeft: 5 }}>
667
- Đơn vay của bạn gặp gián đoạn, vui lòng
668
- liên hệ tổng đài 1900633688
669
- </MText>
670
- </View>
671
-
672
- <TouchableOpacity
673
- onPress={() => {
674
- Linking.openURL(`tel:1900633688`);
675
- }}
676
- >
677
- <LinearGradient
678
- colors={['#FF8E4F', '#EF592E']}
679
- style={{
680
- paddingHorizontal: 10,
681
- height: 30,
682
- borderRadius: 30,
683
- justifyContent: 'center',
684
- alignItems: 'center',
685
- flexDirection: 'row',
686
- }}
687
- >
688
- <Call />
689
- <MText
690
- style={{
691
- color: 'white',
692
- fontSize: 12,
693
- marginLeft: 5,
694
- }}
695
- >
696
- Liên hệ
697
- </MText>
698
- </LinearGradient>
699
- </TouchableOpacity>
700
- </View>
701
- </View>
702
- ) : (
703
- <View
563
+ Hợp đồng{'\n'}dịch vụ
564
+ </MText>
565
+ </MButton>
566
+ )}
567
+ {loan?.paymentEvidenceUrl && (
568
+ <MButton
704
569
  style={{
705
- flexDirection: 'row',
706
570
  alignItems: 'center',
707
- backgroundColor: '#FBEFE7',
708
- marginHorizontal: -16,
709
- paddingVertical: 8,
710
- marginTop: 16,
711
- borderBottomRightRadius: 8,
712
- borderBottomLeftRadius: 8,
713
- paddingHorizontal: 16,
571
+ marginLeft: 20,
572
+ }}
573
+ onPress={() => {
574
+ navigation.dispatch(
575
+ StackActions.push(
576
+ ScreenNames.PaymentEvidence,
577
+ {
578
+ url: loan?.paymentEvidenceUrl,
579
+ }
580
+ )
581
+ );
714
582
  }}
715
583
  >
716
- <Info />
584
+ <IconEviden />
717
585
  <MText
718
586
  style={[
587
+ commonStyles.textNormal,
719
588
  {
589
+ fontSize: 12,
720
590
  fontWeight: '300',
721
- fontSize: 10,
722
- fontStyle: 'italic',
723
- color: '#333333',
724
- marginLeft: 8,
591
+ marginTop: 8,
592
+ textAlign: 'center',
725
593
  },
726
594
  ]}
727
595
  >
728
- {loan?.suggestion
729
- ? loan?.suggestion
730
- : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
596
+ Mục đích {'\n'}sử dụng
731
597
  </MText>
732
- </View>
598
+ </MButton>
733
599
  )}
734
- </View>
735
- ) : (
736
- <View>
737
- {loan?.loanStatus !== null &&
738
- loan?.loanStatus !== '' ? (
739
- <View
600
+ {loan?.showPaymentPlan && (
601
+ <MButton
740
602
  style={{
741
- backgroundColor: '#FFFFFF',
742
- paddingHorizontal: 16,
743
- paddingTop: 16,
744
- borderRadius: 8,
745
- borderWidth: 0.5,
746
- borderColor: '#E0E0E0',
603
+ alignItems: 'center',
604
+ marginLeft: 20,
605
+ }}
606
+ onPress={() => {
607
+ navigation.dispatch(
608
+ StackActions.push(
609
+ ScreenNames.SchedulePayment,
610
+ {
611
+ loan: loan,
612
+ }
613
+ )
614
+ );
747
615
  }}
748
616
  >
749
- <View
750
- style={{
751
- flexDirection: 'row',
752
- alignItems: 'center',
753
- }}
754
- >
755
- <Contract />
756
- <View style={{ flex: 1, paddingLeft: 8 }}>
757
- <MText style={commonStyles.textNormalBold}>
758
- Mã Đơn vay-{loan?.id}
759
- </MText>
760
- <MText style={commonStyles.textNormal}>
761
- Số tiền vay (VND):{' '}
762
- {loan?.loanAmountOffer
763
- ? formatMoney(loan?.loanAmountOffer)
764
- : 'Chưa xác định'}
765
- </MText>
766
- </View>
767
- </View>
768
- <View
769
- style={{
770
- height: 1,
771
- backgroundColor: '#E0E0E0',
772
- marginVertical: 16,
773
- }}
774
- />
775
- <View
776
- style={{
777
- flexDirection: 'row',
778
- justifyContent: 'space-between',
779
- }}
617
+ <IconSchedule />
618
+ <MText
619
+ style={[
620
+ commonStyles.textNormal,
621
+ {
622
+ fontSize: 12,
623
+ fontWeight: '300',
624
+ marginTop: 8,
625
+ },
626
+ ]}
780
627
  >
781
- <MText style={commonStyles.textNormal}>
782
- Trạng thái
783
- </MText>
784
- <MText
785
- style={[
786
- commonStyles.textNormalBold,
787
- { color: '#F05123' },
788
- ]}
789
- >
790
- {loan?.loanStatus}
791
- </MText>
792
- </View>
793
- <View
794
- style={{
795
- height: 0.5,
796
- backgroundColor: '#E0E0E0',
797
- marginVertical: 16,
798
- }}
799
- />
800
- <View style={{ flexDirection: 'row' }}>
801
- {loan?.isUpdateLoan ||
802
- loan?.isUpdateInformation ? (
803
- <TouchableOpacity
804
- style={{ alignItems: 'center' }}
805
- onPress={() => {
806
- if (loan?.isUpdateLoan) {
807
- navigation.dispatch(
808
- StackActions.push(
809
- ScreenNames.CimbSelfie,
810
- {
811
- loan: loan,
812
- }
813
- )
814
- );
815
- } else {
816
- navigation.dispatch(
817
- StackActions.push(
818
- ScreenNames.QuickSubmit,
819
- {
820
- loan: loan,
821
- }
822
- )
823
- );
824
- }
825
- }}
826
- >
827
- <AddInfo />
828
- <MText
829
- style={[
830
- commonStyles.textNormal,
831
- {
832
- fontSize: 12,
833
- fontWeight: '300',
834
- marginTop: 8,
835
- textAlign: 'center',
836
- },
837
- ]}
838
- >
839
- Hoàn thiện{'\n'}cung cấp thông tin
840
- </MText>
841
- </TouchableOpacity>
842
- ) : (
843
- <View style={{ alignItems: 'center' }}>
844
- <AddInfoDisable />
845
- <MText
846
- style={[
847
- commonStyles.textNormal,
848
- {
849
- fontSize: 12,
850
- fontWeight: '300',
851
- marginTop: 8,
852
- textAlign: 'center',
853
- },
854
- ]}
855
- >
856
- Hoàn thiện{'\n'}cung cấp thông tin
857
- </MText>
858
- </View>
859
- )}
860
- {loan?.isSignContract && (
861
- <TouchableOpacity
862
- style={{
863
- alignItems: 'center',
864
- marginLeft: 20,
865
- }}
866
- onPress={() => {
867
- if (loan?.urlSignContract) {
868
- navigation.dispatch(
869
- StackActions.push(
870
- ScreenNames.CIMBSign,
871
- {
872
- url: loan?.urlSignContract,
873
- }
874
- )
875
- );
876
- } else {
877
- Alert.alert(
878
- 'Thông báo',
879
- 'Bạn chưa thể ký hợp đồng bây giờ?'
880
- );
881
- }
882
- }}
883
- >
884
- <IconSign2 />
885
- <MText
886
- style={[
887
- commonStyles.textNormal,
888
- {
889
- fontSize: 12,
890
- fontWeight: '300',
891
- marginTop: 8,
892
- },
893
- ]}
894
- >
895
- Ký hợp đồng
896
- </MText>
897
- </TouchableOpacity>
898
- )}
899
- {loan?.isSignContractTima && (
900
- <TouchableOpacity
901
- style={{
902
- alignItems: 'center',
903
- marginLeft: 20,
904
- }}
905
- onPress={() => {
906
- navigation.dispatch(
907
- StackActions.push(
908
- ScreenNames.ViewContract,
909
- {
910
- loan: loan,
911
- }
912
- )
913
- );
914
- }}
915
- >
916
- <ContractTimeIcon />
917
- <MText
918
- style={[
919
- commonStyles.textNormal,
920
- {
921
- fontSize: 12,
922
- fontWeight: '300',
923
- marginTop: 8,
924
- textAlign: 'center',
925
- },
926
- ]}
927
- >
928
- Hợp đồng{'\n'}dịch vụ
929
- </MText>
930
- </TouchableOpacity>
931
- )}
932
- {loan?.paymentEvidenceUrl && (
933
- <TouchableOpacity
934
- style={{
935
- alignItems: 'center',
936
- marginLeft: 20,
937
- }}
938
- onPress={() => {
939
- navigation.dispatch(
940
- StackActions.push(
941
- ScreenNames.PaymentEvidence,
942
- {
943
- url: loan?.paymentEvidenceUrl,
944
- }
945
- )
946
- );
947
- }}
948
- >
949
- <IconEviden />
950
- <MText
951
- style={[
952
- commonStyles.textNormal,
953
- {
954
- fontSize: 12,
955
- fontWeight: '300',
956
- marginTop: 8,
957
- textAlign: 'center',
958
- },
959
- ]}
960
- >
961
- Mục đích {'\n'}sử dụng
962
- </MText>
963
- </TouchableOpacity>
964
- )}
965
- {loan?.showPaymentPlan && (
966
- <TouchableOpacity
967
- style={{
968
- alignItems: 'center',
969
- marginLeft: 20,
970
- }}
971
- onPress={() => {
972
- navigation.dispatch(
973
- StackActions.push(
974
- ScreenNames.SchedulePayment,
975
- {
976
- loan: loan,
977
- }
978
- )
979
- );
980
- }}
981
- >
982
- <IconSchedule />
983
- <MText
984
- style={[
985
- commonStyles.textNormal,
986
- {
987
- fontSize: 12,
988
- fontWeight: '300',
989
- marginTop: 8,
990
- },
991
- ]}
992
- >
993
- Lịch dự kiến
994
- </MText>
995
- </TouchableOpacity>
996
- )}
997
- </View>
628
+ Lịch dự kiến
629
+ </MText>
630
+ </MButton>
631
+ )}
632
+ </View>
998
633
 
634
+ {loan.messageErrorCIMB !== '' &&
635
+ loan?.messageErrorCIMB &&
636
+ loan?.isCimbApproveFull === null ? (
637
+ <View
638
+ style={{
639
+ backgroundColor: '#FBEFE7',
640
+ marginHorizontal: -16,
641
+ paddingVertical: 8,
642
+ marginTop: 16,
643
+ borderBottomRightRadius: 8,
644
+ borderBottomLeftRadius: 8,
645
+ paddingHorizontal: 16,
646
+ }}
647
+ >
648
+ <View
649
+ style={{
650
+ flexDirection: 'row',
651
+ justifyContent: 'space-between',
652
+ alignItems: 'center',
653
+ }}
654
+ >
999
655
  <View
1000
656
  style={{
657
+ flex: 1,
1001
658
  flexDirection: 'row',
1002
- alignItems: 'center',
1003
- backgroundColor: '#FBEFE7',
1004
- marginHorizontal: -16,
1005
- paddingVertical: 8,
1006
- marginTop: 16,
1007
- borderBottomRightRadius: 8,
1008
- borderBottomLeftRadius: 8,
1009
- paddingHorizontal: 16,
659
+ paddingRight: 20,
1010
660
  }}
1011
661
  >
1012
- <Info />
1013
- <MText
1014
- style={[
1015
- {
1016
- fontWeight: '300',
1017
- fontSize: 10,
1018
- fontStyle: 'italic',
1019
- color: '#333333',
1020
- marginLeft: 8,
1021
- },
1022
- ]}
1023
- >
1024
- {loan?.suggestion
1025
- ? loan?.suggestion
1026
- : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
662
+ <Image
663
+ source={require('./error.png')}
664
+ style={{ width: 16, height: 16 }}
665
+ />
666
+ <MText style={{ marginLeft: 5 }}>
667
+ Đơn vay của bạn gặp gián đoạn, vui lòng liên
668
+ hệ tổng đài 1900633688
1027
669
  </MText>
1028
670
  </View>
1029
- </View>
1030
- ) : (
1031
- <ImageBackground
1032
- source={require('../../assets/img/bann.png')}
1033
- style={{ flex: 1, padding: 16 }}
1034
- resizeMode="cover"
1035
- height={220}
1036
- borderRadius={8}
1037
- >
1038
- <MText
1039
- style={{
1040
- color: '#333333',
1041
- fontWeight: 'bold',
1042
- fontSize: 12,
1043
- }}
1044
- >
1045
- BẠN ĐỦ ĐIỀU KIỆN VAY TIÊU DÙNG{'\n'}THEO THÔNG
1046
- TIN TÀI SẢN SỞ HỮU
1047
- {'\n'}
1048
- (XE MÁY/ Ô TÔ)
1049
- </MText>
1050
- <MText
1051
- style={{
1052
- marginTop: 12,
1053
- fontSize: 24,
1054
- fontWeight: 'bold',
1055
- color: '#EF4123',
1056
- }}
1057
- >
1058
- {formatMoney(loan?.loanAmount)} VND
1059
- </MText>
671
+
1060
672
  <TouchableOpacity
1061
673
  onPress={() => {
1062
- navigation.dispatch(
1063
- StackActions.push(ScreenNames.CIMBxTima, {
1064
- loan: loan,
1065
- })
1066
- );
674
+ Linking.openURL(`tel:1900633688`);
1067
675
  }}
1068
676
  >
1069
677
  <LinearGradient
1070
- colors={['#FF7A00', '#EF4123']}
678
+ colors={['#FF8E4F', '#EF592E']}
1071
679
  style={{
1072
- backgroundColor: '#F36D21cd ',
1073
- marginTop: 12,
1074
- alignItems: 'center',
680
+ paddingHorizontal: 10,
681
+ height: 30,
1075
682
  borderRadius: 30,
1076
- paddingVertical: 10,
1077
- width: '50%',
683
+ justifyContent: 'center',
684
+ alignItems: 'center',
685
+ flexDirection: 'row',
1078
686
  }}
1079
687
  >
688
+ <Call />
1080
689
  <MText
1081
690
  style={{
1082
- color: '#FFFFFF',
1083
- fontWeight: 'bold',
691
+ color: 'white',
692
+ fontSize: 12,
693
+ marginLeft: 5,
1084
694
  }}
1085
695
  >
1086
- Hoàn thiện hồ sơ
696
+ Liên hệ
1087
697
  </MText>
1088
698
  </LinearGradient>
1089
699
  </TouchableOpacity>
1090
- <View
1091
- style={{
1092
- flexDirection: 'row',
1093
- alignItems: 'center',
1094
- alignContent: 'center',
1095
- marginTop: 16,
1096
- }}
1097
- >
1098
- <MText
1099
- style={{ fontSize: 10, color: '#333333' }}
1100
- >
1101
- SẢN PHẨM VAY TIÊU DÙNG HỢP TÁC GIỮA{' '}
1102
- </MText>
1103
- <LogoSmall />
1104
- <MText
1105
- style={{ fontSize: 12, color: '#333333' }}
1106
- >
1107
- {' '}
1108
- {' '}
1109
- </MText>
1110
- <CIMBSmall />
1111
- </View>
1112
- </ImageBackground>
1113
- )}
1114
- </View>
1115
- )}
700
+ </View>
701
+ </View>
702
+ ) : (
703
+ <View
704
+ style={{
705
+ flexDirection: 'row',
706
+ alignItems: 'center',
707
+ backgroundColor: '#FBEFE7',
708
+ marginHorizontal: -16,
709
+ paddingVertical: 8,
710
+ marginTop: 16,
711
+ borderBottomRightRadius: 8,
712
+ borderBottomLeftRadius: 8,
713
+ paddingHorizontal: 16,
714
+ }}
715
+ >
716
+ <Info />
717
+ <MText
718
+ style={[
719
+ {
720
+ fontWeight: '300',
721
+ fontSize: 10,
722
+ fontStyle: 'italic',
723
+ color: '#333333',
724
+ marginLeft: 8,
725
+ },
726
+ ]}
727
+ >
728
+ {loan?.suggestion
729
+ ? loan?.suggestion
730
+ : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
731
+ </MText>
732
+ </View>
733
+ )}
734
+ </View>
1116
735
  </View>
1117
736
  ) : (
1118
- <Observer>
1119
- {() => (
1120
- <View>
737
+ <View>
738
+ <View>
739
+ {loan?.loanStatus !== null &&
740
+ loan?.loanStatus !== '' ? (
1121
741
  <View
1122
742
  style={{
1123
743
  backgroundColor: '#FFFFFF',
@@ -1137,12 +757,12 @@ export const Home = observer(function Home() {
1137
757
  <Contract />
1138
758
  <View style={{ flex: 1, paddingLeft: 8 }}>
1139
759
  <MText style={commonStyles.textNormalBold}>
1140
- Đơn vay {loan?.id}
760
+ Đơn vay-{loan?.id}
1141
761
  </MText>
1142
762
  <MText style={commonStyles.textNormal}>
1143
763
  Số tiền vay (VND):{' '}
1144
- {loan?.loanAmount
1145
- ? formatMoney(loan?.loanAmount)
764
+ {loan?.loanAmountOffer
765
+ ? formatMoney(loan?.loanAmountOffer)
1146
766
  : 'Chưa xác định'}
1147
767
  </MText>
1148
768
  </View>
@@ -1180,22 +800,122 @@ export const Home = observer(function Home() {
1180
800
  }}
1181
801
  />
1182
802
  <View style={{ flexDirection: 'row' }}>
1183
- {!checkEKYC ? (
803
+ {loan?.isUpdateLoan ||
804
+ loan?.isUpdateInformation ? (
1184
805
  <TouchableOpacity
1185
806
  style={{ alignItems: 'center' }}
807
+ onPress={() => {
808
+ if (loan?.isUpdateLoan) {
809
+ navigation.dispatch(
810
+ StackActions.push(
811
+ ScreenNames.CimbSelfie,
812
+ {
813
+ loan: loan,
814
+ }
815
+ )
816
+ );
817
+ } else {
818
+ navigation.dispatch(
819
+ StackActions.push(
820
+ ScreenNames.QuickSubmit,
821
+ {
822
+ loan: loan,
823
+ }
824
+ )
825
+ );
826
+ }
827
+ }}
828
+ >
829
+ <AddInfo />
830
+ <MText
831
+ style={[
832
+ commonStyles.textNormal,
833
+ {
834
+ fontSize: 12,
835
+ fontWeight: '300',
836
+ marginTop: 8,
837
+ textAlign: 'center',
838
+ },
839
+ ]}
840
+ >
841
+ Hoàn thiện{'\n'}cung cấp thông tin
842
+ </MText>
843
+ </TouchableOpacity>
844
+ ) : (
845
+ <View style={{ alignItems: 'center' }}>
846
+ <AddInfoDisable />
847
+ <MText
848
+ style={[
849
+ commonStyles.textNormal,
850
+ {
851
+ fontSize: 12,
852
+ fontWeight: '300',
853
+ marginTop: 8,
854
+ textAlign: 'center',
855
+ },
856
+ ]}
857
+ >
858
+ Hoàn thiện{'\n'}cung cấp thông tin
859
+ </MText>
860
+ </View>
861
+ )}
862
+ {loan?.isSignContract && (
863
+ <TouchableOpacity
864
+ style={{
865
+ alignItems: 'center',
866
+ marginLeft: 20,
867
+ }}
868
+ onPress={() => {
869
+ if (loan?.urlSignContract) {
870
+ navigation.dispatch(
871
+ StackActions.push(
872
+ ScreenNames.CIMBSign,
873
+ {
874
+ url: loan?.urlSignContract,
875
+ }
876
+ )
877
+ );
878
+ } else {
879
+ Alert.alert(
880
+ 'Thông báo',
881
+ 'Bạn chưa thể ký hợp đồng bây giờ?'
882
+ );
883
+ }
884
+ }}
885
+ >
886
+ <IconSign2 />
887
+ <MText
888
+ style={[
889
+ commonStyles.textNormal,
890
+ {
891
+ fontSize: 12,
892
+ fontWeight: '300',
893
+ marginTop: 8,
894
+ },
895
+ ]}
896
+ >
897
+ Ký hợp đồng
898
+ </MText>
899
+ </TouchableOpacity>
900
+ )}
901
+ {loan?.isSignContractTima && (
902
+ <TouchableOpacity
903
+ style={{
904
+ alignItems: 'center',
905
+ marginLeft: 20,
906
+ }}
1186
907
  onPress={() => {
1187
908
  navigation.dispatch(
1188
909
  StackActions.push(
1189
- ScreenNames.NationalID,
910
+ ScreenNames.ViewContract,
1190
911
  {
1191
912
  loan: loan,
1192
- reLoan: true,
1193
913
  }
1194
914
  )
1195
915
  );
1196
916
  }}
1197
917
  >
1198
- <AddInfo />
918
+ <ContractTimeIcon />
1199
919
  <MText
1200
920
  style={[
1201
921
  commonStyles.textNormal,
@@ -1203,15 +923,32 @@ export const Home = observer(function Home() {
1203
923
  fontSize: 12,
1204
924
  fontWeight: '300',
1205
925
  marginTop: 8,
926
+ textAlign: 'center',
1206
927
  },
1207
928
  ]}
1208
929
  >
1209
- EKYC
930
+ Hợp đồng{'\n'}dịch vụ
1210
931
  </MText>
1211
932
  </TouchableOpacity>
1212
- ) : (
1213
- <View style={{ alignItems: 'center' }}>
1214
- <AddInfoDisable />
933
+ )}
934
+ {loan?.paymentEvidenceUrl && (
935
+ <TouchableOpacity
936
+ style={{
937
+ alignItems: 'center',
938
+ marginLeft: 20,
939
+ }}
940
+ onPress={() => {
941
+ navigation.dispatch(
942
+ StackActions.push(
943
+ ScreenNames.PaymentEvidence,
944
+ {
945
+ url: loan?.paymentEvidenceUrl,
946
+ }
947
+ )
948
+ );
949
+ }}
950
+ >
951
+ <IconEviden />
1215
952
  <MText
1216
953
  style={[
1217
954
  commonStyles.textNormal,
@@ -1219,53 +956,32 @@ export const Home = observer(function Home() {
1219
956
  fontSize: 12,
1220
957
  fontWeight: '300',
1221
958
  marginTop: 8,
959
+ textAlign: 'center',
1222
960
  },
1223
961
  ]}
1224
962
  >
1225
- EKYC
963
+ Mục đích {'\n'}sử dụng
1226
964
  </MText>
1227
- </View>
965
+ </TouchableOpacity>
1228
966
  )}
1229
-
1230
- <TouchableOpacity
1231
- style={{
1232
- alignItems: 'center',
1233
- marginLeft: 20,
1234
- }}
1235
- onPress={() => {
1236
- navigation.dispatch(
1237
- StackActions.push(ScreenNames.Video, {
1238
- loan: loan,
1239
- })
1240
- );
1241
- }}
1242
- >
1243
- <IconVideo />
1244
- <MText
1245
- style={[
1246
- commonStyles.textNormal,
1247
- {
1248
- fontSize: 12,
1249
- fontWeight: '300',
1250
- marginTop: 8,
1251
- },
1252
- ]}
1253
- >
1254
- Quay video
1255
- </MText>
1256
- </TouchableOpacity>
1257
-
1258
- {checkEKYC ? (
967
+ {loan?.showPaymentPlan && (
1259
968
  <TouchableOpacity
1260
969
  style={{
1261
970
  alignItems: 'center',
1262
971
  marginLeft: 20,
1263
972
  }}
1264
973
  onPress={() => {
1265
- signLoan(loan);
974
+ navigation.dispatch(
975
+ StackActions.push(
976
+ ScreenNames.SchedulePayment,
977
+ {
978
+ loan: loan,
979
+ }
980
+ )
981
+ );
1266
982
  }}
1267
983
  >
1268
- <IconSign2 />
984
+ <IconSchedule />
1269
985
  <MText
1270
986
  style={[
1271
987
  commonStyles.textNormal,
@@ -1276,71 +992,353 @@ export const Home = observer(function Home() {
1276
992
  },
1277
993
  ]}
1278
994
  >
1279
-
995
+ Lịch dự kiến
1280
996
  </MText>
1281
997
  </TouchableOpacity>
1282
- ) : (
1283
- <View
998
+ )}
999
+ </View>
1000
+
1001
+ <View
1002
+ style={{
1003
+ flexDirection: 'row',
1004
+ alignItems: 'center',
1005
+ backgroundColor: '#FBEFE7',
1006
+ marginHorizontal: -16,
1007
+ paddingVertical: 8,
1008
+ marginTop: 16,
1009
+ borderBottomRightRadius: 8,
1010
+ borderBottomLeftRadius: 8,
1011
+ paddingHorizontal: 16,
1012
+ }}
1013
+ >
1014
+ <Info />
1015
+ <MText
1016
+ style={[
1017
+ {
1018
+ fontWeight: '300',
1019
+ fontSize: 10,
1020
+ fontStyle: 'italic',
1021
+ color: '#333333',
1022
+ marginLeft: 8,
1023
+ },
1024
+ ]}
1025
+ >
1026
+ {loan?.suggestion
1027
+ ? loan?.suggestion
1028
+ : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
1029
+ </MText>
1030
+ </View>
1031
+ </View>
1032
+ ) : (
1033
+ <ImageBackground
1034
+ source={require('../../assets/img/bann.png')}
1035
+ style={{ flex: 1, padding: 16 }}
1036
+ resizeMode="cover"
1037
+ height={220}
1038
+ borderRadius={8}
1039
+ >
1040
+ <MText
1041
+ style={{
1042
+ color: '#333333',
1043
+ fontWeight: 'bold',
1044
+ fontSize: 12,
1045
+ }}
1046
+ >
1047
+ BẠN ĐỦ ĐIỀU KIỆN VAY TIÊU DÙNG{'\n'}THEO THÔNG
1048
+ TIN TÀI SẢN SỞ HỮU
1049
+ {'\n'}
1050
+ (XE MÁY/ Ô TÔ)
1051
+ </MText>
1052
+ <MText
1053
+ style={{
1054
+ marginTop: 12,
1055
+ fontSize: 24,
1056
+ fontWeight: 'bold',
1057
+ color: '#EF4123',
1058
+ }}
1059
+ >
1060
+ {formatMoney(loan?.loanAmount)} VND
1061
+ </MText>
1062
+ <TouchableOpacity
1063
+ onPress={() => {
1064
+ navigation.dispatch(
1065
+ StackActions.push(ScreenNames.CIMBxTima, {
1066
+ loan: loan,
1067
+ })
1068
+ );
1069
+ }}
1070
+ >
1071
+ <LinearGradient
1072
+ colors={['#FF7A00', '#EF4123']}
1073
+ style={{
1074
+ backgroundColor: '#F36D21cd ',
1075
+ marginTop: 12,
1076
+ alignItems: 'center',
1077
+ borderRadius: 30,
1078
+ paddingVertical: 10,
1079
+ width: '50%',
1080
+ }}
1081
+ >
1082
+ <MText
1284
1083
  style={{
1285
- alignItems: 'center',
1286
- marginLeft: 20,
1084
+ color: '#FFFFFF',
1085
+ fontWeight: 'bold',
1287
1086
  }}
1288
1087
  >
1289
- <SignDisable />
1290
- <MText
1291
- style={[
1292
- commonStyles.textNormal,
1293
- {
1294
- fontSize: 12,
1295
- fontWeight: '300',
1296
- marginTop: 8,
1297
- },
1298
- ]}
1299
- >
1300
- Ký HĐ
1301
- </MText>
1302
- </View>
1303
- )}
1304
- </View>
1088
+ Hoàn thiện hồ sơ
1089
+ </MText>
1090
+ </LinearGradient>
1091
+ </TouchableOpacity>
1305
1092
  <View
1306
1093
  style={{
1307
1094
  flexDirection: 'row',
1308
1095
  alignItems: 'center',
1309
- backgroundColor: '#FBEFE7',
1310
- marginHorizontal: -16,
1311
- paddingVertical: 8,
1096
+ alignContent: 'center',
1312
1097
  marginTop: 16,
1313
- borderBottomRightRadius: 8,
1314
- borderBottomLeftRadius: 8,
1315
- paddingHorizontal: 16,
1316
1098
  }}
1317
1099
  >
1318
- <Info />
1100
+ <MText
1101
+ style={{ fontSize: 10, color: '#333333' }}
1102
+ >
1103
+ SẢN PHẨM VAY TIÊU DÙNG HỢP TÁC GIỮA{' '}
1104
+ </MText>
1105
+ <LogoSmall />
1106
+ <MText
1107
+ style={{ fontSize: 12, color: '#333333' }}
1108
+ >
1109
+ {' '}
1110
+ VÀ{' '}
1111
+ </MText>
1112
+ <CIMBSmall />
1113
+ </View>
1114
+ </ImageBackground>
1115
+ )}
1116
+ </View>
1117
+ </View>
1118
+ )}
1119
+ </View>
1120
+ ) : (
1121
+ <Observer>
1122
+ {() => (
1123
+ <View>
1124
+ <View
1125
+ style={{
1126
+ backgroundColor: '#FFFFFF',
1127
+ paddingHorizontal: 16,
1128
+ paddingTop: 16,
1129
+ borderRadius: 8,
1130
+ borderWidth: 0.5,
1131
+ borderColor: '#E0E0E0',
1132
+ }}
1133
+ >
1134
+ <View
1135
+ style={{
1136
+ flexDirection: 'row',
1137
+ alignItems: 'center',
1138
+ }}
1139
+ >
1140
+ <Contract />
1141
+ <View style={{ flex: 1, paddingLeft: 8 }}>
1142
+ <MText style={commonStyles.textNormalBold}>
1143
+ Đơn vay {loan?.id}
1144
+ </MText>
1145
+ <MText style={commonStyles.textNormal}>
1146
+ Số tiền vay (VND):{' '}
1147
+ {loan?.loanAmount
1148
+ ? formatMoney(loan?.loanAmount)
1149
+ : 'Chưa xác định'}
1150
+ </MText>
1151
+ </View>
1152
+ </View>
1153
+ <View
1154
+ style={{
1155
+ height: 1,
1156
+ backgroundColor: '#E0E0E0',
1157
+ marginVertical: 16,
1158
+ }}
1159
+ />
1160
+ <View
1161
+ style={{
1162
+ flexDirection: 'row',
1163
+ justifyContent: 'space-between',
1164
+ }}
1165
+ >
1166
+ <MText style={commonStyles.textNormal}>
1167
+ Trạng thái
1168
+ </MText>
1169
+ <MText
1170
+ style={[
1171
+ commonStyles.textNormalBold,
1172
+ { color: '#F05123' },
1173
+ ]}
1174
+ >
1175
+ {loan?.loanStatus}
1176
+ </MText>
1177
+ </View>
1178
+ <View
1179
+ style={{
1180
+ height: 0.5,
1181
+ backgroundColor: '#E0E0E0',
1182
+ marginVertical: 16,
1183
+ }}
1184
+ />
1185
+ <View style={{ flexDirection: 'row' }}>
1186
+ {!checkEKYC ? (
1187
+ <TouchableOpacity
1188
+ style={{ alignItems: 'center' }}
1189
+ onPress={() => {
1190
+ navigation.dispatch(
1191
+ StackActions.push(ScreenNames.NationalID, {
1192
+ loan: loan,
1193
+ reLoan: true,
1194
+ })
1195
+ );
1196
+ }}
1197
+ >
1198
+ <AddInfo />
1319
1199
  <MText
1320
1200
  style={[
1201
+ commonStyles.textNormal,
1321
1202
  {
1203
+ fontSize: 12,
1322
1204
  fontWeight: '300',
1205
+ marginTop: 8,
1206
+ },
1207
+ ]}
1208
+ >
1209
+ EKYC
1210
+ </MText>
1211
+ </TouchableOpacity>
1212
+ ) : (
1213
+ <View style={{ alignItems: 'center' }}>
1214
+ <AddInfoDisable />
1215
+ <MText
1216
+ style={[
1217
+ commonStyles.textNormal,
1218
+ {
1323
1219
  fontSize: 12,
1324
- fontStyle: 'italic',
1325
- color: '#333333',
1326
- marginLeft: 8,
1220
+ fontWeight: '300',
1221
+ marginTop: 8,
1327
1222
  },
1328
1223
  ]}
1329
1224
  >
1330
- Thực hiện đầy đủ các bước để giải ngân nhanh
1331
- nhất
1225
+ EKYC
1332
1226
  </MText>
1333
1227
  </View>
1334
- </View>
1228
+ )}
1229
+
1230
+ <TouchableOpacity
1231
+ style={{
1232
+ alignItems: 'center',
1233
+ marginLeft: 20,
1234
+ }}
1235
+ onPress={() => {
1236
+ navigation.dispatch(
1237
+ StackActions.push(ScreenNames.Video, {
1238
+ loan: loan,
1239
+ })
1240
+ );
1241
+ }}
1242
+ >
1243
+ <IconVideo />
1244
+ <MText
1245
+ style={[
1246
+ commonStyles.textNormal,
1247
+ {
1248
+ fontSize: 12,
1249
+ fontWeight: '300',
1250
+ marginTop: 8,
1251
+ },
1252
+ ]}
1253
+ >
1254
+ Quay video
1255
+ </MText>
1256
+ </TouchableOpacity>
1257
+
1258
+ {checkEKYC ? (
1259
+ <TouchableOpacity
1260
+ style={{
1261
+ alignItems: 'center',
1262
+ marginLeft: 20,
1263
+ }}
1264
+ onPress={() => {
1265
+ signLoan(loan);
1266
+ }}
1267
+ >
1268
+ <IconSign2 />
1269
+ <MText
1270
+ style={[
1271
+ commonStyles.textNormal,
1272
+ {
1273
+ fontSize: 12,
1274
+ fontWeight: '300',
1275
+ marginTop: 8,
1276
+ },
1277
+ ]}
1278
+ >
1279
+ Ký HĐ
1280
+ </MText>
1281
+ </TouchableOpacity>
1282
+ ) : (
1283
+ <View
1284
+ style={{
1285
+ alignItems: 'center',
1286
+ marginLeft: 20,
1287
+ }}
1288
+ >
1289
+ <SignDisable />
1290
+ <MText
1291
+ style={[
1292
+ commonStyles.textNormal,
1293
+ {
1294
+ fontSize: 12,
1295
+ fontWeight: '300',
1296
+ marginTop: 8,
1297
+ },
1298
+ ]}
1299
+ >
1300
+ Ký HĐ
1301
+ </MText>
1302
+ </View>
1303
+ )}
1304
+ </View>
1305
+ <View
1306
+ style={{
1307
+ flexDirection: 'row',
1308
+ alignItems: 'center',
1309
+ backgroundColor: '#FBEFE7',
1310
+ marginHorizontal: -16,
1311
+ paddingVertical: 8,
1312
+ marginTop: 16,
1313
+ borderBottomRightRadius: 8,
1314
+ borderBottomLeftRadius: 8,
1315
+ paddingHorizontal: 16,
1316
+ }}
1317
+ >
1318
+ <Info />
1319
+ <MText
1320
+ style={[
1321
+ {
1322
+ fontWeight: '300',
1323
+ fontSize: 12,
1324
+ fontStyle: 'italic',
1325
+ color: '#333333',
1326
+ marginLeft: 8,
1327
+ },
1328
+ ]}
1329
+ >
1330
+ Thực hiện đầy đủ các bước để giải ngân nhanh nhất
1331
+ </MText>
1335
1332
  </View>
1336
- )}
1337
- </Observer>
1333
+ </View>
1334
+ </View>
1338
1335
  )}
1339
- </>
1336
+ </Observer>
1340
1337
  )}
1341
1338
  </View>
1342
1339
  )}
1343
- </Observer>
1340
+ </View>
1341
+
1344
1342
  <Observer>
1345
1343
  {() => (
1346
1344
  <View>
@@ -1491,255 +1489,261 @@ export const Home = observer(function Home() {
1491
1489
  )}
1492
1490
  </Observer>
1493
1491
  </View>
1494
- </ScrollView>
1495
- <Modal isVisible={showModal}>
1496
- <SafeAreaView style={{ backgroundColor: '#FFFFFF', borderRadius: 6 }}>
1497
- <View style={{ flexDirection: 'row-reverse' }}>
1498
- <TouchableOpacity
1499
- onPress={() => setShowModal(false)}
1492
+ <Modal isVisible={showModal}>
1493
+ <SafeAreaView style={{ backgroundColor: '#FFFFFF', borderRadius: 6 }}>
1494
+ <View style={{ flexDirection: 'row-reverse' }}>
1495
+ <TouchableOpacity
1496
+ onPress={() => setShowModal(false)}
1497
+ style={{
1498
+ width: 40,
1499
+ height: 40,
1500
+ justifyContent: 'center',
1501
+ alignItems: 'center',
1502
+ }}
1503
+ >
1504
+ <Image
1505
+ source={require('./close.png')}
1506
+ style={{
1507
+ width: 24,
1508
+ height: 24,
1509
+ resizeMode: 'contain',
1510
+ }}
1511
+ />
1512
+ </TouchableOpacity>
1513
+ </View>
1514
+ <View
1500
1515
  style={{
1501
- width: 40,
1502
- height: 40,
1503
1516
  justifyContent: 'center',
1504
1517
  alignItems: 'center',
1518
+ paddingVertical: 16,
1505
1519
  }}
1506
1520
  >
1507
1521
  <Image
1508
- source={require('./close.png')}
1522
+ source={require('./Frame.png')}
1509
1523
  style={{
1510
- width: 24,
1511
- height: 24,
1524
+ width: 181,
1525
+ height: 160,
1512
1526
  resizeMode: 'contain',
1513
1527
  }}
1514
1528
  />
1515
- </TouchableOpacity>
1516
- </View>
1517
- <View
1518
- style={{
1519
- justifyContent: 'center',
1520
- alignItems: 'center',
1521
- paddingVertical: 16,
1522
- }}
1523
- >
1524
- <Image
1525
- source={require('./Frame.png')}
1529
+ </View>
1530
+ <MText
1526
1531
  style={{
1527
- width: 181,
1528
- height: 160,
1529
- resizeMode: 'contain',
1530
- }}
1531
- />
1532
- </View>
1533
- <MText
1534
- style={{
1535
- textAlign: 'center',
1536
- fontSize: 16,
1537
- fontWeight: 'bold',
1538
- }}
1539
- >
1540
- Cảnh báo!!!
1541
- </MText>
1542
- <MText
1543
- style={{
1544
- textAlign: 'center',
1545
- color: '#828282',
1546
- paddingVertical: 5,
1547
- }}
1548
- >
1549
- Đơn vay của bạn đang gặp gián đoạn,{'\n'}vui lòng liên hệ tổng đài
1550
- 1900.633.688
1551
- </MText>
1552
- <View
1553
- style={{
1554
- flexDirection: 'row',
1555
- justifyContent: 'center',
1556
- marginVertical: 24,
1557
- }}
1558
- >
1559
- <TouchableOpacity
1560
- onPress={() => {
1561
- Linking.openURL(`tel:1900633688`);
1532
+ textAlign: 'center',
1533
+ fontSize: 16,
1534
+ fontWeight: 'bold',
1562
1535
  }}
1536
+ >
1537
+ Cảnh báo!!!
1538
+ </MText>
1539
+ <MText
1563
1540
  style={{
1564
- paddingHorizontal: 50,
1565
- alignItems: 'center',
1566
- borderWidth: 1,
1567
- borderRadius: 30,
1568
- borderColor: '#EF592E',
1569
- height: 40,
1570
- justifyContent: 'center',
1541
+ textAlign: 'center',
1542
+ color: '#828282',
1543
+ paddingVertical: 5,
1571
1544
  }}
1572
1545
  >
1573
- <MText style={{ color: '#EF592E', fontSize: 16 }}>Liên hệ</MText>
1574
- </TouchableOpacity>
1575
- </View>
1576
- </SafeAreaView>
1577
- </Modal>
1578
- <Modal isVisible={showModal2}>
1579
- <SafeAreaView style={{ backgroundColor: '#FFFFFF', borderRadius: 8 }}>
1580
- <View>
1581
- <Image
1582
- source={
1583
- loan?.isCimbApproveFull === true
1584
- ? require('./accept.png')
1585
- : require('./reject.png')
1586
- }
1587
- resizeMode="stretch"
1546
+ Đơn vay của bạn đang gặp gián đoạn,{'\n'}vui lòng liên hệ tổng đài
1547
+ 1900.633.688
1548
+ </MText>
1549
+ <View
1588
1550
  style={{
1589
- width: '100%',
1590
- height: (Dimensions.get('window').height / 2) * 0.8,
1551
+ flexDirection: 'row',
1552
+ justifyContent: 'center',
1553
+ marginVertical: 24,
1591
1554
  }}
1592
- />
1593
- {loan?.isCimbApproveFull === true ? (
1594
- <View style={{ padding: 24 }}>
1595
- <MText
1596
- style={{
1597
- textAlign: 'center',
1598
- fontWeight: 'bold',
1599
- fontSize: 16,
1600
- }}
1601
- >
1602
- Chúc mừng bạn!
1603
- </MText>
1604
- <MText
1605
- style={[
1606
- commonStyles.textNormal,
1607
- { textAlign: 'center', color: '#828282', marginTop: 8 },
1608
- ]}
1609
- >
1610
- Bạn đã được phê duyệt khoản vay từ CIMB với số tiền là{' '}
1611
- {formatMoney(loan?.loanAmount)} VNĐ!
1555
+ >
1556
+ <TouchableOpacity
1557
+ onPress={() => {
1558
+ Linking.openURL(`tel:1900633688`);
1559
+ }}
1560
+ style={{
1561
+ paddingHorizontal: 50,
1562
+ alignItems: 'center',
1563
+ borderWidth: 1,
1564
+ borderRadius: 30,
1565
+ borderColor: '#EF592E',
1566
+ height: 40,
1567
+ justifyContent: 'center',
1568
+ }}
1569
+ >
1570
+ <MText style={{ color: '#EF592E', fontSize: 16 }}>
1571
+ Liên hệ
1612
1572
  </MText>
1613
- <View
1614
- style={{
1615
- flexDirection: 'row',
1616
- justifyContent: 'center',
1617
- marginTop: 24,
1618
- }}
1619
- >
1573
+ </TouchableOpacity>
1574
+ </View>
1575
+ </SafeAreaView>
1576
+ </Modal>
1577
+ <Modal isVisible={showModal2}>
1578
+ <SafeAreaView style={{ backgroundColor: '#FFFFFF', borderRadius: 8 }}>
1579
+ <View>
1580
+ <Image
1581
+ source={
1582
+ loan?.isCimbApproveFull === true
1583
+ ? require('./accept.png')
1584
+ : require('./reject.png')
1585
+ }
1586
+ resizeMode="stretch"
1587
+ style={{
1588
+ width: '100%',
1589
+ height: (Dimensions.get('window').height / 2) * 0.8,
1590
+ }}
1591
+ />
1592
+ {loan?.isCimbApproveFull === true ? (
1593
+ <View style={{ padding: 24 }}>
1594
+ <MText
1595
+ style={{
1596
+ textAlign: 'center',
1597
+ fontWeight: 'bold',
1598
+ fontSize: 16,
1599
+ }}
1600
+ >
1601
+ Chúc mừng bạn!
1602
+ </MText>
1603
+ <MText
1604
+ style={[
1605
+ commonStyles.textNormal,
1606
+ { textAlign: 'center', color: '#828282', marginTop: 8 },
1607
+ ]}
1608
+ >
1609
+ Bạn đã được phê duyệt khoản vay từ CIMB với số tiền là{' '}
1610
+ {formatMoney(loan?.loanAmount)} VNĐ!
1611
+ </MText>
1612
+ <View
1613
+ style={{
1614
+ flexDirection: 'row',
1615
+ justifyContent: 'center',
1616
+ marginTop: 24,
1617
+ }}
1618
+ >
1619
+ <TouchableOpacity
1620
+ style={{
1621
+ borderWidth: 1,
1622
+ borderColor: color.primary,
1623
+ borderRadius: 30,
1624
+ paddingHorizontal: 48,
1625
+ paddingVertical: 8,
1626
+ }}
1627
+ onPress={() => {
1628
+ setShowModal2(false);
1629
+ navigation.push(ScreenNames.AcceptPolicy, {
1630
+ loan: loan,
1631
+ isCimb: true,
1632
+ });
1633
+ }}
1634
+ >
1635
+ <MText style={{ color: color.primary }}>Xác nhận</MText>
1636
+ </TouchableOpacity>
1637
+ </View>
1620
1638
  <TouchableOpacity
1621
1639
  style={{
1622
- borderWidth: 1,
1623
- borderColor: color.primary,
1624
- borderRadius: 30,
1625
- paddingHorizontal: 48,
1626
- paddingVertical: 8,
1640
+ flexDirection: 'row',
1641
+ justifyContent: 'center',
1642
+ marginTop: 8,
1627
1643
  }}
1628
- onPress={() => {
1629
- setShowModal2(false);
1630
- navigation.push(ScreenNames.AcceptPolicy, {
1631
- loan: loan,
1632
- isCimb: true,
1633
- });
1644
+ onPress={async () => {
1645
+ Alert.alert(
1646
+ 'Vui lòng xác nhận lại',
1647
+ `Bạn có chắc chắn muốn huỷ khoản vay từ CIMB với số tiền ${formatMoney(
1648
+ loan?.loanAmount
1649
+ )}`,
1650
+ [
1651
+ {
1652
+ text: 'Có',
1653
+ onPress: async () => {
1654
+ const response =
1655
+ await Api.getInstance().customerCancel({
1656
+ LoanBriefId: loan?.id,
1657
+ });
1658
+ if (response.kind === 'ok') {
1659
+ if (response.data.meta.errorCode === 200) {
1660
+ setShowModal2(false);
1661
+ const key = `SHOW_${loan.id}`;
1662
+ save(key, true);
1663
+ Alert.alert(
1664
+ 'Thông báo',
1665
+ 'Huỷ đơn thành công',
1666
+ [
1667
+ {
1668
+ text: 'Đồng ý',
1669
+ onPress: () => {
1670
+ navigation.pop();
1671
+ },
1672
+ },
1673
+ ]
1674
+ );
1675
+ }
1676
+ } else {
1677
+ Alert.alert(
1678
+ 'Có lỗi xảy ra. Vui lòng thử lại sau!'
1679
+ );
1680
+ }
1681
+ },
1682
+ },
1683
+ {
1684
+ text: 'Không',
1685
+ },
1686
+ ]
1687
+ );
1634
1688
  }}
1635
1689
  >
1636
- <MText style={{ color: color.primary }}>Xác nhận</MText>
1690
+ <MText style={{ color: '#BDBDBD' }}>Huỷ</MText>
1637
1691
  </TouchableOpacity>
1638
1692
  </View>
1639
- <TouchableOpacity
1640
- style={{
1641
- flexDirection: 'row',
1642
- justifyContent: 'center',
1643
- marginTop: 8,
1644
- }}
1645
- onPress={async () => {
1646
- Alert.alert(
1647
- 'Vui lòng xác nhận lại',
1648
- `Bạn có chắc chắn muốn huỷ khoản vay từ CIMB với số tiền ${formatMoney(
1649
- loan?.loanAmount
1650
- )}`,
1651
- [
1652
- {
1653
- text: 'Có',
1654
- onPress: async () => {
1655
- const response =
1656
- await Api.getInstance().customerCancel({
1657
- LoanBriefId: loan?.id,
1658
- });
1659
- if (response.kind === 'ok') {
1660
- if (response.data.meta.errorCode === 200) {
1661
- setShowModal2(false);
1662
- const key = `SHOW_${loan.id}`;
1663
- save(key, true);
1664
- Alert.alert('Thông báo', 'Huỷ đơn thành công', [
1665
- {
1666
- text: 'Đồng ý',
1667
- onPress: () => {
1668
- navigation.pop();
1669
- },
1670
- },
1671
- ]);
1672
- }
1673
- } else {
1674
- Alert.alert(
1675
- 'Có lỗi xảy ra. Vui lòng thử lại sau!'
1676
- );
1677
- }
1678
- },
1679
- },
1680
- {
1681
- text: 'Không',
1682
- },
1683
- ]
1684
- );
1685
- }}
1686
- >
1687
- <MText style={{ color: '#BDBDBD' }}>Huỷ</MText>
1688
- </TouchableOpacity>
1689
- </View>
1690
- ) : (
1691
- <View style={{ padding: 24 }}>
1692
- <MText
1693
- style={{
1694
- color: color.primary,
1695
- textAlign: 'center',
1696
- fontWeight: 'bold',
1697
- }}
1698
- >
1699
- Hồ sơ của bạn chưa thỏa mãn điều kiện cho vay của ngân hàng
1700
- CIMB
1701
- </MText>
1702
- <MText
1703
- style={{
1704
- textAlign: 'center',
1705
- marginTop: 8,
1706
- fontSize: 12,
1707
- }}
1708
- >
1709
- Bạn vui lòng hoàn thiện các bước tiếp theo để được giới thiệu
1710
- vay qua nhà đầu tư khác.
1711
- </MText>
1712
- <View
1713
- style={{
1714
- flexDirection: 'row',
1715
- justifyContent: 'center',
1716
- marginTop: 24,
1717
- }}
1718
- >
1719
- <TouchableOpacity
1693
+ ) : (
1694
+ <View style={{ padding: 24 }}>
1695
+ <MText
1720
1696
  style={{
1721
- borderWidth: 1,
1722
- borderColor: color.primary,
1723
- borderRadius: 30,
1724
- paddingHorizontal: 48,
1725
- paddingVertical: 8,
1697
+ color: color.primary,
1698
+ textAlign: 'center',
1699
+ fontWeight: 'bold',
1726
1700
  }}
1727
- onPress={() => {
1728
- setShowModal2(false);
1729
- navigation.push(ScreenNames.AcceptPolicy, {
1730
- loan: loan,
1731
- isCimb: false,
1732
- });
1701
+ >
1702
+ Hồ sơ của bạn chưa thỏa mãn điều kiện cho vay của ngân hàng
1703
+ CIMB
1704
+ </MText>
1705
+ <MText
1706
+ style={{
1707
+ textAlign: 'center',
1708
+ marginTop: 8,
1709
+ fontSize: 12,
1733
1710
  }}
1734
1711
  >
1735
- <MText style={{ color: color.primary }}>Tiếp tục</MText>
1736
- </TouchableOpacity>
1712
+ Bạn vui lòng hoàn thiện các bước tiếp theo để được giới
1713
+ thiệu vay qua nhà đầu tư khác.
1714
+ </MText>
1715
+ <View
1716
+ style={{
1717
+ flexDirection: 'row',
1718
+ justifyContent: 'center',
1719
+ marginTop: 24,
1720
+ }}
1721
+ >
1722
+ <TouchableOpacity
1723
+ style={{
1724
+ borderWidth: 1,
1725
+ borderColor: color.primary,
1726
+ borderRadius: 30,
1727
+ paddingHorizontal: 48,
1728
+ paddingVertical: 8,
1729
+ }}
1730
+ onPress={() => {
1731
+ setShowModal2(false);
1732
+ navigation.push(ScreenNames.AcceptPolicy, {
1733
+ loan: loan,
1734
+ isCimb: false,
1735
+ });
1736
+ }}
1737
+ >
1738
+ <MText style={{ color: color.primary }}>Tiếp tục</MText>
1739
+ </TouchableOpacity>
1740
+ </View>
1737
1741
  </View>
1738
- </View>
1739
- )}
1740
- </View>
1741
- </SafeAreaView>
1742
- </Modal>
1742
+ )}
1743
+ </View>
1744
+ </SafeAreaView>
1745
+ </Modal>
1746
+ </ScrollView>
1743
1747
  <Observer>{() => <Loading isLoading={isLoading} />}</Observer>
1744
1748
  </View>
1745
1749
  );