react-native-timacare 3.3.59-cccd → 3.3.61-cccd

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 (80) hide show
  1. package/lib/commonjs/AppStore.js +1 -1
  2. package/lib/commonjs/AppStore.js.flow +0 -119
  3. package/lib/commonjs/AppStore.js.map +1 -1
  4. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  5. package/lib/commonjs/navigation/primary-navigator.js.flow +0 -3
  6. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  7. package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
  8. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +17 -6
  9. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
  10. package/lib/commonjs/screens/main/index.js +1 -1
  11. package/lib/commonjs/screens/main/index.js.flow +0 -1
  12. package/lib/commonjs/screens/main/index.js.map +1 -1
  13. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  14. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +30 -8
  15. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
  16. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
  17. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +28 -8
  18. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  19. package/lib/commonjs/utils/cameraCrop.js +1 -1
  20. package/lib/commonjs/utils/cameraCrop.js.flow +29 -30
  21. package/lib/commonjs/utils/cameraCrop.js.map +1 -1
  22. package/lib/module/AppStore.js +1 -1
  23. package/lib/module/AppStore.js.map +1 -1
  24. package/lib/module/navigation/primary-navigator.js +1 -1
  25. package/lib/module/navigation/primary-navigator.js.map +1 -1
  26. package/lib/module/screens/camera/CCCDCameraScreen.js +1 -1
  27. package/lib/module/screens/camera/CCCDCameraScreen.js.map +1 -1
  28. package/lib/module/screens/main/index.js +1 -1
  29. package/lib/module/screens/main/index.js.map +1 -1
  30. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  31. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
  32. package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
  33. package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  34. package/lib/module/utils/cameraCrop.js +1 -1
  35. package/lib/module/utils/cameraCrop.js.map +1 -1
  36. package/lib/typescript/AppStore.d.ts +0 -5
  37. package/lib/typescript/AppStore.d.ts.map +1 -1
  38. package/lib/typescript/navigation/primary-navigator.d.ts +0 -1
  39. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  40. package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
  41. package/lib/typescript/screens/main/index.d.ts.map +1 -1
  42. package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
  43. package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
  44. package/lib/typescript/utils/cameraCrop.d.ts +13 -19
  45. package/lib/typescript/utils/cameraCrop.d.ts.map +1 -1
  46. package/package.json +1 -1
  47. package/src/AppStore.tsx +0 -119
  48. package/src/navigation/primary-navigator.tsx +0 -3
  49. package/src/screens/camera/CCCDCameraScreen.tsx +17 -6
  50. package/src/screens/main/index.tsx +0 -1
  51. package/src/screens/toan-trinh-so/OCR.tsx +30 -8
  52. package/src/screens/toan-trinh-so/VehicleCamera.tsx +28 -8
  53. package/src/utils/cameraCrop.ts +29 -30
  54. package/lib/commonjs/screens/personal/bg.png +0 -0
  55. package/lib/commonjs/screens/personal/index.js +0 -2
  56. package/lib/commonjs/screens/personal/index.js.flow +0 -112
  57. package/lib/commonjs/screens/personal/index.js.map +0 -1
  58. package/lib/commonjs/screens/qualify/Store.js +0 -2
  59. package/lib/commonjs/screens/qualify/Store.js.flow +0 -49
  60. package/lib/commonjs/screens/qualify/Store.js.map +0 -1
  61. package/lib/commonjs/screens/qualify/index.js +0 -2
  62. package/lib/commonjs/screens/qualify/index.js.flow +0 -220
  63. package/lib/commonjs/screens/qualify/index.js.map +0 -1
  64. package/lib/module/screens/personal/bg.png +0 -0
  65. package/lib/module/screens/personal/index.js +0 -2
  66. package/lib/module/screens/personal/index.js.map +0 -1
  67. package/lib/module/screens/qualify/Store.js +0 -2
  68. package/lib/module/screens/qualify/Store.js.map +0 -1
  69. package/lib/module/screens/qualify/index.js +0 -2
  70. package/lib/module/screens/qualify/index.js.map +0 -1
  71. package/lib/typescript/screens/personal/index.d.ts +0 -2
  72. package/lib/typescript/screens/personal/index.d.ts.map +0 -1
  73. package/lib/typescript/screens/qualify/Store.d.ts +0 -8
  74. package/lib/typescript/screens/qualify/Store.d.ts.map +0 -1
  75. package/lib/typescript/screens/qualify/index.d.ts +0 -2
  76. package/lib/typescript/screens/qualify/index.d.ts.map +0 -1
  77. package/src/screens/personal/bg.png +0 -0
  78. package/src/screens/personal/index.tsx +0 -112
  79. package/src/screens/qualify/Store.tsx +0 -49
  80. package/src/screens/qualify/index.tsx +0 -220
