react-native-timacare 0.0.19 → 0.0.21

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 (72) hide show
  1. package/ios/TDHS.xcworkspace/xcuserdata/quangduc.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  2. package/lib/commonjs/screens/full-submit/selfie.js +1 -1
  3. package/lib/commonjs/screens/full-submit/selfie.js.flow +37 -24
  4. package/lib/commonjs/screens/full-submit/selfie.js.map +1 -1
  5. package/lib/commonjs/screens/full-submit/update-document.js +1 -1
  6. package/lib/commonjs/screens/full-submit/update-document.js.flow +224 -186
  7. package/lib/commonjs/screens/full-submit/update-document.js.map +1 -1
  8. package/lib/commonjs/screens/full-submit/update-info.js +1 -1
  9. package/lib/commonjs/screens/full-submit/update-info.js.flow +35 -27
  10. package/lib/commonjs/screens/full-submit/update-info.js.map +1 -1
  11. package/lib/commonjs/screens/home/index.js +1 -1
  12. package/lib/commonjs/screens/home/index.js.flow +310 -283
  13. package/lib/commonjs/screens/home/index.js.map +1 -1
  14. package/lib/commonjs/screens/nationalID/index.js +1 -1
  15. package/lib/commonjs/screens/nationalID/index.js.flow +36 -24
  16. package/lib/commonjs/screens/nationalID/index.js.map +1 -1
  17. package/lib/commonjs/screens/nationalIDBack/index.js +1 -1
  18. package/lib/commonjs/screens/nationalIDBack/index.js.flow +37 -24
  19. package/lib/commonjs/screens/nationalIDBack/index.js.map +1 -1
  20. package/lib/commonjs/screens/quick-submit/index.js +1 -1
  21. package/lib/commonjs/screens/quick-submit/index.js.flow +38 -31
  22. package/lib/commonjs/screens/quick-submit/index.js.map +1 -1
  23. package/lib/commonjs/screens/selfie/index.js +1 -1
  24. package/lib/commonjs/screens/selfie/index.js.flow +34 -25
  25. package/lib/commonjs/screens/selfie/index.js.map +1 -1
  26. package/lib/commonjs/screens/uploadVideo/index.js +1 -1
  27. package/lib/commonjs/screens/uploadVideo/index.js.flow +4 -1
  28. package/lib/commonjs/screens/uploadVideo/index.js.map +1 -1
  29. package/lib/commonjs/screens/uploadVideo/videoStore.js +1 -1
  30. package/lib/commonjs/screens/uploadVideo/videoStore.js.flow +1 -0
  31. package/lib/commonjs/screens/uploadVideo/videoStore.js.map +1 -1
  32. package/lib/module/screens/full-submit/selfie.js +1 -1
  33. package/lib/module/screens/full-submit/selfie.js.map +1 -1
  34. package/lib/module/screens/full-submit/update-document.js +1 -1
  35. package/lib/module/screens/full-submit/update-document.js.map +1 -1
  36. package/lib/module/screens/full-submit/update-info.js +1 -1
  37. package/lib/module/screens/full-submit/update-info.js.map +1 -1
  38. package/lib/module/screens/home/index.js +1 -1
  39. package/lib/module/screens/home/index.js.map +1 -1
  40. package/lib/module/screens/nationalID/index.js +1 -1
  41. package/lib/module/screens/nationalID/index.js.map +1 -1
  42. package/lib/module/screens/nationalIDBack/index.js +1 -1
  43. package/lib/module/screens/nationalIDBack/index.js.map +1 -1
  44. package/lib/module/screens/quick-submit/index.js +1 -1
  45. package/lib/module/screens/quick-submit/index.js.map +1 -1
  46. package/lib/module/screens/selfie/index.js +1 -1
  47. package/lib/module/screens/selfie/index.js.map +1 -1
  48. package/lib/module/screens/uploadVideo/index.js +1 -1
  49. package/lib/module/screens/uploadVideo/index.js.map +1 -1
  50. package/lib/module/screens/uploadVideo/videoStore.js +1 -1
  51. package/lib/module/screens/uploadVideo/videoStore.js.map +1 -1
  52. package/lib/typescript/screens/full-submit/selfie.d.ts.map +1 -1
  53. package/lib/typescript/screens/full-submit/update-document.d.ts.map +1 -1
  54. package/lib/typescript/screens/full-submit/update-info.d.ts.map +1 -1
  55. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  56. package/lib/typescript/screens/nationalID/index.d.ts.map +1 -1
  57. package/lib/typescript/screens/nationalIDBack/index.d.ts.map +1 -1
  58. package/lib/typescript/screens/quick-submit/index.d.ts.map +1 -1
  59. package/lib/typescript/screens/selfie/index.d.ts.map +1 -1
  60. package/lib/typescript/screens/uploadVideo/index.d.ts.map +1 -1
  61. package/lib/typescript/screens/uploadVideo/videoStore.d.ts.map +1 -1
  62. package/package.json +1 -1
  63. package/src/screens/full-submit/selfie.tsx +37 -24
  64. package/src/screens/full-submit/update-document.tsx +224 -186
  65. package/src/screens/full-submit/update-info.tsx +35 -27
  66. package/src/screens/home/index.tsx +310 -283
  67. package/src/screens/nationalID/index.tsx +36 -24
  68. package/src/screens/nationalIDBack/index.tsx +37 -24
  69. package/src/screens/quick-submit/index.tsx +38 -31
  70. package/src/screens/selfie/index.tsx +34 -25
  71. package/src/screens/uploadVideo/index.tsx +4 -1
  72. package/src/screens/uploadVideo/videoStore.tsx +1 -0
