react-native-timacare 2.0.20 → 2.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.
- package/lib/commonjs/components/MHeader.js +1 -1
- package/lib/commonjs/components/MHeader.js.flow +14 -12
- package/lib/commonjs/components/MHeader.js.map +1 -1
- package/lib/commonjs/screens/forgotPassword/index.js +1 -1
- package/lib/commonjs/screens/forgotPassword/index.js.flow +2 -9
- package/lib/commonjs/screens/forgotPassword/index.js.map +1 -1
- package/lib/commonjs/screens/loginWithPassword/index.js +1 -1
- package/lib/commonjs/screens/loginWithPassword/index.js.flow +3 -70
- package/lib/commonjs/screens/loginWithPassword/index.js.map +1 -1
- package/lib/commonjs/screens/otp/index.js +1 -1
- package/lib/commonjs/screens/otp/index.js.flow +2 -22
- package/lib/commonjs/screens/otp/index.js.map +1 -1
- package/lib/commonjs/screens/register/index.js +1 -1
- package/lib/commonjs/screens/register/index.js.flow +2 -0
- package/lib/commonjs/screens/register/index.js.map +1 -1
- package/lib/commonjs/screens/setPassword/index.js +1 -1
- package/lib/commonjs/screens/setPassword/index.js.flow +2 -9
- package/lib/commonjs/screens/setPassword/index.js.map +1 -1
- package/lib/commonjs/screens/splash/index.js +1 -1
- package/lib/commonjs/screens/splash/index.js.flow +15 -14
- package/lib/commonjs/screens/splash/index.js.map +1 -1
- package/lib/module/components/MHeader.js +1 -1
- package/lib/module/components/MHeader.js.map +1 -1
- package/lib/module/screens/forgotPassword/index.js +1 -1
- package/lib/module/screens/forgotPassword/index.js.map +1 -1
- package/lib/module/screens/loginWithPassword/index.js +1 -1
- package/lib/module/screens/loginWithPassword/index.js.map +1 -1
- package/lib/module/screens/otp/index.js +1 -1
- package/lib/module/screens/otp/index.js.map +1 -1
- package/lib/module/screens/register/index.js +1 -1
- package/lib/module/screens/register/index.js.map +1 -1
- package/lib/module/screens/setPassword/index.js +1 -1
- package/lib/module/screens/setPassword/index.js.map +1 -1
- package/lib/module/screens/splash/index.js +1 -1
- package/lib/module/screens/splash/index.js.map +1 -1
- package/lib/typescript/components/MHeader.d.ts.map +1 -1
- package/lib/typescript/screens/forgotPassword/index.d.ts.map +1 -1
- package/lib/typescript/screens/loginWithPassword/index.d.ts.map +1 -1
- package/lib/typescript/screens/otp/index.d.ts.map +1 -1
- package/lib/typescript/screens/register/index.d.ts.map +1 -1
- package/lib/typescript/screens/setPassword/index.d.ts.map +1 -1
- package/lib/typescript/screens/splash/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/MHeader.tsx +14 -12
- package/src/screens/forgotPassword/index.tsx +2 -9
- package/src/screens/loginWithPassword/index.tsx +3 -70
- package/src/screens/otp/index.tsx +2 -22
- package/src/screens/register/index.tsx +2 -0
- package/src/screens/setPassword/index.tsx +2 -9
- package/src/screens/splash/index.tsx +15 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screens/otp/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screens/otp/index.tsx"],"names":[],"mappings":"AAgCA,eAAO,MAAM,GAAG,KA0Xd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screens/register/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screens/register/index.tsx"],"names":[],"mappings":"AA6CA,eAAO,MAAM,QAAQ,KAgVnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screens/setPassword/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screens/setPassword/index.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,WAAW,KAmKtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screens/splash/index.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screens/splash/index.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,MAAM,KAmFjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -38,18 +38,20 @@ export default function MHeader({ title, onBack }: IProps) {
|
|
|
38
38
|
alignItems: 'center',
|
|
39
39
|
}}
|
|
40
40
|
>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
{onBack && (
|
|
42
|
+
<TouchableOpacity
|
|
43
|
+
onPress={() => {
|
|
44
|
+
if (onBack) onBack();
|
|
45
|
+
}}
|
|
46
|
+
style={{
|
|
47
|
+
width: 32,
|
|
48
|
+
height: 32,
|
|
49
|
+
justifyContent: 'center',
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
<IconBackWhite />
|
|
53
|
+
</TouchableOpacity>
|
|
54
|
+
)}
|
|
53
55
|
<MText
|
|
54
56
|
style={{
|
|
55
57
|
fontWeight: 'bold',
|
|
@@ -12,6 +12,7 @@ import * as yup from 'yup';
|
|
|
12
12
|
import { useNavigation } from '@react-navigation/native';
|
|
13
13
|
import registerStore from '../register/Store';
|
|
14
14
|
import { ScreenNames } from '../../navigation';
|
|
15
|
+
import MHeader from '../../components/MHeader';
|
|
15
16
|
|
|
16
17
|
export const ForgotPassword = observer(function ForgotPassword() {
|
|
17
18
|
const navigation = useNavigation();
|
|
@@ -30,17 +31,9 @@ export const ForgotPassword = observer(function ForgotPassword() {
|
|
|
30
31
|
|
|
31
32
|
return (
|
|
32
33
|
<View style={[commonStyles.fill, commonStyles.backgroundWhite]}>
|
|
34
|
+
<MHeader title="Quên mật khẩu" onBack={() => navigation.goBack()} />
|
|
33
35
|
<SafeAreaView style={{ flex: 1 }}>
|
|
34
36
|
<View style={{ margin: 16 }}>
|
|
35
|
-
<MText
|
|
36
|
-
style={{
|
|
37
|
-
fontSize: 24,
|
|
38
|
-
color: color.primary,
|
|
39
|
-
fontWeight: '600',
|
|
40
|
-
}}
|
|
41
|
-
>
|
|
42
|
-
Quên mật khẩu
|
|
43
|
-
</MText>
|
|
44
37
|
<MText style={{ color: '#4F4F4F' }}>
|
|
45
38
|
Mật khẩu mới sẽ gửi về số điện thoại của bạn.
|
|
46
39
|
</MText>
|
|
@@ -26,6 +26,7 @@ import homeStore from '../home/Store';
|
|
|
26
26
|
import LinearGradient from 'react-native-linear-gradient';
|
|
27
27
|
import { save } from '../../utils/keychain';
|
|
28
28
|
import appStore from '../../AppStore';
|
|
29
|
+
import MHeader from '../../components/MHeader';
|
|
29
30
|
|
|
30
31
|
const logoView: ImageStyle = {
|
|
31
32
|
position: 'absolute',
|
|
@@ -65,53 +66,6 @@ export const LoginWithPassword = observer(function LoginWithPassword(
|
|
|
65
66
|
save(props.route.params.Phone, values.password);
|
|
66
67
|
}
|
|
67
68
|
navigation.push(ScreenNames.Main);
|
|
68
|
-
// homeStore.getListLoanPending((loanData) => {
|
|
69
|
-
// if (loanData) {
|
|
70
|
-
// homeStore.getCheckEKYC({ loanBriefId: loanData.id });
|
|
71
|
-
// qualifyStore.checkQualify(
|
|
72
|
-
// loanData.id,
|
|
73
|
-
// (data) => {
|
|
74
|
-
// if (data?.verify === true) {
|
|
75
|
-
// navigation.dispatch(
|
|
76
|
-
// CommonActions.reset({
|
|
77
|
-
// index: 1,
|
|
78
|
-
// routes: [
|
|
79
|
-
// {
|
|
80
|
-
// name: ScreenNames.Qualify,
|
|
81
|
-
// params: { loan: loanData },
|
|
82
|
-
// },
|
|
83
|
-
// ],
|
|
84
|
-
// })
|
|
85
|
-
// );
|
|
86
|
-
// } else {
|
|
87
|
-
// navigation.push(ScreenNames.Main);
|
|
88
|
-
// // navigation.dispatch(
|
|
89
|
-
// // Stack
|
|
90
|
-
// // CommonActions.reset({
|
|
91
|
-
// // index: 1,
|
|
92
|
-
// // routes: [{ name: ScreenNames.Main }],
|
|
93
|
-
// // })
|
|
94
|
-
// // );
|
|
95
|
-
// }
|
|
96
|
-
// },
|
|
97
|
-
// () => {
|
|
98
|
-
// navigation.dispatch(
|
|
99
|
-
// CommonActions.reset({
|
|
100
|
-
// index: 1,
|
|
101
|
-
// routes: [{ name: ScreenNames.Main }],
|
|
102
|
-
// })
|
|
103
|
-
// );
|
|
104
|
-
// }
|
|
105
|
-
// );
|
|
106
|
-
// } else {
|
|
107
|
-
// navigation.dispatch(
|
|
108
|
-
// CommonActions.reset({
|
|
109
|
-
// index: 1,
|
|
110
|
-
// routes: [{ name: ScreenNames.Main }],
|
|
111
|
-
// })
|
|
112
|
-
// );
|
|
113
|
-
// }
|
|
114
|
-
// });
|
|
115
69
|
},
|
|
116
70
|
() => {
|
|
117
71
|
navigation.dispatch(
|
|
@@ -133,31 +87,10 @@ export const LoginWithPassword = observer(function LoginWithPassword(
|
|
|
133
87
|
|
|
134
88
|
return (
|
|
135
89
|
<View style={[commonStyles.fill, commonStyles.backgroundWhite]}>
|
|
90
|
+
<MHeader title="Nhập mã bảo mật" onBack={() => navigation.goBack()} />
|
|
136
91
|
<Image source={require('./bg.png')} style={logoView} />
|
|
92
|
+
|
|
137
93
|
<SafeAreaView style={{ flex: 1 }}>
|
|
138
|
-
<View style={[commonStyles.row, commonStyles.alignCenter, {}]}>
|
|
139
|
-
<MButton
|
|
140
|
-
//@ts-ignore
|
|
141
|
-
onPress={() => navigation.goBack()}
|
|
142
|
-
style={[
|
|
143
|
-
commonStyles.alignCenter,
|
|
144
|
-
commonStyles.justifyCenter,
|
|
145
|
-
commonStyles.row,
|
|
146
|
-
{ height: 48, paddingLeft: 16 },
|
|
147
|
-
]}
|
|
148
|
-
>
|
|
149
|
-
<IconBack width={14} height={14} fill={color.textHeader} />
|
|
150
|
-
<MText
|
|
151
|
-
style={[
|
|
152
|
-
commonStyles.textNormalBold,
|
|
153
|
-
{ color: color.textHeader, paddingLeft: 4 },
|
|
154
|
-
]}
|
|
155
|
-
>
|
|
156
|
-
Nhập mã bảo mật
|
|
157
|
-
</MText>
|
|
158
|
-
</MButton>
|
|
159
|
-
<View style={commonStyles.fill} />
|
|
160
|
-
</View>
|
|
161
94
|
<Formik
|
|
162
95
|
initialValues={{
|
|
163
96
|
password: props.route?.params?.passcode
|
|
@@ -28,6 +28,7 @@ import registerStore from '../register/Store';
|
|
|
28
28
|
import { IconBack, SMSOTP, VOICEOTP, ZALOOTP } from '../../assets/icons';
|
|
29
29
|
import homeStore from '../home/Store';
|
|
30
30
|
import qualifyStore from '../qualify/Store';
|
|
31
|
+
import MHeader from '../../components/MHeader';
|
|
31
32
|
|
|
32
33
|
export const OTP = observer(function OTP(props: any) {
|
|
33
34
|
const navigation = useNavigation();
|
|
@@ -97,6 +98,7 @@ export const OTP = observer(function OTP(props: any) {
|
|
|
97
98
|
|
|
98
99
|
return (
|
|
99
100
|
<View style={[commonStyles.fill, commonStyles.backgroundWhite]}>
|
|
101
|
+
<MHeader title="Nhập mã OTP" onBack={() => navigation.goBack()} />
|
|
100
102
|
<Image
|
|
101
103
|
source={require('./rightBottom.png')}
|
|
102
104
|
style={{
|
|
@@ -109,28 +111,6 @@ export const OTP = observer(function OTP(props: any) {
|
|
|
109
111
|
}}
|
|
110
112
|
/>
|
|
111
113
|
<SafeAreaView style={commonStyles.fill}>
|
|
112
|
-
<View style={[commonStyles.row, commonStyles.alignCenter, {}]}>
|
|
113
|
-
<MButton
|
|
114
|
-
//@ts-ignore
|
|
115
|
-
onPress={() => {
|
|
116
|
-
//@ts-ignore
|
|
117
|
-
navigation.pop();
|
|
118
|
-
registerStore.type = 2;
|
|
119
|
-
}}
|
|
120
|
-
style={[
|
|
121
|
-
commonStyles.alignCenter,
|
|
122
|
-
commonStyles.justifyCenter,
|
|
123
|
-
commonStyles.row,
|
|
124
|
-
{ height: 48, paddingLeft: 16 },
|
|
125
|
-
]}
|
|
126
|
-
>
|
|
127
|
-
<IconBack width={14} height={14} fill={color.textHeader} />
|
|
128
|
-
<MText style={{ fontSize: 16, fontWeight: '600', marginLeft: 10 }}>
|
|
129
|
-
Nhập mã OTP
|
|
130
|
-
</MText>
|
|
131
|
-
</MButton>
|
|
132
|
-
</View>
|
|
133
|
-
|
|
134
114
|
<ScrollView
|
|
135
115
|
keyboardShouldPersistTaps={'always'}
|
|
136
116
|
style={commonStyles.fill}
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
RESULTS,
|
|
35
35
|
} from 'react-native-permissions';
|
|
36
36
|
import { load } from '../../utils/keychain';
|
|
37
|
+
import MHeader from '../../components/MHeader';
|
|
37
38
|
|
|
38
39
|
const logoView: ImageStyle = {
|
|
39
40
|
position: 'absolute',
|
|
@@ -173,6 +174,7 @@ export const Register = observer(function Register() {
|
|
|
173
174
|
|
|
174
175
|
return (
|
|
175
176
|
<View style={{ flex: 1, backgroundColor: 'white' }}>
|
|
177
|
+
<MHeader />
|
|
176
178
|
<Image source={require('./bg.png')} style={logoView} />
|
|
177
179
|
<SafeAreaView style={{ flex: 1 }}>
|
|
178
180
|
<ScrollView style={{ flex: 1 }}>
|
|
@@ -19,23 +19,16 @@ import homeStore from '../home/Store';
|
|
|
19
19
|
import qualifyStore from '../qualify/Store';
|
|
20
20
|
import setPasswordStore from './store';
|
|
21
21
|
import appStore from '../../AppStore';
|
|
22
|
+
import MHeader from '../../components/MHeader';
|
|
22
23
|
|
|
23
24
|
export const SetPassword = observer(function SetPassword(props: any) {
|
|
24
25
|
const navigation = useNavigation();
|
|
25
26
|
|
|
26
27
|
return (
|
|
27
28
|
<View style={[commonStyles.fill, commonStyles.backgroundWhite]}>
|
|
29
|
+
<MHeader title="Đặt mã bảo mật" onBack={() => navigation.goBack()} />
|
|
28
30
|
<SafeAreaView style={{ flex: 1 }}>
|
|
29
31
|
<View style={{ margin: 16 }}>
|
|
30
|
-
<MText
|
|
31
|
-
style={{
|
|
32
|
-
fontSize: 24,
|
|
33
|
-
color: color.primary,
|
|
34
|
-
fontWeight: '600',
|
|
35
|
-
}}
|
|
36
|
-
>
|
|
37
|
-
Đặt mã bảo mật
|
|
38
|
-
</MText>
|
|
39
32
|
<MText style={{ color: '#4F4F4F', marginTop: 5 }}>
|
|
40
33
|
*Lưu ý: Mật khẩu có chứa 6 ký tự là số, vui lòng không công khai mật
|
|
41
34
|
khẩu với bất kì ai. VD: 686868
|
|
@@ -31,20 +31,21 @@ export const Splash = observer(function Splash() {
|
|
|
31
31
|
const [downloading, setDownloading] = useState(false);
|
|
32
32
|
|
|
33
33
|
const goLogin = async () => {
|
|
34
|
-
const token = await load('TOKEN_TIMACARE');
|
|
35
|
-
if (token) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} else {
|
|
46
|
-
|
|
47
|
-
}
|
|
34
|
+
// const token = await load('TOKEN_TIMACARE');
|
|
35
|
+
// if (token) {
|
|
36
|
+
// Api.getInstance().changeAuth(token);
|
|
37
|
+
// setTimeout(() => {
|
|
38
|
+
// navigation.dispatch(
|
|
39
|
+
// CommonActions.reset({
|
|
40
|
+
// index: 1,
|
|
41
|
+
// routes: [{ name: ScreenNames.Main }],
|
|
42
|
+
// })
|
|
43
|
+
// );
|
|
44
|
+
// }, 300);
|
|
45
|
+
// } else {
|
|
46
|
+
// navigation.push(ScreenNames.Register);
|
|
47
|
+
// }
|
|
48
|
+
navigation.push(ScreenNames.Register);
|
|
48
49
|
};
|
|
49
50
|
|
|
50
51
|
useEffect(() => {
|