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,670 @@
1
+ //@ts-nocheck
2
+ import React, { useEffect, useRef, useState } from 'react';
3
+ import { observer, 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 { formatDDMMYYY } from '../../utils';
24
+ import DatePicker from 'react-native-date-picker';
25
+ import KeyboardSpacer from '../../components/keyboardspace';
26
+ import { useNavigation } from '@react-navigation/native';
27
+ import moment from 'moment';
28
+
29
+ const EnumGender = [
30
+ {
31
+ id: 0,
32
+ name: 'Nam',
33
+ },
34
+ {
35
+ id: 1,
36
+ name: 'Nữ',
37
+ },
38
+ ];
39
+
40
+ const EnumMarries = [
41
+ {
42
+ id: 0,
43
+ name: 'Chưa có',
44
+ },
45
+ {
46
+ id: 1,
47
+ name: 'Đã có',
48
+ },
49
+ ];
50
+
51
+ export const Step1 = observer(function Step1() {
52
+ const ref = useRef(null);
53
+ const navigation = useNavigation();
54
+ const [showDatePicker, setShowDatePicker] = useState(false);
55
+ const [typePicker, setTypePicker] = useState(0); // 0 là chọn ngày sinh, 1 chọn ngày cấp
56
+
57
+ useEffect(() => {
58
+ setTimeout(() => {
59
+ ref.current.setFieldValue(
60
+ 'fullName',
61
+ digitalLendingStore?.data?.fullName
62
+ );
63
+ ref.current.setFieldValue('phone', digitalLendingStore?.data?.phone);
64
+ ref.current.setFieldValue(
65
+ 'nationalCardNumber',
66
+ digitalLendingStore?.data?.nationalCard
67
+ );
68
+ ref.current.setFieldValue(
69
+ 'birthDate',
70
+ digitalLendingStore?.data?.dob
71
+ ? formatDDMMYYY(digitalLendingStore?.data?.dob)
72
+ : ''
73
+ );
74
+ ref.current.setFieldValue(
75
+ 'passport',
76
+ digitalLendingStore?.data?.passport
77
+ );
78
+ ref.current.setFieldValue('gender', digitalLendingStore?.data?.gender);
79
+ ref.current.setFieldValue(
80
+ 'facebook',
81
+ digitalLendingStore?.data?.facebookAddress
82
+ );
83
+ ref.current.setFieldValue(
84
+ 'marriage',
85
+ digitalLendingStore?.data?.isMerried
86
+ );
87
+ ref.current.setFieldValue('taxCode', digitalLendingStore?.data?.taxCode);
88
+ ref.current.setFieldValue(
89
+ 'nationalCardPlace',
90
+ digitalLendingStore?.data?.nationalCard_Issue
91
+ );
92
+ ref.current.setFieldValue(
93
+ 'dateNationalId',
94
+ digitalLendingStore?.data?.dateNationalId
95
+ ? formatDDMMYYY(digitalLendingStore?.data?.dateNationalId)
96
+ : ''
97
+ );
98
+ ref.current.setFieldValue(
99
+ 'socialInsuranceNumber',
100
+ digitalLendingStore?.data?.socialInsuranceNumber
101
+ );
102
+ }, 100);
103
+ }, []);
104
+
105
+ const onSubmit = (values: any) => {
106
+ digitalLendingStore.body = {
107
+ ...digitalLendingStore.body,
108
+ loanBriefId: digitalLendingStore?.data?.loanBriefId,
109
+ fullName: values?.fullName,
110
+ phone: digitalLendingStore?.data?.phone,
111
+ nationalCard: digitalLendingStore?.data?.nationalCard,
112
+ dob: moment(values.birthDate, 'DD/MM/YYYY').format('YYYY-MM-DD'),
113
+ gender: values?.gender,
114
+ passport: values?.passport,
115
+ facebookAddress: values?.facebook,
116
+ socialInsuranceNumber: values?.socialInsuranceNumber,
117
+ taxCode: values?.taxCode,
118
+ isMerried: values?.marriage,
119
+ dateNationalId: moment(values.dateNationalId, 'DD/MM/YYYY').format(
120
+ 'YYYY-MM-DD'
121
+ ),
122
+ nationalCard_Issue: values?.nationalCardPlace,
123
+ };
124
+ };
125
+
126
+ return (
127
+ <Observer>
128
+ {() => (
129
+ <View style={{ flex: 1 }}>
130
+ <ScrollView style={{ paddingHorizontal: 12 }}>
131
+ <View
132
+ style={{
133
+ flexDirection: 'row',
134
+ justifyContent: 'space-between',
135
+ alignItems: 'center',
136
+ paddingVertical: 16,
137
+ }}
138
+ >
139
+ <LinearGradient
140
+ colors={['#FF8E4F', '#EF592E']}
141
+ style={{
142
+ width: 40,
143
+ height: 40,
144
+ borderRadius: 40,
145
+ alignItems: 'center',
146
+ justifyContent: 'center',
147
+ }}
148
+ >
149
+ <MText style={{ color: 'white', fontWeight: 'bold' }}>01</MText>
150
+ </LinearGradient>
151
+ <Line2Icon />
152
+ <View
153
+ style={{
154
+ width: 40,
155
+ height: 40,
156
+ borderRadius: 40,
157
+ alignItems: 'center',
158
+ justifyContent: 'center',
159
+ shadowRadius: 40,
160
+ backgroundColor: 'white',
161
+ shadowOffset: {
162
+ width: 2,
163
+ height: 1,
164
+ },
165
+ ...Platform.select({
166
+ ios: {
167
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
168
+ shadowOpacity: 0.2,
169
+ },
170
+ android: {
171
+ elevation: 10,
172
+ },
173
+ }),
174
+ }}
175
+ >
176
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>
177
+ 02
178
+ </MText>
179
+ </View>
180
+ <View
181
+ style={{
182
+ width: 40,
183
+ height: 40,
184
+ borderRadius: 40,
185
+ alignItems: 'center',
186
+ justifyContent: 'center',
187
+ shadowRadius: 40,
188
+ backgroundColor: 'white',
189
+ shadowOffset: {
190
+ width: 2,
191
+ height: 1,
192
+ },
193
+ ...Platform.select({
194
+ ios: {
195
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
196
+ shadowOpacity: 0.2,
197
+ },
198
+ android: {
199
+ elevation: 10,
200
+ },
201
+ }),
202
+ }}
203
+ >
204
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>
205
+ 03
206
+ </MText>
207
+ </View>
208
+ <View
209
+ style={{
210
+ width: 40,
211
+ height: 40,
212
+ borderRadius: 40,
213
+ alignItems: 'center',
214
+ justifyContent: 'center',
215
+ shadowRadius: 40,
216
+ backgroundColor: 'white',
217
+ shadowOffset: {
218
+ width: 2,
219
+ height: 1,
220
+ },
221
+ ...Platform.select({
222
+ ios: {
223
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
224
+ shadowOpacity: 0.2,
225
+ },
226
+ android: {
227
+ elevation: 10,
228
+ },
229
+ }),
230
+ }}
231
+ >
232
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>
233
+ 04
234
+ </MText>
235
+ </View>
236
+ <View
237
+ style={{
238
+ width: 40,
239
+ height: 40,
240
+ borderRadius: 40,
241
+ alignItems: 'center',
242
+ justifyContent: 'center',
243
+ shadowRadius: 40,
244
+ backgroundColor: 'white',
245
+ shadowOffset: {
246
+ width: 2,
247
+ height: 1,
248
+ },
249
+ ...Platform.select({
250
+ ios: {
251
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
252
+ shadowOpacity: 0.2,
253
+ },
254
+ android: {
255
+ elevation: 10,
256
+ },
257
+ }),
258
+ }}
259
+ >
260
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>
261
+ 05
262
+ </MText>
263
+ </View>
264
+ <View
265
+ style={{
266
+ width: 40,
267
+ height: 40,
268
+ borderRadius: 40,
269
+ alignItems: 'center',
270
+ justifyContent: 'center',
271
+ shadowRadius: 40,
272
+ backgroundColor: 'white',
273
+ shadowOffset: {
274
+ width: 2,
275
+ height: 1,
276
+ },
277
+ ...Platform.select({
278
+ ios: {
279
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
280
+ shadowOpacity: 0.2,
281
+ },
282
+ android: {
283
+ elevation: 10,
284
+ },
285
+ }),
286
+ }}
287
+ >
288
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>
289
+ 06
290
+ </MText>
291
+ </View>
292
+ </View>
293
+ <MText style={{ fontWeight: 'bold' }}>THÔNG TIN CÁ NHÂN</MText>
294
+ <View
295
+ style={{ height: 1, backgroundColor: '#BDBDBD', marginTop: 16 }}
296
+ />
297
+ <View
298
+ style={{
299
+ backgroundColor: '#EB5757',
300
+ flexDirection: 'row',
301
+ padding: 8,
302
+ alignItems: 'center',
303
+ borderRadius: 8,
304
+ marginTop: 12,
305
+ }}
306
+ >
307
+ <WarningIcon />
308
+ <MText style={{ flex: 1, color: 'white', marginLeft: 8 }}>
309
+ Kiểm tra lại thông tin của bạn, nếu chưa chính xác hoặc đã cũ,
310
+ hãy cập nhật lại thông tin mới nhất nhé!
311
+ </MText>
312
+ </View>
313
+ <Formik
314
+ onSubmit={onSubmit}
315
+ innerRef={ref}
316
+ initialValues={{
317
+ fullName: digitalLendingStore?.data?.fullName,
318
+ phone: digitalLendingStore?.data?.phone,
319
+ nationalCardNumber: digitalLendingStore?.data?.nationalCard,
320
+ birthDate: digitalLendingStore?.data?.dob
321
+ ? formatDDMMYYY(digitalLendingStore?.data?.dob)
322
+ : '',
323
+ passport: digitalLendingStore?.data?.passport,
324
+ gender: digitalLendingStore?.data?.gender,
325
+ facebook: digitalLendingStore?.data?.facebookAddress,
326
+ marriage: digitalLendingStore?.data?.isMerried,
327
+ taxCode: digitalLendingStore?.data?.taxCode,
328
+ nationalCardPlace:
329
+ digitalLendingStore?.data?.nationalCard_Issue,
330
+ dateNationalId: digitalLendingStore?.data?.dateNationalId
331
+ ? formatDDMMYYY(digitalLendingStore?.data?.dateNationalId)
332
+ : '',
333
+ socialInsuranceNumber:
334
+ digitalLendingStore?.data?.socialInsuranceNumber,
335
+ }}
336
+ >
337
+ {({ values, handleSubmit, handleChange, setFieldValue }) => (
338
+ <View style={{ marginTop: 16 }}>
339
+ <View>
340
+ <MText style={{ color: '#8A8A8A' }}>Họ tên</MText>
341
+ <TextInput
342
+ value={values.fullName}
343
+ onChangeText={handleChange('fullName')}
344
+ style={{
345
+ flex: 1,
346
+ color: '#33333',
347
+ height: 30,
348
+ marginVertical: 0,
349
+ flex: 1,
350
+ padding: 0,
351
+ }}
352
+ />
353
+ </View>
354
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
355
+ <View style={{ marginTop: 12 }}>
356
+ <MText style={{ color: '#8A8A8A' }}>Ngày sinh</MText>
357
+ <TouchableOpacity
358
+ onPress={() => {
359
+ setTypePicker(0);
360
+ setShowDatePicker(true);
361
+ }}
362
+ style={{
363
+ height: 30,
364
+ flex: 1,
365
+ marginTop: 5,
366
+ }}
367
+ >
368
+ <MText>{values.birthDate}</MText>
369
+ </TouchableOpacity>
370
+ </View>
371
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
372
+ <View style={{ marginTop: 12 }}>
373
+ <MText style={{ color: '#8A8A8A' }}>Giới tính</MText>
374
+ <TouchableOpacity
375
+ onPress={() => {
376
+ navigation.push('CommonSelect', {
377
+ title: 'Chọn giới tính',
378
+ data: EnumGender,
379
+ callback: (item) => {
380
+ setFieldValue('gender', item?.id);
381
+ },
382
+ });
383
+ }}
384
+ style={{
385
+ height: 30,
386
+ flex: 1,
387
+ marginTop: 5,
388
+ }}
389
+ >
390
+ <MText>{values.gender === 1 ? 'Nữ' : 'Nam'}</MText>
391
+ </TouchableOpacity>
392
+ </View>
393
+ <View
394
+ style={{
395
+ height: 1,
396
+ backgroundColor: '#E0E0E0',
397
+ }}
398
+ />
399
+ <View
400
+ style={{
401
+ marginTop: 12,
402
+ backgroundColor: '#F2F2F2',
403
+ borderRadius: 4,
404
+ padding: 8,
405
+ }}
406
+ >
407
+ <MText style={{ color: '#8A8A8A' }}>Số điện thoại</MText>
408
+ <MText>{values.phone}</MText>
409
+ </View>
410
+ <View
411
+ style={{
412
+ height: 1,
413
+ backgroundColor: '#E0E0E0',
414
+ marginTop: 12,
415
+ }}
416
+ />
417
+ <View
418
+ style={{
419
+ marginTop: 12,
420
+ backgroundColor: '#F2F2F2',
421
+ borderRadius: 4,
422
+ padding: 8,
423
+ }}
424
+ >
425
+ <MText style={{ color: '#8A8A8A' }}>Số CMND 1</MText>
426
+ <MText>{values.nationalCardNumber}</MText>
427
+ </View>
428
+ <View
429
+ style={{
430
+ height: 1,
431
+ backgroundColor: '#E0E0E0',
432
+ marginTop: 12,
433
+ }}
434
+ />
435
+
436
+ <View style={{ marginTop: 12 }}>
437
+ <MText style={{ color: '#8A8A8A' }}>
438
+ Ngày cấp CCCD/CMND
439
+ </MText>
440
+ <TouchableOpacity
441
+ onPress={() => {
442
+ setTypePicker(1);
443
+ setShowDatePicker(true);
444
+ }}
445
+ style={{
446
+ height: 30,
447
+ flex: 1,
448
+ marginTop: 5,
449
+ }}
450
+ >
451
+ <MText>{values.dateNationalId}</MText>
452
+ </TouchableOpacity>
453
+ </View>
454
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
455
+ <View style={{ marginTop: 12 }}>
456
+ <MText style={{ color: '#8A8A8A' }}>
457
+ Nơi cấp CCCD/CMND
458
+ </MText>
459
+ <TextInput
460
+ numberOfLines={1}
461
+ value={values.nationalCardPlace}
462
+ onChangeText={handleChange('nationalCardPlace')}
463
+ style={{
464
+ flex: 1,
465
+ color: '#33333',
466
+ height: 30,
467
+ flex: 1,
468
+ padding: 0,
469
+ }}
470
+ />
471
+ </View>
472
+
473
+ <View style={{ marginTop: 12 }}>
474
+ <MText style={{ color: '#8A8A8A' }}>Hôn nhân</MText>
475
+ <TouchableOpacity
476
+ onPress={() => {
477
+ navigation.push('CommonSelect', {
478
+ title: 'Hôn nhân',
479
+ data: EnumMarries,
480
+ callback: (item) => {
481
+ setFieldValue('marriage', item?.id);
482
+ },
483
+ });
484
+ }}
485
+ style={{
486
+ height: 30,
487
+ flex: 1,
488
+ marginTop: 5,
489
+ }}
490
+ >
491
+ <MText>
492
+ {values.marriage === 1 ? 'Đã có' : 'Chưa có'}
493
+ </MText>
494
+ </TouchableOpacity>
495
+ </View>
496
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
497
+ <View style={{ marginTop: 12 }}>
498
+ <MText style={{ color: '#8A8A8A' }}>Passport</MText>
499
+ <TextInput
500
+ value={values.passport}
501
+ style={{
502
+ flex: 1,
503
+ color: '#33333',
504
+ height: 30,
505
+ marginVertical: 0,
506
+ flex: 1,
507
+ padding: 0,
508
+ }}
509
+ />
510
+ </View>
511
+
512
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
513
+ <View style={{ marginTop: 12 }}>
514
+ <MText style={{ color: '#8A8A8A' }}>Facebook</MText>
515
+ <TextInput
516
+ value={values.facebook}
517
+ onChangeText={handleChange('facebook')}
518
+ style={{
519
+ flex: 1,
520
+ color: '#33333',
521
+ height: 30,
522
+ marginVertical: 0,
523
+ flex: 1,
524
+ padding: 0,
525
+ }}
526
+ />
527
+ </View>
528
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
529
+ <View style={{ marginTop: 12 }}>
530
+ <MText style={{ color: '#8A8A8A' }}>Mã số BHXH</MText>
531
+ <TextInput
532
+ value={values.socialInsuranceNumber}
533
+ onChangeText={handleChange('socialInsuranceNumber')}
534
+ style={{
535
+ flex: 1,
536
+ color: '#33333',
537
+ height: 30,
538
+ marginVertical: 0,
539
+ flex: 1,
540
+ padding: 0,
541
+ }}
542
+ />
543
+ </View>
544
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
545
+ <View style={{ marginTop: 12 }}>
546
+ <MText style={{ color: '#8A8A8A' }}>Mã số thuế</MText>
547
+ <TextInput
548
+ value={values?.taxCode}
549
+ onChangeText={handleChange('taxCode')}
550
+ style={{
551
+ flex: 1,
552
+ color: '#33333',
553
+ height: 30,
554
+ marginVertical: 0,
555
+ flex: 1,
556
+ padding: 0,
557
+ }}
558
+ />
559
+ </View>
560
+
561
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
562
+
563
+ <KeyboardSpacer />
564
+ <DatePicker
565
+ mode="date"
566
+ open={showDatePicker}
567
+ modal
568
+ title="Chọn thời gian"
569
+ locale="vi"
570
+ date={new Date()}
571
+ onCancel={() => {
572
+ setShowDatePicker(false);
573
+ }}
574
+ onConfirm={(date) => {
575
+ setShowDatePicker(false);
576
+ if (typePicker === 0) {
577
+ setFieldValue('birthDate', formatDDMMYYY(date));
578
+ }
579
+ if (typePicker === 1) {
580
+ setFieldValue('dateNationalId', formatDDMMYYY(date));
581
+ }
582
+ }}
583
+ />
584
+ </View>
585
+ )}
586
+ </Formik>
587
+ </ScrollView>
588
+ <View
589
+ style={{
590
+ backgroundColor: 'white',
591
+ shadowOffset: {
592
+ width: 2,
593
+ height: 1,
594
+ },
595
+ ...Platform.select({
596
+ ios: {
597
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
598
+ shadowOpacity: 0.2,
599
+ },
600
+ android: {
601
+ elevation: 10,
602
+ },
603
+ }),
604
+ paddingTop: 12,
605
+ paddingHorizontal: 12,
606
+ flexDirection: 'row',
607
+ paddingBottom: 16,
608
+ justifyContent: 'space-between',
609
+ alignItems: 'center',
610
+ }}
611
+ >
612
+ <View
613
+ style={{
614
+ paddingHorizontal: 12,
615
+ paddingVertical: 8,
616
+ borderRadius: 40,
617
+ flexDirection: 'row',
618
+ alignItems: 'center',
619
+ borderWidth: 1,
620
+ borderColor: 'white',
621
+ }}
622
+ >
623
+ {/* <Back2Icon /> */}
624
+ <MText
625
+ style={{
626
+ marginLeft: 5,
627
+ color: 'white',
628
+ fontSize: 16,
629
+ fontWeight: '500',
630
+ }}
631
+ >
632
+ Trở lại
633
+ </MText>
634
+ </View>
635
+ <StepIcon />
636
+ <TouchableOpacity
637
+ onPress={() => {
638
+ digitalLendingStore.step = 2;
639
+ ref.current.handleSubmit();
640
+ }}
641
+ >
642
+ <LinearGradient
643
+ colors={['#FF8E4F', '#EF592E']}
644
+ style={{
645
+ paddingHorizontal: 12,
646
+ paddingVertical: 8,
647
+ borderRadius: 40,
648
+ flexDirection: 'row',
649
+ alignItems: 'center',
650
+ }}
651
+ >
652
+ <MText
653
+ style={{
654
+ color: 'white',
655
+ fontSize: 16,
656
+ fontWeight: '500',
657
+ marginRight: 5,
658
+ }}
659
+ >
660
+ Tiếp tục
661
+ </MText>
662
+ <NextIcon />
663
+ </LinearGradient>
664
+ </TouchableOpacity>
665
+ </View>
666
+ </View>
667
+ )}
668
+ </Observer>
669
+ );
670
+ });