@tima2025/react-native-timalender 1.0.1-glink → 1.0.2
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/assets/images/Invest/index.js +1 -1
- package/lib/commonjs/assets/images/Invest/index.js.flow +5 -12
- package/lib/commonjs/assets/images/Invest/index.js.map +1 -1
- package/lib/commonjs/assets/images/InvestNew/index.js +1 -1
- package/lib/commonjs/assets/images/InvestNew/index.js.flow +14 -14
- package/lib/commonjs/assets/images/InvestNew/index.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.flow +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/Navigation/TabNavigation.js +1 -1
- package/lib/commonjs/components/Navigation/TabNavigation.js.flow +0 -3
- package/lib/commonjs/components/Navigation/TabNavigation.js.map +1 -1
- package/lib/commonjs/controllers/Client.js +1 -1
- package/lib/commonjs/controllers/Client.js.flow +5 -3
- package/lib/commonjs/controllers/Client.js.map +1 -1
- package/lib/commonjs/screens/About/index.js +1 -1
- package/lib/commonjs/screens/About/index.js.flow +1 -1
- package/lib/commonjs/screens/About/index.js.map +1 -1
- package/lib/commonjs/screens/AdditionalInvestmentCapital/Components/Success.js +1 -1
- package/lib/commonjs/screens/AdditionalInvestmentCapital/Components/Success.js.flow +2 -2
- package/lib/commonjs/screens/AdditionalInvestmentCapital/Components/Success.js.map +1 -1
- package/lib/commonjs/screens/Confirm/index.js +1 -1
- package/lib/commonjs/screens/Confirm/index.js.flow +1 -1
- package/lib/commonjs/screens/Confirm/index.js.map +1 -1
- package/lib/commonjs/screens/ConnectBank/index.js +1 -1
- package/lib/commonjs/screens/ConnectBank/index.js.flow +2 -2
- package/lib/commonjs/screens/ConnectBank/index.js.map +1 -1
- package/lib/commonjs/screens/EkycLiveness/EkycCamera.js +1 -1
- package/lib/commonjs/screens/EkycLiveness/EkycCamera.js.flow +16 -28
- package/lib/commonjs/screens/EkycLiveness/EkycCamera.js.map +1 -1
- package/lib/commonjs/screens/EkycLiveness/index.js +1 -1
- package/lib/commonjs/screens/EkycLiveness/index.js.flow +44 -84
- package/lib/commonjs/screens/EkycLiveness/index.js.map +1 -1
- package/lib/commonjs/screens/GpayInfor/Gpay.js +1 -1
- package/lib/commonjs/screens/GpayInfor/Gpay.js.flow +1 -1
- package/lib/commonjs/screens/GpayInfor/Gpay.js.map +1 -1
- package/lib/commonjs/screens/Guide/index.js +1 -1
- package/lib/commonjs/screens/Guide/index.js.flow +3 -3
- package/lib/commonjs/screens/Guide/index.js.map +1 -1
- package/lib/commonjs/screens/InputBank/index.js +1 -1
- package/lib/commonjs/screens/InputBank/index.js.flow +2 -2
- package/lib/commonjs/screens/InputBank/index.js.map +1 -1
- package/lib/commonjs/screens/Invest/Screens/HomeLoan.js +1 -1
- package/lib/commonjs/screens/Invest/Screens/HomeLoan.js.flow +1 -2
- package/lib/commonjs/screens/Invest/Screens/HomeLoan.js.map +1 -1
- package/lib/commonjs/screens/InvestNew/Screens/HomeLoan.js +1 -1
- package/lib/commonjs/screens/InvestNew/Screens/HomeLoan.js.flow +1 -2
- package/lib/commonjs/screens/InvestNew/Screens/HomeLoan.js.map +1 -1
- package/lib/commonjs/screens/LoanApplication/Components/ModalWarn.js +1 -1
- package/lib/commonjs/screens/LoanApplication/Components/ModalWarn.js.flow +1 -1
- package/lib/commonjs/screens/LoanApplication/Components/ModalWarn.js.map +1 -1
- package/lib/commonjs/screens/Notification/index.js.flow +1 -1
- package/lib/commonjs/screens/Optional/index.js +1 -1
- package/lib/commonjs/screens/Optional/index.js.flow +74 -58
- package/lib/commonjs/screens/Optional/index.js.map +1 -1
- package/lib/commonjs/screens/PendingLoan/Tabs/Tab1.js +1 -1
- package/lib/commonjs/screens/PendingLoan/Tabs/Tab1.js.flow +1 -1
- package/lib/commonjs/screens/PendingLoan/Tabs/Tab1.js.map +1 -1
- package/lib/commonjs/screens/ReceivedLoan/Components/Tab1.js +1 -1
- package/lib/commonjs/screens/ReceivedLoan/Components/Tab1.js.flow +1 -1
- package/lib/commonjs/screens/ReceivedLoan/Components/Tab1.js.map +1 -1
- package/lib/commonjs/screens/Sign-in/index.js +1 -1
- package/lib/commonjs/screens/Sign-in/index.js.flow +1 -1
- package/lib/commonjs/screens/Sign-in/index.js.map +1 -1
- package/lib/commonjs/screens/SignContractGpayTima/ConfirmContact.js +1 -1
- package/lib/commonjs/screens/SignContractGpayTima/ConfirmContact.js.flow +28 -34
- package/lib/commonjs/screens/SignContractGpayTima/ConfirmContact.js.map +1 -1
- package/lib/commonjs/screens/SignContractGpayTima/SignContract.js +1 -1
- package/lib/commonjs/screens/SignContractGpayTima/SignContract.js.flow +34 -38
- package/lib/commonjs/screens/SignContractGpayTima/SignContract.js.map +1 -1
- package/lib/commonjs/screens/SignContractGpayTima/index.js +1 -1
- package/lib/commonjs/screens/SignContractGpayTima/index.js.flow +2 -2
- package/lib/commonjs/screens/SignContractGpayTima/index.js.map +1 -1
- package/lib/commonjs/screens/Support/index.js +1 -1
- package/lib/commonjs/screens/Support/index.js.flow +1 -1
- package/lib/commonjs/screens/Support/index.js.map +1 -1
- package/lib/commonjs/screens/Transfer/Components/PopoverChooseShop.js +1 -1
- package/lib/commonjs/screens/Transfer/Components/PopoverChooseShop.js.flow +2 -2
- package/lib/commonjs/screens/Transfer/Components/PopoverChooseShop.js.map +1 -1
- package/lib/commonjs/utils/notification.js +1 -1
- package/lib/commonjs/utils/notification.js.flow +8 -10
- package/lib/commonjs/utils/notification.js.map +1 -1
- package/lib/module/assets/images/Invest/index.js +1 -1
- package/lib/module/assets/images/Invest/index.js.map +1 -1
- package/lib/module/assets/images/InvestNew/index.js +1 -1
- package/lib/module/assets/images/InvestNew/index.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/Navigation/TabNavigation.js +1 -1
- package/lib/module/components/Navigation/TabNavigation.js.map +1 -1
- package/lib/module/controllers/Client.js +1 -1
- package/lib/module/controllers/Client.js.map +1 -1
- package/lib/module/screens/About/index.js +1 -1
- package/lib/module/screens/About/index.js.map +1 -1
- package/lib/module/screens/AdditionalInvestmentCapital/Components/Success.js +1 -1
- package/lib/module/screens/AdditionalInvestmentCapital/Components/Success.js.map +1 -1
- package/lib/module/screens/Confirm/index.js +1 -1
- package/lib/module/screens/Confirm/index.js.map +1 -1
- package/lib/module/screens/ConnectBank/index.js +1 -1
- package/lib/module/screens/ConnectBank/index.js.map +1 -1
- package/lib/module/screens/EkycLiveness/EkycCamera.js +1 -1
- package/lib/module/screens/EkycLiveness/EkycCamera.js.map +1 -1
- package/lib/module/screens/EkycLiveness/index.js +1 -1
- package/lib/module/screens/EkycLiveness/index.js.map +1 -1
- package/lib/module/screens/GpayInfor/Gpay.js +1 -1
- package/lib/module/screens/GpayInfor/Gpay.js.map +1 -1
- package/lib/module/screens/Guide/index.js +1 -1
- package/lib/module/screens/Guide/index.js.map +1 -1
- package/lib/module/screens/InputBank/index.js +1 -1
- package/lib/module/screens/InputBank/index.js.map +1 -1
- package/lib/module/screens/Invest/Screens/HomeLoan.js +1 -1
- package/lib/module/screens/Invest/Screens/HomeLoan.js.map +1 -1
- package/lib/module/screens/InvestNew/Screens/HomeLoan.js +1 -1
- package/lib/module/screens/InvestNew/Screens/HomeLoan.js.map +1 -1
- package/lib/module/screens/LoanApplication/Components/ModalWarn.js +1 -1
- package/lib/module/screens/LoanApplication/Components/ModalWarn.js.map +1 -1
- package/lib/module/screens/Optional/index.js +1 -1
- package/lib/module/screens/Optional/index.js.map +1 -1
- package/lib/module/screens/PendingLoan/Tabs/Tab1.js +1 -1
- package/lib/module/screens/PendingLoan/Tabs/Tab1.js.map +1 -1
- package/lib/module/screens/ReceivedLoan/Components/Tab1.js +1 -1
- package/lib/module/screens/ReceivedLoan/Components/Tab1.js.map +1 -1
- package/lib/module/screens/Sign-in/index.js +1 -1
- package/lib/module/screens/Sign-in/index.js.map +1 -1
- package/lib/module/screens/SignContractGpayTima/ConfirmContact.js +1 -1
- package/lib/module/screens/SignContractGpayTima/ConfirmContact.js.map +1 -1
- package/lib/module/screens/SignContractGpayTima/SignContract.js +1 -1
- package/lib/module/screens/SignContractGpayTima/SignContract.js.map +1 -1
- package/lib/module/screens/SignContractGpayTima/index.js +1 -1
- package/lib/module/screens/SignContractGpayTima/index.js.map +1 -1
- package/lib/module/screens/Support/index.js +1 -1
- package/lib/module/screens/Support/index.js.map +1 -1
- package/lib/module/screens/Transfer/Components/PopoverChooseShop.js +1 -1
- package/lib/module/screens/Transfer/Components/PopoverChooseShop.js.map +1 -1
- package/lib/module/utils/notification.js +1 -1
- package/lib/module/utils/notification.js.map +1 -1
- package/lib/typescript/src/assets/images/Invest/index.d.ts.map +1 -1
- package/lib/typescript/src/assets/images/InvestNew/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Navigation/TabNavigation.d.ts.map +1 -1
- package/lib/typescript/src/controllers/Client.d.ts.map +1 -1
- package/lib/typescript/src/screens/EkycLiveness/EkycCamera.d.ts.map +1 -1
- package/lib/typescript/src/screens/EkycLiveness/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/Invest/Screens/HomeLoan.d.ts.map +1 -1
- package/lib/typescript/src/screens/InvestNew/Screens/HomeLoan.d.ts.map +1 -1
- package/lib/typescript/src/screens/Optional/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/SignContractGpayTima/ConfirmContact.d.ts.map +1 -1
- package/lib/typescript/src/screens/SignContractGpayTima/SignContract.d.ts.map +1 -1
- package/lib/typescript/src/utils/notification.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/images/Invest/index.ts +5 -12
- package/src/assets/images/InvestNew/index.ts +14 -14
- package/src/components/ImageGallery/ImageGallery.tsx +1 -1
- package/src/components/Navigation/TabNavigation.tsx +0 -3
- package/src/controllers/Client.tsx +5 -3
- package/src/screens/About/index.tsx +1 -1
- package/src/screens/AdditionalInvestmentCapital/Components/Success.tsx +2 -2
- package/src/screens/Confirm/index.tsx +1 -1
- package/src/screens/ConnectBank/index.tsx +2 -2
- package/src/screens/EkycLiveness/EkycCamera.tsx +16 -28
- package/src/screens/EkycLiveness/index.tsx +44 -84
- package/src/screens/GpayInfor/Gpay.tsx +1 -1
- package/src/screens/Guide/index.tsx +3 -3
- package/src/screens/InputBank/index.tsx +2 -2
- package/src/screens/Invest/Screens/HomeLoan.tsx +1 -2
- package/src/screens/InvestNew/Screens/HomeLoan.tsx +1 -2
- package/src/screens/LoanApplication/Components/ModalWarn.tsx +1 -1
- package/src/screens/Notification/index.tsx +1 -1
- package/src/screens/Optional/index.tsx +74 -58
- package/src/screens/PendingLoan/Tabs/Tab1.tsx +1 -1
- package/src/screens/ReceivedLoan/Components/Tab1.tsx +1 -1
- package/src/screens/Sign-in/index.tsx +1 -1
- package/src/screens/SignContractGpayTima/ConfirmContact.tsx +28 -34
- package/src/screens/SignContractGpayTima/SignContract.tsx +34 -38
- package/src/screens/SignContractGpayTima/index.tsx +2 -2
- package/src/screens/Support/index.tsx +1 -1
- package/src/screens/Transfer/Components/PopoverChooseShop.tsx +2 -2
- package/src/utils/notification.ts +8 -10
- package/lib/commonjs/assets/images/Invest/diamond_glink.png +0 -0
- package/lib/commonjs/assets/images/Invest/gold_glink.png +0 -0
- package/lib/commonjs/assets/images/Invest/money_glink.png +0 -0
- package/lib/commonjs/assets/images/Invest/ruby_glink.png +0 -0
- package/lib/commonjs/assets/images/Invest/titan_glink.png +0 -0
- package/lib/commonjs/assets/images/InvestNew/bg_none_glink.png +0 -0
- package/lib/module/assets/images/Invest/diamond_glink.png +0 -0
- package/lib/module/assets/images/Invest/gold_glink.png +0 -0
- package/lib/module/assets/images/Invest/money_glink.png +0 -0
- package/lib/module/assets/images/Invest/ruby_glink.png +0 -0
- package/lib/module/assets/images/Invest/titan_glink.png +0 -0
- package/lib/module/assets/images/InvestNew/bg_none_glink.png +0 -0
- package/src/assets/images/Invest/diamond_glink.png +0 -0
- package/src/assets/images/Invest/gold_glink.png +0 -0
- package/src/assets/images/Invest/money_glink.png +0 -0
- package/src/assets/images/Invest/ruby_glink.png +0 -0
- package/src/assets/images/Invest/titan_glink.png +0 -0
- package/src/assets/images/InvestNew/bg_none_glink.png +0 -0
@@ -18,10 +18,12 @@ import { useSelector } from 'react-redux';
|
|
18
18
|
import Colors from '../../common/Colors';
|
19
19
|
import Loading from '../../common/Loading';
|
20
20
|
import { actuatedNormalize } from '../../common/Metrics';
|
21
|
+
import { confirmGpayOnboarding } from '../../components/Features/Lender/lenderSlice';
|
21
22
|
import { compare_liveness_cif } from '../../components/Features/user/userSlice';
|
22
23
|
import Screens from '../../components/Navigation/Screens';
|
23
24
|
import { userInfor } from '../../components/Redux/selector';
|
24
25
|
import { useAppDispatch } from '../../components/Redux/store';
|
26
|
+
import { save } from '../../components/Storage/storage';
|
25
27
|
import { PortalFrame } from './Components/PortalFrame';
|
26
28
|
import { RecordingGuildStep } from './Components/RecordingGuildStep';
|
27
29
|
|
@@ -31,14 +33,14 @@ const frameHeight = frameWidth;
|
|
31
33
|
const dataAction = ['pitch_head', 'yaw_head', 'eyes', 'mouth'];
|
32
34
|
const durationTime = Platform.OS === 'ios' ? 4200 : 5000;
|
33
35
|
|
34
|
-
const EkycLiveness = ({
|
36
|
+
const EkycLiveness = ({navigation, route}: any) => {
|
35
37
|
const reference_id = route?.params?.reference_id;
|
36
38
|
const camera = useRef<Camera>(null);
|
37
39
|
const devices = useCameraDevices('wide-angle-camera');
|
38
40
|
const device = devices.front;
|
39
41
|
const [hasPermission, setHasPermission] = useState(false);
|
40
42
|
const [isLoading, setLoading] = useState(false);
|
41
|
-
const [listStep, setListStep] = useState(['intro']);
|
43
|
+
const [listStep, setListStep] = useState<any[]>(['intro']);
|
42
44
|
const interestRef = useRef<ScrollView>(null);
|
43
45
|
const user_Infor = useSelector(userInfor);
|
44
46
|
const dispatch = useAppDispatch();
|
@@ -60,7 +62,7 @@ const EkycLiveness = ({ navigation, route }: any) => {
|
|
60
62
|
const extractFramesFromVideo = async (
|
61
63
|
videoPath: string,
|
62
64
|
duration: number,
|
63
|
-
interval: number
|
65
|
+
interval: number,
|
64
66
|
) => {
|
65
67
|
const thumbnails: string[] = [];
|
66
68
|
const numFrames = Math.floor(duration / interval);
|
@@ -93,7 +95,7 @@ const EkycLiveness = ({ navigation, route }: any) => {
|
|
93
95
|
const paths = await extractFramesFromVideo(
|
94
96
|
data.path,
|
95
97
|
parseInt(data.duration) * 1000,
|
96
|
-
interval
|
98
|
+
interval,
|
97
99
|
);
|
98
100
|
|
99
101
|
const listImage: string[] = [];
|
@@ -106,13 +108,14 @@ const EkycLiveness = ({ navigation, route }: any) => {
|
|
106
108
|
console.warn('Read base64 error:', err);
|
107
109
|
}
|
108
110
|
}
|
111
|
+
console.log('listImage.length: ', listImage.slice(0, 20).length);
|
109
112
|
|
110
113
|
const params = {
|
111
|
-
phone:
|
112
|
-
files: listImage,
|
114
|
+
phone: user_Infor?.phone,
|
115
|
+
files: listImage.slice(0, 20),
|
113
116
|
};
|
114
117
|
dispatch(compare_liveness_cif(params))
|
115
|
-
.then(
|
118
|
+
.then(async res1 => {
|
116
119
|
console.log('res compare----', res1);
|
117
120
|
setLoading(false);
|
118
121
|
if (res1?.payload?.data?.meta.errorCode !== 200) {
|
@@ -128,12 +131,32 @@ const EkycLiveness = ({ navigation, route }: any) => {
|
|
128
131
|
navigation.navigate(Screens.Optional);
|
129
132
|
} else {
|
130
133
|
console.log('------');
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
+
const response: any = await dispatch(
|
135
|
+
confirmGpayOnboarding({reference_id}),
|
136
|
+
);
|
137
|
+
console.log('response', response);
|
138
|
+
if (response?.payload.meta.errCode === 200) {
|
139
|
+
save('reference_id', response?.payload.data);
|
140
|
+
console.log('reference_id', response?.payload.data);
|
141
|
+
// navigation.navigate(Screens.EkycLiveness, {
|
142
|
+
// reference_id: response?.payload.data,
|
143
|
+
// });
|
144
|
+
navigation.navigate(Screens.ConfirmContract, {
|
145
|
+
data: response?.payload.data,
|
146
|
+
});
|
147
|
+
} else {
|
148
|
+
// WToastShowError(response?.payload.meta.errMessage);
|
149
|
+
showMessage({
|
150
|
+
message: 'Thông báo',
|
151
|
+
description: response?.payload.meta.errMessage,
|
152
|
+
type: 'danger',
|
153
|
+
icon: 'warning',
|
154
|
+
backgroundColor: Colors.DANGER,
|
155
|
+
});
|
156
|
+
}
|
134
157
|
}
|
135
158
|
})
|
136
|
-
.catch(
|
159
|
+
.catch(err => {
|
137
160
|
// WToastShowError('Có lôi xảy ra,vui lòng thử lại sau');
|
138
161
|
showMessage({
|
139
162
|
message: 'Thông báo thất bại',
|
@@ -150,66 +173,6 @@ const EkycLiveness = ({ navigation, route }: any) => {
|
|
150
173
|
});
|
151
174
|
};
|
152
175
|
|
153
|
-
const uploadFile = async (temp: string) => {
|
154
|
-
setLoading(true);
|
155
|
-
console.log('----uploadFile!!!: ', temp);
|
156
|
-
let listImage = [];
|
157
|
-
for (let i = 1; i <= 20; i++) {
|
158
|
-
const file = 'file://' + temp + `_img_${('000' + i).slice(-4)}.jpg`;
|
159
|
-
console.log('file ', file);
|
160
|
-
try {
|
161
|
-
const imgBase64 = await RNFS.readFile(file, 'base64');
|
162
|
-
listImage.push(imgBase64);
|
163
|
-
} catch (error) {
|
164
|
-
console.log('error file: ', error);
|
165
|
-
}
|
166
|
-
// console.log('imgBase64 ', imgBase64)
|
167
|
-
console.log('------');
|
168
|
-
}
|
169
|
-
// console.log('listImage: ', listImage);
|
170
|
-
|
171
|
-
const params = {
|
172
|
-
phone: '0982515705',
|
173
|
-
files: listImage,
|
174
|
-
};
|
175
|
-
|
176
|
-
dispatch(compare_liveness_cif(params))
|
177
|
-
.then((res1) => {
|
178
|
-
console.log('res compare----', res1);
|
179
|
-
setLoading(false);
|
180
|
-
if (res1?.payload?.data?.meta.errorCode !== 200) {
|
181
|
-
// WToastShowError(res1?.payload?.data?.meta?.errorMessage);
|
182
|
-
showMessage({
|
183
|
-
message: 'Thông báo',
|
184
|
-
description: res1?.payload?.data?.meta?.errorMessage,
|
185
|
-
type: 'danger',
|
186
|
-
icon: 'warning',
|
187
|
-
backgroundColor: Colors.DANGER,
|
188
|
-
});
|
189
|
-
navigation.navigate(Screens.Optional);
|
190
|
-
} else {
|
191
|
-
navigation.navigate(Screens.ConfirmContract, {
|
192
|
-
data: reference_id,
|
193
|
-
});
|
194
|
-
}
|
195
|
-
})
|
196
|
-
.catch((err) => {
|
197
|
-
// WToastShowError('Có lôi xảy ra,vui lòng thử lại sau');
|
198
|
-
showMessage({
|
199
|
-
message: 'Thông báo',
|
200
|
-
description: 'Có lỗi xảy ra,vui lòng thử lại sau',
|
201
|
-
type: 'danger',
|
202
|
-
icon: 'warning',
|
203
|
-
backgroundColor: Colors.DANGER,
|
204
|
-
});
|
205
|
-
navigation.navigate(Screens.Optional);
|
206
|
-
setLoading(false);
|
207
|
-
})
|
208
|
-
.finally(() => {
|
209
|
-
setLoading(false);
|
210
|
-
});
|
211
|
-
};
|
212
|
-
|
213
176
|
const onRecording = async () => {
|
214
177
|
console.log('onRecording');
|
215
178
|
console.log('camera.current: ', camera.current);
|
@@ -219,11 +182,11 @@ const EkycLiveness = ({ navigation, route }: any) => {
|
|
219
182
|
videoCodec: 'h264',
|
220
183
|
fileType: 'mp4',
|
221
184
|
flash: 'off',
|
222
|
-
onRecordingFinished:
|
185
|
+
onRecordingFinished: video => {
|
223
186
|
console.log('video: ', video);
|
224
187
|
onConfirm(video);
|
225
188
|
},
|
226
|
-
onRecordingError:
|
189
|
+
onRecordingError: error =>
|
227
190
|
// WToastShowError('Lỗi không quay được. Hãy thử lại '),
|
228
191
|
showMessage({
|
229
192
|
message: 'Thông báo lỗi',
|
@@ -248,7 +211,6 @@ const EkycLiveness = ({ navigation, route }: any) => {
|
|
248
211
|
}
|
249
212
|
};
|
250
213
|
const onContinueRecording = async (isFinish: boolean, step: number) => {
|
251
|
-
console.log('ahihi', step);
|
252
214
|
if (camera.current) {
|
253
215
|
camera.current.resumeRecording();
|
254
216
|
setTimeout(async () => {
|
@@ -274,7 +236,7 @@ const EkycLiveness = ({ navigation, route }: any) => {
|
|
274
236
|
switch (index) {
|
275
237
|
case 0:
|
276
238
|
if (interestRef.current) {
|
277
|
-
interestRef?.current.scrollTo({
|
239
|
+
interestRef?.current.scrollTo({animated: true, x: deviceWidth});
|
278
240
|
}
|
279
241
|
break;
|
280
242
|
case 1:
|
@@ -296,24 +258,23 @@ const EkycLiveness = ({ navigation, route }: any) => {
|
|
296
258
|
}
|
297
259
|
|
298
260
|
return (
|
299
|
-
<View style={{
|
261
|
+
<View style={{width: deviceWidth}}>
|
300
262
|
<View
|
301
263
|
style={{
|
302
264
|
width: deviceWidth,
|
303
265
|
height: '100%',
|
304
266
|
justifyContent: 'center',
|
305
267
|
alignItems: 'center',
|
306
|
-
}}
|
307
|
-
>
|
268
|
+
}}>
|
308
269
|
<View style={styles.frameContainer}>
|
309
|
-
<View style={{
|
270
|
+
<View style={{flex: 1, justifyContent: 'center'}}>
|
310
271
|
<PortalFrame />
|
311
272
|
{device != null && hasPermission ? (
|
312
273
|
<Camera
|
313
274
|
fps={60}
|
314
275
|
// preset="iframe-960x540"
|
315
276
|
ref={camera}
|
316
|
-
style={{
|
277
|
+
style={{flex: 1, zIndex: 1}}
|
317
278
|
device={device}
|
318
279
|
// isActive
|
319
280
|
isActive={isFocused && hasPermission}
|
@@ -325,15 +286,14 @@ const EkycLiveness = ({ navigation, route }: any) => {
|
|
325
286
|
<ScrollView
|
326
287
|
nestedScrollEnabled
|
327
288
|
ref={interestRef}
|
328
|
-
style={{
|
289
|
+
style={{width: deviceWidth}}
|
329
290
|
horizontal
|
330
291
|
pagingEnabled
|
331
292
|
snapToInterval={deviceWidth}
|
332
293
|
scrollEventThrottle={16}
|
333
294
|
scrollEnabled={false}
|
334
295
|
bounces={true}
|
335
|
-
showsHorizontalScrollIndicator={false}
|
336
|
-
>
|
296
|
+
showsHorizontalScrollIndicator={false}>
|
337
297
|
{listStep.map((item, index) => (
|
338
298
|
<RecordingGuildStep
|
339
299
|
key={index.toString()}
|
@@ -405,4 +365,4 @@ const styles = StyleSheet.create({
|
|
405
365
|
},
|
406
366
|
});
|
407
367
|
|
408
|
-
export default EkycLiveness;
|
368
|
+
export default EkycLiveness;
|
@@ -51,7 +51,7 @@ export const Gpay = ({ navigation }: any) => {
|
|
51
51
|
>
|
52
52
|
<Icon name="document-text" size={24} color="#F05123" />
|
53
53
|
<RText style={{ paddingLeft: 12, color: '#333333' }}>
|
54
|
-
Hợp đồng
|
54
|
+
Hợp đồng Tima - Gpay - Lender
|
55
55
|
</RText>
|
56
56
|
</TouchableOpacity>
|
57
57
|
</View>
|
@@ -78,7 +78,7 @@ export const Guide = ({ navigation, _route }: any) => {
|
|
78
78
|
marginTop: 80,
|
79
79
|
}}
|
80
80
|
>
|
81
|
-
|
81
|
+
Tima xin chào !
|
82
82
|
</RText>
|
83
83
|
) : (
|
84
84
|
timeByNextPage === 0 && (
|
@@ -108,7 +108,7 @@ export const Guide = ({ navigation, _route }: any) => {
|
|
108
108
|
marginLeft: 8,
|
109
109
|
}}
|
110
110
|
>
|
111
|
-
Tổng đài
|
111
|
+
Tổng đài Tima
|
112
112
|
</RText>
|
113
113
|
</TouchableOpacity>
|
114
114
|
<TouchableOpacity
|
@@ -133,7 +133,7 @@ export const Guide = ({ navigation, _route }: any) => {
|
|
133
133
|
marginLeft: 8,
|
134
134
|
}}
|
135
135
|
>
|
136
|
-
|
136
|
+
Tima.vn/nha-dau-tu
|
137
137
|
</RText>
|
138
138
|
</TouchableOpacity>
|
139
139
|
<TouchableOpacity
|
@@ -257,7 +257,7 @@ export const InputBank = ({ route, navigation }: any) => {
|
|
257
257
|
điều khoản
|
258
258
|
</RText>
|
259
259
|
</TouchableOpacity>
|
260
|
-
<RText>của
|
260
|
+
<RText>của TIMA</RText>
|
261
261
|
<TouchableOpacity
|
262
262
|
style={{ marginLeft: 8 }}
|
263
263
|
onPress={() => setCheck(!check)}
|
@@ -349,7 +349,7 @@ export const InputBank = ({ route, navigation }: any) => {
|
|
349
349
|
điều khoản
|
350
350
|
</RText>
|
351
351
|
</TouchableOpacity>
|
352
|
-
<RText>của
|
352
|
+
<RText>của TIMA</RText>
|
353
353
|
<TouchableOpacity
|
354
354
|
style={{ marginLeft: 8 }}
|
355
355
|
onPress={() => setCheck(!check)}
|
@@ -27,7 +27,6 @@ import {
|
|
27
27
|
import Screens from '../../../components/Navigation/Screens';
|
28
28
|
import { selectLoading } from '../../../components/Redux/selector';
|
29
29
|
import { AppDispatch } from '../../../components/Redux/store';
|
30
|
-
import { setClientToken } from '../../../controllers/Client';
|
31
30
|
const dayjs = require('dayjs');
|
32
31
|
const relativeTime = require('dayjs/plugin/relativeTime');
|
33
32
|
dayjs.extend(relativeTime);
|
@@ -50,7 +49,7 @@ const HomeLoan = (props) => {
|
|
50
49
|
};
|
51
50
|
|
52
51
|
const addToCart = async (item: any) => {
|
53
|
-
setClientToken(item?.access_token);
|
52
|
+
// setClientToken(item?.access_token);
|
54
53
|
setTimeout(async () => {
|
55
54
|
const resp: any = await dispatch(lockLoan(item?.id));
|
56
55
|
console.log('resp lock---', resp);
|
@@ -27,7 +27,6 @@ import {
|
|
27
27
|
import Screens from '../../../components/Navigation/Screens';
|
28
28
|
import { selectLoading } from '../../../components/Redux/selector';
|
29
29
|
import { AppDispatch } from '../../../components/Redux/store';
|
30
|
-
import { setClientToken } from '../../../controllers/Client';
|
31
30
|
const dayjs = require('dayjs');
|
32
31
|
const relativeTime = require('dayjs/plugin/relativeTime');
|
33
32
|
dayjs.extend(relativeTime);
|
@@ -50,7 +49,7 @@ const HomeLoan = (props) => {
|
|
50
49
|
};
|
51
50
|
|
52
51
|
const addToCart = async (item: any) => {
|
53
|
-
setClientToken(item?.access_token);
|
52
|
+
// setClientToken(item?.access_token);
|
54
53
|
setTimeout(async () => {
|
55
54
|
const resp: any = await dispatch(lockLoan(item?.id));
|
56
55
|
console.log('resp lock---', resp);
|
@@ -58,7 +58,7 @@ const ModalWarn = (props: ModalProps) => {
|
|
58
58
|
color: Colors.GRAY_3,
|
59
59
|
}}
|
60
60
|
>
|
61
|
-
Trong danh sách đã chọn có đơn được
|
61
|
+
Trong danh sách đã chọn có đơn được TIMA đề nghị mua nợ, đơn sẽ bị loại
|
62
62
|
bỏ khỏi danh sách bạn đã chọn!
|
63
63
|
</RText>
|
64
64
|
|
@@ -131,7 +131,7 @@ export const Notification = ({ navigation }: any) => {
|
|
131
131
|
style={{ width: 36, height: 36, resizeMode: 'contain' }}
|
132
132
|
/>
|
133
133
|
<View style={{ flex: 1, paddingLeft: 10 }}>
|
134
|
-
{/*<MText style={{flex:1, paddingHorizontal: 8, fontSize: 16, color: '#1D1B1B'}}>{`Thông báo từ
|
134
|
+
{/*<MText style={{flex:1, paddingHorizontal: 8, fontSize: 16, color: '#1D1B1B'}}>{`Thông báo từ tima`}</MText>*/}
|
135
135
|
<RText
|
136
136
|
style={{
|
137
137
|
flex: 1,
|
@@ -56,7 +56,7 @@ const options: Option[] = [
|
|
56
56
|
// },
|
57
57
|
{
|
58
58
|
id: 13,
|
59
|
-
title: 'Hợp đồng hợp tác giữa NĐT và
|
59
|
+
title: 'Hợp đồng hợp tác giữa NĐT và Tima',
|
60
60
|
icon: imageOptions.icon_extend,
|
61
61
|
},
|
62
62
|
{
|
@@ -92,7 +92,7 @@ const options: Option[] = [
|
|
92
92
|
},
|
93
93
|
{
|
94
94
|
id: 4,
|
95
|
-
title: 'Giới thiệu về
|
95
|
+
title: 'Giới thiệu về TIMA',
|
96
96
|
icon: imageOptions.about,
|
97
97
|
},
|
98
98
|
{
|
@@ -122,17 +122,20 @@ const options: Option[] = [
|
|
122
122
|
},
|
123
123
|
];
|
124
124
|
|
125
|
-
export const Optional = ({
|
125
|
+
export const Optional = ({navigation}: any) => {
|
126
126
|
const dispatch = useDispatch<AppDispatch>();
|
127
127
|
const _userInfo = useGetUser();
|
128
128
|
const isLoading = useSelector(selectLoading);
|
129
129
|
const userData = useSelector(userInfor);
|
130
130
|
const [openPickShop, setOpenPickShop] = useState(false);
|
131
131
|
const [shopName, setShopName] = useState<string>(
|
132
|
-
userData?.shops[0]?.name || userData?.shop?.name
|
132
|
+
userData?.shops[0]?.name || userData?.shop?.name,
|
133
133
|
);
|
134
|
+
const [lenderType, setLenderType] = useState<string | null>(null);
|
134
135
|
const [isEnabled, setIsEnabled] = useState(false);
|
135
136
|
|
137
|
+
console.log('shopName: ', shopName);
|
138
|
+
|
136
139
|
const getOneShop = async () => {
|
137
140
|
await changeToken(userData?.shops[0]);
|
138
141
|
// getPackagesList();
|
@@ -143,7 +146,6 @@ export const Optional = ({ navigation }: any) => {
|
|
143
146
|
if (userData?.typeDisbursement === 'NA') {
|
144
147
|
loadEnableNotification();
|
145
148
|
}
|
146
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
147
149
|
}, []);
|
148
150
|
|
149
151
|
const loadEnableNotification = async () => {
|
@@ -249,8 +251,8 @@ export const Optional = ({ navigation }: any) => {
|
|
249
251
|
setOpenPickShop(true);
|
250
252
|
};
|
251
253
|
|
252
|
-
const changeToken = async (shop: {
|
253
|
-
const resp: any = await dispatch(ChangeToken({
|
254
|
+
const changeToken = async (shop: {shopId: any; regFromApp: any}) => {
|
255
|
+
const resp: any = await dispatch(ChangeToken({shop_id: shop?.shopId}));
|
254
256
|
if (resp && resp.payload && resp?.payload?.meta?.errCode === 200) {
|
255
257
|
const obj = {
|
256
258
|
...userData,
|
@@ -270,7 +272,7 @@ export const Optional = ({ navigation }: any) => {
|
|
270
272
|
text: 'Đồng ý',
|
271
273
|
onPress: () => dispatch(logOut()),
|
272
274
|
},
|
273
|
-
]
|
275
|
+
],
|
274
276
|
);
|
275
277
|
}
|
276
278
|
};
|
@@ -284,7 +286,7 @@ export const Optional = ({ navigation }: any) => {
|
|
284
286
|
/>
|
285
287
|
{/* <View style={styles.header}>
|
286
288
|
<NotifyIcon />
|
287
|
-
</View>
|
289
|
+
</View>
|
288
290
|
{/* <Image
|
289
291
|
source={
|
290
292
|
userData?.gender === 1
|
@@ -301,65 +303,79 @@ export const Optional = ({ navigation }: any) => {
|
|
301
303
|
</TouchableOpacity>
|
302
304
|
</View>
|
303
305
|
<View style={styles.redLine} />
|
304
|
-
<ScrollView style={{
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
flex: 1,
|
309
|
-
}}
|
310
|
-
>
|
311
|
-
<View style={styles.optionItems}>
|
312
|
-
<Image
|
313
|
-
source={imageOptions.withdraw}
|
314
|
-
style={{
|
315
|
-
width: 24,
|
316
|
-
height: 24,
|
317
|
-
tintColor: Colors.ORANGE,
|
318
|
-
resizeMode: 'contain',
|
319
|
-
}}
|
320
|
-
/>
|
321
|
-
<RText textStyle={{ paddingLeft: 12 }}>{'Rút tiền'}</RText>
|
322
|
-
</View>
|
323
|
-
<View style={{ height: 1, backgroundColor: '#E5E5E5' }} />
|
324
|
-
</TouchableOpacity>
|
325
|
-
{options.map((item: Option) => {
|
326
|
-
return (
|
306
|
+
<ScrollView style={{paddingHorizontal: actuatedNormalize(16)}}>
|
307
|
+
{shopName?.includes('DT') &&
|
308
|
+
(lenderType?.includes('Gold') ||
|
309
|
+
lenderType?.includes('Gold Plus')) && (
|
327
310
|
<TouchableOpacity
|
328
|
-
onPress={() =>
|
329
|
-
key={item?.id}
|
311
|
+
onPress={() => navigation.navigate(Screens.WithDraw)}
|
330
312
|
style={{
|
331
313
|
flex: 1,
|
332
|
-
|
333
|
-
borderColor: '#E5E5E5',
|
334
|
-
flexDirection: 'row',
|
335
|
-
alignItems: 'center',
|
336
|
-
justifyContent: 'space-between',
|
337
|
-
}}
|
338
|
-
>
|
314
|
+
}}>
|
339
315
|
<View style={styles.optionItems}>
|
340
316
|
<Image
|
341
|
-
source={
|
317
|
+
source={imageOptions.withdraw}
|
342
318
|
style={{
|
343
|
-
width:
|
344
|
-
height:
|
319
|
+
width: 24,
|
320
|
+
height: 24,
|
345
321
|
tintColor: Colors.ORANGE,
|
346
322
|
resizeMode: 'contain',
|
347
323
|
}}
|
348
324
|
/>
|
349
|
-
<RText textStyle={{
|
325
|
+
<RText textStyle={{paddingLeft: 12}}>{'Rút tiền'}</RText>
|
350
326
|
</View>
|
351
|
-
{
|
352
|
-
<Switch
|
353
|
-
trackColor={{ false: '#767577', true: Colors.GRAY_5 }}
|
354
|
-
thumbColor={isEnabled ? Colors.ORANGE : Colors.GRAY_4}
|
355
|
-
onValueChange={toggleSwitch}
|
356
|
-
value={isEnabled}
|
357
|
-
style={{ transform: [{ scaleX: 0.6 }, { scaleY: 0.6 }] }}
|
358
|
-
/>
|
359
|
-
)}
|
327
|
+
<View style={{height: 1, backgroundColor: '#E5E5E5'}} />
|
360
328
|
</TouchableOpacity>
|
361
|
-
)
|
362
|
-
|
329
|
+
)}
|
330
|
+
{options
|
331
|
+
.filter(item => {
|
332
|
+
if (
|
333
|
+
item.id === 15 &&
|
334
|
+
shopName?.includes('NA') &&
|
335
|
+
(lenderType?.includes('Gold') ||
|
336
|
+
lenderType?.includes('Gold Plus'))
|
337
|
+
) {
|
338
|
+
return false;
|
339
|
+
}
|
340
|
+
return true;
|
341
|
+
})
|
342
|
+
.map((item: Option) => {
|
343
|
+
return (
|
344
|
+
<TouchableOpacity
|
345
|
+
onPress={() => handleNavigate(item.id)}
|
346
|
+
key={item?.id}
|
347
|
+
style={{
|
348
|
+
flex: 1,
|
349
|
+
borderBottomWidth: 1,
|
350
|
+
borderColor: '#E5E5E5',
|
351
|
+
flexDirection: 'row',
|
352
|
+
alignItems: 'center',
|
353
|
+
justifyContent: 'space-between',
|
354
|
+
}}>
|
355
|
+
<View style={styles.optionItems}>
|
356
|
+
<Image
|
357
|
+
source={item.icon}
|
358
|
+
style={{
|
359
|
+
width: actuatedNormalize(18),
|
360
|
+
height: actuatedNormalize(18),
|
361
|
+
tintColor: Colors.ORANGE,
|
362
|
+
resizeMode: 'contain',
|
363
|
+
}}
|
364
|
+
/>
|
365
|
+
<RText textStyle={{paddingLeft: 12}}>{item?.title}</RText>
|
366
|
+
</View>
|
367
|
+
{item.id === 12 && (
|
368
|
+
<Switch
|
369
|
+
trackColor={{false: '#767577', true: Colors.GRAY_5}}
|
370
|
+
thumbColor={isEnabled ? Colors.ORANGE : Colors.GRAY_4}
|
371
|
+
onValueChange={toggleSwitch}
|
372
|
+
value={isEnabled}
|
373
|
+
style={{transform: [{scaleX: 0.6}, {scaleY: 0.6}]}}
|
374
|
+
/>
|
375
|
+
)}
|
376
|
+
</TouchableOpacity>
|
377
|
+
);
|
378
|
+
})}
|
363
379
|
</ScrollView>
|
364
380
|
<ModalPickShop
|
365
381
|
isVisible={openPickShop}
|
@@ -369,6 +385,7 @@ export const Optional = ({ navigation }: any) => {
|
|
369
385
|
console.log('value', value);
|
370
386
|
|
371
387
|
setShopName(value?.lenderName);
|
388
|
+
setLenderType(value?.lenderTypeName);
|
372
389
|
setOpenPickShop(false);
|
373
390
|
// navigation.navigate(Screens.HomePage);
|
374
391
|
}}
|
@@ -381,8 +398,7 @@ export const Optional = ({ navigation }: any) => {
|
|
381
398
|
fontSize: 12,
|
382
399
|
paddingTop: actuatedNormalize(8),
|
383
400
|
paddingBottom: actuatedNormalize(8),
|
384
|
-
}}
|
385
|
-
>{`Phiên bản: ${DeviceInfo.getVersion()}`}</RText>
|
401
|
+
}}>{`Phiên bản: ${DeviceInfo.getVersion()}`}</RText>
|
386
402
|
</View> */}
|
387
403
|
{isLoading && <Loading />}
|
388
404
|
</Container>
|