@@ -1,112 +0,0 @@
1
- //@ts-nocheck
2
- import { CommonActions, useNavigation } from '@react-navigation/native';
3
- import { observer } from 'mobx-react-lite';
4
- import React from 'react';
5
- import {
6
- Image,
7
- ImageStyle,
8
- SafeAreaView,
9
- ScrollView,
10
- TouchableOpacity,
11
- View,
12
- } from 'react-native';
13
- import { IconLogout, IconProfile } from '../../assets/icons';
14
- import { AlertGlobal } from '../../components/ModalNotification/AlertGlobal';
15
- import appStore from '../../AppStore';
16
- import { MText } from '../../components/MText';
17
- import { ScreenNames } from '../../navigation';
18
- import { Api } from '../../services/api';
19
- import { commonStyles } from '../CommonStyles';
20
- import { toJS } from 'mobx';
21
- import { clear } from '../../utils/storage';
22
- import { reset } from '../../utils/keychain';
23
-
24
- const logoView: ImageStyle = {
25
- position: 'absolute',
26
- width: '100%',
27
- height: '100%',
28
- resizeMode: 'stretch',
29
- };
30
- export const Personal = observer(function Personal() {
31
- const navigation = useNavigation();
32
-
33
- const logout = async () => {
34
- AlertGlobal.show({
35
- type: 'confirm',
36
- title: 'Thông báo',
37
- message: 'Bạn có chắc chắn muốn đăng xuất?',
38
- primaryText: 'Đồng ý',
39
- onPrimaryPress: async () => {
40
- appStore.logout();
41
- clear();
42
- reset();
43
- appStore.selectedTab = 'TAB1';
44
- Api.getInstance().changeAuth();
45
- navigation.dispatch(
46
- CommonActions.reset({
47
- index: 1,
48
- routes: [{ name: ScreenNames.Splash }],
49
- })
50
- );
51
- },
52
- secondaryText: 'Bỏ qua',
53
- onSecondaryPress: (value) => {},
54
- });
55
- };
56
- return (
57
- <View style={[commonStyles.fill, { backgroundColor: 'white' }]}>
58
- <Image source={require('./bg.png')} style={logoView} />
59
- <SafeAreaView style={{ flex: 1 }}>
60
- <View style={{ alignItems: 'center', marginTop: 16 }}>
61
- <MText style={[commonStyles.textNormalBold, { fontSize: 16 }]}>
62
- Thông tin tài khoản
63
- </MText>
64
- </View>
65
- <ScrollView style={{ flex: 1, margin: 16 }}>
66
- <View
67
- style={{
68
- flexDirection: 'row',
69
- marginBottom: 16,
70
- alignItems: 'center',
71
- borderRadius: 8,
72
- borderWidth: 1,
73
- padding: 10,
74
- borderColor: '#E0E0E0',
75
- }}
76
- >
77
- <IconProfile />
78
- <View style={{ marginLeft: 16 }}>
79
- <MText style={commonStyles.textNormalBold}>
80
- {toJS(appStore.info)?.fullName}
81
- </MText>
82
- <MText style={[commonStyles.textNormal, { fontSize: 12 }]}>
83
- {appStore.phone}
84
- </MText>
85
- </View>
86
- </View>
87
- <TouchableOpacity
88
- onPress={() => logout()}
89
- style={{
90
- flexDirection: 'row',
91
- alignItems: 'center',
92
- borderRadius: 8,
93
- borderWidth: 1,
94
- padding: 10,
95
- borderColor: '#E0E0E0',
96
- }}
97
- >
98
- <IconLogout width={20} height={20} fill={'#333333'} />
99
- <View style={{ marginLeft: 10 }}>
100
- <MText style={[commonStyles.textNormalBold, { fontSize: 16 }]}>
101
- Đăng xuất
102
- </MText>
103
- <MText style={[commonStyles.textNormal, { fontWeight: '300' }]}>
104
- Bạn sẽ cần đăng nhập lại nếu muốn sử dụng tiếp
105
- </MText>
106
- </View>
107
- </TouchableOpacity>
108
- </ScrollView>
109
- </SafeAreaView>
110
- </View>
111
- );
112
- });
@@ -1,49 +0,0 @@
1
- //@ts-nocheck
2
- import { action, observable } from 'mobx';
3
- import { Api } from '../../services/api';
4
-
5
- class Store {
6
- @observable verify = null;
7
-
8
- @action
9
- async checkQualify(loanId, onSuccess?, onFailed?) {
10
- try {
11
- const response = await Api.getInstance().checkQualifyLoanbriefId(loanId);
12
- console.log(response);
13
-
14
- if (response.kind === 'ok') {
15
- if (response.data.meta.errorCode === 200) {
16
- if (onSuccess) onSuccess(response.data.data);
17
- } else {
18
- if (onFailed) onFailed();
19
- }
20
- } else {
21
- if (onFailed) onFailed();
22
- }
23
- } catch (error) {
24
- console.log(error);
25
- }
26
- }
27
-
28
- @action
29
- async postQualify(body, onSuccess?, onFailed?) {
30
- try {
31
- const response = await Api.getInstance().postQualifyLoanbriefId(body);
32
- console.log(response);
33
- if (response.kind === 'ok') {
34
- if (response.data.meta.errorCode === 200) {
35
- if (onSuccess) onSuccess(response.data.data);
36
- } else {
37
- if (onFailed) onFailed();
38
- }
39
- } else {
40
- if (onFailed) onFailed();
41
- }
42
- } catch (error) {
43
- console.log(error);
44
- }
45
- }
46
- }
47
-
48
- const qualifyStore = new Store();
49
- export default qualifyStore;
@@ -1,220 +0,0 @@
1
- //@ts-nocheck
2
- import { CommonActions, useNavigation } from '@react-navigation/native';
3
- import { Formik } from 'formik';
4
- import { observer } from 'mobx-react-lite';
5
- import React from 'react';
6
- import {
7
- SafeAreaView,
8
- ScrollView,
9
- StyleSheet,
10
- TouchableOpacity,
11
- View,
12
- } from 'react-native';
13
- import LinearGradient from 'react-native-linear-gradient';
14
- import { RadioCheckIcon, RadioIcon, TimaIcon } from '../../assets/icons';
15
- import { MText } from '../../components/MText';
16
- import { ScreenNames } from '../../navigation';
17
- import { color } from '../../theme';
18
- import qualifyStore from './Store';
19
-
20
- export const Qualify = observer(function Qualify(props: any) {
21
- const navigation = useNavigation();
22
- const loan = props.route.params?.loan;
23
- const handleSubmitValues = (values) => {
24
- const body = { ...values, loanBriefId: loan.id };
25
- qualifyStore.postQualify(
26
- body,
27
- () => {
28
- navigation.dispatch(
29
- CommonActions.reset({
30
- index: 1,
31
- routes: [{ name: ScreenNames.Main }],
32
- })
33
- );
34
- },
35
- () => {
36
- navigation.dispatch(
37
- CommonActions.reset({
38
- index: 1,
39
- routes: [{ name: ScreenNames.Main }],
40
- })
41
- );
42
- }
43
- );
44
- };
45
-
46
- return (
47
- <SafeAreaView style={{ flex: 1, backgroundColor: '#FFFFFF' }}>
48
- <Formik
49
- initialValues={{
50
- questionBorrow: false,
51
- questionUseMotobikeGo: false,
52
- questionMotobikeCertificate: false,
53
- sourceQualify: 2,
54
- }}
55
- onSubmit={handleSubmitValues}
56
- >
57
- {({ values, handleSubmit, setFieldValue }) => (
58
- <View style={{ flex: 1 }}>
59
- <View style={styles.header}>
60
- <TimaIcon />
61
- <View style={{ marginLeft: 10 }}>
62
- <MText style={{ fontSize: 16, fontWeight: '600' }}>
63
- Cập nhật thông tin cơ bản
64
- </MText>
65
- <MText style={{ fontSize: 12, fontWeight: '300' }}>
66
- Chào mừng bạn đến với Tima Care
67
- </MText>
68
- </View>
69
- </View>
70
- <ScrollView style={{ flex: 1 }}>
71
- <View
72
- style={{
73
- borderWidth: 1,
74
- borderColor: '#E0E0E0',
75
- borderRadius: 6,
76
- padding: 16,
77
- margin: 16,
78
- }}
79
- >
80
- <View>
81
- <MText style={{ color: '#333333' }}>
82
- Bạn đang có nhu cầu vay không?{' '}
83
- <MText style={{ color: 'red' }}>(*)</MText>
84
- </MText>
85
- <View style={{ flexDirection: 'row', marginTop: 8 }}>
86
- <TouchableOpacity
87
- style={{ flexDirection: 'row' }}
88
- onPress={() => setFieldValue('questionBorrow', true)}
89
- >
90
- {values.questionBorrow ? (
91
- <RadioCheckIcon />
92
- ) : (
93
- <RadioIcon />
94
- )}
95
- <MText style={{ marginLeft: 8 }}>Có</MText>
96
- </TouchableOpacity>
97
- <TouchableOpacity
98
- style={{ flexDirection: 'row', marginLeft: 30 }}
99
- onPress={() => setFieldValue('questionBorrow', false)}
100
- >
101
- {values.questionBorrow ? (
102
- <RadioIcon />
103
- ) : (
104
- <RadioCheckIcon />
105
- )}
106
- <MText style={{ marginLeft: 8 }}>Không</MText>
107
- </TouchableOpacity>
108
- </View>
109
- </View>
110
-
111
- <View style={{ marginTop: 16 }}>
112
- <MText>
113
- Bạn có xe máy không?{' '}
114
- <MText style={{ color: 'red' }}>(*)</MText>
115
- </MText>
116
- <View style={{ flexDirection: 'row', marginTop: 8 }}>
117
- <TouchableOpacity
118
- style={{ flexDirection: 'row' }}
119
- onPress={() =>
120
- setFieldValue('questionUseMotobikeGo', true)
121
- }
122
- >
123
- {values.questionUseMotobikeGo ? (
124
- <RadioCheckIcon />
125
- ) : (
126
- <RadioIcon />
127
- )}
128
- <MText style={{ marginLeft: 8 }}>Có</MText>
129
- </TouchableOpacity>
130
- <TouchableOpacity
131
- style={{ flexDirection: 'row', marginLeft: 30 }}
132
- onPress={() =>
133
- setFieldValue('questionUseMotobikeGo', false)
134
- }
135
- >
136
- {values.questionUseMotobikeGo ? (
137
- <RadioIcon />
138
- ) : (
139
- <RadioCheckIcon />
140
- )}
141
- <MText style={{ marginLeft: 8 }}>Không</MText>
142
- </TouchableOpacity>
143
- </View>
144
- </View>
145
- <View style={{ marginTop: 16 }}>
146
- <MText>
147
- Bạn có bản gốc ĐKX/Cavet không?{' '}
148
- <MText style={{ color: 'red' }}>(*)</MText>
149
- </MText>
150
- <View style={{ flexDirection: 'row', marginTop: 8 }}>
151
- <TouchableOpacity
152
- style={{ flexDirection: 'row' }}
153
- onPress={() =>
154
- setFieldValue('questionMotobikeCertificate', true)
155
- }
156
- >
157
- {values.questionMotobikeCertificate ? (
158
- <RadioCheckIcon />
159
- ) : (
160
- <RadioIcon />
161
- )}
162
- <MText style={{ marginLeft: 8 }}>Có</MText>
163
- </TouchableOpacity>
164
- <TouchableOpacity
165
- style={{ flexDirection: 'row', marginLeft: 30 }}
166
- onPress={() =>
167
- setFieldValue('questionMotobikeCertificate', false)
168
- }
169
- >
170
- {values.questionMotobikeCertificate ? (
171
- <RadioIcon />
172
- ) : (
173
- <RadioCheckIcon />
174
- )}
175
- <MText style={{ marginLeft: 8 }}>Không</MText>
176
- </TouchableOpacity>
177
- </View>
178
- </View>
179
- </View>
180
- </ScrollView>
181
- <View style={{ paddingHorizontal: 16 }}>
182
- <TouchableOpacity onPress={handleSubmit}>
183
- <LinearGradient
184
- colors={['#FF7A00', '#EF4123']}
185
- style={{
186
- justifyContent: 'center',
187
- alignContent: 'center',
188
- alignItems: 'center',
189
- height: 40,
190
- borderRadius: 30,
191
- marginBottom: 20,
192
- }}
193
- >
194
- <MText
195
- style={{
196
- color: '#FFFFFF',
197
- fontSize: 16,
198
- fontWeight: '600',
199
- }}
200
- >
201
- Xác nhận
202
- </MText>
203
- </LinearGradient>
204
- </TouchableOpacity>
205
- </View>
206
- </View>
207
- )}
208
- </Formik>
209
- </SafeAreaView>
210
- );
211
- });
212
-
213
- const styles = StyleSheet.create({
214
- header: {
215
- flexDirection: 'row',
216
- padding: 16,
217
- alignContent: 'center',
218
- alignItems: 'center',
219
- },
220
- });