react-native-timacare 3.3.18 → 3.3.20
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/components/MHeader.js +1 -1
- package/lib/commonjs/components/MHeader.js.flow +1 -1
- package/lib/commonjs/components/keyboardspace/index.js +1 -1
- package/lib/commonjs/components/keyboardspace/index.js.flow +0 -2
- package/lib/commonjs/components/keyboardspace/index.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/DetailLoanTima.js +1 -1
- package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.flow +145 -35
- package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/Info.js +1 -1
- package/lib/commonjs/screens/detail-loan/Info.js.flow +16 -8
- package/lib/commonjs/screens/detail-loan/Info.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/Payment.js +1 -1
- package/lib/commonjs/screens/detail-loan/Payment.js.flow +19 -7
- package/lib/commonjs/screens/detail-loan/Payment.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentAll.js +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentAll.js.flow +49 -9
- package/lib/commonjs/screens/detail-loan/PaymentAll.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js.flow +735 -85
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +678 -35
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/index.js +1 -1
- package/lib/commonjs/screens/detail-loan/index.js.flow +37 -33
- package/lib/commonjs/screens/detail-loan/index.js.map +1 -1
- package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js +1 -1
- package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js.flow +41 -12
- package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
- package/lib/commonjs/screens/guide-transfer-bank/index.js +1 -1
- package/lib/commonjs/screens/guide-transfer-bank/index.js.flow +228 -237
- package/lib/commonjs/screens/guide-transfer-bank/index.js.map +1 -1
- package/lib/commonjs/screens/home/Store.js +1 -1
- package/lib/commonjs/screens/home/Store.js.flow +4 -1
- package/lib/commonjs/screens/home/Store.js.map +1 -1
- package/lib/commonjs/screens/home/index.js +1 -1
- package/lib/commonjs/screens/home/index.js.flow +15 -30
- 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 +4 -4
- package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
- package/lib/commonjs/services/api/api.js +1 -1
- package/lib/commonjs/services/api/api.js.flow +16 -0
- package/lib/commonjs/services/api/api.js.map +1 -1
- package/lib/module/components/MHeader.js +1 -1
- package/lib/module/components/keyboardspace/index.js +1 -1
- package/lib/module/components/keyboardspace/index.js.map +1 -1
- package/lib/module/screens/detail-loan/DetailLoanTima.js +1 -1
- package/lib/module/screens/detail-loan/DetailLoanTima.js.map +1 -1
- package/lib/module/screens/detail-loan/Info.js +1 -1
- package/lib/module/screens/detail-loan/Info.js.map +1 -1
- package/lib/module/screens/detail-loan/Payment.js +1 -1
- package/lib/module/screens/detail-loan/Payment.js.map +1 -1
- package/lib/module/screens/detail-loan/PaymentAll.js +1 -1
- package/lib/module/screens/detail-loan/PaymentAll.js.map +1 -1
- package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
- package/lib/module/screens/detail-loan/PaymentInfo.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/detail-loan/index.js +1 -1
- package/lib/module/screens/detail-loan/index.js.map +1 -1
- package/lib/module/screens/guide-transfer-bank/TransferDetail.js +1 -1
- package/lib/module/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
- package/lib/module/screens/guide-transfer-bank/index.js +1 -1
- package/lib/module/screens/guide-transfer-bank/index.js.map +1 -1
- package/lib/module/screens/home/Store.js +1 -1
- package/lib/module/screens/home/Store.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/liveness-v2/index.js +1 -1
- package/lib/module/screens/liveness-v2/index.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/components/keyboardspace/index.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/DetailLoanTima.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/Info.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/Payment.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/PaymentAll.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/PaymentInfo.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/ShowQrCode.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/index.d.ts.map +1 -1
- package/lib/typescript/screens/guide-transfer-bank/TransferDetail.d.ts.map +1 -1
- package/lib/typescript/screens/guide-transfer-bank/index.d.ts.map +1 -1
- package/lib/typescript/screens/home/Store.d.ts.map +1 -1
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/lib/typescript/services/api/api.d.ts +16 -0
- package/lib/typescript/services/api/api.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/MHeader.tsx +1 -1
- package/src/components/keyboardspace/index.tsx +0 -2
- package/src/screens/detail-loan/DetailLoanTima.tsx +145 -35
- package/src/screens/detail-loan/Info.tsx +16 -8
- package/src/screens/detail-loan/Payment.tsx +19 -7
- package/src/screens/detail-loan/PaymentAll.tsx +49 -9
- package/src/screens/detail-loan/PaymentInfo.tsx +735 -85
- package/src/screens/detail-loan/ShowQrCode.tsx +678 -35
- package/src/screens/detail-loan/index.tsx +37 -33
- package/src/screens/guide-transfer-bank/TransferDetail.tsx +41 -12
- package/src/screens/guide-transfer-bank/index.tsx +228 -237
- package/src/screens/home/Store.tsx +4 -1
- package/src/screens/home/index.tsx +15 -30
- package/src/screens/liveness-v2/index.tsx +4 -4
- package/src/services/api/api.ts +16 -0
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
2
|
import { observer } from 'mobx-react-lite';
|
|
3
|
-
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import {
|
|
5
5
|
Alert,
|
|
6
6
|
Clipboard,
|
|
7
7
|
Dimensions,
|
|
8
8
|
Image,
|
|
9
|
-
|
|
9
|
+
Platform,
|
|
10
10
|
ScrollView,
|
|
11
|
+
StatusBar,
|
|
11
12
|
TouchableOpacity,
|
|
12
13
|
View,
|
|
14
|
+
ViewStyle,
|
|
13
15
|
} from 'react-native';
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
import {
|
|
17
|
+
CloseIcon,
|
|
18
|
+
IconBack,
|
|
19
|
+
IconCopy,
|
|
20
|
+
IconDownload,
|
|
21
|
+
TimaSmall,
|
|
22
|
+
} from '../../assets/icons';
|
|
17
23
|
import { MText } from '../../components/MText';
|
|
18
24
|
import { useNavigation } from '@react-navigation/native';
|
|
19
25
|
import { Api } from '../../services/api';
|
|
@@ -22,19 +28,73 @@ import { CameraRoll } from '@react-native-camera-roll/camera-roll';
|
|
|
22
28
|
import ReactNativeBlobUtil from 'react-native-blob-util';
|
|
23
29
|
import { formatMoney } from '../../utils';
|
|
24
30
|
import MHeader from '../../components/MHeader';
|
|
31
|
+
import ReactNativeModal from 'react-native-modal';
|
|
32
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
33
|
+
import moment from 'moment';
|
|
34
|
+
import {
|
|
35
|
+
TourGuideProvider, // Main provider
|
|
36
|
+
TourGuideZone, // Main wrapper of highlight component
|
|
37
|
+
useTourGuideController, // hook to start, etc.
|
|
38
|
+
} from 'rn-tourguide';
|
|
25
39
|
|
|
26
40
|
export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
41
|
+
return (
|
|
42
|
+
<TourGuideProvider
|
|
43
|
+
borderRadius={8}
|
|
44
|
+
maskOffset={4}
|
|
45
|
+
tooltipComponent={TransferContentTooltip}
|
|
46
|
+
tooltipStyle={$tourTooltipPosition}
|
|
47
|
+
backdropColor="rgba(0, 0, 0, 0.35)"
|
|
48
|
+
androidStatusBarVisible={true}
|
|
49
|
+
verticalOffset={
|
|
50
|
+
Platform.OS === 'android' ? StatusBar.currentHeight - 25 : 0
|
|
51
|
+
}
|
|
52
|
+
>
|
|
53
|
+
<ShowQrCodeContent {...props} />
|
|
54
|
+
</TourGuideProvider>
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const TransferContentTooltip = ({ currentStep, handleStop }: any) => {
|
|
59
|
+
return (
|
|
60
|
+
<View style={$tourTooltip}>
|
|
61
|
+
<MText style={$tourTooltipText}>{currentStep?.text}</MText>
|
|
62
|
+
<TouchableOpacity onPress={handleStop} style={$tourTooltipButton}>
|
|
63
|
+
<MText style={$tourTooltipButtonText}>Đồng ý</MText>
|
|
64
|
+
</TouchableOpacity>
|
|
65
|
+
<View style={$tourTooltipArrow} />
|
|
66
|
+
</View>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const ShowQrCodeContent = observer(function ShowQrCodeContent(props: any) {
|
|
27
71
|
const navigation = useNavigation();
|
|
72
|
+
const scrollViewRef = useRef<ScrollView>(null);
|
|
73
|
+
const transferContentRef = useRef<View>(null);
|
|
74
|
+
const transferContentY = useRef(0);
|
|
75
|
+
const transferContentHeight = useRef(0);
|
|
76
|
+
const scrollViewHeight = useRef(0);
|
|
77
|
+
const scrollContentHeight = useRef(0);
|
|
78
|
+
const startGuideTimeout = useRef<NodeJS.Timeout>();
|
|
28
79
|
const [linkImage, setLinkImage] = useState<string>();
|
|
29
80
|
const [isLoading, setIsLoading] = useState(false);
|
|
30
|
-
|
|
81
|
+
const [showGuide, setShowGuide] = useState(false);
|
|
82
|
+
const [shouldStartGuide, setShouldStartGuide] = useState(false);
|
|
83
|
+
const [isGuideRunning, setIsGuideRunning] = useState(false);
|
|
84
|
+
const {
|
|
85
|
+
canStart, // a boolean indicate if you can start tour guide
|
|
86
|
+
start, // a function to start the tourguide
|
|
87
|
+
eventEmitter,
|
|
88
|
+
} = useTourGuideController();
|
|
31
89
|
const getData = () => {
|
|
32
90
|
setIsLoading(true);
|
|
33
91
|
Api.getInstance()
|
|
34
92
|
.getQrPayment({
|
|
35
93
|
LoanBriefId: props?.route?.params?.id,
|
|
36
|
-
TypeCloseLoan: 0, // đóng tiền kỳ
|
|
37
|
-
Money:
|
|
94
|
+
TypeCloseLoan: props?.route?.params?.isFullPayment ? 1 : 0, // đóng tiền kỳ
|
|
95
|
+
Money: props?.route?.params?.isFullPayment
|
|
96
|
+
? props?.route?.params?.totalMoney
|
|
97
|
+
: props?.route?.params?.item?.payMoney,
|
|
38
98
|
})
|
|
39
99
|
.then((response) => {
|
|
40
100
|
setIsLoading(false);
|
|
@@ -51,6 +111,12 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
51
111
|
.catch((err) => {
|
|
52
112
|
Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau');
|
|
53
113
|
setIsLoading(false);
|
|
114
|
+
})
|
|
115
|
+
.finally(() => {
|
|
116
|
+
setShouldStartGuide(true);
|
|
117
|
+
if (props?.route?.params?.isFullPayment) {
|
|
118
|
+
setShowGuide(true);
|
|
119
|
+
}
|
|
54
120
|
});
|
|
55
121
|
};
|
|
56
122
|
|
|
@@ -58,15 +124,109 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
58
124
|
getData();
|
|
59
125
|
}, []);
|
|
60
126
|
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
const handleStartGuide = () => setIsGuideRunning(true);
|
|
129
|
+
const handleStopGuide = () => setIsGuideRunning(false);
|
|
130
|
+
eventEmitter?.on('start', handleStartGuide);
|
|
131
|
+
eventEmitter?.on('stop', handleStopGuide);
|
|
132
|
+
return () => {
|
|
133
|
+
eventEmitter?.off('start', handleStartGuide);
|
|
134
|
+
eventEmitter?.off('stop', handleStopGuide);
|
|
135
|
+
};
|
|
136
|
+
}, [eventEmitter]);
|
|
137
|
+
|
|
138
|
+
const scrollToTransferContent = () => {
|
|
139
|
+
const scrollToY = (
|
|
140
|
+
y: number,
|
|
141
|
+
targetHeight = transferContentHeight.current
|
|
142
|
+
) => {
|
|
143
|
+
const viewportHeight =
|
|
144
|
+
scrollViewHeight.current || Dimensions.get('window').height;
|
|
145
|
+
const contentHeight = scrollContentHeight.current || viewportHeight;
|
|
146
|
+
const maxScrollY = Math.max(contentHeight - viewportHeight, 0);
|
|
147
|
+
const minTopForTooltip = 120;
|
|
148
|
+
const bottomGap = 80;
|
|
149
|
+
const preferredTargetTop = Math.min(
|
|
150
|
+
Math.max(viewportHeight * 0.42, minTopForTooltip),
|
|
151
|
+
Math.max(viewportHeight - targetHeight - bottomGap, minTopForTooltip)
|
|
152
|
+
);
|
|
153
|
+
const nextScrollY = Math.min(
|
|
154
|
+
Math.max(y - preferredTargetTop, 0),
|
|
155
|
+
maxScrollY
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
scrollViewRef.current?.scrollTo({
|
|
159
|
+
y: nextScrollY,
|
|
160
|
+
animated: true,
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const innerViewNode = scrollViewRef.current?.getInnerViewNode?.();
|
|
165
|
+
|
|
166
|
+
if (innerViewNode && transferContentRef.current?.measureLayout) {
|
|
167
|
+
transferContentRef.current.measureLayout(
|
|
168
|
+
innerViewNode,
|
|
169
|
+
(_x, y, _width, height) => scrollToY(y, height),
|
|
170
|
+
() => scrollToY(transferContentY.current)
|
|
171
|
+
);
|
|
172
|
+
} else {
|
|
173
|
+
scrollToY(transferContentY.current);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
useEffect(() => {
|
|
178
|
+
if (!props?.route?.params?.isFullPayment && shouldStartGuide && canStart) {
|
|
179
|
+
scrollToTransferContent();
|
|
180
|
+
startGuideTimeout.current = setTimeout(() => {
|
|
181
|
+
start(1);
|
|
182
|
+
setShouldStartGuide(false);
|
|
183
|
+
}, 450);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return () => {
|
|
187
|
+
if (startGuideTimeout.current) {
|
|
188
|
+
clearTimeout(startGuideTimeout.current);
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
}, [canStart, shouldStartGuide, start]);
|
|
192
|
+
|
|
61
193
|
return (
|
|
62
194
|
<View style={{ flex: 1, backgroundColor: 'rgba(244, 244, 244, 1)' }}>
|
|
63
|
-
<MHeader title=
|
|
64
|
-
<
|
|
65
|
-
<
|
|
195
|
+
<MHeader title={`Vay trực tuyến 24/7`} />
|
|
196
|
+
<View style={{ flex: 1 }}>
|
|
197
|
+
<View style={$header}>
|
|
198
|
+
<TouchableOpacity
|
|
199
|
+
style={$backButton}
|
|
200
|
+
onPress={() => navigation.goBack()}
|
|
201
|
+
>
|
|
202
|
+
<IconBack />
|
|
203
|
+
</TouchableOpacity>
|
|
204
|
+
<MText
|
|
205
|
+
style={{
|
|
206
|
+
fontSize: 16,
|
|
207
|
+
fontWeight: '600',
|
|
208
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
209
|
+
}}
|
|
210
|
+
>
|
|
211
|
+
{props?.route?.params?.isFullPayment
|
|
212
|
+
? 'TẤT TOÁN HỢP ĐỒNG'
|
|
213
|
+
: 'THANH TOÁN KỲ'}
|
|
214
|
+
</MText>
|
|
215
|
+
</View>
|
|
216
|
+
<ScrollView
|
|
217
|
+
ref={scrollViewRef}
|
|
218
|
+
scrollEnabled={!isGuideRunning}
|
|
219
|
+
onLayout={(event) => {
|
|
220
|
+
scrollViewHeight.current = event.nativeEvent.layout.height;
|
|
221
|
+
}}
|
|
222
|
+
onContentSizeChange={(_width, height) => {
|
|
223
|
+
scrollContentHeight.current = height;
|
|
224
|
+
}}
|
|
225
|
+
>
|
|
66
226
|
<View
|
|
67
227
|
style={{
|
|
68
228
|
backgroundColor: 'white',
|
|
69
|
-
|
|
229
|
+
marginHorizontal: 16,
|
|
70
230
|
borderRadius: 16,
|
|
71
231
|
padding: 16,
|
|
72
232
|
}}
|
|
@@ -111,8 +271,8 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
111
271
|
uri: linkImage,
|
|
112
272
|
}}
|
|
113
273
|
style={{
|
|
114
|
-
width: Dimensions.get('window').width -
|
|
115
|
-
height: Dimensions.get('window').width -
|
|
274
|
+
width: Dimensions.get('window').width - 100,
|
|
275
|
+
height: Dimensions.get('window').width - 100,
|
|
116
276
|
resizeMode: 'contain',
|
|
117
277
|
}}
|
|
118
278
|
/>
|
|
@@ -122,6 +282,12 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
122
282
|
flexDirection: 'row',
|
|
123
283
|
alignItems: 'center',
|
|
124
284
|
gap: 5,
|
|
285
|
+
backgroundColor: '#FFF7F0',
|
|
286
|
+
borderWidth: 1,
|
|
287
|
+
borderColor: '#EF592E',
|
|
288
|
+
borderRadius: 4,
|
|
289
|
+
paddingHorizontal: 8,
|
|
290
|
+
paddingVertical: 4,
|
|
125
291
|
}}
|
|
126
292
|
onPress={async () => {
|
|
127
293
|
ReactNativeBlobUtil.config({
|
|
@@ -171,25 +337,6 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
171
337
|
}}
|
|
172
338
|
/>
|
|
173
339
|
<View>
|
|
174
|
-
<MText
|
|
175
|
-
style={{
|
|
176
|
-
fontSize: 12,
|
|
177
|
-
color: 'rgba(51, 51, 51, 1)',
|
|
178
|
-
fontWeight: '300',
|
|
179
|
-
}}
|
|
180
|
-
>
|
|
181
|
-
Số tiền thanh toán
|
|
182
|
-
</MText>
|
|
183
|
-
<MText
|
|
184
|
-
style={{
|
|
185
|
-
fontSize: 16,
|
|
186
|
-
color: color.primary,
|
|
187
|
-
fontWeight: '600',
|
|
188
|
-
}}
|
|
189
|
-
>
|
|
190
|
-
{formatMoney(props?.route?.params?.amount)} đ
|
|
191
|
-
</MText>
|
|
192
|
-
|
|
193
340
|
<MText
|
|
194
341
|
style={{
|
|
195
342
|
fontSize: 12,
|
|
@@ -212,6 +359,7 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
212
359
|
color: 'rgba(61, 61, 61, 1)',
|
|
213
360
|
fontWeight: '600',
|
|
214
361
|
fontSize: 16,
|
|
362
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
215
363
|
}}
|
|
216
364
|
>
|
|
217
365
|
{props.route.params?.data?.accountNumber}
|
|
@@ -239,15 +387,510 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
239
387
|
color: 'rgba(61, 61, 61, 1)',
|
|
240
388
|
fontWeight: '600',
|
|
241
389
|
fontSize: 16,
|
|
390
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
242
391
|
}}
|
|
243
392
|
>
|
|
244
393
|
{props.route.params?.data?.accountName}
|
|
245
394
|
</MText>
|
|
395
|
+
|
|
396
|
+
<View>
|
|
397
|
+
<MText
|
|
398
|
+
style={{
|
|
399
|
+
fontSize: 12,
|
|
400
|
+
color: 'rgba(51, 51, 51, 1)',
|
|
401
|
+
fontWeight: '300',
|
|
402
|
+
marginTop: 16,
|
|
403
|
+
}}
|
|
404
|
+
>
|
|
405
|
+
Số tiền phải trả
|
|
406
|
+
</MText>
|
|
407
|
+
<View
|
|
408
|
+
style={{
|
|
409
|
+
flexDirection: 'row',
|
|
410
|
+
alignItems: 'center',
|
|
411
|
+
justifyContent: 'space-between',
|
|
412
|
+
}}
|
|
413
|
+
>
|
|
414
|
+
<MText
|
|
415
|
+
style={{
|
|
416
|
+
fontSize: 16,
|
|
417
|
+
fontWeight: '600',
|
|
418
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
419
|
+
}}
|
|
420
|
+
>
|
|
421
|
+
{formatMoney(
|
|
422
|
+
props?.route?.params?.isFullPayment
|
|
423
|
+
? props?.route?.params?.totalMoney
|
|
424
|
+
: props?.route?.params?.item?.payMoney
|
|
425
|
+
)}{' '}
|
|
426
|
+
đ
|
|
427
|
+
</MText>
|
|
428
|
+
<TouchableOpacity
|
|
429
|
+
onPress={() =>
|
|
430
|
+
Clipboard.setString(
|
|
431
|
+
props?.route?.params?.isFullPayment
|
|
432
|
+
? props?.route?.params?.totalMoney
|
|
433
|
+
: props?.route?.params?.item?.payMoney
|
|
434
|
+
)
|
|
435
|
+
}
|
|
436
|
+
>
|
|
437
|
+
<IconCopy />
|
|
438
|
+
</TouchableOpacity>
|
|
439
|
+
</View>
|
|
440
|
+
<MText
|
|
441
|
+
style={{
|
|
442
|
+
color: '#828282',
|
|
443
|
+
fontSize: 10,
|
|
444
|
+
fontStyle: 'italic',
|
|
445
|
+
}}
|
|
446
|
+
>
|
|
447
|
+
Số tiền được tính đến ngày {moment().format('DD/MM/YYYY')}
|
|
448
|
+
</MText>
|
|
449
|
+
</View>
|
|
450
|
+
<TourGuideZone
|
|
451
|
+
zone={1}
|
|
452
|
+
text={
|
|
453
|
+
'Để hệ thống ghi nhận chính xác khoản thanh toán, bạn đừng quên sao chép đúng nội dung chuyển khoản nhé!'
|
|
454
|
+
}
|
|
455
|
+
tooltipBottomOffset={-45}
|
|
456
|
+
style={$transferGuideZone}
|
|
457
|
+
>
|
|
458
|
+
<View>
|
|
459
|
+
<MText
|
|
460
|
+
style={{
|
|
461
|
+
fontSize: 12,
|
|
462
|
+
color: 'rgba(51, 51, 51, 1)',
|
|
463
|
+
fontWeight: '300',
|
|
464
|
+
}}
|
|
465
|
+
>
|
|
466
|
+
Nội dung chuyển khoản{' '}
|
|
467
|
+
<MText
|
|
468
|
+
style={{
|
|
469
|
+
fontSize: 12,
|
|
470
|
+
color: '#EB5757',
|
|
471
|
+
fontWeight: '300',
|
|
472
|
+
}}
|
|
473
|
+
>
|
|
474
|
+
(Bắt buộc)
|
|
475
|
+
</MText>
|
|
476
|
+
</MText>
|
|
477
|
+
<View
|
|
478
|
+
ref={transferContentRef}
|
|
479
|
+
onLayout={(event) => {
|
|
480
|
+
transferContentY.current = event.nativeEvent.layout.y;
|
|
481
|
+
transferContentHeight.current =
|
|
482
|
+
event.nativeEvent.layout.height;
|
|
483
|
+
}}
|
|
484
|
+
style={{
|
|
485
|
+
flexDirection: 'row',
|
|
486
|
+
alignItems: 'center',
|
|
487
|
+
justifyContent: 'space-between',
|
|
488
|
+
}}
|
|
489
|
+
>
|
|
490
|
+
<MText
|
|
491
|
+
style={{
|
|
492
|
+
color: 'rgba(61, 61, 61, 1)',
|
|
493
|
+
fontWeight: '600',
|
|
494
|
+
fontSize: 16,
|
|
495
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
496
|
+
}}
|
|
497
|
+
>
|
|
498
|
+
{props?.route?.params?.isFullPayment
|
|
499
|
+
? `Tat toan TC${props.route.params?.data?.codeId}`
|
|
500
|
+
: `TC${props.route.params?.data?.codeId}`}
|
|
501
|
+
</MText>
|
|
502
|
+
<TouchableOpacity
|
|
503
|
+
onPress={() =>
|
|
504
|
+
Clipboard.setString(
|
|
505
|
+
props?.route?.params?.isFullPayment
|
|
506
|
+
? `Tat toan TC${props.route.params?.data?.codeId}`
|
|
507
|
+
: `TC${props.route.params?.data?.codeId}`
|
|
508
|
+
)
|
|
509
|
+
}
|
|
510
|
+
>
|
|
511
|
+
<IconCopy />
|
|
512
|
+
</TouchableOpacity>
|
|
513
|
+
</View>
|
|
514
|
+
</View>
|
|
515
|
+
</TourGuideZone>
|
|
516
|
+
</View>
|
|
517
|
+
<View
|
|
518
|
+
style={{
|
|
519
|
+
backgroundColor: '#FFF2F2',
|
|
520
|
+
padding: 10,
|
|
521
|
+
borderRadius: 8,
|
|
522
|
+
marginTop: 16,
|
|
523
|
+
}}
|
|
524
|
+
>
|
|
525
|
+
<MText
|
|
526
|
+
style={{
|
|
527
|
+
color: '#EB5757',
|
|
528
|
+
fontSize: 12,
|
|
529
|
+
fontWeight: '600',
|
|
530
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
531
|
+
}}
|
|
532
|
+
>
|
|
533
|
+
*Lưu ý:
|
|
534
|
+
</MText>
|
|
535
|
+
<MText
|
|
536
|
+
style={{
|
|
537
|
+
fontSize: 12,
|
|
538
|
+
}}
|
|
539
|
+
>
|
|
540
|
+
- Vui lòng sao chép đúng và đầy đủ nội dung thanh toán để hệ
|
|
541
|
+
thống ghi nhận giao dịch
|
|
542
|
+
</MText>
|
|
543
|
+
<MText
|
|
544
|
+
style={{
|
|
545
|
+
fontSize: 12,
|
|
546
|
+
}}
|
|
547
|
+
>
|
|
548
|
+
- Thông tin tài khoản dịch vụ hỗ trợ thu hộ cung cấp bởi GPay.
|
|
549
|
+
Tài khoản chuyên dụng này chỉ dành cho mục đích trả nợ của bên
|
|
550
|
+
đi vay.
|
|
551
|
+
</MText>
|
|
246
552
|
</View>
|
|
247
553
|
</View>
|
|
554
|
+
<View
|
|
555
|
+
style={{
|
|
556
|
+
flexDirection: 'row',
|
|
557
|
+
alignItems: 'center',
|
|
558
|
+
justifyContent: 'space-between',
|
|
559
|
+
padding: 16,
|
|
560
|
+
marginBottom: 16,
|
|
561
|
+
}}
|
|
562
|
+
>
|
|
563
|
+
<MText>Hướng dẫn chuyển tiền</MText>
|
|
564
|
+
<TouchableOpacity
|
|
565
|
+
onPress={() => {
|
|
566
|
+
if (props?.route?.params?.isFullPayment) {
|
|
567
|
+
setShowGuide(true);
|
|
568
|
+
} else {
|
|
569
|
+
navigation.push('GuideTransferBank');
|
|
570
|
+
}
|
|
571
|
+
}}
|
|
572
|
+
>
|
|
573
|
+
<MText
|
|
574
|
+
style={{ color: '#2F80ED', textDecorationLine: 'underline' }}
|
|
575
|
+
>
|
|
576
|
+
Xem chi tiết
|
|
577
|
+
</MText>
|
|
578
|
+
</TouchableOpacity>
|
|
579
|
+
</View>
|
|
248
580
|
</ScrollView>
|
|
249
|
-
|
|
581
|
+
{props?.route?.params?.isFullPayment && (
|
|
582
|
+
<TouchableOpacity
|
|
583
|
+
style={{ margin: 16 }}
|
|
584
|
+
onPress={() => {
|
|
585
|
+
Alert.alert(
|
|
586
|
+
'Xác nhận tất toán',
|
|
587
|
+
'Bạn có chắc muốn gửi YÊU CẦU TẤT TOÁN hợp đồng không?',
|
|
588
|
+
[
|
|
589
|
+
{
|
|
590
|
+
text: 'Có',
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
text: 'Không',
|
|
594
|
+
},
|
|
595
|
+
]
|
|
596
|
+
);
|
|
597
|
+
}}
|
|
598
|
+
>
|
|
599
|
+
<LinearGradient
|
|
600
|
+
colors={['#FF7A00', '#EF4123']}
|
|
601
|
+
style={{
|
|
602
|
+
alignItems: 'center',
|
|
603
|
+
borderRadius: 30,
|
|
604
|
+
height: 40,
|
|
605
|
+
justifyContent: 'center',
|
|
606
|
+
}}
|
|
607
|
+
>
|
|
608
|
+
<MText
|
|
609
|
+
style={{
|
|
610
|
+
color: 'white',
|
|
611
|
+
}}
|
|
612
|
+
>
|
|
613
|
+
Xác nhận tất toán
|
|
614
|
+
</MText>
|
|
615
|
+
</LinearGradient>
|
|
616
|
+
</TouchableOpacity>
|
|
617
|
+
)}
|
|
618
|
+
</View>
|
|
250
619
|
<Loading isLoading={isLoading} />
|
|
620
|
+
<ReactNativeModal
|
|
621
|
+
isVisible={showGuide}
|
|
622
|
+
onBackdropPress={() => setShowGuide(false)}
|
|
623
|
+
style={{ justifyContent: 'flex-end', margin: 0 }}
|
|
624
|
+
>
|
|
625
|
+
<View
|
|
626
|
+
style={{
|
|
627
|
+
backgroundColor: 'white',
|
|
628
|
+
borderTopLeftRadius: 30,
|
|
629
|
+
borderTopRightRadius: 30,
|
|
630
|
+
}}
|
|
631
|
+
>
|
|
632
|
+
<LinearGradient
|
|
633
|
+
colors={['#FF8E4F', '#EF592E']}
|
|
634
|
+
style={{
|
|
635
|
+
borderTopLeftRadius: 30,
|
|
636
|
+
borderTopRightRadius: 30,
|
|
637
|
+
paddingBottom: 24,
|
|
638
|
+
}}
|
|
639
|
+
>
|
|
640
|
+
<View style={{ padding: 16, alignItems: 'center', gap: 4 }}>
|
|
641
|
+
<MText
|
|
642
|
+
style={{
|
|
643
|
+
fontSize: 16,
|
|
644
|
+
fontWeight: '600',
|
|
645
|
+
color: 'white',
|
|
646
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
647
|
+
}}
|
|
648
|
+
>
|
|
649
|
+
CÁC BƯỚC TẤT TOÁN
|
|
650
|
+
</MText>
|
|
651
|
+
<MText
|
|
652
|
+
style={{
|
|
653
|
+
fontSize: 12,
|
|
654
|
+
color: 'white',
|
|
655
|
+
}}
|
|
656
|
+
>
|
|
657
|
+
Có 2 bước, vui lòng đọc kĩ thông tin
|
|
658
|
+
</MText>
|
|
659
|
+
</View>
|
|
660
|
+
</LinearGradient>
|
|
661
|
+
<View
|
|
662
|
+
style={{
|
|
663
|
+
backgroundColor: 'white',
|
|
664
|
+
borderTopLeftRadius: 30,
|
|
665
|
+
borderTopRightRadius: 30,
|
|
666
|
+
top: -24,
|
|
667
|
+
padding: 16,
|
|
668
|
+
}}
|
|
669
|
+
>
|
|
670
|
+
<MText
|
|
671
|
+
style={{
|
|
672
|
+
fontWeight: '600',
|
|
673
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
674
|
+
color: '#EF592E',
|
|
675
|
+
}}
|
|
676
|
+
>
|
|
677
|
+
BƯỚC 1: CHUYỂN KHOẢN
|
|
678
|
+
</MText>
|
|
679
|
+
<MText
|
|
680
|
+
style={{
|
|
681
|
+
fontWeight: '600',
|
|
682
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
683
|
+
marginTop: 8,
|
|
684
|
+
}}
|
|
685
|
+
>
|
|
686
|
+
Cách 1: Thanh toán bằng QR (Khuyến nghị)
|
|
687
|
+
</MText>
|
|
688
|
+
<View
|
|
689
|
+
style={{
|
|
690
|
+
flexDirection: 'row',
|
|
691
|
+
alignItems: 'center',
|
|
692
|
+
gap: 8,
|
|
693
|
+
marginTop: 8,
|
|
694
|
+
}}
|
|
695
|
+
>
|
|
696
|
+
<TimaSmall />
|
|
697
|
+
<MText style={{ flex: 1, fontSize: 12 }}>
|
|
698
|
+
Lưu hoặc quét mã QR
|
|
699
|
+
</MText>
|
|
700
|
+
</View>
|
|
701
|
+
<View
|
|
702
|
+
style={{
|
|
703
|
+
flexDirection: 'row',
|
|
704
|
+
alignItems: 'center',
|
|
705
|
+
gap: 8,
|
|
706
|
+
marginTop: 8,
|
|
707
|
+
}}
|
|
708
|
+
>
|
|
709
|
+
<TimaSmall />
|
|
710
|
+
<MText style={{ flex: 1, fontSize: 12 }}>
|
|
711
|
+
Mở app ngân hàng và thanh toán
|
|
712
|
+
</MText>
|
|
713
|
+
</View>
|
|
714
|
+
<View
|
|
715
|
+
style={{
|
|
716
|
+
height: 1,
|
|
717
|
+
backgroundColor: 'rgba(224, 224, 224, 1)',
|
|
718
|
+
marginVertical: 10,
|
|
719
|
+
}}
|
|
720
|
+
/>
|
|
721
|
+
<MText
|
|
722
|
+
style={{
|
|
723
|
+
fontWeight: '600',
|
|
724
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
725
|
+
}}
|
|
726
|
+
>
|
|
727
|
+
Cách 2: Chuyển khoản thủ công
|
|
728
|
+
</MText>
|
|
729
|
+
<View
|
|
730
|
+
style={{
|
|
731
|
+
flexDirection: 'row',
|
|
732
|
+
alignItems: 'center',
|
|
733
|
+
gap: 8,
|
|
734
|
+
marginTop: 8,
|
|
735
|
+
}}
|
|
736
|
+
>
|
|
737
|
+
<TimaSmall />
|
|
738
|
+
<MText style={{ flex: 1, fontSize: 12 }}>
|
|
739
|
+
Copy thông tin tài khoản (Số TK, Ngân hàng, Số tiền)
|
|
740
|
+
</MText>
|
|
741
|
+
</View>
|
|
742
|
+
<View
|
|
743
|
+
style={{
|
|
744
|
+
flexDirection: 'row',
|
|
745
|
+
alignItems: 'center',
|
|
746
|
+
gap: 8,
|
|
747
|
+
marginTop: 8,
|
|
748
|
+
}}
|
|
749
|
+
>
|
|
750
|
+
<TimaSmall />
|
|
751
|
+
<MText style={{ flex: 1, fontSize: 12 }}>
|
|
752
|
+
<MText
|
|
753
|
+
style={{
|
|
754
|
+
color: '#EB5757',
|
|
755
|
+
fontSize: 12,
|
|
756
|
+
fontWeight: '600',
|
|
757
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
758
|
+
}}
|
|
759
|
+
>
|
|
760
|
+
BẮT BUỘC:
|
|
761
|
+
</MText>{' '}
|
|
762
|
+
Copy đúng “Nội dung chuyển khoản”
|
|
763
|
+
</MText>
|
|
764
|
+
</View>
|
|
765
|
+
<View
|
|
766
|
+
style={{
|
|
767
|
+
flexDirection: 'row',
|
|
768
|
+
alignItems: 'center',
|
|
769
|
+
gap: 8,
|
|
770
|
+
marginTop: 8,
|
|
771
|
+
}}
|
|
772
|
+
>
|
|
773
|
+
<TimaSmall />
|
|
774
|
+
<MText style={{ flex: 1, fontSize: 12 }}>
|
|
775
|
+
Mở app ngân hàng và thanh toán
|
|
776
|
+
</MText>
|
|
777
|
+
</View>
|
|
778
|
+
<View
|
|
779
|
+
style={{
|
|
780
|
+
height: 12,
|
|
781
|
+
backgroundColor: '#FFF3E9',
|
|
782
|
+
marginVertical: 10,
|
|
783
|
+
marginHorizontal: -16,
|
|
784
|
+
}}
|
|
785
|
+
/>
|
|
786
|
+
<MText
|
|
787
|
+
style={{
|
|
788
|
+
fontWeight: '600',
|
|
789
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
790
|
+
color: '#EF592E',
|
|
791
|
+
}}
|
|
792
|
+
>
|
|
793
|
+
BƯỚC 2:
|
|
794
|
+
</MText>
|
|
795
|
+
<View
|
|
796
|
+
style={{
|
|
797
|
+
flexDirection: 'row',
|
|
798
|
+
alignItems: 'center',
|
|
799
|
+
gap: 8,
|
|
800
|
+
marginTop: 8,
|
|
801
|
+
}}
|
|
802
|
+
>
|
|
803
|
+
<TimaSmall />
|
|
804
|
+
<MText style={{ flex: 1, fontSize: 12 }}>
|
|
805
|
+
Chọn “Xác nhận tất toán” để gửi yêu cầu tới Tima thực hiện “Tất
|
|
806
|
+
toán hợp đồng”
|
|
807
|
+
</MText>
|
|
808
|
+
</View>
|
|
809
|
+
</View>
|
|
810
|
+
<TouchableOpacity
|
|
811
|
+
style={{ position: 'absolute', left: 16, top: 16 }}
|
|
812
|
+
onPress={() => setShowGuide(false)}
|
|
813
|
+
>
|
|
814
|
+
<CloseIcon />
|
|
815
|
+
</TouchableOpacity>
|
|
816
|
+
</View>
|
|
817
|
+
</ReactNativeModal>
|
|
251
818
|
</View>
|
|
252
819
|
);
|
|
253
820
|
});
|
|
821
|
+
const $backButton: ViewStyle = {
|
|
822
|
+
position: 'absolute',
|
|
823
|
+
left: 16,
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
const $header: ViewStyle = {
|
|
827
|
+
flexDirection: 'row',
|
|
828
|
+
alignItems: 'center',
|
|
829
|
+
paddingVertical: 16,
|
|
830
|
+
justifyContent: 'center',
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
const $tourTooltipPosition: ViewStyle = {
|
|
834
|
+
alignItems: 'flex-end',
|
|
835
|
+
overflow: 'visible',
|
|
836
|
+
paddingHorizontal: 16,
|
|
837
|
+
paddingTop: 0,
|
|
838
|
+
paddingBottom: 0,
|
|
839
|
+
borderRadius: 0,
|
|
840
|
+
};
|
|
841
|
+
|
|
842
|
+
const $tourTooltip: ViewStyle = {
|
|
843
|
+
width: 224,
|
|
844
|
+
minHeight: 84,
|
|
845
|
+
backgroundColor: 'white',
|
|
846
|
+
borderRadius: 8,
|
|
847
|
+
paddingHorizontal: 12,
|
|
848
|
+
paddingTop: 10,
|
|
849
|
+
paddingBottom: 12,
|
|
850
|
+
shadowColor: '#000',
|
|
851
|
+
shadowOffset: { width: 0, height: 2 },
|
|
852
|
+
shadowOpacity: 0.18,
|
|
853
|
+
shadowRadius: 8,
|
|
854
|
+
elevation: 8,
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
const $tourTooltipText = {
|
|
858
|
+
color: '#333333',
|
|
859
|
+
fontSize: 10,
|
|
860
|
+
lineHeight: 16,
|
|
861
|
+
fontWeight: '400',
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
const $tourTooltipButton: ViewStyle = {
|
|
865
|
+
alignSelf: 'flex-end',
|
|
866
|
+
marginTop: 6,
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
const $tourTooltipButtonText = {
|
|
870
|
+
color: '#EF592E',
|
|
871
|
+
fontSize: 10,
|
|
872
|
+
lineHeight: 16,
|
|
873
|
+
textDecorationLine: 'underline',
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
const $tourTooltipArrow: ViewStyle = {
|
|
877
|
+
position: 'absolute',
|
|
878
|
+
right: 18,
|
|
879
|
+
bottom: -10,
|
|
880
|
+
width: 0,
|
|
881
|
+
height: 0,
|
|
882
|
+
borderLeftWidth: 8,
|
|
883
|
+
borderRightWidth: 8,
|
|
884
|
+
borderTopWidth: 10,
|
|
885
|
+
borderLeftColor: 'transparent',
|
|
886
|
+
borderRightColor: 'transparent',
|
|
887
|
+
borderTopColor: 'white',
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
const $transferGuideZone: ViewStyle = {
|
|
891
|
+
backgroundColor: 'white',
|
|
892
|
+
borderRadius: 8,
|
|
893
|
+
borderWidth: 2,
|
|
894
|
+
borderColor: 'white',
|
|
895
|
+
marginTop: 16,
|
|
896
|
+
};
|