react-native-timacare 3.3.18 → 3.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/lib/commonjs/components/MHeader.js +1 -1
  2. package/lib/commonjs/components/MHeader.js.flow +1 -1
  3. package/lib/commonjs/components/keyboardspace/index.js +1 -1
  4. package/lib/commonjs/components/keyboardspace/index.js.flow +0 -2
  5. package/lib/commonjs/components/keyboardspace/index.js.map +1 -1
  6. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js +1 -1
  7. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.flow +145 -35
  8. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.map +1 -1
  9. package/lib/commonjs/screens/detail-loan/Info.js +1 -1
  10. package/lib/commonjs/screens/detail-loan/Info.js.flow +16 -8
  11. package/lib/commonjs/screens/detail-loan/Info.js.map +1 -1
  12. package/lib/commonjs/screens/detail-loan/Payment.js +1 -1
  13. package/lib/commonjs/screens/detail-loan/Payment.js.flow +19 -7
  14. package/lib/commonjs/screens/detail-loan/Payment.js.map +1 -1
  15. package/lib/commonjs/screens/detail-loan/PaymentAll.js +1 -1
  16. package/lib/commonjs/screens/detail-loan/PaymentAll.js.flow +49 -9
  17. package/lib/commonjs/screens/detail-loan/PaymentAll.js.map +1 -1
  18. package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
  19. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.flow +735 -85
  20. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
  21. package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
  22. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +678 -35
  23. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
  24. package/lib/commonjs/screens/detail-loan/index.js +1 -1
  25. package/lib/commonjs/screens/detail-loan/index.js.flow +37 -33
  26. package/lib/commonjs/screens/detail-loan/index.js.map +1 -1
  27. package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js +1 -1
  28. package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js.flow +41 -12
  29. package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
  30. package/lib/commonjs/screens/guide-transfer-bank/index.js +1 -1
  31. package/lib/commonjs/screens/guide-transfer-bank/index.js.flow +228 -237
  32. package/lib/commonjs/screens/guide-transfer-bank/index.js.map +1 -1
  33. package/lib/commonjs/screens/home/Store.js +1 -1
  34. package/lib/commonjs/screens/home/Store.js.flow +4 -1
  35. package/lib/commonjs/screens/home/Store.js.map +1 -1
  36. package/lib/commonjs/screens/home/index.js +1 -1
  37. package/lib/commonjs/screens/home/index.js.flow +15 -30
  38. package/lib/commonjs/screens/home/index.js.map +1 -1
  39. package/lib/commonjs/screens/liveness-v2/index.js +1 -1
  40. package/lib/commonjs/screens/liveness-v2/index.js.flow +4 -4
  41. package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
  42. package/lib/commonjs/services/api/api.js +1 -1
  43. package/lib/commonjs/services/api/api.js.flow +16 -0
  44. package/lib/commonjs/services/api/api.js.map +1 -1
  45. package/lib/module/components/MHeader.js +1 -1
  46. package/lib/module/components/keyboardspace/index.js +1 -1
  47. package/lib/module/components/keyboardspace/index.js.map +1 -1
  48. package/lib/module/screens/detail-loan/DetailLoanTima.js +1 -1
  49. package/lib/module/screens/detail-loan/DetailLoanTima.js.map +1 -1
  50. package/lib/module/screens/detail-loan/Info.js +1 -1
  51. package/lib/module/screens/detail-loan/Info.js.map +1 -1
  52. package/lib/module/screens/detail-loan/Payment.js +1 -1
  53. package/lib/module/screens/detail-loan/Payment.js.map +1 -1
  54. package/lib/module/screens/detail-loan/PaymentAll.js +1 -1
  55. package/lib/module/screens/detail-loan/PaymentAll.js.map +1 -1
  56. package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
  57. package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
  58. package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
  59. package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
  60. package/lib/module/screens/detail-loan/index.js +1 -1
  61. package/lib/module/screens/detail-loan/index.js.map +1 -1
  62. package/lib/module/screens/guide-transfer-bank/TransferDetail.js +1 -1
  63. package/lib/module/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
  64. package/lib/module/screens/guide-transfer-bank/index.js +1 -1
  65. package/lib/module/screens/guide-transfer-bank/index.js.map +1 -1
  66. package/lib/module/screens/home/Store.js +1 -1
  67. package/lib/module/screens/home/Store.js.map +1 -1
  68. package/lib/module/screens/home/index.js +1 -1
  69. package/lib/module/screens/home/index.js.map +1 -1
  70. package/lib/module/screens/liveness-v2/index.js +1 -1
  71. package/lib/module/screens/liveness-v2/index.js.map +1 -1
  72. package/lib/module/services/api/api.js +1 -1
  73. package/lib/module/services/api/api.js.map +1 -1
  74. package/lib/typescript/components/keyboardspace/index.d.ts.map +1 -1
  75. package/lib/typescript/screens/detail-loan/DetailLoanTima.d.ts.map +1 -1
  76. package/lib/typescript/screens/detail-loan/Info.d.ts.map +1 -1
  77. package/lib/typescript/screens/detail-loan/Payment.d.ts.map +1 -1
  78. package/lib/typescript/screens/detail-loan/PaymentAll.d.ts.map +1 -1
  79. package/lib/typescript/screens/detail-loan/PaymentInfo.d.ts.map +1 -1
  80. package/lib/typescript/screens/detail-loan/ShowQrCode.d.ts.map +1 -1
  81. package/lib/typescript/screens/detail-loan/index.d.ts.map +1 -1
  82. package/lib/typescript/screens/guide-transfer-bank/TransferDetail.d.ts.map +1 -1
  83. package/lib/typescript/screens/guide-transfer-bank/index.d.ts.map +1 -1
  84. package/lib/typescript/screens/home/Store.d.ts.map +1 -1
  85. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  86. package/lib/typescript/services/api/api.d.ts +16 -0
  87. package/lib/typescript/services/api/api.d.ts.map +1 -1
  88. package/package.json +2 -1
  89. package/src/components/MHeader.tsx +1 -1
  90. package/src/components/keyboardspace/index.tsx +0 -2
  91. package/src/screens/detail-loan/DetailLoanTima.tsx +145 -35
  92. package/src/screens/detail-loan/Info.tsx +16 -8
  93. package/src/screens/detail-loan/Payment.tsx +19 -7
  94. package/src/screens/detail-loan/PaymentAll.tsx +49 -9
  95. package/src/screens/detail-loan/PaymentInfo.tsx +735 -85
  96. package/src/screens/detail-loan/ShowQrCode.tsx +678 -35
  97. package/src/screens/detail-loan/index.tsx +37 -33
  98. package/src/screens/guide-transfer-bank/TransferDetail.tsx +41 -12
  99. package/src/screens/guide-transfer-bank/index.tsx +228 -237
  100. package/src/screens/home/Store.tsx +4 -1
  101. package/src/screens/home/index.tsx +15 -30
  102. package/src/screens/liveness-v2/index.tsx +4 -4
  103. package/src/services/api/api.ts +16 -0
