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.
- package/lib/commonjs/assets/icons/back2.svg +13 -0
- package/lib/commonjs/assets/icons/check1.svg +4 -0
- package/lib/commonjs/assets/icons/check2.svg +9 -0
- package/lib/commonjs/assets/icons/error.svg +6 -0
- package/lib/commonjs/assets/icons/index.js +1 -1
- package/lib/commonjs/assets/icons/index.js.flow +14 -0
- package/lib/commonjs/assets/icons/index.js.map +1 -1
- package/lib/commonjs/assets/icons/line2.svg +12 -0
- package/lib/commonjs/assets/icons/next.svg +6 -0
- package/lib/commonjs/assets/icons/step.svg +9 -0
- package/lib/commonjs/components/CommonSelect.js +2 -0
- package/lib/commonjs/components/CommonSelect.js.flow +12 -0
- package/lib/commonjs/components/CommonSelect.js.map +1 -0
- package/lib/commonjs/components/MText.js +1 -1
- package/lib/commonjs/components/MText.js.flow +2 -2
- package/lib/commonjs/components/MText.js.map +1 -1
- package/lib/commonjs/navigation/primary-navigator.js +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.flow +6 -0
- package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/Step1.js +2 -0
- package/lib/commonjs/screens/digital-lending/Step1.js.flow +661 -0
- package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -0
- package/lib/commonjs/screens/digital-lending/Step2.js +2 -0
- package/lib/commonjs/screens/digital-lending/Step2.js.flow +610 -0
- package/lib/commonjs/screens/digital-lending/Step2.js.map +1 -0
- package/lib/commonjs/screens/digital-lending/Step3.js +2 -0
- package/lib/commonjs/screens/digital-lending/Step3.js.flow +602 -0
- package/lib/commonjs/screens/digital-lending/Step3.js.map +1 -0
- package/lib/commonjs/screens/digital-lending/Step4.js +2 -0
- package/lib/commonjs/screens/digital-lending/Step4.js.flow +495 -0
- package/lib/commonjs/screens/digital-lending/Step4.js.map +1 -0
- package/lib/commonjs/screens/digital-lending/Step5.js +2 -0
- package/lib/commonjs/screens/digital-lending/Step5.js.flow +350 -0
- package/lib/commonjs/screens/digital-lending/Step5.js.map +1 -0
- package/lib/commonjs/screens/digital-lending/Step6.js +2 -0
- package/lib/commonjs/screens/digital-lending/Step6.js.flow +366 -0
- package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -0
- package/lib/commonjs/screens/digital-lending/index.js +2 -0
- package/lib/commonjs/screens/digital-lending/index.js.flow +110 -0
- package/lib/commonjs/screens/digital-lending/index.js.map +1 -0
- package/lib/commonjs/screens/digital-lending/store.js +2 -0
- package/lib/commonjs/screens/digital-lending/store.js.flow +294 -0
- package/lib/commonjs/screens/digital-lending/store.js.map +1 -0
- package/lib/commonjs/screens/home/index.js +1 -1
- package/lib/commonjs/screens/home/index.js.flow +467 -0
- package/lib/commonjs/screens/home/index.js.map +1 -1
- package/lib/commonjs/screens/register/index.js +1 -1
- package/lib/commonjs/screens/register/index.js.flow +1 -1
- package/lib/commonjs/services/api/api-config.js +1 -1
- package/lib/commonjs/services/api/api-config.js.flow +2 -2
- package/lib/commonjs/services/api/api-config.js.map +1 -1
- package/lib/commonjs/services/api/api.js +1 -1
- package/lib/commonjs/services/api/api.js.flow +95 -0
- package/lib/commonjs/services/api/api.js.map +1 -1
- package/lib/module/assets/icons/back2.svg +13 -0
- package/lib/module/assets/icons/check1.svg +4 -0
- package/lib/module/assets/icons/check2.svg +9 -0
- package/lib/module/assets/icons/error.svg +6 -0
- package/lib/module/assets/icons/index.js +1 -1
- package/lib/module/assets/icons/index.js.map +1 -1
- package/lib/module/assets/icons/line2.svg +12 -0
- package/lib/module/assets/icons/next.svg +6 -0
- package/lib/module/assets/icons/step.svg +9 -0
- package/lib/module/components/CommonSelect.js +2 -0
- package/lib/module/components/CommonSelect.js.map +1 -0
- package/lib/module/components/MText.js +1 -1
- package/lib/module/components/MText.js.map +1 -1
- package/lib/module/navigation/primary-navigator.js +1 -1
- package/lib/module/navigation/primary-navigator.js.map +1 -1
- package/lib/module/screens/digital-lending/Step1.js +2 -0
- package/lib/module/screens/digital-lending/Step1.js.map +1 -0
- package/lib/module/screens/digital-lending/Step2.js +2 -0
- package/lib/module/screens/digital-lending/Step2.js.map +1 -0
- package/lib/module/screens/digital-lending/Step3.js +2 -0
- package/lib/module/screens/digital-lending/Step3.js.map +1 -0
- package/lib/module/screens/digital-lending/Step4.js +2 -0
- package/lib/module/screens/digital-lending/Step4.js.map +1 -0
- package/lib/module/screens/digital-lending/Step5.js +2 -0
- package/lib/module/screens/digital-lending/Step5.js.map +1 -0
- package/lib/module/screens/digital-lending/Step6.js +2 -0
- package/lib/module/screens/digital-lending/Step6.js.map +1 -0
- package/lib/module/screens/digital-lending/index.js +2 -0
- package/lib/module/screens/digital-lending/index.js.map +1 -0
- package/lib/module/screens/digital-lending/store.js +2 -0
- package/lib/module/screens/digital-lending/store.js.map +1 -0
- package/lib/module/screens/home/index.js +1 -1
- package/lib/module/screens/home/index.js.map +1 -1
- package/lib/module/screens/register/index.js +1 -1
- package/lib/module/services/api/api-config.js +1 -1
- package/lib/module/services/api/api-config.js.map +1 -1
- package/lib/module/services/api/api.js +1 -1
- package/lib/module/services/api/api.js.map +1 -1
- package/lib/typescript/assets/icons/index.d.ts +8 -1
- package/lib/typescript/assets/icons/index.d.ts.map +1 -1
- package/lib/typescript/components/CommonSelect.d.ts +8 -0
- package/lib/typescript/components/CommonSelect.d.ts.map +1 -0
- package/lib/typescript/navigation/primary-navigator.d.ts +1 -0
- package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
- package/lib/typescript/screens/digital-lending/Step1.d.ts +2 -0
- package/lib/typescript/screens/digital-lending/Step1.d.ts.map +1 -0
- package/lib/typescript/screens/digital-lending/Step2.d.ts +2 -0
- package/lib/typescript/screens/digital-lending/Step2.d.ts.map +1 -0
- package/lib/typescript/screens/digital-lending/Step3.d.ts +2 -0
- package/lib/typescript/screens/digital-lending/Step3.d.ts.map +1 -0
- package/lib/typescript/screens/digital-lending/Step4.d.ts +2 -0
- package/lib/typescript/screens/digital-lending/Step4.d.ts.map +1 -0
- package/lib/typescript/screens/digital-lending/Step5.d.ts +2 -0
- package/lib/typescript/screens/digital-lending/Step5.d.ts.map +1 -0
- package/lib/typescript/screens/digital-lending/Step6.d.ts +2 -0
- package/lib/typescript/screens/digital-lending/Step6.d.ts.map +1 -0
- package/lib/typescript/screens/digital-lending/index.d.ts +2 -0
- package/lib/typescript/screens/digital-lending/index.d.ts.map +1 -0
- package/lib/typescript/screens/digital-lending/store.d.ts +35 -0
- package/lib/typescript/screens/digital-lending/store.d.ts.map +1 -0
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/lib/typescript/services/api/api.d.ts +80 -19
- package/lib/typescript/services/api/api.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons/back2.svg +13 -0
- package/src/assets/icons/check1.svg +4 -0
- package/src/assets/icons/check2.svg +9 -0
- package/src/assets/icons/error.svg +6 -0
- package/src/assets/icons/index.tsx +14 -0
- package/src/assets/icons/line2.svg +12 -0
- package/src/assets/icons/next.svg +6 -0
- package/src/assets/icons/step.svg +9 -0
- package/src/components/CommonSelect.tsx +12 -0
- package/src/components/MText.tsx +2 -2
- package/src/navigation/primary-navigator.tsx +6 -0
- package/src/screens/digital-lending/Step1.tsx +661 -0
- package/src/screens/digital-lending/Step2.tsx +610 -0
- package/src/screens/digital-lending/Step3.tsx +602 -0
- package/src/screens/digital-lending/Step4.tsx +495 -0
- package/src/screens/digital-lending/Step5.tsx +350 -0
- package/src/screens/digital-lending/Step6.tsx +366 -0
- package/src/screens/digital-lending/index.tsx +110 -0
- package/src/screens/digital-lending/store.tsx +294 -0
- package/src/screens/home/index.tsx +467 -0
- package/src/screens/register/index.tsx +1 -1
- package/src/services/api/api-config.ts +2 -2
- package/src/services/api/api.ts +95 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { useNavigation } from '@react-navigation/native';
|
|
4
|
+
import { observer } from 'mobx-react-lite';
|
|
5
|
+
import {
|
|
6
|
+
Alert,
|
|
7
|
+
Dimensions,
|
|
8
|
+
Image,
|
|
9
|
+
ScrollView,
|
|
10
|
+
TouchableOpacity,
|
|
11
|
+
View,
|
|
12
|
+
} from 'react-native';
|
|
13
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
14
|
+
import {
|
|
15
|
+
Back2Icon,
|
|
16
|
+
StepIcon,
|
|
17
|
+
NextIcon,
|
|
18
|
+
Line2Icon,
|
|
19
|
+
WarningIcon,
|
|
20
|
+
ErrorIcon,
|
|
21
|
+
Check2Icon,
|
|
22
|
+
Check1Icon,
|
|
23
|
+
IConCamera,
|
|
24
|
+
} from '../../assets/icons';
|
|
25
|
+
import { MText } from '../../components/MText';
|
|
26
|
+
import digitalLendingStore from './store';
|
|
27
|
+
import { ScreenNames } from '../../navigation';
|
|
28
|
+
|
|
29
|
+
export const Step6 = observer(function Step6() {
|
|
30
|
+
const navigation = useNavigation();
|
|
31
|
+
const [check, setCheck] = useState(1);
|
|
32
|
+
const [photo, setPhoto] = useState(null);
|
|
33
|
+
return (
|
|
34
|
+
<View style={{ flex: 1 }}>
|
|
35
|
+
<ScrollView style={{ paddingHorizontal: 12 }}>
|
|
36
|
+
<View
|
|
37
|
+
style={{
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
justifyContent: 'space-between',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
paddingVertical: 16,
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
<View
|
|
45
|
+
style={{
|
|
46
|
+
width: 40,
|
|
47
|
+
height: 40,
|
|
48
|
+
borderRadius: 40,
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
shadowRadius: 40,
|
|
52
|
+
backgroundColor: '#FFF3E9',
|
|
53
|
+
borderWidth: 1,
|
|
54
|
+
borderColor: '#FF8E4F',
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
<MText style={{ fontWeight: 'bold', color: '#FF8E4F' }}>01</MText>
|
|
58
|
+
</View>
|
|
59
|
+
<View
|
|
60
|
+
style={{
|
|
61
|
+
width: 40,
|
|
62
|
+
height: 40,
|
|
63
|
+
borderRadius: 40,
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
justifyContent: 'center',
|
|
66
|
+
shadowRadius: 40,
|
|
67
|
+
backgroundColor: '#FFF3E9',
|
|
68
|
+
borderWidth: 1,
|
|
69
|
+
borderColor: '#FF8E4F',
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
<MText style={{ color: '#FF8E4F', fontWeight: 'bold' }}>02</MText>
|
|
73
|
+
</View>
|
|
74
|
+
<View
|
|
75
|
+
style={{
|
|
76
|
+
width: 40,
|
|
77
|
+
height: 40,
|
|
78
|
+
borderRadius: 40,
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
shadowRadius: 40,
|
|
82
|
+
backgroundColor: '#FFF3E9',
|
|
83
|
+
borderWidth: 1,
|
|
84
|
+
borderColor: '#FF8E4F',
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
<MText style={{ color: '#FF8E4F', fontWeight: 'bold' }}>03</MText>
|
|
88
|
+
</View>
|
|
89
|
+
<View
|
|
90
|
+
style={{
|
|
91
|
+
width: 40,
|
|
92
|
+
height: 40,
|
|
93
|
+
borderRadius: 40,
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
justifyContent: 'center',
|
|
96
|
+
shadowRadius: 40,
|
|
97
|
+
backgroundColor: '#FFF3E9',
|
|
98
|
+
borderWidth: 1,
|
|
99
|
+
borderColor: '#FF8E4F',
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
<MText style={{ color: '#FF8E4F', fontWeight: 'bold' }}>04</MText>
|
|
103
|
+
</View>
|
|
104
|
+
<View
|
|
105
|
+
style={{
|
|
106
|
+
width: 40,
|
|
107
|
+
height: 40,
|
|
108
|
+
borderRadius: 40,
|
|
109
|
+
alignItems: 'center',
|
|
110
|
+
justifyContent: 'center',
|
|
111
|
+
shadowRadius: 40,
|
|
112
|
+
backgroundColor: '#FFF3E9',
|
|
113
|
+
borderWidth: 1,
|
|
114
|
+
borderColor: '#FF8E4F',
|
|
115
|
+
}}
|
|
116
|
+
>
|
|
117
|
+
<MText style={{ color: '#FF8E4F', fontWeight: 'bold' }}>05</MText>
|
|
118
|
+
</View>
|
|
119
|
+
<LinearGradient
|
|
120
|
+
colors={['#FF8E4F', '#EF592E']}
|
|
121
|
+
style={{
|
|
122
|
+
width: 40,
|
|
123
|
+
height: 40,
|
|
124
|
+
borderRadius: 40,
|
|
125
|
+
alignItems: 'center',
|
|
126
|
+
justifyContent: 'center',
|
|
127
|
+
}}
|
|
128
|
+
>
|
|
129
|
+
<MText style={{ fontWeight: 'bold', color: 'white' }}>06</MText>
|
|
130
|
+
</LinearGradient>
|
|
131
|
+
<Line2Icon />
|
|
132
|
+
</View>
|
|
133
|
+
<MText style={{ fontWeight: 'bold' }}>THÔNG TIN CÀ VẸT XE</MText>
|
|
134
|
+
<View
|
|
135
|
+
style={{
|
|
136
|
+
marginVertical: 8,
|
|
137
|
+
borderWidth: 1,
|
|
138
|
+
borderRadius: 8,
|
|
139
|
+
borderColor: '#EB5757',
|
|
140
|
+
padding: 12,
|
|
141
|
+
flexDirection: 'row',
|
|
142
|
+
}}
|
|
143
|
+
>
|
|
144
|
+
<ErrorIcon />
|
|
145
|
+
<MText style={{ fontSize: 12, flex: 1, marginLeft: 10 }}>
|
|
146
|
+
Cung cấp hình ảnh đăng ký xe là điều kiện bắt buộc, bạn vui lòng
|
|
147
|
+
cung cấp hình ảnh đăng ký xe để đơn được đẩy đi nhanh hơn.
|
|
148
|
+
</MText>
|
|
149
|
+
</View>
|
|
150
|
+
<View style={{ height: 1, backgroundColor: '#BDBDBD', marginTop: 8 }} />
|
|
151
|
+
<View style={{ flexDirection: 'row', marginTop: 12 }}>
|
|
152
|
+
<TouchableOpacity onPress={() => setCheck(1)}>
|
|
153
|
+
{check === 1 ? <Check2Icon /> : <Check1Icon />}
|
|
154
|
+
</TouchableOpacity>
|
|
155
|
+
<View style={{ flex: 1, marginLeft: 12 }}>
|
|
156
|
+
<MText style={{ flex: 1 }}>
|
|
157
|
+
Tôi chưa từng cung cấp hình ảnh đăng ký xe cho Tima
|
|
158
|
+
</MText>
|
|
159
|
+
{check === 1 && (
|
|
160
|
+
<View style={{ flexDirection: 'row', marginTop: 12 }}>
|
|
161
|
+
{photo === null ? (
|
|
162
|
+
<TouchableOpacity
|
|
163
|
+
onPress={() => {
|
|
164
|
+
navigation.push(ScreenNames.Camera, {
|
|
165
|
+
front: false,
|
|
166
|
+
callback: (photo) => {
|
|
167
|
+
const formData = new FormData();
|
|
168
|
+
formData.append(
|
|
169
|
+
'loanbriefId',
|
|
170
|
+
digitalLendingStore?.data?.loanBriefId
|
|
171
|
+
);
|
|
172
|
+
formData.append('TypeDocumentId', 314);
|
|
173
|
+
formData.append('image', {
|
|
174
|
+
uri: photo,
|
|
175
|
+
type: 'image/jpg',
|
|
176
|
+
name: 'image.jpg',
|
|
177
|
+
});
|
|
178
|
+
digitalLendingStore.uploadCavet(formData, () => {
|
|
179
|
+
setPhoto(photo);
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
}}
|
|
184
|
+
style={{
|
|
185
|
+
flexDirection: 'row',
|
|
186
|
+
alignItems: 'center',
|
|
187
|
+
padding: 8,
|
|
188
|
+
borderWidth: 1,
|
|
189
|
+
borderRadius: 6,
|
|
190
|
+
borderColor: '#FF8E4F',
|
|
191
|
+
}}
|
|
192
|
+
>
|
|
193
|
+
<IConCamera />
|
|
194
|
+
<MText style={{ color: '#FF8E4F', marginLeft: 12 }}>
|
|
195
|
+
Chụp ảnh đăng ký xe
|
|
196
|
+
</MText>
|
|
197
|
+
</TouchableOpacity>
|
|
198
|
+
) : (
|
|
199
|
+
<View>
|
|
200
|
+
<Image
|
|
201
|
+
source={{ uri: photo }}
|
|
202
|
+
style={{
|
|
203
|
+
width: Dimensions.get('window').width - 150,
|
|
204
|
+
height:
|
|
205
|
+
((Dimensions.get('window').width - 120) * 216) / 360,
|
|
206
|
+
borderWidth: 8,
|
|
207
|
+
borderRadius: 6,
|
|
208
|
+
}}
|
|
209
|
+
/>
|
|
210
|
+
<View style={{ flexDirection: 'row', marginTop: 12 }}>
|
|
211
|
+
<TouchableOpacity
|
|
212
|
+
onPress={() => {
|
|
213
|
+
navigation.push(ScreenNames.Camera, {
|
|
214
|
+
front: false,
|
|
215
|
+
callback: (photo) => {
|
|
216
|
+
setPhoto(photo);
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
}}
|
|
220
|
+
style={{
|
|
221
|
+
flexDirection: 'row',
|
|
222
|
+
alignItems: 'center',
|
|
223
|
+
padding: 8,
|
|
224
|
+
borderWidth: 1,
|
|
225
|
+
borderRadius: 6,
|
|
226
|
+
borderColor: '#FF8E4F',
|
|
227
|
+
}}
|
|
228
|
+
>
|
|
229
|
+
<IConCamera />
|
|
230
|
+
<MText style={{ color: '#FF8E4F', marginLeft: 12 }}>
|
|
231
|
+
Chụp lại
|
|
232
|
+
</MText>
|
|
233
|
+
</TouchableOpacity>
|
|
234
|
+
</View>
|
|
235
|
+
</View>
|
|
236
|
+
)}
|
|
237
|
+
</View>
|
|
238
|
+
)}
|
|
239
|
+
</View>
|
|
240
|
+
</View>
|
|
241
|
+
<View style={{ flexDirection: 'row', marginTop: 12 }}>
|
|
242
|
+
<TouchableOpacity
|
|
243
|
+
onPress={() => {
|
|
244
|
+
setCheck(2);
|
|
245
|
+
setPhoto(null);
|
|
246
|
+
}}
|
|
247
|
+
>
|
|
248
|
+
{check === 2 ? <Check2Icon /> : <Check1Icon />}
|
|
249
|
+
</TouchableOpacity>
|
|
250
|
+
<View style={{ flex: 1, marginLeft: 12 }}>
|
|
251
|
+
<MText style={{ flex: 1 }}>
|
|
252
|
+
Đăng ký xe của tôi hiện đang được Tima giữ
|
|
253
|
+
</MText>
|
|
254
|
+
</View>
|
|
255
|
+
</View>
|
|
256
|
+
</ScrollView>
|
|
257
|
+
<View
|
|
258
|
+
style={{
|
|
259
|
+
backgroundColor: 'white',
|
|
260
|
+
shadowOffset: {
|
|
261
|
+
width: 2,
|
|
262
|
+
height: 1,
|
|
263
|
+
},
|
|
264
|
+
...Platform.select({
|
|
265
|
+
ios: {
|
|
266
|
+
shadowColor: 'rgba(0, 0, 0, 0.10)',
|
|
267
|
+
shadowOpacity: 0.2,
|
|
268
|
+
},
|
|
269
|
+
android: {
|
|
270
|
+
elevation: 10,
|
|
271
|
+
},
|
|
272
|
+
}),
|
|
273
|
+
paddingTop: 12,
|
|
274
|
+
paddingHorizontal: 12,
|
|
275
|
+
flexDirection: 'row',
|
|
276
|
+
paddingBottom: 16,
|
|
277
|
+
justifyContent: 'space-between',
|
|
278
|
+
alignItems: 'center',
|
|
279
|
+
}}
|
|
280
|
+
>
|
|
281
|
+
<TouchableOpacity
|
|
282
|
+
onPress={() => (digitalLendingStore.step = 5)}
|
|
283
|
+
style={{
|
|
284
|
+
paddingHorizontal: 12,
|
|
285
|
+
paddingVertical: 8,
|
|
286
|
+
borderRadius: 40,
|
|
287
|
+
flexDirection: 'row',
|
|
288
|
+
alignItems: 'center',
|
|
289
|
+
borderWidth: 1,
|
|
290
|
+
borderColor: '#FF8E4F',
|
|
291
|
+
}}
|
|
292
|
+
>
|
|
293
|
+
<Back2Icon />
|
|
294
|
+
<MText
|
|
295
|
+
style={{
|
|
296
|
+
marginLeft: 5,
|
|
297
|
+
color: '#FF8E4F',
|
|
298
|
+
fontSize: 16,
|
|
299
|
+
fontWeight: '500',
|
|
300
|
+
}}
|
|
301
|
+
>
|
|
302
|
+
Trở lại
|
|
303
|
+
</MText>
|
|
304
|
+
</TouchableOpacity>
|
|
305
|
+
<StepIcon />
|
|
306
|
+
<TouchableOpacity
|
|
307
|
+
onPress={() => {
|
|
308
|
+
Alert.alert(
|
|
309
|
+
'Vui lòng xác nhận lại',
|
|
310
|
+
'Những thông tin đã đúng với thông tin của bạn chưa?',
|
|
311
|
+
[
|
|
312
|
+
{
|
|
313
|
+
text: 'Xác nhận',
|
|
314
|
+
onPress: () => {
|
|
315
|
+
digitalLendingStore.uploadLoanReborrow(
|
|
316
|
+
digitalLendingStore.body,
|
|
317
|
+
() => {
|
|
318
|
+
Alert.alert('Cập nhật thông tin thành công', '', [
|
|
319
|
+
{
|
|
320
|
+
text: 'Đồng ý',
|
|
321
|
+
onPress: () => navigation.pop(),
|
|
322
|
+
},
|
|
323
|
+
]);
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
text: 'Huỷ',
|
|
330
|
+
},
|
|
331
|
+
]
|
|
332
|
+
);
|
|
333
|
+
}}
|
|
334
|
+
disabled={check === 1 && photo === null ? true : false}
|
|
335
|
+
>
|
|
336
|
+
<LinearGradient
|
|
337
|
+
colors={
|
|
338
|
+
check === 1 && photo === null
|
|
339
|
+
? ['#E0E0E0', '#E0E0E0']
|
|
340
|
+
: ['#FF8E4F', '#EF592E']
|
|
341
|
+
}
|
|
342
|
+
style={{
|
|
343
|
+
paddingHorizontal: 15,
|
|
344
|
+
paddingVertical: 8,
|
|
345
|
+
borderRadius: 40,
|
|
346
|
+
flexDirection: 'row',
|
|
347
|
+
alignItems: 'center',
|
|
348
|
+
}}
|
|
349
|
+
>
|
|
350
|
+
<MText
|
|
351
|
+
style={{
|
|
352
|
+
color: 'white',
|
|
353
|
+
fontSize: 16,
|
|
354
|
+
fontWeight: '500',
|
|
355
|
+
marginRight: 5,
|
|
356
|
+
}}
|
|
357
|
+
>
|
|
358
|
+
Lưu
|
|
359
|
+
</MText>
|
|
360
|
+
<NextIcon />
|
|
361
|
+
</LinearGradient>
|
|
362
|
+
</TouchableOpacity>
|
|
363
|
+
</View>
|
|
364
|
+
</View>
|
|
365
|
+
);
|
|
366
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
3
|
+
import { observer } from 'mobx-react-lite';
|
|
4
|
+
import {
|
|
5
|
+
Platform,
|
|
6
|
+
SafeAreaView,
|
|
7
|
+
ScrollView,
|
|
8
|
+
TouchableOpacity,
|
|
9
|
+
View,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import { useNavigation } from '@react-navigation/native';
|
|
12
|
+
import { commonStyles } from '../CommonStyles';
|
|
13
|
+
import { MText } from '../../components/MText';
|
|
14
|
+
import {
|
|
15
|
+
Back2Icon,
|
|
16
|
+
IconBackWhite,
|
|
17
|
+
NextIcon,
|
|
18
|
+
StepIcon,
|
|
19
|
+
} from '../../assets/icons';
|
|
20
|
+
import MButton from '../../components/MButton';
|
|
21
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
22
|
+
import digitalLendingStore from './store';
|
|
23
|
+
import { Step1 } from './Step1';
|
|
24
|
+
import { Step2 } from './Step2';
|
|
25
|
+
import { Step3 } from './Step3';
|
|
26
|
+
import { Step4 } from './Step4';
|
|
27
|
+
import { Step5 } from './Step5';
|
|
28
|
+
import { Step6 } from './Step6';
|
|
29
|
+
import Loading from '../../components/Loading';
|
|
30
|
+
|
|
31
|
+
export const DigitalLending = observer(function DigitalLending(props: any) {
|
|
32
|
+
const navigation = useNavigation();
|
|
33
|
+
const loan = props?.route?.params;
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
digitalLendingStore.getDetailLoan(loan?.id);
|
|
37
|
+
digitalLendingStore.getProvinces();
|
|
38
|
+
digitalLendingStore.getJob();
|
|
39
|
+
digitalLendingStore.getBrandProduct();
|
|
40
|
+
digitalLendingStore.getBank();
|
|
41
|
+
}, []);
|
|
42
|
+
|
|
43
|
+
const renderView = (step: number) => {
|
|
44
|
+
switch (step) {
|
|
45
|
+
case 1:
|
|
46
|
+
return <Step1 />;
|
|
47
|
+
case 2:
|
|
48
|
+
return <Step2 />;
|
|
49
|
+
case 3:
|
|
50
|
+
return <Step3 />;
|
|
51
|
+
case 4:
|
|
52
|
+
return <Step4 />;
|
|
53
|
+
case 5:
|
|
54
|
+
return <Step5 />;
|
|
55
|
+
case 6:
|
|
56
|
+
return <Step6 />;
|
|
57
|
+
default:
|
|
58
|
+
null;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<View style={[commonStyles.fill, { zIndex: 1, backgroundColor: 'white' }]}>
|
|
64
|
+
<LinearGradient colors={['#FF8E4F', '#EF592E']}>
|
|
65
|
+
<SafeAreaView style={{}}>
|
|
66
|
+
<View
|
|
67
|
+
style={{
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
justifyContent: 'center',
|
|
70
|
+
paddingHorizontal: 16,
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
height: 60,
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
{digitalLendingStore.step === 1 && (
|
|
76
|
+
<MButton
|
|
77
|
+
style={{
|
|
78
|
+
height: 32,
|
|
79
|
+
width: 32,
|
|
80
|
+
borderRadius: 30,
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
justifyContent: 'center',
|
|
83
|
+
position: 'absolute',
|
|
84
|
+
left: 16,
|
|
85
|
+
}}
|
|
86
|
+
onPress={() => {
|
|
87
|
+
navigation.pop();
|
|
88
|
+
digitalLendingStore.clear();
|
|
89
|
+
}}
|
|
90
|
+
>
|
|
91
|
+
<IconBackWhite />
|
|
92
|
+
</MButton>
|
|
93
|
+
)}
|
|
94
|
+
<MText
|
|
95
|
+
style={{
|
|
96
|
+
fontWeight: 'bold',
|
|
97
|
+
color: 'white',
|
|
98
|
+
fontSize: 16,
|
|
99
|
+
}}
|
|
100
|
+
>
|
|
101
|
+
Thông tin cá nhân
|
|
102
|
+
</MText>
|
|
103
|
+
</View>
|
|
104
|
+
</SafeAreaView>
|
|
105
|
+
</LinearGradient>
|
|
106
|
+
{renderView(digitalLendingStore.step)}
|
|
107
|
+
<Loading isLoading={digitalLendingStore.isLoading} />
|
|
108
|
+
</View>
|
|
109
|
+
);
|
|
110
|
+
});
|