react-native-timacare 3.1.13-beta → 3.1.14-beta

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 (136) hide show
  1. package/lib/commonjs/assets/svgs/ekyc_disable.svg +4 -0
  2. package/lib/commonjs/assets/svgs/expand.svg +8 -0
  3. package/lib/commonjs/assets/svgs/expand_up.svg +8 -0
  4. package/lib/commonjs/assets/svgs/index.js +1 -1
  5. package/lib/commonjs/assets/svgs/index.js.flow +14 -0
  6. package/lib/commonjs/assets/svgs/index.js.map +1 -1
  7. package/lib/commonjs/assets/svgs/money.svg +5 -0
  8. package/lib/commonjs/assets/svgs/sign_disable.svg +12 -0
  9. package/lib/commonjs/assets/svgs/sign_success.svg +12 -0
  10. package/lib/commonjs/assets/svgs/tima_16.svg +13 -0
  11. package/lib/commonjs/screens/home/index.js +1 -1
  12. package/lib/commonjs/screens/home/index.js.flow +2051 -1628
  13. package/lib/commonjs/screens/home/index.js.map +1 -1
  14. package/lib/commonjs/screens/liveness-v2/index.js +1 -1
  15. package/lib/commonjs/screens/liveness-v2/index.js.flow +10 -6
  16. package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
  17. package/lib/commonjs/screens/register/index.js +1 -1
  18. package/lib/commonjs/screens/register/index.js.flow +1 -1
  19. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js +1 -1
  20. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.flow +123 -36
  21. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
  22. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  23. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +3 -1
  24. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
  25. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
  26. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +3 -1
  27. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  28. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +1 -1
  29. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +538 -510
  30. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  31. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  32. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +76 -57
  33. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  34. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +1 -1
  35. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +58 -12
  36. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  37. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js +1 -1
  38. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.flow +6 -7
  39. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.map +1 -1
  40. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  41. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +185 -50
  42. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  43. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
  44. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +3 -1
  45. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  46. package/lib/commonjs/screens/toan-trinh-so/store.js +1 -1
  47. package/lib/commonjs/screens/toan-trinh-so/store.js.flow +23 -1
  48. package/lib/commonjs/screens/toan-trinh-so/store.js.map +1 -1
  49. package/lib/commonjs/services/api/api.js +1 -1
  50. package/lib/commonjs/services/api/api.js.flow +46 -0
  51. package/lib/commonjs/services/api/api.js.map +1 -1
  52. package/lib/commonjs/utils/index.js +1 -1
  53. package/lib/commonjs/utils/index.js.flow +51 -0
  54. package/lib/commonjs/utils/index.js.map +1 -1
  55. package/lib/module/assets/svgs/ekyc_disable.svg +4 -0
  56. package/lib/module/assets/svgs/expand.svg +8 -0
  57. package/lib/module/assets/svgs/expand_up.svg +8 -0
  58. package/lib/module/assets/svgs/index.js +1 -1
  59. package/lib/module/assets/svgs/index.js.map +1 -1
  60. package/lib/module/assets/svgs/money.svg +5 -0
  61. package/lib/module/assets/svgs/sign_disable.svg +12 -0
  62. package/lib/module/assets/svgs/sign_success.svg +12 -0
  63. package/lib/module/assets/svgs/tima_16.svg +13 -0
  64. package/lib/module/screens/home/index.js +1 -1
  65. package/lib/module/screens/home/index.js.map +1 -1
  66. package/lib/module/screens/liveness-v2/index.js +1 -1
  67. package/lib/module/screens/liveness-v2/index.js.map +1 -1
  68. package/lib/module/screens/register/index.js +1 -1
  69. package/lib/module/screens/toan-trinh-so/LoanInterestRate.js +1 -1
  70. package/lib/module/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
  71. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  72. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
  73. package/lib/module/screens/toan-trinh-so/RegisterCamera.js +1 -1
  74. package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  75. package/lib/module/screens/toan-trinh-so/ReviewInformation.js +1 -1
  76. package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  77. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  78. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  79. package/lib/module/screens/toan-trinh-so/ReviewLoan.js +1 -1
  80. package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  81. package/lib/module/screens/toan-trinh-so/TTSOTP.js +1 -1
  82. package/lib/module/screens/toan-trinh-so/TTSOTP.js.map +1 -1
  83. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  84. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  85. package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
  86. package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  87. package/lib/module/screens/toan-trinh-so/store.js +1 -1
  88. package/lib/module/screens/toan-trinh-so/store.js.map +1 -1
  89. package/lib/module/services/api/api.js +1 -1
  90. package/lib/module/services/api/api.js.map +1 -1
  91. package/lib/module/utils/index.js +1 -1
  92. package/lib/module/utils/index.js.map +1 -1
  93. package/lib/typescript/assets/svgs/index.d.ts +8 -1
  94. package/lib/typescript/assets/svgs/index.d.ts.map +1 -1
  95. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  96. package/lib/typescript/screens/liveness-v2/index.d.ts.map +1 -1
  97. package/lib/typescript/screens/toan-trinh-so/LoanInterestRate.d.ts.map +1 -1
  98. package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
  99. package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts.map +1 -1
  100. package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts.map +1 -1
  101. package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts.map +1 -1
  102. package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -1
  103. package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts +1 -1
  104. package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts.map +1 -1
  105. package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -1
  106. package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
  107. package/lib/typescript/screens/toan-trinh-so/store.d.ts +2 -0
  108. package/lib/typescript/screens/toan-trinh-so/store.d.ts.map +1 -1
  109. package/lib/typescript/services/api/api.d.ts +48 -0
  110. package/lib/typescript/services/api/api.d.ts.map +1 -1
  111. package/lib/typescript/utils/index.d.ts +8 -0
  112. package/lib/typescript/utils/index.d.ts.map +1 -1
  113. package/package.json +1 -1
  114. package/src/assets/svgs/ekyc_disable.svg +4 -0
  115. package/src/assets/svgs/expand.svg +8 -0
  116. package/src/assets/svgs/expand_up.svg +8 -0
  117. package/src/assets/svgs/index.tsx +14 -0
  118. package/src/assets/svgs/money.svg +5 -0
  119. package/src/assets/svgs/sign_disable.svg +12 -0
  120. package/src/assets/svgs/sign_success.svg +12 -0
  121. package/src/assets/svgs/tima_16.svg +13 -0
  122. package/src/screens/home/index.tsx +2051 -1628
  123. package/src/screens/liveness-v2/index.tsx +10 -6
  124. package/src/screens/register/index.tsx +1 -1
  125. package/src/screens/toan-trinh-so/LoanInterestRate.tsx +123 -36
  126. package/src/screens/toan-trinh-so/OCR.tsx +3 -1
  127. package/src/screens/toan-trinh-so/RegisterCamera.tsx +3 -1
  128. package/src/screens/toan-trinh-so/ReviewInformation.tsx +538 -510
  129. package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +76 -57
  130. package/src/screens/toan-trinh-so/ReviewLoan.tsx +58 -12
  131. package/src/screens/toan-trinh-so/TTSOTP.tsx +6 -7
  132. package/src/screens/toan-trinh-so/TTSSignLoan.tsx +185 -50
  133. package/src/screens/toan-trinh-so/VehicleCamera.tsx +3 -1
  134. package/src/screens/toan-trinh-so/store.ts +23 -1
  135. package/src/services/api/api.ts +46 -0
  136. package/src/utils/index.tsx +51 -0
