react-native-timacare 3.3.17 → 3.3.19

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 (47) hide show
  1. package/lib/commonjs/components/MHeader.js +1 -1
  2. package/lib/commonjs/components/MHeader.js.flow +1 -1
  3. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js +1 -1
  4. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.flow +117 -32
  5. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.map +1 -1
  6. package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
  7. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +360 -21
  8. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
  9. package/lib/commonjs/screens/home/DigitalTopupItem.js +1 -1
  10. package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +272 -4
  11. package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -1
  12. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
  13. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +30 -46
  14. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  15. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js +1 -1
  16. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.flow +5 -8
  17. package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
  18. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
  19. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +21 -23
  20. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  21. package/lib/module/components/MHeader.js +1 -1
  22. package/lib/module/screens/detail-loan/DetailLoanTima.js +1 -1
  23. package/lib/module/screens/detail-loan/DetailLoanTima.js.map +1 -1
  24. package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
  25. package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
  26. package/lib/module/screens/home/DigitalTopupItem.js +1 -1
  27. package/lib/module/screens/home/DigitalTopupItem.js.map +1 -1
  28. package/lib/module/screens/toan-trinh-so/RegisterCamera.js +1 -1
  29. package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  30. package/lib/module/screens/toan-trinh-so/TTSSelfie.js +1 -1
  31. package/lib/module/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
  32. package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
  33. package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  34. package/lib/typescript/screens/detail-loan/DetailLoanTima.d.ts.map +1 -1
  35. package/lib/typescript/screens/detail-loan/ShowQrCode.d.ts.map +1 -1
  36. package/lib/typescript/screens/home/DigitalTopupItem.d.ts.map +1 -1
  37. package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts.map +1 -1
  38. package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts.map +1 -1
  39. package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/components/MHeader.tsx +1 -1
  42. package/src/screens/detail-loan/DetailLoanTima.tsx +117 -32
  43. package/src/screens/detail-loan/ShowQrCode.tsx +360 -21
  44. package/src/screens/home/DigitalTopupItem.tsx +272 -4
  45. package/src/screens/toan-trinh-so/RegisterCamera.tsx +30 -46
  46. package/src/screens/toan-trinh-so/TTSSelfie.tsx +5 -8
  47. package/src/screens/toan-trinh-so/VehicleCamera.tsx +21 -23
@@ -10,9 +10,15 @@ import {
10
10
  ScrollView,
11
11
  TouchableOpacity,
12
12
  View,
13
+ ViewStyle,
13
14
  } from 'react-native';
14
15
  import { commonStyles } from '../CommonStyles';
15
- import { IconBack, IconCopy, IconDownload } from '../../assets/icons';
16
+ import {
17
+ IconBack,
18
+ IconCopy,
19
+ IconDownload,
20
+ TimaSmall,
21
+ } from '../../assets/icons';
16
22
  import { color } from '../../theme';
17
23
  import { MText } from '../../components/MText';
18
24
  import { useNavigation } from '@react-navigation/native';
@@ -22,19 +28,22 @@ 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';
25
34
 