@@ -19,7 +19,7 @@ import {
19
19
  StackActions,
20
20
  useNavigation,
21
21
  } from '@react-navigation/native';
22
- import { observer } from 'mobx-react-lite';
22
+ import { observer, Observer } from 'mobx-react-lite';
23
23
  import { commonStyles } from '../CommonStyles';
24
24
  import KeyboardSpacer from '../../components/keyboardspace';
25
25
  import MButton from '../../components/MButton';
@@ -239,29 +239,41 @@ export const NationalID = observer(function NationalID(props: any) {
239
239
  </MText>
240
240
  </MButton>
241
241
 
242
- <MButton
243
- //@ts-ignore
244
- disabled={!photo || nationalIDStore.isLoading || appStore.isLoading}
245
- onPress={nextStep}
246
- style={{ flex: 1 }}
247
- >
248
- <LinearGradient
249
- colors={['#FF7A00', '#EF4123']}
250
- style={[
251
- commonStyles.alignCenter,
252
- commonStyles.justifyCenter,
253
- {
254
- height: 40,
255
- borderRadius: 30,
256
- marginLeft: 8,
257
- },
258
- ]}
259
- >
260
- <MText style={[commonStyles.textNormal, { color: 'white' }]}>
261
- Tiếp tục
262
- </MText>
263
- </LinearGradient>
264
- </MButton>
242
+ <Observer>
243
+ {() => (
244
+ <MButton
245
+ //@ts-ignore
246
+ disabled={
247
+ !photo || nationalIDStore.isLoading || appStore.isLoading
248
+ }
249
+ onPress={nextStep}
250
+ style={{ flex: 1 }}
251
+ >
252
+ <LinearGradient
253
+ colors={['#FF7A00', '#EF4123']}
254
+ style={[
255
+ commonStyles.alignCenter,
256
+ commonStyles.justifyCenter,
257
+ {
258
+ height: 40,
259
+ borderRadius: 30,
260
+ marginLeft: 8,
261
+ },
262
+ ]}
263
+ >
264
+ {nationalIDStore.isLoading ? (
265
+ <ActivityIndicator color={'white'} size="small" />
266
+ ) : (
267
+ <MText
268
+ style={[commonStyles.textNormal, { color: 'white' }]}
269
+ >
270
+ Tiếp tục
271
+ </MText>
272
+ )}
273
+ </LinearGradient>
274
+ </MButton>
275
+ )}
276
+ </Observer>
265
277
  </View>
266
278
  {loan?.isPipelineCIMB && (
267
279
  <View
@@ -1,6 +1,7 @@
1
1
  //@ts-nocheck
2
2
  import React, { useState } from 'react';
3
3
  import {
4
+ ActivityIndicator,
4
5
  Alert,
5
6
  Dimensions,
6
7
  Image,
@@ -11,7 +12,7 @@ import {
11
12
  View,
12
13
  } from 'react-native';
13
14
  import { StackActions, useNavigation } from '@react-navigation/native';
14
- import { observer } from 'mobx-react-lite';
15
+ import { observer, Observer } from 'mobx-react-lite';
15
16
  import { commonStyles } from '../CommonStyles';
16
17
  import KeyboardSpacer from '../../components/keyboardspace';
17
18
  import MButton from '../../components/MButton';
@@ -237,29 +238,41 @@ export const NationalIDBack = observer(function NationalIDBack(props: any) {
237
238
  </MText>
238
239
  </MButton>
239
240
 
240
- <MButton
241
- //@ts-ignore
242
- disabled={!photo || nationalIDStore.isLoading || appStore.isLoading}
243
- onPress={nextStep}
244
- style={{ flex: 1 }}
245
- >
246
- <LinearGradient
247
- colors={['#FF7A00', '#EF4123']}
248
- style={[
249
- commonStyles.alignCenter,
250
- commonStyles.justifyCenter,
251
- {
252
- height: 40,
253
- borderRadius: 30,
254
- marginLeft: 8,
255
- },
256
- ]}
257
- >
258
- <MText style={[commonStyles.textNormal, { color: 'white' }]}>
259
- Tiếp tục
260
- </MText>
261
- </LinearGradient>
262
- </MButton>
241
+ <Observer>
242
+ {() => (
243
+ <MButton
244
+ //@ts-ignore
245
+ disabled={
246
+ !photo || nationalIDStore.isLoading || appStore.isLoading
247
+ }
248
+ onPress={nextStep}
249
+ style={{ flex: 1 }}
250
+ >
251
+ <LinearGradient
252
+ colors={['#FF7A00', '#EF4123']}
253
+ style={[
254
+ commonStyles.alignCenter,
255
+ commonStyles.justifyCenter,
256
+ {
257
+ height: 40,
258
+ borderRadius: 30,
259
+ marginLeft: 8,
260
+ },
261
+ ]}
262
+ >
263
+ {nationalIDStore.isLoading ? (
264
+ <ActivityIndicator color={'white'} size="small" />
265
+ ) : (
266
+ <MText
267
+ style={[commonStyles.textNormal, { color: 'white' }]}
268
+ >
269
+ Tiếp tục
270
+ </MText>
271
+ )}
272
+ </LinearGradient>
273
+ </MButton>
274
+ )}
275
+ </Observer>
263
276
  </View>
264
277
  {loan?.isPipelineCIMB && (
265
278
  <View
@@ -5,9 +5,10 @@ import {
5
5
  useNavigation,
6
6
  } from '@react-navigation/native';
7
7
  import { Formik } from 'formik';
8
- import { observer } from 'mobx-react-lite';
8
+ import { observer, Observer } from 'mobx-react-lite';
9
9
  import React, { useEffect, useRef, useState } from 'react';
10
10
  import {
11
+ ActivityIndicator,
11
12
  SafeAreaView,
12
13
  ScrollView,
13
14
  StyleSheet,
@@ -40,8 +41,6 @@ export const QuickSubmit = observer(function QuickSubmit(props: any) {
40
41
  const [showDatePicker, setShowDatePicker] = useState(false);
41
42
  const [typePicker, setTypePicker] = useState(0);
42
43
 
43
- console.log(props.route);
44
-
45
44
  useEffect(() => {
46
45
  QuickSubmitStore.getBrandProduct();
47
46
  QuickSubmitStore.getProvinces();
@@ -975,35 +974,43 @@ export const QuickSubmit = observer(function QuickSubmit(props: any) {
975
974
  </View>
976
975
  </View> */}
977
976
  <View style={{ marginTop: 40 }}>
978
- <TouchableOpacity
979
- disabled={!isValid || QuickSubmitStore.loadingButton}
980
- onPress={() => {
981
- handleSubmit();
982
- }}
983
- >
984
- <LinearGradient
985
- colors={
986
- isValid
987
- ? ['#FF7A00', '#EF4123']
988
- : ['#BDBDBD', '#BDBDBD']
989
- }
990
- style={{
991
- alignItems: 'center',
992
- borderRadius: 30,
993
- height: 40,
994
- justifyContent: 'center',
995
- }}
996
- >
997
- <MText
998
- style={[
999
- commonStyles.textNormalBold,
1000
- { color: '#FFFFFF' },
1001
- ]}
977
+ <Observer>
978
+ {() => (
979
+ <TouchableOpacity
980
+ disabled={!isValid || QuickSubmitStore.loadingButton}
981
+ onPress={() => {
982
+ handleSubmit();
983
+ }}
1002
984
  >
1003
- Tiếp tục
1004
- </MText>
1005
- </LinearGradient>
1006
- </TouchableOpacity>
985
+ <LinearGradient
986
+ colors={
987
+ isValid
988
+ ? ['#FF7A00', '#EF4123']
989
+ : ['#BDBDBD', '#BDBDBD']
990
+ }
991
+ style={{
992
+ alignItems: 'center',
993
+ borderRadius: 30,
994
+ height: 40,
995
+ justifyContent: 'center',
996
+ }}
997
+ >
998
+ {QuickSubmitStore.loadingButton ? (
999
+ <ActivityIndicator color={'white'} size="small" />
1000
+ ) : (
1001
+ <MText
1002
+ style={[
1003
+ commonStyles.textNormalBold,
1004
+ { color: '#FFFFFF' },
1005
+ ]}
1006
+ >
1007
+ Tiếp tục
1008
+ </MText>
1009
+ )}
1010
+ </LinearGradient>
1011
+ </TouchableOpacity>
1012
+ )}
1013
+ </Observer>
1007
1014
  </View>
1008
1015
  <View
1009
1016
  style={{
@@ -14,7 +14,7 @@ import {
14
14
  ViewStyle,
15
15
  } from 'react-native';
16
16
  import { CommonActions, useNavigation } from '@react-navigation/native';
17
- import { observer } from 'mobx-react-lite';
17
+ import { observer, Observer } from 'mobx-react-lite';
18
18
  import { commonStyles } from '../CommonStyles';
19
19
  import KeyboardSpacer from '../../components/keyboardspace';
20
20
  import MButton from '../../components/MButton';
@@ -185,30 +185,39 @@ export const Selfie = observer(function Selfie(props: any) {
185
185
  Chụp ảnh
186
186
  </MText>
187
187
  </MButton>
188
-
189
- <MButton
190
- //@ts-ignore
191
- disabled={!photo || selfieStore.isLoading || appStore.isLoading}
192
- onPress={nextStep}
193
- style={{ flex: 1 }}
194
- >
195
- <LinearGradient
196
- colors={['#FF7A00', '#EF4123']}
197
- style={[
198
- commonStyles.alignCenter,
199
- commonStyles.justifyCenter,
200
- {
201
- height: 40,
202
- borderRadius: 30,
203
- marginLeft: 8,
204
- },
205
- ]}
206
- >
207
- <MText style={[commonStyles.textNormal, { color: 'white' }]}>
208
- Tiếp tục
209
- </MText>
210
- </LinearGradient>
211
- </MButton>
188
+ <Observer>
189
+ {() => (
190
+ <MButton
191
+ //@ts-ignore
192
+ disabled={!photo || selfieStore.isLoading || appStore.isLoading}
193
+ onPress={nextStep}
194
+ style={{ flex: 1 }}
195
+ >
196
+ <LinearGradient
197
+ colors={['#FF7A00', '#EF4123']}
198
+ style={[
199
+ commonStyles.alignCenter,
200
+ commonStyles.justifyCenter,
201
+ {
202
+ height: 40,
203
+ borderRadius: 30,
204
+ marginLeft: 8,
205
+ },
206
+ ]}
207
+ >
208
+ {selfieStore.isLoading ? (
209
+ <ActivityIndicator color={'white'} size="small" />
210
+ ) : (
211
+ <MText
212
+ style={[commonStyles.textNormal, { color: 'white' }]}
213
+ >
214
+ Tiếp tục
215
+ </MText>
216
+ )}
217
+ </LinearGradient>
218
+ </MButton>
219
+ )}
220
+ </Observer>
212
221
  </View>
213
222
  {loan?.isPipelineCIMB && (
214
223
  <View
@@ -1,5 +1,5 @@
1
1
  //@ts-nocheck
2
- import { observer } from 'mobx-react-lite';
2
+ import { observer, Observer } from 'mobx-react-lite';
3
3
  import React, { useEffect, useRef, useState } from 'react';
4
4
  import {
5
5
  Alert,
@@ -22,6 +22,7 @@ import {
22
22
  request,
23
23
  RESULTS,
24
24
  } from 'react-native-permissions';
25
+ import Loading from '../../components/Loading';
25
26
 
26
27
  export const Video = observer(function Video(props: any) {
27
28
  const navigation = useNavigation();
@@ -362,6 +363,7 @@ export const Video = observer(function Video(props: any) {
362
363
  alignItems: 'center',
363
364
  marginBottom: 20,
364
365
  }}
366
+ disabled={videoStore.isLoading}
365
367
  onPress={() => {
366
368
  startVideo();
367
369
  }}
@@ -371,6 +373,7 @@ export const Video = observer(function Video(props: any) {
371
373
  )}
372
374
  </View>
373
375
  </View>
376
+ <Observer>{() => <Loading isLoading={videoStore.isLoading} />}</Observer>
374
377
  </SafeAreaView>
375
378
  );
376
379
  });
@@ -11,6 +11,7 @@ class Store {
11
11
  try {
12
12
  this.isLoading = true;
13
13
  const response = await Api.getInstance().uploadVideo(loanID, body);
14
+ console.log(response);
14
15
  this.isLoading = false;
15
16
  if (response.kind === 'ok') {
16
17
  if (response.data.meta.errorCode === 200) {