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
b404a8ba
Commit
b404a8ba
authored
3 years ago
by
Giang Tran
Browse files
Options
Browse Files
Download
Plain Diff
fix bug goback
parents
7fad8041
06bb0724
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
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
102 additions
and
54 deletions
+102
-54
build.gradle
android/app/build.gradle
+2
-2
app-release.apk
android/app/release/app-release.apk
+0
-0
output-metadata.json
android/app/release/output-metadata.json
+2
-2
project.pbxproj
ios/Invest.xcodeproj/project.pbxproj
+10
-2
WalletDeposit.js
src/Screens/Action/Wallet/WalletDeposit.js
+42
-29
WalletWithdraw.js
src/Screens/Action/Wallet/WalletWithdraw.js
+25
-7
Home.js
src/Screens/Home/Home.js
+8
-3
PriceListView.js
src/Screens/Home/PriceListView.js
+1
-1
ConfirmOTPSmart.js
src/Screens/SmartOTP/ConfirmOTPSmart.js
+6
-6
SettingSmartOTP.js
src/Screens/SmartOTP/SettingSmartOTP.js
+2
-0
Aleart.js
src/components/Aleart.js
+2
-2
en.js
src/helper/i18/locales/en.js
+1
-0
vn.js
src/helper/i18/locales/vn.js
+1
-0
No files found.
android/app/build.gradle
View file @
b404a8ba
...
...
@@ -132,8 +132,8 @@ android {
applicationId
"com.dcv.invest"
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
versionCode
1
5
versionName
"
1.9
"
versionCode
1
6
versionName
"
2.0
"
vectorDrawables
.
useSupportLibrary
=
true
}
splits
{
...
...
This diff is collapsed.
Click to expand it.
android/app/release/app-release.apk
deleted
100644 → 0
View file @
7fad8041
File deleted
This diff is collapsed.
Click to expand it.
android/app/release/output-metadata.json
View file @
b404a8ba
...
...
@@ -11,8 +11,8 @@
"type"
:
"SINGLE"
,
"filters"
:
[],
"properties"
:
[],
"versionCode"
:
1
5
,
"versionName"
:
"
1.9
"
,
"versionCode"
:
1
6
,
"versionName"
:
"
2.0
"
,
"enabled"
:
true
,
"outputFile"
:
"app-release.apk"
}
...
...
This diff is collapsed.
Click to expand it.
ios/Invest.xcodeproj/project.pbxproj
View file @
b404a8ba
...
...
@@ -903,7 +903,7 @@
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
6
;
CURRENT_PROJECT_VERSION
=
7
;
DEVELOPMENT_TEAM
=
MXZ24GRH48
;
ENABLE_BITCODE
=
NO
;
GCC_PREPROCESSOR_DEFINITIONS
=
(
...
...
@@ -912,7 +912,11 @@
);
INFOPLIST_FILE
=
Invest/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
<
<<<<<<
H
EAD
M
A
RK
E
TING_V
E
RSION
=
2
.
0
;
=======
M
A
RK
E
TING_V
E
RSION
=
2
.
2
;
>
>>>>>>
06bb0724d2837eaa03af27e1282b35e17a1d04cc
OTHER_LDFLAGS
=
(
"$(inherited)"
,
"-ObjC"
,
...
...
@@ -937,11 +941,15 @@
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
6
;
CURRENT_PROJECT_VERSION
=
7
;
DEVELOPMENT_TEAM
=
MXZ24GRH48
;
INFOPLIST_FILE
=
Invest/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
<
<<<<<<
H
EAD
M
A
RK
E
TING_V
E
RSION
=
2
.
0
;
=======
M
A
RK
E
TING_V
E
RSION
=
2
.
2
;
>
>>>>>>
06bb0724d2837eaa03af27e1282b35e17a1d04cc
OTHER_LDFLAGS
=
(
"$(inherited)"
,
"-ObjC"
,
...
...
This diff is collapsed.
Click to expand it.
src/Screens/Action/Wallet/WalletDeposit.js
View file @
b404a8ba
import
React
,
{
useState
}
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
DeviceEventEmitter
,
Dimensions
,
TouchableOpacity
,
Alert
,
TouchableWithoutFeedback
,
Keyboard
,
KeyboardAvoidingView
,
Platform
,
ScrollView
,
StyleSheet
,
Text
,
TouchableOpacity
,
TouchableWithoutFeedback
,
View
,
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
TextField
from
'../../../components/Input/TextField'
;
import
TextMulti
from
'../../../components/Input/TextMulti'
;
import
TextDisable
from
'../../../components/Input/TextDisable'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
getFontXD
,
toPriceVnd
,
checkFormatArray
,
WIDTHXD
,
HEIGHTXD
,
}
from
'../../../Config/Functions'
;
import
{
checkFormatArray
,
getFontXD
,
HEIGHTXD
,
toPriceVnd
,
WIDTHXD
}
from
'../../../Config/Functions'
;
import
{
connect
}
from
'react-redux'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
walletDeposit
}
from
'../../../apis/Functions/Deposit'
;
import
{
hideLoading
,
showLoading
}
from
'../../../actions/loadingAction'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
{
ENTER_PASSWORD_SMART_OTP
,
OTPWALLET
,
SMARTOTP
}
from
'../../../routers/ScreenNames'
;
import
{
getOTPApi
}
from
'../../../apis/Functions/users'
;
import
{
ENTER_PASSWORD_SMART_OTP
,
SETTINGOTP
,
SMARTOTP
}
from
'../../../routers/ScreenNames'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
EnterPasswordSmartOTP
from
'../../SmartOTP/EnterPasswordSmartOTP'
;
const
{
width
}
=
Dimensions
.
get
(
'window'
);
import
{
confirmAlert
}
from
'../../../components/Aleart'
;
const
WalletDeposit
=
(
props
)
=>
{
const
[
amount
,
setAmount
]
=
useState
();
...
...
@@ -49,15 +36,41 @@ const WalletDeposit = (props) => {
I18n
.
t
(
'Note'
).
toLowerCase
(),
];
const
index
=
checkFormatArray
([
amount
,
notes
]);
const
index
=
checkFormatArray
([
amount
]);
if
(
index
===
true
)
{
if
(
!
props
.
user
.
smart_otp_status
)
{
confirmAlert
(
`
${
I18n
.
t
(
'YouHaveNotSettingSmartOTP'
)}
`
,
()
=>
{
navigate
.
navigate
(
SETTINGOTP
,
{
isFromTransaction
:
true
,
setupSmartOTPSuccess
:
()
=>
{
navigate
.
goBack
()
navigate
.
goBack
()
navigate
.
navigate
(
ENTER_PASSWORD_SMART_OTP
,
{
onGoToSmartOTP
:
(
pinCode
,
otp
)
=>
onGoToSmartOTP
(
pinCode
,
otp
)
onGoToSmartOTP
:
(
pinCode
,
otp
)
=>
onGoToSmartOTP
(
pinCode
,
otp
),
});
DeviceEventEmitter
.
emit
(
'reloadUserInfo'
);
},
});
},
`
${
I18n
.
t
(
'setting'
)}
`
,
);
}
else
{
navigate
.
navigate
(
ENTER_PASSWORD_SMART_OTP
,
{
onGoToSmartOTP
:
(
pinCode
,
otp
)
=>
onGoToSmartOTP
(
pinCode
,
otp
),
});
}
}
else
{
showAlert
(
TYPE
.
WARN
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
}
};
const
onGoToSmartOTP
=
(
pinCode
,
otp
)
=>
{
navigate
.
goBack
()
navigate
.
goBack
();
navigate
.
navigate
(
SMARTOTP
,
{
type
:
'DEPOSIT'
,
amount
,
...
...
@@ -65,7 +78,7 @@ const WalletDeposit = (props) => {
pinCode
,
otp
,
});
}
};
return
(
<
KeyboardAvoidingView
behavior
=
{
Platform
.
Os
===
'ios'
?
'padding'
:
'height'
}
...
...
@@ -73,7 +86,7 @@ const WalletDeposit = (props) => {
keyboardVerticalOffset
=
{
-
50
}
>
<
TouchableWithoutFeedback
onPress
=
{
Keyboard
.
dismiss
}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'InvestmentDeposit'
}
/
>
<
HeaderBack
title
=
{
'InvestmentDeposit'
}
/
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
wrapTop
}
>
...
...
@@ -86,7 +99,7 @@ const WalletDeposit = (props) => {
:
0
}{
' '
}
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
1
,
backgroundColor
:
'#DBDBDB'
}}
/
>
<
View
style
=
{{
width
:
1
,
backgroundColor
:
'#DBDBDB'
}}
/
>
<
View
style
=
{
styles
.
itemTop
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
CQG
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
...
...
This diff is collapsed.
Click to expand it.
src/Screens/Action/Wallet/WalletWithdraw.js
View file @
b404a8ba
...
...
@@ -6,17 +6,14 @@ import {
Dimensions
,
TouchableOpacity
,
Platform
,
Alert
,
TouchableWithoutFeedback
,
Keyboard
,
KeyboardAvoidingView
,
ScrollView
,
ScrollView
,
DeviceEventEmitter
,
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
TextField
from
'../../../components/Input/TextField'
;
import
TextMulti
from
'../../../components/Input/TextMulti'
;
import
TextDisable
from
'../../../components/Input/TextDisable'
;
import
{
connect
}
from
'react-redux'
;
import
{
getFontXD
,
...
...
@@ -27,17 +24,17 @@ import {
}
from
'../../../Config/Functions'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
RadioForm
from
'react-native-simple-radio-button'
;
import
{
widthDraw
,
getListWidthDraw
}
from
'../../../apis/Functions/Widthdraw'
;
import
{
getListWidthDraw
}
from
'../../../apis/Functions/Widthdraw'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
saveUserToRedux
}
from
'../../../actions/users'
;
import
{
confirmAlert
}
from
'../../../components/Aleart'
;
import
{
ADDMETHODPAY
,
ENTER_PASSWORD_SMART_OTP
,
ENTER_PASSWORD_SMART_OTP
,
SETTINGOTP
,
}
from
'../../../routers/ScreenNames'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
{
getOTPApi
}
from
'../../../apis/Functions/users'
;
import
{
SMARTOTP
}
from
'../../../routers/ScreenNames'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
var
radio_props
=
[
...
...
@@ -117,9 +114,29 @@ const WalletWithdraw = (props) => {
I18n
.
t
(
'WarnMaxReqestWithdraw'
),
);
}
else
{
if
(
!
props
.
user
.
smart_otp_status
)
{
confirmAlert
(
`
${
I18n
.
t
(
'YouHaveNotSettingSmartOTP'
)}
`
,
()
=>
{
navigate
.
navigate
(
SETTINGOTP
,
{
isFromTransaction
:
true
,
setupSmartOTPSuccess
:
()
=>
{
navigate
.
goBack
()
navigate
.
goBack
()
navigate
.
navigate
(
ENTER_PASSWORD_SMART_OTP
,
{
onGoToSmartOTP
:
(
pinCode
,
otp
)
=>
onGoToSmartOTP
(
pinCode
,
otp
),
});
DeviceEventEmitter
.
emit
(
'reloadUserInfo'
);
},
});
},
`
${
I18n
.
t
(
'setting'
)}
`
,
);
}
else
{
navigate
.
navigate
(
ENTER_PASSWORD_SMART_OTP
,
{
onGoToSmartOTP
:
(
pinCode
,
otp
)
=>
onGoToSmartOTP
(
pinCode
,
otp
),
});
}
}
}
else
{
showAlert
(
...
...
@@ -317,4 +334,5 @@ const mapStateToProps = (state) => {
export
default
connect
(
mapStateToProps
,
{
showLoading
,
hideLoading
,
saveUserToRedux
})(
WalletWithdraw
);
This diff is collapsed.
Click to expand it.
src/Screens/Home/Home.js
View file @
b404a8ba
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Alert
,
Platform
,
View
}
from
'react-native'
;
import
{
DeviceEventEmitter
,
Platform
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
{
getTransaction
}
from
'../../apis/Functions/users'
;
import
{
getImagesHome
}
from
'../../apis/Functions/General'
;
...
...
@@ -11,7 +11,6 @@ import {getListCategoryProduct} from '../../apis/Functions/Transaction';
import
{
hideLoading
,
showLoading
}
from
'../../actions/loadingAction'
;
import
_
from
'lodash'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert/index'
;
import
VersionChecker
from
'../VersionChecker'
;
import
{
saveUserToRedux
}
from
'../../actions/users'
;
import
{
getDetailUser
}
from
'../../apis/Functions/users'
;
...
...
@@ -52,6 +51,13 @@ const Home = (props) => {
useEffect
(()
=>
{
getData
();
initSocket
();
let
reloadUserInfoListener
=
DeviceEventEmitter
.
addListener
(
'reloadUserInfo'
,
(
e
)
=>
{
console
.
log
(
'run in to reloadUserInfo'
);
onRefresh
();
});
return
()
=>
{
reloadUserInfoListener
.
remove
();
};
},
[]);
useEffect
(()
=>
{
...
...
@@ -218,7 +224,6 @@ const Home = (props) => {
/
>
);
};
<
VersionChecker
/>
;
const
mapStateToProps
=
(
state
)
=>
{
return
{
user
:
state
.
userReducer
,
...
...
This diff is collapsed.
Click to expand it.
src/Screens/Home/PriceListView.js
View file @
b404a8ba
...
...
@@ -40,7 +40,7 @@ const PriceListView = (props) => {
<
/View
>
<
FlatList
style
=
{{
paddingBottom
:
HEIGHTXD
(
15
),
backgroundColor
:
R
.
colors
.
white
}}
keyExtractor
=
{(
item
)
=>
item
.
id
}
keyExtractor
=
{(
item
)
=>
item
.
id
.
toString
()
}
data
=
{
dataPrice
}
ListHeaderComponent
=
{()
=>
<
View
style
=
{[
styles
.
container
]}
>
...
...
This diff is collapsed.
Click to expand it.
src/Screens/SmartOTP/ConfirmOTPSmart.js
View file @
b404a8ba
import
React
,
{
Component
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
View
,
Text
,
TextInput
,
StyleSheet
,
TouchableOpacity
,
Platform
,
Alert
,
}
from
'react-native'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
...
...
@@ -19,7 +17,6 @@ import {
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
R
from
'../../assets/R'
;
import
{
TABNAVIGATOR
}
from
'../../routers/ScreenNames'
;
import
{
verifyOTPApi
}
from
'../../apis/Functions/users'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
AppText
from
'../../components/AppText'
;
...
...
@@ -29,12 +26,11 @@ import {connect} from 'react-redux';
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
CountDown
from
'../../components/CountDown'
;
import
{
verifyOTPApiSmart
,
getOTPApi
,
verifyStoreOTPApiSmart
,
getOTPApiSmartOTP
,
}
from
'../../apis/Functions/users'
;
const
CELL_COUNT
=
4
;
const
ConfirmOTPSmart
=
(
propsa
)
=>
{
...
...
@@ -82,7 +78,11 @@ const ConfirmOTPSmart = (propsa) => {
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
propsa
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
propsa
.
route
.
params
.
isFromTransaction
)
{
propsa
.
route
.
params
.
setupSmartOTPSuccess
();
}
else
{
navigate
.
navigate
(
TABNAVIGATOR
);
}
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
...
...
This diff is collapsed.
Click to expand it.
src/Screens/SmartOTP/SettingSmartOTP.js
View file @
b404a8ba
...
...
@@ -47,6 +47,8 @@ const SettingOTP = (props) => {
navigatiton
.
navigate
(
CONFIRMOTPSMART
,
{
password
,
password_confirmation
,
isFromTransaction
:
props
.
route
.
params
.
isFromTransaction
,
setupSmartOTPSuccess
:
props
.
route
.
params
.
setupSmartOTPSuccess
});
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
...
...
This diff is collapsed.
Click to expand it.
src/components/Aleart.js
View file @
b404a8ba
...
...
@@ -5,7 +5,7 @@ export const NotificationAlert = (string) => {
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
string
);
};
export
const
confirmAlert
=
(
content
,
callback
)
=>
{
export
const
confirmAlert
=
(
content
,
callback
,
positiveTitle
)
=>
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
content
,
...
...
@@ -15,7 +15,7 @@ export const confirmAlert = (content, callback) => {
style
:
'cancel'
,
},
{
text
:
I18n
.
t
(
'Ok'
),
text
:
positiveTitle
?
positiveTitle
:
I18n
.
t
(
'Ok'
),
onPress
:
()
=>
{
callback
();
},
...
...
This diff is collapsed.
Click to expand it.
src/helper/i18/locales/en.js
View file @
b404a8ba
...
...
@@ -326,4 +326,5 @@ export default {
ResetSmartOTP2
:
' press 3 to meet technical support staff.'
,
ForgotSmartOTP
:
'Forgot Smart OTP'
,
WarnMaxReqestWithdraw
:
'Invalid withdrawal amount'
,
YouHaveNotSettingSmartOTP
:
'You have not installed Smart OTP'
,
};
This diff is collapsed.
Click to expand it.
src/helper/i18/locales/vn.js
View file @
b404a8ba
...
...
@@ -323,4 +323,5 @@ export default {
'Để đảm bảo an toàn trong quá trình sử dụng ứng dụng, bạn vui lòng liên hệ đến tổng đài: '
,
ResetSmartOTP2
:
' bấm phím 3 để gặp nhân viên hỗ trợ kỹ thuật.'
,
ForgotSmartOTP
:
'Quên Smart OTP'
,
YouHaveNotSettingSmartOTP
:
'Bạn chưa cài đặt Smart OTP'
,
};
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