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,613 @@
1
+ //@ts-nocheck
2
+ import React, { useEffect, useRef } 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 KeyboardSpacer from '../../components/keyboardspace';
24
+ import { useNavigation } from '@react-navigation/native';
25
+
26
+ const residentType = [
27
+ {
28
+ id: 14,
29
+ name: 'KT1',
30
+ },
31
+ {
32
+ id: 15,
33
+ name: 'KT3',
34
+ },
35
+ ];
36
+
37
+ export const Step2 = observer(function Step2() {
38
+ const navigation = useNavigation();
39
+ const ref = useRef(null);
40
+
41
+ const onSubmit = (values) => {
42
+ digitalLendingStore.body = {
43
+ ...digitalLendingStore.body,
44
+ residentType: values?.residentType,
45
+ provinceId: values?.province?.id,
46
+ districtId: values?.district?.id,
47
+ wardId: values?.ward?.id,
48
+ address: values?.address,
49
+ customerShareLocation: digitalLendingStore?.data?.customerShareLocation,
50
+ houseHoldProvinceId: values?.houseHoldProvinceId?.id,
51
+ houseHoldDistrictId: values?.houseHoldDistrictId?.id,
52
+ houseHoldWardId: values?.houseHoldWardId?.id,
53
+ houseHoldAddress: values?.houseHoldAddress,
54
+ addressNationalCard: values?.addressNationalCard,
55
+ };
56
+ };
57
+
58
+ return (
59
+ <View style={{ flex: 1 }}>
60
+ <ScrollView style={{ paddingHorizontal: 12 }}>
61
+ <View
62
+ style={{
63
+ flexDirection: 'row',
64
+ justifyContent: 'space-between',
65
+ alignItems: 'center',
66
+ paddingVertical: 16,
67
+ }}
68
+ >
69
+ <View
70
+ style={{
71
+ width: 40,
72
+ height: 40,
73
+ borderRadius: 40,
74
+ alignItems: 'center',
75
+ justifyContent: 'center',
76
+ shadowRadius: 40,
77
+ backgroundColor: '#FFF3E9',
78
+ borderWidth: 1,
79
+ borderColor: '#FF8E4F',
80
+ }}
81
+ >
82
+ <MText style={{ fontWeight: 'bold', color: '#FF8E4F' }}>01</MText>
83
+ </View>
84
+ <LinearGradient
85
+ colors={['#FF8E4F', '#EF592E']}
86
+ style={{
87
+ width: 40,
88
+ height: 40,
89
+ borderRadius: 40,
90
+ alignItems: 'center',
91
+ justifyContent: 'center',
92
+ }}
93
+ >
94
+ <MText style={{ color: 'white', fontWeight: 'bold' }}>02</MText>
95
+ </LinearGradient>
96
+
97
+ <Line2Icon />
98
+ <View
99
+ style={{
100
+ width: 40,
101
+ height: 40,
102
+ borderRadius: 40,
103
+ alignItems: 'center',
104
+ justifyContent: 'center',
105
+ shadowRadius: 40,
106
+ backgroundColor: 'white',
107
+ shadowOffset: {
108
+ width: 2,
109
+ height: 1,
110
+ },
111
+ ...Platform.select({
112
+ ios: {
113
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
114
+ shadowOpacity: 0.2,
115
+ },
116
+ android: {
117
+ elevation: 10,
118
+ },
119
+ }),
120
+ }}
121
+ >
122
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>03</MText>
123
+ </View>
124
+ <View
125
+ style={{
126
+ width: 40,
127
+ height: 40,
128
+ borderRadius: 40,
129
+ alignItems: 'center',
130
+ justifyContent: 'center',
131
+ shadowRadius: 40,
132
+ backgroundColor: 'white',
133
+ shadowOffset: {
134
+ width: 2,
135
+ height: 1,
136
+ },
137
+ ...Platform.select({
138
+ ios: {
139
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
140
+ shadowOpacity: 0.2,
141
+ },
142
+ android: {
143
+ elevation: 10,
144
+ },
145
+ }),
146
+ }}
147
+ >
148
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>04</MText>
149
+ </View>
150
+ <View
151
+ style={{
152
+ width: 40,
153
+ height: 40,
154
+ borderRadius: 40,
155
+ alignItems: 'center',
156
+ justifyContent: 'center',
157
+ shadowRadius: 40,
158
+ backgroundColor: 'white',
159
+ shadowOffset: {
160
+ width: 2,
161
+ height: 1,
162
+ },
163
+ ...Platform.select({
164
+ ios: {
165
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
166
+ shadowOpacity: 0.2,
167
+ },
168
+ android: {
169
+ elevation: 10,
170
+ },
171
+ }),
172
+ }}
173
+ >
174
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>05</MText>
175
+ </View>
176
+ <View
177
+ style={{
178
+ width: 40,
179
+ height: 40,
180
+ borderRadius: 40,
181
+ alignItems: 'center',
182
+ justifyContent: 'center',
183
+ shadowRadius: 40,
184
+ backgroundColor: 'white',
185
+ shadowOffset: {
186
+ width: 2,
187
+ height: 1,
188
+ },
189
+ ...Platform.select({
190
+ ios: {
191
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
192
+ shadowOpacity: 0.2,
193
+ },
194
+ android: {
195
+ elevation: 10,
196
+ },
197
+ }),
198
+ }}
199
+ >
200
+ <MText style={{ fontWeight: 'bold', color: '#333333' }}>06</MText>
201
+ </View>
202
+ </View>
203
+ <MText style={{ fontWeight: 'bold' }}>THÔNG TIN NƠI Ở & HỘ KHẨU</MText>
204
+ <View
205
+ style={{ height: 1, backgroundColor: '#BDBDBD', marginTop: 16 }}
206
+ />
207
+ <View
208
+ style={{
209
+ backgroundColor: '#EB5757',
210
+ flexDirection: 'row',
211
+ padding: 8,
212
+ alignItems: 'center',
213
+ borderRadius: 8,
214
+ marginTop: 12,
215
+ }}
216
+ >
217
+ <WarningIcon />
218
+ <MText style={{ flex: 1, color: 'white', marginLeft: 8 }}>
219
+ 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
220
+ cập nhật lại thông tin mới nhất nhé!
221
+ </MText>
222
+ </View>
223
+ <Formik
224
+ innerRef={ref}
225
+ onSubmit={onSubmit}
226
+ initialValues={{
227
+ residentType: digitalLendingStore?.data?.residentType,
228
+ province: digitalLendingStore?.data?.provinceId
229
+ ? digitalLendingStore?.listProvinces.find(
230
+ (p) => p.id === digitalLendingStore?.data?.provinceId
231
+ )
232
+ : null,
233
+ district: digitalLendingStore?.data?.districtId
234
+ ? digitalLendingStore?.listDistricts.find(
235
+ (p) => p.id === digitalLendingStore?.data?.districtId
236
+ )
237
+ : null,
238
+ ward: digitalLendingStore?.data?.wardId
239
+ ? digitalLendingStore?.listWards.find(
240
+ (p) => p.id === digitalLendingStore?.data?.wardId
241
+ )
242
+ : null,
243
+ address: digitalLendingStore?.data?.address,
244
+ customerShareLocation:
245
+ digitalLendingStore?.data?.customerShareLocation,
246
+ houseHoldProvinceId: digitalLendingStore?.data?.houseHoldProvinceId
247
+ ? {
248
+ id: digitalLendingStore?.data?.houseHoldProvinceId,
249
+ name: digitalLendingStore?.data?.houseHoldProvinceName,
250
+ }
251
+ : null,
252
+ houseHoldDistrictId: digitalLendingStore?.data?.houseHoldDistrictId
253
+ ? {
254
+ id: digitalLendingStore?.data?.houseHoldDistrictId,
255
+ name: digitalLendingStore?.data?.houseHoldDistrictName,
256
+ }
257
+ : null,
258
+ houseHoldWardId: digitalLendingStore?.data?.houseHoldWardId
259
+ ? {
260
+ id: digitalLendingStore?.data?.houseHoldWardId,
261
+ name: digitalLendingStore?.data?.houseHoldWardName,
262
+ }
263
+ : null,
264
+ houseHoldAddress: digitalLendingStore?.data?.houseHoldAddress,
265
+ addressNationalCard: digitalLendingStore?.data?.addressNationalCard,
266
+ }}
267
+ >
268
+ {({ values, handleSubmit, handleChange, setFieldValue }) => (
269
+ <View style={{ marginTop: 16 }}>
270
+ <View>
271
+ <MText style={{ color: '#8A8A8A' }}>Hình thức cư trú</MText>
272
+ <TouchableOpacity
273
+ onPress={() => {
274
+ navigation.push('CommonSelect', {
275
+ title: 'Chọn hình thức cư trú',
276
+ data: residentType,
277
+ callback: (item) => {
278
+ setFieldValue('residentType', item?.id);
279
+ },
280
+ });
281
+ }}
282
+ style={{
283
+ height: 30,
284
+ flex: 1,
285
+ marginTop: 5,
286
+ }}
287
+ >
288
+ <MText>
289
+ {values.residentType === 14
290
+ ? 'KT1'
291
+ : values.residentType === 15
292
+ ? 'KT3'
293
+ : ''}
294
+ </MText>
295
+ </TouchableOpacity>
296
+ </View>
297
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
298
+
299
+ <View style={{ marginTop: 12 }}>
300
+ <MText style={{ color: '#8A8A8A' }}>
301
+ Chọn Tỉnh/ Thành phố (nơi ở)
302
+ </MText>
303
+ <TouchableOpacity
304
+ onPress={() => {
305
+ navigation.push('CommonSelect', {
306
+ title: 'Chọn tỉnh/thành phố',
307
+ data: digitalLendingStore.listProvinces,
308
+ callback: (item) => {
309
+ setFieldValue('province', item);
310
+ digitalLendingStore.getDistricts(item?.id);
311
+ digitalLendingStore.listWards = [];
312
+ setFieldValue('ward', null);
313
+ setFieldValue('district', null);
314
+ },
315
+ });
316
+ }}
317
+ style={{
318
+ height: 30,
319
+ flex: 1,
320
+ marginTop: 5,
321
+ }}
322
+ >
323
+ <MText>{values.province ? values.province?.name : ''}</MText>
324
+ </TouchableOpacity>
325
+ </View>
326
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
327
+ <View style={{ marginTop: 12 }}>
328
+ <MText style={{ color: '#8A8A8A' }}>
329
+ Chọn Quận/Huyện (nơi ở)
330
+ </MText>
331
+ <TouchableOpacity
332
+ onPress={() => {
333
+ navigation.push('CommonSelect', {
334
+ title: 'Chọn Quận/Huyện',
335
+ data: digitalLendingStore.listDistricts,
336
+ callback: (item) => {
337
+ setFieldValue('district', item);
338
+ digitalLendingStore.getWards(item?.id);
339
+ setFieldValue('ward', null);
340
+ },
341
+ });
342
+ }}
343
+ style={{
344
+ height: 30,
345
+ flex: 1,
346
+ marginTop: 5,
347
+ }}
348
+ >
349
+ <MText>{values.district ? values.district?.name : ''}</MText>
350
+ </TouchableOpacity>
351
+ </View>
352
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
353
+ <View style={{ marginTop: 12 }}>
354
+ <MText style={{ color: '#8A8A8A' }}>
355
+ Chọn Phường/Xã (nơi ở)
356
+ </MText>
357
+ <TouchableOpacity
358
+ onPress={() => {
359
+ navigation.push('CommonSelect', {
360
+ title: 'Chọn Phường/Xã',
361
+ data: digitalLendingStore.listWards,
362
+ callback: (item) => {
363
+ setFieldValue('ward', item);
364
+ },
365
+ });
366
+ }}
367
+ style={{
368
+ height: 30,
369
+ flex: 1,
370
+ marginTop: 5,
371
+ }}
372
+ >
373
+ <MText>{values.ward ? values.ward?.name : ''}</MText>
374
+ </TouchableOpacity>
375
+ </View>
376
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
377
+ <View style={{ marginTop: 12 }}>
378
+ <MText style={{ color: '#8A8A8A' }}>
379
+ Địa chỉ chi tiết (nơi ở)
380
+ </MText>
381
+ <TextInput
382
+ value={values?.address}
383
+ onChangeText={handleChange('address')}
384
+ style={{
385
+ flex: 1,
386
+ color: '#33333',
387
+ height: 30,
388
+ marginVertical: 0,
389
+ flex: 1,
390
+ padding: 0,
391
+ }}
392
+ />
393
+ </View>
394
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
395
+ <View style={{ marginTop: 12 }}>
396
+ <MText style={{ color: '#8A8A8A' }}>
397
+ Chọn thành phố (Hộ khẩu)
398
+ </MText>
399
+ <TouchableOpacity
400
+ onPress={() => {
401
+ navigation.push('CommonSelect', {
402
+ title: 'Chọn tỉnh/thành phố',
403
+ data: digitalLendingStore.listProvinces,
404
+ callback: (item) => {
405
+ setFieldValue('houseHoldProvinceId', item);
406
+ digitalLendingStore.getDistricts(item?.id, (data) => {
407
+ digitalLendingStore.householdListDistricts = data;
408
+ });
409
+ digitalLendingStore.householdListWards = [];
410
+ setFieldValue('houseHoldDistrictId', null);
411
+ setFieldValue('houseHoldWardId', null);
412
+ },
413
+ });
414
+ }}
415
+ style={{
416
+ height: 30,
417
+ flex: 1,
418
+ marginTop: 5,
419
+ }}
420
+ >
421
+ <MText>
422
+ {values.houseHoldProvinceId
423
+ ? values.houseHoldProvinceId?.name
424
+ : ''}
425
+ </MText>
426
+ </TouchableOpacity>
427
+ </View>
428
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
429
+ <View style={{ marginTop: 12 }}>
430
+ <MText style={{ color: '#8A8A8A' }}>
431
+ Chọn Quận/Huyện (Hộ khẩu)
432
+ </MText>
433
+ <TouchableOpacity
434
+ onPress={() => {
435
+ navigation.push('CommonSelect', {
436
+ title: 'Chọn Quận/Huyện',
437
+ data: digitalLendingStore.householdListDistricts,
438
+ callback: (item) => {
439
+ setFieldValue('houseHoldDistrictId', item);
440
+ setFieldValue('houseHoldWardId', null);
441
+ digitalLendingStore.getWards(item?.id, (data) => {
442
+ digitalLendingStore.householdListWards = data;
443
+ });
444
+ },
445
+ });
446
+ }}
447
+ style={{
448
+ height: 30,
449
+ flex: 1,
450
+ marginTop: 5,
451
+ }}
452
+ >
453
+ <MText>
454
+ {values.houseHoldDistrictId
455
+ ? values.houseHoldDistrictId?.name
456
+ : ''}
457
+ </MText>
458
+ </TouchableOpacity>
459
+ </View>
460
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
461
+ <View style={{ marginTop: 12 }}>
462
+ <MText style={{ color: '#8A8A8A' }}>
463
+ Chọn Phường/Xã (Hộ khẩu)
464
+ </MText>
465
+ <TouchableOpacity
466
+ onPress={() => {
467
+ navigation.push('CommonSelect', {
468
+ title: 'Chọn Phường/Xã',
469
+ data: digitalLendingStore.householdListWards,
470
+ callback: (item) => {
471
+ setFieldValue('houseHoldWardId', item);
472
+ },
473
+ });
474
+ }}
475
+ style={{
476
+ height: 30,
477
+ flex: 1,
478
+ marginTop: 5,
479
+ }}
480
+ >
481
+ <MText>
482
+ {values.houseHoldWardId ? values.houseHoldWardId?.name : ''}
483
+ </MText>
484
+ </TouchableOpacity>
485
+ </View>
486
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
487
+ <View style={{ marginTop: 12 }}>
488
+ <MText style={{ color: '#8A8A8A' }}>
489
+ Địa chỉ chi tiết (Hộ khẩu)
490
+ </MText>
491
+ <TextInput
492
+ value={values?.houseHoldAddress}
493
+ onChangeText={handleChange('houseHoldAddress')}
494
+ style={{
495
+ flex: 1,
496
+ color: '#33333',
497
+ height: 30,
498
+ marginVertical: 0,
499
+ flex: 1,
500
+ padding: 0,
501
+ }}
502
+ />
503
+ </View>
504
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
505
+ <View style={{ marginTop: 12 }}>
506
+ <MText style={{ color: '#8A8A8A' }}>
507
+ Địa chỉ trên CCCD/CMND
508
+ </MText>
509
+ <TextInput
510
+ value={values?.addressNationalCard}
511
+ onChangeText={handleChange('addressNationalCard')}
512
+ style={{
513
+ flex: 1,
514
+ color: '#33333',
515
+ height: 30,
516
+ marginVertical: 0,
517
+ flex: 1,
518
+ padding: 0,
519
+ }}
520
+ />
521
+ </View>
522
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
523
+ <KeyboardSpacer />
524
+ </View>
525
+ )}
526
+ </Formik>
527
+ </ScrollView>
528
+ <View
529
+ style={{
530
+ backgroundColor: 'white',
531
+ shadowOffset: {
532
+ width: 2,
533
+ height: 1,
534
+ },
535
+ ...Platform.select({
536
+ ios: {
537
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
538
+ shadowOpacity: 0.2,
539
+ },
540
+ android: {
541
+ elevation: 10,
542
+ },
543
+ }),
544
+ paddingTop: 12,
545
+ paddingHorizontal: 12,
546
+ flexDirection: 'row',
547
+ paddingBottom: 16,
548
+ justifyContent: 'space-between',
549
+ alignItems: 'center',
550
+ }}
551
+ >
552
+ <TouchableOpacity
553
+ onPress={() => (digitalLendingStore.step = 1)}
554
+ style={{
555
+ paddingHorizontal: 12,
556
+ paddingVertical: 8,
557
+ borderRadius: 40,
558
+ flexDirection: 'row',
559
+ alignItems: 'center',
560
+ borderWidth: 1,
561
+ borderColor: '#FF8E4F',
562
+ }}
563
+ >
564
+ <Back2Icon />
565
+ <MText
566
+ style={{
567
+ marginLeft: 5,
568
+ color: '#FF8E4F',
569
+ fontSize: 16,
570
+ fontWeight: '500',
571
+ }}
572
+ >
573
+ Trở lại
574
+ </MText>
575
+ </TouchableOpacity>
576
+ <StepIcon />
577
+ <TouchableOpacity
578
+ onPress={() => {
579
+ digitalLendingStore.step = 3;
580
+ ref.current.handleSubmit();
581
+ }}
582
+ >
583
+ <LinearGradient
584
+ colors={['#FF8E4F', '#EF592E']}
585
+ style={{
586
+ paddingHorizontal: 12,
587
+ paddingVertical: 8,
588
+ borderRadius: 40,
589
+ flexDirection: 'row',
590
+ alignItems: 'center',
591
+ }}
592
+ >
593
+ <MText
594
+ style={{
595
+ color: 'white',
596
+ fontSize: 16,
597
+ fontWeight: '500',
598
+ marginRight: 5,
599
+ }}
600
+ >
601
+ Tiếp tục
602
+ </MText>
603
+ <NextIcon />
604
+ </LinearGradient>
605
+ </TouchableOpacity>
606
+ </View>
607
+ </View>
608
+ );
609
+ });
610
+
611
+ const styles = StyleSheet.create({
612
+ input: {},
613
+ });