react-native-timacare 1.0.1 → 1.0.3

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 (144) 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 +16 -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/assets/icons/update.svg +5 -0
  12. package/lib/commonjs/components/CommonSelect.js +2 -0
  13. package/lib/commonjs/components/CommonSelect.js.flow +12 -0
  14. package/lib/commonjs/components/CommonSelect.js.map +1 -0
  15. package/lib/commonjs/components/MText.js +1 -1
  16. package/lib/commonjs/components/MText.js.flow +2 -2
  17. package/lib/commonjs/components/MText.js.map +1 -1
  18. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  19. package/lib/commonjs/navigation/primary-navigator.js.flow +6 -0
  20. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  21. package/lib/commonjs/screens/digital-lending/Step1.js +2 -0
  22. package/lib/commonjs/screens/digital-lending/Step1.js.flow +670 -0
  23. package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -0
  24. package/lib/commonjs/screens/digital-lending/Step2.js +2 -0
  25. package/lib/commonjs/screens/digital-lending/Step2.js.flow +613 -0
  26. package/lib/commonjs/screens/digital-lending/Step2.js.map +1 -0
  27. package/lib/commonjs/screens/digital-lending/Step3.js +2 -0
  28. package/lib/commonjs/screens/digital-lending/Step3.js.flow +606 -0
  29. package/lib/commonjs/screens/digital-lending/Step3.js.map +1 -0
  30. package/lib/commonjs/screens/digital-lending/Step4.js +2 -0
  31. package/lib/commonjs/screens/digital-lending/Step4.js.flow +496 -0
  32. package/lib/commonjs/screens/digital-lending/Step4.js.map +1 -0
  33. package/lib/commonjs/screens/digital-lending/Step5.js +2 -0
  34. package/lib/commonjs/screens/digital-lending/Step5.js.flow +350 -0
  35. package/lib/commonjs/screens/digital-lending/Step5.js.map +1 -0
  36. package/lib/commonjs/screens/digital-lending/Step6.js +2 -0
  37. package/lib/commonjs/screens/digital-lending/Step6.js.flow +369 -0
  38. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -0
  39. package/lib/commonjs/screens/digital-lending/index.js +2 -0
  40. package/lib/commonjs/screens/digital-lending/index.js.flow +110 -0
  41. package/lib/commonjs/screens/digital-lending/index.js.map +1 -0
  42. package/lib/commonjs/screens/digital-lending/store.js +2 -0
  43. package/lib/commonjs/screens/digital-lending/store.js.flow +294 -0
  44. package/lib/commonjs/screens/digital-lending/store.js.map +1 -0
  45. package/lib/commonjs/screens/home/index.js +1 -1
  46. package/lib/commonjs/screens/home/index.js.flow +475 -0
  47. package/lib/commonjs/screens/home/index.js.map +1 -1
  48. package/lib/commonjs/screens/register/index.js +1 -1
  49. package/lib/commonjs/screens/register/index.js.flow +1 -1
  50. package/lib/commonjs/services/api/api-config.js +1 -1
  51. package/lib/commonjs/services/api/api-config.js.flow +2 -2
  52. package/lib/commonjs/services/api/api-config.js.map +1 -1
  53. package/lib/commonjs/services/api/api.js +1 -1
  54. package/lib/commonjs/services/api/api.js.flow +95 -0
  55. package/lib/commonjs/services/api/api.js.map +1 -1
  56. package/lib/module/assets/icons/back2.svg +13 -0
  57. package/lib/module/assets/icons/check1.svg +4 -0
  58. package/lib/module/assets/icons/check2.svg +9 -0
  59. package/lib/module/assets/icons/error.svg +6 -0
  60. package/lib/module/assets/icons/index.js +1 -1
  61. package/lib/module/assets/icons/index.js.map +1 -1
  62. package/lib/module/assets/icons/line2.svg +12 -0
  63. package/lib/module/assets/icons/next.svg +6 -0
  64. package/lib/module/assets/icons/step.svg +9 -0
  65. package/lib/module/assets/icons/update.svg +5 -0
  66. package/lib/module/components/CommonSelect.js +2 -0
  67. package/lib/module/components/CommonSelect.js.map +1 -0
  68. package/lib/module/components/MText.js +1 -1
  69. package/lib/module/components/MText.js.map +1 -1
  70. package/lib/module/navigation/primary-navigator.js +1 -1
  71. package/lib/module/navigation/primary-navigator.js.map +1 -1
  72. package/lib/module/screens/digital-lending/Step1.js +2 -0
  73. package/lib/module/screens/digital-lending/Step1.js.map +1 -0
  74. package/lib/module/screens/digital-lending/Step2.js +2 -0
  75. package/lib/module/screens/digital-lending/Step2.js.map +1 -0
  76. package/lib/module/screens/digital-lending/Step3.js +2 -0
  77. package/lib/module/screens/digital-lending/Step3.js.map +1 -0
  78. package/lib/module/screens/digital-lending/Step4.js +2 -0
  79. package/lib/module/screens/digital-lending/Step4.js.map +1 -0
  80. package/lib/module/screens/digital-lending/Step5.js +2 -0
  81. package/lib/module/screens/digital-lending/Step5.js.map +1 -0
  82. package/lib/module/screens/digital-lending/Step6.js +2 -0
  83. package/lib/module/screens/digital-lending/Step6.js.map +1 -0
  84. package/lib/module/screens/digital-lending/index.js +2 -0
  85. package/lib/module/screens/digital-lending/index.js.map +1 -0
  86. package/lib/module/screens/digital-lending/store.js +2 -0
  87. package/lib/module/screens/digital-lending/store.js.map +1 -0
  88. package/lib/module/screens/home/index.js +1 -1
  89. package/lib/module/screens/home/index.js.map +1 -1
  90. package/lib/module/screens/register/index.js +1 -1
  91. package/lib/module/services/api/api-config.js +1 -1
  92. package/lib/module/services/api/api-config.js.map +1 -1
  93. package/lib/module/services/api/api.js +1 -1
  94. package/lib/module/services/api/api.js.map +1 -1
  95. package/lib/typescript/assets/icons/index.d.ts +9 -1
  96. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  97. package/lib/typescript/components/CommonSelect.d.ts +8 -0
  98. package/lib/typescript/components/CommonSelect.d.ts.map +1 -0
  99. package/lib/typescript/navigation/primary-navigator.d.ts +1 -0
  100. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  101. package/lib/typescript/screens/digital-lending/Step1.d.ts +2 -0
  102. package/lib/typescript/screens/digital-lending/Step1.d.ts.map +1 -0
  103. package/lib/typescript/screens/digital-lending/Step2.d.ts +2 -0
  104. package/lib/typescript/screens/digital-lending/Step2.d.ts.map +1 -0
  105. package/lib/typescript/screens/digital-lending/Step3.d.ts +2 -0
  106. package/lib/typescript/screens/digital-lending/Step3.d.ts.map +1 -0
  107. package/lib/typescript/screens/digital-lending/Step4.d.ts +2 -0
  108. package/lib/typescript/screens/digital-lending/Step4.d.ts.map +1 -0
  109. package/lib/typescript/screens/digital-lending/Step5.d.ts +2 -0
  110. package/lib/typescript/screens/digital-lending/Step5.d.ts.map +1 -0
  111. package/lib/typescript/screens/digital-lending/Step6.d.ts +2 -0
  112. package/lib/typescript/screens/digital-lending/Step6.d.ts.map +1 -0
  113. package/lib/typescript/screens/digital-lending/index.d.ts +2 -0
  114. package/lib/typescript/screens/digital-lending/index.d.ts.map +1 -0
  115. package/lib/typescript/screens/digital-lending/store.d.ts +35 -0
  116. package/lib/typescript/screens/digital-lending/store.d.ts.map +1 -0
  117. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  118. package/lib/typescript/services/api/api.d.ts +80 -19
  119. package/lib/typescript/services/api/api.d.ts.map +1 -1
  120. package/package.json +1 -1
  121. package/src/assets/icons/back2.svg +13 -0
  122. package/src/assets/icons/check1.svg +4 -0
  123. package/src/assets/icons/check2.svg +9 -0
  124. package/src/assets/icons/error.svg +6 -0
  125. package/src/assets/icons/index.tsx +16 -0
  126. package/src/assets/icons/line2.svg +12 -0
  127. package/src/assets/icons/next.svg +6 -0
  128. package/src/assets/icons/step.svg +9 -0
  129. package/src/assets/icons/update.svg +5 -0
  130. package/src/components/CommonSelect.tsx +12 -0
  131. package/src/components/MText.tsx +2 -2
  132. package/src/navigation/primary-navigator.tsx +6 -0
  133. package/src/screens/digital-lending/Step1.tsx +670 -0
  134. package/src/screens/digital-lending/Step2.tsx +613 -0
  135. package/src/screens/digital-lending/Step3.tsx +606 -0
  136. package/src/screens/digital-lending/Step4.tsx +496 -0
  137. package/src/screens/digital-lending/Step5.tsx +350 -0
  138. package/src/screens/digital-lending/Step6.tsx +369 -0
  139. package/src/screens/digital-lending/index.tsx +110 -0
  140. package/src/screens/digital-lending/store.tsx +294 -0
  141. package/src/screens/home/index.tsx +475 -0
  142. package/src/screens/register/index.tsx +1 -1
  143. package/src/services/api/api-config.ts +2 -2
  144. package/src/services/api/api.ts +95 -0