@@ -8,6 +8,7 @@ import {
8
8
  StyleSheet,
9
9
  TouchableOpacity,
10
10
  View,
11
+ ViewStyle,
11
12
  } from 'react-native';
12
13
  import {
13
14
  CIMBBank,
@@ -26,6 +27,18 @@ import { color } from '../../theme';
26
27
  import { commonStyles } from '../CommonStyles';
27
28
  import MHeader from '../../components/MHeader';
28
29
 
30
+ const $backButton: ViewStyle = {
31
+ position: 'absolute',
32
+ left: 16,
33
+ };
34
+
35
+ const $header: ViewStyle = {
36
+ flexDirection: 'row',
37
+ alignItems: 'center',
38
+ paddingVertical: 16,
39
+ justifyContent: 'center',
40
+ };
41
+
29
42
  export const GuideTransferBank = observer(function GuideTransferBank() {
30
43
  const navigation = useNavigation();
31
44
  const goDetail = (step) => {
@@ -34,279 +47,257 @@ export const GuideTransferBank = observer(function GuideTransferBank() {
34
47
  );
35
48
  };
36
49
  return (
37
- <View style={{ flex: 1, backgroundColor: '#FFFFFF' }}>
38
- <MHeader
39
- title="Hướng dẫn chuyển tiền"
40
- onBack={() => {
41
- navigation.goBack();
42
- }}
43
- />
44
- <SafeAreaView style={{ flex: 1 }}>
45
- <View style={{ flex: 1, backgroundColor: '#F4F4F4' }}>
46
- <ScrollView style={{ flex: 1 }}>
47
- <View
48
- style={[
49
- styles.box,
50
- { flexDirection: 'row', alignItems: 'center', marginTop: 16 },
51
- ]}
52
- >
53
- <Step1Icon />
54
- <View style={{ flex: 1, paddingLeft: 16 }}>
50
+ <View style={{ flex: 1, backgroundColor: '#F4F4F4' }}>
51
+ <MHeader title="Vay trực tuyến 24/7" />
52
+ <View style={{ flex: 1 }}>
53
+ <View style={$header}>
54
+ <TouchableOpacity
55
+ style={$backButton}
56
+ onPress={() => navigation.goBack()}
57
+ >
58
+ <IconBack />
59
+ </TouchableOpacity>
60
+ <MText
61
+ style={{
62
+ fontSize: 16,
63
+ fontWeight: '600',
64
+ fontFamily: 'BeVietnamPro-SemiBold',
65
+ }}
66
+ >
67
+ Hướng dẫn chuyển tiền
68
+ </MText>
69
+ </View>
70
+
71
+ <ScrollView>
72
+ <View
73
+ style={[styles.box, { flexDirection: 'row', alignItems: 'center' }]}
74
+ >
75
+ <Step1Icon />
76
+ <View style={{ flex: 1, paddingLeft: 16 }}>
77
+ <MText
78
+ style={[
79
+ commonStyles.textNormalBold,
80
+ { fonSize: 16, color: color.primary },
81
+ ]}
82
+ >
83
+ BƯỚC 1:
84
+ </MText>
85
+ <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
86
+ Chọn mục{' '}
87
+ <MText style={commonStyles.textNormalBold}>“Chuyển tiền”</MText>{' '}
88
+ ở ngân hàng của bạn
89
+ </MText>
90
+ <TouchableOpacity
91
+ style={{ marginTop: 4 }}
92
+ onPress={() => goDetail(1)}
93
+ >
55
94
  <MText
56
95
  style={[
57
- commonStyles.textNormalBold,
58
- { fonSize: 16, color: color.primary },
96
+ commonStyles.textNormal,
97
+ {
98
+ fontSize: 12,
99
+ color: '#828282',
100
+ textDecorationLine: 'underline',
101
+ },
59
102
  ]}
60
103
  >
61
- BƯỚC 1:
62
- </MText>
63
- <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
64
- Chọn mục{' '}
65
- <MText style={commonStyles.textNormalBold}>
66
- “Chuyển tiền”
67
- </MText>{' '}
68
- ở ngân hàng của bạn
104
+ Xem ảnh minh hoạ
69
105
  </MText>
70
- <TouchableOpacity
71
- style={{ marginTop: 4 }}
72
- onPress={() => goDetail(1)}
73
- >
74
- <MText
75
- style={[
76
- commonStyles.textNormal,
77
- {
78
- fontSize: 12,
79
- color: '#828282',
80
- textDecorationLine: 'underline',
81
- },
82
- ]}
83
- >
84
- Xem ảnh minh hoạ
85
- </MText>
86
- </TouchableOpacity>
87
- </View>
106
+ </TouchableOpacity>
88
107
  </View>
89
- <View
90
- style={[
91
- styles.box,
92
- { flexDirection: 'row', alignItems: 'center' },
93
- ]}
94
- >
95
- <Step2Icon />
96
- <View style={{ flex: 1, paddingLeft: 16 }}>
108
+ </View>
109
+ <View
110
+ style={[styles.box, { flexDirection: 'row', alignItems: 'center' }]}
111
+ >
112
+ <Step2Icon />
113
+ <View style={{ flex: 1, paddingLeft: 16 }}>
114
+ <MText
115
+ style={[
116
+ commonStyles.textNormalBold,
117
+ { fonSize: 16, color: color.primary },
118
+ ]}
119
+ >
120
+ BƯỚC 2:
121
+ </MText>
122
+ <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
123
+ Chọn ngân hàng nhận{' '}
124
+ <MText style={commonStyles.textNormalBold}>Techcombank</MText>
125
+ </MText>
126
+ <TouchableOpacity
127
+ style={{ marginTop: 4 }}
128
+ onPress={() => goDetail(2)}
129
+ >
97
130
  <MText
98
131
  style={[
99
- commonStyles.textNormalBold,
100
- { fonSize: 16, color: color.primary },
132
+ commonStyles.textNormal,
133
+ {
134
+ fontSize: 12,
135
+ color: '#828282',
136
+ textDecorationLine: 'underline',
137
+ },
101
138
  ]}
102
139
  >
103
- BƯỚC 2:
104
- </MText>
105
- <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
106
- Chọn ngân hàng nhận{' '}
107
- <MText style={commonStyles.textNormalBold}>Techcombank</MText>
140
+ Xem ảnh minh hoạ
108
141
  </MText>
109
- <TouchableOpacity
110
- style={{ marginTop: 4 }}
111
- onPress={() => goDetail(2)}
112
- >
113
- <MText
114
- style={[
115
- commonStyles.textNormal,
116
- {
117
- fontSize: 12,
118
- color: '#828282',
119
- textDecorationLine: 'underline',
120
- },
121
- ]}
122
- >
123
- Xem ảnh minh hoạ
124
- </MText>
125
- </TouchableOpacity>
126
- </View>
142
+ </TouchableOpacity>
127
143
  </View>
128
- <View
129
- style={[
130
- styles.box,
131
- { flexDirection: 'row', alignItems: 'center' },
132
- ]}
133
- >
134
- <Step3Icon />
135
- <View style={{ flex: 1, paddingLeft: 16 }}>
144
+ </View>
145
+ <View
146
+ style={[styles.box, { flexDirection: 'row', alignItems: 'center' }]}
147
+ >
148
+ <Step3Icon />
149
+ <View style={{ flex: 1, paddingLeft: 16 }}>
150
+ <MText
151
+ style={[
152
+ commonStyles.textNormalBold,
153
+ { fonSize: 16, color: color.primary },
154
+ ]}
155
+ >
156
+ BƯỚC 3:
157
+ </MText>
158
+ <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
159
+ Ưu tiên chọn{' '}
160
+ <MText style={commonStyles.textNormalBold}>
161
+ “Chuyển tiền nhanh”
162
+ </MText>
163
+ </MText>
164
+ <MText style={{ fontSize: 12, color: '#FF7A00', marginTop: 8 }}>
165
+ Lưu ý:{' '}
166
+ <MText style={{ fontSize: 12, color: '#828282' }}>
167
+ Nếu khách hàng chọn Chuyển tiền thường, số tiền thanh toán kỳ
168
+ có thể bị chuyển chậm 01 ngày.
169
+ </MText>
170
+ </MText>
171
+ <TouchableOpacity
172
+ style={{ marginTop: 8 }}
173
+ onPress={() => goDetail(3)}
174
+ >
136
175
  <MText
137
176
  style={[
138
- commonStyles.textNormalBold,
139
- { fonSize: 16, color: color.primary },
177
+ commonStyles.textNormal,
178
+ {
179
+ fontSize: 12,
180
+ color: '#828282',
181
+ textDecorationLine: 'underline',
182
+ },
140
183
  ]}
141
184
  >
142
- BƯỚC 3:
185
+ Xem ảnh minh hoạ
143
186
  </MText>
144
- <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
145
- Ưu tiên chọn{' '}
146
- <MText style={commonStyles.textNormalBold}>
147
- “Chuyển tiền nhanh”
148
- </MText>
149
- </MText>
150
- <MText style={{ fontSize: 12, color: '#FF7A00', marginTop: 8 }}>
151
- Lưu ý:{' '}
152
- <MText style={{ fontSize: 12, color: '#828282' }}>
153
- Nếu khách hàng chọn Chuyển tiền thường, số tiền thanh toán
154
- kỳ có thể bị chuyển chậm 01 ngày.
155
- </MText>
156
- </MText>
157
- <TouchableOpacity
158
- style={{ marginTop: 8 }}
159
- onPress={() => goDetail(3)}
160
- >
161
- <MText
162
- style={[
163
- commonStyles.textNormal,
164
- {
165
- fontSize: 12,
166
- color: '#828282',
167
- textDecorationLine: 'underline',
168
- },
169
- ]}
170
- >
171
- Xem ảnh minh hoạ
172
- </MText>
173
- </TouchableOpacity>
174
- </View>
187
+ </TouchableOpacity>
175
188
  </View>
176
- <View
177
- style={[
178
- styles.box,
179
- { flexDirection: 'row', alignItems: 'center' },
180
- ]}
181
- >
182
- <Step4Icon />
183
- <View style={{ flex: 1, paddingLeft: 16 }}>
189
+ </View>
190
+ <View
191
+ style={[styles.box, { flexDirection: 'row', alignItems: 'center' }]}
192
+ >
193
+ <Step4Icon />
194
+ <View style={{ flex: 1, paddingLeft: 16 }}>
195
+ <MText
196
+ style={[
197
+ commonStyles.textNormalBold,
198
+ { fonSize: 16, color: color.primary },
199
+ ]}
200
+ >
201
+ BƯỚC 4:
202
+ </MText>
203
+ <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
204
+ <MText style={commonStyles.textNormalBold}>
205
+ Nhập/ Dán số tài khoản
206
+ </MText>{' '}
207
+ từ Tima
208
+ </MText>
209
+ <TouchableOpacity
210
+ style={{ marginTop: 4 }}
211
+ onPress={() => goDetail(4)}
212
+ >
184
213
  <MText
185
214
  style={[
186
- commonStyles.textNormalBold,
187
- { fonSize: 16, color: color.primary },
215
+ commonStyles.textNormal,
216
+ {
217
+ fontSize: 12,
218
+ color: '#828282',
219
+ textDecorationLine: 'underline',
220
+ },
188
221
  ]}
189
222
  >
190
- BƯỚC 4:
223
+ Xem ảnh minh hoạ
191
224
  </MText>
192
- <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
193
- <MText style={commonStyles.textNormalBold}>
194
- Nhập/ Dán số tài khoản
195
- </MText>{' '}
196
- từ Tima
197
- </MText>
198
- <TouchableOpacity
199
- style={{ marginTop: 4 }}
200
- onPress={() => goDetail(4)}
201
- >
202
- <MText
203
- style={[
204
- commonStyles.textNormal,
205
- {
206
- fontSize: 12,
207
- color: '#828282',
208
- textDecorationLine: 'underline',
209
- },
210
- ]}
211
- >
212
- Xem ảnh minh hoạ
213
- </MText>
214
- </TouchableOpacity>
215
- </View>
225
+ </TouchableOpacity>
216
226
  </View>
217
- <View
218
- style={[
219
- styles.box,
220
- { flexDirection: 'row', alignItems: 'center' },
221
- ]}
222
- >
223
- <Step5Icon />
224
- <View style={{ flex: 1, paddingLeft: 16 }}>
227
+ </View>
228
+ <View
229
+ style={[styles.box, { flexDirection: 'row', alignItems: 'center' }]}
230
+ >
231
+ <Step5Icon />
232
+ <View style={{ flex: 1, paddingLeft: 16 }}>
233
+ <MText
234
+ style={[
235
+ commonStyles.textNormalBold,
236
+ { fonSize: 16, color: color.primary },
237
+ ]}
238
+ >
239
+ BƯỚC 5:
240
+ </MText>
241
+ <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
242
+ <MText style={commonStyles.textNormalBold}>Nhập số tiền </MText>
243
+ phải trả
244
+ </MText>
245
+ <TouchableOpacity
246
+ style={{ marginTop: 4 }}
247
+ onPress={() => goDetail(5)}
248
+ >
225
249
  <MText
226
250
  style={[
227
- commonStyles.textNormalBold,
228
- { fonSize: 16, color: color.primary },
251
+ commonStyles.textNormal,
252
+ {
253
+ fontSize: 12,
254
+ color: '#828282',
255
+ textDecorationLine: 'underline',
256
+ },
229
257
  ]}
230
258
  >
231
- BƯỚC 5:
259
+ Xem ảnh minh hoạ
232
260
  </MText>
233
- <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
234
- <MText style={commonStyles.textNormalBold}>
235
- Nhập số tiền{' '}
236
- </MText>
237
- phải trả
238
- </MText>
239
- <TouchableOpacity
240
- style={{ marginTop: 4 }}
241
- onPress={() => goDetail(5)}
242
- >
243
- <MText
244
- style={[
245
- commonStyles.textNormal,
246
- {
247
- fontSize: 12,
248
- color: '#828282',
249
- textDecorationLine: 'underline',
250
- },
251
- ]}
252
- >
253
- Xem ảnh minh hoạ
254
- </MText>
255
- </TouchableOpacity>
256
- </View>
261
+ </TouchableOpacity>
257
262
  </View>
258
- <View
259
- style={[
260
- styles.box,
261
- { flexDirection: 'row', alignItems: 'center' },
262
- ]}
263
- >
264
- <Step6Icon />
265
- <View style={{ flex: 1, paddingLeft: 16 }}>
263
+ </View>
264
+ <View
265
+ style={[styles.box, { flexDirection: 'row', alignItems: 'center' }]}
266
+ >
267
+ <Step6Icon />
268
+ <View style={{ flex: 1, paddingLeft: 16 }}>
269
+ <MText
270
+ style={[
271
+ commonStyles.textNormalBold,
272
+ { fonSize: 16, color: color.primary },
273
+ ]}
274
+ >
275
+ BƯỚC 6:
276
+ </MText>
277
+ <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
278
+ Xác nhận thanh toán
279
+ </MText>
280
+ <TouchableOpacity
281
+ style={{ marginTop: 4 }}
282
+ onPress={() => goDetail(6)}
283
+ >
266
284
  <MText
267
285
  style={[
268
- commonStyles.textNormalBold,
269
- { fonSize: 16, color: color.primary },
286
+ commonStyles.textNormal,
287
+ {
288
+ fontSize: 12,
289
+ color: '#828282',
290
+ textDecorationLine: 'underline',
291
+ },
270
292
  ]}
271
293
  >
272
- BƯỚC 6:
273
- </MText>
274
- <MText style={[commonStyles.textNormal, { marginTop: 4 }]}>
275
- Xác nhận thanh toán
294
+ Xem ảnh minh hoạ
276
295
  </MText>
277
- <TouchableOpacity
278
- style={{ marginTop: 4 }}
279
- onPress={() => goDetail(6)}
280
- >
281
- <MText
282
- style={[
283
- commonStyles.textNormal,
284
- {
285
- fontSize: 12,
286
- color: '#828282',
287
- textDecorationLine: 'underline',
288
- },
289
- ]}
290
- >
291
- Xem ảnh minh hoạ
292
- </MText>
293
- </TouchableOpacity>
294
- </View>
296
+ </TouchableOpacity>
295
297
  </View>
296
- </ScrollView>
297
- </View>
298
- {/* <View
299
- style={{
300
- marginTop: 8,
301
- flexDirection: "row",
302
- justifyContent: "center",
303
- marginBottom: 16,
304
- }}
305
- >
306
- <MText style={{ fontSize: 12, color: "#333333" }}>Cung cấp bởi </MText>
307
- <CIMBBank />
308
- </View> */}
309
- </SafeAreaView>
298
+ </View>
299
+ </ScrollView>
300
+ </View>
310
301
  </View>
311
302
  );
312
303
  });
@@ -134,6 +134,7 @@ class Store {
134
134
  @action
135
135
  async getListLoan(onSuccess?, onFailure?) {
136
136
  this.isLoading = true;
137
+ this.listLoan = [];
137
138
  const response = await Api.getInstance().listLoan();
138
139
  this.isLoading = false;
139
140
  myLog(response);
@@ -143,12 +144,14 @@ class Store {
143
144
  if (onSuccess) {
144
145
  onSuccess(response.data.data);
145
146
  }
146
- } else if (response.data.meta.errorCode === 404) {
147
+ } else {
148
+ this.listLoan = [];
147
149
  Alert.alert('Thông báo', response.data.meta.errorMessage, [
148
150
  { text: 'Đồng ý' },
149
151
  ]);
150
152
  }
151
153
  } else {
154
+ this.listLoan = [];
152
155
  this.isLoading = false;
153
156
  Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau!');
154
157
  }
@@ -133,6 +133,7 @@ export const Home = observer(function Home() {
133
133
  const insets = useSafeAreaInsets();
134
134
 
135
135
  const onRefresh = async () => {
136
+ homeStore.getListLoan();
136
137
  setIsLoading(true);
137
138
  try {
138
139
  const response = await Api.getInstance().listLoanPending();
@@ -184,6 +185,7 @@ export const Home = observer(function Home() {
184
185
  const res = await Api.getInstance().getSuggestProduct(
185
186
  item?.id
186
187
  );
188
+ console.log(res);
187
189
 
188
190
  if (res.kind === 'ok' && res.data?.meta?.errorCode === 200) {
189
191
  setDataSuggest({
@@ -496,25 +498,16 @@ export const Home = observer(function Home() {
496
498
  style={{ flex: 1, marginBottom: 16 }}
497
499
  >
498
500
  <View style={[commonStyles.fill, { paddingHorizontal: 16 }]}>
499
- <MText
500
- style={{
501
- fontSize: 16,
502
- fontWeight: 'bold',
503
- marginTop: 10,
504
- marginBottom: 8,
505
- }}
506
- >
507
- Đơn chờ hoàn thiện
508
- </MText>
509
- {listLoan?.length === 0 && (
501
+ {listLoan?.length > 0 && (
510
502
  <MText
511
503
  style={{
512
- marginTop: 50,
513
- marginBottom: 16,
514
- textAlign: 'center',
504
+ fontSize: 16,
505
+ fontWeight: 'bold',
506
+ marginTop: 10,
507
+ marginBottom: 8,
515
508
  }}
516
509
  >
517
- Danh sách đơn mới trống
510
+ Danh sách đơn mới
518
511
  </MText>
519
512
  )}
520
513
 
@@ -2153,24 +2146,16 @@ export const Home = observer(function Home() {
2153
2146
  <Observer>
2154
2147
  {() => (
2155
2148
  <View>
2156
- <MText
2157
- style={{
2158
- fontSize: 16,
2159
- fontWeight: 'bold',
2160
- marginBottom: 8,
2161
- }}
2162
- >
2163
- Danh sách đơn đang vay
2164
- </MText>
2165
- {homeStore?.listLoan?.length === 0 && (
2149
+ {homeStore?.listLoan?.length > 0 && (
2166
2150
  <MText
2167
2151
  style={{
2168
- marginTop: 50,
2169
- marginBottom: 16,
2170
- textAlign: 'center',
2152
+ fontSize: 16,
2153
+ fontWeight: 'bold',
2154
+ marginBottom: 8,
2155
+ marginTop: 10,
2171
2156
  }}
2172
2157
  >
2173
- Danh sách đơn trống
2158
+ Danh sách đơn đang vay
2174
2159
  </MText>
2175
2160
  )}
2176
2161
  {homeStore?.listLoan &&
@@ -2731,7 +2716,7 @@ export const Home = observer(function Home() {
2731
2716
  }}
2732
2717
  />
2733
2718
  </ScrollView>
2734
- <Loading isLoading={isLoading} />
2719
+ <Loading isLoading={isLoading || homeStore.isLoading} />
2735
2720
  </View>
2736
2721
  );
2737
2722
  });
@@ -505,10 +505,10 @@ export const LivenessV2 = observer(function LivenessV2(props: any) {
505
505
 
506
506
  <View style={styles.circularProgress}>
507
507
  <CircularProgress
508
- dashedStrokeConfig={{
509
- count: 100,
510
- width: 7,
511
- }}
508
+ // dashedStrokeConfig={{
509
+ // count: 100,
510
+ // width: 7,
511
+ // }}
512
512
  value={
513
513
  livenessStore.listAction.length === 3
514
514
  ? 0
@@ -3327,4 +3327,20 @@ export class Api {
3327
3327
  return { kind: "bad-data" }
3328
3328
  }
3329
3329
  }
3330
+
3331
+ async getMoneyCloseLoan(id) {
3332
+ // make the api call
3333
+ const response: ApiResponse<any> = await this.apisauce.get(`api/v2.0/loanbrief/get_money_close_loan?loanBriefId=${id}`)
3334
+ // the typical ways to die when calling an api
3335
+ if (!response.ok) {
3336
+ const problem = getGeneralApiProblem(response)
3337
+ if (problem) return problem
3338
+ }
3339
+ // transform the data into the format we are expecting
3340
+ try {
3341
+ return { kind: "ok", data: response.data }
3342
+ } catch {
3343
+ return { kind: "bad-data" }
3344
+ }
3345
+ }
3330
3346
  }