react-native-timacare 1.0.1 → 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 (141) 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/digital-lending/Step1.js +2 -0
  21. package/lib/commonjs/screens/digital-lending/Step1.js.flow +661 -0
  22. package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -0
  23. package/lib/commonjs/screens/digital-lending/Step2.js +2 -0
  24. package/lib/commonjs/screens/digital-lending/Step2.js.flow +610 -0
  25. package/lib/commonjs/screens/digital-lending/Step2.js.map +1 -0
  26. package/lib/commonjs/screens/digital-lending/Step3.js +2 -0
  27. package/lib/commonjs/screens/digital-lending/Step3.js.flow +602 -0
  28. package/lib/commonjs/screens/digital-lending/Step3.js.map +1 -0
  29. package/lib/commonjs/screens/digital-lending/Step4.js +2 -0
  30. package/lib/commonjs/screens/digital-lending/Step4.js.flow +495 -0
  31. package/lib/commonjs/screens/digital-lending/Step4.js.map +1 -0
  32. package/lib/commonjs/screens/digital-lending/Step5.js +2 -0
  33. package/lib/commonjs/screens/digital-lending/Step5.js.flow +350 -0
  34. package/lib/commonjs/screens/digital-lending/Step5.js.map +1 -0
  35. package/lib/commonjs/screens/digital-lending/Step6.js +2 -0
  36. package/lib/commonjs/screens/digital-lending/Step6.js.flow +366 -0
  37. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -0
  38. package/lib/commonjs/screens/digital-lending/index.js +2 -0
  39. package/lib/commonjs/screens/digital-lending/index.js.flow +110 -0
  40. package/lib/commonjs/screens/digital-lending/index.js.map +1 -0
  41. package/lib/commonjs/screens/digital-lending/store.js +2 -0
  42. package/lib/commonjs/screens/digital-lending/store.js.flow +294 -0
  43. package/lib/commonjs/screens/digital-lending/store.js.map +1 -0
  44. package/lib/commonjs/screens/home/index.js +1 -1
  45. package/lib/commonjs/screens/home/index.js.flow +467 -0
  46. package/lib/commonjs/screens/home/index.js.map +1 -1
  47. package/lib/commonjs/screens/register/index.js +1 -1
  48. package/lib/commonjs/screens/register/index.js.flow +1 -1
  49. package/lib/commonjs/services/api/api-config.js +1 -1
  50. package/lib/commonjs/services/api/api-config.js.flow +2 -2
  51. package/lib/commonjs/services/api/api-config.js.map +1 -1
  52. package/lib/commonjs/services/api/api.js +1 -1
  53. package/lib/commonjs/services/api/api.js.flow +95 -0
  54. package/lib/commonjs/services/api/api.js.map +1 -1
  55. package/lib/module/assets/icons/back2.svg +13 -0
  56. package/lib/module/assets/icons/check1.svg +4 -0
  57. package/lib/module/assets/icons/check2.svg +9 -0
  58. package/lib/module/assets/icons/error.svg +6 -0
  59. package/lib/module/assets/icons/index.js +1 -1
  60. package/lib/module/assets/icons/index.js.map +1 -1
  61. package/lib/module/assets/icons/line2.svg +12 -0
  62. package/lib/module/assets/icons/next.svg +6 -0
  63. package/lib/module/assets/icons/step.svg +9 -0
  64. package/lib/module/components/CommonSelect.js +2 -0
  65. package/lib/module/components/CommonSelect.js.map +1 -0
  66. package/lib/module/components/MText.js +1 -1
  67. package/lib/module/components/MText.js.map +1 -1
  68. package/lib/module/navigation/primary-navigator.js +1 -1
  69. package/lib/module/navigation/primary-navigator.js.map +1 -1
  70. package/lib/module/screens/digital-lending/Step1.js +2 -0
  71. package/lib/module/screens/digital-lending/Step1.js.map +1 -0
  72. package/lib/module/screens/digital-lending/Step2.js +2 -0
  73. package/lib/module/screens/digital-lending/Step2.js.map +1 -0
  74. package/lib/module/screens/digital-lending/Step3.js +2 -0
  75. package/lib/module/screens/digital-lending/Step3.js.map +1 -0
  76. package/lib/module/screens/digital-lending/Step4.js +2 -0
  77. package/lib/module/screens/digital-lending/Step4.js.map +1 -0
  78. package/lib/module/screens/digital-lending/Step5.js +2 -0
  79. package/lib/module/screens/digital-lending/Step5.js.map +1 -0
  80. package/lib/module/screens/digital-lending/Step6.js +2 -0
  81. package/lib/module/screens/digital-lending/Step6.js.map +1 -0
  82. package/lib/module/screens/digital-lending/index.js +2 -0
  83. package/lib/module/screens/digital-lending/index.js.map +1 -0
  84. package/lib/module/screens/digital-lending/store.js +2 -0
  85. package/lib/module/screens/digital-lending/store.js.map +1 -0
  86. package/lib/module/screens/home/index.js +1 -1
  87. package/lib/module/screens/home/index.js.map +1 -1
  88. package/lib/module/screens/register/index.js +1 -1
  89. package/lib/module/services/api/api-config.js +1 -1
  90. package/lib/module/services/api/api-config.js.map +1 -1
  91. package/lib/module/services/api/api.js +1 -1
  92. package/lib/module/services/api/api.js.map +1 -1
  93. package/lib/typescript/assets/icons/index.d.ts +8 -1
  94. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  95. package/lib/typescript/components/CommonSelect.d.ts +8 -0
  96. package/lib/typescript/components/CommonSelect.d.ts.map +1 -0
  97. package/lib/typescript/navigation/primary-navigator.d.ts +1 -0
  98. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  99. package/lib/typescript/screens/digital-lending/Step1.d.ts +2 -0
  100. package/lib/typescript/screens/digital-lending/Step1.d.ts.map +1 -0
  101. package/lib/typescript/screens/digital-lending/Step2.d.ts +2 -0
  102. package/lib/typescript/screens/digital-lending/Step2.d.ts.map +1 -0
  103. package/lib/typescript/screens/digital-lending/Step3.d.ts +2 -0
  104. package/lib/typescript/screens/digital-lending/Step3.d.ts.map +1 -0
  105. package/lib/typescript/screens/digital-lending/Step4.d.ts +2 -0
  106. package/lib/typescript/screens/digital-lending/Step4.d.ts.map +1 -0
  107. package/lib/typescript/screens/digital-lending/Step5.d.ts +2 -0
  108. package/lib/typescript/screens/digital-lending/Step5.d.ts.map +1 -0
  109. package/lib/typescript/screens/digital-lending/Step6.d.ts +2 -0
  110. package/lib/typescript/screens/digital-lending/Step6.d.ts.map +1 -0
  111. package/lib/typescript/screens/digital-lending/index.d.ts +2 -0
  112. package/lib/typescript/screens/digital-lending/index.d.ts.map +1 -0
  113. package/lib/typescript/screens/digital-lending/store.d.ts +35 -0
  114. package/lib/typescript/screens/digital-lending/store.d.ts.map +1 -0
  115. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  116. package/lib/typescript/services/api/api.d.ts +80 -19
  117. package/lib/typescript/services/api/api.d.ts.map +1 -1
  118. package/package.json +1 -1
  119. package/src/assets/icons/back2.svg +13 -0
  120. package/src/assets/icons/check1.svg +4 -0
  121. package/src/assets/icons/check2.svg +9 -0
  122. package/src/assets/icons/error.svg +6 -0
  123. package/src/assets/icons/index.tsx +14 -0
  124. package/src/assets/icons/line2.svg +12 -0
  125. package/src/assets/icons/next.svg +6 -0
  126. package/src/assets/icons/step.svg +9 -0
  127. package/src/components/CommonSelect.tsx +12 -0
  128. package/src/components/MText.tsx +2 -2
  129. package/src/navigation/primary-navigator.tsx +6 -0
  130. package/src/screens/digital-lending/Step1.tsx +661 -0
  131. package/src/screens/digital-lending/Step2.tsx +610 -0
  132. package/src/screens/digital-lending/Step3.tsx +602 -0
  133. package/src/screens/digital-lending/Step4.tsx +495 -0
  134. package/src/screens/digital-lending/Step5.tsx +350 -0
  135. package/src/screens/digital-lending/Step6.tsx +366 -0
  136. package/src/screens/digital-lending/index.tsx +110 -0
  137. package/src/screens/digital-lending/store.tsx +294 -0
  138. package/src/screens/home/index.tsx +467 -0
  139. package/src/screens/register/index.tsx +1 -1
  140. package/src/services/api/api-config.ts +2 -2
  141. package/src/services/api/api.ts +95 -0
