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,610 @@
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
+ color: '#33333',
386
+ height: 30,
387
+ marginVertical: 0,
388
+ flex: 1,
389
+ padding: 0,
390
+ }}
391
+ />
392
+ </View>
393
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
394
+ <View style={{ marginTop: 12 }}>
395
+ <MText style={{ color: '#8A8A8A' }}>
396
+ Chọn thành phố (Hộ khẩu)
397
+ </MText>
398
+ <TouchableOpacity
399
+ onPress={() => {
400
+ navigation.push('CommonSelect', {
401
+ title: 'Chọn tỉnh/thành phố',
402
+ data: digitalLendingStore.listProvinces,
403
+ callback: (item) => {
404
+ setFieldValue('houseHoldProvinceId', item);
405
+ digitalLendingStore.getDistricts(item?.id, (data) => {
406
+ digitalLendingStore.householdListDistricts = data;
407
+ });
408
+ digitalLendingStore.householdListWards = [];
409
+ setFieldValue('houseHoldDistrictId', null);
410
+ setFieldValue('houseHoldWardId', null);
411
+ },
412
+ });
413
+ }}
414
+ style={{
415
+ height: 30,
416
+ flex: 1,
417
+ marginTop: 5,
418
+ }}
419
+ >
420
+ <MText>
421
+ {values.houseHoldProvinceId
422
+ ? values.houseHoldProvinceId?.name
423
+ : ''}
424
+ </MText>
425
+ </TouchableOpacity>
426
+ </View>
427
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
428
+ <View style={{ marginTop: 12 }}>
429
+ <MText style={{ color: '#8A8A8A' }}>
430
+ Chọn Quận/Huyện (Hộ khẩu)
431
+ </MText>
432
+ <TouchableOpacity
433
+ onPress={() => {
434
+ navigation.push('CommonSelect', {
435
+ title: 'Chọn Quận/Huyện',
436
+ data: digitalLendingStore.householdListDistricts,
437
+ callback: (item) => {
438
+ setFieldValue('houseHoldDistrictId', item);
439
+ setFieldValue('houseHoldWardId', null);
440
+ digitalLendingStore.getWards(item?.id, (data) => {
441
+ digitalLendingStore.householdListWards = data;
442
+ });
443
+ },
444
+ });
445
+ }}
446
+ style={{
447
+ height: 30,
448
+ flex: 1,
449
+ marginTop: 5,
450
+ }}
451
+ >
452
+ <MText>
453
+ {values.houseHoldDistrictId
454
+ ? values.houseHoldDistrictId?.name
455
+ : ''}
456
+ </MText>
457
+ </TouchableOpacity>
458
+ </View>
459
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
460
+ <View style={{ marginTop: 12 }}>
461
+ <MText style={{ color: '#8A8A8A' }}>
462
+ Chọn Phường/Xã (Hộ khẩu)
463
+ </MText>
464
+ <TouchableOpacity
465
+ onPress={() => {
466
+ navigation.push('CommonSelect', {
467
+ title: 'Chọn Phường/Xã',
468
+ data: digitalLendingStore.householdListWards,
469
+ callback: (item) => {
470
+ setFieldValue('houseHoldWardId', item);
471
+ },
472
+ });
473
+ }}
474
+ style={{
475
+ height: 30,
476
+ flex: 1,
477
+ marginTop: 5,
478
+ }}
479
+ >
480
+ <MText>
481
+ {values.houseHoldWardId ? values.houseHoldWardId?.name : ''}
482
+ </MText>
483
+ </TouchableOpacity>
484
+ </View>
485
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
486
+ <View style={{ marginTop: 12 }}>
487
+ <MText style={{ color: '#8A8A8A' }}>
488
+ Địa chỉ chi tiết (Hộ khẩu)
489
+ </MText>
490
+ <TextInput
491
+ value={values?.houseHoldAddress}
492
+ onChangeText={handleChange('houseHoldAddress')}
493
+ style={{
494
+ color: '#33333',
495
+ height: 30,
496
+ marginVertical: 0,
497
+ flex: 1,
498
+ padding: 0,
499
+ }}
500
+ />
501
+ </View>
502
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
503
+ <View style={{ marginTop: 12 }}>
504
+ <MText style={{ color: '#8A8A8A' }}>
505
+ Địa chỉ trên CCCD/CMND
506
+ </MText>
507
+ <TextInput
508
+ value={values?.addressNationalCard}
509
+ onChangeText={handleChange('addressNationalCard')}
510
+ style={{
511
+ color: '#33333',
512
+ height: 30,
513
+ marginVertical: 0,
514
+ flex: 1,
515
+ padding: 0,
516
+ }}
517
+ />
518
+ </View>
519
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
520
+ <KeyboardSpacer />
521
+ </View>
522
+ )}
523
+ </Formik>
524
+ </ScrollView>
525
+ <View
526
+ style={{
527
+ backgroundColor: 'white',
528
+ shadowOffset: {
529
+ width: 2,
530
+ height: 1,
531
+ },
532
+ ...Platform.select({
533
+ ios: {
534
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
535
+ shadowOpacity: 0.2,
536
+ },
537
+ android: {
538
+ elevation: 10,
539
+ },
540
+ }),
541
+ paddingTop: 12,
542
+ paddingHorizontal: 12,
543
+ flexDirection: 'row',
544
+ paddingBottom: 16,
545
+ justifyContent: 'space-between',
546
+ alignItems: 'center',
547
+ }}
548
+ >
549
+ <TouchableOpacity
550
+ onPress={() => (digitalLendingStore.step = 1)}
551
+ style={{
552
+ paddingHorizontal: 12,
553
+ paddingVertical: 8,
554
+ borderRadius: 40,
555
+ flexDirection: 'row',
556
+ alignItems: 'center',
557
+ borderWidth: 1,
558
+ borderColor: '#FF8E4F',
559
+ }}
560
+ >
561
+ <Back2Icon />
562
+ <MText
563
+ style={{
564
+ marginLeft: 5,
565
+ color: '#FF8E4F',
566
+ fontSize: 16,
567
+ fontWeight: '500',
568
+ }}
569
+ >
570
+ Trở lại
571
+ </MText>
572
+ </TouchableOpacity>
573
+ <StepIcon />
574
+ <TouchableOpacity
575
+ onPress={() => {
576
+ digitalLendingStore.step = 3;
577
+ ref.current.handleSubmit();
578
+ }}
579
+ >
580
+ <LinearGradient
581
+ colors={['#FF8E4F', '#EF592E']}
582
+ style={{
583
+ paddingHorizontal: 12,
584
+ paddingVertical: 8,
585
+ borderRadius: 40,
586
+ flexDirection: 'row',
587
+ alignItems: 'center',
588
+ }}
589
+ >
590
+ <MText
591
+ style={{
592
+ color: 'white',
593
+ fontSize: 16,
594
+ fontWeight: '500',
595
+ marginRight: 5,
596
+ }}
597
+ >
598
+ Tiếp tục
599
+ </MText>
600
+ <NextIcon />
601
+ </LinearGradient>
602
+ </TouchableOpacity>
603
+ </View>
604
+ </View>
605
+ );
606
+ });
607
+
608
+ const styles = StyleSheet.create({
609
+ input: {},
610
+ });