react-native-timacare 3.1.3-beta → 3.1.5-beta

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 (108) hide show
  1. package/lib/commonjs/assets/svgs/index.js +1 -1
  2. package/lib/commonjs/assets/svgs/index.js.flow +2 -0
  3. package/lib/commonjs/assets/svgs/index.js.map +1 -1
  4. package/lib/commonjs/assets/svgs/notify.svg +18 -0
  5. package/lib/commonjs/assets/tts/Banner.png +0 -0
  6. package/lib/commonjs/assets/tts/otp.png +0 -0
  7. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  8. package/lib/commonjs/navigation/primary-navigator.js.flow +13 -1
  9. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  10. package/lib/commonjs/screens/home/index.js +1 -1
  11. package/lib/commonjs/screens/home/index.js.flow +146 -7
  12. package/lib/commonjs/screens/home/index.js.map +1 -1
  13. package/lib/commonjs/screens/liveness/LivenessStore.js +1 -1
  14. package/lib/commonjs/screens/liveness/LivenessStore.js.flow +87 -0
  15. package/lib/commonjs/screens/liveness/LivenessStore.js.map +1 -1
  16. package/lib/commonjs/screens/liveness-v2/index.js +1 -1
  17. package/lib/commonjs/screens/liveness-v2/index.js.flow +36 -16
  18. package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
  19. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js +2 -0
  20. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.flow +373 -0
  21. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.map +1 -0
  22. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +1 -1
  23. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +1 -1
  24. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  25. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  26. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +1 -0
  27. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  28. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +1 -1
  29. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +100 -1
  30. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  31. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js +2 -0
  32. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.flow +356 -0
  33. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.map +1 -0
  34. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +2 -0
  35. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +143 -0
  36. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -0
  37. package/lib/commonjs/services/api/api.js +1 -1
  38. package/lib/commonjs/services/api/api.js.flow +17 -0
  39. package/lib/commonjs/services/api/api.js.map +1 -1
  40. package/lib/commonjs/utils/index.js +1 -1
  41. package/lib/commonjs/utils/index.js.flow +67 -45
  42. package/lib/commonjs/utils/index.js.map +1 -1
  43. package/lib/module/assets/svgs/index.js +1 -1
  44. package/lib/module/assets/svgs/index.js.map +1 -1
  45. package/lib/module/assets/svgs/notify.svg +18 -0
  46. package/lib/module/assets/tts/Banner.png +0 -0
  47. package/lib/module/assets/tts/otp.png +0 -0
  48. package/lib/module/navigation/primary-navigator.js +1 -1
  49. package/lib/module/navigation/primary-navigator.js.map +1 -1
  50. package/lib/module/screens/home/index.js +1 -1
  51. package/lib/module/screens/home/index.js.map +1 -1
  52. package/lib/module/screens/liveness/LivenessStore.js +1 -1
  53. package/lib/module/screens/liveness/LivenessStore.js.map +1 -1
  54. package/lib/module/screens/liveness-v2/index.js +1 -1
  55. package/lib/module/screens/liveness-v2/index.js.map +1 -1
  56. package/lib/module/screens/toan-trinh-so/LoanInterestRate.js +2 -0
  57. package/lib/module/screens/toan-trinh-so/LoanInterestRate.js.map +1 -0
  58. package/lib/module/screens/toan-trinh-so/ReviewInformation.js +1 -1
  59. package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  60. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  61. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  62. package/lib/module/screens/toan-trinh-so/ReviewLoan.js +1 -1
  63. package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  64. package/lib/module/screens/toan-trinh-so/TTSOTP.js +2 -0
  65. package/lib/module/screens/toan-trinh-so/TTSOTP.js.map +1 -0
  66. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +2 -0
  67. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -0
  68. package/lib/module/services/api/api.js +1 -1
  69. package/lib/module/services/api/api.js.map +1 -1
  70. package/lib/module/utils/index.js +1 -1
  71. package/lib/module/utils/index.js.map +1 -1
  72. package/lib/typescript/assets/svgs/index.d.ts +2 -1
  73. package/lib/typescript/assets/svgs/index.d.ts.map +1 -1
  74. package/lib/typescript/navigation/primary-navigator.d.ts +3 -0
  75. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  76. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  77. package/lib/typescript/screens/liveness/LivenessStore.d.ts +1 -0
  78. package/lib/typescript/screens/liveness/LivenessStore.d.ts.map +1 -1
  79. package/lib/typescript/screens/liveness-v2/index.d.ts.map +1 -1
  80. package/lib/typescript/screens/toan-trinh-so/LoanInterestRate.d.ts +2 -0
  81. package/lib/typescript/screens/toan-trinh-so/LoanInterestRate.d.ts.map +1 -0
  82. package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts.map +1 -1
  83. package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -1
  84. package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts +2 -0
  85. package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts.map +1 -0
  86. package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts +2 -0
  87. package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -0
  88. package/lib/typescript/services/api/api.d.ts +16 -0
  89. package/lib/typescript/services/api/api.d.ts.map +1 -1
  90. package/lib/typescript/utils/index.d.ts +8 -0
  91. package/lib/typescript/utils/index.d.ts.map +1 -1
  92. package/package.json +1 -1
  93. package/src/assets/svgs/index.tsx +2 -0
  94. package/src/assets/svgs/notify.svg +18 -0
  95. package/src/assets/tts/Banner.png +0 -0
  96. package/src/assets/tts/otp.png +0 -0
  97. package/src/navigation/primary-navigator.tsx +13 -1
  98. package/src/screens/home/index.tsx +146 -7
  99. package/src/screens/liveness/LivenessStore.tsx +87 -0
  100. package/src/screens/liveness-v2/index.tsx +36 -16
  101. package/src/screens/toan-trinh-so/LoanInterestRate.tsx +373 -0
  102. package/src/screens/toan-trinh-so/ReviewInformation.tsx +1 -1
  103. package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +1 -0
  104. package/src/screens/toan-trinh-so/ReviewLoan.tsx +100 -1
  105. package/src/screens/toan-trinh-so/TTSOTP.tsx +356 -0
  106. package/src/screens/toan-trinh-so/TTSSignLoan.tsx +143 -0
  107. package/src/services/api/api.ts +17 -0
  108. package/src/utils/index.tsx +67 -45
