react-native-timacare 1.0.0 → 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 (165) 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/detail-loan/store.js +1 -1
  21. package/lib/commonjs/screens/detail-loan/store.js.flow +1 -1
  22. package/lib/commonjs/screens/detail-loan/store.js.map +1 -1
  23. package/lib/commonjs/screens/digital-lending/Step1.js +2 -0
  24. package/lib/commonjs/screens/digital-lending/Step1.js.flow +661 -0
  25. package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -0
  26. package/lib/commonjs/screens/digital-lending/Step2.js +2 -0
  27. package/lib/commonjs/screens/digital-lending/Step2.js.flow +610 -0
  28. package/lib/commonjs/screens/digital-lending/Step2.js.map +1 -0
  29. package/lib/commonjs/screens/digital-lending/Step3.js +2 -0
  30. package/lib/commonjs/screens/digital-lending/Step3.js.flow +602 -0
  31. package/lib/commonjs/screens/digital-lending/Step3.js.map +1 -0
  32. package/lib/commonjs/screens/digital-lending/Step4.js +2 -0
  33. package/lib/commonjs/screens/digital-lending/Step4.js.flow +495 -0
  34. package/lib/commonjs/screens/digital-lending/Step4.js.map +1 -0
  35. package/lib/commonjs/screens/digital-lending/Step5.js +2 -0
  36. package/lib/commonjs/screens/digital-lending/Step5.js.flow +350 -0
  37. package/lib/commonjs/screens/digital-lending/Step5.js.map +1 -0
  38. package/lib/commonjs/screens/digital-lending/Step6.js +2 -0
  39. package/lib/commonjs/screens/digital-lending/Step6.js.flow +366 -0
  40. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -0
  41. package/lib/commonjs/screens/digital-lending/index.js +2 -0
  42. package/lib/commonjs/screens/digital-lending/index.js.flow +110 -0
  43. package/lib/commonjs/screens/digital-lending/index.js.map +1 -0
  44. package/lib/commonjs/screens/digital-lending/store.js +2 -0
  45. package/lib/commonjs/screens/digital-lending/store.js.flow +294 -0
  46. package/lib/commonjs/screens/digital-lending/store.js.map +1 -0
  47. package/lib/commonjs/screens/full-submit/accept_policy.js +1 -1
  48. package/lib/commonjs/screens/full-submit/accept_policy.js.flow +1 -1
  49. package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -1
  50. package/lib/commonjs/screens/home/index.js +1 -1
  51. package/lib/commonjs/screens/home/index.js.flow +467 -0
  52. package/lib/commonjs/screens/home/index.js.map +1 -1
  53. package/lib/commonjs/screens/notification/index.js +1 -1
  54. package/lib/commonjs/screens/notification/index.js.flow +1 -1
  55. package/lib/commonjs/screens/notification/index.js.map +1 -1
  56. package/lib/commonjs/screens/register/index.js +1 -1
  57. package/lib/commonjs/screens/register/index.js.flow +1 -1
  58. package/lib/commonjs/screens/schedule-payment/index.js +1 -1
  59. package/lib/commonjs/screens/schedule-payment/index.js.flow +1 -1
  60. package/lib/commonjs/screens/schedule-payment/index.js.map +1 -1
  61. package/lib/commonjs/services/api/api-config.js +1 -1
  62. package/lib/commonjs/services/api/api-config.js.flow +2 -2
  63. package/lib/commonjs/services/api/api-config.js.map +1 -1
  64. package/lib/commonjs/services/api/api.js +1 -1
  65. package/lib/commonjs/services/api/api.js.flow +95 -0
  66. package/lib/commonjs/services/api/api.js.map +1 -1
  67. package/lib/module/assets/icons/back2.svg +13 -0
  68. package/lib/module/assets/icons/check1.svg +4 -0
  69. package/lib/module/assets/icons/check2.svg +9 -0
  70. package/lib/module/assets/icons/error.svg +6 -0
  71. package/lib/module/assets/icons/index.js +1 -1
  72. package/lib/module/assets/icons/index.js.map +1 -1
  73. package/lib/module/assets/icons/line2.svg +12 -0
  74. package/lib/module/assets/icons/next.svg +6 -0
  75. package/lib/module/assets/icons/step.svg +9 -0
  76. package/lib/module/components/CommonSelect.js +2 -0
  77. package/lib/module/components/CommonSelect.js.map +1 -0
  78. package/lib/module/components/MText.js +1 -1
  79. package/lib/module/components/MText.js.map +1 -1
  80. package/lib/module/navigation/primary-navigator.js +1 -1
  81. package/lib/module/navigation/primary-navigator.js.map +1 -1
  82. package/lib/module/screens/detail-loan/store.js +1 -1
  83. package/lib/module/screens/detail-loan/store.js.map +1 -1
  84. package/lib/module/screens/digital-lending/Step1.js +2 -0
  85. package/lib/module/screens/digital-lending/Step1.js.map +1 -0
  86. package/lib/module/screens/digital-lending/Step2.js +2 -0
  87. package/lib/module/screens/digital-lending/Step2.js.map +1 -0
  88. package/lib/module/screens/digital-lending/Step3.js +2 -0
  89. package/lib/module/screens/digital-lending/Step3.js.map +1 -0
  90. package/lib/module/screens/digital-lending/Step4.js +2 -0
  91. package/lib/module/screens/digital-lending/Step4.js.map +1 -0
  92. package/lib/module/screens/digital-lending/Step5.js +2 -0
  93. package/lib/module/screens/digital-lending/Step5.js.map +1 -0
  94. package/lib/module/screens/digital-lending/Step6.js +2 -0
  95. package/lib/module/screens/digital-lending/Step6.js.map +1 -0
  96. package/lib/module/screens/digital-lending/index.js +2 -0
  97. package/lib/module/screens/digital-lending/index.js.map +1 -0
  98. package/lib/module/screens/digital-lending/store.js +2 -0
  99. package/lib/module/screens/digital-lending/store.js.map +1 -0
  100. package/lib/module/screens/full-submit/accept_policy.js +1 -1
  101. package/lib/module/screens/full-submit/accept_policy.js.map +1 -1
  102. package/lib/module/screens/home/index.js +1 -1
  103. package/lib/module/screens/home/index.js.map +1 -1
  104. package/lib/module/screens/notification/index.js +1 -1
  105. package/lib/module/screens/notification/index.js.map +1 -1
  106. package/lib/module/screens/register/index.js +1 -1
  107. package/lib/module/screens/schedule-payment/index.js +1 -1
  108. package/lib/module/screens/schedule-payment/index.js.map +1 -1
  109. package/lib/module/services/api/api-config.js +1 -1
  110. package/lib/module/services/api/api-config.js.map +1 -1
  111. package/lib/module/services/api/api.js +1 -1
  112. package/lib/module/services/api/api.js.map +1 -1
  113. package/lib/typescript/assets/icons/index.d.ts +8 -1
  114. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  115. package/lib/typescript/components/CommonSelect.d.ts +8 -0
  116. package/lib/typescript/components/CommonSelect.d.ts.map +1 -0
  117. package/lib/typescript/navigation/primary-navigator.d.ts +1 -0
  118. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  119. package/lib/typescript/screens/digital-lending/Step1.d.ts +2 -0
  120. package/lib/typescript/screens/digital-lending/Step1.d.ts.map +1 -0
  121. package/lib/typescript/screens/digital-lending/Step2.d.ts +2 -0
  122. package/lib/typescript/screens/digital-lending/Step2.d.ts.map +1 -0
  123. package/lib/typescript/screens/digital-lending/Step3.d.ts +2 -0
  124. package/lib/typescript/screens/digital-lending/Step3.d.ts.map +1 -0
  125. package/lib/typescript/screens/digital-lending/Step4.d.ts +2 -0
  126. package/lib/typescript/screens/digital-lending/Step4.d.ts.map +1 -0
  127. package/lib/typescript/screens/digital-lending/Step5.d.ts +2 -0
  128. package/lib/typescript/screens/digital-lending/Step5.d.ts.map +1 -0
  129. package/lib/typescript/screens/digital-lending/Step6.d.ts +2 -0
  130. package/lib/typescript/screens/digital-lending/Step6.d.ts.map +1 -0
  131. package/lib/typescript/screens/digital-lending/index.d.ts +2 -0
  132. package/lib/typescript/screens/digital-lending/index.d.ts.map +1 -0
  133. package/lib/typescript/screens/digital-lending/store.d.ts +35 -0
  134. package/lib/typescript/screens/digital-lending/store.d.ts.map +1 -0
  135. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  136. package/lib/typescript/services/api/api.d.ts +80 -19
  137. package/lib/typescript/services/api/api.d.ts.map +1 -1
  138. package/package.json +1 -1
  139. package/src/assets/icons/back2.svg +13 -0
  140. package/src/assets/icons/check1.svg +4 -0
  141. package/src/assets/icons/check2.svg +9 -0
  142. package/src/assets/icons/error.svg +6 -0
  143. package/src/assets/icons/index.tsx +14 -0
  144. package/src/assets/icons/line2.svg +12 -0
  145. package/src/assets/icons/next.svg +6 -0
  146. package/src/assets/icons/step.svg +9 -0
  147. package/src/components/CommonSelect.tsx +12 -0
  148. package/src/components/MText.tsx +2 -2
  149. package/src/navigation/primary-navigator.tsx +6 -0
  150. package/src/screens/detail-loan/store.tsx +1 -1
  151. package/src/screens/digital-lending/Step1.tsx +661 -0
  152. package/src/screens/digital-lending/Step2.tsx +610 -0
  153. package/src/screens/digital-lending/Step3.tsx +602 -0
  154. package/src/screens/digital-lending/Step4.tsx +495 -0
  155. package/src/screens/digital-lending/Step5.tsx +350 -0
  156. package/src/screens/digital-lending/Step6.tsx +366 -0
  157. package/src/screens/digital-lending/index.tsx +110 -0
  158. package/src/screens/digital-lending/store.tsx +294 -0
  159. package/src/screens/full-submit/accept_policy.tsx +1 -1
  160. package/src/screens/home/index.tsx +467 -0
  161. package/src/screens/notification/index.tsx +1 -1
  162. package/src/screens/register/index.tsx +1 -1
  163. package/src/screens/schedule-payment/index.tsx +1 -1
  164. package/src/services/api/api-config.ts +2 -2
  165. package/src/services/api/api.ts +95 -0
