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