react-native-timacare 1.0.0 → 1.0.2

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 (165) hide show
  1. package/lib/commonjs/assets/icons/back2.svg +13 -0
  2. package/lib/commonjs/assets/icons/check1.svg +4 -0
  3. package/lib/commonjs/assets/icons/check2.svg +9 -0
  4. package/lib/commonjs/assets/icons/error.svg +6 -0
  5. package/lib/commonjs/assets/icons/index.js +1 -1
  6. package/lib/commonjs/assets/icons/index.js.flow +14 -0
  7. package/lib/commonjs/assets/icons/index.js.map +1 -1
  8. package/lib/commonjs/assets/icons/line2.svg +12 -0
  9. package/lib/commonjs/assets/icons/next.svg +6 -0
  10. package/lib/commonjs/assets/icons/step.svg +9 -0
  11. package/lib/commonjs/components/CommonSelect.js +2 -0
  12. package/lib/commonjs/components/CommonSelect.js.flow +12 -0
  13. package/lib/commonjs/components/CommonSelect.js.map +1 -0
  14. package/lib/commonjs/components/MText.js +1 -1
  15. package/lib/commonjs/components/MText.js.flow +2 -2
  16. package/lib/commonjs/components/MText.js.map +1 -1
  17. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  18. package/lib/commonjs/navigation/primary-navigator.js.flow +6 -0
  19. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  20. package/lib/commonjs/screens/detail-loan/store.js +1 -1
  21. package/lib/commonjs/screens/detail-loan/store.js.flow +1 -1
  22. package/lib/commonjs/screens/detail-loan/store.js.map +1 -1
  23. package/lib/commonjs/screens/digital-lending/Step1.js +2 -0
  24. package/lib/commonjs/screens/digital-lending/Step1.js.flow +661 -0
  25. package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -0
  26. package/lib/commonjs/screens/digital-lending/Step2.js +2 -0
  27. package/lib/commonjs/screens/digital-lending/Step2.js.flow +610 -0
  28. package/lib/commonjs/screens/digital-lending/Step2.js.map +1 -0
  29. package/lib/commonjs/screens/digital-lending/Step3.js +2 -0
  30. package/lib/commonjs/screens/digital-lending/Step3.js.flow +602 -0
  31. package/lib/commonjs/screens/digital-lending/Step3.js.map +1 -0
  32. package/lib/commonjs/screens/digital-lending/Step4.js +2 -0
  33. package/lib/commonjs/screens/digital-lending/Step4.js.flow +495 -0
  34. package/lib/commonjs/screens/digital-lending/Step4.js.map +1 -0
  35. package/lib/commonjs/screens/digital-lending/Step5.js +2 -0
  36. package/lib/commonjs/screens/digital-lending/Step5.js.flow +350 -0
  37. package/lib/commonjs/screens/digital-lending/Step5.js.map +1 -0
  38. package/lib/commonjs/screens/digital-lending/Step6.js +2 -0
  39. package/lib/commonjs/screens/digital-lending/Step6.js.flow +366 -0
  40. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -0
  41. package/lib/commonjs/screens/digital-lending/index.js +2 -0
  42. package/lib/commonjs/screens/digital-lending/index.js.flow +110 -0
  43. package/lib/commonjs/screens/digital-lending/index.js.map +1 -0
  44. package/lib/commonjs/screens/digital-lending/store.js +2 -0
  45. package/lib/commonjs/screens/digital-lending/store.js.flow +294 -0
  46. package/lib/commonjs/screens/digital-lending/store.js.map +1 -0
  47. package/lib/commonjs/screens/full-submit/accept_policy.js +1 -1
  48. package/lib/commonjs/screens/full-submit/accept_policy.js.flow +1 -1
  49. package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -1
  50. package/lib/commonjs/screens/home/index.js +1 -1
  51. package/lib/commonjs/screens/home/index.js.flow +467 -0
  52. package/lib/commonjs/screens/home/index.js.map +1 -1
  53. package/lib/commonjs/screens/notification/index.js +1 -1
  54. package/lib/commonjs/screens/notification/index.js.flow +1 -1
  55. package/lib/commonjs/screens/notification/index.js.map +1 -1
  56. package/lib/commonjs/screens/register/index.js +1 -1
  57. package/lib/commonjs/screens/register/index.js.flow +1 -1
  58. package/lib/commonjs/screens/schedule-payment/index.js +1 -1
  59. package/lib/commonjs/screens/schedule-payment/index.js.flow +1 -1
  60. package/lib/commonjs/screens/schedule-payment/index.js.map +1 -1
  61. package/lib/commonjs/services/api/api-config.js +1 -1
  62. package/lib/commonjs/services/api/api-config.js.flow +2 -2
  63. package/lib/commonjs/services/api/api-config.js.map +1 -1
  64. package/lib/commonjs/services/api/api.js +1 -1
  65. package/lib/commonjs/services/api/api.js.flow +95 -0
  66. package/lib/commonjs/services/api/api.js.map +1 -1
  67. package/lib/module/assets/icons/back2.svg +13 -0
  68. package/lib/module/assets/icons/check1.svg +4 -0
  69. package/lib/module/assets/icons/check2.svg +9 -0
  70. package/lib/module/assets/icons/error.svg +6 -0
  71. package/lib/module/assets/icons/index.js +1 -1
  72. package/lib/module/assets/icons/index.js.map +1 -1
  73. package/lib/module/assets/icons/line2.svg +12 -0
  74. package/lib/module/assets/icons/next.svg +6 -0
  75. package/lib/module/assets/icons/step.svg +9 -0
  76. package/lib/module/components/CommonSelect.js +2 -0
  77. package/lib/module/components/CommonSelect.js.map +1 -0
  78. package/lib/module/components/MText.js +1 -1
  79. package/lib/module/components/MText.js.map +1 -1
  80. package/lib/module/navigation/primary-navigator.js +1 -1
  81. package/lib/module/navigation/primary-navigator.js.map +1 -1
  82. package/lib/module/screens/detail-loan/store.js +1 -1
  83. package/lib/module/screens/detail-loan/store.js.map +1 -1
  84. package/lib/module/screens/digital-lending/Step1.js +2 -0
  85. package/lib/module/screens/digital-lending/Step1.js.map +1 -0
  86. package/lib/module/screens/digital-lending/Step2.js +2 -0
  87. package/lib/module/screens/digital-lending/Step2.js.map +1 -0
  88. package/lib/module/screens/digital-lending/Step3.js +2 -0
  89. package/lib/module/screens/digital-lending/Step3.js.map +1 -0
  90. package/lib/module/screens/digital-lending/Step4.js +2 -0
  91. package/lib/module/screens/digital-lending/Step4.js.map +1 -0
  92. package/lib/module/screens/digital-lending/Step5.js +2 -0
  93. package/lib/module/screens/digital-lending/Step5.js.map +1 -0
  94. package/lib/module/screens/digital-lending/Step6.js +2 -0
  95. package/lib/module/screens/digital-lending/Step6.js.map +1 -0
  96. package/lib/module/screens/digital-lending/index.js +2 -0
  97. package/lib/module/screens/digital-lending/index.js.map +1 -0
  98. package/lib/module/screens/digital-lending/store.js +2 -0
  99. package/lib/module/screens/digital-lending/store.js.map +1 -0
  100. package/lib/module/screens/full-submit/accept_policy.js +1 -1
  101. package/lib/module/screens/full-submit/accept_policy.js.map +1 -1
  102. package/lib/module/screens/home/index.js +1 -1
  103. package/lib/module/screens/home/index.js.map +1 -1
  104. package/lib/module/screens/notification/index.js +1 -1
  105. package/lib/module/screens/notification/index.js.map +1 -1
  106. package/lib/module/screens/register/index.js +1 -1
  107. package/lib/module/screens/schedule-payment/index.js +1 -1
  108. package/lib/module/screens/schedule-payment/index.js.map +1 -1
  109. package/lib/module/services/api/api-config.js +1 -1
  110. package/lib/module/services/api/api-config.js.map +1 -1
  111. package/lib/module/services/api/api.js +1 -1
  112. package/lib/module/services/api/api.js.map +1 -1
  113. package/lib/typescript/assets/icons/index.d.ts +8 -1
  114. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  115. package/lib/typescript/components/CommonSelect.d.ts +8 -0
  116. package/lib/typescript/components/CommonSelect.d.ts.map +1 -0
  117. package/lib/typescript/navigation/primary-navigator.d.ts +1 -0
  118. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  119. package/lib/typescript/screens/digital-lending/Step1.d.ts +2 -0
  120. package/lib/typescript/screens/digital-lending/Step1.d.ts.map +1 -0
  121. package/lib/typescript/screens/digital-lending/Step2.d.ts +2 -0
  122. package/lib/typescript/screens/digital-lending/Step2.d.ts.map +1 -0
  123. package/lib/typescript/screens/digital-lending/Step3.d.ts +2 -0
  124. package/lib/typescript/screens/digital-lending/Step3.d.ts.map +1 -0
  125. package/lib/typescript/screens/digital-lending/Step4.d.ts +2 -0
  126. package/lib/typescript/screens/digital-lending/Step4.d.ts.map +1 -0
  127. package/lib/typescript/screens/digital-lending/Step5.d.ts +2 -0
  128. package/lib/typescript/screens/digital-lending/Step5.d.ts.map +1 -0
  129. package/lib/typescript/screens/digital-lending/Step6.d.ts +2 -0
  130. package/lib/typescript/screens/digital-lending/Step6.d.ts.map +1 -0
  131. package/lib/typescript/screens/digital-lending/index.d.ts +2 -0
  132. package/lib/typescript/screens/digital-lending/index.d.ts.map +1 -0
  133. package/lib/typescript/screens/digital-lending/store.d.ts +35 -0
  134. package/lib/typescript/screens/digital-lending/store.d.ts.map +1 -0
  135. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  136. package/lib/typescript/services/api/api.d.ts +80 -19
  137. package/lib/typescript/services/api/api.d.ts.map +1 -1
  138. package/package.json +1 -1
  139. package/src/assets/icons/back2.svg +13 -0
  140. package/src/assets/icons/check1.svg +4 -0
  141. package/src/assets/icons/check2.svg +9 -0
  142. package/src/assets/icons/error.svg +6 -0
  143. package/src/assets/icons/index.tsx +14 -0
  144. package/src/assets/icons/line2.svg +12 -0
  145. package/src/assets/icons/next.svg +6 -0
  146. package/src/assets/icons/step.svg +9 -0
  147. package/src/components/CommonSelect.tsx +12 -0
  148. package/src/components/MText.tsx +2 -2
  149. package/src/navigation/primary-navigator.tsx +6 -0
  150. package/src/screens/detail-loan/store.tsx +1 -1
  151. package/src/screens/digital-lending/Step1.tsx +661 -0
  152. package/src/screens/digital-lending/Step2.tsx +610 -0
  153. package/src/screens/digital-lending/Step3.tsx +602 -0
  154. package/src/screens/digital-lending/Step4.tsx +495 -0
  155. package/src/screens/digital-lending/Step5.tsx +350 -0
  156. package/src/screens/digital-lending/Step6.tsx +366 -0
  157. package/src/screens/digital-lending/index.tsx +110 -0
  158. package/src/screens/digital-lending/store.tsx +294 -0
  159. package/src/screens/full-submit/accept_policy.tsx +1 -1
  160. package/src/screens/home/index.tsx +467 -0
  161. package/src/screens/notification/index.tsx +1 -1
  162. package/src/screens/register/index.tsx +1 -1
  163. package/src/screens/schedule-payment/index.tsx +1 -1
  164. package/src/services/api/api-config.ts +2 -2
  165. package/src/services/api/api.ts +95 -0
