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