Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Giang Tran
InvestCustomer
Commits
aa69d1d2
Commit
aa69d1d2
authored
Jun 18, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug chang password
parent
3b82aa35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
ConfirmOTP.js
src/Screens/Authen/ConfirmOTP.js
+7
-2
NewPassWord.js
src/Screens/Authen/NewPassWord.js
+8
-4
No files found.
src/Screens/Authen/ConfirmOTP.js
View file @
aa69d1d2
...
@@ -16,7 +16,12 @@ import {
...
@@ -16,7 +16,12 @@ import {
useBlurOnFulfill
,
useBlurOnFulfill
,
useClearByFocusCell
,
useClearByFocusCell
,
}
from
'react-native-confirmation-code-field'
;
}
from
'react-native-confirmation-code-field'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
,
encryptRSAString
,
}
from
'../../Config/Functions'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
{
NEWPASSWORD
}
from
'../../routers/ScreenNames'
;
import
{
NEWPASSWORD
}
from
'../../routers/ScreenNames'
;
import
{
verifyOTPApi
}
from
'../../apis/Functions/users'
;
import
{
verifyOTPApi
}
from
'../../apis/Functions/users'
;
...
@@ -70,7 +75,7 @@ const ConfirmOTP = (propsa) => {
...
@@ -70,7 +75,7 @@ const ConfirmOTP = (propsa) => {
const
res
=
await
verifyOTPApi
({
const
res
=
await
verifyOTPApi
({
platform
:
Platform
.
OS
,
platform
:
Platform
.
OS
,
receiver_name
:
propsa
.
route
.
params
.
email
,
receiver_name
:
propsa
.
route
.
params
.
email
,
otp
:
value
,
otp
:
encryptRSAString
(
value
)
,
type
:
'FORGOT_PASSWORD'
,
type
:
'FORGOT_PASSWORD'
,
});
});
...
...
src/Screens/Authen/NewPassWord.js
View file @
aa69d1d2
...
@@ -12,7 +12,12 @@ import HeaderBack from '../../components/Header/HeaderBack';
...
@@ -12,7 +12,12 @@ import HeaderBack from '../../components/Header/HeaderBack';
import
{
forgotPasswordApi
}
from
'../../apis/Functions/users'
;
import
{
forgotPasswordApi
}
from
'../../apis/Functions/users'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
,
encryptRSAString
,
}
from
'../../Config/Functions'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
{
AUTHEN
}
from
'../../routers/ScreenNames'
;
import
{
AUTHEN
}
from
'../../routers/ScreenNames'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
I18n
from
'../../helper/i18/i18n'
;
...
@@ -20,7 +25,6 @@ import I18n from '../../helper/i18/i18n';
...
@@ -20,7 +25,6 @@ import I18n from '../../helper/i18/i18n';
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
{
encryptRSAString
}
from
'../../Config/Functions'
;
const
NewPassword
=
(
props
)
=>
{
const
NewPassword
=
(
props
)
=>
{
const
[
password
,
setPassword
]
=
useState
(
''
);
const
[
password
,
setPassword
]
=
useState
(
''
);
...
@@ -36,7 +40,7 @@ const NewPassword = (props) => {
...
@@ -36,7 +40,7 @@ const NewPassword = (props) => {
props
.
showLoading
();
props
.
showLoading
();
const
res
=
await
forgotPasswordApi
({
const
res
=
await
forgotPasswordApi
({
receiver_name
:
email
,
receiver_name
:
email
,
otp
,
otp
:
encryptRSAString
(
otp
)
,
password
:
encryptRSAString
(
password
),
password
:
encryptRSAString
(
password
),
password_confirmation
:
encryptRSAString
(
cfPassword
),
password_confirmation
:
encryptRSAString
(
cfPassword
),
platform
:
Platform
.
OS
,
platform
:
Platform
.
OS
,
...
@@ -54,7 +58,7 @@ const NewPassword = (props) => {
...
@@ -54,7 +58,7 @@ const NewPassword = (props) => {
I18n
.
t
(
'ChangePasswordSuccess'
),
I18n
.
t
(
'ChangePasswordSuccess'
),
);
);
}
else
{
}
else
{
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
}
}
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment