react-native-timacare 3.3.12 → 3.3.13
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.
- package/lib/commonjs/RNTimacare.js +1 -1
- package/lib/commonjs/RNTimacare.js.flow +0 -9
- package/lib/commonjs/RNTimacare.js.map +1 -1
- package/lib/commonjs/assets/digital_topup/index.js +2 -0
- package/lib/commonjs/assets/digital_topup/index.js.flow +28 -0
- package/lib/commonjs/assets/digital_topup/index.js.map +1 -0
- package/lib/commonjs/assets/digital_topup/step1.svg +31 -0
- package/lib/commonjs/assets/digital_topup/step1_disable.svg +31 -0
- package/lib/commonjs/assets/digital_topup/step1_success.svg +21 -0
- package/lib/commonjs/assets/digital_topup/step2.svg +39 -0
- package/lib/commonjs/assets/digital_topup/step2_disable.svg +16 -0
- package/lib/commonjs/assets/digital_topup/step2_success.svg +21 -0
- package/lib/commonjs/assets/digital_topup/step3.svg +23 -0
- package/lib/commonjs/assets/digital_topup/step3_disable.svg +10 -0
- package/lib/commonjs/assets/digital_topup/step3_success.svg +21 -0
- package/lib/commonjs/assets/digital_topup/step4_disable.svg +16 -0
- package/lib/commonjs/assets/digital_topup/step4_success.svg +21 -0
- package/lib/commonjs/components/AlertLoan.js +1 -1
- package/lib/commonjs/components/AlertLoan.js.flow +1 -1
- package/lib/commonjs/components/AlertLoan.js.map +1 -1
- package/lib/commonjs/components/ItemTimaOneV3.js +1 -1
- package/lib/commonjs/components/ItemTimaOneV3.js.flow +1 -5
- package/lib/commonjs/components/ItemTimaOneV3.js.map +1 -1
- package/lib/commonjs/components/MHeader.js +1 -1
- package/lib/commonjs/components/MHeader.js.flow +3 -2
- package/lib/commonjs/components/MHeader.js.map +1 -1
- package/lib/commonjs/components/ModalOptionLoan.js +1 -1
- package/lib/commonjs/components/ModalOptionLoan.js.flow +4 -2
- package/lib/commonjs/components/ModalOptionLoan.js.map +1 -1
- package/lib/commonjs/components/ModalOptionLoanDigital.js +2 -0
- package/lib/commonjs/components/ModalOptionLoanDigital.js.flow +297 -0
- package/lib/commonjs/components/ModalOptionLoanDigital.js.map +1 -0
- package/lib/commonjs/navigation/primary-navigator.js +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.flow +0 -3
- package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +93 -56
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/QrPayment.js +1 -1
- package/lib/commonjs/screens/detail-loan/QrPayment.js.flow +1 -0
- package/lib/commonjs/screens/detail-loan/QrPayment.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/commonjs/screens/home/DigitalTopupItem.js +2 -0
- package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +562 -0
- package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -0
- package/lib/commonjs/screens/home/index.js +1 -1
- package/lib/commonjs/screens/home/index.js.flow +49 -4
- package/lib/commonjs/screens/home/index.js.map +1 -1
- package/lib/commonjs/screens/liveness-v2/index.js +1 -1
- package/lib/commonjs/screens/liveness-v2/index.js.flow +12 -9
- package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +3 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +1 -375
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.flow +12 -9
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.flow +16 -10
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +18 -15
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.flow +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +8 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.flow +20 -17
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.flow +14 -9
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
- package/lib/commonjs/sdkConfig.js +1 -1
- package/lib/commonjs/sdkConfig.js.flow +6 -0
- package/lib/commonjs/sdkConfig.js.map +1 -1
- package/lib/commonjs/services/api/api.js +1 -1
- package/lib/commonjs/services/api/api.js.flow +32 -0
- package/lib/commonjs/services/api/api.js.map +1 -1
- package/lib/module/RNTimacare.js +1 -1
- package/lib/module/RNTimacare.js.map +1 -1
- package/lib/module/assets/digital_topup/index.js +2 -0
- package/lib/module/assets/digital_topup/index.js.map +1 -0
- package/lib/module/assets/digital_topup/step1.svg +31 -0
- package/lib/module/assets/digital_topup/step1_disable.svg +31 -0
- package/lib/module/assets/digital_topup/step1_success.svg +21 -0
- package/lib/module/assets/digital_topup/step2.svg +39 -0
- package/lib/module/assets/digital_topup/step2_disable.svg +16 -0
- package/lib/module/assets/digital_topup/step2_success.svg +21 -0
- package/lib/module/assets/digital_topup/step3.svg +23 -0
- package/lib/module/assets/digital_topup/step3_disable.svg +10 -0
- package/lib/module/assets/digital_topup/step3_success.svg +21 -0
- package/lib/module/assets/digital_topup/step4_disable.svg +16 -0
- package/lib/module/assets/digital_topup/step4_success.svg +21 -0
- package/lib/module/components/AlertLoan.js +1 -1
- package/lib/module/components/AlertLoan.js.map +1 -1
- package/lib/module/components/ItemTimaOneV3.js +1 -1
- package/lib/module/components/ItemTimaOneV3.js.map +1 -1
- package/lib/module/components/MHeader.js +1 -1
- package/lib/module/components/MHeader.js.map +1 -1
- package/lib/module/components/ModalOptionLoan.js +1 -1
- package/lib/module/components/ModalOptionLoan.js.map +1 -1
- package/lib/module/components/ModalOptionLoanDigital.js +2 -0
- package/lib/module/components/ModalOptionLoanDigital.js.map +1 -0
- package/lib/module/navigation/primary-navigator.js +1 -1
- package/lib/module/navigation/primary-navigator.js.map +1 -1
- package/lib/module/screens/camera/CCCDCameraScreen.js +1 -1
- package/lib/module/screens/camera/CCCDCameraScreen.js.map +1 -1
- package/lib/module/screens/detail-loan/QrPayment.js +1 -1
- package/lib/module/screens/detail-loan/QrPayment.js.map +1 -1
- package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
- package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/module/screens/home/DigitalTopupItem.js +2 -0
- package/lib/module/screens/home/DigitalTopupItem.js.map +1 -0
- package/lib/module/screens/home/index.js +1 -1
- package/lib/module/screens/home/index.js.map +1 -1
- package/lib/module/screens/liveness-v2/index.js +1 -1
- package/lib/module/screens/liveness-v2/index.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewLoan.js +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSelfie.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
- package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistration.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
- package/lib/module/sdkConfig.js +1 -1
- package/lib/module/sdkConfig.js.map +1 -1
- package/lib/module/services/api/api.js +1 -1
- package/lib/module/services/api/api.js.map +1 -1
- package/lib/typescript/RNTimacare.d.ts.map +1 -1
- package/lib/typescript/assets/digital_topup/index.d.ts +14 -0
- package/lib/typescript/assets/digital_topup/index.d.ts.map +1 -0
- package/lib/typescript/components/ItemTimaOneV3.d.ts.map +1 -1
- package/lib/typescript/components/MHeader.d.ts.map +1 -1
- package/lib/typescript/components/ModalOptionLoan.d.ts.map +1 -1
- package/lib/typescript/components/ModalOptionLoanDigital.d.ts +9 -0
- package/lib/typescript/components/ModalOptionLoanDigital.d.ts.map +1 -0
- package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
- package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/QrPayment.d.ts.map +1 -1
- package/lib/typescript/screens/home/DigitalTopupItem.d.ts +7 -0
- package/lib/typescript/screens/home/DigitalTopupItem.d.ts.map +1 -0
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/lib/typescript/screens/liveness-v2/index.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSNationalIDFront.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistration.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationFront.d.ts.map +1 -1
- package/lib/typescript/sdkConfig.d.ts.map +1 -1
- package/lib/typescript/services/api/api.d.ts +32 -0
- package/lib/typescript/services/api/api.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/RNTimacare.tsx +0 -9
- package/src/assets/digital_topup/index.tsx +28 -0
- package/src/assets/digital_topup/step1.svg +31 -0
- package/src/assets/digital_topup/step1_disable.svg +31 -0
- package/src/assets/digital_topup/step1_success.svg +21 -0
- package/src/assets/digital_topup/step2.svg +39 -0
- package/src/assets/digital_topup/step2_disable.svg +16 -0
- package/src/assets/digital_topup/step2_success.svg +21 -0
- package/src/assets/digital_topup/step3.svg +23 -0
- package/src/assets/digital_topup/step3_disable.svg +10 -0
- package/src/assets/digital_topup/step3_success.svg +21 -0
- package/src/assets/digital_topup/step4_disable.svg +16 -0
- package/src/assets/digital_topup/step4_success.svg +21 -0
- package/src/components/AlertLoan.tsx +1 -1
- package/src/components/ItemTimaOneV3.tsx +1 -5
- package/src/components/MHeader.tsx +3 -2
- package/src/components/ModalOptionLoan.tsx +4 -2
- package/src/components/ModalOptionLoanDigital.tsx +297 -0
- package/src/navigation/primary-navigator.tsx +0 -3
- package/src/screens/camera/CCCDCameraScreen.tsx +93 -56
- package/src/screens/detail-loan/QrPayment.tsx +1 -0
- package/src/screens/detail-loan/ShowQrCode.tsx +1 -1
- package/src/screens/home/DigitalTopupItem.tsx +562 -0
- package/src/screens/home/index.tsx +49 -4
- package/src/screens/liveness-v2/index.tsx +12 -9
- package/src/screens/toan-trinh-so/OCR.tsx +3 -1
- package/src/screens/toan-trinh-so/ReviewLoan.tsx +1 -375
- package/src/screens/toan-trinh-so/TTSNationalIDFront.tsx +12 -9
- package/src/screens/toan-trinh-so/TTSSelfie.tsx +16 -10
- package/src/screens/toan-trinh-so/TTSSignLoan.tsx +18 -15
- package/src/screens/toan-trinh-so/TopupLoanInfo.tsx +1 -1
- package/src/screens/toan-trinh-so/VehicleCamera.tsx +8 -1
- package/src/screens/toan-trinh-so/VehicleRegistration.tsx +20 -17
- package/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx +14 -9
- package/src/sdkConfig.ts +6 -0
- package/src/services/api/api.ts +32 -0
|
@@ -50,10 +50,12 @@ import DeviceInfo from 'react-native-device-info';
|
|
|
50
50
|
import { IconUpload } from '../../assets/svgs';
|
|
51
51
|
import ImagePicker from 'react-native-image-crop-picker';
|
|
52
52
|
import { launchImageLibrary } from 'react-native-image-picker';
|
|
53
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
53
54
|
|
|
54
55
|
const { NFCReader } = NativeModules;
|
|
55
56
|
|
|
56
57
|
export const OCR = observer(function OCR(props: any) {
|
|
58
|
+
const insets = useSafeAreaInsets();
|
|
57
59
|
const isFocused = useIsFocused();
|
|
58
60
|
const [isLoading, setIsLoading] = useState(false);
|
|
59
61
|
const navigation = useNavigation();
|
|
@@ -379,7 +381,7 @@ export const OCR = observer(function OCR(props: any) {
|
|
|
379
381
|
style={{
|
|
380
382
|
alignItems: 'center',
|
|
381
383
|
position: 'absolute',
|
|
382
|
-
top:
|
|
384
|
+
top: insets.top + 16,
|
|
383
385
|
left: 0,
|
|
384
386
|
right: 0,
|
|
385
387
|
zIndex: 100,
|
|
@@ -222,7 +222,7 @@ export default function ReviewLoan(props: any) {
|
|
|
222
222
|
|
|
223
223
|
return (
|
|
224
224
|
<View style={{ flex: 1 }}>
|
|
225
|
-
<MHeader title="Vay
|
|
225
|
+
<MHeader title="Vay Online 24/7" />
|
|
226
226
|
<View style={commonStyles.fill}>
|
|
227
227
|
<View style={$h} />
|
|
228
228
|
<View style={$bg}>
|
|
@@ -653,380 +653,6 @@ export default function ReviewLoan(props: any) {
|
|
|
653
653
|
</MText>
|
|
654
654
|
</View>
|
|
655
655
|
</View>
|
|
656
|
-
|
|
657
|
-
{/* <MText style={[$title2, { marginTop: 10 }]}>
|
|
658
|
-
2.2 Thông tin giải ngân
|
|
659
|
-
</MText>
|
|
660
|
-
<MText style={$label}>Ngân hàng</MText>
|
|
661
|
-
<TouchableOpacity
|
|
662
|
-
style={$select}
|
|
663
|
-
onPress={() => {
|
|
664
|
-
navigation.push(ScreenNames.CommonSelect, {
|
|
665
|
-
title: 'Chọn ngân hàng',
|
|
666
|
-
data: ttsStore.listBank,
|
|
667
|
-
callback: (value) => {
|
|
668
|
-
setFieldValue('bankName', value.name);
|
|
669
|
-
setFieldValue('bankId', value.id);
|
|
670
|
-
},
|
|
671
|
-
});
|
|
672
|
-
}}
|
|
673
|
-
>
|
|
674
|
-
<MText
|
|
675
|
-
numberOfLines={1}
|
|
676
|
-
style={{
|
|
677
|
-
color: '#333333',
|
|
678
|
-
fontSize: 16,
|
|
679
|
-
fontWeight: '500',
|
|
680
|
-
flex: 1,
|
|
681
|
-
fontFamily: 'BeVietnamPro-Medium',
|
|
682
|
-
}}
|
|
683
|
-
>
|
|
684
|
-
{values.bankName}
|
|
685
|
-
</MText>
|
|
686
|
-
<DropDown2 />
|
|
687
|
-
</TouchableOpacity>
|
|
688
|
-
{errors && errors.bankName && (
|
|
689
|
-
<MText style={$error}>{errors.bankName}</MText>
|
|
690
|
-
)}
|
|
691
|
-
<MText style={[$label, { marginTop: 16 }]}>
|
|
692
|
-
Tên số tài khoản
|
|
693
|
-
</MText>
|
|
694
|
-
<TextInput
|
|
695
|
-
numberOfLines={1}
|
|
696
|
-
style={[
|
|
697
|
-
$textInput,
|
|
698
|
-
{
|
|
699
|
-
color: '#333333',
|
|
700
|
-
fontSize: 16,
|
|
701
|
-
fontWeight: '500',
|
|
702
|
-
},
|
|
703
|
-
]}
|
|
704
|
-
value={values.bankAccountName}
|
|
705
|
-
onChangeText={handleChange('bankAccountName')}
|
|
706
|
-
/>
|
|
707
|
-
{errors && errors.bankAccountName && (
|
|
708
|
-
<MText style={$error}>{errors.bankAccountName}</MText>
|
|
709
|
-
)}
|
|
710
|
-
<MText style={[$label, { marginTop: 16 }]}>Số tài khoản</MText>
|
|
711
|
-
<TextInput
|
|
712
|
-
keyboardType="number-pad"
|
|
713
|
-
numberOfLines={1}
|
|
714
|
-
style={[
|
|
715
|
-
$textInput,
|
|
716
|
-
{
|
|
717
|
-
color: '#333333',
|
|
718
|
-
fontSize: 16,
|
|
719
|
-
fontWeight: '500',
|
|
720
|
-
},
|
|
721
|
-
]}
|
|
722
|
-
value={values.bankAccountNumber}
|
|
723
|
-
onChangeText={handleChange('bankAccountNumber')}
|
|
724
|
-
/>
|
|
725
|
-
{errors && errors.bankAccountNumber && (
|
|
726
|
-
<MText style={$error}>{errors.bankAccountNumber}</MText>
|
|
727
|
-
)}
|
|
728
|
-
|
|
729
|
-
<MText style={[$title2, { marginTop: 10 }]}>
|
|
730
|
-
2.3 Thông tin tài sản
|
|
731
|
-
</MText>
|
|
732
|
-
<View style={$row}>
|
|
733
|
-
<View style={{ flex: 1 }}>
|
|
734
|
-
<MText style={$label}>Hãng xe</MText>
|
|
735
|
-
<TouchableOpacity
|
|
736
|
-
style={$select}
|
|
737
|
-
onPress={() => {
|
|
738
|
-
navigation.push(ScreenNames.CommonSelect, {
|
|
739
|
-
title: 'Hãng xe',
|
|
740
|
-
data: ttsStore.listBrand,
|
|
741
|
-
callback: (value) => {
|
|
742
|
-
setFieldValue('brand', value.name);
|
|
743
|
-
setFieldValue('yearCar', null);
|
|
744
|
-
setFieldValue('vehicles', null);
|
|
745
|
-
ttsStore.getListYearCar(value.name);
|
|
746
|
-
},
|
|
747
|
-
});
|
|
748
|
-
}}
|
|
749
|
-
>
|
|
750
|
-
<MText
|
|
751
|
-
numberOfLines={1}
|
|
752
|
-
style={{
|
|
753
|
-
color: '#333333',
|
|
754
|
-
fontSize: 16,
|
|
755
|
-
fontWeight: '500',
|
|
756
|
-
flex: 1,
|
|
757
|
-
fontFamily: 'BeVietnamPro-Medium',
|
|
758
|
-
}}
|
|
759
|
-
>
|
|
760
|
-
{values?.brand}
|
|
761
|
-
</MText>
|
|
762
|
-
<DropDown2 />
|
|
763
|
-
</TouchableOpacity>
|
|
764
|
-
{errors && errors.brand && (
|
|
765
|
-
<MText style={$error}>{errors.brand}</MText>
|
|
766
|
-
)}
|
|
767
|
-
</View>
|
|
768
|
-
<View style={{ flex: 1 }}>
|
|
769
|
-
<MText style={$label}>Năm sản xuất</MText>
|
|
770
|
-
<TouchableOpacity
|
|
771
|
-
style={$select}
|
|
772
|
-
onPress={() => {
|
|
773
|
-
navigation.push(ScreenNames.CommonSelect, {
|
|
774
|
-
title: 'Năm sản xuất',
|
|
775
|
-
data: ttsStore.listYear,
|
|
776
|
-
callback: (value) => {
|
|
777
|
-
setFieldValue('yearCar', value.name);
|
|
778
|
-
setFieldValue('vehicles', null);
|
|
779
|
-
ttsStore.getListCar(values.brand, value.name);
|
|
780
|
-
},
|
|
781
|
-
});
|
|
782
|
-
}}
|
|
783
|
-
>
|
|
784
|
-
<MText
|
|
785
|
-
numberOfLines={1}
|
|
786
|
-
style={{
|
|
787
|
-
color: '#333333',
|
|
788
|
-
fontSize: 16,
|
|
789
|
-
fontWeight: '500',
|
|
790
|
-
flex: 1,
|
|
791
|
-
fontFamily: 'BeVietnamPro-Medium',
|
|
792
|
-
}}
|
|
793
|
-
>
|
|
794
|
-
{values?.yearCar}
|
|
795
|
-
</MText>
|
|
796
|
-
<DropDown2 />
|
|
797
|
-
</TouchableOpacity>
|
|
798
|
-
{errors && errors.yearCar && (
|
|
799
|
-
<MText style={$error}>{errors.yearCar}</MText>
|
|
800
|
-
)}
|
|
801
|
-
</View>
|
|
802
|
-
</View>
|
|
803
|
-
<MText style={$label}>Tên xe/ Phiên bản xe</MText>
|
|
804
|
-
<TouchableOpacity
|
|
805
|
-
style={$select}
|
|
806
|
-
onPress={() => {
|
|
807
|
-
navigation.push(ScreenNames.CommonSelect, {
|
|
808
|
-
title: 'Tên xe/ Phiên bản xe',
|
|
809
|
-
data: ttsStore.listCar,
|
|
810
|
-
callback: (value) => {
|
|
811
|
-
setFieldValue('vehicles', value.name);
|
|
812
|
-
},
|
|
813
|
-
});
|
|
814
|
-
}}
|
|
815
|
-
>
|
|
816
|
-
<MText
|
|
817
|
-
numberOfLines={1}
|
|
818
|
-
style={{
|
|
819
|
-
color: '#333333',
|
|
820
|
-
fontSize: 16,
|
|
821
|
-
fontWeight: '500',
|
|
822
|
-
flex: 1,
|
|
823
|
-
fontFamily: 'BeVietnamPro-Medium',
|
|
824
|
-
}}
|
|
825
|
-
>
|
|
826
|
-
{values.vehicles}
|
|
827
|
-
</MText>
|
|
828
|
-
<DropDown2 />
|
|
829
|
-
</TouchableOpacity>
|
|
830
|
-
{errors && errors.vehicles && (
|
|
831
|
-
<MText style={$error}>{errors.vehicles}</MText>
|
|
832
|
-
)}
|
|
833
|
-
|
|
834
|
-
<MText style={[$label, { marginTop: 16 }]}>Số khung</MText>
|
|
835
|
-
<TextInput
|
|
836
|
-
numberOfLines={1}
|
|
837
|
-
style={[
|
|
838
|
-
$textInput,
|
|
839
|
-
{
|
|
840
|
-
color: '#333333',
|
|
841
|
-
fontSize: 16,
|
|
842
|
-
fontWeight: '500',
|
|
843
|
-
},
|
|
844
|
-
]}
|
|
845
|
-
value={values.chassis}
|
|
846
|
-
onChangeText={handleChange('chassis')}
|
|
847
|
-
/>
|
|
848
|
-
{errors && errors.chassis && (
|
|
849
|
-
<MText style={$error}>{errors.chassis}</MText>
|
|
850
|
-
)}
|
|
851
|
-
|
|
852
|
-
<View style={[$row, { marginTop: 16 }]}>
|
|
853
|
-
<View style={{ flex: 1 }}>
|
|
854
|
-
<MText style={$label}>Biển số xe</MText>
|
|
855
|
-
<TextInput
|
|
856
|
-
numberOfLines={1}
|
|
857
|
-
style={[
|
|
858
|
-
$textInput,
|
|
859
|
-
{
|
|
860
|
-
color: '#333333',
|
|
861
|
-
fontSize: 16,
|
|
862
|
-
fontWeight: '500',
|
|
863
|
-
},
|
|
864
|
-
]}
|
|
865
|
-
value={values.plateNumber}
|
|
866
|
-
onChangeText={handleChange('plateNumber')}
|
|
867
|
-
/>
|
|
868
|
-
{errors && errors.plateNumber && (
|
|
869
|
-
<MText style={$error}>{errors.plateNumber}</MText>
|
|
870
|
-
)}
|
|
871
|
-
</View>
|
|
872
|
-
<View style={{ flex: 1 }}>
|
|
873
|
-
<MText style={$label}>Số máy</MText>
|
|
874
|
-
<TextInput
|
|
875
|
-
numberOfLines={1}
|
|
876
|
-
style={[
|
|
877
|
-
$textInput,
|
|
878
|
-
{
|
|
879
|
-
color: '#333333',
|
|
880
|
-
fontSize: 16,
|
|
881
|
-
fontWeight: '500',
|
|
882
|
-
},
|
|
883
|
-
]}
|
|
884
|
-
value={values.engine}
|
|
885
|
-
onChangeText={handleChange('engine')}
|
|
886
|
-
/>
|
|
887
|
-
{errors && errors.engine && (
|
|
888
|
-
<MText style={$error}>{errors.engine}</MText>
|
|
889
|
-
)}
|
|
890
|
-
</View>
|
|
891
|
-
</View>
|
|
892
|
-
|
|
893
|
-
<MText style={$label}>Họ tên chủ xe</MText>
|
|
894
|
-
<TextInput
|
|
895
|
-
numberOfLines={1}
|
|
896
|
-
style={[
|
|
897
|
-
$textInput,
|
|
898
|
-
{
|
|
899
|
-
color: '#333333',
|
|
900
|
-
fontSize: 16,
|
|
901
|
-
fontWeight: '500',
|
|
902
|
-
},
|
|
903
|
-
]}
|
|
904
|
-
value={values.ownerFullName}
|
|
905
|
-
onChangeText={handleChange('ownerFullName')}
|
|
906
|
-
/>
|
|
907
|
-
{errors && errors.ownerFullName && (
|
|
908
|
-
<MText style={$error}>{errors.ownerFullName}</MText>
|
|
909
|
-
)}
|
|
910
|
-
|
|
911
|
-
<View style={[$row, { marginTop: 16 }]}>
|
|
912
|
-
<View style={{ flex: 1 }}>
|
|
913
|
-
<MText style={$label}>Số đăng ký xe</MText>
|
|
914
|
-
<TextInput
|
|
915
|
-
numberOfLines={1}
|
|
916
|
-
style={[
|
|
917
|
-
$textInput,
|
|
918
|
-
{
|
|
919
|
-
color: '#333333',
|
|
920
|
-
fontSize: 16,
|
|
921
|
-
fontWeight: '500',
|
|
922
|
-
},
|
|
923
|
-
]}
|
|
924
|
-
value={values.motobikeCertificateNumber}
|
|
925
|
-
onChangeText={handleChange('motobikeCertificateNumber')}
|
|
926
|
-
/>
|
|
927
|
-
{errors && errors.motobikeCertificateNumber && (
|
|
928
|
-
<MText style={$error}>
|
|
929
|
-
{errors.motobikeCertificateNumber}
|
|
930
|
-
</MText>
|
|
931
|
-
)}
|
|
932
|
-
</View>
|
|
933
|
-
<View style={{ flex: 1 }}>
|
|
934
|
-
<MText style={$label}>Ngày đăng ký</MText>
|
|
935
|
-
<TextInput
|
|
936
|
-
numberOfLines={1}
|
|
937
|
-
style={[
|
|
938
|
-
$textInput,
|
|
939
|
-
{
|
|
940
|
-
color: '#333333',
|
|
941
|
-
fontSize: 16,
|
|
942
|
-
fontWeight: '500',
|
|
943
|
-
},
|
|
944
|
-
]}
|
|
945
|
-
placeholder="DD/MM/YYYY"
|
|
946
|
-
placeholderTextColor="#BDBDBD"
|
|
947
|
-
value={values.motobikeCertificateDate}
|
|
948
|
-
onChangeText={handleChange('motobikeCertificateDate')}
|
|
949
|
-
/>
|
|
950
|
-
{errors && errors.motobikeCertificateDate && (
|
|
951
|
-
<MText style={$error}>
|
|
952
|
-
{errors.motobikeCertificateDate}
|
|
953
|
-
</MText>
|
|
954
|
-
)}
|
|
955
|
-
</View>
|
|
956
|
-
</View>
|
|
957
|
-
<View style={[$row]}>
|
|
958
|
-
<View style={{ flex: 1 }}>
|
|
959
|
-
<MText style={$label}>Loại tài sản</MText>
|
|
960
|
-
<TouchableOpacity
|
|
961
|
-
style={$select}
|
|
962
|
-
onPress={() => {
|
|
963
|
-
navigation.push(ScreenNames.MSelect, {
|
|
964
|
-
title: 'Loại tài sản',
|
|
965
|
-
data: EnumTypeAsset,
|
|
966
|
-
callback: (value) => {
|
|
967
|
-
setFieldValue('typeLoanBrief', value.id);
|
|
968
|
-
},
|
|
969
|
-
});
|
|
970
|
-
}}
|
|
971
|
-
>
|
|
972
|
-
<MText
|
|
973
|
-
numberOfLines={1}
|
|
974
|
-
style={{
|
|
975
|
-
color: '#333333',
|
|
976
|
-
fontSize: 16,
|
|
977
|
-
fontWeight: '500',
|
|
978
|
-
flex: 1,
|
|
979
|
-
fontFamily: 'BeVietnamPro-Medium',
|
|
980
|
-
}}
|
|
981
|
-
>
|
|
982
|
-
{
|
|
983
|
-
EnumTypeAsset.find(
|
|
984
|
-
(x) => x.id === values.typeLoanBrief
|
|
985
|
-
)?.name
|
|
986
|
-
}
|
|
987
|
-
</MText>
|
|
988
|
-
<DropDown2 />
|
|
989
|
-
</TouchableOpacity>
|
|
990
|
-
{errors && errors.typeLoanBrief && (
|
|
991
|
-
<MText style={$error}>{errors.typeLoanBrief}</MText>
|
|
992
|
-
)}
|
|
993
|
-
</View>
|
|
994
|
-
<View style={{ flex: 1 }}>
|
|
995
|
-
<MText style={$label}>Loại xe</MText>
|
|
996
|
-
<TouchableOpacity
|
|
997
|
-
style={$select}
|
|
998
|
-
onPress={() => {
|
|
999
|
-
navigation.push(ScreenNames.MSelect, {
|
|
1000
|
-
title: 'Loại xe',
|
|
1001
|
-
data: EnumTypeCar,
|
|
1002
|
-
callback: (value) => {
|
|
1003
|
-
setFieldValue('carTypeId', value.id);
|
|
1004
|
-
},
|
|
1005
|
-
});
|
|
1006
|
-
}}
|
|
1007
|
-
>
|
|
1008
|
-
<MText
|
|
1009
|
-
numberOfLines={1}
|
|
1010
|
-
style={{
|
|
1011
|
-
color: '#333333',
|
|
1012
|
-
fontSize: 16,
|
|
1013
|
-
fontWeight: '500',
|
|
1014
|
-
flex: 1,
|
|
1015
|
-
fontFamily: 'BeVietnamPro-Medium',
|
|
1016
|
-
}}
|
|
1017
|
-
>
|
|
1018
|
-
{
|
|
1019
|
-
EnumTypeCar.find((x) => x.id === values.carTypeId)
|
|
1020
|
-
?.name
|
|
1021
|
-
}
|
|
1022
|
-
</MText>
|
|
1023
|
-
<DropDown2 />
|
|
1024
|
-
</TouchableOpacity>
|
|
1025
|
-
{errors && errors.carTypeId && (
|
|
1026
|
-
<MText style={$error}>{errors.carTypeId}</MText>
|
|
1027
|
-
)}
|
|
1028
|
-
</View>
|
|
1029
|
-
</View> */}
|
|
1030
656
|
</ScrollView>
|
|
1031
657
|
)}
|
|
1032
658
|
</Formik>
|
|
@@ -47,18 +47,21 @@ export const TTSNationalIDFront = observer(function TTSNationalIDFront(props) {
|
|
|
47
47
|
const [photo, setPhoto] = useState(null);
|
|
48
48
|
const [isLoading, setIsLoading] = useState(false);
|
|
49
49
|
|
|
50
|
-
useEffect(
|
|
50
|
+
useEffect(() => {
|
|
51
51
|
if (props?.route?.params?.uri) {
|
|
52
52
|
setPhoto(props?.route?.params?.uri);
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
const trackEvent = async () => {
|
|
55
|
+
await logEvent('cccd_started', {
|
|
56
|
+
event: 'cccd_started',
|
|
57
|
+
createdAt: new Date(),
|
|
58
|
+
deviceId: appStore.deviceId,
|
|
59
|
+
loanId: String(props.route?.params?.loan?.id),
|
|
60
|
+
utmSource: props.route?.params?.loan?.utmSource,
|
|
61
|
+
});
|
|
62
|
+
logEventFb('cccd_started');
|
|
63
|
+
};
|
|
64
|
+
trackEvent();
|
|
62
65
|
}, []);
|
|
63
66
|
|
|
64
67
|
const takePhoto = () => {
|
|
@@ -124,16 +124,19 @@ export default function TTSSelfie(props: any) {
|
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
126
|
|
|
127
|
-
useEffect(
|
|
127
|
+
useEffect(() => {
|
|
128
128
|
requestPermissions();
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
const trackEvent = async () => {
|
|
130
|
+
await logEvent('cccd_completed', {
|
|
131
|
+
event: 'cccd_completed',
|
|
132
|
+
createdAt: new Date(),
|
|
133
|
+
deviceId: appStore.deviceId,
|
|
134
|
+
loanId: String(props?.route?.params?.loan?.id),
|
|
135
|
+
utmSource: props?.route?.params?.loan?.utmSource,
|
|
136
|
+
});
|
|
137
|
+
logEventFb('cccd_completed');
|
|
138
|
+
};
|
|
139
|
+
trackEvent();
|
|
137
140
|
}, []);
|
|
138
141
|
|
|
139
142
|
useEffect(() => {
|
|
@@ -176,7 +179,10 @@ export default function TTSSelfie(props: any) {
|
|
|
176
179
|
setIsLoading(false);
|
|
177
180
|
if (response.kind === 'ok') {
|
|
178
181
|
if (response.data?.meta.errorCode === 200) {
|
|
179
|
-
if (
|
|
182
|
+
if (
|
|
183
|
+
props?.route?.params?.loan?.typeLoan === 6 ||
|
|
184
|
+
props?.route?.params?.loan?.typeLoan === 4
|
|
185
|
+
) {
|
|
180
186
|
navigation.push(ScreenNames.TopupLoanInfo, {
|
|
181
187
|
loan: props?.route?.params?.loan,
|
|
182
188
|
});
|
|
@@ -65,23 +65,26 @@ export default function TTSSignLoan(props) {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
useEffect(
|
|
68
|
+
useEffect(() => {
|
|
69
69
|
if (loan) {
|
|
70
70
|
getContract();
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
71
|
+
const trackEvent = async () => {
|
|
72
|
+
await logEvent('kyhopdong_started', {
|
|
73
|
+
event: 'kyhopdong_started',
|
|
74
|
+
createdAt: new Date(),
|
|
75
|
+
deviceId: appStore.deviceId,
|
|
76
|
+
loanId: String(props?.route?.params?.loan?.id),
|
|
77
|
+
utmSource: props?.route?.params?.loan?.utmSource,
|
|
78
|
+
});
|
|
79
|
+
logEventFb('kyhopdong_started', {
|
|
80
|
+
event: 'kyhopdong_started',
|
|
81
|
+
createdAt: new Date(),
|
|
82
|
+
deviceId: appStore.deviceId,
|
|
83
|
+
loanId: props?.route?.params?.loan?.id,
|
|
84
|
+
utmSource: props?.route?.params?.loan?.utmSource,
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
trackEvent();
|
|
85
88
|
}
|
|
86
89
|
}, []);
|
|
87
90
|
|
|
@@ -153,7 +153,7 @@ export default function TopupLoanInfo(props) {
|
|
|
153
153
|
|
|
154
154
|
return (
|
|
155
155
|
<View style={{ flex: 1 }}>
|
|
156
|
-
<MHeader title="Vay
|
|
156
|
+
<MHeader title="Vay Online 24/7" />
|
|
157
157
|
<View style={commonStyles.fill}>
|
|
158
158
|
<View style={$h} />
|
|
159
159
|
<View style={$bg}>
|
|
@@ -50,6 +50,13 @@ const frameTop = ((screenWidth * 4) / 3 - frameHeight) / 2;
|
|
|
50
50
|
|
|
51
51
|
export default function VehicleCamera(props: any) {
|
|
52
52
|
const isFocused = useIsFocused();
|
|
53
|
+
const [cameraKey, setCameraKey] = useState(0);
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (isFocused) {
|
|
57
|
+
setCameraKey((prev) => prev + 1);
|
|
58
|
+
}
|
|
59
|
+
}, [isFocused]);
|
|
53
60
|
const [shouldRenderCamera, setShouldRenderCamera] = useState(false);
|
|
54
61
|
const navigation = useNavigation();
|
|
55
62
|
const [showModal, setShowModal] = useState(false);
|
|
@@ -191,7 +198,6 @@ export default function VehicleCamera(props: any) {
|
|
|
191
198
|
|
|
192
199
|
useEffect(() => {
|
|
193
200
|
let timeout: NodeJS.Timeout;
|
|
194
|
-
|
|
195
201
|
if (isFocused) {
|
|
196
202
|
// Delay mounting camera to give Android time to release the previous one
|
|
197
203
|
timeout = setTimeout(() => {
|
|
@@ -257,6 +263,7 @@ export default function VehicleCamera(props: any) {
|
|
|
257
263
|
{passPermission && shouldRenderCamera ? (
|
|
258
264
|
<View style={{ flex: 1 }}>
|
|
259
265
|
<RNCamera
|
|
266
|
+
key={cameraKey}
|
|
260
267
|
ref={myCamera}
|
|
261
268
|
defaultVideoQuality={RNCamera.Constants.VideoQuality['720p']}
|
|
262
269
|
style={{
|
|
@@ -39,26 +39,29 @@ export default function VehicleRegistration(props) {
|
|
|
39
39
|
const [photo, setPhoto] = useState(null);
|
|
40
40
|
const [isLoading, setIsLoading] = useState(false);
|
|
41
41
|
|
|
42
|
-
useEffect(
|
|
42
|
+
useEffect(() => {
|
|
43
43
|
if (props?.route?.params?.uri) {
|
|
44
44
|
setPhoto(props?.route?.params?.uri);
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
const trackStarted = async () => {
|
|
47
|
+
await logEvent('dangky_completed', {
|
|
48
|
+
event: 'dangky_completed',
|
|
49
|
+
createdAt: new Date(),
|
|
50
|
+
deviceId: appStore.deviceId,
|
|
51
|
+
loanId: String(props?.route?.params?.loan?.id),
|
|
52
|
+
utmSource: props?.route?.params?.loan?.utmSource,
|
|
53
|
+
});
|
|
54
|
+
logEventFb('dangky_completed');
|
|
55
|
+
await logEvent('dangkiem_started', {
|
|
56
|
+
event: 'dangkiem_started',
|
|
57
|
+
createdAt: new Date(),
|
|
58
|
+
deviceId: appStore.deviceId,
|
|
59
|
+
loanId: String(props?.route?.params?.loan?.id),
|
|
60
|
+
utmSource: props?.route?.params?.loan?.utmSource,
|
|
61
|
+
});
|
|
62
|
+
logEventFb('dangkiem_started');
|
|
63
|
+
};
|
|
64
|
+
trackStarted();
|
|
62
65
|
}, []);
|
|
63
66
|
|
|
64
67
|
const takePhoto = () => {
|
|
@@ -40,18 +40,23 @@ export default function VehicleRegistrationFront(props: any) {
|
|
|
40
40
|
const [photo, setPhoto] = useState(null);
|
|
41
41
|
const [isLoading, setIsLoading] = useState(false);
|
|
42
42
|
|
|
43
|
-
useEffect(
|
|
43
|
+
useEffect(() => {
|
|
44
44
|
if (props?.route?.params?.uri) {
|
|
45
45
|
setPhoto(props?.route?.params?.uri);
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
|
|
48
|
+
const trackStarted = async () => {
|
|
49
|
+
await logEvent('dangky_started', {
|
|
50
|
+
event: 'dangky_started',
|
|
51
|
+
createdAt: new Date(),
|
|
52
|
+
deviceId: appStore.deviceId,
|
|
53
|
+
loanId: String(props?.route?.params?.loan?.id),
|
|
54
|
+
utmSource: props?.route?.params?.loan?.utmSource,
|
|
55
|
+
});
|
|
56
|
+
logEventFb('dangky_started');
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
trackStarted();
|
|
55
60
|
}, []);
|
|
56
61
|
|
|
57
62
|
const takePhoto = () => {
|
package/src/sdkConfig.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import appStore from "./AppStore";
|
|
2
|
+
|
|
1
3
|
export type SDKConfig = {
|
|
2
4
|
baseUrl: string;
|
|
3
5
|
token?: string;
|
|
@@ -7,6 +9,10 @@ let config: SDKConfig | null = null;
|
|
|
7
9
|
|
|
8
10
|
export const initSDK = (options: SDKConfig) => {
|
|
9
11
|
config = options;
|
|
12
|
+
appStore.getDeviceId();
|
|
13
|
+
appStore.getPublicIp();
|
|
14
|
+
appStore.getAppId();
|
|
15
|
+
appStore.getDevicePayload();
|
|
10
16
|
};
|
|
11
17
|
|
|
12
18
|
export const getSDKConfig = (): SDKConfig => {
|