react-native-timacare 3.3.56-alert → 3.3.58-cccd
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/index.js +1 -1
- package/lib/commonjs/assets/icons/index.js.flow +2 -0
- package/lib/commonjs/assets/icons/index.js.map +1 -1
- package/lib/commonjs/assets/icons/modal_confirm.svg +5 -5
- package/lib/commonjs/assets/icons/modal_notice.svg +32 -32
- package/lib/commonjs/assets/icons/modal_success.svg +26 -26
- package/lib/commonjs/assets/icons/modal_warning.svg +21 -21
- package/lib/commonjs/assets/icons/user_security.svg +10 -0
- package/lib/commonjs/assets/tts/Frame1000011947.png +0 -0
- package/lib/commonjs/components/AlertLoan.js +1 -1
- package/lib/commonjs/components/AlertLoan.js.flow +1 -1
- package/lib/commonjs/components/AlertLoan.js.map +1 -1
- package/lib/commonjs/components/AppModal.js +1 -1
- package/lib/commonjs/components/AppModal.js.flow +40 -2
- package/lib/commonjs/components/AppModal.js.map +1 -1
- package/lib/commonjs/components/ItemTimaOne.js +1 -1
- package/lib/commonjs/components/ItemTimaOne.js.flow +1 -1
- package/lib/commonjs/components/ItemTimaOne.js.map +1 -1
- package/lib/commonjs/components/ModalNotification/AlertGlobal.js +1 -1
- package/lib/commonjs/components/ModalNotification/AlertGlobal.js.flow +92 -33
- package/lib/commonjs/components/ModalNotification/AlertGlobal.js.map +1 -1
- package/lib/commonjs/components/ModalNotification/index.js +1 -1
- package/lib/commonjs/components/ModalNotification/index.js.flow +7 -0
- package/lib/commonjs/components/ModalNotification/index.js.map +1 -1
- package/lib/commonjs/components/ModalOptionLoan.js +1 -1
- package/lib/commonjs/components/ModalOptionLoan.js.flow +1 -1
- package/lib/commonjs/components/ModalOptionLoan.js.map +1 -1
- package/lib/commonjs/components/ModalOptionLoanDigital.js +1 -1
- package/lib/commonjs/components/ModalOptionLoanDigital.js.flow +1 -1
- package/lib/commonjs/components/ModalOptionLoanDigital.js.map +1 -1
- package/lib/commonjs/components/modalStack.js +2 -0
- package/lib/commonjs/components/modalStack.js.flow +47 -0
- package/lib/commonjs/components/modalStack.js.map +1 -0
- package/lib/commonjs/navigation/primary-navigator.js +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.flow +7 -0
- package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
- package/lib/commonjs/screens/NFC/OcrStart.js +2 -0
- package/lib/commonjs/screens/NFC/OcrStart.js.flow +171 -0
- package/lib/commonjs/screens/NFC/OcrStart.js.map +1 -0
- package/lib/commonjs/screens/NFC/ScanMRZ.js +2 -0
- package/lib/commonjs/screens/NFC/ScanMRZ.js.flow +563 -0
- package/lib/commonjs/screens/NFC/ScanMRZ.js.map +1 -0
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +203 -133
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
- package/lib/commonjs/screens/camera/index.js +1 -1
- package/lib/commonjs/screens/camera/index.js.flow +1 -1
- package/lib/commonjs/screens/camera/index.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js.flow +1 -1
- 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 +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/Step6.js +1 -1
- package/lib/commonjs/screens/digital-lending/Step6.js.flow +1 -1
- package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -1
- package/lib/commonjs/screens/eSign/index.js +1 -1
- package/lib/commonjs/screens/eSign/index.js.flow +1 -1
- package/lib/commonjs/screens/eSign/index.js.map +1 -1
- package/lib/commonjs/screens/home/DigitalTopupItem.js +1 -1
- package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +1 -1
- package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -1
- package/lib/commonjs/screens/home/ItemMotoBikeLoan.js +1 -1
- package/lib/commonjs/screens/home/ItemMotoBikeLoan.js.flow +1 -1
- 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 +8 -113
- package/lib/commonjs/screens/home/index.js.map +1 -1
- package/lib/commonjs/screens/nationalID/index.js +1 -1
- package/lib/commonjs/screens/nationalID/index.js.flow +123 -218
- package/lib/commonjs/screens/nationalID/index.js.map +1 -1
- package/lib/commonjs/screens/nationalIDBack/index.js +1 -1
- package/lib/commonjs/screens/nationalIDBack/index.js.flow +129 -209
- package/lib/commonjs/screens/nationalIDBack/index.js.map +1 -1
- package/lib/commonjs/screens/payment-evidence/ModalGuideline.js +1 -1
- package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.flow +1 -1
- package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +270 -556
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +226 -288
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/commonjs/utils/cameraCrop.js +2 -0
- package/lib/commonjs/utils/cameraCrop.js.flow +96 -0
- package/lib/commonjs/utils/cameraCrop.js.map +1 -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/modal_confirm.svg +5 -5
- package/lib/module/assets/icons/modal_notice.svg +32 -32
- package/lib/module/assets/icons/modal_success.svg +26 -26
- package/lib/module/assets/icons/modal_warning.svg +21 -21
- package/lib/module/assets/icons/user_security.svg +10 -0
- package/lib/module/assets/tts/Frame1000011947.png +0 -0
- package/lib/module/components/AlertLoan.js +1 -1
- package/lib/module/components/AlertLoan.js.map +1 -1
- package/lib/module/components/AppModal.js +1 -1
- package/lib/module/components/AppModal.js.map +1 -1
- package/lib/module/components/ItemTimaOne.js +1 -1
- package/lib/module/components/ItemTimaOne.js.map +1 -1
- package/lib/module/components/ModalNotification/AlertGlobal.js +1 -1
- package/lib/module/components/ModalNotification/AlertGlobal.js.map +1 -1
- package/lib/module/components/ModalNotification/index.js +1 -1
- package/lib/module/components/ModalNotification/index.js.map +1 -1
- package/lib/module/components/ModalOptionLoan.js +1 -1
- package/lib/module/components/ModalOptionLoan.js.map +1 -1
- package/lib/module/components/ModalOptionLoanDigital.js +1 -1
- package/lib/module/components/ModalOptionLoanDigital.js.map +1 -1
- package/lib/module/components/modalStack.js +2 -0
- package/lib/module/components/modalStack.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/NFC/OcrStart.js +2 -0
- package/lib/module/screens/NFC/OcrStart.js.map +1 -0
- package/lib/module/screens/NFC/ScanMRZ.js +2 -0
- package/lib/module/screens/NFC/ScanMRZ.js.map +1 -0
- package/lib/module/screens/camera/CCCDCameraScreen.js +1 -1
- package/lib/module/screens/camera/CCCDCameraScreen.js.map +1 -1
- package/lib/module/screens/camera/index.js +1 -1
- package/lib/module/screens/camera/index.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/digital-lending/Step6.js +1 -1
- package/lib/module/screens/digital-lending/Step6.js.map +1 -1
- package/lib/module/screens/eSign/index.js +1 -1
- package/lib/module/screens/eSign/index.js.map +1 -1
- package/lib/module/screens/home/DigitalTopupItem.js +1 -1
- package/lib/module/screens/home/DigitalTopupItem.js.map +1 -1
- 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/module/screens/nationalID/index.js +1 -1
- package/lib/module/screens/nationalID/index.js.map +1 -1
- package/lib/module/screens/nationalIDBack/index.js +1 -1
- package/lib/module/screens/nationalIDBack/index.js.map +1 -1
- package/lib/module/screens/payment-evidence/ModalGuideline.js +1 -1
- package/lib/module/screens/payment-evidence/ModalGuideline.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/RegisterCamera.js +1 -1
- package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/module/utils/cameraCrop.js +2 -0
- package/lib/module/utils/cameraCrop.js.map +1 -0
- package/lib/typescript/assets/icons/index.d.ts +2 -1
- package/lib/typescript/assets/icons/index.d.ts.map +1 -1
- package/lib/typescript/components/AppModal.d.ts +6 -1
- package/lib/typescript/components/AppModal.d.ts.map +1 -1
- package/lib/typescript/components/ModalNotification/AlertGlobal.d.ts +20 -4
- package/lib/typescript/components/ModalNotification/AlertGlobal.d.ts.map +1 -1
- package/lib/typescript/components/ModalNotification/index.d.ts +6 -1
- package/lib/typescript/components/ModalNotification/index.d.ts.map +1 -1
- package/lib/typescript/components/modalStack.d.ts +11 -0
- package/lib/typescript/components/modalStack.d.ts.map +1 -0
- package/lib/typescript/navigation/primary-navigator.d.ts +3 -0
- package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
- package/lib/typescript/screens/NFC/OcrStart.d.ts +2 -0
- package/lib/typescript/screens/NFC/OcrStart.d.ts.map +1 -0
- package/lib/typescript/screens/NFC/ScanMRZ.d.ts +15 -0
- package/lib/typescript/screens/NFC/ScanMRZ.d.ts.map +1 -0
- package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/lib/typescript/screens/nationalID/index.d.ts.map +1 -1
- package/lib/typescript/screens/nationalIDBack/index.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
- package/lib/typescript/utils/cameraCrop.d.ts +43 -0
- package/lib/typescript/utils/cameraCrop.d.ts.map +1 -0
- package/package.json +2 -1
- package/src/assets/icons/index.tsx +2 -0
- package/src/assets/icons/modal_confirm.svg +5 -5
- package/src/assets/icons/modal_notice.svg +32 -32
- package/src/assets/icons/modal_success.svg +26 -26
- package/src/assets/icons/modal_warning.svg +21 -21
- package/src/assets/icons/user_security.svg +10 -0
- package/src/assets/tts/Frame1000011947.png +0 -0
- package/src/components/AlertLoan.tsx +1 -1
- package/src/components/AppModal.tsx +40 -2
- package/src/components/ItemTimaOne.tsx +1 -1
- package/src/components/ModalNotification/AlertGlobal.tsx +92 -33
- package/src/components/ModalNotification/index.tsx +7 -0
- package/src/components/ModalOptionLoan.tsx +1 -1
- package/src/components/ModalOptionLoanDigital.tsx +1 -1
- package/src/components/modalStack.ts +47 -0
- package/src/navigation/primary-navigator.tsx +7 -0
- package/src/screens/NFC/OcrStart.tsx +171 -0
- package/src/screens/NFC/ScanMRZ.tsx +563 -0
- package/src/screens/camera/CCCDCameraScreen.tsx +203 -133
- package/src/screens/camera/index.tsx +1 -1
- package/src/screens/detail-loan/PaymentInfo.tsx +1 -1
- package/src/screens/detail-loan/ShowQrCode.tsx +1 -1
- package/src/screens/digital-lending/Step6.tsx +1 -1
- package/src/screens/eSign/index.tsx +1 -1
- package/src/screens/home/DigitalTopupItem.tsx +1 -1
- package/src/screens/home/ItemMotoBikeLoan.tsx +1 -1
- package/src/screens/home/index.tsx +8 -113
- package/src/screens/nationalID/index.tsx +123 -218
- package/src/screens/nationalIDBack/index.tsx +129 -209
- package/src/screens/payment-evidence/ModalGuideline.tsx +1 -1
- package/src/screens/toan-trinh-so/OCR.tsx +270 -556
- package/src/screens/toan-trinh-so/RegisterCamera.tsx +1 -1
- package/src/screens/toan-trinh-so/VehicleCamera.tsx +226 -288
- package/src/utils/cameraCrop.ts +96 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
//@ts-nocheck
|
|
2
|
-
import React, { useEffect,
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import { Dimensions, Platform, StyleSheet, View } from 'react-native';
|
|
4
|
+
import { addModalStackListener, getTopModalId } from '../modalStack';
|
|
3
5
|
import ModalNotification, { ModalNotificationProps } from './index';
|
|
4
6
|
|
|
5
7
|
export type AlertGlobalOptions = Omit<
|
|
6
8
|
ModalNotificationProps,
|
|
7
|
-
'open' | 'onModalHide'
|
|
9
|
+
'open' | 'onModalHide' | 'coverScreen'
|
|
8
10
|
> & {
|
|
9
11
|
/** false => bấm nút không tự đóng modal (mặc định true) */
|
|
10
12
|
autoDismiss?: boolean;
|
|
@@ -12,15 +14,19 @@ export type AlertGlobalOptions = Omit<
|
|
|
12
14
|
dismissable?: boolean;
|
|
13
15
|
};
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
// ===== State giữ ở module-level để mọi outlet cùng đọc chung =====
|
|
18
|
+
let alertVisible = false;
|
|
19
|
+
let alertOptions: AlertGlobalOptions = { title: '' };
|
|
20
|
+
// Callback chờ modal đóng xong animation mới được gọi
|
|
21
|
+
let pendingCallback: (() => void) | undefined;
|
|
22
|
+
const listeners = new Set<() => void>();
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
function notify() {
|
|
25
|
+
listeners.forEach((listener) => listener());
|
|
26
|
+
}
|
|
21
27
|
|
|
22
28
|
/**
|
|
23
|
-
* Alert dùng chung toàn
|
|
29
|
+
* Alert dùng chung toàn SDK, gọi được từ mọi nơi (kể cả ngoài component):
|
|
24
30
|
*
|
|
25
31
|
* AlertGlobal.show({
|
|
26
32
|
* type: 'confirm',
|
|
@@ -33,38 +39,73 @@ let alertController: AlertController | null = null;
|
|
|
33
39
|
*
|
|
34
40
|
* Mặc định bấm nút / backdrop sẽ tự đóng modal rồi mới chạy callback
|
|
35
41
|
* (callback chạy sau khi animation đóng xong => có thể mở tiếp modal khác).
|
|
36
|
-
* Yêu cầu <AlertGlobalHost /> đã được mount
|
|
42
|
+
* Yêu cầu <AlertGlobalHost /> đã được mount ở root (RNTimacare).
|
|
37
43
|
*/
|
|
38
44
|
export const AlertGlobal = {
|
|
39
45
|
show(options: AlertGlobalOptions) {
|
|
40
|
-
|
|
46
|
+
pendingCallback = undefined;
|
|
47
|
+
alertOptions = options;
|
|
48
|
+
alertVisible = true;
|
|
49
|
+
notify();
|
|
41
50
|
},
|
|
42
51
|
hide() {
|
|
43
|
-
|
|
52
|
+
alertVisible = false;
|
|
53
|
+
notify();
|
|
44
54
|
},
|
|
45
55
|
};
|
|
46
56
|
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
const [
|
|
50
|
-
const [options, setOptions] = useState<AlertGlobalOptions>({ title: '' });
|
|
51
|
-
// Callback chờ modal đóng xong animation mới được gọi
|
|
52
|
-
const pendingCallback = useRef<(() => void) | undefined>(undefined);
|
|
53
|
-
|
|
57
|
+
/** Re-render khi alert state hoặc modal stack thay đổi */
|
|
58
|
+
function useAlertGlobalState() {
|
|
59
|
+
const [, setTick] = useState(0);
|
|
54
60
|
useEffect(() => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
setOptions(opts);
|
|
59
|
-
setVisible(true);
|
|
60
|
-
},
|
|
61
|
-
hide: () => setVisible(false),
|
|
62
|
-
};
|
|
61
|
+
const rerender = () => setTick((tick) => tick + 1);
|
|
62
|
+
listeners.add(rerender);
|
|
63
|
+
const unsubscribeStack = addModalStackListener(rerender);
|
|
63
64
|
return () => {
|
|
64
|
-
|
|
65
|
+
listeners.delete(rerender);
|
|
66
|
+
unsubscribeStack();
|
|
65
67
|
};
|
|
66
68
|
}, []);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
interface OutletProps {
|
|
72
|
+
/** id của AppModal chứa outlet này; không truyền = outlet gốc ở root */
|
|
73
|
+
modalId?: number | null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Điểm render thực tế của alert global. Có mặt ở 2 nơi:
|
|
78
|
+
* - AlertGlobalHost (root RNTimacare) — dùng khi không có modal nào đang mở
|
|
79
|
+
* - bên trong mỗi AppModal — dùng khi modal đó đang mở trên cùng (chỉ iOS)
|
|
80
|
+
*
|
|
81
|
+
* iOS không present được 2 native modal chồng nhau (treo app), nên khi có modal
|
|
82
|
+
* khác đang mở, alert được render dạng View thường (coverScreen=false) bên trong
|
|
83
|
+
* modal trên cùng => luôn nằm trên nội dung modal và bấm được bình thường.
|
|
84
|
+
* Android cho phép các Dialog chồng nhau nên luôn dùng native modal ở outlet gốc.
|
|
85
|
+
*/
|
|
86
|
+
export function AlertGlobalOutlet({ modalId = null }: OutletProps) {
|
|
87
|
+
useAlertGlobalState();
|
|
67
88
|
|
|
89
|
+
if (Platform.OS !== 'ios') {
|
|
90
|
+
return modalId === null ? <AlertRenderer coverScreen /> : null;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (getTopModalId() !== modalId) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
if (modalId === null) {
|
|
97
|
+
return <AlertRenderer coverScreen={false} />;
|
|
98
|
+
}
|
|
99
|
+
// Nội dung modal của react-native-modal có margin mặc định (5% chiều ngang),
|
|
100
|
+
// nới ngược lại để backdrop của alert phủ kín màn hình
|
|
101
|
+
return (
|
|
102
|
+
<View style={styles.insideModalWrapper} pointerEvents="box-none">
|
|
103
|
+
<AlertRenderer coverScreen={false} />
|
|
104
|
+
</View>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function AlertRenderer({ coverScreen }: { coverScreen: boolean }) {
|
|
68
109
|
const {
|
|
69
110
|
autoDismiss = true,
|
|
70
111
|
dismissable = true,
|
|
@@ -72,29 +113,47 @@ export function AlertGlobalHost() {
|
|
|
72
113
|
onPrimaryPress,
|
|
73
114
|
onSecondaryPress,
|
|
74
115
|
...rest
|
|
75
|
-
} =
|
|
116
|
+
} = alertOptions;
|
|
76
117
|
|
|
77
118
|
const dismissThen = (callback?: () => void) => {
|
|
78
119
|
if (!autoDismiss) {
|
|
79
120
|
callback?.();
|
|
80
121
|
return;
|
|
81
122
|
}
|
|
82
|
-
pendingCallback
|
|
83
|
-
|
|
123
|
+
pendingCallback = callback;
|
|
124
|
+
AlertGlobal.hide();
|
|
84
125
|
};
|
|
85
126
|
|
|
86
127
|
return (
|
|
87
128
|
<ModalNotification
|
|
88
129
|
{...rest}
|
|
89
|
-
open={
|
|
130
|
+
open={alertVisible}
|
|
131
|
+
coverScreen={coverScreen}
|
|
90
132
|
onClose={dismissable ? () => dismissThen(onClose) : undefined}
|
|
91
133
|
onPrimaryPress={() => dismissThen(onPrimaryPress)}
|
|
92
134
|
onSecondaryPress={() => dismissThen(onSecondaryPress)}
|
|
93
135
|
onModalHide={() => {
|
|
94
|
-
const callback = pendingCallback
|
|
95
|
-
pendingCallback
|
|
136
|
+
const callback = pendingCallback;
|
|
137
|
+
pendingCallback = undefined;
|
|
96
138
|
callback?.();
|
|
97
139
|
}}
|
|
98
140
|
/>
|
|
99
141
|
);
|
|
100
142
|
}
|
|
143
|
+
|
|
144
|
+
/** Mount 1 lần duy nhất ở root (RNTimacare) */
|
|
145
|
+
export function AlertGlobalHost() {
|
|
146
|
+
return <AlertGlobalOutlet />;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const DEFAULT_MODAL_MARGIN = Dimensions.get('window').width * 0.05;
|
|
150
|
+
|
|
151
|
+
const styles = StyleSheet.create({
|
|
152
|
+
insideModalWrapper: {
|
|
153
|
+
position: 'absolute',
|
|
154
|
+
top: -DEFAULT_MODAL_MARGIN,
|
|
155
|
+
left: -DEFAULT_MODAL_MARGIN,
|
|
156
|
+
right: -DEFAULT_MODAL_MARGIN,
|
|
157
|
+
bottom: -DEFAULT_MODAL_MARGIN,
|
|
158
|
+
},
|
|
159
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_index","_interopRequireDefault","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_modalStack","_index","_interopRequireDefault","_excluded","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","alertVisible","alertOptions","title","pendingCallback","listeners","Set","notify","forEach","listener","AlertGlobal","exports","show","options","undefined","hide","useAlertGlobalState","_useState","useState","_useState2","_slicedToArray2","setTick","useEffect","rerender","tick","add","unsubscribeStack","addModalStackListener","delete","AlertGlobalOutlet","_ref","_ref$modalId","modalId","Platform","OS","createElement","AlertRenderer","coverScreen","__self","__source","fileName","lineNumber","columnNumber","getTopModalId","View","style","styles","insideModalWrapper","pointerEvents","_ref2","_alertOptions","_alertOptions$autoDis","autoDismiss","_alertOptions$dismiss","dismissable","onClose","onPrimaryPress","onSecondaryPress","rest","_objectWithoutProperties2","dismissThen","callback","_extends2","open","onModalHide","AlertGlobalHost","DEFAULT_MODAL_MARGIN","Dimensions","width","StyleSheet","create","position","top","left","right","bottom"],"sourceRoot":"../../../../src","sources":["components/ModalNotification/AlertGlobal.t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,cAARA,QAAQ,CAAG,CAAC,CACd,CAAE,CAAAvB,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAA5D,YAAA,CAAA6D,UAAA,KAAAC,YAAA,KACH,CAAC,CAEN,CAGO,QAAS,CAAAuB,eAAeA,CAAA,CAAG,CAChC,MAAO,CAAA7F,MAAA,CAAAmB,OAAA,CAAA4C,aAAA,CAACN,iBAAiB,EAAAS,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAA5D,YAAA,CAAA6D,UAAA,KAAAC,YAAA,KAAE,CAAC,CAC9B,CAEA,GAAM,CAAAwB,oBAAoB,CAAGC,uBAAU,CAAC1E,GAAG,CAAC,QAAQ,CAAC,CAAC2E,KAAK,CAAG,IAAI,CAElE,GAAM,CAAAtB,MAAM,CAAGuB,uBAAU,CAACC,MAAM,CAAC,CAC/BvB,kBAAkB,CAAE,CAClBwB,QAAQ,CAAE,UAAU,CACpBC,GAAG,CAAE,CAACN,oBAAoB,CAC1BO,IAAI,CAAE,CAACP,oBAAoB,CAC3BQ,KAAK,CAAE,CAACR,oBAAoB,CAC5BS,MAAM,CAAE,CAACT,oBACX,CACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=ModalNotification;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _MText=require("../MText");var _AppModal=_interopRequireDefault(require("../AppModal"));var _icons=require("../../assets/icons");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/components/ModalNotification/index.tsx";var ICON_BY_TYPE={confirm:_icons.IconModalConfirm,success:_icons.IconModalSuccess,warning:_icons.IconModalWarning,notice:_icons.IconModalNotice};var ICON_GRADIENT_BY_TYPE={success:['rgba(89, 205, 82, 1)','rgba(89, 205, 82, 0)'],warning:['rgba(255, 76, 76, 1)','rgba(255, 36, 36, 0)'],notice:['rgba(255, 118, 65, 1)','rgba(255, 180, 104, 0)'],confirm:['rgba(255, 180, 104, 1)','rgba(255, 149, 82, 0)']};function ModalNotification(_ref){var open=_ref.open,_ref$type=_ref.type,type=_ref$type===void 0?'notice':_ref$type,title=_ref.title,message=_ref.message,icon=_ref.icon,_ref$showClose=_ref.showClose,showClose=_ref$showClose===void 0?false:_ref$showClose,onClose=_ref.onClose,primaryText=_ref.primaryText,onPrimaryPress=_ref.onPrimaryPress,primaryIcon=_ref.primaryIcon,secondaryText=_ref.secondaryText,onSecondaryPress=_ref.onSecondaryPress,onModalHide=_ref.onModalHide;var IconByType=ICON_BY_TYPE[type];var iconGradient=ICON_GRADIENT_BY_TYPE[type];return _react.default.createElement(_AppModal.default,{isVisible:open,backdropTransitionOutTiming:0,animationIn:"zoomIn",animationOut:"zoomOut",onBackdropPress:onClose,onBackButtonPress:onClose,onModalHide:onModalHide,__self:this,__source:{fileName:_jsxFileName,lineNumber:
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=ModalNotification;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _MText=require("../MText");var _AppModal=_interopRequireDefault(require("../AppModal"));var _icons=require("../../assets/icons");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/components/ModalNotification/index.tsx";var ICON_BY_TYPE={confirm:_icons.IconModalConfirm,success:_icons.IconModalSuccess,warning:_icons.IconModalWarning,notice:_icons.IconModalNotice};var ICON_GRADIENT_BY_TYPE={success:['rgba(89, 205, 82, 1)','rgba(89, 205, 82, 0)'],warning:['rgba(255, 76, 76, 1)','rgba(255, 36, 36, 0)'],notice:['rgba(255, 118, 65, 1)','rgba(255, 180, 104, 0)'],confirm:['rgba(255, 180, 104, 1)','rgba(255, 149, 82, 0)']};function ModalNotification(_ref){var open=_ref.open,_ref$type=_ref.type,type=_ref$type===void 0?'notice':_ref$type,title=_ref.title,message=_ref.message,icon=_ref.icon,_ref$showClose=_ref.showClose,showClose=_ref$showClose===void 0?false:_ref$showClose,onClose=_ref.onClose,primaryText=_ref.primaryText,onPrimaryPress=_ref.onPrimaryPress,primaryIcon=_ref.primaryIcon,secondaryText=_ref.secondaryText,onSecondaryPress=_ref.onSecondaryPress,onModalHide=_ref.onModalHide,_ref$coverScreen=_ref.coverScreen,coverScreen=_ref$coverScreen===void 0?true:_ref$coverScreen;var IconByType=ICON_BY_TYPE[type];var iconGradient=ICON_GRADIENT_BY_TYPE[type];return _react.default.createElement(_AppModal.default,{isVisible:open,backdropTransitionOutTiming:0,animationIn:"zoomIn",animationOut:"zoomOut",onBackdropPress:onClose,onBackButtonPress:onClose,onModalHide:onModalHide,coverScreen:coverScreen,__self:this,__source:{fileName:_jsxFileName,lineNumber:95,columnNumber:5}},_react.default.createElement(_reactNative.View,{style:styles.container,__self:this,__source:{fileName:_jsxFileName,lineNumber:105,columnNumber:7}},!!iconGradient&&_react.default.createElement(_reactNativeLinearGradient.default,{colors:iconGradient,start:{x:0.5,y:0},end:{x:0.5,y:1},style:styles.iconBackdrop,__self:this,__source:{fileName:_jsxFileName,lineNumber:107,columnNumber:11}}),showClose&&_react.default.createElement(_reactNative.TouchableOpacity,{style:styles.closeButton,onPress:onClose,__self:this,__source:{fileName:_jsxFileName,lineNumber:116,columnNumber:11}},_react.default.createElement(_icons.CloseIcon,{__self:this,__source:{fileName:_jsxFileName,lineNumber:117,columnNumber:13}})),icon!=null?icon:_react.default.createElement(IconByType,{width:72,height:72,__self:this,__source:{fileName:_jsxFileName,lineNumber:121,columnNumber:18}}),_react.default.createElement(_MText.MText,{style:styles.title,__self:this,__source:{fileName:_jsxFileName,lineNumber:123,columnNumber:9}},title),!!message&&_react.default.createElement(_MText.MText,{style:styles.message,__self:this,__source:{fileName:_jsxFileName,lineNumber:125,columnNumber:23}},message),_react.default.createElement(_reactNative.View,{style:styles.buttonRow,__self:this,__source:{fileName:_jsxFileName,lineNumber:127,columnNumber:9}},!!secondaryText&&_react.default.createElement(_reactNative.TouchableOpacity,{style:[styles.button,styles.secondaryButton],onPress:onSecondaryPress,__self:this,__source:{fileName:_jsxFileName,lineNumber:129,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{color:'rgba(153, 153, 153, 1)'},__self:this,__source:{fileName:_jsxFileName,lineNumber:133,columnNumber:15}},secondaryText)),!!primaryText&&_react.default.createElement(_reactNative.TouchableOpacity,{style:[styles.button,styles.primaryButton],onPress:onPrimaryPress,__self:this,__source:{fileName:_jsxFileName,lineNumber:144,columnNumber:13}},primaryIcon,_react.default.createElement(_MText.MText,{style:{color:'#EF592E'},__self:this,__source:{fileName:_jsxFileName,lineNumber:149,columnNumber:15}},primaryText)))));}var styles=_reactNative.StyleSheet.create({container:{backgroundColor:'#FFFFFF',borderRadius:16,paddingHorizontal:16,paddingTop:24,paddingBottom:16,alignItems:'center',overflow:'hidden'},iconBackdrop:{position:'absolute',top:0,left:0,right:0,height:112,opacity:0.15},closeButton:{position:'absolute',top:12,right:12,width:28,height:28,alignItems:'center',justifyContent:'center',zIndex:1},title:{textAlign:'center',marginTop:12,color:'#333333',fontFamily:'BeVietnamPro-SemiBold',fontWeight:'600',fontSize:16},message:{textAlign:'center',marginTop:8,lineHeight:20,paddingHorizontal:24,color:'#828282'},buttonRow:{flexDirection:'row',alignSelf:'stretch',marginTop:24,gap:12},button:{flex:1,flexDirection:'row',height:40,borderRadius:24,borderWidth:0.5,alignItems:'center',justifyContent:'center',gap:6},secondaryButton:{borderColor:'rgba(153, 153, 153, 0.5)'},primaryButton:{borderColor:'#EF592E'}});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -57,6 +57,11 @@ export interface ModalNotificationProps {
|
|
|
57
57
|
onSecondaryPress?: () => void;
|
|
58
58
|
/** Gọi sau khi modal đã đóng xong animation (dùng cho AlertGlobal) */
|
|
59
59
|
onModalHide?: () => void;
|
|
60
|
+
/**
|
|
61
|
+
* false => render bằng View thường thay vì native Modal
|
|
62
|
+
* (dùng cho AlertGlobal trên iOS để tránh xung đột khi đã có modal khác mở)
|
|
63
|
+
*/
|
|
64
|
+
coverScreen?: boolean;
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
/**
|
|
@@ -81,6 +86,7 @@ export default function ModalNotification({
|
|
|
81
86
|
secondaryText,
|
|
82
87
|
onSecondaryPress,
|
|
83
88
|
onModalHide,
|
|
89
|
+
coverScreen = true,
|
|
84
90
|
}: ModalNotificationProps) {
|
|
85
91
|
const IconByType = ICON_BY_TYPE[type];
|
|
86
92
|
const iconGradient = ICON_GRADIENT_BY_TYPE[type];
|
|
@@ -94,6 +100,7 @@ export default function ModalNotification({
|
|
|
94
100
|
onBackdropPress={onClose}
|
|
95
101
|
onBackButtonPress={onClose}
|
|
96
102
|
onModalHide={onModalHide}
|
|
103
|
+
coverScreen={coverScreen}
|
|
97
104
|
>
|
|
98
105
|
<View style={styles.container}>
|
|
99
106
|
{!!iconGradient && (
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeLinearGradient","_MText","_AppModal","_icons","_jsxFileName","ICON_BY_TYPE","confirm","IconModalConfirm","success","IconModalSuccess","warning","IconModalWarning","notice","IconModalNotice","ICON_GRADIENT_BY_TYPE","ModalNotification","_ref","open","_ref$type","type","title","message","icon","_ref$showClose","showClose","onClose","primaryText","onPrimaryPress","primaryIcon","secondaryText","onSecondaryPress","onModalHide","IconByType","iconGradient","default","createElement","isVisible","backdropTransitionOutTiming","animationIn","animationOut","onBackdropPress","onBackButtonPress","__self","__source","fileName","lineNumber","columnNumber","View","style","styles","container","colors","start","x","y","end","iconBackdrop","TouchableOpacity","closeButton","onPress","CloseIcon","width","height","MText","buttonRow","button","secondaryButton","color","primaryButton","StyleSheet","create","backgroundColor","borderRadius","paddingHorizontal","paddingTop","paddingBottom","alignItems","overflow","position","top","left","right","opacity","justifyContent","zIndex","textAlign","marginTop","fontFamily","fontWeight","fontSize","lineHeight","flexDirection","alignSelf","gap","flex","borderWidth","borderColor"],"sourceRoot":"../../../../src","sources":["components/ModalNotification/index.tsx"],"mappings":"8KACA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,0BAAA,CAAAH,sBAAA,CAAAC,OAAA,kCAEA,IAAAG,MAAA,CAAAH,OAAA,aACA,IAAAI,SAAA,CAAAL,sBAAA,CAAAC,OAAA,iBACA,IAAAK,MAAA,CAAAL,OAAA,uBAM4B,IAAAM,YAAA,qFAQ5B,GAAM,CAAAC,YAA0D,CAAG,CACjEC,OAAO,CAAEC,uBAAgB,CACzBC,OAAO,CAAEC,uBAAgB,CACzBC,OAAO,CAAEC,uBAAgB,CACzBC,MAAM,CAAEC,sBACV,CAAC,CAGD,GAAM,CAAAC,qBAAuE,CAC3E,CACEN,OAAO,CAAE,CAAC,sBAAsB,CAAE,sBAAsB,CAAC,CACzDE,OAAO,CAAE,CAAC,sBAAsB,CAAE,sBAAsB,CAAC,CACzDE,MAAM,CAAE,CAAC,uBAAuB,CAAE,wBAAwB,CAAC,CAC3DN,OAAO,CAAE,CAAC,wBAAwB,CAAE,uBAAuB,CAC7D,CAAC,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeLinearGradient","_MText","_AppModal","_icons","_jsxFileName","ICON_BY_TYPE","confirm","IconModalConfirm","success","IconModalSuccess","warning","IconModalWarning","notice","IconModalNotice","ICON_GRADIENT_BY_TYPE","ModalNotification","_ref","open","_ref$type","type","title","message","icon","_ref$showClose","showClose","onClose","primaryText","onPrimaryPress","primaryIcon","secondaryText","onSecondaryPress","onModalHide","_ref$coverScreen","coverScreen","IconByType","iconGradient","default","createElement","isVisible","backdropTransitionOutTiming","animationIn","animationOut","onBackdropPress","onBackButtonPress","__self","__source","fileName","lineNumber","columnNumber","View","style","styles","container","colors","start","x","y","end","iconBackdrop","TouchableOpacity","closeButton","onPress","CloseIcon","width","height","MText","buttonRow","button","secondaryButton","color","primaryButton","StyleSheet","create","backgroundColor","borderRadius","paddingHorizontal","paddingTop","paddingBottom","alignItems","overflow","position","top","left","right","opacity","justifyContent","zIndex","textAlign","marginTop","fontFamily","fontWeight","fontSize","lineHeight","flexDirection","alignSelf","gap","flex","borderWidth","borderColor"],"sourceRoot":"../../../../src","sources":["components/ModalNotification/index.tsx"],"mappings":"8KACA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,0BAAA,CAAAH,sBAAA,CAAAC,OAAA,kCAEA,IAAAG,MAAA,CAAAH,OAAA,aACA,IAAAI,SAAA,CAAAL,sBAAA,CAAAC,OAAA,iBACA,IAAAK,MAAA,CAAAL,OAAA,uBAM4B,IAAAM,YAAA,qFAQ5B,GAAM,CAAAC,YAA0D,CAAG,CACjEC,OAAO,CAAEC,uBAAgB,CACzBC,OAAO,CAAEC,uBAAgB,CACzBC,OAAO,CAAEC,uBAAgB,CACzBC,MAAM,CAAEC,sBACV,CAAC,CAGD,GAAM,CAAAC,qBAAuE,CAC3E,CACEN,OAAO,CAAE,CAAC,sBAAsB,CAAE,sBAAsB,CAAC,CACzDE,OAAO,CAAE,CAAC,sBAAsB,CAAE,sBAAsB,CAAC,CACzDE,MAAM,CAAE,CAAC,uBAAuB,CAAE,wBAAwB,CAAC,CAC3DN,OAAO,CAAE,CAAC,wBAAwB,CAAE,uBAAuB,CAC7D,CAAC,CAuCY,QAAS,CAAAS,iBAAiBA,CAAAC,IAAA,CAed,IAdzB,CAAAC,IAAI,CAAAD,IAAA,CAAJC,IAAI,CAAAC,SAAA,CAAAF,IAAA,CACJG,IAAI,CAAJA,IAAI,CAAAD,SAAA,UAAG,QAAQ,CAAAA,SAAA,CACfE,KAAK,CAAAJ,IAAA,CAALI,KAAK,CACLC,OAAO,C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AiB,CAAE,EAAE,CACrBN,KAAK,CAAE,SACT,CAAC,CACDH,SAAS,CAAE,CACT2B,aAAa,CAAE,KAAK,CACpBC,SAAS,CAAE,SAAS,CACpBN,SAAS,CAAE,EAAE,CACbO,GAAG,CAAE,EACP,CAAC,CACD5B,MAAM,CAAE,CACN6B,IAAI,CAAE,CAAC,CACPH,aAAa,CAAE,KAAK,CACpB7B,MAAM,CAAE,EAAE,CACVU,YAAY,CAAE,EAAE,CAChBuB,WAAW,CAAE,GAAG,CAChBnB,UAAU,CAAE,QAAQ,CACpBO,cAAc,CAAE,QAAQ,CACxBU,GAAG,CAAE,CACP,CAAC,CACD3B,eAAe,CAAE,CACf8B,WAAW,CAAE,0BACf,CAAC,CACD5B,aAAa,CAAE,CACb4B,WAAW,CAAE,SACf,CACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=ModalOptionLoan;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeModal=_interopRequireDefault(require("react-native-modal"));var _AlertGlobal=require("./ModalNotification/AlertGlobal");var _MText=require("./MText");var _MButton=_interopRequireDefault(require("./MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _v=require("../assets/v3");var _icons=require("../assets/icons");var _utils=require("../utils");var _api=require("../services/api");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/components/ModalOptionLoan.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}var modalSafeProps={useNativeDriver:true,useNativeDriverForBackdrop:true,hideModalContentWhileAnimating:true,backdropTransitionOutTiming:0};function ModalOptionLoan(_ref){var _loan$productItem,_loan$productItem2,_this=this;var open=_ref.open,loan=_ref.loan,callback=_ref.callback,onClose=_ref.onClose,onModalHide=_ref.onModalHide;var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),option=_useState2[0],setOption=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];var _useState5=(0,_react.useState)(0),_useState6=(0,_slicedToArray2.default)(_useState5,2),loanAmount=_useState6[0],setLoanAmount=_useState6[1];var onSubmit=function _callee(){var _response$data,_response$data$meta,response,_response$data2,_response$data2$meta,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(option){_context.next=1;break;}_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Vui lòng chọn gói vay để tiếp tục',primaryText:'Đóng'});return _context.abrupt("return");case 1:_context.prev=1;setIsLoading(true);_context.next=2;return _regenerator.default.awrap(_api.Api.getInstance().updateProductLoan({LoanBriefId:loan==null?void 0:loan.loanBriefId,ProductId:option,LoanAmount:loanAmount}));case 2:response=_context.sent;setIsLoading(false);if(response.kind==='ok'&&((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){if(callback)callback();}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:((_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage)||'Có lỗi xảy ra. Vui lòng thử lại sau',primaryText:'Đóng'});}_context.next=4;break;case 3:_context.prev=3;_t=_context["catch"](1);console.log(_t);case 4:_context.prev=4;setIsLoading(false);return _context.finish(4);case 5:case"end":return _context.stop();}},null,null,[[1,3,4,5]],Promise);};(0,_react.useEffect)(function(){setOption(null);setLoanAmount(0);},[loan]);return _react.default.createElement(_reactNativeModal.default,(0,_extends2.default)({isVisible:open,onModalHide:onModalHide},modalSafeProps,{__self:this,__source:{fileName:_jsxFileName,lineNumber:103,columnNumber:5}}),_react.default.createElement(_reactNative.SafeAreaView,{style:{backgroundColor:'#FFFFFF',borderRadius:12,borderTopWidth:4,borderColor:'#EF592E'},__self:this,__source:{fileName:_jsxFileName,lineNumber:104,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){onClose();setOption(null);setLoanAmount(0);},style:{position:'absolute',top:10,right:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:112,columnNumber:9}},_react.default.createElement(_icons.Close2Icon,{__self:this,__source:{fileName:_jsxFileName,lineNumber:124,columnNumber:11}})),_react.default.createElement(_MText.MText,{style:{textAlign:'center',fontSize:16,fontWeight:'bold',marginTop:20,marginBottom:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:126,columnNumber:9}},(loan==null?void 0:loan.typeLoan)===5?'Chúc mừng bạn!':'Xác nhận số tiền đề nghị vay'),_react.default.createElement(_MText.MText,{style:{textAlign:'center',color:'#828282',paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:139,columnNumber:9}},"B\u1EA1n \u0111\u01B0\u1EE3c vay v\u1EDBi s\u1ED1 ti\u1EC1n d\u1EF1 ki\u1EBFn l\xEAn t\u1EDBi",'\n',_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:147,columnNumber:11}},(0,_utils.formatMoney)(loan?Math.max.apply(Math,(0,_toConsumableArray2.default)(loan==null?void 0:(_loan$productItem=loan.productItem)==null?void 0:_loan$productItem.map(function(item){return item.loanAmount;}))):0),' ',"VN\u0110"),"! Vui l\xF2ng ch\u1ECDn g\xF3i vay v\xE0 ho\xE0n thi\u1EC7n c\xE1c b\u01B0\u1EDBc \u0111\u1EC3 \u0111\u01B0\u1EE3c gi\u1EA3i ng\xE2n nhanh nh\u1EA5t!"),loan==null?void 0:(_loan$productItem2=loan.productItem)==null?void 0:_loan$productItem2.map(function(i,index){return _react.default.createElement(_reactNative.View,{key:index,__self:_this,__source:{fileName:_jsxFileName,lineNumber:164,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{disabled:(i==null?void 0:i.loanAmount)<20000000,onPress:function onPress(){setOption(i==null?void 0:i.productId);setLoanAmount(i==null?void 0:i.loanAmount);},style:[$opt,{backgroundColor:(i==null?void 0:i.loanAmount)<20000000?'#F8F8F8':option===(i==null?void 0:i.productId)?'#FFF7EA':'#FFFFFF'}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:165,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',gap:10,marginBottom:10},__self:_this,__source:{fileName:_jsxFileName,lineNumber:183,columnNumber:15}},option===(i==null?void 0:i.productId)?i.productId===33?_react.default.createElement(_v.IconOption1Active,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:193,columnNumber:21}}):_react.default.createElement(_v.IconOption2,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:195,columnNumber:21}}):i.productId===33?_react.default.createElement(_v.IconOption1,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:198,columnNumber:19}}):_react.default.createElement(_v.IconOption2Disable,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:200,columnNumber:19}}),_react.default.createElement(_reactNative.View,{style:{flex:1},__self:_this,__source:{fileName:_jsxFileName,lineNumber:202,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{fontWeight:'bold'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:203,columnNumber:19}},i==null?void 0:i.productName),_react.default.createElement(_MText.MText,{style:{fontWeight:'bold',color:(i==null?void 0:i.loanAmount)<20000000?'#EB5757':'#EF592E',marginTop:4},__self:_this,__source:{fileName:_jsxFileName,lineNumber:210,columnNumber:19}},(i==null?void 0:i.loanAmount)<20000000?'Không đủ điều kiện':_react.default.createElement(_react.default.Fragment,null,(loan==null?void 0:loan.typeLoan)===6&&'Lên đến ',(0,_utils.formatMoney)(i==null?void 0:i.loanAmount)," VN\u0110"))),option===(i==null?void 0:i.productId)?_react.default.createElement(_icons.RadioCheckIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:227,columnNumber:44}}):_react.default.createElement(_icons.RadioIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:227,columnNumber:65}})),_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:229,columnNumber:15}},"\u2022",' ',(i==null?void 0:i.productId)===8?'Có thu đăng ký xe':'Không thu đăng ký xe'),(i==null?void 0:i.loanAmount)>0&&_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:236,columnNumber:17}},"\u2022 Gi\u1EA3i ng\xE2n ngay l\xEAn \u0111\u1EBFn ",(0,_utils.formatMoney)(i==null?void 0:i.loanAmount),"\u0111"),(i==null?void 0:i.productId)===8&&_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:241,columnNumber:17}},"\u2022 L\xE3i ph\xED \u01B0u \u0111\xE3i h\u01A1n Vay nhanh T - Fast"),_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:245,columnNumber:15}},"\u2022",' ',(i==null?void 0:i.productId)===8?"C\xF3 g\u1EB7p m\u1EB7t nh\xE2n vi\xEAn h\u1ED7 tr\u1EE3 th\u1EE7 t\u1EE5c":'Không cần gặp mặt, online 100% toàn trình'),_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:251,columnNumber:15}},"\u2022 T\xE0i s\u1EA3n \u0111\u01B0\u1EE3c \u0111\u0103ng k\xFD Giao d\u1ECBch b\u1EA3o \u0111\u1EA3m")),(i==null?void 0:i.loanAmount)<20000000&&_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFEBEB',marginHorizontal:16,flexDirection:'row',gap:10,borderRadius:8,paddingHorizontal:10,paddingVertical:8},__self:_this,__source:{fileName:_jsxFileName,lineNumber:256,columnNumber:15}},_react.default.createElement(_icons.ErrorIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:267,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{flex:1,color:'#EB5757',fontSize:12},__self:_this,__source:{fileName:_jsxFileName,lineNumber:268,columnNumber:17}},"S\u1ED1 ti\u1EC1n ch\u01B0a \u0111\u1EA1t m\u1EE9c t\u1ED1i thi\u1EC3u theo \u0111i\u1EC1u ki\u1EC7n vay (Kho\u1EA3n vay t\u1ED1i thi\u1EC3u: 20.000.000 VN\u0110)")));}),_react.default.createElement(_MButton.default,{disabled:isLoading||option===null,onPress:function onPress(){return onSubmit();},style:{marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:277,columnNumber:9}},_react.default.createElement(_reactNativeLinearGradient.default,{start:{x:1,y:0},end:{x:0,y:1},style:{height:40,marginVertical:16,borderRadius:30,alignItems:'center',justifyContent:'center'},colors:option===null?['#BDBDBD','#BDBDBD']:['#FF7A00','#EF4123'],__self:this,__source:{fileName:_jsxFileName,lineNumber:284,columnNumber:11}},isLoading?_react.default.createElement(_reactNative.ActivityIndicator,{color:'white',__self:this,__source:{fileName:_jsxFileName,lineNumber:299,columnNumber:15}}):_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:301,columnNumber:15}},"X\xE1c nh\u1EADn")))));}var $opt={borderWidth:1,borderRadius:8,borderColor:'#E5E5EA',marginHorizontal:16,marginTop:10,padding:10};var $des={fontSize:12,color:'#828282',marginTop:4};
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=ModalOptionLoan;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _AppModal=_interopRequireDefault(require("./AppModal"));var _AlertGlobal=require("./ModalNotification/AlertGlobal");var _MText=require("./MText");var _MButton=_interopRequireDefault(require("./MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _v=require("../assets/v3");var _icons=require("../assets/icons");var _utils=require("../utils");var _api=require("../services/api");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/components/ModalOptionLoan.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}var modalSafeProps={useNativeDriver:true,useNativeDriverForBackdrop:true,hideModalContentWhileAnimating:true,backdropTransitionOutTiming:0};function ModalOptionLoan(_ref){var _loan$productItem,_loan$productItem2,_this=this;var open=_ref.open,loan=_ref.loan,callback=_ref.callback,onClose=_ref.onClose,onModalHide=_ref.onModalHide;var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),option=_useState2[0],setOption=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];var _useState5=(0,_react.useState)(0),_useState6=(0,_slicedToArray2.default)(_useState5,2),loanAmount=_useState6[0],setLoanAmount=_useState6[1];var onSubmit=function _callee(){var _response$data,_response$data$meta,response,_response$data2,_response$data2$meta,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(option){_context.next=1;break;}_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Vui lòng chọn gói vay để tiếp tục',primaryText:'Đóng'});return _context.abrupt("return");case 1:_context.prev=1;setIsLoading(true);_context.next=2;return _regenerator.default.awrap(_api.Api.getInstance().updateProductLoan({LoanBriefId:loan==null?void 0:loan.loanBriefId,ProductId:option,LoanAmount:loanAmount}));case 2:response=_context.sent;setIsLoading(false);if(response.kind==='ok'&&((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){if(callback)callback();}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:((_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage)||'Có lỗi xảy ra. Vui lòng thử lại sau',primaryText:'Đóng'});}_context.next=4;break;case 3:_context.prev=3;_t=_context["catch"](1);console.log(_t);case 4:_context.prev=4;setIsLoading(false);return _context.finish(4);case 5:case"end":return _context.stop();}},null,null,[[1,3,4,5]],Promise);};(0,_react.useEffect)(function(){setOption(null);setLoanAmount(0);},[loan]);return _react.default.createElement(_AppModal.default,(0,_extends2.default)({isVisible:open,onModalHide:onModalHide},modalSafeProps,{__self:this,__source:{fileName:_jsxFileName,lineNumber:103,columnNumber:5}}),_react.default.createElement(_reactNative.SafeAreaView,{style:{backgroundColor:'#FFFFFF',borderRadius:12,borderTopWidth:4,borderColor:'#EF592E'},__self:this,__source:{fileName:_jsxFileName,lineNumber:104,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){onClose();setOption(null);setLoanAmount(0);},style:{position:'absolute',top:10,right:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:112,columnNumber:9}},_react.default.createElement(_icons.Close2Icon,{__self:this,__source:{fileName:_jsxFileName,lineNumber:124,columnNumber:11}})),_react.default.createElement(_MText.MText,{style:{textAlign:'center',fontSize:16,fontWeight:'bold',marginTop:20,marginBottom:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:126,columnNumber:9}},(loan==null?void 0:loan.typeLoan)===5?'Chúc mừng bạn!':'Xác nhận số tiền đề nghị vay'),_react.default.createElement(_MText.MText,{style:{textAlign:'center',color:'#828282',paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:139,columnNumber:9}},"B\u1EA1n \u0111\u01B0\u1EE3c vay v\u1EDBi s\u1ED1 ti\u1EC1n d\u1EF1 ki\u1EBFn l\xEAn t\u1EDBi",'\n',_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:147,columnNumber:11}},(0,_utils.formatMoney)(loan?Math.max.apply(Math,(0,_toConsumableArray2.default)(loan==null?void 0:(_loan$productItem=loan.productItem)==null?void 0:_loan$productItem.map(function(item){return item.loanAmount;}))):0),' ',"VN\u0110"),"! Vui l\xF2ng ch\u1ECDn g\xF3i vay v\xE0 ho\xE0n thi\u1EC7n c\xE1c b\u01B0\u1EDBc \u0111\u1EC3 \u0111\u01B0\u1EE3c gi\u1EA3i ng\xE2n nhanh nh\u1EA5t!"),loan==null?void 0:(_loan$productItem2=loan.productItem)==null?void 0:_loan$productItem2.map(function(i,index){return _react.default.createElement(_reactNative.View,{key:index,__self:_this,__source:{fileName:_jsxFileName,lineNumber:164,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{disabled:(i==null?void 0:i.loanAmount)<20000000,onPress:function onPress(){setOption(i==null?void 0:i.productId);setLoanAmount(i==null?void 0:i.loanAmount);},style:[$opt,{backgroundColor:(i==null?void 0:i.loanAmount)<20000000?'#F8F8F8':option===(i==null?void 0:i.productId)?'#FFF7EA':'#FFFFFF'}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:165,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',gap:10,marginBottom:10},__self:_this,__source:{fileName:_jsxFileName,lineNumber:183,columnNumber:15}},option===(i==null?void 0:i.productId)?i.productId===33?_react.default.createElement(_v.IconOption1Active,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:193,columnNumber:21}}):_react.default.createElement(_v.IconOption2,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:195,columnNumber:21}}):i.productId===33?_react.default.createElement(_v.IconOption1,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:198,columnNumber:19}}):_react.default.createElement(_v.IconOption2Disable,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:200,columnNumber:19}}),_react.default.createElement(_reactNative.View,{style:{flex:1},__self:_this,__source:{fileName:_jsxFileName,lineNumber:202,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{fontWeight:'bold'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:203,columnNumber:19}},i==null?void 0:i.productName),_react.default.createElement(_MText.MText,{style:{fontWeight:'bold',color:(i==null?void 0:i.loanAmount)<20000000?'#EB5757':'#EF592E',marginTop:4},__self:_this,__source:{fileName:_jsxFileName,lineNumber:210,columnNumber:19}},(i==null?void 0:i.loanAmount)<20000000?'Không đủ điều kiện':_react.default.createElement(_react.default.Fragment,null,(loan==null?void 0:loan.typeLoan)===6&&'Lên đến ',(0,_utils.formatMoney)(i==null?void 0:i.loanAmount)," VN\u0110"))),option===(i==null?void 0:i.productId)?_react.default.createElement(_icons.RadioCheckIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:227,columnNumber:44}}):_react.default.createElement(_icons.RadioIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:227,columnNumber:65}})),_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:229,columnNumber:15}},"\u2022",' ',(i==null?void 0:i.productId)===8?'Có thu đăng ký xe':'Không thu đăng ký xe'),(i==null?void 0:i.loanAmount)>0&&_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:236,columnNumber:17}},"\u2022 Gi\u1EA3i ng\xE2n ngay l\xEAn \u0111\u1EBFn ",(0,_utils.formatMoney)(i==null?void 0:i.loanAmount),"\u0111"),(i==null?void 0:i.productId)===8&&_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:241,columnNumber:17}},"\u2022 L\xE3i ph\xED \u01B0u \u0111\xE3i h\u01A1n Vay nhanh T - Fast"),_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:245,columnNumber:15}},"\u2022",' ',(i==null?void 0:i.productId)===8?"C\xF3 g\u1EB7p m\u1EB7t nh\xE2n vi\xEAn h\u1ED7 tr\u1EE3 th\u1EE7 t\u1EE5c":'Không cần gặp mặt, online 100% toàn trình'),_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:251,columnNumber:15}},"\u2022 T\xE0i s\u1EA3n \u0111\u01B0\u1EE3c \u0111\u0103ng k\xFD Giao d\u1ECBch b\u1EA3o \u0111\u1EA3m")),(i==null?void 0:i.loanAmount)<20000000&&_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFEBEB',marginHorizontal:16,flexDirection:'row',gap:10,borderRadius:8,paddingHorizontal:10,paddingVertical:8},__self:_this,__source:{fileName:_jsxFileName,lineNumber:256,columnNumber:15}},_react.default.createElement(_icons.ErrorIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:267,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{flex:1,color:'#EB5757',fontSize:12},__self:_this,__source:{fileName:_jsxFileName,lineNumber:268,columnNumber:17}},"S\u1ED1 ti\u1EC1n ch\u01B0a \u0111\u1EA1t m\u1EE9c t\u1ED1i thi\u1EC3u theo \u0111i\u1EC1u ki\u1EC7n vay (Kho\u1EA3n vay t\u1ED1i thi\u1EC3u: 20.000.000 VN\u0110)")));}),_react.default.createElement(_MButton.default,{disabled:isLoading||option===null,onPress:function onPress(){return onSubmit();},style:{marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:277,columnNumber:9}},_react.default.createElement(_reactNativeLinearGradient.default,{start:{x:1,y:0},end:{x:0,y:1},style:{height:40,marginVertical:16,borderRadius:30,alignItems:'center',justifyContent:'center'},colors:option===null?['#BDBDBD','#BDBDBD']:['#FF7A00','#EF4123'],__self:this,__source:{fileName:_jsxFileName,lineNumber:284,columnNumber:11}},isLoading?_react.default.createElement(_reactNative.ActivityIndicator,{color:'white',__self:this,__source:{fileName:_jsxFileName,lineNumber:299,columnNumber:15}}):_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:301,columnNumber:15}},"X\xE1c nh\u1EADn")))));}var $opt={borderWidth:1,borderRadius:8,borderColor:'#E5E5EA',marginHorizontal:16,marginTop:10,padding:10};var $des={fontSize:12,color:'#828282',marginTop:4};
|
|
2
2
|
//# sourceMappingURL=ModalOptionLoan.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
View,
|
|
9
9
|
ViewStyle,
|
|
10
10
|
} from 'react-native';
|
|
11
|
-
import Modal from '
|
|
11
|
+
import Modal from './AppModal';
|
|
12
12
|
import { AlertGlobal } from './ModalNotification/AlertGlobal';
|
|
13
13
|
import { MText } from './MText';
|
|
14
14
|
import MButton from './MButton';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeModal","_interopRequireDefault","_AlertGlobal","_MText","_MButton","_reactNativeLinearGradient","_v","_icons","_utils","_api","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","modalSafeProps","useNativeDriver","useNativeDriverForBackdrop","hideModalContentWhileAnimating","backdropTransitionOutTiming","ModalOptionLoan","_ref","_loan$productItem","_loan$productItem2","_this","open","loan","callback","onClose","onModalHide","_useState","useState","_useState2","_slicedToArray2","option","setOption","_useState3","_useState4","isLoading","setIsLoading","_useState5","_useState6","loanAmount","setLoanAmount","onSubmit","_callee","_response$data","_response$data$meta","response","_response$data2","_response$data2$meta","_t","_regenerator","async","_context","prev","next","AlertGlobal","show","type","title","message","primaryText","abrupt","awrap","Api","getInstance","updateProductLoan","LoanBriefId","loanBriefId","ProductId","LoanAmount","sent","kind","data","meta","errorCode","errorMessage","console","log","finish","stop","Promise","useEffect","createElement","_extends2","isVisible","__self","__source","fileName","lineNumber","columnNumber","SafeAreaView","style","backgroundColor","borderRadius","borderTopWidth","borderColor","TouchableOpacity","onPress","position","top","right","Close2Icon","MText","textAlign","fontSize","fontWeight","marginTop","marginBottom","typeLoan","color","paddingHorizontal","formatMoney","Math","max","apply","_toConsumableArray2","productItem","map","item","index","View","key","disabled","productId","$opt","flexDirection","alignItems","gap","IconOption1Active","IconOption2","IconOption1","IconOption2Disable","flex","productName","Fragment","RadioCheckIcon","RadioIcon","$des","marginHorizontal","paddingVertical","ErrorIcon","start","x","y","end","height","marginVertical","justifyContent","colors","ActivityIndicator","borderWidth","padding"],"sourceRoot":"../../../src","sources":["components/ModalOptionLoan.tsx"],"mappings":"2gBACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAQA,IAAAE,iBAAA,CAAAC,sBAAA,CAAAH,OAAA,wBACA,IAAAI,YAAA,CAAAJ,OAAA,oCACA,IAAAK,M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AAA+E,aAAA,CAACjG,MAAA,CAAAqH,KAAK,EACJX,KAAK,CAAE,CACLkB,KAAK,CAAE,OAAO,CACdL,QAAQ,CAAE,EACZ,CAAE,CAAAnB,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAA/F,YAAA,CAAAgG,UAAA,KAAAC,YAAA,MACH,kBAEM,CAEK,CACT,CACG,CACT,CAAC,CAEZ,CAEA,GAAM,CAAAmC,IAAe,CAAG,CACtB0B,WAAW,CAAE,CAAC,CACdzD,YAAY,CAAE,CAAC,CACfE,WAAW,CAAE,SAAS,CACtB2C,gBAAgB,CAAE,EAAE,CACpBhC,SAAS,CAAE,EAAE,CACb6C,OAAO,CAAE,EACX,CAAC,CACD,GAAM,CAAAd,IAAe,CAAG,CACtBjC,QAAQ,CAAE,EAAE,CACZK,KAAK,CAAE,SAAS,CAChBH,SAAS,CAAE,CACb,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_AppModal","_interopRequireDefault","_AlertGlobal","_MText","_MButton","_reactNativeLinearGradient","_v","_icons","_utils","_api","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","modalSafeProps","useNativeDriver","useNativeDriverForBackdrop","hideModalContentWhileAnimating","backdropTransitionOutTiming","ModalOptionLoan","_ref","_loan$productItem","_loan$productItem2","_this","open","loan","callback","onClose","onModalHide","_useState","useState","_useState2","_slicedToArray2","option","setOption","_useState3","_useState4","isLoading","setIsLoading","_useState5","_useState6","loanAmount","setLoanAmount","onSubmit","_callee","_response$data","_response$data$meta","response","_response$data2","_response$data2$meta","_t","_regenerator","async","_context","prev","next","AlertGlobal","show","type","title","message","primaryText","abrupt","awrap","Api","getInstance","updateProductLoan","LoanBriefId","loanBriefId","ProductId","LoanAmount","sent","kind","data","meta","errorCode","errorMessage","console","log","finish","stop","Promise","useEffect","createElement","_extends2","isVisible","__self","__source","fileName","lineNumber","columnNumber","SafeAreaView","style","backgroundColor","borderRadius","borderTopWidth","borderColor","TouchableOpacity","onPress","position","top","right","Close2Icon","MText","textAlign","fontSize","fontWeight","marginTop","marginBottom","typeLoan","color","paddingHorizontal","formatMoney","Math","max","apply","_toConsumableArray2","productItem","map","item","index","View","key","disabled","productId","$opt","flexDirection","alignItems","gap","IconOption1Active","IconOption2","IconOption1","IconOption2Disable","flex","productName","Fragment","RadioCheckIcon","RadioIcon","$des","marginHorizontal","paddingVertical","ErrorIcon","start","x","y","end","height","marginVertical","justifyContent","colors","ActivityIndicator","borderWidth","padding"],"sourceRoot":"../../../src","sources":["components/ModalOptionLoan.tsx"],"mappings":"2gBACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAQA,IAAAE,SAAA,CAAAC,sBAAA,CAAAH,OAAA,gBACA,IAAAI,YAAA,CAAAJ,OAAA,oCACA,IAAAK,MAAA,CAAAL,OAAA,YACA,IAAAM,QAAA,CAAAH,sBAAA,CAAAH,OAAA,eACA,IAAAO,0BAAA,CAAAJ,sBAAA,CAAAH,OAAA,kCACA,IAAAQ,EAAA,CAAAR,OAAA,iBAMA,IAAAS,MAAA,CAAAT,OAAA,oBAMA,IAAAU,MAAA,CAAAV,OAAA,aACA,IAAAW,IAAA,CAAAX,OAAA,oBAAsC,IAAAY,YAAA,sFAAAb,wBAAAc,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAhB,uBAAA,UAAAA,wBAAAc,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,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ime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=ModalOptionLoanDigital;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeModal=_interopRequireDefault(require("react-native-modal"));var _AlertGlobal=require("./ModalNotification/AlertGlobal");var _MText=require("./MText");var _MButton=_interopRequireDefault(require("./MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _v=require("../assets/v3");var _icons=require("../assets/icons");var _utils=require("../utils");var _api=require("../services/api");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/components/ModalOptionLoanDigital.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}var modalSafeProps={useNativeDriver:true,useNativeDriverForBackdrop:true,hideModalContentWhileAnimating:true,backdropTransitionOutTiming:0};function ModalOptionLoanDigital(_ref){var _loan$productItem,_loan$productItem2,_this=this;var open=_ref.open,loan=_ref.loan,callback=_ref.callback,onClose=_ref.onClose,onModalHide=_ref.onModalHide;var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),option=_useState2[0],setOption=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];var _useState5=(0,_react.useState)(0),_useState6=(0,_slicedToArray2.default)(_useState5,2),loanAmount=_useState6[0],setLoanAmount=_useState6[1];(0,_react.useEffect)(function(){setOption(null);setLoanAmount(0);},[loan]);var onSubmit=function _callee(){var _response$data,_response$data$meta,response,_response$data2,_response$data2$meta,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(option){_context.next=1;break;}_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Vui lòng chọn gói vay để tiếp tục',primaryText:'Đóng'});return _context.abrupt("return");case 1:_context.prev=1;setIsLoading(true);_context.next=2;return _regenerator.default.awrap(_api.Api.getInstance().updateDigitalProductLoan({LoanBriefId:loan==null?void 0:loan.loanBriefId,ProductId:option,LoanAmount:loanAmount}));case 2:response=_context.sent;setIsLoading(false);if(response.kind==='ok'&&((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){if(callback)callback();}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:((_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage)||'Có lỗi xảy ra. Vui lòng thử lại sau',primaryText:'Đóng'});}_context.next=4;break;case 3:_context.prev=3;_t=_context["catch"](1);console.log(_t);case 4:_context.prev=4;setIsLoading(false);return _context.finish(4);case 5:case"end":return _context.stop();}},null,null,[[1,3,4,5]],Promise);};return _react.default.createElement(_reactNativeModal.default,(0,_extends2.default)({isVisible:open,onModalHide:onModalHide},modalSafeProps,{__self:this,__source:{fileName:_jsxFileName,lineNumber:100,columnNumber:5}}),_react.default.createElement(_reactNative.SafeAreaView,{style:{backgroundColor:'#FFFFFF',borderRadius:12,borderTopWidth:4,borderColor:'#EF592E'},__self:this,__source:{fileName:_jsxFileName,lineNumber:101,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){onClose();setOption(null);setLoanAmount(0);},style:{position:'absolute',top:10,right:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:109,columnNumber:9}},_react.default.createElement(_icons.Close2Icon,{__self:this,__source:{fileName:_jsxFileName,lineNumber:121,columnNumber:11}})),_react.default.createElement(_MText.MText,{style:{textAlign:'center',fontSize:16,fontWeight:'bold',marginTop:20,marginBottom:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:123,columnNumber:9}},"X\xE1c nh\u1EADn s\u1ED1 ti\u1EC1n \u0111\u1EC1 ngh\u1ECB vay"),_react.default.createElement(_MText.MText,{style:{textAlign:'center',color:'#828282',paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:134,columnNumber:9}},"B\u1EA1n \u0111\u01B0\u1EE3c vay v\u1EDBi s\u1ED1 ti\u1EC1n d\u1EF1 ki\u1EBFn l\xEAn t\u1EDBi",'\n',_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:142,columnNumber:11}},(0,_utils.formatMoney)(loan?Math.max.apply(Math,(0,_toConsumableArray2.default)(loan==null?void 0:(_loan$productItem=loan.productItem)==null?void 0:_loan$productItem.map(function(item){return item.loanAmount;}))):0),' ',"VN\u0110"),"! Vui l\xF2ng ch\u1ECDn g\xF3i vay v\xE0 ho\xE0n thi\u1EC7n c\xE1c b\u01B0\u1EDBc \u0111\u1EC3 \u0111\u01B0\u1EE3c gi\u1EA3i ng\xE2n nhanh nh\u1EA5t!"),loan==null?void 0:(_loan$productItem2=loan.productItem)==null?void 0:_loan$productItem2.map(function(i,index){return _react.default.createElement(_reactNative.View,{key:index,__self:_this,__source:{fileName:_jsxFileName,lineNumber:159,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{disabled:(i==null?void 0:i.loanAmount)<20000000,onPress:function onPress(){setOption(i==null?void 0:i.productId);setLoanAmount(i==null?void 0:i.loanAmount);},style:[$opt,{backgroundColor:(i==null?void 0:i.loanAmount)<20000000?'#F8F8F8':option===(i==null?void 0:i.productId)?'#FFF7EA':'#FFFFFF'}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:160,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',gap:10,marginBottom:10},__self:_this,__source:{fileName:_jsxFileName,lineNumber:178,columnNumber:15}},option===(i==null?void 0:i.productId)?i.productId===1001?_react.default.createElement(_v.IconOption1Active,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:188,columnNumber:21}}):_react.default.createElement(_v.IconOption2,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:190,columnNumber:21}}):i.productId===1001?_react.default.createElement(_v.IconOption1,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:193,columnNumber:19}}):_react.default.createElement(_v.IconOption2Disable,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:195,columnNumber:19}}),_react.default.createElement(_reactNative.View,{style:{flex:1},__self:_this,__source:{fileName:_jsxFileName,lineNumber:197,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{fontWeight:'bold'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:198,columnNumber:19}},i==null?void 0:i.productName),_react.default.createElement(_MText.MText,{style:{fontWeight:'bold',color:(i==null?void 0:i.loanAmount)<20000000?'#EB5757':'#EF592E',marginTop:4},__self:_this,__source:{fileName:_jsxFileName,lineNumber:205,columnNumber:19}},(i==null?void 0:i.loanAmount)<20000000?'Không đủ điều kiện':_react.default.createElement(_react.default.Fragment,null,"L\xEAn \u0111\u1EBFn ",(0,_utils.formatMoney)(i==null?void 0:i.loanAmount)," VN\u0110"))),option===(i==null?void 0:i.productId)?_react.default.createElement(_icons.RadioCheckIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:219,columnNumber:44}}):_react.default.createElement(_icons.RadioIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:219,columnNumber:65}})),_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:221,columnNumber:15}},"\u2022 Ph\xEA duy\u1EC7t t\u1EF1 \u0111\u1ED9ng"),_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:222,columnNumber:15}},"\u2022 Online 100% to\xE0n tr\xECnh"),(i==null?void 0:i.productId)===1002&&_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:224,columnNumber:17}},"\u2022 C\xF3 th\u1EC3 thu b\u1ED5 sung \u0110\u0103ng k\xFD xe (tu\u1EF3 g\xF3i vay)"),(i==null?void 0:i.loanAmount)>0&&_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:229,columnNumber:17}},"\u2022 Gi\u1EA3i ng\xE2n ngay l\xEAn \u0111\u1EBFn ",(0,_utils.formatMoney)(i==null?void 0:i.loanAmount),"\u0111")),(i==null?void 0:i.loanAmount)<20000000&&_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFEBEB',marginHorizontal:16,flexDirection:'row',gap:10,borderRadius:8,paddingHorizontal:10,paddingVertical:8},__self:_this,__source:{fileName:_jsxFileName,lineNumber:235,columnNumber:15}},_react.default.createElement(_icons.ErrorIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:246,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{flex:1,color:'#EB5757',fontSize:12},__self:_this,__source:{fileName:_jsxFileName,lineNumber:247,columnNumber:17}},"S\u1ED1 ti\u1EC1n ch\u01B0a \u0111\u1EA1t m\u1EE9c t\u1ED1i thi\u1EC3u theo \u0111i\u1EC1u ki\u1EC7n vay (Kho\u1EA3n vay t\u1ED1i thi\u1EC3u: 20.000.000 VN\u0110)")));}),_react.default.createElement(_MButton.default,{disabled:isLoading||option===null,onPress:function onPress(){return onSubmit();},style:{marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:256,columnNumber:9}},_react.default.createElement(_reactNativeLinearGradient.default,{start:{x:1,y:0},end:{x:0,y:1},style:{height:40,marginVertical:16,borderRadius:30,alignItems:'center',justifyContent:'center'},colors:option===null?['#BDBDBD','#BDBDBD']:['#FF7A00','#EF4123'],__self:this,__source:{fileName:_jsxFileName,lineNumber:263,columnNumber:11}},isLoading?_react.default.createElement(_reactNative.ActivityIndicator,{color:'white',__self:this,__source:{fileName:_jsxFileName,lineNumber:278,columnNumber:15}}):_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:280,columnNumber:15}},"X\xE1c nh\u1EADn")))));}var $opt={borderWidth:1,borderRadius:8,borderColor:'#E5E5EA',marginHorizontal:16,marginTop:10,padding:10};var $des={fontSize:12,color:'#828282',marginTop:4};
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=ModalOptionLoanDigital;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _AppModal=_interopRequireDefault(require("./AppModal"));var _AlertGlobal=require("./ModalNotification/AlertGlobal");var _MText=require("./MText");var _MButton=_interopRequireDefault(require("./MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _v=require("../assets/v3");var _icons=require("../assets/icons");var _utils=require("../utils");var _api=require("../services/api");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/components/ModalOptionLoanDigital.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}var modalSafeProps={useNativeDriver:true,useNativeDriverForBackdrop:true,hideModalContentWhileAnimating:true,backdropTransitionOutTiming:0};function ModalOptionLoanDigital(_ref){var _loan$productItem,_loan$productItem2,_this=this;var open=_ref.open,loan=_ref.loan,callback=_ref.callback,onClose=_ref.onClose,onModalHide=_ref.onModalHide;var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),option=_useState2[0],setOption=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];var _useState5=(0,_react.useState)(0),_useState6=(0,_slicedToArray2.default)(_useState5,2),loanAmount=_useState6[0],setLoanAmount=_useState6[1];(0,_react.useEffect)(function(){setOption(null);setLoanAmount(0);},[loan]);var onSubmit=function _callee(){var _response$data,_response$data$meta,response,_response$data2,_response$data2$meta,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(option){_context.next=1;break;}_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:'Vui lòng chọn gói vay để tiếp tục',primaryText:'Đóng'});return _context.abrupt("return");case 1:_context.prev=1;setIsLoading(true);_context.next=2;return _regenerator.default.awrap(_api.Api.getInstance().updateDigitalProductLoan({LoanBriefId:loan==null?void 0:loan.loanBriefId,ProductId:option,LoanAmount:loanAmount}));case 2:response=_context.sent;setIsLoading(false);if(response.kind==='ok'&&((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){if(callback)callback();}else{_AlertGlobal.AlertGlobal.show({type:'warning',title:'Thông báo',message:((_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage)||'Có lỗi xảy ra. Vui lòng thử lại sau',primaryText:'Đóng'});}_context.next=4;break;case 3:_context.prev=3;_t=_context["catch"](1);console.log(_t);case 4:_context.prev=4;setIsLoading(false);return _context.finish(4);case 5:case"end":return _context.stop();}},null,null,[[1,3,4,5]],Promise);};return _react.default.createElement(_AppModal.default,(0,_extends2.default)({isVisible:open,onModalHide:onModalHide},modalSafeProps,{__self:this,__source:{fileName:_jsxFileName,lineNumber:100,columnNumber:5}}),_react.default.createElement(_reactNative.SafeAreaView,{style:{backgroundColor:'#FFFFFF',borderRadius:12,borderTopWidth:4,borderColor:'#EF592E'},__self:this,__source:{fileName:_jsxFileName,lineNumber:101,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){onClose();setOption(null);setLoanAmount(0);},style:{position:'absolute',top:10,right:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:109,columnNumber:9}},_react.default.createElement(_icons.Close2Icon,{__self:this,__source:{fileName:_jsxFileName,lineNumber:121,columnNumber:11}})),_react.default.createElement(_MText.MText,{style:{textAlign:'center',fontSize:16,fontWeight:'bold',marginTop:20,marginBottom:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:123,columnNumber:9}},"X\xE1c nh\u1EADn s\u1ED1 ti\u1EC1n \u0111\u1EC1 ngh\u1ECB vay"),_react.default.createElement(_MText.MText,{style:{textAlign:'center',color:'#828282',paddingHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:134,columnNumber:9}},"B\u1EA1n \u0111\u01B0\u1EE3c vay v\u1EDBi s\u1ED1 ti\u1EC1n d\u1EF1 ki\u1EBFn l\xEAn t\u1EDBi",'\n',_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontWeight:'bold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:142,columnNumber:11}},(0,_utils.formatMoney)(loan?Math.max.apply(Math,(0,_toConsumableArray2.default)(loan==null?void 0:(_loan$productItem=loan.productItem)==null?void 0:_loan$productItem.map(function(item){return item.loanAmount;}))):0),' ',"VN\u0110"),"! Vui l\xF2ng ch\u1ECDn g\xF3i vay v\xE0 ho\xE0n thi\u1EC7n c\xE1c b\u01B0\u1EDBc \u0111\u1EC3 \u0111\u01B0\u1EE3c gi\u1EA3i ng\xE2n nhanh nh\u1EA5t!"),loan==null?void 0:(_loan$productItem2=loan.productItem)==null?void 0:_loan$productItem2.map(function(i,index){return _react.default.createElement(_reactNative.View,{key:index,__self:_this,__source:{fileName:_jsxFileName,lineNumber:159,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{disabled:(i==null?void 0:i.loanAmount)<20000000,onPress:function onPress(){setOption(i==null?void 0:i.productId);setLoanAmount(i==null?void 0:i.loanAmount);},style:[$opt,{backgroundColor:(i==null?void 0:i.loanAmount)<20000000?'#F8F8F8':option===(i==null?void 0:i.productId)?'#FFF7EA':'#FFFFFF'}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:160,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',gap:10,marginBottom:10},__self:_this,__source:{fileName:_jsxFileName,lineNumber:178,columnNumber:15}},option===(i==null?void 0:i.productId)?i.productId===1001?_react.default.createElement(_v.IconOption1Active,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:188,columnNumber:21}}):_react.default.createElement(_v.IconOption2,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:190,columnNumber:21}}):i.productId===1001?_react.default.createElement(_v.IconOption1,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:193,columnNumber:19}}):_react.default.createElement(_v.IconOption2Disable,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:195,columnNumber:19}}),_react.default.createElement(_reactNative.View,{style:{flex:1},__self:_this,__source:{fileName:_jsxFileName,lineNumber:197,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{fontWeight:'bold'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:198,columnNumber:19}},i==null?void 0:i.productName),_react.default.createElement(_MText.MText,{style:{fontWeight:'bold',color:(i==null?void 0:i.loanAmount)<20000000?'#EB5757':'#EF592E',marginTop:4},__self:_this,__source:{fileName:_jsxFileName,lineNumber:205,columnNumber:19}},(i==null?void 0:i.loanAmount)<20000000?'Không đủ điều kiện':_react.default.createElement(_react.default.Fragment,null,"L\xEAn \u0111\u1EBFn ",(0,_utils.formatMoney)(i==null?void 0:i.loanAmount)," VN\u0110"))),option===(i==null?void 0:i.productId)?_react.default.createElement(_icons.RadioCheckIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:219,columnNumber:44}}):_react.default.createElement(_icons.RadioIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:219,columnNumber:65}})),_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:221,columnNumber:15}},"\u2022 Ph\xEA duy\u1EC7t t\u1EF1 \u0111\u1ED9ng"),_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:222,columnNumber:15}},"\u2022 Online 100% to\xE0n tr\xECnh"),(i==null?void 0:i.productId)===1002&&_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:224,columnNumber:17}},"\u2022 C\xF3 th\u1EC3 thu b\u1ED5 sung \u0110\u0103ng k\xFD xe (tu\u1EF3 g\xF3i vay)"),(i==null?void 0:i.loanAmount)>0&&_react.default.createElement(_MText.MText,{style:$des,__self:_this,__source:{fileName:_jsxFileName,lineNumber:229,columnNumber:17}},"\u2022 Gi\u1EA3i ng\xE2n ngay l\xEAn \u0111\u1EBFn ",(0,_utils.formatMoney)(i==null?void 0:i.loanAmount),"\u0111")),(i==null?void 0:i.loanAmount)<20000000&&_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#FFEBEB',marginHorizontal:16,flexDirection:'row',gap:10,borderRadius:8,paddingHorizontal:10,paddingVertical:8},__self:_this,__source:{fileName:_jsxFileName,lineNumber:235,columnNumber:15}},_react.default.createElement(_icons.ErrorIcon,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:246,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{flex:1,color:'#EB5757',fontSize:12},__self:_this,__source:{fileName:_jsxFileName,lineNumber:247,columnNumber:17}},"S\u1ED1 ti\u1EC1n ch\u01B0a \u0111\u1EA1t m\u1EE9c t\u1ED1i thi\u1EC3u theo \u0111i\u1EC1u ki\u1EC7n vay (Kho\u1EA3n vay t\u1ED1i thi\u1EC3u: 20.000.000 VN\u0110)")));}),_react.default.createElement(_MButton.default,{disabled:isLoading||option===null,onPress:function onPress(){return onSubmit();},style:{marginHorizontal:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:256,columnNumber:9}},_react.default.createElement(_reactNativeLinearGradient.default,{start:{x:1,y:0},end:{x:0,y:1},style:{height:40,marginVertical:16,borderRadius:30,alignItems:'center',justifyContent:'center'},colors:option===null?['#BDBDBD','#BDBDBD']:['#FF7A00','#EF4123'],__self:this,__source:{fileName:_jsxFileName,lineNumber:263,columnNumber:11}},isLoading?_react.default.createElement(_reactNative.ActivityIndicator,{color:'white',__self:this,__source:{fileName:_jsxFileName,lineNumber:278,columnNumber:15}}):_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:280,columnNumber:15}},"X\xE1c nh\u1EADn")))));}var $opt={borderWidth:1,borderRadius:8,borderColor:'#E5E5EA',marginHorizontal:16,marginTop:10,padding:10};var $des={fontSize:12,color:'#828282',marginTop:4};
|
|
2
2
|
//# sourceMappingURL=ModalOptionLoanDigital.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
View,
|
|
9
9
|
ViewStyle,
|
|
10
10
|
} from 'react-native';
|
|
11
|
-
import Modal from '
|
|
11
|
+
import Modal from './AppModal';
|
|
12
12
|
import { AlertGlobal } from './ModalNotification/AlertGlobal';
|
|
13
13
|
import { MText } from './MText';
|
|
14
14
|
import MButton from './MButton';
|