@@ -1,5 +1,5 @@
1
1
  //@ts-nocheck
2
- import React, { useEffect, useRef, useState } from 'react';
2
+ import React, { useEffect, useMemo, useRef, useState } from 'react';
3
3
  import {
4
4
  Alert,
5
5
  ScrollView,
@@ -354,89 +354,141 @@ export default function ReviewInformation(props) {
354
354
  handleChange,
355
355
  handleSubmit,
356
356
  setFieldValue,
357
- }) => (
358
- <ScrollView
359
- style={[commonStyles.fill, { paddingHorizontal: 16 }]}
360
- >
361
- <MText style={$title2}>1.1 Thông tin nhân</MText>
362
- <MText style={$label}>Họ và tên</MText>
363
- <TextInput
364
- style={[
365
- $textInput,
366
- {
367
- color: '#333333',
368
- fontSize: 16,
369
- fontWeight: '500',
370
- fontFamily: 'Be Vietnam Pro Medium',
371
- },
372
- ]}
373
- value={values.fullName}
374
- onChangeText={handleChange('fullName')}
375
- />
376
- {errors && errors.fullName && (
377
- <MText style={$error}>{errors.fullName}</MText>
378
- )}
379
- <View style={[$row, { marginTop: 16 }]}>
380
- <View style={[commonStyles.fill]}>
381
- <MText style={$label}>Sinh ngày</MText>
382
- <TouchableOpacity
383
- style={$select}
384
- onPress={() => {
385
- setTypeDate(1);
386
- setShowDate(true);
387
- }}
388
- >
389
- <MText
390
- style={{
357
+ }) => {
358
+ const renderView = useMemo(
359
+ () => (
360
+ <ScrollView
361
+ style={[commonStyles.fill, { paddingHorizontal: 16 }]}
362
+ >
363
+ <MText style={$title2}>1.1 Thông tin cá nhân</MText>
364
+ <MText style={$label}>Họ và tên</MText>
365
+ <TextInput
366
+ style={[
367
+ $textInput,
368
+ {
391
369
  color: '#333333',
392
370
  fontSize: 16,
393
371
  fontWeight: '500',
394
372
  fontFamily: 'Be Vietnam Pro Medium',
395
- }}
396
- >
397
- {values.dob}
398
- </MText>
399
- </TouchableOpacity>
400
- {errors && errors.dob && (
401
- <MText style={$error}>{errors.dob}</MText>
402
- )}
403
- </View>
404
- <View style={[commonStyles.fill]}>
405
- <MText style={$label}>Giới tính</MText>
406
- <TouchableOpacity
407
- style={$select}
408
- onPress={() => {
409
- navigation.push(ScreenNames.MSelect, {
410
- title: 'Chọn giới tính',
411
- data: EnumGender,
412
- callback: (item) => {
413
- setFieldValue('gender', item.id);
414
- },
415
- });
416
- }}
417
- >
418
- <MText
419
- style={{
420
- color: '#333333',
421
- fontSize: 16,
422
- fontWeight: '500',
423
- flex: 1,
424
- }}
425
- >
426
- {values.gender === 0 ? 'Nam' : 'Nữ'}
427
- </MText>
428
- <DropDown2 />
429
- </TouchableOpacity>
430
- {errors && errors.gender && (
431
- <MText style={$error}>{errors.gender}</MText>
373
+ },
374
+ ]}
375
+ value={values.fullName}
376
+ onChangeText={handleChange('fullName')}
377
+ />
378
+ {errors && errors.fullName && (
379
+ <MText style={$error}>{errors.fullName}</MText>
432
380
  )}
433
- </View>
434
- </View>
381
+ <View style={[$row, { marginTop: 16 }]}>
382
+ <View style={[commonStyles.fill]}>
383
+ <MText style={$label}>Sinh ngày</MText>
384
+ <TouchableOpacity
385
+ style={$select}
386
+ onPress={() => {
387
+ setTypeDate(1);
388
+ setShowDate(true);
389
+ }}
390
+ >
391
+ <MText
392
+ style={{
393
+ color: '#333333',
394
+ fontSize: 16,
395
+ fontWeight: '500',
396
+ fontFamily: 'Be Vietnam Pro Medium',
397
+ }}
398
+ >
399
+ {values.dob}
400
+ </MText>
401
+ </TouchableOpacity>
402
+ {errors && errors.dob && (
403
+ <MText style={$error}>{errors.dob}</MText>
404
+ )}
405
+ </View>
406
+ <View style={[commonStyles.fill]}>
407
+ <MText style={$label}>Giới tính</MText>
408
+ <TouchableOpacity
409
+ style={$select}
410
+ onPress={() => {
411
+ navigation.push(ScreenNames.MSelect, {
412
+ title: 'Chọn giới tính',
413
+ data: EnumGender,
414
+ callback: (item) => {
415
+ setFieldValue('gender', item.id);
416
+ },
417
+ });
418
+ }}
419
+ >
420
+ <MText
421
+ style={{
422
+ color: '#333333',
423
+ fontSize: 16,
424
+ fontWeight: '500',
425
+ flex: 1,
426
+ }}
427
+ >
428
+ {values.gender === 0 ? 'Nam' : 'Nữ'}
429
+ </MText>
430
+ <DropDown2 />
431
+ </TouchableOpacity>
432
+ {errors && errors.gender && (
433
+ <MText style={$error}>{errors.gender}</MText>
434
+ )}
435
+ </View>
436
+ </View>
435
437
 
436
- <View style={[$row]}>
437
- <View style={[commonStyles.fill]}>
438
- <MText style={$label}>Số CCCD/CMND</MText>
438
+ <View style={[$row]}>
439
+ <View style={[commonStyles.fill]}>
440
+ <MText style={$label}>Số CCCD/CMND</MText>
441
+ <TextInput
442
+ keyboardType="number-pad"
443
+ style={[
444
+ $textInput,
445
+ {
446
+ color: '#333333',
447
+ fontSize: 16,
448
+ fontWeight: '500',
449
+ },
450
+ ]}
451
+ value={values.nationalCard}
452
+ onChangeText={handleChange('nationalCard')}
453
+ />
454
+ {errors && errors.nationalCard && (
455
+ <MText style={$error}>{errors.nationalCard}</MText>
456
+ )}
457
+ </View>
458
+ <View style={[commonStyles.fill]}>
459
+ <MText style={$label}>Ngày cấp</MText>
460
+ <TouchableOpacity
461
+ style={$select}
462
+ onPress={() => {
463
+ setTypeDate(2);
464
+ setShowDate(true);
465
+ }}
466
+ >
467
+ <MText
468
+ numberOfLines={1}
469
+ style={{
470
+ color:
471
+ values.dateNationalId !== ''
472
+ ? '#333333'
473
+ : '#BDBDBD',
474
+ fontSize: 16,
475
+ fontWeight: '500',
476
+ flex: 1,
477
+ }}
478
+ >
479
+ {values.dateNationalId !== ''
480
+ ? values.dateNationalId
481
+ : 'DD/MM/YYYY'}
482
+ </MText>
483
+ </TouchableOpacity>
484
+ {errors && errors.dateNationalId && (
485
+ <MText style={$error}>{errors.dateNationalId}</MText>
486
+ )}
487
+ </View>
488
+ </View>
489
+ <MText style={$label}>Số điện thoại</MText>
439
490
  <TextInput
491
+ editable={false}
440
492
  keyboardType="number-pad"
441
493
  style={[
442
494
  $textInput,
@@ -446,94 +498,128 @@ export default function ReviewInformation(props) {
446
498
  fontWeight: '500',
447
499
  },
448
500
  ]}
449
- value={values.nationalCard}
450
- onChangeText={handleChange('nationalCard')}
501
+ value={values.phone}
502
+ onChangeText={handleChange('phone')}
451
503
  />
452
- {errors && errors.nationalCard && (
453
- <MText style={$error}>{errors.nationalCard}</MText>
504
+ {errors && errors.phone && (
505
+ <MText style={$error}>{errors.phone}</MText>
454
506
  )}
455
- </View>
456
- <View style={[commonStyles.fill]}>
457
- <MText style={$label}>Ngày cấp</MText>
458
- <TouchableOpacity
459
- style={$select}
460
- onPress={() => {
461
- setTypeDate(2);
462
- setShowDate(true);
463
- }}
464
- >
465
- <MText
466
- numberOfLines={1}
467
- style={{
507
+
508
+ {/* <MText style={[$label, { marginTop: 16 }]}>Hộ chiếu</MText>
509
+ <TextInput
510
+ placeholder="Nhập hộ chiếu của bạn"
511
+ placeholderTextColor={'#BDBDBD'}
512
+ style={[
513
+ $textInput,
514
+ {
468
515
  color: '#333333',
469
516
  fontSize: 16,
470
517
  fontWeight: '500',
471
- flex: 1,
472
- }}
473
- >
474
- {values.dateNationalId}
475
- </MText>
476
- </TouchableOpacity>
477
- {errors && errors.dateNationalId && (
478
- <MText style={$error}>{errors.dateNationalId}</MText>
479
- )}
480
- </View>
481
- </View>
482
- <MText style={$label}>Số điện thoại</MText>
483
- <TextInput
484
- editable={false}
485
- keyboardType="number-pad"
486
- style={[
487
- $textInput,
488
- {
489
- color: '#333333',
490
- fontSize: 16,
491
- fontWeight: '500',
492
- },
493
- ]}
494
- value={values.phone}
495
- onChangeText={handleChange('phone')}
496
- />
497
- {errors && errors.phone && (
498
- <MText style={$error}>{errors.phone}</MText>
499
- )}
500
-
501
- <MText style={[$label, { marginTop: 16 }]}>Hộ chiếu</MText>
502
- <TextInput
503
- placeholder="Nhập hộ chiếu của bạn"
504
- placeholderTextColor={'#BDBDBD'}
505
- style={[
506
- $textInput,
507
- {
508
- color: '#333333',
509
- fontSize: 16,
510
- fontWeight: '500',
511
- },
512
- ]}
513
- value={values.passport}
514
- onChangeText={handleChange('passport')}
515
- />
518
+ },
519
+ ]}
520
+ value={values.passport}
521
+ onChangeText={handleChange('passport')}
522
+ /> */}
516
523
 
517
- <MText style={[$title2, { marginTop: 16 }]}>
518
- 1.2 Sổ hộ khẩu
519
- </MText>
520
- <View style={[$row]}>
521
- <View style={[commonStyles.fill]}>
522
- <MText style={$label}>Tỉnh/ Thành phố</MText>
524
+ <MText style={[$title2, { marginTop: 16 }]}>
525
+ 1.2 Sổ hộ khẩu
526
+ </MText>
527
+ <View style={[$row]}>
528
+ <View style={[commonStyles.fill]}>
529
+ <MText style={$label}>Tỉnh/ Thành phố</MText>
530
+ <TouchableOpacity
531
+ style={$select}
532
+ onPress={() => {
533
+ navigation.push(ScreenNames.CommonSelect, {
534
+ title: 'Tỉnh/ Thành phố',
535
+ data: ttsStore.listProvince,
536
+ callback: (item) => {
537
+ setFieldValue('houseHoldProvinceId', item.id);
538
+ setFieldValue(
539
+ 'houseHoldProvinceName',
540
+ item.name
541
+ );
542
+ setFieldValue('houseHoldDistrictId', null);
543
+ setFieldValue('houseHoldDistrictName', '');
544
+ setFieldValue('houseHoldWardId', null);
545
+ setFieldValue('houseHoldWardName', '');
546
+ ttsStore.getDistrict2(item.id);
547
+ },
548
+ });
549
+ }}
550
+ >
551
+ <MText
552
+ numberOfLines={1}
553
+ style={{
554
+ color: '#333333',
555
+ fontSize: 16,
556
+ fontWeight: '500',
557
+ flex: 1,
558
+ fontFamily: 'Be Vietnam Pro Medium',
559
+ }}
560
+ >
561
+ {values.houseHoldProvinceName}
562
+ </MText>
563
+ <DropDown2 />
564
+ </TouchableOpacity>
565
+ {errors && errors.houseHoldProvinceName && (
566
+ <MText style={$error}>
567
+ {errors.houseHoldProvinceName}
568
+ </MText>
569
+ )}
570
+ </View>
571
+ <View style={[commonStyles.fill]}>
572
+ <MText style={$label}>Quận/ Huyện</MText>
573
+ <TouchableOpacity
574
+ style={$select}
575
+ onPress={() => {
576
+ navigation.push(ScreenNames.CommonSelect, {
577
+ title: 'Phường/ Xã',
578
+ data: ttsStore.listDistrict2,
579
+ callback: (item) => {
580
+ setFieldValue('houseHoldDistrictId', item.id);
581
+ setFieldValue(
582
+ 'houseHoldDistrictName',
583
+ item.name
584
+ );
585
+ setFieldValue('houseHoldWardId', null);
586
+ setFieldValue('houseHoldWardName', '');
587
+ ttsStore.getWard2(item.id);
588
+ },
589
+ });
590
+ }}
591
+ >
592
+ <MText
593
+ numberOfLines={1}
594
+ style={{
595
+ color: '#333333',
596
+ fontSize: 16,
597
+ fontWeight: '500',
598
+ flex: 1,
599
+ fontFamily: 'Be Vietnam Pro Medium',
600
+ }}
601
+ >
602
+ {values.houseHoldDistrictName}
603
+ </MText>
604
+ <DropDown2 />
605
+ </TouchableOpacity>
606
+ {errors && errors.houseHoldDistrictName && (
607
+ <MText style={$error}>
608
+ {errors.houseHoldDistrictName}
609
+ </MText>
610
+ )}
611
+ </View>
612
+ </View>
613
+ <MText style={[$label]}>Phường/ Xã</MText>
523
614
  <TouchableOpacity
524
615
  style={$select}
525
616
  onPress={() => {
526
617
  navigation.push(ScreenNames.CommonSelect, {
527
- title: 'Tỉnh/ Thành phố',
528
- data: ttsStore.listProvince,
618
+ title: 'Phường/ ',
619
+ data: ttsStore.listWard2,
529
620
  callback: (item) => {
530
- setFieldValue('houseHoldProvinceId', item.id);
531
- setFieldValue('houseHoldProvinceName', item.name);
532
- setFieldValue('houseHoldDistrictId', null);
533
- setFieldValue('houseHoldDistrictName', '');
534
- setFieldValue('houseHoldWardId', null);
535
- setFieldValue('houseHoldWardName', '');
536
- ttsStore.getDistrict2(item.id);
621
+ setFieldValue('houseHoldWardId', item?.id);
622
+ setFieldValue('houseHoldWardName', item?.name);
537
623
  },
538
624
  });
539
625
  }}
@@ -548,251 +634,254 @@ export default function ReviewInformation(props) {
548
634
  fontFamily: 'Be Vietnam Pro Medium',
549
635
  }}
550
636
  >
551
- {values.houseHoldProvinceName}
637
+ {values.houseHoldWardName}
552
638
  </MText>
553
639
  <DropDown2 />
554
640
  </TouchableOpacity>
555
- {errors && errors.houseHoldProvinceName && (
556
- <MText style={$error}>
557
- {errors.houseHoldProvinceName}
558
- </MText>
641
+ {errors && errors.houseHoldWardName && (
642
+ <MText style={$error}>{errors.houseHoldWardName}</MText>
559
643
  )}
560
- </View>
561
- <View style={[commonStyles.fill]}>
562
- <MText style={$label}>Quận/ Huyện</MText>
563
- <TouchableOpacity
564
- style={$select}
565
- onPress={() => {
566
- navigation.push(ScreenNames.CommonSelect, {
567
- title: 'Phường/ Xã',
568
- data: ttsStore.listDistrict2,
569
- callback: (item) => {
570
- setFieldValue('houseHoldDistrictId', item.id);
571
- setFieldValue('houseHoldDistrictName', item.name);
572
- setFieldValue('houseHoldWardId', null);
573
- setFieldValue('houseHoldWardName', '');
574
- ttsStore.getWard2(item.id);
575
- },
576
- });
577
- }}
578
- >
579
- <MText
580
- numberOfLines={1}
581
- style={{
644
+ <MText style={[$label, { marginTop: 16 }]}>
645
+ Địa chỉ chi tiết
646
+ </MText>
647
+ <TextInput
648
+ numberOfLines={1}
649
+ style={[
650
+ $textInput,
651
+ {
582
652
  color: '#333333',
583
653
  fontSize: 16,
584
654
  fontWeight: '500',
585
- flex: 1,
586
- fontFamily: 'Be Vietnam Pro Medium',
655
+ },
656
+ ]}
657
+ value={values.houseHoldAddress}
658
+ onChangeText={handleChange('houseHoldAddress')}
659
+ />
660
+ {errors && errors.houseHoldAddress && (
661
+ <MText style={$error}>{errors.houseHoldAddress}</MText>
662
+ )}
663
+ <View style={[$row, { marginTop: 16 }]}>
664
+ <MText
665
+ style={{
666
+ fontSize: 14,
667
+ color: '#333333',
587
668
  }}
588
669
  >
589
- {values.houseHoldDistrictName}
590
- </MText>
591
- <DropDown2 />
592
- </TouchableOpacity>
593
- {errors && errors.houseHoldDistrictName && (
594
- <MText style={$error}>
595
- {errors.houseHoldDistrictName}
670
+ A/C đã có gia đình chưa
596
671
  </MText>
597
- )}
598
- </View>
599
- </View>
600
- <MText style={[$label]}>Phường/ Xã</MText>
601
- <TouchableOpacity
602
- style={$select}
603
- onPress={() => {
604
- navigation.push(ScreenNames.CommonSelect, {
605
- title: 'Phường/ Xã',
606
- data: ttsStore.listWard2,
607
- callback: (item) => {
608
- setFieldValue('houseHoldWardId', item?.id);
609
- setFieldValue('houseHoldWardName', item?.name);
610
- },
611
- });
612
- }}
613
- >
614
- <MText
615
- numberOfLines={1}
616
- style={{
617
- color: '#333333',
618
- fontSize: 16,
619
- fontWeight: '500',
620
- flex: 1,
621
- fontFamily: 'Be Vietnam Pro Medium',
622
- }}
623
- >
624
- {values.houseHoldWardName}
625
- </MText>
626
- <DropDown2 />
627
- </TouchableOpacity>
628
- {errors && errors.houseHoldWardName && (
629
- <MText style={$error}>{errors.houseHoldWardName}</MText>
630
- )}
631
- <MText style={[$label, { marginTop: 16 }]}>
632
- Địa chỉ chi tiết
633
- </MText>
634
- <TextInput
635
- numberOfLines={1}
636
- style={[
637
- $textInput,
638
- {
639
- color: '#333333',
640
- fontSize: 16,
641
- fontWeight: '500',
642
- },
643
- ]}
644
- value={values.houseHoldAddress}
645
- onChangeText={handleChange('houseHoldAddress')}
646
- />
647
- {errors && errors.houseHoldAddress && (
648
- <MText style={$error}>{errors.houseHoldAddress}</MText>
649
- )}
650
- <View style={[$row, { marginTop: 16 }]}>
651
- <MText
652
- style={{
653
- fontSize: 14,
654
- color: '#333333',
655
- }}
656
- >
657
- A/C đã có gia đình chưa
658
- </MText>
659
- <View
660
- style={{
661
- flex: 1,
662
- flexDirection: 'row',
663
- gap: 16,
664
- justifyContent: 'space-between',
665
- marginLeft: 24,
666
- }}
667
- >
668
- <TouchableOpacity
669
- onPress={() => setFieldValue('isMerried', 1)}
672
+ <View
673
+ style={{
674
+ flex: 1,
675
+ flexDirection: 'row',
676
+ gap: 16,
677
+ justifyContent: 'space-between',
678
+ marginLeft: 24,
679
+ }}
680
+ >
681
+ <TouchableOpacity
682
+ onPress={() => setFieldValue('isMerried', 1)}
683
+ style={{
684
+ flexDirection: 'row',
685
+ gap: 5,
686
+ alignItems: 'center',
687
+ }}
688
+ >
689
+ {values.isMerried === 1 ? (
690
+ <RadioCheckIcon />
691
+ ) : (
692
+ <RadioIcon />
693
+ )}
694
+ <MText>Đã có</MText>
695
+ </TouchableOpacity>
696
+ <TouchableOpacity
697
+ onPress={() => setFieldValue('isMerried', 0)}
698
+ style={{
699
+ flexDirection: 'row',
700
+ gap: 5,
701
+ alignItems: 'center',
702
+ }}
703
+ >
704
+ {values.isMerried === 0 ? (
705
+ <RadioCheckIcon />
706
+ ) : (
707
+ <RadioIcon />
708
+ )}
709
+ <MText>Chưa có</MText>
710
+ </TouchableOpacity>
711
+ </View>
712
+ </View>
713
+ <MText style={[$title2]}>1.3 Nơi ở hiện tại</MText>
714
+ <MText
670
715
  style={{
671
- flexDirection: 'row',
672
- gap: 5,
673
- alignItems: 'center',
716
+ fontSize: 14,
717
+ color: '#333333',
674
718
  }}
675
719
  >
676
- {values.isMerried === 1 ? (
677
- <RadioCheckIcon />
678
- ) : (
679
- <RadioIcon />
680
- )}
681
- <MText>Đã có</MText>
682
- </TouchableOpacity>
683
- <TouchableOpacity
684
- onPress={() => setFieldValue('isMerried', 0)}
720
+ Nơi trùng với địa chỉ hộ khẩu không?
721
+ </MText>
722
+ <View
685
723
  style={{
724
+ flex: 1,
686
725
  flexDirection: 'row',
687
- gap: 5,
688
- alignItems: 'center',
726
+ gap: 16,
727
+ marginTop: 5,
689
728
  }}
690
729
  >
691
- {values.isMerried === 0 ? (
692
- <RadioCheckIcon />
693
- ) : (
694
- <RadioIcon />
695
- )}
696
- <MText>Chưa có</MText>
697
- </TouchableOpacity>
698
- </View>
699
- </View>
700
- <MText style={[$title2]}>1.3 Nơi ở hiện tại</MText>
701
- <MText
702
- style={{
703
- fontSize: 14,
704
- color: '#333333',
705
- }}
706
- >
707
- Nơi ở có trùng với địa chỉ hộ khẩu không?
708
- </MText>
709
- <View
710
- style={{
711
- flex: 1,
712
- flexDirection: 'row',
713
- gap: 16,
714
- marginTop: 5,
715
- }}
716
- >
717
- <TouchableOpacity
718
- onPress={() => {
719
- setFieldValue('residentType', 14);
720
- setFieldValue('provinceId', values.houseHoldProvinceId);
721
- setFieldValue(
722
- 'provinceName',
723
- values.houseHoldProvinceName
724
- );
725
- setFieldValue('districtId', values.houseHoldDistrictId);
726
- setFieldValue(
727
- 'districtName',
728
- values.houseHoldDistrictName
729
- );
730
- setFieldValue('wardId', values.houseHoldWardId);
731
- setFieldValue('wardName', values.houseHoldWardName);
732
- if (values.houseHoldDistrictId) {
733
- ttsStore.getWard(values.houseHoldDistrictId);
734
- }
735
- if (values.houseHoldProvinceId) {
736
- ttsStore.getDistrict(values.houseHoldProvinceId);
737
- }
738
- }}
739
- style={{
740
- flexDirection: 'row',
741
- gap: 5,
742
- alignItems: 'center',
743
- flex: 1,
744
- }}
745
- >
746
- {values.residentType === 14 ? (
747
- <RadioCheckIcon />
748
- ) : (
749
- <RadioIcon />
750
- )}
751
- <MText>Có trùng</MText>
752
- </TouchableOpacity>
753
- <TouchableOpacity
754
- onPress={() => {
755
- setFieldValue('residentType', 15);
756
- setFieldValue('provinceId', null);
757
- setFieldValue('provinceName', '');
758
- setFieldValue('districtId', null);
759
- setFieldValue('districtName', '');
760
- setFieldValue('wardId', null);
761
- setFieldValue('wardName', '');
762
- }}
763
- style={{
764
- flexDirection: 'row',
765
- gap: 5,
766
- alignItems: 'center',
767
- flex: 1,
768
- }}
769
- >
770
- {values.residentType === 15 ? (
771
- <RadioCheckIcon />
772
- ) : (
773
- <RadioIcon />
774
- )}
775
- <MText>Không trùng</MText>
776
- </TouchableOpacity>
777
- </View>
730
+ <TouchableOpacity
731
+ onPress={() => {
732
+ setFieldValue('residentType', 14);
733
+ setFieldValue(
734
+ 'provinceId',
735
+ values.houseHoldProvinceId
736
+ );
737
+ setFieldValue(
738
+ 'provinceName',
739
+ values.houseHoldProvinceName
740
+ );
741
+ setFieldValue(
742
+ 'districtId',
743
+ values.houseHoldDistrictId
744
+ );
745
+ setFieldValue(
746
+ 'districtName',
747
+ values.houseHoldDistrictName
748
+ );
749
+ setFieldValue('wardId', values.houseHoldWardId);
750
+ setFieldValue('wardName', values.houseHoldWardName);
751
+ if (values.houseHoldDistrictId) {
752
+ ttsStore.getWard(values.houseHoldDistrictId);
753
+ }
754
+ if (values.houseHoldProvinceId) {
755
+ ttsStore.getDistrict(values.houseHoldProvinceId);
756
+ }
757
+ setFieldValue('address', values.houseHoldAddress);
758
+ }}
759
+ style={{
760
+ flexDirection: 'row',
761
+ gap: 5,
762
+ alignItems: 'center',
763
+ flex: 1,
764
+ }}
765
+ >
766
+ {values.residentType === 14 ? (
767
+ <RadioCheckIcon />
768
+ ) : (
769
+ <RadioIcon />
770
+ )}
771
+ <MText>Có trùng</MText>
772
+ </TouchableOpacity>
773
+ <TouchableOpacity
774
+ onPress={() => {
775
+ setFieldValue('residentType', 15);
776
+ setFieldValue('provinceId', null);
777
+ setFieldValue('provinceName', '');
778
+ setFieldValue('districtId', null);
779
+ setFieldValue('districtName', '');
780
+ setFieldValue('wardId', null);
781
+ setFieldValue('wardName', '');
782
+ setFieldValue('address', '');
783
+ }}
784
+ style={{
785
+ flexDirection: 'row',
786
+ gap: 5,
787
+ alignItems: 'center',
788
+ flex: 1,
789
+ }}
790
+ >
791
+ {values.residentType === 15 ? (
792
+ <RadioCheckIcon />
793
+ ) : (
794
+ <RadioIcon />
795
+ )}
796
+ <MText>Không trùng</MText>
797
+ </TouchableOpacity>
798
+ </View>
778
799
 
779
- <View style={[$row, { marginTop: 16 }]}>
780
- <View style={[commonStyles.fill]}>
781
- <MText style={$label}>Tỉnh/ Thành phố</MText>
800
+ <View style={[$row, { marginTop: 16 }]}>
801
+ <View style={[commonStyles.fill]}>
802
+ <MText style={$label}>Tỉnh/ Thành phố</MText>
803
+ <TouchableOpacity
804
+ style={$select}
805
+ onPress={() => {
806
+ navigation.push(ScreenNames.CommonSelect, {
807
+ title: 'Tỉnh/ Thành phố',
808
+ data: ttsStore.listProvince,
809
+ callback: (item) => {
810
+ setFieldValue('provinceId', item.id);
811
+ setFieldValue('provinceName', item?.name);
812
+ setFieldValue('districtId', null);
813
+ setFieldValue('districtName', '');
814
+ setFieldValue('wardId', null);
815
+ setFieldValue('wardName', '');
816
+ ttsStore.getDistrict(item.id);
817
+ },
818
+ });
819
+ }}
820
+ >
821
+ <MText
822
+ numberOfLines={1}
823
+ style={{
824
+ color: '#333333',
825
+ fontSize: 16,
826
+ fontWeight: '500',
827
+ flex: 1,
828
+ fontFamily: 'Be Vietnam Pro Medium',
829
+ }}
830
+ >
831
+ {values.provinceName}
832
+ </MText>
833
+ <DropDown2 />
834
+ </TouchableOpacity>
835
+ {errors && errors.provinceName && (
836
+ <MText style={$error}>{errors.provinceName}</MText>
837
+ )}
838
+ </View>
839
+ <View style={[commonStyles.fill]}>
840
+ <MText style={$label}>Quận/ Huyện</MText>
841
+ <TouchableOpacity
842
+ style={$select}
843
+ onPress={() => {
844
+ navigation.push(ScreenNames.CommonSelect, {
845
+ title: 'Quận/ Huyện',
846
+ data: ttsStore.listDistrict,
847
+ callback: (item) => {
848
+ setFieldValue('districtId', item?.id);
849
+ setFieldValue('districtName', item?.name);
850
+ setFieldValue('wardId', null);
851
+ setFieldValue('wardName', '');
852
+ ttsStore.getWard(item.id);
853
+ },
854
+ });
855
+ }}
856
+ >
857
+ <MText
858
+ numberOfLines={1}
859
+ style={{
860
+ color: '#333333',
861
+ fontSize: 16,
862
+ fontWeight: '500',
863
+ flex: 1,
864
+ }}
865
+ >
866
+ {values.districtName}
867
+ </MText>
868
+ <DropDown2 />
869
+ </TouchableOpacity>
870
+ {errors && errors.districtName && (
871
+ <MText style={$error}>{errors.districtName}</MText>
872
+ )}
873
+ </View>
874
+ </View>
875
+ <MText style={[$label]}>Phường/ Xã</MText>
782
876
  <TouchableOpacity
783
877
  style={$select}
784
878
  onPress={() => {
785
879
  navigation.push(ScreenNames.CommonSelect, {
786
- title: 'Tỉnh/ Thành phố',
787
- data: ttsStore.listProvince,
880
+ title: 'Phường/ ',
881
+ data: ttsStore.listWard,
788
882
  callback: (item) => {
789
- setFieldValue('provinceId', item.id);
790
- setFieldValue('provinceName', item?.name);
791
- setFieldValue('districtId', null);
792
- setFieldValue('districtName', '');
793
- setFieldValue('wardId', null);
794
- setFieldValue('wardName', '');
795
- ttsStore.getDistrict(item.id);
883
+ setFieldValue('wardId', item.id);
884
+ setFieldValue('wardName', item?.name);
796
885
  },
797
886
  });
798
887
  }}
@@ -807,152 +896,91 @@ export default function ReviewInformation(props) {
807
896
  fontFamily: 'Be Vietnam Pro Medium',
808
897
  }}
809
898
  >
810
- {values.provinceName}
899
+ {values.wardName}
811
900
  </MText>
812
901
  <DropDown2 />
813
902
  </TouchableOpacity>
814
- {errors && errors.provinceName && (
815
- <MText style={$error}>{errors.provinceName}</MText>
903
+ {errors && errors.wardName && (
904
+ <MText style={$error}>{errors.wardName}</MText>
816
905
  )}
817
- </View>
818
- <View style={[commonStyles.fill]}>
819
- <MText style={$label}>Quận/ Huyện</MText>
820
- <TouchableOpacity
821
- style={$select}
906
+ <MText style={[$label, { marginTop: 16 }]}>
907
+ Địa chỉ chi tiết
908
+ </MText>
909
+ <TextInput
910
+ style={[
911
+ $textInput,
912
+ {
913
+ color: '#333333',
914
+ fontSize: 16,
915
+ fontWeight: '500',
916
+ },
917
+ ]}
918
+ value={values.address}
919
+ onChangeText={handleChange('address')}
920
+ />
921
+ {errors && errors.address && (
922
+ <MText style={$error}>{errors.address}</MText>
923
+ )}
924
+ <MButton
822
925
  onPress={() => {
823
- navigation.push(ScreenNames.CommonSelect, {
824
- title: 'Quận/ Huyện',
825
- data: ttsStore.listDistrict,
826
- callback: (item) => {
827
- setFieldValue('districtId', item?.id);
828
- setFieldValue('districtName', item?.name);
829
- setFieldValue('wardId', null);
830
- setFieldValue('wardName', '');
831
- ttsStore.getWard(item.id);
832
- },
833
- });
926
+ handleSubmit();
927
+ }}
928
+ style={{
929
+ marginVertical: 24,
834
930
  }}
835
931
  >
836
- <MText
837
- numberOfLines={1}
932
+ <LinearGradient
933
+ start={{ x: 1, y: 0 }}
934
+ end={{ x: 0, y: 1 }}
838
935
  style={{
839
- color: '#333333',
840
- fontSize: 16,
841
- fontWeight: '500',
842
- flex: 1,
936
+ height: 40,
937
+ marginVertical: 16,
938
+ borderRadius: 30,
939
+ alignItems: 'center',
940
+ justifyContent: 'center',
843
941
  }}
942
+ colors={['#FF7A00', '#EF4123']}
844
943
  >
845
- {values.districtName}
846
- </MText>
847
- <DropDown2 />
848
- </TouchableOpacity>
849
- {errors && errors.districtName && (
850
- <MText style={$error}>{errors.districtName}</MText>
851
- )}
852
- </View>
853
- </View>
854
- <MText style={[$label]}>Phường/ Xã</MText>
855
- <TouchableOpacity
856
- style={$select}
857
- onPress={() => {
858
- navigation.push(ScreenNames.CommonSelect, {
859
- title: 'Phường/ Xã',
860
- data: ttsStore.listWard,
861
- callback: (item) => {
862
- setFieldValue('wardId', item.id);
863
- setFieldValue('wardName', item?.name);
864
- },
865
- });
866
- }}
867
- >
868
- <MText
869
- numberOfLines={1}
870
- style={{
871
- color: '#333333',
872
- fontSize: 16,
873
- fontWeight: '500',
874
- flex: 1,
875
- fontFamily: 'Be Vietnam Pro Medium',
944
+ <MText
945
+ style={{
946
+ color: 'white',
947
+ fontSize: 16,
948
+ }}
949
+ >
950
+ Tiếp tục
951
+ </MText>
952
+ </LinearGradient>
953
+ </MButton>
954
+ </ScrollView>
955
+ ),
956
+ [values, errors]
957
+ );
958
+ return (
959
+ <>
960
+ {renderView}
961
+ <DatePicker
962
+ mode="date"
963
+ open={showDate}
964
+ modal
965
+ title="Chọn thời gian"
966
+ locale="vi"
967
+ date={new Date()}
968
+ onCancel={() => {
969
+ setShowDate(false);
876
970
  }}
877
- >
878
- {values.wardName}
879
- </MText>
880
- <DropDown2 />
881
- </TouchableOpacity>
882
- {errors && errors.wardName && (
883
- <MText style={$error}>{errors.wardName}</MText>
884
- )}
885
- <MText style={[$label, { marginTop: 16 }]}>
886
- Địa chỉ chi tiết
887
- </MText>
888
- <TextInput
889
- style={[
890
- $textInput,
891
- {
892
- color: '#333333',
893
- fontSize: 16,
894
- fontWeight: '500',
895
- },
896
- ]}
897
- value={values.address}
898
- onChangeText={handleChange('address')}
899
- />
900
- {errors && errors.address && (
901
- <MText style={$error}>{errors.address}</MText>
902
- )}
903
- <MButton
904
- onPress={() => {
905
- handleSubmit();
906
- }}
907
- style={{
908
- marginVertical: 24,
909
- }}
910
- >
911
- <LinearGradient
912
- start={{ x: 1, y: 0 }}
913
- end={{ x: 0, y: 1 }}
914
- style={{
915
- height: 40,
916
- marginVertical: 16,
917
- borderRadius: 30,
918
- alignItems: 'center',
919
- justifyContent: 'center',
971
+ onConfirm={(date) => {
972
+ setShowDate(false);
973
+ if (typeDate === 1) {
974
+ setFieldValue('dob', formatDDMMYYY(date));
975
+ }
976
+ if (typeDate === 2) {
977
+ setFieldValue('dateNationalId', formatDDMMYYY(date));
978
+ }
920
979
  }}
921
- colors={['#FF7A00', '#EF4123']}
922
- >
923
- <MText
924
- style={{
925
- color: 'white',
926
- fontSize: 16,
927
- }}
928
- >
929
- Tiếp tục
930
- </MText>
931
- </LinearGradient>
932
- </MButton>
933
-
934
- <DatePicker
935
- mode="date"
936
- open={showDate}
937
- modal
938
- title="Chọn thời gian"
939
- locale="vi"
940
- date={new Date()}
941
- onCancel={() => {
942
- setShowDate(false);
943
- }}
944
- onConfirm={(date) => {
945
- setShowDate(false);
946
- if (typeDate === 1) {
947
- setFieldValue('dob', formatDDMMYYY(date));
948
- }
949
- if (typeDate === 2) {
950
- setFieldValue('dateNationalId', formatDDMMYYY(date));
951
- }
952
- }}
953
- />
954
- </ScrollView>
955
- )}
980
+ />
981
+ </>
982
+ );
983
+ }}
956
984
  </Formik>
957
985
  <KeyboardSpacer />
958
986
  </View>