@@ -0,0 +1,661 @@
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
+ }, 50);
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
+ color: '#33333',
346
+ height: 30,
347
+ marginVertical: 0,
348
+ flex: 1,
349
+ padding: 0,
350
+ }}
351
+ />
352
+ </View>
353
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
354
+ <View
355
+ style={{
356
+ marginTop: 12,
357
+ backgroundColor: '#F2F2F2',
358
+ borderRadius: 4,
359
+ padding: 8,
360
+ }}
361
+ >
362
+ <MText style={{ color: '#8A8A8A' }}>Số điện thoại</MText>
363
+ <MText>{values.phone}</MText>
364
+ </View>
365
+ <View
366
+ style={{
367
+ height: 1,
368
+ backgroundColor: '#E0E0E0',
369
+ marginTop: 12,
370
+ }}
371
+ />
372
+ <View
373
+ style={{
374
+ marginTop: 12,
375
+ backgroundColor: '#F2F2F2',
376
+ borderRadius: 4,
377
+ padding: 8,
378
+ }}
379
+ >
380
+ <MText style={{ color: '#8A8A8A' }}>Số CMND 1</MText>
381
+ <MText>{values.nationalCardNumber}</MText>
382
+ </View>
383
+ <View
384
+ style={{
385
+ height: 1,
386
+ backgroundColor: '#E0E0E0',
387
+ marginTop: 12,
388
+ }}
389
+ />
390
+ <View style={{ marginTop: 12 }}>
391
+ <MText style={{ color: '#8A8A8A' }}>Ngày sinh</MText>
392
+ <TouchableOpacity
393
+ onPress={() => {
394
+ setTypePicker(0);
395
+ setShowDatePicker(true);
396
+ }}
397
+ style={{
398
+ height: 30,
399
+ flex: 1,
400
+ marginTop: 5,
401
+ }}
402
+ >
403
+ <MText>{values.birthDate}</MText>
404
+ </TouchableOpacity>
405
+ </View>
406
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
407
+ <View style={{ marginTop: 12 }}>
408
+ <MText style={{ color: '#8A8A8A' }}>Giới tính</MText>
409
+ <TouchableOpacity
410
+ onPress={() => {
411
+ navigation.push('CommonSelect', {
412
+ title: 'Chọn giới tính',
413
+ data: EnumGender,
414
+ callback: (item) => {
415
+ setFieldValue('gender', item?.id);
416
+ },
417
+ });
418
+ }}
419
+ style={{
420
+ height: 30,
421
+ flex: 1,
422
+ marginTop: 5,
423
+ }}
424
+ >
425
+ <MText>{values.gender === 1 ? 'Nữ' : 'Nam'}</MText>
426
+ </TouchableOpacity>
427
+ </View>
428
+ <View
429
+ style={{
430
+ height: 1,
431
+ backgroundColor: '#E0E0E0',
432
+ }}
433
+ />
434
+ <View style={{ marginTop: 12 }}>
435
+ <MText style={{ color: '#8A8A8A' }}>
436
+ Ngày cấp CCCD/CMND
437
+ </MText>
438
+ <TouchableOpacity
439
+ onPress={() => {
440
+ setTypePicker(1);
441
+ setShowDatePicker(true);
442
+ }}
443
+ style={{
444
+ height: 30,
445
+ flex: 1,
446
+ marginTop: 5,
447
+ }}
448
+ >
449
+ <MText>{values.dateNationalId}</MText>
450
+ </TouchableOpacity>
451
+ </View>
452
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
453
+ <View style={{ marginTop: 12 }}>
454
+ <MText style={{ color: '#8A8A8A' }}>Passport</MText>
455
+ <TextInput
456
+ value={values.passport}
457
+ style={{
458
+ color: '#33333',
459
+ height: 30,
460
+ marginVertical: 0,
461
+ flex: 1,
462
+ padding: 0,
463
+ }}
464
+ />
465
+ </View>
466
+
467
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
468
+ <View style={{ marginTop: 12 }}>
469
+ <MText style={{ color: '#8A8A8A' }}>Facebook</MText>
470
+ <TextInput
471
+ value={values.facebook}
472
+ onChangeText={handleChange('facebook')}
473
+ style={{
474
+ color: '#33333',
475
+ height: 30,
476
+ marginVertical: 0,
477
+ flex: 1,
478
+ padding: 0,
479
+ }}
480
+ />
481
+ </View>
482
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
483
+ <View style={{ marginTop: 12 }}>
484
+ <MText style={{ color: '#8A8A8A' }}>Mã số BHXH</MText>
485
+ <TextInput
486
+ value={values.socialInsuranceNumber}
487
+ onChangeText={handleChange('socialInsuranceNumber')}
488
+ style={{
489
+ color: '#33333',
490
+ height: 30,
491
+ marginVertical: 0,
492
+ flex: 1,
493
+ padding: 0,
494
+ }}
495
+ />
496
+ </View>
497
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
498
+ <View style={{ marginTop: 12 }}>
499
+ <MText style={{ color: '#8A8A8A' }}>Mã số thuế</MText>
500
+ <TextInput
501
+ value={values?.taxCode}
502
+ onChangeText={handleChange('taxCode')}
503
+ style={{
504
+ color: '#33333',
505
+ height: 30,
506
+ marginVertical: 0,
507
+ flex: 1,
508
+ padding: 0,
509
+ }}
510
+ />
511
+ </View>
512
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
513
+ <View style={{ marginTop: 12 }}>
514
+ <MText style={{ color: '#8A8A8A' }}>Hôn nhân</MText>
515
+ <TouchableOpacity
516
+ onPress={() => {
517
+ navigation.push('CommonSelect', {
518
+ title: 'Hôn nhân',
519
+ data: EnumMarries,
520
+ callback: (item) => {
521
+ setFieldValue('marriage', item?.id);
522
+ },
523
+ });
524
+ }}
525
+ style={{
526
+ height: 30,
527
+ flex: 1,
528
+ marginTop: 5,
529
+ }}
530
+ >
531
+ <MText>
532
+ {values.marriage === 1 ? 'Đã có' : 'Chưa có'}
533
+ </MText>
534
+ </TouchableOpacity>
535
+ </View>
536
+
537
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
538
+ <View style={{ marginTop: 12 }}>
539
+ <MText style={{ color: '#8A8A8A' }}>
540
+ Nơi cấp CCCD/CMND
541
+ </MText>
542
+ <TextInput
543
+ numberOfLines={1}
544
+ value={values.nationalCardPlace}
545
+ onChangeText={handleChange('nationalCardPlace')}
546
+ style={{
547
+ color: '#33333',
548
+ height: 30,
549
+ flex: 1,
550
+ padding: 0,
551
+ }}
552
+ />
553
+ </View>
554
+ <KeyboardSpacer />
555
+ <DatePicker
556
+ mode="date"
557
+ open={showDatePicker}
558
+ modal
559
+ title="Chọn thời gian"
560
+ locale="vi"
561
+ date={new Date()}
562
+ onCancel={() => {
563
+ setShowDatePicker(false);
564
+ }}
565
+ onConfirm={(date) => {
566
+ setShowDatePicker(false);
567
+ if (typePicker === 0) {
568
+ setFieldValue('birthDate', formatDDMMYYY(date));
569
+ }
570
+ if (typePicker === 1) {
571
+ setFieldValue('dateNationalId', formatDDMMYYY(date));
572
+ }
573
+ }}
574
+ />
575
+ </View>
576
+ )}
577
+ </Formik>
578
+ </ScrollView>
579
+ <View
580
+ style={{
581
+ backgroundColor: 'white',
582
+ shadowOffset: {
583
+ width: 2,
584
+ height: 1,
585
+ },
586
+ ...Platform.select({
587
+ ios: {
588
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
589
+ shadowOpacity: 0.2,
590
+ },
591
+ android: {
592
+ elevation: 10,
593
+ },
594
+ }),
595
+ paddingTop: 12,
596
+ paddingHorizontal: 12,
597
+ flexDirection: 'row',
598
+ paddingBottom: 16,
599
+ justifyContent: 'space-between',
600
+ alignItems: 'center',
601
+ }}
602
+ >
603
+ <View
604
+ style={{
605
+ paddingHorizontal: 12,
606
+ paddingVertical: 8,
607
+ borderRadius: 40,
608
+ flexDirection: 'row',
609
+ alignItems: 'center',
610
+ borderWidth: 1,
611
+ borderColor: 'white',
612
+ }}
613
+ >
614
+ {/* <Back2Icon /> */}
615
+ <MText
616
+ style={{
617
+ marginLeft: 5,
618
+ color: 'white',
619
+ fontSize: 16,
620
+ fontWeight: '500',
621
+ }}
622
+ >
623
+ Trở lại
624
+ </MText>
625
+ </View>
626
+ <StepIcon />
627
+ <TouchableOpacity
628
+ onPress={() => {
629
+ digitalLendingStore.step = 2;
630
+ ref.current.handleSubmit();
631
+ }}
632
+ >
633
+ <LinearGradient
634
+ colors={['#FF8E4F', '#EF592E']}
635
+ style={{
636
+ paddingHorizontal: 12,
637
+ paddingVertical: 8,
638
+ borderRadius: 40,
639
+ flexDirection: 'row',
640
+ alignItems: 'center',
641
+ }}
642
+ >
643
+ <MText
644
+ style={{
645
+ color: 'white',
646
+ fontSize: 16,
647
+ fontWeight: '500',
648
+ marginRight: 5,
649
+ }}
650
+ >
651
+ Tiếp tục
652
+ </MText>
653
+ <NextIcon />
654
+ </LinearGradient>
655
+ </TouchableOpacity>
656
+ </View>
657
+ </View>
658
+ )}
659
+ </Observer>
660
+ );
661
+ });