@@ -0,0 +1,350 @@
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 KeyboardSpacer from '../../components/keyboardspace';
24
+ import { useNavigation } from '@react-navigation/native';
25
+
26
+ export const Step5 = observer(function Step5() {
27
+ const navigation = useNavigation();
28
+ const ref = useRef(null);
29
+
30
+ const onSubmit = (values) => {
31
+ digitalLendingStore.body = {
32
+ ...digitalLendingStore.body,
33
+ bankId: values.bankId?.id,
34
+ bankAccountName: values?.bankAccountName,
35
+ bankAccountNumber: values?.bankAccountNumber,
36
+ bankBranch: values?.bankBranch,
37
+ };
38
+ };
39
+
40
+ return (
41
+ <View style={{ flex: 1 }}>
42
+ <ScrollView style={{ paddingHorizontal: 12 }}>
43
+ <View
44
+ style={{
45
+ flexDirection: 'row',
46
+ justifyContent: 'space-between',
47
+ alignItems: 'center',
48
+ paddingVertical: 16,
49
+ }}
50
+ >
51
+ <View
52
+ style={{
53
+ width: 40,
54
+ height: 40,
55
+ borderRadius: 40,
56
+ alignItems: 'center',
57
+ justifyContent: 'center',
58
+ shadowRadius: 40,
59
+ backgroundColor: '#FFF3E9',
60
+ borderWidth: 1,
61
+ borderColor: '#FF8E4F',
62
+ }}
63
+ >
64
+ <MText style={{ fontWeight: 'bold', color: '#FF8E4F' }}>01</MText>
65
+ </View>
66
+ <View
67
+ style={{
68
+ width: 40,
69
+ height: 40,
70
+ borderRadius: 40,
71
+ alignItems: 'center',
72
+ justifyContent: 'center',
73
+ shadowRadius: 40,
74
+ backgroundColor: '#FFF3E9',
75
+ borderWidth: 1,
76
+ borderColor: '#FF8E4F',
77
+ }}
78
+ >
79
+ <MText style={{ color: '#FF8E4F', fontWeight: 'bold' }}>02</MText>
80
+ </View>
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={{ color: '#FF8E4F', fontWeight: 'bold' }}>03</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' }}>04</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' }}>05</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' }}>06</MText>
150
+ </View>
151
+ </View>
152
+ <MText style={{ fontWeight: 'bold' }}>
153
+ THÔNG TIN SỐ TÀI KHOẢN NHẬN TIỀN
154
+ </MText>
155
+ <View
156
+ style={{ height: 1, backgroundColor: '#BDBDBD', marginTop: 16 }}
157
+ />
158
+ <View
159
+ style={{
160
+ backgroundColor: '#EB5757',
161
+ flexDirection: 'row',
162
+ padding: 8,
163
+ alignItems: 'center',
164
+ borderRadius: 8,
165
+ marginTop: 12,
166
+ }}
167
+ >
168
+ <WarningIcon />
169
+ <MText style={{ flex: 1, color: 'white', marginLeft: 8 }}>
170
+ 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
171
+ cập nhật lại thông tin mới nhất nhé!
172
+ </MText>
173
+ </View>
174
+ <Formik
175
+ innerRef={ref}
176
+ onSubmit={onSubmit}
177
+ initialValues={{
178
+ bankAccountName: digitalLendingStore?.data?.bankAccountName,
179
+ bankId: digitalLendingStore?.data?.bankId
180
+ ? {
181
+ id: digitalLendingStore.data?.bankId,
182
+ name: digitalLendingStore.data?.bankName,
183
+ }
184
+ : null,
185
+ bankAccountNumber: digitalLendingStore?.data?.bankAccountNumber,
186
+ bankBranch: digitalLendingStore?.data?.bankBranch,
187
+ }}
188
+ >
189
+ {({ values, handleSubmit, handleChange, setFieldValue }) => (
190
+ <View style={{ marginVertical: 16 }}>
191
+ <View>
192
+ <MText style={{ color: '#8A8A8A' }}>Tên chủ thẻ</MText>
193
+ <TextInput
194
+ value={values?.bankAccountName}
195
+ onChangeText={handleChange('bankAccountName')}
196
+ style={{
197
+ color: '#33333',
198
+ height: 30,
199
+ marginVertical: 0,
200
+ flex: 1,
201
+ padding: 0,
202
+ }}
203
+ />
204
+ </View>
205
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
206
+ <View style={{ marginTop: 12 }}>
207
+ <MText style={{ color: '#8A8A8A' }}>Ngân hàng</MText>
208
+ <TouchableOpacity
209
+ onPress={() => {
210
+ navigation.push('CommonSelect', {
211
+ title: 'Ngân hàng',
212
+ data: digitalLendingStore?.listBank,
213
+ callback: (item) => {
214
+ setFieldValue('bankId', item);
215
+ },
216
+ });
217
+ }}
218
+ style={{
219
+ height: 30,
220
+ flex: 1,
221
+ marginTop: 5,
222
+ }}
223
+ >
224
+ <MText>{values.bankId ? values.bankId?.name : ''}</MText>
225
+ </TouchableOpacity>
226
+ </View>
227
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
228
+ <View style={{ marginTop: 12 }}>
229
+ <MText style={{ color: '#8A8A8A' }}>Số tài khoản</MText>
230
+ <TextInput
231
+ keyboardType="number-pad"
232
+ value={values.bankAccountNumber}
233
+ onChangeText={handleChange('bankAccountNumber')}
234
+ style={{
235
+ color: '#33333',
236
+ height: 30,
237
+ marginVertical: 0,
238
+ flex: 1,
239
+ padding: 0,
240
+ }}
241
+ />
242
+ </View>
243
+ <View style={{ height: 1, backgroundColor: '#E0E0E0' }} />
244
+ <View style={{ marginTop: 12 }}>
245
+ <MText style={{ color: '#8A8A8A' }}>Chi nhánh</MText>
246
+ <TextInput
247
+ value={values.bankBranch}
248
+ onChangeText={handleChange('bankBranch')}
249
+ placeholder="Vui lòng điền chi nhánh ngân hàng"
250
+ placeholderTextColor={'#BDBDBD'}
251
+ style={{
252
+ color: '#33333',
253
+ height: 30,
254
+ marginVertical: 0,
255
+ flex: 1,
256
+ padding: 0,
257
+ }}
258
+ />
259
+ </View>
260
+ <KeyboardSpacer />
261
+ </View>
262
+ )}
263
+ </Formik>
264
+ </ScrollView>
265
+ <View
266
+ style={{
267
+ backgroundColor: 'white',
268
+ shadowOffset: {
269
+ width: 2,
270
+ height: 1,
271
+ },
272
+ ...Platform.select({
273
+ ios: {
274
+ shadowColor: 'rgba(0, 0, 0, 0.10)',
275
+ shadowOpacity: 0.2,
276
+ },
277
+ android: {
278
+ elevation: 10,
279
+ },
280
+ }),
281
+ paddingTop: 12,
282
+ paddingHorizontal: 12,
283
+ flexDirection: 'row',
284
+ paddingBottom: 16,
285
+ justifyContent: 'space-between',
286
+ alignItems: 'center',
287
+ }}
288
+ >
289
+ <TouchableOpacity
290
+ onPress={() => (digitalLendingStore.step = 4)}
291
+ style={{
292
+ paddingHorizontal: 12,
293
+ paddingVertical: 8,
294
+ borderRadius: 40,
295
+ flexDirection: 'row',
296
+ alignItems: 'center',
297
+ borderWidth: 1,
298
+ borderColor: '#FF8E4F',
299
+ }}
300
+ >
301
+ <Back2Icon />
302
+ <MText
303
+ style={{
304
+ marginLeft: 5,
305
+ color: '#FF8E4F',
306
+ fontSize: 16,
307
+ fontWeight: '500',
308
+ }}
309
+ >
310
+ Trở lại
311
+ </MText>
312
+ </TouchableOpacity>
313
+ <StepIcon />
314
+ <TouchableOpacity
315
+ onPress={() => {
316
+ digitalLendingStore.step = 6;
317
+ ref.current.handleSubmit();
318
+ }}
319
+ >
320
+ <LinearGradient
321
+ colors={['#FF8E4F', '#EF592E']}
322
+ style={{
323
+ paddingHorizontal: 12,
324
+ paddingVertical: 8,
325
+ borderRadius: 40,
326
+ flexDirection: 'row',
327
+ alignItems: 'center',
328
+ }}
329
+ >
330
+ <MText
331
+ style={{
332
+ color: 'white',
333
+ fontSize: 16,
334
+ fontWeight: '500',
335
+ marginRight: 5,
336
+ }}
337
+ >
338
+ Tiếp tục
339
+ </MText>
340
+ <NextIcon />
341
+ </LinearGradient>
342
+ </TouchableOpacity>
343
+ </View>
344
+ </View>
345
+ );
346
+ });
347
+
348
+ const styles = StyleSheet.create({
349
+ input: {},
350
+ });