react-native-timacare 3.3.19 → 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/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 +29 -4
- 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 +372 -68
- 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/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/keyboardspace/index.tsx +0 -2
- package/src/screens/detail-loan/DetailLoanTima.tsx +29 -4
- 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 +372 -68
- 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,25 +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,
|
|
13
14
|
ViewStyle,
|
|
14
15
|
} from 'react-native';
|
|
15
|
-
import { commonStyles } from '../CommonStyles';
|
|
16
16
|
import {
|
|
17
|
+
CloseIcon,
|
|
17
18
|
IconBack,
|
|
18
19
|
IconCopy,
|
|
19
20
|
IconDownload,
|
|
20
21
|
TimaSmall,
|
|
21
22
|
} from '../../assets/icons';
|
|
22
|
-
import { color } from '../../theme';
|
|
23
23
|
import { MText } from '../../components/MText';
|
|
24
24
|
import { useNavigation } from '@react-navigation/native';
|
|
25
25
|
import { Api } from '../../services/api';
|
|
@@ -31,19 +31,70 @@ import MHeader from '../../components/MHeader';
|
|
|
31
31
|
import ReactNativeModal from 'react-native-modal';
|
|
32
32
|
import LinearGradient from 'react-native-linear-gradient';
|
|
33
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';
|
|
34
39
|
|
|
35
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) {
|
|
36
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>();
|
|
37
79
|
const [linkImage, setLinkImage] = useState<string>();
|
|
38
80
|
const [isLoading, setIsLoading] = useState(false);
|
|
39
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();
|
|
40
89
|
const getData = () => {
|
|
41
90
|
setIsLoading(true);
|
|
42
91
|
Api.getInstance()
|
|
43
92
|
.getQrPayment({
|
|
44
93
|
LoanBriefId: props?.route?.params?.id,
|
|
45
|
-
TypeCloseLoan: 0, // đóng tiền kỳ
|
|
46
|
-
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,
|
|
47
98
|
})
|
|
48
99
|
.then((response) => {
|
|
49
100
|
setIsLoading(false);
|
|
@@ -60,6 +111,12 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
60
111
|
.catch((err) => {
|
|
61
112
|
Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau');
|
|
62
113
|
setIsLoading(false);
|
|
114
|
+
})
|
|
115
|
+
.finally(() => {
|
|
116
|
+
setShouldStartGuide(true);
|
|
117
|
+
if (props?.route?.params?.isFullPayment) {
|
|
118
|
+
setShowGuide(true);
|
|
119
|
+
}
|
|
63
120
|
});
|
|
64
121
|
};
|
|
65
122
|
|
|
@@ -67,6 +124,72 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
67
124
|
getData();
|
|
68
125
|
}, []);
|
|
69
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
|
+
|
|
70
193
|
return (
|
|
71
194
|
<View style={{ flex: 1, backgroundColor: 'rgba(244, 244, 244, 1)' }}>
|
|
72
195
|
<MHeader title={`Vay trực tuyến 24/7`} />
|
|
@@ -85,14 +208,25 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
85
208
|
fontFamily: 'BeVietnamPro-SemiBold',
|
|
86
209
|
}}
|
|
87
210
|
>
|
|
88
|
-
|
|
211
|
+
{props?.route?.params?.isFullPayment
|
|
212
|
+
? 'TẤT TOÁN HỢP ĐỒNG'
|
|
213
|
+
: 'THANH TOÁN KỲ'}
|
|
89
214
|
</MText>
|
|
90
215
|
</View>
|
|
91
|
-
<ScrollView
|
|
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
|
+
>
|
|
92
226
|
<View
|
|
93
227
|
style={{
|
|
94
228
|
backgroundColor: 'white',
|
|
95
|
-
|
|
229
|
+
marginHorizontal: 16,
|
|
96
230
|
borderRadius: 16,
|
|
97
231
|
padding: 16,
|
|
98
232
|
}}
|
|
@@ -137,8 +271,8 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
137
271
|
uri: linkImage,
|
|
138
272
|
}}
|
|
139
273
|
style={{
|
|
140
|
-
width: Dimensions.get('window').width -
|
|
141
|
-
height: Dimensions.get('window').width -
|
|
274
|
+
width: Dimensions.get('window').width - 100,
|
|
275
|
+
height: Dimensions.get('window').width - 100,
|
|
142
276
|
resizeMode: 'contain',
|
|
143
277
|
}}
|
|
144
278
|
/>
|
|
@@ -258,74 +392,127 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
258
392
|
>
|
|
259
393
|
{props.route.params?.data?.accountName}
|
|
260
394
|
</MText>
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
fontSize: 12,
|
|
264
|
-
color: 'rgba(51, 51, 51, 1)',
|
|
265
|
-
fontWeight: '300',
|
|
266
|
-
marginTop: 16,
|
|
267
|
-
}}
|
|
268
|
-
>
|
|
269
|
-
Số tiền phải trả
|
|
270
|
-
</MText>
|
|
271
|
-
<MText
|
|
272
|
-
style={{
|
|
273
|
-
fontSize: 16,
|
|
274
|
-
fontWeight: '600',
|
|
275
|
-
fontFamily: 'BeVietnamPro-SemiBold',
|
|
276
|
-
}}
|
|
277
|
-
>
|
|
278
|
-
{formatMoney(props?.route?.params?.item?.payMoney)} đ
|
|
279
|
-
</MText>
|
|
280
|
-
<MText
|
|
281
|
-
style={{ color: '#828282', fontSize: 10, fontStyle: 'italic' }}
|
|
282
|
-
>
|
|
283
|
-
Số tiền được tính đến ngày {moment().format('DD/MM/YYYY')}
|
|
284
|
-
</MText>
|
|
285
|
-
<MText
|
|
286
|
-
style={{
|
|
287
|
-
fontSize: 12,
|
|
288
|
-
color: 'rgba(51, 51, 51, 1)',
|
|
289
|
-
fontWeight: '300',
|
|
290
|
-
marginTop: 16,
|
|
291
|
-
}}
|
|
292
|
-
>
|
|
293
|
-
Nội dung chuyển khoản{' '}
|
|
395
|
+
|
|
396
|
+
<View>
|
|
294
397
|
<MText
|
|
295
398
|
style={{
|
|
296
399
|
fontSize: 12,
|
|
297
|
-
color: '
|
|
400
|
+
color: 'rgba(51, 51, 51, 1)',
|
|
298
401
|
fontWeight: '300',
|
|
402
|
+
marginTop: 16,
|
|
299
403
|
}}
|
|
300
404
|
>
|
|
301
|
-
|
|
405
|
+
Số tiền phải trả
|
|
302
406
|
</MText>
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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>
|
|
311
440
|
<MText
|
|
312
441
|
style={{
|
|
313
|
-
color: '
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
fontFamily: 'BeVietnamPro-SemiBold',
|
|
442
|
+
color: '#828282',
|
|
443
|
+
fontSize: 10,
|
|
444
|
+
fontStyle: 'italic',
|
|
317
445
|
}}
|
|
318
446
|
>
|
|
319
|
-
|
|
447
|
+
Số tiền được tính đến ngày {moment().format('DD/MM/YYYY')}
|
|
320
448
|
</MText>
|
|
321
|
-
<TouchableOpacity
|
|
322
|
-
onPress={() =>
|
|
323
|
-
Clipboard.setString(`TC${props.route.params?.codeId}`)
|
|
324
|
-
}
|
|
325
|
-
>
|
|
326
|
-
<IconCopy />
|
|
327
|
-
</TouchableOpacity>
|
|
328
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>
|
|
329
516
|
</View>
|
|
330
517
|
<View
|
|
331
518
|
style={{
|
|
@@ -370,10 +557,19 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
370
557
|
alignItems: 'center',
|
|
371
558
|
justifyContent: 'space-between',
|
|
372
559
|
padding: 16,
|
|
560
|
+
marginBottom: 16,
|
|
373
561
|
}}
|
|
374
562
|
>
|
|
375
563
|
<MText>Hướng dẫn chuyển tiền</MText>
|
|
376
|
-
<TouchableOpacity
|
|
564
|
+
<TouchableOpacity
|
|
565
|
+
onPress={() => {
|
|
566
|
+
if (props?.route?.params?.isFullPayment) {
|
|
567
|
+
setShowGuide(true);
|
|
568
|
+
} else {
|
|
569
|
+
navigation.push('GuideTransferBank');
|
|
570
|
+
}
|
|
571
|
+
}}
|
|
572
|
+
>
|
|
377
573
|
<MText
|
|
378
574
|
style={{ color: '#2F80ED', textDecorationLine: 'underline' }}
|
|
379
575
|
>
|
|
@@ -382,6 +578,43 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
382
578
|
</TouchableOpacity>
|
|
383
579
|
</View>
|
|
384
580
|
</ScrollView>
|
|
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
|
+
)}
|
|
385
618
|
</View>
|
|
386
619
|
<Loading isLoading={isLoading} />
|
|
387
620
|
<ReactNativeModal
|
|
@@ -574,6 +807,12 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
|
|
|
574
807
|
</MText>
|
|
575
808
|
</View>
|
|
576
809
|
</View>
|
|
810
|
+
<TouchableOpacity
|
|
811
|
+
style={{ position: 'absolute', left: 16, top: 16 }}
|
|
812
|
+
onPress={() => setShowGuide(false)}
|
|
813
|
+
>
|
|
814
|
+
<CloseIcon />
|
|
815
|
+
</TouchableOpacity>
|
|
577
816
|
</View>
|
|
578
817
|
</ReactNativeModal>
|
|
579
818
|
</View>
|
|
@@ -590,3 +829,68 @@ const $header: ViewStyle = {
|
|
|
590
829
|
paddingVertical: 16,
|
|
591
830
|
justifyContent: 'center',
|
|
592
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
|
+
};
|