@@ -0,0 +1,496 @@
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
+ flex: 1,
274
+ color: '#33333',
275
+ height: 30,
276
+ marginVertical: 0,
277
+ flex: 1,
278
+ padding: 0,
279
+ }}
280
+ />
281
+ </View>
282
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
283
+ <View style={{ marginTop: 12 }}>
284
+ <MText style={{ color: '#8A8A8A' }}>Số khung</MText>
285
+ <TextInput
286
+ value={values.chassis}
287
+ onChangeText={handleChange('chassis')}
288
+ style={{
289
+ color: '#33333',
290
+ height: 30,
291
+ marginVertical: 0,
292
+ flex: 1,
293
+ padding: 0,
294
+ }}
295
+ />
296
+ </View>
297
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
298
+ <View style={{ marginTop: 12 }}>
299
+ <MText style={{ color: '#8A8A8A' }}>Số máy</MText>
300
+ <TextInput
301
+ value={values.engine}
302
+ onChangeText={handleChange('engine')}
303
+ style={{
304
+ color: '#33333',
305
+ height: 30,
306
+ marginVertical: 0,
307
+ flex: 1,
308
+ padding: 0,
309
+ }}
310
+ />
311
+ </View>
312
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
313
+ <View style={{ marginTop: 12 }}>
314
+ <MText style={{ color: '#8A8A8A' }}>Họ tên chủ xe</MText>
315
+ <TextInput
316
+ value={values.ownerFullName}
317
+ onChangeText={handleChange('ownerFullName')}
318
+ style={{
319
+ color: '#33333',
320
+ height: 30,
321
+ marginVertical: 0,
322
+ flex: 1,
323
+ padding: 0,
324
+ }}
325
+ />
326
+ </View>
327
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
328
+ <View style={{ marginTop: 12 }}>
329
+ <MText style={{ color: '#8A8A8A' }}>Số đăng ký xe</MText>
330
+ <TextInput
331
+ value={values.motobikeCertificateNumber}
332
+ onChangeText={handleChange('motobikeCertificateNumber')}
333
+ style={{
334
+ color: '#33333',
335
+ height: 30,
336
+ marginVertical: 0,
337
+ flex: 1,
338
+ padding: 0,
339
+ }}
340
+ />
341
+ </View>
342
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
343
+ <View style={{ marginTop: 12 }}>
344
+ <MText style={{ color: '#8A8A8A' }}>Ngày đăng ký xe</MText>
345
+ <TouchableOpacity
346
+ onPress={() => {
347
+ setShowDatePicker(true);
348
+ }}
349
+ style={{
350
+ height: 30,
351
+ flex: 1,
352
+ marginTop: 5,
353
+ }}
354
+ >
355
+ <MText>{values.motobikeCertificateDate}</MText>
356
+ </TouchableOpacity>
357
+ </View>
358
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
359
+ <View
360
+ style={{
361
+ marginTop: 12,
362
+ backgroundColor: '#F2F2F2',
363
+ borderRadius: 4,
364
+ padding: 8,
365
+ }}
366
+ >
367
+ <MText style={{ color: '#8A8A8A' }}>Giá trước thẩm định</MText>
368
+ <MText>
369
+ {formatMoney(digitalLendingStore?.data.loanAmountExpertiseAi)}{' '}
370
+ VND
371
+ </MText>
372
+ </View>
373
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
374
+ <View
375
+ style={{
376
+ marginTop: 12,
377
+ backgroundColor: '#F2F2F2',
378
+ borderRadius: 4,
379
+ padding: 8,
380
+ marginBottom: 12,
381
+ }}
382
+ >
383
+ <MText style={{ color: '#8A8A8A' }}>Giá sau thẩm định</MText>
384
+ <MText>
385
+ {formatMoney(
386
+ digitalLendingStore?.data.loanAmountExpertiseLast
387
+ )}{' '}
388
+ VND
389
+ </MText>
390
+ </View>
391
+ <KeyboardSpacer />
392
+ <DatePicker
393
+ mode="date"
394
+ open={showDatePicker}
395
+ modal
396
+ title="Chọn thời gian"
397
+ locale="vi"
398
+ date={new Date()}
399
+ onCancel={() => {
400
+ setShowDatePicker(false);
401
+ }}
402
+ onConfirm={(date) => {
403
+ setShowDatePicker(false);
404
+ setFieldValue('motobikeCertificateDate', formatDDMMYYY(date));
405
+ }}
406
+ />
407
+ </View>
408
+ )}
409
+ </Formik>
410
+ </ScrollView>
411
+ <View
412
+ style={{
413
+ backgroundColor: 'white',
414
+ shadowOffset: {
415
+ width: 2,
416
+ height: 1,
417
+ },
418
+ ...Platform.select({
419
+ ios: {
420
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
421
+ shadowOpacity: 0.2,
422
+ },
423
+ android: {
424
+ elevation: 10,
425
+ },
426
+ }),
427
+ paddingTop: 12,
428
+ paddingHorizontal: 12,
429
+ flexDirection: 'row',
430
+ paddingBottom: 16,
431
+ justifyContent: 'space-between',
432
+ alignItems: 'center',
433
+ }}
434
+ >
435
+ <TouchableOpacity
436
+ onPress={() => (digitalLendingStore.step = 3)}
437
+ style={{
438
+ paddingHorizontal: 12,
439
+ paddingVertical: 8,
440
+ borderRadius: 40,
441
+ flexDirection: 'row',
442
+ alignItems: 'center',
443
+ borderWidth: 1,
444
+ borderColor: '#FF8E4F',
445
+ }}
446
+ >
447
+ <Back2Icon />
448
+ <MText
449
+ style={{
450
+ marginLeft: 5,
451
+ color: '#FF8E4F',
452
+ fontSize: 16,
453
+ fontWeight: '500',
454
+ }}
455
+ >
456
+ Trở lại
457
+ </MText>
458
+ </TouchableOpacity>
459
+ <StepIcon />
460
+ <TouchableOpacity
461
+ onPress={() => {
462
+ digitalLendingStore.step = 5;
463
+ ref.current.handleSubmit();
464
+ }}
465
+ >
466
+ <LinearGradient
467
+ colors={['#FF8E4F', '#EF592E']}
468
+ style={{
469
+ paddingHorizontal: 12,
470
+ paddingVertical: 8,
471
+ borderRadius: 40,
472
+ flexDirection: 'row',
473
+ alignItems: 'center',
474
+ }}
475
+ >
476
+ <MText
477
+ style={{
478
+ color: 'white',
479
+ fontSize: 16,
480
+ fontWeight: '500',
481
+ marginRight: 5,
482
+ }}
483
+ >
484
+ Tiếp tục
485
+ </MText>
486
+ <NextIcon />
487
+ </LinearGradient>
488
+ </TouchableOpacity>
489
+ </View>
490
+ </View>
491
+ );
492
+ });
493
+
494
+ const styles = StyleSheet.create({
495
+ input: {},
496
+ });