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
90242d0a
Commit
90242d0a
authored
3 years ago
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push code
parent
b404a8ba
switch_rsa
…
build_01_July
build_02_July
build_06_07
build_11_June
build_14_June
build_15_july
build_30_June
build_release_1806
dev_01_July
dev_05_July
dev_11_June
dev_14_July
dev_18_June
dev_phase2
ekyc
func_fingerprint_login
func_smart_otp
search_period
1 merge request
!21
Func smart otp
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
531 additions
and
12 deletions
+531
-12
project.pbxproj
ios/instrumentscli0.trace/Invest.xcodeproj/project.pbxproj
+0
-0
Invest-tvOS.xcscheme
...est.xcodeproj/xcshareddata/xcschemes/Invest-tvOS.xcscheme
+88
-0
Invest.xcscheme
...e/Invest.xcodeproj/xcshareddata/xcschemes/Invest.xcscheme
+88
-0
ChangeSmartOTP.js
src/Screens/SmartOTP/ChangeSmartOTP/ChangeSmartOTP.js
+2
-1
ConfirmChangeSmartOTP.js
src/Screens/SmartOTP/ChangeSmartOTP/ConfirmChangeSmartOTP.js
+32
-2
ConfirmCreate.js
src/Screens/SmartOTP/ConfirmCreate/ConfirmCreate.js
+91
-0
ConfirmCreateView.js
src/Screens/SmartOTP/ConfirmCreate/ConfirmCreateView.js
+200
-0
EnterPasswordSmartOTP.js
src/Screens/SmartOTP/EnterPasswordSmartOTP.js
+8
-5
ScreenNames.js
src/routers/ScreenNames.js
+2
-0
StackNavigation.js
src/routers/StackNavigation.js
+14
-2
TabNavigation.js
src/routers/TabNavigation.js
+6
-2
No files found.
ios/instrumentscli0.trace/Invest.xcodeproj/project.pbxproj
0 → 100644
View file @
90242d0a
This diff is collapsed.
Click to expand it.
ios/instrumentscli0.trace/Invest.xcodeproj/xcshareddata/xcschemes/Invest-tvOS.xcscheme
0 → 100644
View file @
90242d0a
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion =
"1130"
version =
"1.3"
>
<BuildAction
parallelizeBuildables =
"YES"
buildImplicitDependencies =
"YES"
>
<BuildActionEntries>
<BuildActionEntry
buildForTesting =
"YES"
buildForRunning =
"YES"
buildForProfiling =
"YES"
buildForArchiving =
"YES"
buildForAnalyzing =
"YES"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"2D02E47A1E0B4A5D006451C7"
BuildableName =
"Invest-tvOS.app"
BlueprintName =
"Invest-tvOS"
ReferencedContainer =
"container:Invest.xcodeproj"
>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv =
"YES"
>
<Testables>
<TestableReference
skipped =
"NO"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"2D02E48F1E0B4A5D006451C7"
BuildableName =
"Invest-tvOSTests.xctest"
BlueprintName =
"Invest-tvOSTests"
ReferencedContainer =
"container:Invest.xcodeproj"
>
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
debugDocumentVersioning =
"YES"
debugServiceExtension =
"internal"
allowLocationSimulation =
"YES"
>
<BuildableProductRunnable
runnableDebuggingMode =
"0"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"2D02E47A1E0B4A5D006451C7"
BuildableName =
"Invest-tvOS.app"
BlueprintName =
"Invest-tvOS"
ReferencedContainer =
"container:Invest.xcodeproj"
>
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration =
"Release"
shouldUseLaunchSchemeArgsEnv =
"YES"
savedToolIdentifier =
""
useCustomWorkingDirectory =
"NO"
debugDocumentVersioning =
"YES"
>
<BuildableProductRunnable
runnableDebuggingMode =
"0"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"2D02E47A1E0B4A5D006451C7"
BuildableName =
"Invest-tvOS.app"
BlueprintName =
"Invest-tvOS"
ReferencedContainer =
"container:Invest.xcodeproj"
>
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration =
"Debug"
>
</AnalyzeAction>
<ArchiveAction
buildConfiguration =
"Release"
revealArchiveInOrganizer =
"YES"
>
</ArchiveAction>
</Scheme>
This diff is collapsed.
Click to expand it.
ios/instrumentscli0.trace/Invest.xcodeproj/xcshareddata/xcschemes/Invest.xcscheme
0 → 100644
View file @
90242d0a
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion =
"1130"
version =
"1.3"
>
<BuildAction
parallelizeBuildables =
"YES"
buildImplicitDependencies =
"YES"
>
<BuildActionEntries>
<BuildActionEntry
buildForTesting =
"YES"
buildForRunning =
"YES"
buildForProfiling =
"YES"
buildForArchiving =
"YES"
buildForAnalyzing =
"YES"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"13B07F861A680F5B00A75B9A"
BuildableName =
"Invest.app"
BlueprintName =
"Invest"
ReferencedContainer =
"container:Invest.xcodeproj"
>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv =
"YES"
>
<Testables>
<TestableReference
skipped =
"NO"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"00E356ED1AD99517003FC87E"
BuildableName =
"InvestTests.xctest"
BlueprintName =
"InvestTests"
ReferencedContainer =
"container:Invest.xcodeproj"
>
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
debugDocumentVersioning =
"YES"
debugServiceExtension =
"internal"
allowLocationSimulation =
"YES"
>
<BuildableProductRunnable
runnableDebuggingMode =
"0"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"13B07F861A680F5B00A75B9A"
BuildableName =
"Invest.app"
BlueprintName =
"Invest"
ReferencedContainer =
"container:Invest.xcodeproj"
>
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration =
"Release"
shouldUseLaunchSchemeArgsEnv =
"YES"
savedToolIdentifier =
""
useCustomWorkingDirectory =
"NO"
debugDocumentVersioning =
"YES"
>
<BuildableProductRunnable
runnableDebuggingMode =
"0"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"13B07F861A680F5B00A75B9A"
BuildableName =
"Invest.app"
BlueprintName =
"Invest"
ReferencedContainer =
"container:Invest.xcodeproj"
>
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration =
"Debug"
>
</AnalyzeAction>
<ArchiveAction
buildConfiguration =
"Release"
revealArchiveInOrganizer =
"YES"
>
</ArchiveAction>
</Scheme>
This diff is collapsed.
Click to expand it.
src/Screens/SmartOTP/ChangeSmartOTP/ChangeSmartOTP.js
View file @
90242d0a
...
...
@@ -33,7 +33,7 @@ const EnterPasswordSmartOTP = (props) => {
setFourNumber
(
number
.
toString
());
}
};
console
.
log
(
'Pros pass'
,
props
.
route
.
params
);
const
onCheckPINSmartOTPPin
=
async
()
=>
{
let
pinCode
=
`
${
firstNumber
}${
secondsNumber
}${
thirdNumber
}${
fourNumber
}
`
;
setFirstNumber
(
null
);
...
...
@@ -43,6 +43,7 @@ const EnterPasswordSmartOTP = (props) => {
navigation
.
navigate
(
CONFIRMCHANGESMARTOTP
,
{
pre_otp
:
pinCode
,
old_password
:
props
.
route
.
params
.
old_password
,
TYPE
:
props
.
route
.
params
.
TYPE
,
});
};
const
onDeletePress
=
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/Screens/SmartOTP/ChangeSmartOTP/ConfirmChangeSmartOTP.js
View file @
90242d0a
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
ConfirmSmartOTPView
from
'./ConfirmSmartOTPView'
;
import
{
updateOTPApiSmart
}
from
'../../../apis/Functions/users'
;
import
{
updateOTPApiSmart
,
getOTPApiSmartOTP
,
}
from
'../../../apis/Functions/users'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
{
connect
}
from
'react-redux'
;
import
{
hideLoading
,
showLoading
}
from
'../../../actions/loadingAction'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
{
SMARTOTPCONFIG
,
TABNAVIGATOR
}
from
'../../../routers/ScreenNames'
;
import
{
SMARTOTPCONFIG
,
TABNAVIGATOR
,
CONFIRMCREATEOTP
,
}
from
'../../../routers/ScreenNames'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
const
ConfirmChangeSmartOTP
=
(
props
)
=>
{
...
...
@@ -31,8 +38,12 @@ const ConfirmChangeSmartOTP = (props) => {
}
};
console
.
log
(
'Pros pass'
,
props
.
route
.
params
);
const
onCheckPINSmartOTPPin
=
async
()
=>
{
let
pinCode
=
`
${
firstNumber
}${
secondsNumber
}${
thirdNumber
}${
fourNumber
}
`
;
if
(
props
.
route
.
params
.
TYPE
==
'CHANGE_SMART_OTP'
)
{
props
.
showLoading
();
const
res
=
await
updateOTPApiSmart
({
platform
:
Platform
.
OS
,
...
...
@@ -55,6 +66,25 @@ const ConfirmChangeSmartOTP = (props) => {
setThirdNumber
(
null
);
setFourNumber
(
null
);
}
}
else
{
props
.
showLoading
();
const
res
=
await
getOTPApiSmartOTP
({
platform
:
Platform
.
OS
,
otp_by
:
props
.
user
.
email
,
otp_password
:
'1234'
,
type
:
'CREATE_OTP_PASSWORD'
,
});
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
navigation
.
navigate
(
CONFIRMCREATEOTP
,
{
password
:
props
.
route
.
params
.
pre_otp
,
password_confirmation
:
pinCode
,
});
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
}
};
const
onDeletePress
=
()
=>
{
if
(
fourNumber
)
{
...
...
This diff is collapsed.
Click to expand it.
src/Screens/SmartOTP/ConfirmCreate/ConfirmCreate.js
0 → 100644
View file @
90242d0a
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
ConfirmCreateView
from
'./ConfirmCreateView'
;
import
{
verifyStoreOTPApiSmart
}
from
'../../../apis/Functions/users'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
{
connect
}
from
'react-redux'
;
import
{
hideLoading
,
showLoading
}
from
'../../../actions/loadingAction'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
CONFIRMCHANGESMARTOTP
,
TABNAVIGATOR
,
}
from
'../../../routers/ScreenNames'
;
const
EnterPasswordSmartOTP
=
(
props
)
=>
{
const
navigation
=
useNavigation
();
const
[
firstNumber
,
setFirstNumber
]
=
useState
(
null
);
const
[
secondsNumber
,
setSecondsNumber
]
=
useState
(
null
);
const
[
thirdNumber
,
setThirdNumber
]
=
useState
(
null
);
const
[
fourNumber
,
setFourNumber
]
=
useState
(
null
);
useEffect
(()
=>
{
if
(
fourNumber
)
{
onCheckPINSmartOTPPin
();
}
},
[
fourNumber
]);
const
onNumberPress
=
(
number
)
=>
{
if
(
!
firstNumber
)
{
setFirstNumber
(
number
.
toString
());
}
else
if
(
!
secondsNumber
)
{
setSecondsNumber
(
number
.
toString
());
}
else
if
(
!
thirdNumber
)
{
setThirdNumber
(
number
.
toString
());
}
else
if
(
!
fourNumber
)
{
setFourNumber
(
number
.
toString
());
}
};
const
onCheckPINSmartOTPPin
=
async
()
=>
{
let
pinCode
=
`
${
firstNumber
}${
secondsNumber
}${
thirdNumber
}${
fourNumber
}
`
;
setFirstNumber
(
null
);
setSecondsNumber
(
null
);
setThirdNumber
(
null
);
setFourNumber
(
null
);
props
.
showLoading
();
const
res
=
await
verifyStoreOTPApiSmart
({
platform
:
Platform
.
OS
,
password
:
props
.
route
.
params
.
password
,
password_confirmation
:
props
.
route
.
params
.
password_confirmation
,
otp
:
pinCode
,
type
:
'CREATE_OTP_PASSWORD'
,
});
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
navigation
.
navigate
(
TABNAVIGATOR
);
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
};
const
onDeletePress
=
()
=>
{
if
(
fourNumber
)
{
setFourNumber
(
null
);
}
else
if
(
thirdNumber
)
{
setThirdNumber
(
null
);
}
else
if
(
secondsNumber
)
{
setSecondsNumber
(
null
);
}
else
if
(
firstNumber
)
{
setFirstNumber
(
null
);
}
};
return
(
<
ConfirmCreateView
firstNumber
=
{
firstNumber
}
secondsNumber
=
{
secondsNumber
}
thirdNumber
=
{
thirdNumber
}
fourNumber
=
{
fourNumber
}
onNumberPress
=
{
onNumberPress
}
onDeletePress
=
{
onDeletePress
}
/
>
);
};
const
mapStateToProps
=
(
state
)
=>
{
return
{
user
:
state
.
userReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{
showLoading
,
hideLoading
})(
EnterPasswordSmartOTP
,
);
This diff is collapsed.
Click to expand it.
src/Screens/SmartOTP/ConfirmCreate/ConfirmCreateView.js
0 → 100644
View file @
90242d0a
import
React
from
'react'
;
import
{
StyleSheet
,
Text
,
TouchableOpacity
,
View
}
from
'react-native'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../../Config/Functions'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
R
from
'../../../assets/R'
;
import
Icon
from
'react-native-vector-icons/FontAwesome5'
;
const
ChangeSmartOTPView
=
(
props
)
=>
{
return
(
<
View
style
=
{{
flex
:
1
,
colorBackground
:
R
.
colors
.
white
}}
>
<
HeaderBack
title
=
{
'ChangeSmartOTP'
}
/
>
<
Text
style
=
{[
styles
.
textNormal
,
{
marginTop
:
HEIGHTXD
(
40
)}]}
>
{
I18n
.
t
(
'EnterOTPRequest'
)}
<
/Text
>
<
View
style
=
{[
styles
.
rowNumber
]}
>
<
View
style
=
{[
styles
.
indicator
,
{
backgroundColor
:
props
.
firstNumber
?
R
.
colors
.
main
:
R
.
colors
.
white
,
},
]}
/
>
<
View
style
=
{[
styles
.
indicator
,
{
backgroundColor
:
props
.
secondsNumber
?
R
.
colors
.
main
:
R
.
colors
.
white
,
},
]}
/
>
<
View
style
=
{[
styles
.
indicator
,
{
backgroundColor
:
props
.
thirdNumber
?
R
.
colors
.
main
:
R
.
colors
.
white
,
},
]}
/
>
<
View
style
=
{[
styles
.
indicator
,
{
backgroundColor
:
props
.
fourNumber
?
R
.
colors
.
main
:
R
.
colors
.
white
,
},
]}
/
>
<
/View
>
<
View
style
=
{[
styles
.
rowNumber
,
{
marginTop
:
HEIGHTXD
(
80
)}]}
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onNumberPress
(
1
);
}}
style
=
{
styles
.
btnNumber
}
>
<
Text
style
=
{
styles
.
textNumber
}
>
1
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onNumberPress
(
2
);
}}
style
=
{[
styles
.
btnNumber
,
{
marginLeft
:
WIDTHXD
(
40
)}]}
>
<
Text
style
=
{
styles
.
textNumber
}
>
2
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onNumberPress
(
3
);
}}
style
=
{[
styles
.
btnNumber
,
{
marginLeft
:
WIDTHXD
(
40
)}]}
>
<
Text
style
=
{
styles
.
textNumber
}
>
3
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{
styles
.
rowNumber
}
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onNumberPress
(
4
);
}}
style
=
{
styles
.
btnNumber
}
>
<
Text
style
=
{
styles
.
textNumber
}
>
4
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onNumberPress
(
5
);
}}
style
=
{[
styles
.
btnNumber
,
{
marginLeft
:
WIDTHXD
(
40
)}]}
>
<
Text
style
=
{
styles
.
textNumber
}
>
5
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onNumberPress
(
6
);
}}
style
=
{[
styles
.
btnNumber
,
{
marginLeft
:
WIDTHXD
(
40
)}]}
>
<
Text
style
=
{
styles
.
textNumber
}
>
6
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{
styles
.
rowNumber
}
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onNumberPress
(
7
);
}}
style
=
{
styles
.
btnNumber
}
>
<
Text
style
=
{
styles
.
textNumber
}
>
7
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onNumberPress
(
8
);
}}
style
=
{[
styles
.
btnNumber
,
{
marginLeft
:
WIDTHXD
(
40
)}]}
>
<
Text
style
=
{
styles
.
textNumber
}
>
8
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onNumberPress
(
9
);
}}
style
=
{[
styles
.
btnNumber
,
{
marginLeft
:
WIDTHXD
(
40
)}]}
>
<
Text
style
=
{
styles
.
textNumber
}
>
9
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{
styles
.
rowNumber
}
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onNumberPress
(
0
);
}}
style
=
{[
styles
.
btnNumber
,
{
marginLeft
:
WIDTHXD
(
300
)}]}
>
<
Text
style
=
{
styles
.
textNumber
}
>
0
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
onDeletePress
();
}}
style
=
{{
width
:
HEIGHTXD
(
260
),
height
:
HEIGHTXD
(
260
),
marginLeft
:
WIDTHXD
(
40
),
justifyContent
:
'center'
,
alignItems
:
'center'
,
}}
>
<
Icon
name
=
{
'backspace'
}
size
=
{
HEIGHTXD
(
80
)}
color
=
{
'#8E8C8C'
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
);
};
export
default
ChangeSmartOTPView
;
const
styles
=
StyleSheet
.
create
({
btnSend
:
{
height
:
HEIGHTXD
(
80
),
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
rowNumber
:
{
flexDirection
:
'row'
,
justifyContent
:
'center'
,
marginTop
:
HEIGHTXD
(
40
),
},
btnNumber
:
{
height
:
HEIGHTXD
(
260
),
width
:
HEIGHTXD
(
260
),
justifyContent
:
'center'
,
alignItems
:
'center'
,
borderWidth
:
0.3
,
borderColor
:
R
.
colors
.
gray6
,
borderRadius
:
HEIGHTXD
(
130
),
},
indicator
:
{
height
:
HEIGHTXD
(
50
),
width
:
HEIGHTXD
(
50
),
borderWidth
:
0.3
,
borderColor
:
R
.
colors
.
gray6
,
borderRadius
:
HEIGHTXD
(
35
),
marginHorizontal
:
WIDTHXD
(
20
),
},
textNormal
:
{
fontSize
:
getFontXD
(
39
),
color
:
R
.
colors
.
black
,
textAlign
:
'center'
,
},
textNumber
:
{
fontSize
:
getFontXD
(
90
),
color
:
R
.
colors
.
black
,
textAlign
:
'center'
,
},
txtSend
:
{
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
main
,
},
});
This diff is collapsed.
Click to expand it.
src/Screens/SmartOTP/EnterPasswordSmartOTP.js
View file @
90242d0a
...
...
@@ -42,11 +42,14 @@ const EnterPasswordSmartOTP = (props) => {
type
:
'VERIFY_OTP_PASSWORD'
,
});
if
(
res
.
data
.
code
==
200
)
{
navigation
.
navigate
(
CHANGESMARTOTP
,
{
old_password
:
pinCode
});
clearPIN
()
navigation
.
navigate
(
CHANGESMARTOTP
,
{
old_password
:
pinCode
,
TYPE
:
'CHANGE_SMART_OTP'
,
});
clearPIN
();
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
clearPIN
()
clearPIN
();
}
}
else
{
const
res
=
await
getOTPApiSmartOTP
({
...
...
@@ -63,7 +66,7 @@ const EnterPasswordSmartOTP = (props) => {
props
.
route
.
params
.
onGoToSmartOTP
(
pinCode
,
res
.
data
.
data
.
otp
);
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
clearPIN
()
clearPIN
();
}
}
props
.
hideLoading
();
...
...
@@ -73,7 +76,7 @@ const EnterPasswordSmartOTP = (props) => {
setSecondsNumber
(
null
);
setThirdNumber
(
null
);
setFourNumber
(
null
);
}
};
const
onDeletePress
=
()
=>
{
if
(
fourNumber
)
{
setFourNumber
(
null
);
...
...
This diff is collapsed.
Click to expand it.
src/routers/ScreenNames.js
View file @
90242d0a
...
...
@@ -93,3 +93,5 @@ export const CONFIRMCHANGESMARTOTP = 'CONFIRMCHANGESMARTOTP';
export
const
RULESSMARTOTP
=
'RULESSMARTOTP'
;
export
const
FAQSSMARTOTP
=
'FAQSSMARTOTP'
;
export
const
CONFIRMCREATEOTP
=
'CONFIRMCREATEOTP'
;
This diff is collapsed.
Click to expand it.
src/routers/StackNavigation.js
View file @
90242d0a
...
...
@@ -67,6 +67,7 @@ import ConfirmChangeSmartOTP from '../Screens/SmartOTP/ChangeSmartOTP/ConfirmCha
import
FAQs
from
'../Screens/SmartOTP/WebView/FAQs'
;
import
RulesSmartOTP
from
'../Screens/SmartOTP/WebView/RulesSmartOTP'
;
import
ConfirmCreate
from
'../Screens/SmartOTP/ConfirmCreate/ConfirmCreate'
;
import
*
as
ScreenName
from
'./ScreenNames'
;
...
...
@@ -86,9 +87,14 @@ function MyStack(props) {
headerMode
=
{
'none'
}
initialRouteName
=
{
ScreenName
.
AUTHEN
}
>
<
Stack
.
Screen
name
=
{
ScreenName
.
CONFIRMCREATEOTP
}
component
=
{
ConfirmCreate
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
CACULATEDDEPOSIT
}
component
=
{
CaculatedDeposit
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
CONFIRMOTPSMART
}
component
=
{
ConfirmOTPSmart
}
...
...
@@ -172,8 +178,14 @@ function MyStack(props) {
<
Stack
.
Screen
name
=
{
ScreenName
.
NEWPASSWORD
}
component
=
{
NewPassWord
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
PRODUCTDETAIL
}
component
=
{
ProductDetail
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
SMARTOTP
}
component
=
{
SmartOTP
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
ENTER_PASSWORD_SMART_OTP
}
component
=
{
EnterPasswordSmartOTP
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
RESET_SMART_OTP
}
component
=
{
ResetSmartOTP
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
ENTER_PASSWORD_SMART_OTP
}
component
=
{
EnterPasswordSmartOTP
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
RESET_SMART_OTP
}
component
=
{
ResetSmartOTP
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
FAQSSMARTOTP
}
component
=
{
FAQs
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
RULESSMARTOTP
}
component
=
{
RulesSmartOTP
}
/
>
...
...
This diff is collapsed.
Click to expand it.
src/routers/TabNavigation.js
View file @
90242d0a
...
...
@@ -21,6 +21,7 @@ import {
AccountVerification
,
PACKETCQG
,
SETTINGOTP
,
CHANGESMARTOTP
,
}
from
'../routers/ScreenNames'
;
import
I18n
,
{
setLocation
}
from
'../helper/i18/i18n'
;
import
{
changeLanguage
}
from
'../actions/language'
;
...
...
@@ -104,13 +105,16 @@ const TabNavigator = (props) => {
return
confirmAlert
(
I18n
.
t
(
'PopupVerifyAccount'
),
()
=>
{
navigate
.
navigate
(
AccountVerification
);
});
}
else
if
(
!
props
.
user
.
smart_otp_status
)
{
}
else
if
(
props
.
user
.
smart_otp_status
)
{
return
confirmAlert
(
props
.
language
.
language
==
'vi'
?
'Bạn có muốn cài đặt Smart OTP?'
:
'Do you want setting Smart OTP?'
,
()
=>
{
navigate
.
navigate
(
SETTINGOTP
);
navigate
.
navigate
(
CHANGESMARTOTP
,
{
TYPE
:
'CREATE_SMART_OTP'
,
old_password
:
null
,
});
},
);
}
else
if
(
props
.
user
.
status
==
3
&&
!
props
.
user
.
contract_code
)
{
...
...
This diff is collapsed.
Click to expand it.
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