react-native-timacare 0.0.42 → 0.0.44

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