26
35
  export const ShowQrCode = observer(function ShowQrCode(props: any) {
27
36
  const navigation = useNavigation();
28
37
  const [linkImage, setLinkImage] = useState<string>();
29
38
  const [isLoading, setIsLoading] = useState(false);
30
-
39
+ const [showGuide, setShowGuide] = useState(false);
31
40
  const getData = () => {
32
41
  setIsLoading(true);
33
42
  Api.getInstance()
34
43
  .getQrPayment({
35
44
  LoanBriefId: props?.route?.params?.id,
36
45
  TypeCloseLoan: 0, // đóng tiền kỳ
37
- Money: Number(props?.route?.params?.amount),
46
+ Money: Number(props?.route?.params?.item?.payMoney) || 0,
38
47
  })
39
48
  .then((response) => {
40
49
  setIsLoading(false);
@@ -60,8 +69,25 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
60
69
 
61
70
  return (
62
71
  <View style={{ flex: 1, backgroundColor: 'rgba(244, 244, 244, 1)' }}>
63
- <MHeader title="Tất toán khoản vay" onBack={() => navigation.goBack()} />
64
- <SafeAreaView style={{ flex: 1 }}>
72
+ <MHeader title={`Vay trực tuyến 24/7`} />
73
+ <View style={{ flex: 1 }}>
74
+ <View style={$header}>
75
+ <TouchableOpacity
76
+ style={$backButton}
77
+ onPress={() => navigation.goBack()}
78
+ >
79
+ <IconBack />
80
+ </TouchableOpacity>
81
+ <MText
82
+ style={{
83
+ fontSize: 16,
84
+ fontWeight: '600',
85
+ fontFamily: 'BeVietnamPro-SemiBold',
86
+ }}
87
+ >
88
+ THANH TOÁN KỲ
89
+ </MText>
90
+ </View>
65
91
  <ScrollView>
66
92
  <View
67
93
  style={{
@@ -122,6 +148,12 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
122
148
  flexDirection: 'row',
123
149
  alignItems: 'center',
124
150
  gap: 5,
151
+ backgroundColor: '#FFF7F0',
152
+ borderWidth: 1,
153
+ borderColor: '#EF592E',
154
+ borderRadius: 4,
155
+ paddingHorizontal: 8,
156
+ paddingVertical: 4,
125
157
  }}
126
158
  onPress={async () => {
127
159
  ReactNativeBlobUtil.config({
@@ -176,20 +208,80 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
176
208
  fontSize: 12,
177
209
  color: 'rgba(51, 51, 51, 1)',
178
210
  fontWeight: '300',
211
+ marginTop: 16,
212
+ }}
213
+ >
214
+ Số tài khoản
215
+ </MText>
216
+ <View
217
+ style={{
218
+ flexDirection: 'row',
219
+ alignItems: 'center',
220
+ justifyContent: 'space-between',
221
+ }}
222
+ >
223
+ <MText
224
+ style={{
225
+ color: 'rgba(61, 61, 61, 1)',
226
+ fontWeight: '600',
227
+ fontSize: 16,
228
+ fontFamily: 'BeVietnamPro-SemiBold',
229
+ }}
230
+ >
231
+ {props.route.params?.data?.accountNumber}
232
+ </MText>
233
+ <TouchableOpacity
234
+ onPress={() =>
235
+ Clipboard.setString(props.route.params?.data?.accountNumber)
236
+ }
237
+ >
238
+ <IconCopy />
239
+ </TouchableOpacity>
240
+ </View>
241
+ <MText
242
+ style={{
243
+ fontSize: 12,
244
+ color: 'rgba(51, 51, 51, 1)',
245
+ fontWeight: '300',
246
+ marginTop: 16,
247
+ }}
248
+ >
249
+ Tên tài khoản thụ hưởng
250
+ </MText>
251
+ <MText
252
+ style={{
253
+ color: 'rgba(61, 61, 61, 1)',
254
+ fontWeight: '600',
255
+ fontSize: 16,
256
+ fontFamily: 'BeVietnamPro-SemiBold',
257
+ }}
258
+ >
259
+ {props.route.params?.data?.accountName}
260
+ </MText>
261
+ <MText
262
+ style={{
263
+ fontSize: 12,
264
+ color: 'rgba(51, 51, 51, 1)',
265
+ fontWeight: '300',
266
+ marginTop: 16,
179
267
  }}
180
268
  >
181
- Số tiền thanh toán
269
+ Số tiền phải trả
182
270
  </MText>
183
271
  <MText
184
272
  style={{
185
273
  fontSize: 16,
186
- color: color.primary,
187
274
  fontWeight: '600',
275
+ fontFamily: 'BeVietnamPro-SemiBold',
188
276
  }}
189
277
  >
190
- {formatMoney(props?.route?.params?.amount)} đ
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')}
191
284
  </MText>
192
-
193
285
  <MText
194
286
  style={{
195
287
  fontSize: 12,
@@ -198,7 +290,16 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
198
290
  marginTop: 16,
199
291
  }}
200
292
  >
201
- Số tài khoản
293
+ Nội dung chuyển khoản{' '}
294
+ <MText
295
+ style={{
296
+ fontSize: 12,
297
+ color: '#EB5757',
298
+ fontWeight: '300',
299
+ }}
300
+ >
301
+ (Bắt buộc)
302
+ </MText>
202
303
  </MText>
203
304
  <View
204
305
  style={{
@@ -212,42 +313,280 @@ export const ShowQrCode = observer(function ShowQrCode(props: any) {
212
313
  color: 'rgba(61, 61, 61, 1)',
213
314
  fontWeight: '600',
214
315
  fontSize: 16,
316
+ fontFamily: 'BeVietnamPro-SemiBold',
215
317
  }}
216
318
  >
217
- {props.route.params?.data?.accountNumber}
319
+ TC{props.route.params?.codeId}
218
320
  </MText>
219
321
  <TouchableOpacity
220
322
  onPress={() =>
221
- Clipboard.setString(props.route.params?.data?.accountNumber)
323
+ Clipboard.setString(`TC${props.route.params?.codeId}`)
222
324
  }
223
325
  >
224
326
  <IconCopy />
225
327
  </TouchableOpacity>
226
328
  </View>
329
+ </View>
330
+ <View
331
+ style={{
332
+ backgroundColor: '#FFF2F2',
333
+ padding: 10,
334
+ borderRadius: 8,
335
+ marginTop: 16,
336
+ }}
337
+ >
227
338
  <MText
228
339
  style={{
340
+ color: '#EB5757',
229
341
  fontSize: 12,
230
- color: 'rgba(51, 51, 51, 1)',
231
- fontWeight: '300',
232
- marginTop: 16,
342
+ fontWeight: '600',
343
+ fontFamily: 'BeVietnamPro-SemiBold',
233
344
  }}
234
345
  >
235
- Tên tài khoản thụ hưởng
346
+ *Lưu ý:
236
347
  </MText>
237
348
  <MText
238
349
  style={{
239
- color: 'rgba(61, 61, 61, 1)',
240
- fontWeight: '600',
241
- fontSize: 16,
350
+ fontSize: 12,
242
351
  }}
243
352
  >
244
- {props.route.params?.data?.accountName}
353
+ - Vui lòng sao chép đúng và đầy đủ nội dung thanh toán để hệ
354
+ thống ghi nhận giao dịch
355
+ </MText>
356
+ <MText
357
+ style={{
358
+ fontSize: 12,
359
+ }}
360
+ >
361
+ - Thông tin tài khoản dịch vụ hỗ trợ thu hộ cung cấp bởi GPay.
362
+ Tài khoản chuyên dụng này chỉ dành cho mục đích trả nợ của bên
363
+ đi vay.
245
364
  </MText>
246
365
  </View>
247
366
  </View>
367
+ <View
368
+ style={{
369
+ flexDirection: 'row',
370
+ alignItems: 'center',
371
+ justifyContent: 'space-between',
372
+ padding: 16,
373
+ }}
374
+ >
375
+ <MText>Hướng dẫn chuyển tiền</MText>
376
+ <TouchableOpacity onPress={() => setShowGuide(true)}>
377
+ <MText
378
+ style={{ color: '#2F80ED', textDecorationLine: 'underline' }}
379
+ >
380
+ Xem chi tiết
381
+ </MText>
382
+ </TouchableOpacity>
383
+ </View>
248
384
  </ScrollView>
249
- </SafeAreaView>
385
+ </View>
250
386
  <Loading isLoading={isLoading} />
387
+ <ReactNativeModal
388
+ isVisible={showGuide}
389
+ onBackdropPress={() => setShowGuide(false)}
390
+ style={{ justifyContent: 'flex-end', margin: 0 }}
391
+ >
392
+ <View
393
+ style={{
394
+ backgroundColor: 'white',
395
+ borderTopLeftRadius: 30,
396
+ borderTopRightRadius: 30,
397
+ }}
398
+ >
399
+ <LinearGradient
400
+ colors={['#FF8E4F', '#EF592E']}
401
+ style={{
402
+ borderTopLeftRadius: 30,
403
+ borderTopRightRadius: 30,
404
+ paddingBottom: 24,
405
+ }}
406
+ >
407
+ <View style={{ padding: 16, alignItems: 'center', gap: 4 }}>
408
+ <MText
409
+ style={{
410
+ fontSize: 16,
411
+ fontWeight: '600',
412
+ color: 'white',
413
+ fontFamily: 'BeVietnamPro-SemiBold',
414
+ }}
415
+ >
416
+ CÁC BƯỚC TẤT TOÁN
417
+ </MText>
418
+ <MText
419
+ style={{
420
+ fontSize: 12,
421
+ color: 'white',
422
+ }}
423
+ >
424
+ Có 2 bước, vui lòng đọc kĩ thông tin
425
+ </MText>
426
+ </View>
427
+ </LinearGradient>
428
+ <View
429
+ style={{
430
+ backgroundColor: 'white',
431
+ borderTopLeftRadius: 30,
432
+ borderTopRightRadius: 30,
433
+ top: -24,
434
+ padding: 16,
435
+ }}
436
+ >
437
+ <MText
438
+ style={{
439
+ fontWeight: '600',
440
+ fontFamily: 'BeVietnamPro-SemiBold',
441
+ color: '#EF592E',
442
+ }}
443
+ >
444
+ BƯỚC 1: CHUYỂN KHOẢN
445
+ </MText>
446
+ <MText
447
+ style={{
448
+ fontWeight: '600',
449
+ fontFamily: 'BeVietnamPro-SemiBold',
450
+ marginTop: 8,
451
+ }}
452
+ >
453
+ Cách 1: Thanh toán bằng QR (Khuyến nghị)
454
+ </MText>
455
+ <View
456
+ style={{
457
+ flexDirection: 'row',
458
+ alignItems: 'center',
459
+ gap: 8,
460
+ marginTop: 8,
461
+ }}
462
+ >
463
+ <TimaSmall />
464
+ <MText style={{ flex: 1, fontSize: 12 }}>
465
+ Lưu hoặc quét mã QR
466
+ </MText>
467
+ </View>
468
+ <View
469
+ style={{
470
+ flexDirection: 'row',
471
+ alignItems: 'center',
472
+ gap: 8,
473
+ marginTop: 8,
474
+ }}
475
+ >
476
+ <TimaSmall />
477
+ <MText style={{ flex: 1, fontSize: 12 }}>
478
+ Mở app ngân hàng và thanh toán
479
+ </MText>
480
+ </View>
481
+ <View
482
+ style={{
483
+ height: 1,
484
+ backgroundColor: 'rgba(224, 224, 224, 1)',
485
+ marginVertical: 10,
486
+ }}
487
+ />
488
+ <MText
489
+ style={{
490
+ fontWeight: '600',
491
+ fontFamily: 'BeVietnamPro-SemiBold',
492
+ }}
493
+ >
494
+ Cách 2: Chuyển khoản thủ công
495
+ </MText>
496
+ <View
497
+ style={{
498
+ flexDirection: 'row',
499
+ alignItems: 'center',
500
+ gap: 8,
501
+ marginTop: 8,
502
+ }}
503
+ >
504
+ <TimaSmall />
505
+ <MText style={{ flex: 1, fontSize: 12 }}>
506
+ Copy thông tin tài khoản (Số TK, Ngân hàng, Số tiền)
507
+ </MText>
508
+ </View>
509
+ <View
510
+ style={{
511
+ flexDirection: 'row',
512
+ alignItems: 'center',
513
+ gap: 8,
514
+ marginTop: 8,
515
+ }}
516
+ >
517
+ <TimaSmall />
518
+ <MText style={{ flex: 1, fontSize: 12 }}>
519
+ <MText
520
+ style={{
521
+ color: '#EB5757',
522
+ fontSize: 12,
523
+ fontWeight: '600',
524
+ fontFamily: 'BeVietnamPro-SemiBold',
525
+ }}
526
+ >
527
+ BẮT BUỘC:
528
+ </MText>{' '}
529
+ Copy đúng “Nội dung chuyển khoản”
530
+ </MText>
531
+ </View>
532
+ <View
533
+ style={{
534
+ flexDirection: 'row',
535
+ alignItems: 'center',
536
+ gap: 8,
537
+ marginTop: 8,
538
+ }}
539
+ >
540
+ <TimaSmall />
541
+ <MText style={{ flex: 1, fontSize: 12 }}>
542
+ Mở app ngân hàng và thanh toán
543
+ </MText>
544
+ </View>
545
+ <View
546
+ style={{
547
+ height: 12,
548
+ backgroundColor: '#FFF3E9',
549
+ marginVertical: 10,
550
+ marginHorizontal: -16,
551
+ }}
552
+ />
553
+ <MText
554
+ style={{
555
+ fontWeight: '600',
556
+ fontFamily: 'BeVietnamPro-SemiBold',
557
+ color: '#EF592E',
558
+ }}
559
+ >
560
+ BƯỚC 2:
561
+ </MText>
562
+ <View
563
+ style={{
564
+ flexDirection: 'row',
565
+ alignItems: 'center',
566
+ gap: 8,
567
+ marginTop: 8,
568
+ }}
569
+ >
570
+ <TimaSmall />
571
+ <MText style={{ flex: 1, fontSize: 12 }}>
572
+ 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
573
+ toán hợp đồng”
574
+ </MText>
575
+ </View>
576
+ </View>
577
+ </View>
578
+ </ReactNativeModal>
251
579
  </View>
252
580
  );
253
581
  });
582
+ const $backButton: ViewStyle = {
583
+ position: 'absolute',
584
+ left: 16,
585
+ };
586
+
587
+ const $header: ViewStyle = {
588
+ flexDirection: 'row',
589
+ alignItems: 'center',
590
+ paddingVertical: 16,
591
+ justifyContent: 'center',
592
+ };