react-native-timacare 3.3.42 → 3.3.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/assets/icons/gui.svg +102 -0
- package/lib/commonjs/assets/icons/index.js +1 -1
- package/lib/commonjs/assets/icons/index.js.flow +6 -0
- package/lib/commonjs/assets/icons/index.js.map +1 -1
- package/lib/commonjs/assets/icons/layer1.svg +15 -0
- package/lib/commonjs/assets/icons/not_found.svg +135 -0
- package/lib/commonjs/components/SkeletonLoanCard.js +2 -0
- package/lib/commonjs/components/SkeletonLoanCard.js.flow +246 -0
- package/lib/commonjs/components/SkeletonLoanCard.js.map +1 -0
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.flow +2 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/navigation/index.js +1 -1
- package/lib/commonjs/navigation/index.js.flow +1 -0
- package/lib/commonjs/navigation/index.js.map +1 -1
- package/lib/commonjs/navigation/navigationRef.js +2 -0
- package/lib/commonjs/navigation/navigationRef.js.flow +40 -0
- package/lib/commonjs/navigation/navigationRef.js.map +1 -0
- package/lib/commonjs/navigation/primary-navigator.js +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.flow +30 -0
- package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/DetailLoanTima.js +1 -1
- package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.flow +1 -1
- package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js.flow +1 -0
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
- package/lib/commonjs/screens/home/BoxGuidline.js +2 -0
- package/lib/commonjs/screens/home/BoxGuidline.js.flow +58 -0
- package/lib/commonjs/screens/home/BoxGuidline.js.map +1 -0
- package/lib/commonjs/screens/home/ItemMotoBikeLoan.js +1 -1
- package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.flow +6 -5
- package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.map +1 -1
- package/lib/commonjs/screens/home/index.js +1 -1
- package/lib/commonjs/screens/home/index.js.flow +211 -205
- package/lib/commonjs/screens/home/index.js.map +1 -1
- package/lib/module/assets/icons/gui.svg +102 -0
- package/lib/module/assets/icons/index.js +1 -1
- package/lib/module/assets/icons/index.js.map +1 -1
- package/lib/module/assets/icons/layer1.svg +15 -0
- package/lib/module/assets/icons/not_found.svg +135 -0
- package/lib/module/components/SkeletonLoanCard.js +2 -0
- package/lib/module/components/SkeletonLoanCard.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/index.js +1 -1
- package/lib/module/navigation/index.js.map +1 -1
- package/lib/module/navigation/navigationRef.js +2 -0
- package/lib/module/navigation/navigationRef.js.map +1 -0
- package/lib/module/navigation/primary-navigator.js +1 -1
- package/lib/module/navigation/primary-navigator.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/PaymentInfo.js +1 -1
- package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
- package/lib/module/screens/home/BoxGuidline.js +2 -0
- package/lib/module/screens/home/BoxGuidline.js.map +1 -0
- package/lib/module/screens/home/ItemMotoBikeLoan.js +1 -1
- package/lib/module/screens/home/ItemMotoBikeLoan.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/typescript/assets/icons/index.d.ts +4 -1
- package/lib/typescript/assets/icons/index.d.ts.map +1 -1
- package/lib/typescript/components/SkeletonLoanCard.d.ts +7 -0
- package/lib/typescript/components/SkeletonLoanCard.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/navigation/index.d.ts +1 -0
- package/lib/typescript/navigation/index.d.ts.map +1 -1
- package/lib/typescript/navigation/navigationRef.d.ts +8 -0
- package/lib/typescript/navigation/navigationRef.d.ts.map +1 -0
- package/lib/typescript/navigation/primary-navigator.d.ts +15 -0
- package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
- package/lib/typescript/screens/home/BoxGuidline.d.ts +2 -0
- package/lib/typescript/screens/home/BoxGuidline.d.ts.map +1 -0
- package/lib/typescript/screens/home/ItemMotoBikeLoan.d.ts.map +1 -1
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons/gui.svg +102 -0
- package/src/assets/icons/index.tsx +6 -0
- package/src/assets/icons/layer1.svg +15 -0
- package/src/assets/icons/not_found.svg +135 -0
- package/src/components/SkeletonLoanCard.tsx +246 -0
- package/src/index.tsx +2 -1
- package/src/navigation/index.ts +1 -0
- package/src/navigation/navigationRef.ts +40 -0
- package/src/navigation/primary-navigator.tsx +30 -0
- package/src/screens/detail-loan/DetailLoanTima.tsx +1 -1
- package/src/screens/detail-loan/PaymentInfo.tsx +1 -0
- package/src/screens/home/BoxGuidline.tsx +58 -0
- package/src/screens/home/ItemMotoBikeLoan.tsx +6 -5
- package/src/screens/home/index.tsx +211 -205
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* Navigation bridge for the Timacare SDK.
|
|
4
|
+
*
|
|
5
|
+
* The host app already owns its <NavigationContainer ref={...}>, so instead of
|
|
6
|
+
* creating a second ref the host registers its existing one here once (typically
|
|
7
|
+
* right after the container mounts). The SDK then uses it to drive navigation
|
|
8
|
+
* imperatively from outside React — e.g. deep-linking into a loan detail via
|
|
9
|
+
* `goDetail()`.
|
|
10
|
+
*
|
|
11
|
+
* Accepts either form of ref:
|
|
12
|
+
* - the object returned by `createNavigationContainerRef()` /
|
|
13
|
+
* `useNavigationContainerRef()` (methods live directly on it), or
|
|
14
|
+
* - a plain `useRef()` passed to <NavigationContainer ref={ref}> (methods live
|
|
15
|
+
* on `ref.current`).
|
|
16
|
+
*/
|
|
17
|
+
let externalNavigationRef = null;
|
|
18
|
+
|
|
19
|
+
export const setNavigationRef = (ref) => {
|
|
20
|
+
externalNavigationRef = ref;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Resolves the registered ref down to the actual NavigationContainerRef,
|
|
25
|
+
* regardless of which ref form the host provided. Returns null when nothing is
|
|
26
|
+
* registered yet or the container isn't ready.
|
|
27
|
+
*/
|
|
28
|
+
export const getNavigation = () => {
|
|
29
|
+
const ref = externalNavigationRef;
|
|
30
|
+
if (!ref) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const nav = typeof ref.navigate === 'function' ? ref : ref.current;
|
|
35
|
+
if (!nav || (typeof nav.isReady === 'function' && !nav.isReady())) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return nav;
|
|
40
|
+
};
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import React, { useEffect } from 'react';
|
|
9
9
|
|
|
10
10
|
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
|
11
|
+
import { getNavigation } from './navigationRef';
|
|
11
12
|
import { OTP } from '../screens/otp';
|
|
12
13
|
import { NationalID } from '../screens/nationalID';
|
|
13
14
|
import { Selfie } from '../screens/selfie';
|
|
@@ -317,3 +318,32 @@ export function PrimaryNavigator(props) {
|
|
|
317
318
|
|
|
318
319
|
const exitRoutes = ['welcome'];
|
|
319
320
|
export const canExit = (routeName: string) => exitRoutes.includes(routeName);
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Imperatively navigate into a loan detail screen from outside React.
|
|
324
|
+
*
|
|
325
|
+
* Intended for the host app to deep-link the user straight into a loan detail
|
|
326
|
+
* (e.g. from a push notification or a list rendered outside the SDK). Requires
|
|
327
|
+
* the host to register its NavigationContainer ref once via `setNavigationRef()`.
|
|
328
|
+
*
|
|
329
|
+
* Accepts either a loan id or a partial loan object. The detail screen only
|
|
330
|
+
* needs `id` to fetch its data; `disbursementPartner` (when provided) selects
|
|
331
|
+
* the matching screen — 'CIMB' -> DetailLoan, otherwise -> DetailLoanTima.
|
|
332
|
+
*/
|
|
333
|
+
export function goDetail(
|
|
334
|
+
loan: number | { id: number; disbursementPartner?: string }
|
|
335
|
+
) {
|
|
336
|
+
const loanObj = typeof loan === 'number' ? { id: loan } : loan;
|
|
337
|
+
const navigation = getNavigation();
|
|
338
|
+
|
|
339
|
+
if (!loanObj?.id || !navigation) {
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const screen =
|
|
344
|
+
loanObj.disbursementPartner === 'CIMB'
|
|
345
|
+
? ScreenNames.DetailLoan
|
|
346
|
+
: ScreenNames.DetailLoanTima;
|
|
347
|
+
|
|
348
|
+
navigation.navigate(screen, { loan: loanObj });
|
|
349
|
+
}
|
|
@@ -607,6 +607,7 @@ const PaymentInfoContent = observer(function PaymentInfoContent(props: any) {
|
|
|
607
607
|
await Api.getInstance().confirm_final_settlement({
|
|
608
608
|
loanBriefId: props?.route.params?.loan?.id,
|
|
609
609
|
});
|
|
610
|
+
|
|
610
611
|
if (
|
|
611
612
|
response.kind === 'ok' &&
|
|
612
613
|
response.data?.meta?.errorCode === 200
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
5
|
+
import { MText } from '../../components/MText';
|
|
6
|
+
import { GuiSvg, Layer1Svg } from '../../assets/icons';
|
|
7
|
+
export default function BoxGuidline() {
|
|
8
|
+
return (
|
|
9
|
+
<LinearGradient colors={['#FFF8F2', '#FFFFFF']} style={styles.container}>
|
|
10
|
+
<MText
|
|
11
|
+
style={{
|
|
12
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
13
|
+
fontWeight: '600',
|
|
14
|
+
}}
|
|
15
|
+
>
|
|
16
|
+
Chuẩn bị trước khi hoàn thiện đơn
|
|
17
|
+
</MText>
|
|
18
|
+
<View style={styles.row}>
|
|
19
|
+
<View style={{ flex: 1, flexDirection: 'column', gap: 6 }}>
|
|
20
|
+
<View style={styles.item}>
|
|
21
|
+
<Layer1Svg />
|
|
22
|
+
<MText style={{ fontSize: 12 }}>Giấy đăng ký xe rõ nét</MText>
|
|
23
|
+
</View>
|
|
24
|
+
<View style={styles.item}>
|
|
25
|
+
<Layer1Svg />
|
|
26
|
+
<MText style={{ fontSize: 12 }}>CCCD gắn chip bản gốc</MText>
|
|
27
|
+
</View>
|
|
28
|
+
<View style={styles.item}>
|
|
29
|
+
<Layer1Svg />
|
|
30
|
+
<MText style={{ fontSize: 12 }}>Không gian đủ ánh sáng</MText>
|
|
31
|
+
</View>
|
|
32
|
+
</View>
|
|
33
|
+
<View style={{ marginRight: 24 }}>
|
|
34
|
+
<GuiSvg />
|
|
35
|
+
</View>
|
|
36
|
+
</View>
|
|
37
|
+
</LinearGradient>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const styles = StyleSheet.create({
|
|
42
|
+
container: {
|
|
43
|
+
borderWidth: 1,
|
|
44
|
+
borderColor: '#E5E5EA',
|
|
45
|
+
borderRadius: 8,
|
|
46
|
+
padding: 8,
|
|
47
|
+
},
|
|
48
|
+
row: {
|
|
49
|
+
flexDirection: 'row',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
gap: 16,
|
|
52
|
+
},
|
|
53
|
+
item: {
|
|
54
|
+
flexDirection: 'row',
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
gap: 10,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
@@ -489,7 +489,7 @@ export default function ItemMotoBikeLoan({
|
|
|
489
489
|
<MText
|
|
490
490
|
style={{ fontSize: 16, fontWeight: 'bold', textAlign: 'center' }}
|
|
491
491
|
>
|
|
492
|
-
|
|
492
|
+
Xác nhận chia sẻ dữ liệu
|
|
493
493
|
</MText>
|
|
494
494
|
<View
|
|
495
495
|
style={{
|
|
@@ -508,10 +508,11 @@ export default function ItemMotoBikeLoan({
|
|
|
508
508
|
<MText
|
|
509
509
|
style={{ color: '#828282', textAlign: 'center', marginTop: 16 }}
|
|
510
510
|
>
|
|
511
|
-
Tima sẽ chuyển thông tin
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
511
|
+
Tima sẽ chuyển thông tin của bạn đến Công ty Cổ phần Kinh doanh F88
|
|
512
|
+
(F88) để xem xét phê duyệt khoản vay. Khi chọn "Đồng ý & Tiếp tục",
|
|
513
|
+
bạn đồng ý cho các bên liên quan thu thập, sử dụng, xử lý và chia sẻ
|
|
514
|
+
dữ liệu cá nhân theo quy định của pháp luật. Sau khi chuyển giao dữ
|
|
515
|
+
liệu, Tima là bên kiểm soát và xử lý dữ liệu cá nhân.
|
|
515
516
|
</MText>
|
|
516
517
|
<View
|
|
517
518
|
style={{
|