@@ -44,6 +44,7 @@ const PREVIEW_RECT = {
44
44
  };
45
45
  export const LivenessV2 = observer(function LivenessV2(props: any) {
46
46
  const loan = props.route.params?.loan;
47
+
47
48
  const navigation = useNavigation();
48
49
  const cameraRef = useRef<any>(null);
49
50
  const interval = useRef<any>(null);
@@ -266,22 +267,41 @@ export const LivenessV2 = observer(function LivenessV2(props: any) {
266
267
  const uploadLiveness = async (template: any) => {
267
268
  setIsLoading(true);
268
269
  try {
269
- await livenessStore.verifyLiveness(
270
- loan?.id,
271
- template,
272
- () => {
273
- setTimeout(() => {
274
- startLiveness();
275
- }, 2000);
276
- setIsLoading(false);
277
- },
278
- () => {
279
- setTimeout(() => {
280
- startLiveness();
281
- }, 2000);
282
- setIsLoading(false);
283
- }
284
- );
270
+ if (loan?.typeLoan === 5) {
271
+ await livenessStore.verifyLiveness2(
272
+ loan?.id,
273
+ template,
274
+ () => {
275
+ setTimeout(() => {
276
+ startLiveness();
277
+ }, 2000);
278
+ setIsLoading(false);
279
+ },
280
+ () => {
281
+ setTimeout(() => {
282
+ startLiveness();
283
+ }, 2000);
284
+ setIsLoading(false);
285
+ }
286
+ );
287
+ } else {
288
+ await livenessStore.verifyLiveness(
289
+ loan?.id,
290
+ template,
291
+ () => {
292
+ setTimeout(() => {
293
+ startLiveness();
294
+ }, 2000);
295
+ setIsLoading(false);
296
+ },
297
+ () => {
298
+ setTimeout(() => {
299
+ startLiveness();
300
+ }, 2000);
301
+ setIsLoading(false);
302
+ }
303
+ );
304
+ }
285
305
  } catch (error) {
286
306
  setIsLoading(false);
287
307
  console.log(error);
@@ -0,0 +1,373 @@
1
+ //@ts-nocheck
2
+ import React from 'react';
3
+ import { ScrollView, TextStyle, View, ViewStyle } from 'react-native';
4
+ import { commonStyles } from '../CommonStyles';
5
+ import MHeader from '../../components/MHeader';
6
+ import { MText } from '../../components/MText';
7
+ import { CommonActions, useNavigation } from '@react-navigation/native';
8
+ import { formatMoney } from '../../utils';
9
+ import { IconNotify } from '../../assets/svgs';
10
+ import MButton from '../../components/MButton';
11
+ import LinearGradient from 'react-native-linear-gradient';
12
+ import { ScreenNames } from '../../navigation';
13
+
14
+ export default function LoanInterestRate(props) {
15
+ const loan = props?.route?.params?.loan;
16
+
17
+ const navigation = useNavigation();
18
+
19
+ return (
20
+ <View style={commonStyles.fill}>
21
+ <MHeader title="Vay nhanh 24/7" />
22
+ <View style={commonStyles.fill}>
23
+ <View style={$h} />
24
+ <View style={$bg}>
25
+ <MText style={$title}>Bảng biểu lãi phí đơn vay</MText>
26
+ <ScrollView>
27
+ <View
28
+ style={{
29
+ borderWidth: 1,
30
+ borderColor: '#FF8E4F',
31
+ borderRadius: 8,
32
+ paddingHorizontal: 16,
33
+ paddingVertical: 12,
34
+ marginHorizontal: 16,
35
+ }}
36
+ >
37
+ <View
38
+ style={{
39
+ flexDirection: 'row',
40
+ justifyContent: 'space-between',
41
+ alignItems: 'center',
42
+ }}
43
+ >
44
+ <MText
45
+ style={{
46
+ fontSize: 12,
47
+ color: '#333333',
48
+ }}
49
+ >
50
+ Mã HĐ giải ngân
51
+ </MText>
52
+ <MText
53
+ style={{
54
+ fontSize: 12,
55
+ color: '#333333',
56
+ fontWeight: 'bold',
57
+ }}
58
+ >
59
+ HD-{loan?.id}
60
+ </MText>
61
+ </View>
62
+ <MText
63
+ ellipsizeMode="clip"
64
+ numberOfLines={1}
65
+ style={{
66
+ flex: 1,
67
+ color: '#D1D1D6',
68
+ textAlign: 'center',
69
+ }}
70
+ >
71
+ --------------------------------------------------------------------------------------------------------
72
+ </MText>
73
+ <View
74
+ style={{
75
+ flexDirection: 'row',
76
+ justifyContent: 'space-between',
77
+ alignItems: 'center',
78
+ }}
79
+ >
80
+ <MText
81
+ style={{
82
+ fontSize: 12,
83
+ color: '#333333',
84
+ }}
85
+ >
86
+ Số tiền vay (1)+(2)
87
+ </MText>
88
+ <MText
89
+ style={{
90
+ fontSize: 12,
91
+ color: '#EF592E',
92
+ fontWeight: 'bold',
93
+ }}
94
+ >
95
+ {formatMoney(loan?.loanAmount)} đ
96
+ </MText>
97
+ </View>
98
+ <View
99
+ style={{
100
+ flexDirection: 'row',
101
+ justifyContent: 'space-between',
102
+ alignItems: 'center',
103
+ marginTop: 5,
104
+ }}
105
+ >
106
+ <MText
107
+ style={{
108
+ fontSize: 12,
109
+ color: '#999999',
110
+ marginLeft: 24,
111
+ }}
112
+ >
113
+ Số tiền giải ngân (1)
114
+ </MText>
115
+ <MText
116
+ style={{
117
+ fontSize: 12,
118
+ color: '#333333',
119
+ }}
120
+ >
121
+ {formatMoney(loan?.loanAmount)} đ
122
+ </MText>
123
+ </View>
124
+ <View
125
+ style={{
126
+ flexDirection: 'row',
127
+ justifyContent: 'space-between',
128
+ alignItems: 'center',
129
+ marginTop: 4,
130
+ }}
131
+ >
132
+ <MText
133
+ style={{
134
+ fontSize: 12,
135
+ color: '#999999',
136
+ marginLeft: 24,
137
+ }}
138
+ >
139
+ Số tiền bảo hiểm (2)
140
+ </MText>
141
+ <MText
142
+ style={{
143
+ fontSize: 12,
144
+ color: '#333333',
145
+ }}
146
+ >
147
+ {formatMoney(loan?.loanAmount)} đ
148
+ </MText>
149
+ </View>
150
+ <MText
151
+ ellipsizeMode="clip"
152
+ numberOfLines={1}
153
+ style={{
154
+ flex: 1,
155
+ color: '#D1D1D6',
156
+ textAlign: 'center',
157
+ }}
158
+ >
159
+ --------------------------------------------------------------------------------------------------------
160
+ </MText>
161
+ <View
162
+ style={{
163
+ flexDirection: 'row',
164
+ justifyContent: 'space-between',
165
+ alignItems: 'center',
166
+ }}
167
+ >
168
+ <MText
169
+ style={{
170
+ fontSize: 12,
171
+ color: '#333333',
172
+ }}
173
+ >
174
+ Thời hạn
175
+ </MText>
176
+ <MText
177
+ style={{
178
+ fontSize: 12,
179
+ color: '#333333',
180
+ fontWeight: 'bold',
181
+ }}
182
+ >
183
+ 12 tháng
184
+ </MText>
185
+ </View>
186
+ <View
187
+ style={{
188
+ flexDirection: 'row',
189
+ justifyContent: 'space-between',
190
+ alignItems: 'center',
191
+ marginTop: 8,
192
+ }}
193
+ >
194
+ <MText
195
+ style={{
196
+ fontSize: 12,
197
+ color: '#333333',
198
+ }}
199
+ >
200
+ Ngày dự kiến giải ngân
201
+ </MText>
202
+ <MText
203
+ style={{
204
+ fontSize: 12,
205
+ color: '#333333',
206
+ fontWeight: 'bold',
207
+ }}
208
+ >
209
+ 16/05/2023
210
+ </MText>
211
+ </View>
212
+ </View>
213
+ <View
214
+ style={{
215
+ backgroundColor: '#FFF3E9',
216
+ marginTop: 16,
217
+ flexDirection: 'row',
218
+ paddingHorizontal: 16,
219
+ paddingVertical: 10,
220
+ }}
221
+ >
222
+ <MText
223
+ style={{
224
+ fontSize: 10,
225
+ color: '#333333',
226
+ width: '25%',
227
+ textAlign: 'center',
228
+ }}
229
+ >
230
+ Ngày thanh toán
231
+ </MText>
232
+ <MText
233
+ style={{
234
+ fontSize: 10,
235
+ color: '#333333',
236
+ width: '25%',
237
+ textAlign: 'center',
238
+ }}
239
+ >
240
+ Gốc trả kỳ
241
+ </MText>
242
+ <MText
243
+ style={{
244
+ fontSize: 10,
245
+ color: '#333333',
246
+ width: '25%',
247
+ textAlign: 'center',
248
+ }}
249
+ >
250
+ Tổng lãi phí
251
+ </MText>
252
+ <MText
253
+ style={{
254
+ fontSize: 10,
255
+ color: '#333333',
256
+ width: '25%',
257
+ textAlign: 'center',
258
+ }}
259
+ >
260
+ Tổng trả kỳ
261
+ </MText>
262
+ </View>
263
+
264
+ <MText style={$des}>
265
+ <MText style={{ fontSize: 10, color: '#E40010' }}>*</MText> Đây là
266
+ lãi suất áp dụng cho khách hàng có điểm tín dụng tốt. Lãi suất
267
+ thực tế sẽ hiển thị sau khi hoàn thiện vay
268
+ </MText>
269
+ <View
270
+ style={{
271
+ backgroundColor: '#FFF8F2',
272
+ borderRadius: 8,
273
+ paddingHorizontal: 12,
274
+ paddingVertical: 8,
275
+ marginHorizontal: 16,
276
+ marginTop: 16,
277
+ }}
278
+ >
279
+ <View
280
+ style={{
281
+ flexDirection: 'row',
282
+ alignItems: 'center',
283
+ gap: 5,
284
+ }}
285
+ >
286
+ <IconNotify />
287
+ <MText
288
+ style={{
289
+ color: '#EF592E',
290
+ fontWeight: 'bold',
291
+ }}
292
+ >
293
+ Bước cuối cùng rồi!!!
294
+ </MText>
295
+ </View>
296
+ <MText
297
+ style={{
298
+ color: '#828282',
299
+ marginTop: 10,
300
+ }}
301
+ >
302
+ Vui lòng eKYC - hoàn thiện xác thực khuôn mặt và ký hợp đồng để
303
+ được giải ngân nhanh nhất!
304
+ </MText>
305
+ </View>
306
+
307
+ <MButton
308
+ onPress={() => {
309
+ navigation.push(ScreenNames.LivenessV2, { loan });
310
+ }}
311
+ style={{
312
+ marginVertical: 24,
313
+ marginHorizontal: 16,
314
+ }}
315
+ >
316
+ <LinearGradient
317
+ start={{ x: 1, y: 0 }}
318
+ end={{ x: 0, y: 1 }}
319
+ style={{
320
+ height: 40,
321
+ marginVertical: 16,
322
+ borderRadius: 30,
323
+ alignItems: 'center',
324
+ justifyContent: 'center',
325
+ }}
326
+ colors={['#FF7A00', '#EF4123']}
327
+ >
328
+ <MText
329
+ style={{
330
+ color: 'white',
331
+ fontSize: 16,
332
+ }}
333
+ >
334
+ Đi tới eKYC
335
+ </MText>
336
+ </LinearGradient>
337
+ </MButton>
338
+ </ScrollView>
339
+ </View>
340
+ </View>
341
+ </View>
342
+ );
343
+ }
344
+
345
+ const $des: TextStyle = {
346
+ fontSize: 10,
347
+ color: '#828282',
348
+ paddingHorizontal: 16,
349
+ fontStyle: 'italic',
350
+ marginTop: 16,
351
+ };
352
+
353
+ const $title: TextStyle = {
354
+ fontSize: 16,
355
+ fontWeight: 'bold',
356
+ color: '#333333',
357
+ textAlign: 'center',
358
+ paddingVertical: 16,
359
+ };
360
+
361
+ const $h: ViewStyle = {
362
+ backgroundColor: '#EF592E',
363
+ position: 'absolute',
364
+ height: 30,
365
+ width: '100%',
366
+ };
367
+
368
+ const $bg: ViewStyle = {
369
+ borderTopLeftRadius: 30,
370
+ borderTopRightRadius: 30,
371
+ backgroundColor: 'white',
372
+ flex: 1,
373
+ };
@@ -723,7 +723,7 @@ export default function ReviewInformation(props) {
723
723
  ) : (
724
724
  <RadioIcon />
725
725
  )}
726
- <MText>Trùng với hiện tại</MText>
726
+ <MText> trùng</MText>
727
727
  </TouchableOpacity>
728
728
  <TouchableOpacity
729
729
  onPress={() => setFieldValue('residentType', 15)}
@@ -169,6 +169,7 @@ export default function ReviewInformationOther(props) {
169
169
  },
170
170
  ],
171
171
  };
172
+
172
173
  const response = await Api.getInstance().updateInfoJob(body);
173
174
  setIsLoading(false);
174
175
  if (response.kind === 'ok') {
@@ -19,7 +19,12 @@ import { MText } from '../../components/MText';
19
19
  import { Formik } from 'formik';
20
20
  import { CheckBox, CheckBoxActive, DropDown2, Tick2 } from '../../assets/icons';
21
21
  import { color } from '../../theme';
22
- import { formatDDMMYYY, formatMoney } from '../../utils';
22
+ import {
23
+ EnumTypeAsset,
24
+ EnumTypeCar,
25
+ formatDDMMYYY,
26
+ formatMoney,
27
+ } from '../../utils';
23
28
  import appStore from '../../AppStore';
24
29
  import { ScreenNames } from '../../navigation';
25
30
  import KeyboardSpacer from '../../components/keyboardspace';
@@ -63,6 +68,8 @@ export default function ReviewLoan(props: any) {
63
68
  ownerFullName: values?.ownerFullName,
64
69
  motobikeCertificateNumber: values?.motobikeCertificateNumber,
65
70
  motobikeCertificateDate: values?.motobikeCertificateDate,
71
+ typeLoanBrief: values?.typeLoanBrief,
72
+ carTypeId: values?.carTypeId,
66
73
  };
67
74
  const response = await Api.getInstance().updateInfoLoan(body);
68
75
  setIsLoading(false);
@@ -201,6 +208,15 @@ export default function ReviewLoan(props: any) {
201
208
  response.data?.data?.yearCar
202
209
  );
203
210
  }
211
+
212
+ formRef.current?.setFieldValue(
213
+ 'typeLoanBrief',
214
+ response.data.data?.typeLoanBrief ?? null
215
+ );
216
+ formRef.current?.setFieldValue(
217
+ 'carTypeId',
218
+ response.data.data?.carTypeId ?? null
219
+ );
204
220
  } else {
205
221
  }
206
222
  }
@@ -326,6 +342,8 @@ export default function ReviewLoan(props: any) {
326
342
  ownerFullName: '',
327
343
  motobikeCertificateNumber: '',
328
344
  motobikeCertificateDate: '',
345
+ typeLoanBrief: null,
346
+ carTypeId: null,
329
347
  }}
