react-native-timacare 3.1.65 → 3.1.67
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/AppStore.js +1 -1
- package/lib/commonjs/AppStore.js.flow +4 -2
- package/lib/commonjs/AppStore.js.map +1 -1
- package/lib/commonjs/assets/v3/home.svg +5 -0
- package/lib/commonjs/assets/v3/index.js +2 -0
- package/lib/commonjs/assets/v3/index.js.flow +38 -0
- package/lib/commonjs/assets/v3/index.js.map +1 -0
- package/lib/commonjs/assets/v3/option1.svg +27 -0
- package/lib/commonjs/assets/v3/option2.svg +25 -0
- package/lib/commonjs/assets/v3/step1-success.svg +39 -0
- package/lib/commonjs/assets/v3/step1.svg +90 -0
- package/lib/commonjs/assets/v3/step2-disable.svg +14 -0
- package/lib/commonjs/assets/v3/step2-success.svg +8 -0
- package/lib/commonjs/assets/v3/step2.svg +37 -0
- package/lib/commonjs/assets/v3/step3-disable.svg +17 -0
- package/lib/commonjs/assets/v3/step3-success.svg +17 -0
- package/lib/commonjs/assets/v3/step3.svg +45 -0
- package/lib/commonjs/assets/v3/step4-disable.svg +11 -0
- package/lib/commonjs/assets/v3/step4-success.svg +11 -0
- package/lib/commonjs/assets/v3/step4.svg +29 -0
- package/lib/commonjs/assets/v3/step5-disable.svg +17 -0
- package/lib/commonjs/assets/v3/step5-success.svg +17 -0
- package/lib/commonjs/assets/v3/step5.svg +45 -0
- package/lib/commonjs/components/ItemTimaOneV2.js +2 -0
- package/lib/commonjs/components/ItemTimaOneV2.js.flow +617 -0
- package/lib/commonjs/components/ItemTimaOneV2.js.map +1 -0
- package/lib/commonjs/components/ItemTimaOneV3.js +2 -0
- package/lib/commonjs/components/ItemTimaOneV3.js.flow +558 -0
- package/lib/commonjs/components/ItemTimaOneV3.js.map +1 -0
- package/lib/commonjs/components/MText.js +1 -1
- package/lib/commonjs/components/MText.js.flow +1 -1
- package/lib/commonjs/components/ModalOptionLoan.js +2 -0
- package/lib/commonjs/components/ModalOptionLoan.js.flow +242 -0
- package/lib/commonjs/components/ModalOptionLoan.js.map +1 -0
- package/lib/commonjs/navigation/primary-navigator.js +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.flow +12 -0
- package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
- package/lib/commonjs/screens/eSign/index.js +1 -1
- package/lib/commonjs/screens/eSign/index.js.flow +53 -41
- package/lib/commonjs/screens/eSign/index.js.map +1 -1
- package/lib/commonjs/screens/home/index.js +1 -1
- package/lib/commonjs/screens/home/index.js.flow +64 -625
- package/lib/commonjs/screens/home/index.js.map +1 -1
- package/lib/commonjs/screens/mySignViettel/Layer_3.png +0 -0
- package/lib/commonjs/screens/mySignViettel/index.js +2 -0
- package/lib/commonjs/screens/mySignViettel/index.js.flow +278 -0
- package/lib/commonjs/screens/mySignViettel/index.js.map +1 -0
- package/lib/commonjs/screens/sign-tima/ViewContract.js +1 -1
- package/lib/commonjs/screens/sign-tima/ViewContract.js.flow +57 -43
- package/lib/commonjs/screens/sign-tima/ViewContract.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 +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js.flow +9 -2
- package/lib/commonjs/screens/toan-trinh-so/RegisterBack.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +110 -7
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +9 -8
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.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 +43 -169
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.flow +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.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 +1 -1
- 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 +17 -14
- 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 +71 -12
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.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 +133 -43
- 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 +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.flow +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.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 +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/store.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/store.js.flow +2 -2
- package/lib/commonjs/screens/toan-trinh-so/store.js.map +1 -1
- package/lib/commonjs/screens/v3/AssetInformation.js +2 -0
- package/lib/commonjs/screens/v3/AssetInformation.js.flow +690 -0
- package/lib/commonjs/screens/v3/AssetInformation.js.map +1 -0
- package/lib/commonjs/services/api/api.js +1 -1
- package/lib/commonjs/services/api/api.js.flow +196 -0
- package/lib/commonjs/services/api/api.js.map +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/commonjs/utils/index.js.flow +2 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/AppStore.js +1 -1
- package/lib/module/AppStore.js.map +1 -1
- package/lib/module/assets/v3/home.svg +5 -0
- package/lib/module/assets/v3/index.js +2 -0
- package/lib/module/assets/v3/index.js.map +1 -0
- package/lib/module/assets/v3/option1.svg +27 -0
- package/lib/module/assets/v3/option2.svg +25 -0
- package/lib/module/assets/v3/step1-success.svg +39 -0
- package/lib/module/assets/v3/step1.svg +90 -0
- package/lib/module/assets/v3/step2-disable.svg +14 -0
- package/lib/module/assets/v3/step2-success.svg +8 -0
- package/lib/module/assets/v3/step2.svg +37 -0
- package/lib/module/assets/v3/step3-disable.svg +17 -0
- package/lib/module/assets/v3/step3-success.svg +17 -0
- package/lib/module/assets/v3/step3.svg +45 -0
- package/lib/module/assets/v3/step4-disable.svg +11 -0
- package/lib/module/assets/v3/step4-success.svg +11 -0
- package/lib/module/assets/v3/step4.svg +29 -0
- package/lib/module/assets/v3/step5-disable.svg +17 -0
- package/lib/module/assets/v3/step5-success.svg +17 -0
- package/lib/module/assets/v3/step5.svg +45 -0
- package/lib/module/components/ItemTimaOneV2.js +2 -0
- package/lib/module/components/ItemTimaOneV2.js.map +1 -0
- package/lib/module/components/ItemTimaOneV3.js +2 -0
- package/lib/module/components/ItemTimaOneV3.js.map +1 -0
- package/lib/module/components/MText.js +1 -1
- package/lib/module/components/ModalOptionLoan.js +2 -0
- package/lib/module/components/ModalOptionLoan.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/eSign/index.js +1 -1
- package/lib/module/screens/eSign/index.js.map +1 -1
- package/lib/module/screens/home/index.js +1 -1
- package/lib/module/screens/home/index.js.map +1 -1
- package/lib/module/screens/mySignViettel/Layer_3.png +0 -0
- package/lib/module/screens/mySignViettel/index.js +2 -0
- package/lib/module/screens/mySignViettel/index.js.map +1 -0
- package/lib/module/screens/sign-tima/ViewContract.js +1 -1
- package/lib/module/screens/sign-tima/ViewContract.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/RegisterBack.js +1 -1
- package/lib/module/screens/toan-trinh-so/RegisterBack.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformation.js +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewInformationOther.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/TTSNationalIDBack.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.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/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/VehicleRegistrationBack.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.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/screens/toan-trinh-so/store.js +1 -1
- package/lib/module/screens/toan-trinh-so/store.js.map +1 -1
- package/lib/module/screens/v3/AssetInformation.js +2 -0
- package/lib/module/screens/v3/AssetInformation.js.map +1 -0
- package/lib/module/services/api/api.js +1 -1
- package/lib/module/services/api/api.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/AppStore.d.ts +2 -2
- package/lib/typescript/AppStore.d.ts.map +1 -1
- package/lib/typescript/assets/v3/index.d.ts +19 -0
- package/lib/typescript/assets/v3/index.d.ts.map +1 -0
- package/lib/typescript/components/ItemTimaOneV2.d.ts +7 -0
- package/lib/typescript/components/ItemTimaOneV2.d.ts.map +1 -0
- package/lib/typescript/components/ItemTimaOneV3.d.ts +7 -0
- package/lib/typescript/components/ItemTimaOneV3.d.ts.map +1 -0
- package/lib/typescript/components/ModalOptionLoan.d.ts +8 -0
- package/lib/typescript/components/ModalOptionLoan.d.ts.map +1 -0
- package/lib/typescript/navigation/primary-navigator.d.ts +2 -0
- package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
- package/lib/typescript/screens/eSign/index.d.ts.map +1 -1
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/lib/typescript/screens/mySignViettel/index.d.ts +2 -0
- package/lib/typescript/screens/mySignViettel/index.d.ts.map +1 -0
- package/lib/typescript/screens/sign-tima/ViewContract.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/RegisterBack.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.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/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/v3/AssetInformation.d.ts +2 -0
- package/lib/typescript/screens/v3/AssetInformation.d.ts.map +1 -0
- package/lib/typescript/services/api/api.d.ts +192 -0
- package/lib/typescript/services/api/api.d.ts.map +1 -1
- package/lib/typescript/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/AppStore.tsx +4 -2
- package/src/assets/v3/home.svg +5 -0
- package/src/assets/v3/index.tsx +38 -0
- package/src/assets/v3/option1.svg +27 -0
- package/src/assets/v3/option2.svg +25 -0
- package/src/assets/v3/step1-success.svg +39 -0
- package/src/assets/v3/step1.svg +90 -0
- package/src/assets/v3/step2-disable.svg +14 -0
- package/src/assets/v3/step2-success.svg +8 -0
- package/src/assets/v3/step2.svg +37 -0
- package/src/assets/v3/step3-disable.svg +17 -0
- package/src/assets/v3/step3-success.svg +17 -0
- package/src/assets/v3/step3.svg +45 -0
- package/src/assets/v3/step4-disable.svg +11 -0
- package/src/assets/v3/step4-success.svg +11 -0
- package/src/assets/v3/step4.svg +29 -0
- package/src/assets/v3/step5-disable.svg +17 -0
- package/src/assets/v3/step5-success.svg +17 -0
- package/src/assets/v3/step5.svg +45 -0
- package/src/components/ItemTimaOneV2.tsx +617 -0
- package/src/components/ItemTimaOneV3.tsx +558 -0
- package/src/components/MText.tsx +1 -1
- package/src/components/ModalOptionLoan.tsx +242 -0
- package/src/navigation/primary-navigator.tsx +12 -0
- package/src/screens/eSign/index.tsx +53 -41
- package/src/screens/home/index.tsx +64 -625
- package/src/screens/mySignViettel/Layer_3.png +0 -0
- package/src/screens/mySignViettel/index.tsx +278 -0
- package/src/screens/sign-tima/ViewContract.tsx +57 -43
- package/src/screens/toan-trinh-so/OCR.tsx +1 -1
- package/src/screens/toan-trinh-so/RegisterBack.tsx +9 -2
- package/src/screens/toan-trinh-so/ReviewInformation.tsx +110 -7
- package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +9 -8
- package/src/screens/toan-trinh-so/ReviewLoan.tsx +43 -169
- package/src/screens/toan-trinh-so/TTSNationalIDBack.tsx +1 -1
- package/src/screens/toan-trinh-so/TTSNationalIDFront.tsx +1 -1
- package/src/screens/toan-trinh-so/TTSSelfie.tsx +17 -14
- package/src/screens/toan-trinh-so/TTSSignLoan.tsx +71 -12
- package/src/screens/toan-trinh-so/VehicleCamera.tsx +133 -43
- package/src/screens/toan-trinh-so/VehicleRegistration.tsx +1 -1
- package/src/screens/toan-trinh-so/VehicleRegistrationBack.tsx +1 -1
- package/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx +1 -1
- package/src/screens/toan-trinh-so/store.ts +2 -2
- package/src/screens/v3/AssetInformation.tsx +690 -0
- package/src/services/api/api.ts +196 -0
- package/src/utils/index.tsx +2 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import {
|
|
4
|
+
Alert,
|
|
5
|
+
SafeAreaView,
|
|
6
|
+
TextStyle,
|
|
7
|
+
TouchableOpacity,
|
|
8
|
+
View,
|
|
9
|
+
ViewStyle,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import Modal from 'react-native-modal';
|
|
12
|
+
import { MText } from './MText';
|
|
13
|
+
import MButton from './MButton';
|
|
14
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
15
|
+
import { IconOption1, IconOption2 } from '../assets/v3';
|
|
16
|
+
import { RadioCheckIcon, RadioIcon } from '../assets/icons';
|
|
17
|
+
import { formatMoney } from '../utils';
|
|
18
|
+
import { Api } from '../services/api';
|
|
19
|
+
|
|
20
|
+
interface IModalOptionLoan {
|
|
21
|
+
open: boolean;
|
|
22
|
+
loan?: any;
|
|
23
|
+
callback?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export default function ModalOptionLoan({
|
|
26
|
+
open,
|
|
27
|
+
loan,
|
|
28
|
+
callback,
|
|
29
|
+
}: IModalOptionLoan) {
|
|
30
|
+
const [option, setOption] = useState(loan?.productId1);
|
|
31
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (loan) {
|
|
35
|
+
setOption(loan?.productId1);
|
|
36
|
+
}
|
|
37
|
+
}, [loan]);
|
|
38
|
+
|
|
39
|
+
const onSubmit = async () => {
|
|
40
|
+
try {
|
|
41
|
+
setIsLoading(false);
|
|
42
|
+
const response = await Api.getInstance().updateProductLoan({
|
|
43
|
+
LoanBriefId: loan?.loanBriefId,
|
|
44
|
+
ProductId: option,
|
|
45
|
+
LoanAmount:
|
|
46
|
+
option === loan?.productId1 ? loan?.loanAmount1 : loan?.loanAmount2,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
setIsLoading(false);
|
|
50
|
+
if (response.kind === 'ok' && response.data?.meta?.errorCode === 200) {
|
|
51
|
+
if (callback) callback();
|
|
52
|
+
} else {
|
|
53
|
+
Alert.alert(
|
|
54
|
+
'Thông báo',
|
|
55
|
+
response.data?.meta?.errorMessage ||
|
|
56
|
+
'Có lỗi xảy ra. Vui lòng thử lại sau'
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
} catch (error) {
|
|
60
|
+
console.log(error);
|
|
61
|
+
} finally {
|
|
62
|
+
setIsLoading(false);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
return (
|
|
66
|
+
<Modal isVisible={open}>
|
|
67
|
+
<SafeAreaView
|
|
68
|
+
style={{
|
|
69
|
+
backgroundColor: '#FFFFFF',
|
|
70
|
+
borderRadius: 12,
|
|
71
|
+
borderTopWidth: 4,
|
|
72
|
+
borderColor: '#EF592E',
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
<MText
|
|
76
|
+
style={{
|
|
77
|
+
textAlign: 'center',
|
|
78
|
+
fontSize: 16,
|
|
79
|
+
fontWeight: 'bold',
|
|
80
|
+
marginTop: 10,
|
|
81
|
+
marginBottom: 10,
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
Chúc mừng bạn!
|
|
85
|
+
</MText>
|
|
86
|
+
<MText
|
|
87
|
+
style={{
|
|
88
|
+
textAlign: 'center',
|
|
89
|
+
color: '#828282',
|
|
90
|
+
paddingHorizontal: 16,
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
Bạn đã được phê duyệt khoản vay với số tiền lên tới là{' '}
|
|
94
|
+
<MText
|
|
95
|
+
style={{
|
|
96
|
+
color: '#EF592E',
|
|
97
|
+
fontWeight: 'bold',
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
{formatMoney(loan?.loanAmount2)} VNĐ
|
|
101
|
+
</MText>
|
|
102
|
+
! Vui lòng chọn gói vay và hoàn thiện các bước để được giải ngân nhanh
|
|
103
|
+
nhất!
|
|
104
|
+
</MText>
|
|
105
|
+
<TouchableOpacity
|
|
106
|
+
onPress={() => {
|
|
107
|
+
setOption(loan?.productId1);
|
|
108
|
+
}}
|
|
109
|
+
style={[
|
|
110
|
+
$opt,
|
|
111
|
+
{
|
|
112
|
+
backgroundColor:
|
|
113
|
+
option === loan?.productId1 ? '#FFF7EA' : '#FFFFFF',
|
|
114
|
+
},
|
|
115
|
+
]}
|
|
116
|
+
>
|
|
117
|
+
<View
|
|
118
|
+
style={{
|
|
119
|
+
flexDirection: 'row',
|
|
120
|
+
alignItems: 'center',
|
|
121
|
+
gap: 10,
|
|
122
|
+
marginBottom: 10,
|
|
123
|
+
}}
|
|
124
|
+
>
|
|
125
|
+
<IconOption1 />
|
|
126
|
+
<View style={{ flex: 1 }}>
|
|
127
|
+
<MText
|
|
128
|
+
style={{
|
|
129
|
+
fontWeight: 'bold',
|
|
130
|
+
}}
|
|
131
|
+
>
|
|
132
|
+
{loan?.productName1}
|
|
133
|
+
</MText>
|
|
134
|
+
<MText
|
|
135
|
+
style={{
|
|
136
|
+
fontWeight: 'bold',
|
|
137
|
+
color: '#EF592E',
|
|
138
|
+
}}
|
|
139
|
+
>
|
|
140
|
+
{formatMoney(loan?.loanAmount1)} VNĐ
|
|
141
|
+
</MText>
|
|
142
|
+
</View>
|
|
143
|
+
{option === loan?.productId1 ? <RadioCheckIcon /> : <RadioIcon />}
|
|
144
|
+
</View>
|
|
145
|
+
<MText style={$des}>- Không thu đăng ký xe</MText>
|
|
146
|
+
<MText style={$des}>
|
|
147
|
+
- Không cần gặp mặt, online 100% toàn trình
|
|
148
|
+
</MText>
|
|
149
|
+
<MText style={$des}>- Giải ngân ngay lên đến 50,000,000đ</MText>
|
|
150
|
+
</TouchableOpacity>
|
|
151
|
+
<TouchableOpacity
|
|
152
|
+
onPress={() => {
|
|
153
|
+
setOption(loan?.productId2);
|
|
154
|
+
}}
|
|
155
|
+
style={[
|
|
156
|
+
$opt,
|
|
157
|
+
{
|
|
158
|
+
backgroundColor:
|
|
159
|
+
option === loan?.productId2 ? '#FFF7EA' : '#FFFFFF',
|
|
160
|
+
},
|
|
161
|
+
]}
|
|
162
|
+
>
|
|
163
|
+
<View
|
|
164
|
+
style={{
|
|
165
|
+
flexDirection: 'row',
|
|
166
|
+
alignItems: 'center',
|
|
167
|
+
gap: 10,
|
|
168
|
+
marginBottom: 10,
|
|
169
|
+
}}
|
|
170
|
+
>
|
|
171
|
+
<IconOption2 />
|
|
172
|
+
<View style={{ flex: 1 }}>
|
|
173
|
+
<MText
|
|
174
|
+
style={{
|
|
175
|
+
fontWeight: 'bold',
|
|
176
|
+
}}
|
|
177
|
+
>
|
|
178
|
+
{loan?.productName2}
|
|
179
|
+
</MText>
|
|
180
|
+
<MText
|
|
181
|
+
style={{
|
|
182
|
+
fontWeight: 'bold',
|
|
183
|
+
color: '#EF592E',
|
|
184
|
+
}}
|
|
185
|
+
>
|
|
186
|
+
{formatMoney(loan?.loanAmount2)} VNĐ
|
|
187
|
+
</MText>
|
|
188
|
+
</View>
|
|
189
|
+
{option === loan?.productId2 ? <RadioCheckIcon /> : <RadioIcon />}
|
|
190
|
+
</View>
|
|
191
|
+
<MText style={$des}>- Có thu đăng ký xe</MText>
|
|
192
|
+
<MText style={$des}>
|
|
193
|
+
- Có gặp mặt nhân viên hỗ trợ thủ tục nhanh{'\n'}chóng, đơn giản.
|
|
194
|
+
</MText>
|
|
195
|
+
<MText style={$des}>- Giải ngân ngay lên đến y triệu.</MText>
|
|
196
|
+
</TouchableOpacity>
|
|
197
|
+
<MButton
|
|
198
|
+
disabled={isLoading}
|
|
199
|
+
onPress={() => onSubmit()}
|
|
200
|
+
style={{
|
|
201
|
+
marginHorizontal: 16,
|
|
202
|
+
}}
|
|
203
|
+
>
|
|
204
|
+
<LinearGradient
|
|
205
|
+
start={{ x: 1, y: 0 }}
|
|
206
|
+
end={{ x: 0, y: 1 }}
|
|
207
|
+
style={{
|
|
208
|
+
height: 40,
|
|
209
|
+
marginVertical: 16,
|
|
210
|
+
borderRadius: 30,
|
|
211
|
+
alignItems: 'center',
|
|
212
|
+
justifyContent: 'center',
|
|
213
|
+
}}
|
|
214
|
+
colors={['#FF7A00', '#EF4123']}
|
|
215
|
+
>
|
|
216
|
+
<MText
|
|
217
|
+
style={{
|
|
218
|
+
color: 'white',
|
|
219
|
+
fontSize: 16,
|
|
220
|
+
}}
|
|
221
|
+
>
|
|
222
|
+
Xác nhận
|
|
223
|
+
</MText>
|
|
224
|
+
</LinearGradient>
|
|
225
|
+
</MButton>
|
|
226
|
+
</SafeAreaView>
|
|
227
|
+
</Modal>
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const $opt: ViewStyle = {
|
|
232
|
+
borderWidth: 1,
|
|
233
|
+
borderRadius: 8,
|
|
234
|
+
borderColor: '#E5E5EA',
|
|
235
|
+
marginHorizontal: 16,
|
|
236
|
+
marginTop: 10,
|
|
237
|
+
padding: 10,
|
|
238
|
+
};
|
|
239
|
+
const $des: TextStyle = {
|
|
240
|
+
fontSize: 12,
|
|
241
|
+
color: '#828282',
|
|
242
|
+
};
|
|
@@ -78,6 +78,8 @@ import { Api } from '../services/api';
|
|
|
78
78
|
import CCCDCameraScreen from '../screens/camera/CCCDCameraScreen';
|
|
79
79
|
import { Home } from '../screens/home';
|
|
80
80
|
import TopupLoanInfo from '../screens/toan-trinh-so/TopupLoanInfo';
|
|
81
|
+
import { AssetInformation } from '../screens/v3/AssetInformation';
|
|
82
|
+
import MySignViettel from '../screens/mySignViettel';
|
|
81
83
|
|
|
82
84
|
export const ScreenNames = {
|
|
83
85
|
Splash: 'Splash',
|
|
@@ -153,6 +155,8 @@ export const ScreenNames = {
|
|
|
153
155
|
RegisterBack: 'RegisterBack',
|
|
154
156
|
CCCDCameraScreen: 'CCCDCameraScreen',
|
|
155
157
|
TopupLoanInfo: 'TopupLoanInfo',
|
|
158
|
+
AssetInformation: 'AssetInformation',
|
|
159
|
+
MySignViettel: 'MySignViettel',
|
|
156
160
|
};
|
|
157
161
|
|
|
158
162
|
const Stack = createNativeStackNavigator();
|
|
@@ -322,6 +326,14 @@ export function PrimaryNavigator(props) {
|
|
|
322
326
|
name={ScreenNames.TopupLoanInfo}
|
|
323
327
|
component={TopupLoanInfo}
|
|
324
328
|
/>
|
|
329
|
+
<Stack.Screen
|
|
330
|
+
name={ScreenNames.AssetInformation}
|
|
331
|
+
component={AssetInformation}
|
|
332
|
+
/>
|
|
333
|
+
<Stack.Screen
|
|
334
|
+
name={ScreenNames.MySignViettel}
|
|
335
|
+
component={MySignViettel}
|
|
336
|
+
/>
|
|
325
337
|
</Stack.Navigator>
|
|
326
338
|
);
|
|
327
339
|
}
|
|
@@ -122,47 +122,59 @@ export const ESign = observer(function ESign(props: any) {
|
|
|
122
122
|
// setIsLoading(false);
|
|
123
123
|
// }
|
|
124
124
|
// );
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
125
|
+
try {
|
|
126
|
+
setIsLoading(true);
|
|
127
|
+
const response = await Api.getInstance().sign_viettel_for_borrower({
|
|
128
|
+
loanBriefId: loan.id,
|
|
129
|
+
});
|
|
130
|
+
if (response.kind === 'ok' && response.data?.meta?.errorCode === 200) {
|
|
131
|
+
if (response.data?.data) {
|
|
132
|
+
navigation.push(ScreenNames.MySignViettel, {
|
|
133
|
+
url: response?.data?.data,
|
|
134
|
+
});
|
|
135
|
+
} else {
|
|
136
|
+
Alert.alert(
|
|
137
|
+
'Thông báo',
|
|
138
|
+
'Vui lòng kiểm tra tin nhắn hoặc email để xác nhận ký hợp đồng',
|
|
139
|
+
[
|
|
140
|
+
{
|
|
141
|
+
text: 'OK',
|
|
142
|
+
onPress: () => {
|
|
143
|
+
navigation.dispatch(
|
|
144
|
+
CommonActions.reset({
|
|
145
|
+
index: 1,
|
|
146
|
+
routes: [{ name: ScreenNames.Main }],
|
|
147
|
+
})
|
|
148
|
+
);
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
]
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
} else {
|
|
155
|
+
Alert.alert(
|
|
156
|
+
'Thông báo',
|
|
157
|
+
response.data?.meta?.errorMessage ||
|
|
158
|
+
'Có lỗi xảy ra, vui lòng thử lại sau',
|
|
159
|
+
[
|
|
160
|
+
{
|
|
161
|
+
text: 'OK',
|
|
162
|
+
onPress: () => {
|
|
163
|
+
navigation.dispatch(
|
|
164
|
+
CommonActions.reset({
|
|
165
|
+
index: 1,
|
|
166
|
+
routes: [{ name: ScreenNames.Main }],
|
|
167
|
+
})
|
|
168
|
+
);
|
|
169
|
+
},
|
|
162
170
|
},
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
171
|
+
]
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
} catch (error) {
|
|
175
|
+
console.log(error);
|
|
176
|
+
} finally {
|
|
177
|
+
setIsLoading(false);
|
|
166
178
|
}
|
|
167
179
|
};
|
|
168
180
|
|
|
@@ -441,7 +453,7 @@ export const ESign = observer(function ESign(props: any) {
|
|
|
441
453
|
</View>
|
|
442
454
|
</Modal>
|
|
443
455
|
|
|
444
|
-
<Loading isLoading={loading} />
|
|
456
|
+
<Loading isLoading={loading || isLoading} />
|
|
445
457
|
</View>
|
|
446
458
|
);
|
|
447
459
|
});
|