react-native-timacare 3.3.46 → 3.3.48
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/svgs/question.svg +1 -7
- package/lib/commonjs/components/ItemTimaOneV3.js +1 -1
- package/lib/commonjs/components/ItemTimaOneV3.js.flow +29 -29
- package/lib/commonjs/components/ItemTimaOneV3.js.map +1 -1
- package/lib/commonjs/components/SkeletonLoanCard.js +1 -1
- package/lib/commonjs/components/SkeletonLoanCard.js.flow +58 -0
- package/lib/commonjs/components/SkeletonLoanCard.js.map +1 -1
- package/lib/commonjs/navigation/primary-navigator.js +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.flow +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +15 -4
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/commonjs/screens/detail-loan-tima/InforLoan.js +2 -0
- package/lib/commonjs/screens/detail-loan-tima/InforLoan.js.flow +241 -0
- package/lib/commonjs/screens/detail-loan-tima/InforLoan.js.map +1 -0
- package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js +2 -0
- package/lib/commonjs/screens/{detail-loan/DetailLoanTima.js.flow → detail-loan-tima/PaymentSchedule.js.flow} +107 -118
- package/lib/commonjs/screens/detail-loan-tima/PaymentSchedule.js.map +1 -0
- package/lib/commonjs/screens/detail-loan-tima/index.js +2 -0
- package/lib/commonjs/screens/detail-loan-tima/index.js.flow +109 -0
- package/lib/commonjs/screens/detail-loan-tima/index.js.map +1 -0
- package/lib/commonjs/screens/home/DigitalTopupItem.js +1 -1
- package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +2 -2
- 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 +2 -2
- package/lib/commonjs/services/api/api.js +1 -1
- package/lib/commonjs/services/api/api.js.flow +33 -7
- package/lib/commonjs/services/api/api.js.map +1 -1
- package/lib/module/assets/svgs/question.svg +1 -7
- package/lib/module/components/ItemTimaOneV3.js +1 -1
- package/lib/module/components/ItemTimaOneV3.js.map +1 -1
- package/lib/module/components/SkeletonLoanCard.js +1 -1
- package/lib/module/components/SkeletonLoanCard.js.map +1 -1
- 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/ShowQrCode.js +1 -1
- package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/module/screens/detail-loan-tima/InforLoan.js +2 -0
- package/lib/module/screens/detail-loan-tima/InforLoan.js.map +1 -0
- package/lib/module/screens/detail-loan-tima/PaymentSchedule.js +2 -0
- package/lib/module/screens/detail-loan-tima/PaymentSchedule.js.map +1 -0
- package/lib/module/screens/detail-loan-tima/index.js +2 -0
- package/lib/module/screens/detail-loan-tima/index.js.map +1 -0
- 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/services/api/api.js +1 -1
- package/lib/module/services/api/api.js.map +1 -1
- package/lib/typescript/components/SkeletonLoanCard.d.ts +3 -0
- package/lib/typescript/components/SkeletonLoanCard.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan-tima/InforLoan.d.ts +4 -0
- package/lib/typescript/screens/detail-loan-tima/InforLoan.d.ts.map +1 -0
- package/lib/typescript/screens/detail-loan-tima/PaymentSchedule.d.ts +2 -0
- package/lib/typescript/screens/detail-loan-tima/PaymentSchedule.d.ts.map +1 -0
- package/lib/typescript/screens/detail-loan-tima/index.d.ts +2 -0
- package/lib/typescript/screens/detail-loan-tima/index.d.ts.map +1 -0
- package/lib/typescript/services/api/api.d.ts +16 -0
- package/lib/typescript/services/api/api.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/svgs/question.svg +1 -7
- package/src/components/ItemTimaOneV3.tsx +29 -29
- package/src/components/SkeletonLoanCard.tsx +58 -0
- package/src/navigation/primary-navigator.tsx +1 -1
- package/src/screens/detail-loan/ShowQrCode.tsx +15 -4
- package/src/screens/detail-loan-tima/InforLoan.tsx +241 -0
- package/src/screens/{detail-loan/DetailLoanTima.tsx → detail-loan-tima/PaymentSchedule.tsx} +107 -118
- package/src/screens/detail-loan-tima/index.tsx +109 -0
- package/src/screens/home/DigitalTopupItem.tsx +2 -2
- package/src/screens/home/ItemMotoBikeLoan.tsx +2 -2
- package/src/services/api/api.ts +33 -7
- package/lib/commonjs/screens/detail-loan/DetailLoanTima.js +0 -2
- package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.map +0 -1
- package/lib/module/screens/detail-loan/DetailLoanTima.js +0 -2
- package/lib/module/screens/detail-loan/DetailLoanTima.js.map +0 -1
- package/lib/typescript/screens/detail-loan/DetailLoanTima.d.ts +0 -2
- package/lib/typescript/screens/detail-loan/DetailLoanTima.d.ts.map +0 -1
|
@@ -15,11 +15,15 @@ import { formatDDMMYYY, formatMoney } from '../../utils';
|
|
|
15
15
|
import { Api } from '../../services/api';
|
|
16
16
|
import { color } from '../../theme';
|
|
17
17
|
import { commonStyles } from '../CommonStyles';
|
|
18
|
-
import
|
|
18
|
+
import { SkeletonPaymentScheduleList } from '../../components/SkeletonLoanCard';
|
|
19
19
|
import MHeader from '../../components/MHeader';
|
|
20
20
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
21
21
|
|
|
22
|
-
export const
|
|
22
|
+
export const PaymentSchedule = observer(function PaymentSchedule({
|
|
23
|
+
id,
|
|
24
|
+
}: {
|
|
25
|
+
id: number;
|
|
26
|
+
}) {
|
|
23
27
|
const insets = useSafeAreaInsets();
|
|
24
28
|
const navigation = useNavigation();
|
|
25
29
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -29,7 +33,7 @@ export const DetailLoanTima = observer(function DetailLoanTima(props: any) {
|
|
|
29
33
|
const getData = async () => {
|
|
30
34
|
setIsLoading(true);
|
|
31
35
|
Api.getInstance()
|
|
32
|
-
.getPaymentScheduleTima(
|
|
36
|
+
.getPaymentScheduleTima(id)
|
|
33
37
|
.then((response) => {
|
|
34
38
|
setIsLoading(false);
|
|
35
39
|
if (response.kind === 'ok') {
|
|
@@ -51,9 +55,7 @@ export const DetailLoanTima = observer(function DetailLoanTima(props: any) {
|
|
|
51
55
|
const getMoneyCloseLoan = async () => {
|
|
52
56
|
try {
|
|
53
57
|
setIsLoading(true);
|
|
54
|
-
const response = await Api.getInstance().getMoneyCloseLoan(
|
|
55
|
-
props.route?.params?.loan?.id
|
|
56
|
-
);
|
|
58
|
+
const response = await Api.getInstance().getMoneyCloseLoan(id);
|
|
57
59
|
if (response.kind === 'ok' && response.data.meta.errorCode === 200) {
|
|
58
60
|
setMoneyCloseLoan(response.data?.data?.totalMoneyCloseLoan);
|
|
59
61
|
} else {
|
|
@@ -71,25 +73,7 @@ export const DetailLoanTima = observer(function DetailLoanTima(props: any) {
|
|
|
71
73
|
|
|
72
74
|
return (
|
|
73
75
|
<View style={{ flex: 1, backgroundColor: '#FDFDFD' }}>
|
|
74
|
-
<MHeader title={`Vay trực tuyến 24/7`} />
|
|
75
76
|
<View style={{ flex: 1 }}>
|
|
76
|
-
<View style={$header}>
|
|
77
|
-
<TouchableOpacity
|
|
78
|
-
style={$backButton}
|
|
79
|
-
onPress={() => navigation.goBack()}
|
|
80
|
-
>
|
|
81
|
-
<IconBack />
|
|
82
|
-
</TouchableOpacity>
|
|
83
|
-
<MText
|
|
84
|
-
style={{
|
|
85
|
-
fontSize: 16,
|
|
86
|
-
fontWeight: '600',
|
|
87
|
-
fontFamily: 'BeVietnamPro-SemiBold',
|
|
88
|
-
}}
|
|
89
|
-
>
|
|
90
|
-
HD-{props.route?.params?.loan?.id}
|
|
91
|
-
</MText>
|
|
92
|
-
</View>
|
|
93
77
|
<View
|
|
94
78
|
style={{
|
|
95
79
|
backgroundColor: '#ECFFE8',
|
|
@@ -98,6 +82,7 @@ export const DetailLoanTima = observer(function DetailLoanTima(props: any) {
|
|
|
98
82
|
paddingHorizontal: 16,
|
|
99
83
|
paddingVertical: 8,
|
|
100
84
|
justifyContent: 'space-between',
|
|
85
|
+
marginTop: 16,
|
|
101
86
|
}}
|
|
102
87
|
>
|
|
103
88
|
<MText
|
|
@@ -122,7 +107,8 @@ export const DetailLoanTima = observer(function DetailLoanTima(props: any) {
|
|
|
122
107
|
flexDirection: 'row',
|
|
123
108
|
alignItems: 'center',
|
|
124
109
|
paddingHorizontal: 16,
|
|
125
|
-
|
|
110
|
+
backgroundColor: '#FFF3E9',
|
|
111
|
+
paddingVertical: 16,
|
|
126
112
|
}}
|
|
127
113
|
>
|
|
128
114
|
<MText
|
|
@@ -147,118 +133,121 @@ export const DetailLoanTima = observer(function DetailLoanTima(props: any) {
|
|
|
147
133
|
Số tiền thanh toán
|
|
148
134
|
</MText>
|
|
149
135
|
</View>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
flexDirection: 'row',
|
|
156
|
-
paddingVertical: 16,
|
|
157
|
-
borderBottomWidth: 1,
|
|
158
|
-
borderColor: color.border,
|
|
159
|
-
}}
|
|
160
|
-
>
|
|
161
|
-
<MText
|
|
162
|
-
style={[
|
|
163
|
-
{
|
|
164
|
-
width: '35%',
|
|
165
|
-
},
|
|
166
|
-
]}
|
|
167
|
-
>
|
|
168
|
-
{item?.daysPayable ? formatDDMMYYY(item?.daysPayable) : ''}
|
|
169
|
-
</MText>
|
|
136
|
+
{isLoading && !data ? (
|
|
137
|
+
<SkeletonPaymentScheduleList />
|
|
138
|
+
) : (
|
|
139
|
+
<ScrollView style={{ flex: 1, paddingHorizontal: 16 }}>
|
|
140
|
+
{data?.paymentSchedule?.map((item, index) => (
|
|
170
141
|
<View
|
|
142
|
+
key={index}
|
|
171
143
|
style={{
|
|
172
|
-
|
|
173
|
-
|
|
144
|
+
flexDirection: 'row',
|
|
145
|
+
paddingVertical: 16,
|
|
146
|
+
borderBottomWidth: 1,
|
|
147
|
+
borderColor: color.border,
|
|
174
148
|
}}
|
|
175
149
|
>
|
|
176
|
-
<MText>{formatMoney(item?.payMoney)} VNĐ</MText>
|
|
177
150
|
<MText
|
|
178
151
|
style={[
|
|
179
152
|
{
|
|
180
|
-
|
|
181
|
-
marginTop: 4,
|
|
182
|
-
fontSize: 12,
|
|
153
|
+
width: '35%',
|
|
183
154
|
},
|
|
184
155
|
]}
|
|
185
156
|
>
|
|
186
|
-
{
|
|
157
|
+
{item?.daysPayable ? formatDDMMYYY(item?.daysPayable) : ''}
|
|
187
158
|
</MText>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
alignItems: 'center',
|
|
204
|
-
justifyContent: 'center',
|
|
205
|
-
borderWidth: 1,
|
|
206
|
-
borderColor: !item?.done ? color.primary : '#333333',
|
|
207
|
-
}}
|
|
208
|
-
onPress={() =>
|
|
209
|
-
navigation.navigate('ShowQrCode', {
|
|
210
|
-
item,
|
|
211
|
-
data,
|
|
212
|
-
id: props.route?.params?.loan?.id,
|
|
213
|
-
})
|
|
214
|
-
}
|
|
159
|
+
<View
|
|
160
|
+
style={{
|
|
161
|
+
width: '40%',
|
|
162
|
+
alignItems: 'center',
|
|
163
|
+
}}
|
|
164
|
+
>
|
|
165
|
+
<MText>{formatMoney(item?.payMoney)} đ</MText>
|
|
166
|
+
<MText
|
|
167
|
+
style={[
|
|
168
|
+
{
|
|
169
|
+
color: !item?.done ? '#EB5757' : '#27AE60',
|
|
170
|
+
marginTop: 4,
|
|
171
|
+
fontSize: 12,
|
|
172
|
+
},
|
|
173
|
+
]}
|
|
215
174
|
>
|
|
216
|
-
|
|
175
|
+
{!item?.done ? 'Chưa thanh toán' : 'Đã thanh toán'}
|
|
176
|
+
</MText>
|
|
177
|
+
</View>
|
|
178
|
+
|
|
179
|
+
<View
|
|
180
|
+
style={{
|
|
181
|
+
flexDirection: 'row',
|
|
182
|
+
justifyContent: 'flex-end',
|
|
183
|
+
}}
|
|
184
|
+
>
|
|
185
|
+
{!item?.done && (
|
|
186
|
+
<TouchableOpacity
|
|
187
|
+
disabled={item?.done}
|
|
217
188
|
style={{
|
|
218
|
-
|
|
219
|
-
|
|
189
|
+
borderRadius: 24,
|
|
190
|
+
height: 30,
|
|
191
|
+
paddingHorizontal: 8,
|
|
192
|
+
alignItems: 'center',
|
|
193
|
+
justifyContent: 'center',
|
|
194
|
+
borderWidth: 1,
|
|
195
|
+
borderColor: !item?.done ? color.primary : '#333333',
|
|
220
196
|
}}
|
|
197
|
+
onPress={() =>
|
|
198
|
+
navigation.navigate('ShowQrCode', {
|
|
199
|
+
item,
|
|
200
|
+
data,
|
|
201
|
+
id: id,
|
|
202
|
+
})
|
|
203
|
+
}
|
|
221
204
|
>
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
205
|
+
<MText
|
|
206
|
+
style={{
|
|
207
|
+
color: !item?.done ? color.primary : '#333333',
|
|
208
|
+
fontSize: 12,
|
|
209
|
+
}}
|
|
210
|
+
>
|
|
211
|
+
Thanh toán
|
|
212
|
+
</MText>
|
|
213
|
+
</TouchableOpacity>
|
|
214
|
+
)}
|
|
215
|
+
</View>
|
|
226
216
|
</View>
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
style={{
|
|
239
|
-
backgroundColor: '#FFEAD8',
|
|
240
|
-
marginTop: 24,
|
|
241
|
-
borderRadius: 24,
|
|
242
|
-
height: 40,
|
|
243
|
-
alignItems: 'center',
|
|
244
|
-
justifyContent: 'center',
|
|
245
|
-
borderWidth: 1,
|
|
246
|
-
borderColor: '#F05123',
|
|
247
|
-
marginBottom: insets.bottom + 24,
|
|
248
|
-
}}
|
|
249
|
-
>
|
|
250
|
-
<MText
|
|
217
|
+
))}
|
|
218
|
+
<TouchableOpacity
|
|
219
|
+
onPress={() =>
|
|
220
|
+
navigation.navigate('ShowQrCode', {
|
|
221
|
+
data,
|
|
222
|
+
id: id,
|
|
223
|
+
isFullPayment: true,
|
|
224
|
+
totalMoney: moneyCloseLoan,
|
|
225
|
+
})
|
|
226
|
+
}
|
|
251
227
|
style={{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
228
|
+
backgroundColor: '#FFEAD8',
|
|
229
|
+
marginTop: 24,
|
|
230
|
+
borderRadius: 24,
|
|
231
|
+
height: 40,
|
|
232
|
+
alignItems: 'center',
|
|
233
|
+
justifyContent: 'center',
|
|
234
|
+
borderWidth: 1,
|
|
235
|
+
borderColor: '#F05123',
|
|
236
|
+
marginBottom: insets.bottom + 24,
|
|
255
237
|
}}
|
|
256
238
|
>
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
239
|
+
<MText
|
|
240
|
+
style={{
|
|
241
|
+
color: '#F05123',
|
|
242
|
+
fontWeight: '500',
|
|
243
|
+
fontFamily: 'BeVietnamPro-Medium',
|
|
244
|
+
}}
|
|
245
|
+
>
|
|
246
|
+
Xem thông tin tất toán
|
|
247
|
+
</MText>
|
|
248
|
+
</TouchableOpacity>
|
|
249
|
+
</ScrollView>
|
|
250
|
+
)}
|
|
262
251
|
</View>
|
|
263
252
|
</View>
|
|
264
253
|
);
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { observer } from 'mobx-react-lite';
|
|
4
|
+
import { TouchableOpacity, View, ViewStyle } from 'react-native';
|
|
5
|
+
import MHeader from '../../components/MHeader';
|
|
6
|
+
import { IconBack } from '../../assets/icons';
|
|
7
|
+
import { MText } from '../../components/MText';
|
|
8
|
+
import InforLoan from './InforLoan';
|
|
9
|
+
import { PaymentSchedule } from './PaymentSchedule';
|
|
10
|
+
import { useNavigation } from '@react-navigation/native';
|
|
11
|
+
|
|
12
|
+
export const DetailLoanTima = observer(function DetailLoanTima(props: any) {
|
|
13
|
+
const navigation = useNavigation();
|
|
14
|
+
const [tab, setTab] = useState(1);
|
|
15
|
+
return (
|
|
16
|
+
<View style={{ flex: 1, backgroundColor: '#FFFFFF' }}>
|
|
17
|
+
<MHeader title={`Vay Online 24/7`} />
|
|
18
|
+
<View style={$header}>
|
|
19
|
+
<TouchableOpacity
|
|
20
|
+
style={$backButton}
|
|
21
|
+
onPress={() => navigation.goBack()}
|
|
22
|
+
>
|
|
23
|
+
<IconBack />
|
|
24
|
+
</TouchableOpacity>
|
|
25
|
+
<MText
|
|
26
|
+
style={{
|
|
27
|
+
fontSize: 16,
|
|
28
|
+
fontWeight: '600',
|
|
29
|
+
fontFamily: 'BeVietnamPro-SemiBold',
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
HD-{props.route?.params?.loan?.id}
|
|
33
|
+
</MText>
|
|
34
|
+
</View>
|
|
35
|
+
<View
|
|
36
|
+
style={{
|
|
37
|
+
flexDirection: 'row',
|
|
38
|
+
backgroundColor: '#F2F2F2',
|
|
39
|
+
borderRadius: 30,
|
|
40
|
+
marginHorizontal: 16,
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
<TouchableOpacity onPress={() => setTab(1)} style={{ flex: 1 }}>
|
|
44
|
+
<View
|
|
45
|
+
style={{
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
borderRadius: 30,
|
|
48
|
+
paddingVertical: 10,
|
|
49
|
+
borderWidth: 1,
|
|
50
|
+
borderColor: tab === 1 ? '#EF4123' : '#F2F2F2',
|
|
51
|
+
backgroundColor: tab === 1 ? '#FFFFFF' : '#F2F2F2',
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<MText
|
|
55
|
+
style={{
|
|
56
|
+
color: tab === 1 ? '#EF4123' : '#333333',
|
|
57
|
+
fontWeight: tab === 1 ? 'bold' : '400',
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
60
|
+
Thông tin đơn
|
|
61
|
+
</MText>
|
|
62
|
+
</View>
|
|
63
|
+
</TouchableOpacity>
|
|
64
|
+
<TouchableOpacity
|
|
65
|
+
onPress={() => setTab(2)}
|
|
66
|
+
style={{
|
|
67
|
+
flex: 1,
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
<View
|
|
71
|
+
style={{
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
borderRadius: 30,
|
|
74
|
+
paddingVertical: 10,
|
|
75
|
+
borderWidth: 1,
|
|
76
|
+
borderColor: tab === 2 ? '#EF4123' : '#F2F2F2',
|
|
77
|
+
backgroundColor: tab === 2 ? '#FFFFFF' : '#F2F2F2',
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
<MText
|
|
81
|
+
style={{
|
|
82
|
+
color: tab === 2 ? '#EF4123' : '#333333',
|
|
83
|
+
fontWeight: tab === 2 ? 'bold' : '400',
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
Lịch thanh toán
|
|
87
|
+
</MText>
|
|
88
|
+
</View>
|
|
89
|
+
</TouchableOpacity>
|
|
90
|
+
</View>
|
|
91
|
+
{tab === 1 ? (
|
|
92
|
+
<InforLoan id={props.route?.params?.loan?.id} />
|
|
93
|
+
) : (
|
|
94
|
+
<PaymentSchedule id={props.route?.params?.loan?.id} />
|
|
95
|
+
)}
|
|
96
|
+
</View>
|
|
97
|
+
);
|
|
98
|
+
});
|
|
99
|
+
const $backButton: ViewStyle = {
|
|
100
|
+
position: 'absolute',
|
|
101
|
+
left: 16,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const $header: ViewStyle = {
|
|
105
|
+
flexDirection: 'row',
|
|
106
|
+
alignItems: 'center',
|
|
107
|
+
paddingVertical: 16,
|
|
108
|
+
justifyContent: 'center',
|
|
109
|
+
};
|
|
@@ -305,7 +305,7 @@ export default function DigitalTopupItem({
|
|
|
305
305
|
{item?.step !== 11 ? (
|
|
306
306
|
<View
|
|
307
307
|
style={{
|
|
308
|
-
backgroundColor: '#
|
|
308
|
+
backgroundColor: '#EEF7FF',
|
|
309
309
|
flexDirection: 'row',
|
|
310
310
|
alignItems: 'center',
|
|
311
311
|
gap: 4,
|
|
@@ -328,7 +328,7 @@ export default function DigitalTopupItem({
|
|
|
328
328
|
<MText
|
|
329
329
|
style={{
|
|
330
330
|
fontSize: 10,
|
|
331
|
-
color:
|
|
331
|
+
color: '#2F80ED',
|
|
332
332
|
textDecorationLine: 'underline',
|
|
333
333
|
}}
|
|
334
334
|
>
|
|
@@ -292,7 +292,7 @@ export default function ItemMotoBikeLoan({
|
|
|
292
292
|
|
|
293
293
|
<View
|
|
294
294
|
style={{
|
|
295
|
-
backgroundColor: '#
|
|
295
|
+
backgroundColor: '#EEF7FF',
|
|
296
296
|
flexDirection: 'row',
|
|
297
297
|
alignItems: 'center',
|
|
298
298
|
gap: 4,
|
|
@@ -314,7 +314,7 @@ export default function ItemMotoBikeLoan({
|
|
|
314
314
|
<MText
|
|
315
315
|
style={{
|
|
316
316
|
fontSize: 10,
|
|
317
|
-
color: '#
|
|
317
|
+
color: '#2F80ED',
|
|
318
318
|
textDecorationLine: 'underline',
|
|
319
319
|
}}
|
|
320
320
|
>
|
package/src/services/api/api.ts
CHANGED
|
@@ -124,10 +124,15 @@ export class Api {
|
|
|
124
124
|
text: 'Đồng ý',
|
|
125
125
|
onPress: () => {
|
|
126
126
|
try {
|
|
127
|
-
if (
|
|
127
|
+
if (
|
|
128
|
+
this.config.logout &&
|
|
129
|
+
typeof this.config.logout === 'function'
|
|
130
|
+
) {
|
|
128
131
|
this.config.logout();
|
|
129
132
|
} else {
|
|
130
|
-
myLog(
|
|
133
|
+
myLog(
|
|
134
|
+
'[API] Warning: logout function not configured in SDKConfig'
|
|
135
|
+
);
|
|
131
136
|
}
|
|
132
137
|
} catch (error) {
|
|
133
138
|
myLog('[API] Error during logout:', error);
|
|
@@ -222,14 +227,14 @@ export class Api {
|
|
|
222
227
|
// Seed current state, then listen for changes.
|
|
223
228
|
netInfo
|
|
224
229
|
.fetch()
|
|
225
|
-
.then(state => {
|
|
230
|
+
.then((state) => {
|
|
226
231
|
this.isConnected = state.isConnected !== false;
|
|
227
232
|
})
|
|
228
233
|
.catch(() => {
|
|
229
234
|
this.isConnected = true;
|
|
230
235
|
});
|
|
231
236
|
|
|
232
|
-
this.netInfoUnsubscribe = netInfo.addEventListener(state => {
|
|
237
|
+
this.netInfoUnsubscribe = netInfo.addEventListener((state) => {
|
|
233
238
|
this.isConnected = state.isConnected !== false;
|
|
234
239
|
});
|
|
235
240
|
}
|
|
@@ -241,7 +246,10 @@ export class Api {
|
|
|
241
246
|
* 2. Shortens the timeout for idempotent GETs on the main instance so reads
|
|
242
247
|
* fail fast and hand off to the retry interceptor.
|
|
243
248
|
*/
|
|
244
|
-
private attachRequestGuards(
|
|
249
|
+
private attachRequestGuards(
|
|
250
|
+
instance: ApisauceInstance,
|
|
251
|
+
splitGetTimeout: boolean
|
|
252
|
+
) {
|
|
245
253
|
const getTimeout = this.config.getTimeout || DEFAULT_GET_TIMEOUT;
|
|
246
254
|
|
|
247
255
|
instance.axiosInstance.interceptors.request.use((config: any) => {
|
|
@@ -276,7 +284,7 @@ export class Api {
|
|
|
276
284
|
*/
|
|
277
285
|
private attachRetryInterceptor(instance: ApisauceInstance) {
|
|
278
286
|
instance.axiosInstance.interceptors.response.use(
|
|
279
|
-
response => response,
|
|
287
|
+
(response) => response,
|
|
280
288
|
async (error: any) => {
|
|
281
289
|
const config = error?.config;
|
|
282
290
|
|
|
@@ -305,7 +313,7 @@ export class Api {
|
|
|
305
313
|
`[API] Retry ${config.__retryCount}/${MAX_RETRIES} in ${delay}ms: ${config.url}`
|
|
306
314
|
);
|
|
307
315
|
|
|
308
|
-
await new Promise(resolve => setTimeout(resolve, delay));
|
|
316
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
309
317
|
return instance.axiosInstance(config);
|
|
310
318
|
}
|
|
311
319
|
);
|
|
@@ -4161,4 +4169,22 @@ export class Api {
|
|
|
4161
4169
|
return { kind: 'bad-data' };
|
|
4162
4170
|
}
|
|
4163
4171
|
}
|
|
4172
|
+
|
|
4173
|
+
async get_detail_loan_tima(id) {
|
|
4174
|
+
// make the api call
|
|
4175
|
+
const response: ApiResponse<any> = await this.apisauce.get(
|
|
4176
|
+
`api/v2.0/loanbrief/get_loan_detail_tima?loanBriefId=${id}`
|
|
4177
|
+
);
|
|
4178
|
+
// the typical ways to die when calling an api
|
|
4179
|
+
if (!response.ok) {
|
|
4180
|
+
const problem = getGeneralApiProblem(response);
|
|
4181
|
+
if (problem) return problem;
|
|
4182
|
+
}
|
|
4183
|
+
// transform the data into the format we are expecting
|
|
4184
|
+
try {
|
|
4185
|
+
return { kind: 'ok', data: response.data };
|
|
4186
|
+
} catch {
|
|
4187
|
+
return { kind: 'bad-data' };
|
|
4188
|
+
}
|
|
4189
|
+
}
|
|
4164
4190
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.DetailLoanTima=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _mobxReactLite=require("mobx-react-lite");var _native=require("@react-navigation/native");var _reactNative=require("react-native");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _utils=require("../../utils");var _api=require("../../services/api");var _theme=require("../../theme");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/detail-loan/DetailLoanTima.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 DetailLoanTima=exports.DetailLoanTima=(0,_mobxReactLite.observer)(function DetailLoanTima(props){var _props$route3,_props$route3$params,_props$route3$params$,_data$paymentSchedule,_this=this;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isLoading=_useState2[0],setIsLoading=_useState2[1];var _useState3=(0,_react.useState)(),_useState4=(0,_slicedToArray2.default)(_useState3,2),data=_useState4[0],setData=_useState4[1];var _useState5=(0,_react.useState)(0),_useState6=(0,_slicedToArray2.default)(_useState5,2),moneyCloseLoan=_useState6[0],setMoneyCloseLoan=_useState6[1];var getData=function _callee(){var _props$route,_props$route$params,_props$route$params$l;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:setIsLoading(true);_api.Api.getInstance().getPaymentScheduleTima((_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:(_props$route$params$l=_props$route$params.loan)==null?void 0:_props$route$params$l.id).then(function(response){setIsLoading(false);if(response.kind==='ok'){if(response.data.meta.errorCode===200){var _response$data;setData((_response$data=response.data)==null?void 0:_response$data.data);}else{var _response$data2,_response$data2$meta;_reactNative.Alert.alert('Thông báo',response==null?void 0:(_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}}).catch(function(err){setIsLoading(false);_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');});case 1:case"end":return _context.stop();}},null,null,null,Promise);};var getMoneyCloseLoan=function _callee2(){var _props$route2,_props$route2$params,_props$route2$params$,response,_response$data3,_response$data3$data,_t;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;setIsLoading(true);_context2.next=1;return _regenerator.default.awrap(_api.Api.getInstance().getMoneyCloseLoan((_props$route2=props.route)==null?void 0:(_props$route2$params=_props$route2.params)==null?void 0:(_props$route2$params$=_props$route2$params.loan)==null?void 0:_props$route2$params$.id));case 1:response=_context2.sent;if(response.kind==='ok'&&response.data.meta.errorCode===200){setMoneyCloseLoan((_response$data3=response.data)==null?void 0:(_response$data3$data=_response$data3.data)==null?void 0:_response$data3$data.totalMoneyCloseLoan);}else{}_context2.next=3;break;case 2:_context2.prev=2;_t=_context2["catch"](0);case 3:_context2.prev=3;setIsLoading(false);return _context2.finish(3);case 4:case"end":return _context2.stop();}},null,null,[[0,2,3,4]],Promise);};(0,_react.useEffect)(function(){getData();getMoneyCloseLoan();},[]);return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'#FDFDFD'},__self:this,__source:{fileName:_jsxFileName,lineNumber:73,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"Vay tr\u1EF1c tuy\u1EBFn 24/7",__self:this,__source:{fileName:_jsxFileName,lineNumber:74,columnNumber:7}}),_react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:$header,__self:this,__source:{fileName:_jsxFileName,lineNumber:76,columnNumber:9}},_react.default.createElement(_reactNative.TouchableOpacity,{style:$backButton,onPress:function onPress(){return navigation.goBack();},__self:this,__source:{fileName:_jsxFileName,lineNumber:77,columnNumber:11}},_react.default.createElement(_icons.IconBack,{__self:this,__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:13}})),_react.default.createElement(_MText.MText,{style:{fontSize:16,fontWeight:'600',fontFamily:'BeVietnamPro-SemiBold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:83,columnNumber:11}},"HD-",(_props$route3=props.route)==null?void 0:(_props$route3$params=_props$route3.params)==null?void 0:(_props$route3$params$=_props$route3$params.loan)==null?void 0:_props$route3$params$.id)),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#ECFFE8',flexDirection:'row',alignItems:'center',paddingHorizontal:16,paddingVertical:8,justifyContent:'space-between'},__self:this,__source:{fileName:_jsxFileName,lineNumber:93,columnNumber:9}},_react.default.createElement(_MText.MText,{style:{fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:103,columnNumber:11}},"M\xE3 H\u0110 gi\u1EA3i ng\xE2n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,fontWeight:'600',fontFamily:'BeVietnamPro-SemiBold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:110,columnNumber:11}},"TC-",data==null?void 0:data.codeId)),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',paddingHorizontal:16,marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:120,columnNumber:9}},_react.default.createElement(_MText.MText,{style:{color:'black',fontWeight:'600',width:'35%',fontFamily:'BeVietnamPro-SemiBold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:128,columnNumber:11}},"Ng\xE0y thanh to\xE1n"),_react.default.createElement(_MText.MText,{style:{color:'black',fontWeight:'600',width:'40%',textAlign:'center',fontFamily:'BeVietnamPro-SemiBold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:138,columnNumber:11}},"S\u1ED1 ti\u1EC1n thanh to\xE1n")),_react.default.createElement(_reactNative.ScrollView,{style:{flex:1,paddingHorizontal:16,marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:150,columnNumber:9}},data==null?void 0:(_data$paymentSchedule=data.paymentSchedule)==null?void 0:_data$paymentSchedule.map(function(item,index){return _react.default.createElement(_reactNative.View,{key:index,style:{flexDirection:'row',paddingVertical:16,borderBottomWidth:1,borderColor:_theme.color.border},__self:_this,__source:{fileName:_jsxFileName,lineNumber:152,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[{width:'35%'}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:161,columnNumber:15}},item!=null&&item.daysPayable?(0,_utils.formatDDMMYYY)(item==null?void 0:item.daysPayable):''),_react.default.createElement(_reactNative.View,{style:{width:'40%',alignItems:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:170,columnNumber:15}},_react.default.createElement(_MText.MText,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:176,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.payMoney)," VN\u0110"),_react.default.createElement(_MText.MText,{style:[{color:!(item!=null&&item.done)?'#F05123':'#27AE60',marginTop:4,fontSize:12}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:177,columnNumber:17}},!(item!=null&&item.done)?'Chưa thanh toán':'Đã thanh toán')),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'flex-end'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:190,columnNumber:15}},!(item!=null&&item.done)&&_react.default.createElement(_reactNative.TouchableOpacity,{disabled:item==null?void 0:item.done,style:{borderRadius:8,height:30,paddingHorizontal:8,alignItems:'center',justifyContent:'center',borderWidth:1,borderColor:!(item!=null&&item.done)?_theme.color.primary:'#333333'},onPress:function onPress(){var _props$route4,_props$route4$params,_props$route4$params$;return navigation.navigate('ShowQrCode',{item:item,data:data,id:(_props$route4=props.route)==null?void 0:(_props$route4$params=_props$route4.params)==null?void 0:(_props$route4$params$=_props$route4$params.loan)==null?void 0:_props$route4$params$.id});},__self:_this,__source:{fileName:_jsxFileName,lineNumber:197,columnNumber:19}},_react.default.createElement(_MText.MText,{style:{color:!(item!=null&&item.done)?_theme.color.primary:'#333333',fontSize:12},__self:_this,__source:{fileName:_jsxFileName,lineNumber:216,columnNumber:21}},"Thanh to\xE1n"))));}),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){var _props$route5,_props$route5$params,_props$route5$params$;return navigation.navigate('ShowQrCode',{data:data,id:(_props$route5=props.route)==null?void 0:(_props$route5$params=_props$route5.params)==null?void 0:(_props$route5$params$=_props$route5$params.loan)==null?void 0:_props$route5$params$.id,isFullPayment:true,totalMoney:moneyCloseLoan});},style:{backgroundColor:'#FFEAD8',marginTop:24,borderRadius:24,height:40,alignItems:'center',justifyContent:'center',borderWidth:1,borderColor:'#F05123',marginBottom:insets.bottom+24},__self:this,__source:{fileName:_jsxFileName,lineNumber:229,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{color:'#F05123',fontWeight:'500',fontFamily:'BeVietnamPro-Medium'},__self:this,__source:{fileName:_jsxFileName,lineNumber:250,columnNumber:13}},"Xem th\xF4ng tin t\u1EA5t to\xE1n"))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:261,columnNumber:9}})));});var $backButton={position:'absolute',left:16};var $header={flexDirection:'row',alignItems:'center',paddingVertical:16,justifyContent:'center'};
|
|
2
|
-
//# sourceMappingURL=DetailLoanTima.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_mobxReactLite","_native","_reactNative","_icons","_MText","_utils","_api","_theme","_Loading","_interopRequireDefault","_MHeader","_reactNativeSafeAreaContext","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DetailLoanTima","exports","observer","props","_props$route3","_props$route3$params","_props$route3$params$","_data$paymentSchedule","_this","insets","useSafeAreaInsets","navigation","useNavigation","_useState","useState","_useState2","_slicedToArray2","isLoading","setIsLoading","_useState3","_useState4","data","setData","_useState5","_useState6","moneyCloseLoan","setMoneyCloseLoan","getData","_callee","_props$route","_props$route$params","_props$route$params$l","_regenerator","async","_context","prev","next","Api","getInstance","getPaymentScheduleTima","route","params","loan","id","then","response","kind","meta","errorCode","_response$data","_response$data2","_response$data2$meta","Alert","alert","errorMessage","catch","err","stop","Promise","getMoneyCloseLoan","_callee2","_props$route2","_props$route2$params","_props$route2$params$","_response$data3","_response$data3$data","_t","_context2","awrap","sent","totalMoneyCloseLoan","finish","useEffect","createElement","View","style","flex","backgroundColor","__self","__source","fileName","lineNumber","columnNumber","title","$header","TouchableOpacity","$backButton","onPress","goBack","IconBack","MText","fontSize","fontWeight","fontFamily","flexDirection","alignItems","paddingHorizontal","paddingVertical","justifyContent","codeId","marginTop","color","width","textAlign","ScrollView","paymentSchedule","map","item","index","key","borderBottomWidth","borderColor","border","daysPayable","formatDDMMYYY","formatMoney","payMoney","done","disabled","borderRadius","height","borderWidth","primary","_props$route4","_props$route4$params","_props$route4$params$","navigate","_props$route5","_props$route5$params","_props$route5$params$","isFullPayment","totalMoney","marginBottom","bottom","position","left"],"sourceRoot":"../../../../src","sources":["screens/detail-loan/DetailLoanTima.tsx"],"mappings":"qVACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,cAAA,CAAAD,OAAA,oBACA,IAAAE,OAAA,CAAAF,OAAA,6BACA,IAAAG,YAAA,CAAAH,OAAA,iBAOA,IAAAI,MAAA,CAAAJ,OAAA,uBACA,IAAAK,MAAA,CAAAL,OAAA,2BACA,IAAAM,MAAA,CAAAN,OAAA,gBACA,IAAAO,IAAA,CAAAP,OAAA,uBACA,IAAAQ,MAAA,CAAAR,OAAA,gBAEA,IAAAS,QAAA,CAAAC,sBAAA,C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CAAAuH,KAAK,EACJf,KAAK,CAAE,CACL0B,KAAK,CAAE,SAAS,CAChBT,UAAU,CAAE,KAAK,CACjBC,UAAU,CAAE,qBACd,CAAE,CAAAf,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAArG,YAAA,CAAAsG,UAAA,KAAAC,YAAA,MACH,mCAEM,CACS,CACR,CAAC,CACbtH,MAAA,CAAA0B,OAAA,CAAAmF,aAAA,CAAClG,QAAA,CAAAe,OAAO,EAAC2B,SAAS,CAAEA,SAAU,CAAA6D,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAArG,YAAA,CAAAsG,UAAA,KAAAC,YAAA,IAAE,CAC5B,CACF,CAAC,CAEX,CAAC,CAAC,CACF,GAAM,CAAAI,WAAsB,CAAG,CAC7BgD,QAAQ,CAAE,UAAU,CACpBC,IAAI,CAAE,EACR,CAAC,CAED,GAAM,CAAAnD,OAAkB,CAAG,CACzBU,aAAa,CAAE,KAAK,CACpBC,UAAU,CAAE,QAAQ,CACpBE,eAAe,CAAE,EAAE,CACnBC,cAAc,CAAE,QAClB,CAAC","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.DetailLoanTima=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _mobxReactLite=require("mobx-react-lite");var _native=require("@react-navigation/native");var _reactNative=require("react-native");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _utils=require("../../utils");var _api=require("../../services/api");var _theme=require("../../theme");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/detail-loan/DetailLoanTima.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 DetailLoanTima=exports.DetailLoanTima=(0,_mobxReactLite.observer)(function DetailLoanTima(props){var _props$route3,_props$route3$params,_props$route3$params$,_data$paymentSchedule,_this=this;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isLoading=_useState2[0],setIsLoading=_useState2[1];var _useState3=(0,_react.useState)(),_useState4=(0,_slicedToArray2.default)(_useState3,2),data=_useState4[0],setData=_useState4[1];var _useState5=(0,_react.useState)(0),_useState6=(0,_slicedToArray2.default)(_useState5,2),moneyCloseLoan=_useState6[0],setMoneyCloseLoan=_useState6[1];var getData=function _callee(){var _props$route,_props$route$params,_props$route$params$l;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:setIsLoading(true);_api.Api.getInstance().getPaymentScheduleTima((_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:(_props$route$params$l=_props$route$params.loan)==null?void 0:_props$route$params$l.id).then(function(response){setIsLoading(false);if(response.kind==='ok'){if(response.data.meta.errorCode===200){var _response$data;setData((_response$data=response.data)==null?void 0:_response$data.data);}else{var _response$data2,_response$data2$meta;_reactNative.Alert.alert('Thông báo',response==null?void 0:(_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}}).catch(function(err){setIsLoading(false);_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');});case 1:case"end":return _context.stop();}},null,null,null,Promise);};var getMoneyCloseLoan=function _callee2(){var _props$route2,_props$route2$params,_props$route2$params$,response,_response$data3,_response$data3$data,_t;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;setIsLoading(true);_context2.next=1;return _regenerator.default.awrap(_api.Api.getInstance().getMoneyCloseLoan((_props$route2=props.route)==null?void 0:(_props$route2$params=_props$route2.params)==null?void 0:(_props$route2$params$=_props$route2$params.loan)==null?void 0:_props$route2$params$.id));case 1:response=_context2.sent;if(response.kind==='ok'&&response.data.meta.errorCode===200){setMoneyCloseLoan((_response$data3=response.data)==null?void 0:(_response$data3$data=_response$data3.data)==null?void 0:_response$data3$data.totalMoneyCloseLoan);}else{}_context2.next=3;break;case 2:_context2.prev=2;_t=_context2["catch"](0);case 3:_context2.prev=3;setIsLoading(false);return _context2.finish(3);case 4:case"end":return _context2.stop();}},null,null,[[0,2,3,4]],Promise);};(0,_react.useEffect)(function(){getData();getMoneyCloseLoan();},[]);return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'#FDFDFD'},__self:this,__source:{fileName:_jsxFileName,lineNumber:73,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"Vay tr\u1EF1c tuy\u1EBFn 24/7",__self:this,__source:{fileName:_jsxFileName,lineNumber:74,columnNumber:7}}),_react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:$header,__self:this,__source:{fileName:_jsxFileName,lineNumber:76,columnNumber:9}},_react.default.createElement(_reactNative.TouchableOpacity,{style:$backButton,onPress:function onPress(){return navigation.goBack();},__self:this,__source:{fileName:_jsxFileName,lineNumber:77,columnNumber:11}},_react.default.createElement(_icons.IconBack,{__self:this,__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:13}})),_react.default.createElement(_MText.MText,{style:{fontSize:16,fontWeight:'600',fontFamily:'BeVietnamPro-SemiBold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:83,columnNumber:11}},"HD-",(_props$route3=props.route)==null?void 0:(_props$route3$params=_props$route3.params)==null?void 0:(_props$route3$params$=_props$route3$params.loan)==null?void 0:_props$route3$params$.id)),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#ECFFE8',flexDirection:'row',alignItems:'center',paddingHorizontal:16,paddingVertical:8,justifyContent:'space-between'},__self:this,__source:{fileName:_jsxFileName,lineNumber:93,columnNumber:9}},_react.default.createElement(_MText.MText,{style:{fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:103,columnNumber:11}},"M\xE3 H\u0110 gi\u1EA3i ng\xE2n"),_react.default.createElement(_MText.MText,{style:{fontSize:12,fontWeight:'600',fontFamily:'BeVietnamPro-SemiBold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:110,columnNumber:11}},"TC-",data==null?void 0:data.codeId)),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',paddingHorizontal:16,marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:120,columnNumber:9}},_react.default.createElement(_MText.MText,{style:{color:'black',fontWeight:'600',width:'35%',fontFamily:'BeVietnamPro-SemiBold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:128,columnNumber:11}},"Ng\xE0y thanh to\xE1n"),_react.default.createElement(_MText.MText,{style:{color:'black',fontWeight:'600',width:'40%',textAlign:'center',fontFamily:'BeVietnamPro-SemiBold'},__self:this,__source:{fileName:_jsxFileName,lineNumber:138,columnNumber:11}},"S\u1ED1 ti\u1EC1n thanh to\xE1n")),_react.default.createElement(_reactNative.ScrollView,{style:{flex:1,paddingHorizontal:16,marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:150,columnNumber:9}},data==null?void 0:(_data$paymentSchedule=data.paymentSchedule)==null?void 0:_data$paymentSchedule.map(function(item,index){return _react.default.createElement(_reactNative.View,{key:index,style:{flexDirection:'row',paddingVertical:16,borderBottomWidth:1,borderColor:_theme.color.border},__self:_this,__source:{fileName:_jsxFileName,lineNumber:152,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[{width:'35%'}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:161,columnNumber:15}},item!=null&&item.daysPayable?(0,_utils.formatDDMMYYY)(item==null?void 0:item.daysPayable):''),_react.default.createElement(_reactNative.View,{style:{width:'40%',alignItems:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:170,columnNumber:15}},_react.default.createElement(_MText.MText,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:176,columnNumber:17}},(0,_utils.formatMoney)(item==null?void 0:item.payMoney)," VN\u0110"),_react.default.createElement(_MText.MText,{style:[{color:!(item!=null&&item.done)?'#F05123':'#27AE60',marginTop:4,fontSize:12}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:177,columnNumber:17}},!(item!=null&&item.done)?'Chưa thanh toán':'Đã thanh toán')),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',justifyContent:'flex-end'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:190,columnNumber:15}},!(item!=null&&item.done)&&_react.default.createElement(_reactNative.TouchableOpacity,{disabled:item==null?void 0:item.done,style:{borderRadius:8,height:30,paddingHorizontal:8,alignItems:'center',justifyContent:'center',borderWidth:1,borderColor:!(item!=null&&item.done)?_theme.color.primary:'#333333'},onPress:function onPress(){var _props$route4,_props$route4$params,_props$route4$params$;return navigation.navigate('ShowQrCode',{item:item,data:data,id:(_props$route4=props.route)==null?void 0:(_props$route4$params=_props$route4.params)==null?void 0:(_props$route4$params$=_props$route4$params.loan)==null?void 0:_props$route4$params$.id});},__self:_this,__source:{fileName:_jsxFileName,lineNumber:197,columnNumber:19}},_react.default.createElement(_MText.MText,{style:{color:!(item!=null&&item.done)?_theme.color.primary:'#333333',fontSize:12},__self:_this,__source:{fileName:_jsxFileName,lineNumber:216,columnNumber:21}},"Thanh to\xE1n"))));}),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){var _props$route5,_props$route5$params,_props$route5$params$;return navigation.navigate('ShowQrCode',{data:data,id:(_props$route5=props.route)==null?void 0:(_props$route5$params=_props$route5.params)==null?void 0:(_props$route5$params$=_props$route5$params.loan)==null?void 0:_props$route5$params$.id,isFullPayment:true,totalMoney:moneyCloseLoan});},style:{backgroundColor:'#FFEAD8',marginTop:24,borderRadius:24,height:40,alignItems:'center',justifyContent:'center',borderWidth:1,borderColor:'#F05123',marginBottom:insets.bottom+24},__self:this,__source:{fileName:_jsxFileName,lineNumber:229,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{color:'#F05123',fontWeight:'500',fontFamily:'BeVietnamPro-Medium'},__self:this,__source:{fileName:_jsxFileName,lineNumber:250,columnNumber:13}},"Xem th\xF4ng tin t\u1EA5t to\xE1n"))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:261,columnNumber:9}})));});var $backButton={position:'absolute',left:16};var $header={flexDirection:'row',alignItems:'center',paddingVertical:16,justifyContent:'center'};
|
|
2
|
-
//# sourceMappingURL=DetailLoanTima.js.map
|