330
348
  validationSchema={yup.object().shape({
331
349
  loanAmount: yup.string().required('Số tiền là bắt buộc'),
@@ -352,6 +370,14 @@ export default function ReviewLoan(props: any) {
352
370
  motobikeCertificateDate: yup
353
371
  .string()
354
372
  .required('Vui lòng nhập ngày đăng ký'),
373
+ typeLoanBrief: yup
374
+ .number()
375
+ .required('Vui lòng chọn loại tài sản')
376
+ .nullable(),
377
+ carTypeId: yup
378
+ .number()
379
+ .required('Vui lòng chọn loại xe')
380
+ .nullable(),
355
381
  })}
356
382
  >
357
383
  {({
@@ -987,6 +1013,79 @@ export default function ReviewLoan(props: any) {
987
1013
  )}
988
1014
  </View>
989
1015
  </View>
1016
+ <View style={[$row]}>
1017
+ <View style={{ flex: 1 }}>
1018
+ <MText style={$label}>Loại tài sản</MText>
1019
+ <TouchableOpacity
1020
+ style={$select}
1021
+ onPress={() => {
1022
+ navigation.push(ScreenNames.MSelect, {
1023
+ title: 'Loại tài sản',
1024
+ data: EnumTypeAsset,
1025
+ callback: (value) => {
1026
+ setFieldValue('typeLoanBrief', value.id);
1027
+ },
1028
+ });
1029
+ }}
1030
+ >
1031
+ <MText
1032
+ numberOfLines={1}
1033
+ style={{
1034
+ color: '#333333',
1035
+ fontSize: 16,
1036
+ fontWeight: '500',
1037
+ flex: 1,
1038
+ fontFamily: 'Be Vietnam Pro Medium',
1039
+ }}
1040
+ >
1041
+ {
1042
+ EnumTypeAsset.find(
1043
+ (x) => x.id === values.typeLoanBrief
1044
+ )?.name
1045
+ }
1046
+ </MText>
1047
+ <DropDown2 />
1048
+ </TouchableOpacity>
1049
+ {errors && errors.typeLoanBrief && (
1050
+ <MText style={$error}>{errors.typeLoanBrief}</MText>
1051
+ )}
1052
+ </View>
1053
+ <View style={{ flex: 1 }}>
1054
+ <MText style={$label}>Loại xe</MText>
1055
+ <TouchableOpacity
1056
+ style={$select}
1057
+ onPress={() => {
1058
+ navigation.push(ScreenNames.MSelect, {
1059
+ title: 'Loại xe',
1060
+ data: EnumTypeCar,
1061
+ callback: (value) => {
1062
+ setFieldValue('carTypeId', value.id);
1063
+ },
1064
+ });
1065
+ }}
1066
+ >
1067
+ <MText
1068
+ numberOfLines={1}
1069
+ style={{
1070
+ color: '#333333',
1071
+ fontSize: 16,
1072
+ fontWeight: '500',
1073
+ flex: 1,
1074
+ fontFamily: 'Be Vietnam Pro Medium',
1075
+ }}
1076
+ >
1077
+ {
1078
+ EnumTypeCar.find((x) => x.id === values.carTypeId)
1079
+ ?.name
1080
+ }
1081
+ </MText>
1082
+ <DropDown2 />
1083
+ </TouchableOpacity>
1084
+ {errors && errors.carTypeId && (
1085
+ <MText style={$error}>{errors.carTypeId}</MText>
1086
+ )}
1087
+ </View>
1088
+ </View>
990
1089
  <MButton
991
1090
  onPress={() => {
992
1091
  handleSubmit();