@@ -0,0 +1,495 @@
1
+ //@ts-nocheck
2
+ import React, { useRef, useState } from 'react';
3
+ import { observer } from 'mobx-react-lite';
4
+ import {
5
+ Platform,
6
+ ScrollView,
7
+ TouchableOpacity,
8
+ View,
9
+ StyleSheet,
10
+ TextInput,
11
+ } from 'react-native';
12
+ import LinearGradient from 'react-native-linear-gradient';
13
+ import {
14
+ Back2Icon,
15
+ StepIcon,
16
+ NextIcon,
17
+ Line2Icon,
18
+ WarningIcon,
19
+ } from '../../assets/icons';
20
+ import { MText } from '../../components/MText';
21
+ import { Formik } from 'formik';
22
+ import digitalLendingStore from './store';
23
+ import { useNavigation } from '@react-navigation/native';
24
+ import { formatDDMMYYY, formatMoney } from '../../utils';
25
+ import DatePicker from 'react-native-date-picker';
26
+ import KeyboardSpacer from '../../components/keyboardspace';
27
+
28
+ export const Step4 = observer(function Step4() {
29
+ const navigation = useNavigation();
30
+ const [showDatePicker, setShowDatePicker] = useState(false);
31
+ const ref = useRef();
32
+
33
+ const onSubmit = (values) => {
34
+ digitalLendingStore.body = {
35
+ ...digitalLendingStore.body,
36
+ brandId: values?.brandId?.id,
37
+ vehicles: values?.vehicles?.id,
38
+ plateNumber: values?.plateNumber,
39
+ chassis: values?.chassis,
40
+ engine: values?.engine,
41
+ ownerFullName: values?.ownerFullName,
42
+ motobikeCertificateNumber: values?.motobikeCertificateNumber,
43
+ loanAmountExpertiseAi: digitalLendingStore?.data?.loanAmountExpertiseAi,
44
+ loanAmountExpertiseLast:
45
+ digitalLendingStore?.data?.loanAmountExpertiseLast,
46
+ motobikeCertificateDate: values?.motobikeCertificateDate,
47
+ };
48
+ };
49
+ return (
50
+ <View style={{ flex: 1 }}>
51
+ <ScrollView style={{ paddingHorizontal: 12 }}>
52
+ <View
53
+ style={{
54
+ flexDirection: 'row',
55
+ justifyContent: 'space-between',
56
+ alignItems: 'center',
57
+ paddingVertical: 16,
58
+ }}
59
+ >
60
+ <View
61
+ style={{
62
+ width: 40,
63
+ height: 40,
64
+ borderRadius: 40,
65
+ alignItems: 'center',
66
+ justifyContent: 'center',
67
+ shadowRadius: 40,
68
+ backgroundColor: '#FFF3E9',
69
+ borderWidth: 1,
70
+ borderColor: '#FF8E4F',
71
+ }}
72
+ >
73
+ <MText style={{ fontWeight: 'bold', color: '#FF8E4F' }}>01</MText>
74
+ </View>
75
+ <View
76
+ style={{
77
+ width: 40,
78
+ height: 40,
79
+ borderRadius: 40,
80
+ alignItems: 'center',
81
+ justifyContent: 'center',
82
+ shadowRadius: 40,
83
+ backgroundColor: '#FFF3E9',
84
+ borderWidth: 1,
85
+ borderColor: '#FF8E4F',
86
+ }}
87
+ >
88
+ <MText style={{ color: '#FF8E4F', fontWeight: 'bold' }}>02</MText>
89
+ </View>
90
+ <View
91
+ style={{
92
+ width: 40,
93
+ height: 40,
94
+ borderRadius: 40,
95
+ alignItems: 'center',
96
+ justifyContent: 'center',
97
+ shadowRadius: 40,
98
+ backgroundColor: '#FFF3E9',
99
+ borderWidth: 1,
100
+ borderColor: '#FF8E4F',
101
+ }}
102
+ >
103
+ <MText style={{ color: '#FF8E4F', fontWeight: 'bold' }}>03</MText>
104
+ </View>
105
+
106
+ <LinearGradient
107
+ colors={['#FF8E4F', '#EF592E']}
108
+ style={{
109
+ width: 40,
110
+ height: 40,
111
+ borderRadius: 40,
112
+ alignItems: 'center',
113
+ justifyContent: 'center',
114
+ }}
115
+ >
116
+ <MText style={{ fontWeight: 'bold', color: 'white' }}>04</MText>
117
+ </LinearGradient>
118
+ <Line2Icon />
119
+ <View
120
+ style={{
121
+ width: 40,
122
+ height: 40,
123
+ borderRadius: 40,
124
+ alignItems: 'center',
125
+ justifyContent: 'center',
126
+ shadowRadius: 40,
127
+ backgroundColor: 'white',
128
+ shadowOffset: {
129
+ width: 2,
130
+ height: 1,
131
+ },
132
+ ...Platform.select({
133
+ ios: {
134
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
135
+ shadowOpacity: 0.2,
136
+ },
137
+ android: {
138
+ elevation: 10,
139
+ },
140
+ }),
141
+ }}
142
+ >
143
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>05</MText>
144
+ </View>
145
+ <View
146
+ style={{
147
+ width: 40,
148
+ height: 40,
149
+ borderRadius: 40,
150
+ alignItems: 'center',
151
+ justifyContent: 'center',
152
+ shadowRadius: 40,
153
+ backgroundColor: 'white',
154
+ shadowOffset: {
155
+ width: 2,
156
+ height: 1,
157
+ },
158
+ ...Platform.select({
159
+ ios: {
160
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
161
+ shadowOpacity: 0.2,
162
+ },
163
+ android: {
164
+ elevation: 10,
165
+ },
166
+ }),
167
+ }}
168
+ >
169
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>06</MText>
170
+ </View>
171
+ </View>
172
+ <MText style={{ fontWeight: 'bold' }}>THÔNG TIN TÀI SẢN (XE)</MText>
173
+ <View
174
+ style={{ height: 1, backgroundColor: '#BDBDBD', marginTop: 16 }}
175
+ />
176
+ <View
177
+ style={{
178
+ backgroundColor: '#EB5757',
179
+ flexDirection: 'row',
180
+ padding: 8,
181
+ alignItems: 'center',
182
+ borderRadius: 8,
183
+ marginTop: 12,
184
+ }}
185
+ >
186
+ <WarningIcon />
187
+ <MText style={{ flex: 1, color: 'white', marginLeft: 8 }}>
188
+ Kiểm tra lại thông tin của bạn, nếu chưa chính xác hoặc đã cũ, hãy
189
+ cập nhật lại thông tin mới nhất nhé!
190
+ </MText>
191
+ </View>
192
+ <Formik
193
+ onSubmit={onSubmit}
194
+ innerRef={ref}
195
+ initialValues={{
196
+ brandId: digitalLendingStore?.data?.brandId
197
+ ? {
198
+ id: digitalLendingStore?.data?.brandId,
199
+ name: digitalLendingStore?.data?.brandName,
200
+ }
201
+ : null,
202
+ plateNumber: digitalLendingStore?.data?.plateNumber,
203
+ vehicles: digitalLendingStore?.data?.vehicles
204
+ ? {
205
+ id: digitalLendingStore?.data?.vehicles,
206
+ name: digitalLendingStore?.data?.vehicleName,
207
+ }
208
+ : null,
209
+ chassis: digitalLendingStore?.data?.chassis,
210
+ engine: digitalLendingStore?.data?.engine,
211
+ ownerFullName: digitalLendingStore?.data?.ownerFullName,
212
+ motobikeCertificateNumber:
213
+ digitalLendingStore?.data?.motobikeCertificateNumber,
214
+ motobikeCertificateDate:
215
+ digitalLendingStore?.data?.motobikeCertificateDate,
216
+ }}
217
+ >
218
+ {({ values, handleSubmit, handleChange, setFieldValue }) => (
219
+ <View style={{ marginTop: 16 }}>
220
+ <View>
221
+ <MText style={{ color: '#8A8A8A' }}>Hãng xe</MText>
222
+ <TouchableOpacity
223
+ onPress={() => {
224
+ navigation.push('CommonSelect', {
225
+ title: 'Hãng xe',
226
+ data: digitalLendingStore.listBrand,
227
+ callback: (item) => {
228
+ setFieldValue('brandId', item);
229
+ setFieldValue('vehicles', null);
230
+ digitalLendingStore.getBrandName(item?.id);
231
+ },
232
+ });
233
+ }}
234
+ style={{
235
+ height: 30,
236
+ flex: 1,
237
+ marginTop: 5,
238
+ }}
239
+ >
240
+ <MText>{values.brandId ? values.brandId?.name : ''}</MText>
241
+ </TouchableOpacity>
242
+ </View>
243
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
244
+
245
+ <View style={{ marginTop: 12 }}>
246
+ <MText style={{ color: '#8A8A8A' }}>Tên xe</MText>
247
+ <TouchableOpacity
248
+ onPress={() => {
249
+ navigation.push('CommonSelect', {
250
+ title: 'Tên xe',
251
+ data: digitalLendingStore.listBrandName,
252
+ callback: (item) => {
253
+ setFieldValue('vehicles', item);
254
+ },
255
+ });
256
+ }}
257
+ style={{
258
+ height: 30,
259
+ flex: 1,
260
+ marginTop: 5,
261
+ }}
262
+ >
263
+ <MText>{values.vehicles ? values.vehicles?.name : ''}</MText>
264
+ </TouchableOpacity>
265
+ </View>
266
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
267
+ <View style={{ marginTop: 12 }}>
268
+ <MText style={{ color: '#8A8A8A' }}>Biển số xe</MText>
269
+ <TextInput
270
+ value={values.plateNumber}
271
+ onChangeText={handleChange('plateNumber')}
272
+ style={{
273
+ color: '#33333',
274
+ height: 30,
275
+ marginVertical: 0,
276
+ flex: 1,
277
+ padding: 0,
278
+ }}
279
+ />
280
+ </View>
281
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
282
+ <View style={{ marginTop: 12 }}>
283
+ <MText style={{ color: '#8A8A8A' }}>Số khung</MText>
284
+ <TextInput
285
+ value={values.chassis}
286
+ onChangeText={handleChange('chassis')}
287
+ style={{
288
+ color: '#33333',
289
+ height: 30,
290
+ marginVertical: 0,
291
+ flex: 1,
292
+ padding: 0,
293
+ }}
294
+ />
295
+ </View>
296
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
297
+ <View style={{ marginTop: 12 }}>
298
+ <MText style={{ color: '#8A8A8A' }}>Số máy</MText>
299
+ <TextInput
300
+ value={values.engine}
301
+ onChangeText={handleChange('engine')}
302
+ style={{
303
+ color: '#33333',
304
+ height: 30,
305
+ marginVertical: 0,
306
+ flex: 1,
307
+ padding: 0,
308
+ }}
309
+ />
310
+ </View>
311
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
312
+ <View style={{ marginTop: 12 }}>
313
+ <MText style={{ color: '#8A8A8A' }}>Họ tên chủ xe</MText>
314
+ <TextInput
315
+ value={values.ownerFullName}
316
+ onChangeText={handleChange('ownerFullName')}
317
+ style={{
318
+ color: '#33333',
319
+ height: 30,
320
+ marginVertical: 0,
321
+ flex: 1,
322
+ padding: 0,
323
+ }}
324
+ />
325
+ </View>
326
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
327
+ <View style={{ marginTop: 12 }}>
328
+ <MText style={{ color: '#8A8A8A' }}>Số đăng ký xe</MText>
329
+ <TextInput
330
+ value={values.motobikeCertificateNumber}
331
+ onChangeText={handleChange('motobikeCertificateNumber')}
332
+ style={{
333
+ color: '#33333',
334
+ height: 30,
335
+ marginVertical: 0,
336
+ flex: 1,
337
+ padding: 0,
338
+ }}
339
+ />
340
+ </View>
341
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
342
+ <View style={{ marginTop: 12 }}>
343
+ <MText style={{ color: '#8A8A8A' }}>Ngày đăng ký xe</MText>
344
+ <TouchableOpacity
345
+ onPress={() => {
346
+ setShowDatePicker(true);
347
+ }}
348
+ style={{
349
+ height: 30,
350
+ flex: 1,
351
+ marginTop: 5,
352
+ }}
353
+ >
354
+ <MText>{values.motobikeCertificateDate}</MText>
355
+ </TouchableOpacity>
356
+ </View>
357
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
358
+ <View
359
+ style={{
360
+ marginTop: 12,
361
+ backgroundColor: '#F2F2F2',
362
+ borderRadius: 4,
363
+ padding: 8,
364
+ }}
365
+ >
366
+ <MText style={{ color: '#8A8A8A' }}>Giá trước thẩm định</MText>
367
+ <MText>
368
+ {formatMoney(digitalLendingStore?.data.loanAmountExpertiseAi)}{' '}
369
+ VND
370
+ </MText>
371
+ </View>
372
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
373
+ <View
374
+ style={{
375
+ marginTop: 12,
376
+ backgroundColor: '#F2F2F2',
377
+ borderRadius: 4,
378
+ padding: 8,
379
+ marginBottom: 12,
380
+ }}
381
+ >
382
+ <MText style={{ color: '#8A8A8A' }}>Giá sau thẩm định</MText>
383
+ <MText>
384
+ {formatMoney(
385
+ digitalLendingStore?.data.loanAmountExpertiseLast
386
+ )}{' '}
387
+ VND
388
+ </MText>
389
+ </View>
390
+ <KeyboardSpacer />
391
+ <DatePicker
392
+ mode="date"
393
+ open={showDatePicker}
394
+ modal
395
+ title="Chọn thời gian"
396
+ locale="vi"
397
+ date={new Date()}
398
+ onCancel={() => {
399
+ setShowDatePicker(false);
400
+ }}
401
+ onConfirm={(date) => {
402
+ setShowDatePicker(false);
403
+ setFieldValue('motobikeCertificateDate', formatDDMMYYY(date));
404
+ }}
405
+ />
406
+ </View>
407
+ )}
408
+ </Formik>
409
+ </ScrollView>
410
+ <View
411
+ style={{
412
+ backgroundColor: 'white',
413
+ shadowOffset: {
414
+ width: 2,
415
+ height: 1,
416
+ },
417
+ ...Platform.select({
418
+ ios: {
419
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
420
+ shadowOpacity: 0.2,
421
+ },
422
+ android: {
423
+ elevation: 10,
424
+ },
425
+ }),
426
+ paddingTop: 12,
427
+ paddingHorizontal: 12,
428
+ flexDirection: 'row',
429
+ paddingBottom: 16,
430
+ justifyContent: 'space-between',
431
+ alignItems: 'center',
432
+ }}
433
+ >
434
+ <TouchableOpacity
435
+ onPress={() => (digitalLendingStore.step = 3)}
436
+ style={{
437
+ paddingHorizontal: 12,
438
+ paddingVertical: 8,
439
+ borderRadius: 40,
440
+ flexDirection: 'row',
441
+ alignItems: 'center',
442
+ borderWidth: 1,
443
+ borderColor: '#FF8E4F',
444
+ }}
445
+ >
446
+ <Back2Icon />
447
+ <MText
448
+ style={{
449
+ marginLeft: 5,
450
+ color: '#FF8E4F',
451
+ fontSize: 16,
452
+ fontWeight: '500',
453
+ }}
454
+ >
455
+ Trở lại
456
+ </MText>
457
+ </TouchableOpacity>
458
+ <StepIcon />
459
+ <TouchableOpacity
460
+ onPress={() => {
461
+ digitalLendingStore.step = 5;
462
+ ref.current.handleSubmit();
463
+ }}
464
+ >
465
+ <LinearGradient
466
+ colors={['#FF8E4F', '#EF592E']}
467
+ style={{
468
+ paddingHorizontal: 12,
469
+ paddingVertical: 8,
470
+ borderRadius: 40,
471
+ flexDirection: 'row',
472
+ alignItems: 'center',
473
+ }}
474
+ >
475
+ <MText
476
+ style={{
477
+ color: 'white',
478
+ fontSize: 16,
479
+ fontWeight: '500',
480
+ marginRight: 5,
481
+ }}
482
+ >
483
+ Tiếp tục
484
+ </MText>
485
+ <NextIcon />
486
+ </LinearGradient>
487
+ </TouchableOpacity>
488
+ </View>
489
+ </View>
490
+ );
491
+ });
492
+
493
+ const styles = StyleSheet.create({
494
+ input: {},
495
+ });