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
842e47f3
Commit
842e47f3
authored
May 31, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'build_2805' into dev_phase2
parents
543c27d9
25b6772d
Show whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
573 additions
and
228 deletions
+573
-228
build.gradle
android/app/build.gradle
+2
-2
MainApplication.java
...oid/app/src/main/java/com/dcv/invest/MainApplication.java
+1
-0
settings.gradle
android/settings.gradle
+2
-0
project.pbxproj
ios/Invest.xcodeproj/project.pbxproj
+4
-4
Podfile
ios/Podfile
+2
-0
Functions.js
src/Config/Functions.js
+20
-7
constants.js
src/Config/constants.js
+7
-3
Footer.js
src/Screens/Account/PacrtCQG/Footer.js
+8
-3
OTPWallet.js
src/Screens/Action/Wallet/OTPWallet.js
+6
-2
Wallet.js
src/Screens/Action/Wallet/Wallet.js
+5
-5
WalletDeposit.js
src/Screens/Action/Wallet/WalletDeposit.js
+4
-2
WalletWithdraw.js
src/Screens/Action/Wallet/WalletWithdraw.js
+25
-6
Authen.js
src/Screens/Authen/Authen.js
+16
-3
ConfirmOTP.js
src/Screens/Authen/ConfirmOTP.js
+2
-0
RegisterOTP.js
src/Screens/Authen/RegisterOTP.js
+2
-0
SwiperComponent.js
src/Screens/Home/SwiperComponent.js
+1
-1
GeneralInfor.js
src/Screens/Menu/Profile/Tab/GeneralInfor.js
+2
-2
AddMethod.js
src/Screens/MethodPay/AddMethod.js
+8
-3
Calendar.js
src/Screens/NewFeed/Calendar/Calendar.js
+0
-2
item.js
src/Screens/NewFeed/Calendar/item.js
+42
-10
Item.js
src/Screens/NewFeed/Media/Item.js
+0
-0
TopMedia.js
src/Screens/NewFeed/Media/TopMedia.js
+5
-5
item.js
src/Screens/NewFeed/Tab1/item.js
+2
-2
Item.js
src/Screens/Notification/Item.js
+2
-3
ServiceCustomerView.js
src/Screens/ServiceCustomer/ServiceCustomerView.js
+3
-1
CalculatorProfitLossView.js
...ens/Tool/CalculatorProfitLoss/CalculatorProfitLossView.js
+14
-3
ConvertUnit.js
src/Screens/Tool/ConvertUnit.js
+17
-9
EscrowCalculatorView.js
src/Screens/Tool/EscrowCalculator/EscrowCalculatorView.js
+18
-12
ItemEscrowCalculator.js
src/Screens/Tool/EscrowCalculator/ItemEscrowCalculator.js
+20
-3
ExchangeRate.js
src/Screens/Tool/ExchangeRate.js
+7
-1
Item.js
src/Screens/Transaction/DueDate/Item.js
+20
-10
Item.js
src/Screens/Transaction/Escrow/Item.js
+19
-8
Item.js
src/Screens/Transaction/PriceList/Item.js
+18
-10
ContractDescription.js
...ductDetail/Tab/ContractDescription/ContractDescription.js
+1
-0
Item.js
src/Screens/Transaction/TimeTransaction/Item.js
+18
-25
Transaction.js
src/Screens/Transaction/Transaction.js
+26
-5
index.js
src/Screens/VersionChecker/index.js
+76
-28
CountDown.js
src/components/CountDown.js
+44
-0
Drawer.js
src/components/Header/Drawer.js
+2
-1
HeaderHome.js
src/components/Header/HeaderHome.js
+43
-21
InputMoney.js
src/components/Input/InputMoney.js
+19
-5
FirebaseNotification.js
src/helper/FirebaseNotification.js
+0
-1
en.js
src/helper/i18/locales/en.js
+12
-6
vn.js
src/helper/i18/locales/vn.js
+11
-2
PlussModal.js
src/routers/PlussModal.js
+9
-9
TabNavigation.js
src/routers/TabNavigation.js
+8
-3
No files found.
android/app/build.gradle
View file @
842e47f3
...
@@ -132,8 +132,8 @@ android {
...
@@ -132,8 +132,8 @@ android {
applicationId
"com.dcv.invest"
applicationId
"com.dcv.invest"
minSdkVersion
rootProject
.
ext
.
minSdkVersion
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
versionCode
8
versionCode
11
versionName
"1.
3
"
versionName
"1.
5
"
vectorDrawables
.
useSupportLibrary
=
true
vectorDrawables
.
useSupportLibrary
=
true
}
}
splits
{
splits
{
...
...
android/app/src/main/java/com/dcv/invest/MainApplication.java
View file @
842e47f3
...
@@ -4,6 +4,7 @@ import android.app.Application;
...
@@ -4,6 +4,7 @@ import android.app.Application;
import
android.content.Context
;
import
android.content.Context
;
import
com.facebook.react.PackageList
;
import
com.facebook.react.PackageList
;
import
com.facebook.react.ReactApplication
;
import
com.facebook.react.ReactApplication
;
import
com.learnium.RNDeviceInfo.RNDeviceInfo
;
import
com.reactnativecommunity.netinfo.NetInfoPackage
;
import
com.reactnativecommunity.netinfo.NetInfoPackage
;
import
com.facebook.react.ReactInstanceManager
;
import
com.facebook.react.ReactInstanceManager
;
import
com.facebook.react.ReactNativeHost
;
import
com.facebook.react.ReactNativeHost
;
...
...
android/settings.gradle
View file @
842e47f3
rootProject
.
name
=
'Invest'
rootProject
.
name
=
'Invest'
include
':react-native-device-info'
project
(
':react-native-device-info'
).
projectDir
=
new
File
(
rootProject
.
projectDir
,
'../node_modules/react-native-device-info/android'
)
include
':@react-native-community_netinfo'
include
':@react-native-community_netinfo'
project
(
':@react-native-community_netinfo'
).
projectDir
=
new
File
(
rootProject
.
projectDir
,
'../node_modules/@react-native-community/netinfo/android'
)
project
(
':@react-native-community_netinfo'
).
projectDir
=
new
File
(
rootProject
.
projectDir
,
'../node_modules/@react-native-community/netinfo/android'
)
include
':react-native-bootsplash'
include
':react-native-bootsplash'
...
...
ios/Invest.xcodeproj/project.pbxproj
View file @
842e47f3
...
@@ -903,7 +903,7 @@
...
@@ -903,7 +903,7 @@
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
3
;
CURRENT_PROJECT_VERSION
=
5
;
DEVELOPMENT_TEAM
=
MXZ24GRH48
;
DEVELOPMENT_TEAM
=
MXZ24GRH48
;
ENABLE_BITCODE
=
NO
;
ENABLE_BITCODE
=
NO
;
GCC_PREPROCESSOR_DEFINITIONS
=
(
GCC_PREPROCESSOR_DEFINITIONS
=
(
...
@@ -912,7 +912,7 @@
...
@@ -912,7 +912,7 @@
);
);
INFOPLIST_FILE
=
Invest/Info.plist
;
INFOPLIST_FILE
=
Invest/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
MARKETING_VERSION
=
1.9
;
MARKETING_VERSION
=
2.1
;
OTHER_LDFLAGS
=
(
OTHER_LDFLAGS
=
(
"$(inherited)"
,
"$(inherited)"
,
"-ObjC"
,
"-ObjC"
,
...
@@ -937,11 +937,11 @@
...
@@ -937,11 +937,11 @@
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
3
;
CURRENT_PROJECT_VERSION
=
5
;
DEVELOPMENT_TEAM
=
MXZ24GRH48
;
DEVELOPMENT_TEAM
=
MXZ24GRH48
;
INFOPLIST_FILE
=
Invest/Info.plist
;
INFOPLIST_FILE
=
Invest/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
MARKETING_VERSION
=
1.9
;
MARKETING_VERSION
=
2.1
;
OTHER_LDFLAGS
=
(
OTHER_LDFLAGS
=
(
"$(inherited)"
,
"$(inherited)"
,
"-ObjC"
,
"-ObjC"
,
...
...
ios/Podfile
View file @
842e47f3
...
@@ -89,6 +89,8 @@ target 'Invest' do
...
@@ -89,6 +89,8 @@ target 'Invest' do
pod
'react-native-netinfo'
,
:path
=>
'../node_modules/@react-native-community/netinfo'
pod
'react-native-netinfo'
,
:path
=>
'../node_modules/@react-native-community/netinfo'
pod
'RNDeviceInfo'
,
:path
=>
'../node_modules/react-native-device-info'
target
'InvestTests'
do
target
'InvestTests'
do
inherit!
:complete
inherit!
:complete
# Pods for testing
# Pods for testing
...
...
src/Config/Functions.js
View file @
842e47f3
...
@@ -14,6 +14,7 @@ import AppText from '../components/AppText';
...
@@ -14,6 +14,7 @@ import AppText from '../components/AppText';
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
{
DETAILNEW
,
TABNAVIGATOR
,
AUTHEN
}
from
'../routers/ScreenNames'
;
import
{
DETAILNEW
,
TABNAVIGATOR
,
AUTHEN
}
from
'../routers/ScreenNames'
;
import
R
from
'../assets/R'
;
import
R
from
'../assets/R'
;
import
{
isTablet
}
from
'react-native-device-info'
;
export
const
logout
=
(
navigation
)
=>
{
export
const
logout
=
(
navigation
)
=>
{
AsyncStorage
.
clear
();
AsyncStorage
.
clear
();
...
@@ -186,7 +187,11 @@ export const WIDTH = (w) => width * (w / 360);
...
@@ -186,7 +187,11 @@ export const WIDTH = (w) => width * (w / 360);
export
const
HEIGHT
=
(
h
)
=>
height
*
(
h
/
640
);
export
const
HEIGHT
=
(
h
)
=>
height
*
(
h
/
640
);
export
const
getLineHeight
=
(
f
)
=>
f
;
export
const
getLineHeight
=
(
f
)
=>
f
;
export
const
getFont
=
(
f
)
=>
f
-
1
;
export
const
getFont
=
(
f
)
=>
f
-
1
;
export
const
WIDTHXDICON
=
(
w
)
=>
width
*
(
w
/
1125
);
export
const
WIDTHXDICON
=
(
w
)
=>
isTablet
()
?
(
width
*
(
w
/
1125
))
/
1.5
:
width
*
(
w
/
1125
);
export
const
HEIGHTXDICON
=
(
h
)
=>
isTablet
()
?
(
height
*
(
h
/
2436
))
/
1.5
:
height
*
(
h
/
2436
);
export
const
validatePhone
=
(
str
)
=>
{
export
const
validatePhone
=
(
str
)
=>
{
let
re
=
/^
[
0-9+
]{9,11}
$/
;
let
re
=
/^
[
0-9+
]{9,11}
$/
;
...
@@ -236,14 +241,18 @@ export const toPriceVnd = (str) => {
...
@@ -236,14 +241,18 @@ export const toPriceVnd = (str) => {
export
const
floatToPriceVnd
=
(
str
)
=>
{
export
const
floatToPriceVnd
=
(
str
)
=>
{
if
(
str
)
{
if
(
str
)
{
let
stringPrice
=
str
.
toString
().
split
(
'.'
)
let
stringPrice
=
str
.
toString
().
split
(
'.'
);
let
headStringPrice
=
`
${
stringPrice
[
0
].
replace
(
/
(\d)(?=(\d{3})
+
(?!\d))
/g
,
'$1,'
)}
`
let
headStringPrice
=
`
${
stringPrice
[
0
].
replace
(
return
stringPrice
.
length
===
1
?
headStringPrice
:
headStringPrice
.
concat
(
`.
${
stringPrice
[
1
]}
`
)
/
(\d)(?=(\d{3})
+
(?!\d))
/g
,
'$1,'
,
)}
`
;
return
stringPrice
.
length
===
1
?
headStringPrice
:
headStringPrice
.
concat
(
`.
${
stringPrice
[
1
]}
`
);
}
else
{
}
else
{
return
''
return
''
;
}
}
}
}
;
// cắt chuỗi dạng something...
// cắt chuỗi dạng something...
export
const
ellipsis
=
(
str
=
''
,
max
=
30
)
=>
export
const
ellipsis
=
(
str
=
''
,
max
=
30
)
=>
...
@@ -408,6 +417,10 @@ export const convertDate = (date) => {
...
@@ -408,6 +417,10 @@ export const convertDate = (date) => {
return
time
;
return
time
;
};
};
export
const
getDate
=
(
date
)
=>
{
return
moment
(
date
).
get
(
'date'
);
};
export
const
convertTime
=
(
date
)
=>
{
export
const
convertTime
=
(
date
)
=>
{
const
temp
=
new
Date
(
moment
(
date
,
'DD/MM/YYYY'
));
const
temp
=
new
Date
(
moment
(
date
,
'DD/MM/YYYY'
));
const
time
=
moment
(
temp
).
format
(
'YYYY-MM-DD'
);
const
time
=
moment
(
temp
).
format
(
'YYYY-MM-DD'
);
...
...
src/Config/constants.js
View file @
842e47f3
import
I18n
from
'../helper/i18/i18n'
;
export
const
RadioBuySale
=
[
export
const
RadioBuySale
=
[
{
label
:
I18n
.
t
(
'Buy'
),
value
:
'BUY_IN'
},
{
label
:
'Mua'
,
value
:
'BUY_IN'
},
{
label
:
I18n
.
t
(
'Sale'
),
value
:
'SELL_OUT'
},
{
label
:
'Bán'
,
value
:
'SELL_OUT'
},
];
export
const
RadioBuySaleEN
=
[
{
label
:
'Buy'
,
value
:
'BUY_IN'
},
{
label
:
'Sell'
,
value
:
'SELL_OUT'
},
];
];
src/Screens/Account/PacrtCQG/Footer.js
View file @
842e47f3
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
Linking
}
from
'react-native'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
Linking
}
from
'react-native'
;
import
{
getFontXD
,
toPriceVnd
}
from
'../../../Config/Functions'
;
import
{
getFontXD
,
toPriceVnd
,
WIDTHXD
,
HEIGHTXD
,
}
from
'../../../Config/Functions'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
AppText
from
'../../../components/AppText'
;
import
AppText
from
'../../../components/AppText'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
I18n
from
'../../../helper/i18/i18n'
;
...
@@ -44,8 +49,8 @@ const styles = StyleSheet.create({
...
@@ -44,8 +49,8 @@ const styles = StyleSheet.create({
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
},
},
btnSend
:
{
btnSend
:
{
width
:
140
,
width
:
WIDTHXD
(
400
)
,
height
:
40
,
height
:
HEIGHTXD
(
120
)
,
backgroundColor
:
R
.
colors
.
main
,
backgroundColor
:
R
.
colors
.
main
,
borderRadius
:
10
,
borderRadius
:
10
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
...
src/Screens/Action/Wallet/OTPWallet.js
View file @
842e47f3
...
@@ -27,6 +27,7 @@ import {showLoading, hideLoading} from '../../../actions/loadingAction';
...
@@ -27,6 +27,7 @@ import {showLoading, hideLoading} from '../../../actions/loadingAction';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
TABNAVIGATOR
}
from
'../../../routers/ScreenNames'
;
import
{
TABNAVIGATOR
}
from
'../../../routers/ScreenNames'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
CountDown
from
'../../../components/CountDown'
;
const
CELL_COUNT
=
4
;
const
CELL_COUNT
=
4
;
...
@@ -70,6 +71,7 @@ const ConfirmOTP = (propsa) => {
...
@@ -70,6 +71,7 @@ const ConfirmOTP = (propsa) => {
if
(
propsa
.
route
.
params
.
type
==
'DEPOSIT'
)
{
if
(
propsa
.
route
.
params
.
type
==
'DEPOSIT'
)
{
const
{
amount
,
notes
}
=
propsa
.
route
.
params
;
const
{
amount
,
notes
}
=
propsa
.
route
.
params
;
res
=
await
walletDeposit
({
res
=
await
walletDeposit
({
amount
,
amount
,
platform
:
Platform
.
OS
,
platform
:
Platform
.
OS
,
...
@@ -96,10 +98,10 @@ const ConfirmOTP = (propsa) => {
...
@@ -96,10 +98,10 @@ const ConfirmOTP = (propsa) => {
navigate
.
navigate
(
TABNAVIGATOR
);
navigate
.
navigate
(
TABNAVIGATOR
);
},
500
);
},
500
);
}
else
{
}
else
{
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
}
}
else
{
}
else
{
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res1
.
data
.
message
);
}
}
propsa
.
hideLoading
();
propsa
.
hideLoading
();
...
@@ -144,8 +146,10 @@ const ConfirmOTP = (propsa) => {
...
@@ -144,8 +146,10 @@ const ConfirmOTP = (propsa) => {
style
=
{
styles
.
wrapFooter
}
style
=
{
styles
.
wrapFooter
}
onPress
=
{()
=>
navigate
.
goBack
()}
>
onPress
=
{()
=>
navigate
.
goBack
()}
>
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
CountDown
/>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
src/Screens/Action/Wallet/Wallet.js
View file @
842e47f3
...
@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, TouchableOpacity} from 'react-native';
...
@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, TouchableOpacity} from 'react-native';
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
Success
from
'./Tab/Success'
;
import
Success
from
'./Tab/Success'
;
import
Watting
from
'./Tab/Watting'
;
import
Watting
from
'./Tab/Watting'
;
import
{
getFontXD
}
from
'../../../Config/Functions'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../../Config/Functions'
;
import
{
WALLETDEPOSIT
,
WALLETWITHDRAW
}
from
'../../../routers/ScreenNames'
;
import
{
WALLETDEPOSIT
,
WALLETWITHDRAW
}
from
'../../../routers/ScreenNames'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
AppText
from
'../../../components/AppText'
;
import
AppText
from
'../../../components/AppText'
;
...
@@ -61,8 +61,8 @@ const styles = StyleSheet.create({
...
@@ -61,8 +61,8 @@ const styles = StyleSheet.create({
justifyContent
:
'space-around'
,
justifyContent
:
'space-around'
,
},
},
btnRight
:
{
btnRight
:
{
width
:
140
,
width
:
WIDTHXD
(
400
)
,
height
:
40
,
height
:
HEIGHTXD
(
100
)
,
backgroundColor
:
R
.
colors
.
main
,
backgroundColor
:
R
.
colors
.
main
,
borderRadius
:
10
,
borderRadius
:
10
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
@@ -80,8 +80,8 @@ const styles = StyleSheet.create({
...
@@ -80,8 +80,8 @@ const styles = StyleSheet.create({
elevation
:
1
,
elevation
:
1
,
},
},
btnLeft
:
{
btnLeft
:
{
width
:
140
,
width
:
WIDTHXD
(
400
)
,
height
:
40
,
height
:
HEIGHTXD
(
100
)
,
backgroundColor
:
R
.
colors
.
main
,
backgroundColor
:
R
.
colors
.
main
,
borderRadius
:
10
,
borderRadius
:
10
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
...
src/Screens/Action/Wallet/WalletDeposit.js
View file @
842e47f3
...
@@ -22,6 +22,8 @@ import {
...
@@ -22,6 +22,8 @@ import {
getFontXD
,
getFontXD
,
toPriceVnd
,
toPriceVnd
,
checkFormatArray
,
checkFormatArray
,
WIDTHXD
,
HEIGHTXD
,
}
from
'../../../Config/Functions'
;
}
from
'../../../Config/Functions'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
...
@@ -172,8 +174,8 @@ const styles = StyleSheet.create({
...
@@ -172,8 +174,8 @@ const styles = StyleSheet.create({
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
},
},
btnSend
:
{
btnSend
:
{
width
:
140
,
width
:
WIDTHXD
(
400
)
,
height
:
40
,
height
:
HEIGHTXD
(
100
)
,
backgroundColor
:
R
.
colors
.
main
,
backgroundColor
:
R
.
colors
.
main
,
borderRadius
:
10
,
borderRadius
:
10
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
...
src/Screens/Action/Wallet/WalletWithdraw.js
View file @
842e47f3
...
@@ -23,6 +23,7 @@ import {
...
@@ -23,6 +23,7 @@ import {
HEIGHTXD
,
HEIGHTXD
,
toPriceVnd
,
toPriceVnd
,
checkFormatArray
,
checkFormatArray
,
WIDTHXD
,
}
from
'../../../Config/Functions'
;
}
from
'../../../Config/Functions'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
RadioForm
from
'react-native-simple-radio-button'
;
import
RadioForm
from
'react-native-simple-radio-button'
;
...
@@ -37,8 +38,13 @@ import {getOTPApi} from '../../../apis/Functions/users';
...
@@ -37,8 +38,13 @@ import {getOTPApi} from '../../../apis/Functions/users';
import
{
OTPWALLET
}
from
'../../../routers/ScreenNames'
;
import
{
OTPWALLET
}
from
'../../../routers/ScreenNames'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
var
radio_props
=
[
var
radio_props
=
[
{
label
:
I18n
.
t
(
'FromWallet'
),
value
:
'WALLET'
},
{
label
:
'Từ ví'
,
value
:
'WALLET'
},
{
label
:
I18n
.
t
(
'FromCQGAccount'
),
value
:
'INVESTMENT'
},
{
label
:
'Từ tài khoản CQG'
,
value
:
'INVESTMENT'
},
];
var
radio_propsEN
=
[
{
label
:
'From wallet'
,
value
:
'WALLET'
},
{
label
:
'From CQG Account'
,
value
:
'INVESTMENT'
},
];
];
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
{
width
}
=
Dimensions
.
get
(
'window'
);
...
@@ -88,6 +94,7 @@ const WalletWithdraw = (props) => {
...
@@ -88,6 +94,7 @@ const WalletWithdraw = (props) => {
const
index
=
checkFormatArray
([
type
,
amount
]);
const
index
=
checkFormatArray
([
type
,
amount
]);
if
(
index
===
true
)
{
if
(
index
===
true
)
{
if
(
amount
>=
props
.
user
.
configs
.
request_withdraw_amount_min
)
{
props
.
showLoading
();
props
.
showLoading
();
const
res
=
await
getOTPApi
({
const
res
=
await
getOTPApi
({
platform
:
Platform
.
OS
,
platform
:
Platform
.
OS
,
...
@@ -106,12 +113,18 @@ const WalletWithdraw = (props) => {
...
@@ -106,12 +113,18 @@ const WalletWithdraw = (props) => {
}
else
{
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
}
props
.
hideLoading
();
props
.
hideLoading
();
}
else
{
}
else
{
showAlert
(
showAlert
(
TYPE
.
WARN
,
TYPE
.
WARN
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'WarnMinReqestWithdraw'
),
);
}
}
else
{
showAlert
(
TYPE
.
WARN
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
);
}
}
...
@@ -160,7 +173,11 @@ const WalletWithdraw = (props) => {
...
@@ -160,7 +173,11 @@ const WalletWithdraw = (props) => {
<
/Text
>
<
/Text
>
{
/* <View style={styles.row}> */
}
{
/* <View style={styles.row}> */
}
<
RadioForm
<
RadioForm
radio_props
=
{
radio_props
}
radio_props
=
{
props
.
language
.
language
==
'vi'
?
radio_props
:
radio_propsEN
}
labelStyle
=
{{
fontSize
:
getFontXD
(
42
)}}
labelStyle
=
{{
fontSize
:
getFontXD
(
42
)}}
formHorizontal
=
{
true
}
formHorizontal
=
{
true
}
style
=
{
styles
.
row
}
style
=
{
styles
.
row
}
...
@@ -196,6 +213,7 @@ const WalletWithdraw = (props) => {
...
@@ -196,6 +213,7 @@ const WalletWithdraw = (props) => {
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
<
View
<
View
style
=
{{
style
=
{{
paddingVertical
:
10
,
paddingVertical
:
10
,
...
@@ -254,8 +272,8 @@ const styles = StyleSheet.create({
...
@@ -254,8 +272,8 @@ const styles = StyleSheet.create({
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
},
},
btnSend
:
{
btnSend
:
{
width
:
140
,
width
:
WIDTHXD
(
400
)
,
height
:
40
,
height
:
HEIGHTXD
(
120
)
,
backgroundColor
:
R
.
colors
.
main
,
backgroundColor
:
R
.
colors
.
main
,
borderRadius
:
10
,
borderRadius
:
10
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
@@ -272,6 +290,7 @@ const styles = StyleSheet.create({
...
@@ -272,6 +290,7 @@ const styles = StyleSheet.create({
const
mapStateToProps
=
(
state
)
=>
{
const
mapStateToProps
=
(
state
)
=>
{
return
{
return
{
user
:
state
.
userReducer
,
user
:
state
.
userReducer
,
language
:
state
.
languageReducer
,
};
};
};
};
export
default
connect
(
mapStateToProps
,
{
export
default
connect
(
mapStateToProps
,
{
...
...
src/Screens/Authen/Authen.js
View file @
842e47f3
...
@@ -18,6 +18,7 @@ import Registor from './Registor';
...
@@ -18,6 +18,7 @@ import Registor from './Registor';
import
{
ScrollView
}
from
'react-native-gesture-handler'
;
import
{
ScrollView
}
from
'react-native-gesture-handler'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
{
connect
}
from
'react-redux'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'window'
);
const
{
width
,
height
}
=
Dimensions
.
get
(
'window'
);
...
@@ -51,12 +52,18 @@ const Authen = (props) => {
...
@@ -51,12 +52,18 @@ const Authen = (props) => {
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"LOGIN"
name
=
"LOGIN"
component
=
{
Login
}
component
=
{
Login
}
options
=
{{
tabBarLabel
:
I18n
.
t
(
'Login'
)}}
options
=
{{
tabBarLabel
:
props
.
language
.
language
==
'vi'
?
'Đăng nhập'
:
'Login'
,
}}
/
>
/
>
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"REGISTOR"
name
=
"REGISTOR"
component
=
{
Registor
}
component
=
{
Registor
}
options
=
{{
tabBarLabel
:
I18n
.
t
(
'Register'
)}}
options
=
{{
tabBarLabel
:
props
.
language
.
language
==
'vi'
?
'Đăng ký'
:
'Register'
,
}}
/
>
/
>
<
/Tab.Navigator
>
<
/Tab.Navigator
>
<
/ImageBackground
>
<
/ImageBackground
>
...
@@ -66,4 +73,10 @@ const Authen = (props) => {
...
@@ -66,4 +73,10 @@ const Authen = (props) => {
);
);
};
};
export
default
Authen
;
const
mapStateToProps
=
(
state
)
=>
{
return
{
language
:
state
.
languageReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{})(
Authen
);
src/Screens/Authen/ConfirmOTP.js
View file @
842e47f3
...
@@ -27,6 +27,7 @@ import AppText from '../../components/AppText';
...
@@ -27,6 +27,7 @@ import AppText from '../../components/AppText';
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
CountDown
from
'../../components/CountDown'
;
const
CELL_COUNT
=
4
;
const
CELL_COUNT
=
4
;
...
@@ -111,6 +112,7 @@ const ConfirmOTP = (propsa) => {
...
@@ -111,6 +112,7 @@ const ConfirmOTP = (propsa) => {
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
CountDown
/>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
src/Screens/Authen/RegisterOTP.js
View file @
842e47f3
...
@@ -27,6 +27,7 @@ import AppText from '../../components/AppText';
...
@@ -27,6 +27,7 @@ import AppText from '../../components/AppText';
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
CountDown
from
'../../components/CountDown'
;
const
CELL_COUNT
=
4
;
const
CELL_COUNT
=
4
;
...
@@ -143,6 +144,7 @@ const ConfirmOTP = (propsa) => {
...
@@ -143,6 +144,7 @@ const ConfirmOTP = (propsa) => {
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtNote
}
>
{
I18n
.
t
(
'OTPValidFiveMinute'
)}
<
/Text
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
CountDown
/>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
src/Screens/Home/SwiperComponent.js
View file @
842e47f3
...
@@ -12,7 +12,7 @@ const styles = StyleSheet.create({
...
@@ -12,7 +12,7 @@ const styles = StyleSheet.create({
borderRadius
:
5
,
borderRadius
:
5
,
height
:
HEIGHTXD
(
400
),
height
:
HEIGHTXD
(
400
),
marginTop
:
25
,
marginTop
:
HEIGHTXD
(
70
)
,
borderBottomColor
:
R
.
colors
.
borderGray
,
borderBottomColor
:
R
.
colors
.
borderGray
,
borderTopColor
:
R
.
colors
.
borderGray
,
borderTopColor
:
R
.
colors
.
borderGray
,
shadowColor
:
'#000'
,
shadowColor
:
'#000'
,
...
...
src/Screens/Menu/Profile/Tab/GeneralInfor.js
View file @
842e47f3
...
@@ -193,8 +193,8 @@ const styles = StyleSheet.create({
...
@@ -193,8 +193,8 @@ const styles = StyleSheet.create({
marginBottom
:
30
,
marginBottom
:
30
,
},
},
btn
:
{
btn
:
{
width
:
180
,
width
:
WIDTHXD
(
400
)
,
height
:
HEIGHTXD
(
1
2
0
),
height
:
HEIGHTXD
(
1
0
0
),
borderRadius
:
10
,
borderRadius
:
10
,
backgroundColor
:
'#1C6AF6'
,
backgroundColor
:
'#1C6AF6'
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
...
src/Screens/MethodPay/AddMethod.js
View file @
842e47f3
...
@@ -18,7 +18,12 @@ import R from '../../assets/R';
...
@@ -18,7 +18,12 @@ import R from '../../assets/R';
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
Item
from
'./Item'
;
import
Item
from
'./Item'
;
import
{
getFontXD
,
WIDTHXD
,
checkFormatArray
}
from
'../../Config/Functions'
;
import
{
getFontXD
,
WIDTHXD
,
checkFormatArray
,
HEIGHTXD
,
}
from
'../../Config/Functions'
;
import
TextField
from
'../../components/Input/TextField'
;
import
TextField
from
'../../components/Input/TextField'
;
import
PickerItem
from
'../../components/Picker/PickerItem'
;
import
PickerItem
from
'../../components/Picker/PickerItem'
;
import
{
getListBank
,
addMethodBank
}
from
'../../apis/Functions/Widthdraw'
;
import
{
getListBank
,
addMethodBank
}
from
'../../apis/Functions/Widthdraw'
;
...
@@ -152,8 +157,8 @@ const styles = StyleSheet.create({
...
@@ -152,8 +157,8 @@ const styles = StyleSheet.create({
},
},
btn
:
{
btn
:
{
width
:
150
,
width
:
WIDTHXD
(
400
)
,
height
:
40
,
height
:
HEIGHTXD
(
100
)
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
backgroundColor
:
R
.
colors
.
main
,
backgroundColor
:
R
.
colors
.
main
,
...
...
src/Screens/NewFeed/Calendar/Calendar.js
View file @
842e47f3
...
@@ -69,8 +69,6 @@ const NewFeed = (props) => {
...
@@ -69,8 +69,6 @@ const NewFeed = (props) => {
style
=
{{
style
=
{{
flex
:
1
,
flex
:
1
,
backgroundColor
:
'white'
,
backgroundColor
:
'white'
,
paddingLeft
:
10
,
paddingRight
:
20
,
paddingTop
:
10
,
paddingTop
:
10
,
}}
>
}}
>
<
FlatList
<
FlatList
...
...
src/Screens/NewFeed/Calendar/item.js
View file @
842e47f3
...
@@ -2,19 +2,50 @@ import React, {Component} from 'react';
...
@@ -2,19 +2,50 @@ import React, {Component} from 'react';
import
{
View
,
Text
,
StyleSheet
}
from
'react-native'
;
import
{
View
,
Text
,
StyleSheet
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
Block
from
'../../../components/Block'
;
import
Block
from
'../../../components/Block'
;
import
{
getFontXD
}
from
'../../../Config/Functions'
;
import
{
getFontXD
,
convertDate
}
from
'../../../Config/Functions'
;
import
{
convertDate
}
from
'../../../Config/Functions'
;
const
Item
=
(
props
)
=>
{
const
Item
=
(
props
)
=>
{
const
{
title
,
date
,
time
,
start_date
}
=
props
.
item
;
const
{
title
,
date
,
time
,
start_date
}
=
props
.
item
;
const
d
=
new
Date
();
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{[
styles
.
container
,
d
.
getDate
()
==
convertDate
(
start_date
).
slice
(
0
,
2
)
?
{
backgroundColor
:
'#B4D5FF'
}
:
{},
]}
>
<
View
style
=
{
styles
.
left
}
>
<
View
style
=
{
styles
.
left
}
>
<
View
style
=
{
styles
.
dot
}
/
>
<
View
style
=
{[
styles
.
dot
,
d
.
getDate
()
==
convertDate
(
start_date
).
slice
(
0
,
2
)
?
{
backgroundColor
:
'red'
}
:
{},
]}
/
>
<
/View
>
<
/View
>
<
View
style
=
{[
styles
.
right
,
props
.
index
==
0
?
{
borderTopWidth
:
0
}
:
{}]}
>
<
View
style
=
{[
styles
.
right
,
props
.
index
==
0
?
{
borderTopWidth
:
0
}
:
{}]}
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
Text
style
=
{
styles
.
txtTime
}
>
{
convertDate
(
start_date
)}
<
/Text
>
<
Text
<
Text
style
=
{
styles
.
txtDate
}
>
{
start_date
.
substring
(
10
,
16
)}
<
/Text
>
style
=
{[
styles
.
txtTime
,
d
.
getDate
()
==
convertDate
(
start_date
).
slice
(
0
,
2
)
?
{
color
:
'red'
,
fontWeight
:
'500'
}
:
{},
]}
>
{
' '
}
{
convertDate
(
start_date
)}
<
/Text
>
<
Text
style
=
{[
styles
.
txtDate
,
d
.
getDate
()
==
convertDate
(
start_date
).
slice
(
0
,
2
)
?
{
color
:
'red'
,
fontWeight
:
'500'
}
:
{},
]}
>
{
start_date
.
substring
(
10
,
16
)}
<
/Text
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
txtTitle
}
>
{
title
}
<
/Text
>
<
Text
style
=
{
styles
.
txtTitle
}
>
{
title
}
<
/Text
>
<
/View
>
<
/View
>
...
@@ -27,11 +58,12 @@ export default Item;
...
@@ -27,11 +58,12 @@ export default Item;
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
container
:
{
container
:
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
marginLeft
:
10
,
paddingLeft
:
20
,
paddingRight
:
20
,
},
},
left
:
{
left
:
{
width
:
0.6
,
width
:
1
,
backgroundColor
:
'#
CECECE
'
,
backgroundColor
:
'#
A7A7A7
'
,
},
},
right
:
{
right
:
{
marginLeft
:
20
,
marginLeft
:
20
,
...
@@ -62,6 +94,6 @@ const styles = StyleSheet.create({
...
@@ -62,6 +94,6 @@ const styles = StyleSheet.create({
color
:
R
.
colors
.
main
,
color
:
R
.
colors
.
main
,
},
},
txtDate
:
{
txtDate
:
{
color
:
'#
929292
'
,
color
:
'#
A7A7A7
'
,
},
},
});
});
src/Screens/NewFeed/Media/Item.js
View file @
842e47f3
src/Screens/NewFeed/Media/TopMedia.js
View file @
842e47f3
...
@@ -8,7 +8,7 @@ import {
...
@@ -8,7 +8,7 @@ import {
}
from
'react-native'
;
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
LinearGradient
from
'react-native-linear-gradient'
;
import
LinearGradient
from
'react-native-linear-gradient'
;
import
{
getFontXD
}
from
'../../../Config/Functions'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../../Config/Functions'
;
import
Block
from
'../../../components/Block'
;
import
Block
from
'../../../components/Block'
;
import
Icon
from
'react-native-vector-icons/AntDesign'
;
import
Icon
from
'react-native-vector-icons/AntDesign'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
...
@@ -83,7 +83,7 @@ const MediaView = (props) => {
...
@@ -83,7 +83,7 @@ const MediaView = (props) => {
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
containerTop
:
{
containerTop
:
{
height
:
300
,
height
:
HEIGHTXD
(
850
)
,
width
:
'100%'
,
width
:
'100%'
,
},
},
contentTop
:
{
contentTop
:
{
...
@@ -97,10 +97,10 @@ const styles = StyleSheet.create({
...
@@ -97,10 +97,10 @@ const styles = StyleSheet.create({
textDecorationLine
:
'underline'
,
textDecorationLine
:
'underline'
,
},
},
containerBtn
:
{
containerBtn
:
{
paddingHorizontal
:
15
,
width
:
WIDTHXD
(
380
),
paddingVertical
:
5
,
backgroundColor
:
'#1C6AF6'
,
backgroundColor
:
'#1C6AF6'
,
borderRadius
:
5
,
height
:
HEIGHTXD
(
120
),
borderRadius
:
HEIGHTXD
(
30
),
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
...
...
src/Screens/NewFeed/Tab1/item.js
View file @
842e47f3
...
@@ -3,7 +3,7 @@ import React, {Component} from 'react';
...
@@ -3,7 +3,7 @@ import React, {Component} from 'react';
import
{
View
,
Text
,
StyleSheet
,
Image
,
TouchableOpacity
}
from
'react-native'
;
import
{
View
,
Text
,
StyleSheet
,
Image
,
TouchableOpacity
}
from
'react-native'
;
import
Block
from
'../../../components/Block'
;
import
Block
from
'../../../components/Block'
;
import
Icon
from
'react-native-vector-icons/AntDesign'
;
import
Icon
from
'react-native-vector-icons/AntDesign'
;
import
{
getFontXD
}
from
'../../../Config/Functions'
;
import
{
getFontXD
,
HEIGHTXD
}
from
'../../../Config/Functions'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
DETAILNEW
}
from
'../../../routers/ScreenNames'
;
import
{
DETAILNEW
}
from
'../../../routers/ScreenNames'
;
...
@@ -49,7 +49,7 @@ const styles = StyleSheet.create({
...
@@ -49,7 +49,7 @@ const styles = StyleSheet.create({
color
:
'#A2A2A2'
,
color
:
'#A2A2A2'
,
},
},
img
:
{
img
:
{
height
:
180
,
height
:
HEIGHTXD
(
500
)
,
borderRadius
:
10
,
borderRadius
:
10
,
marginTop
:
5
,
marginTop
:
5
,
},
},
...
...
src/Screens/Notification/Item.js
View file @
842e47f3
...
@@ -13,7 +13,6 @@ import Block from '../../components/Block';
...
@@ -13,7 +13,6 @@ import Block from '../../components/Block';
const
Item
=
(
props
)
=>
{
const
Item
=
(
props
)
=>
{
const
{
item
}
=
props
;
const
{
item
}
=
props
;
console
.
log
(
'noti'
,
item
);
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
Block
flex
=
{
1
}
row
>
<
Block
flex
=
{
1
}
row
>
...
@@ -35,7 +34,7 @@ export default Item;
...
@@ -35,7 +34,7 @@ export default Item;
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
container
:
{
container
:
{
marginTop
:
10
,
marginTop
:
8
,
paddingVertical
:
10
,
paddingVertical
:
10
,
shadowColor
:
'#000'
,
shadowColor
:
'#000'
,
shadowOffset
:
{
shadowOffset
:
{
...
@@ -47,7 +46,7 @@ const styles = StyleSheet.create({
...
@@ -47,7 +46,7 @@ const styles = StyleSheet.create({
elevation
:
5
,
elevation
:
5
,
marginHorizontal
:
10
,
marginHorizontal
:
10
,
backgroundColor
:
R
.
colors
.
white
,
backgroundColor
:
R
.
colors
.
white
,
marginBottom
:
10
,
marginBottom
:
2
,
borderRadius
:
HEIGHTXD
(
30
),
borderRadius
:
HEIGHTXD
(
30
),
},
},
...
...
src/Screens/ServiceCustomer/ServiceCustomerView.js
View file @
842e47f3
...
@@ -81,7 +81,9 @@ const ServiceCustomerView = (props) => {
...
@@ -81,7 +81,9 @@ const ServiceCustomerView = (props) => {
<
AppText
i18nKey
=
{
'HotLine'
}
style
=
{
styles
.
title
}
/
>
<
AppText
i18nKey
=
{
'HotLine'
}
style
=
{
styles
.
title
}
/
>
<
TouchableOpacity
onPress
=
{()
=>
callNumber
(
hotline_call
)}
>
<
TouchableOpacity
onPress
=
{()
=>
callNumber
(
hotline_call
)}
>
<
Text
style
=
{
styles
.
txtContent
}
>
{
hotline
}
<
/Text
>
<
Text
style
=
{[
styles
.
txtContent
,
{
textDecorationLine
:
'underline'
}]}
>
{
hotline
}
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
AppText
i18nKey
=
{
'WorkingTime'
}
style
=
{
styles
.
title
}
/
>
<
AppText
i18nKey
=
{
'WorkingTime'
}
style
=
{
styles
.
title
}
/
>
...
...
src/Screens/Tool/CalculatorProfitLoss/CalculatorProfitLossView.js
View file @
842e47f3
...
@@ -18,12 +18,14 @@ import I18n from '../../../helper/i18/i18n';
...
@@ -18,12 +18,14 @@ import I18n from '../../../helper/i18/i18n';
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
RadioForm
from
'react-native-simple-radio-button'
;
import
RadioForm
from
'react-native-simple-radio-button'
;
import
{
RadioBuySale
}
from
'../../../Config/constants'
;
import
{
RadioBuySale
,
RadioBuySaleEN
}
from
'../../../Config/constants'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
ItemCalculator
from
'./ItemCalculator'
;
import
ItemCalculator
from
'./ItemCalculator'
;
import
AppText
from
'../../../components/AppText'
;
import
AppText
from
'../../../components/AppText'
;
import
{
connect
}
from
'react-redux'
;
const
CalculatorProfitLossView
=
(
props
)
=>
{
const
CalculatorProfitLossView
=
(
props
)
=>
{
console
.
log
(
props
.
language
.
language
);
return
(
return
(
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'column'
,
backgroundColor
:
'white'
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'column'
,
backgroundColor
:
'white'
}}
>
<
HeaderBack
title
=
{
'CalculatorProfitLoss'
}
isWhite
=
{
true
}
/
>
<
HeaderBack
title
=
{
'CalculatorProfitLoss'
}
isWhite
=
{
true
}
/
>
...
@@ -48,7 +50,9 @@ const CalculatorProfitLossView = (props) => {
...
@@ -48,7 +50,9 @@ const CalculatorProfitLossView = (props) => {
<
/AppText
>
<
/AppText
>
<
View
style
=
{{
width
:
WIDTHXD
(
600
),
height
:
HEIGHTXD
(
85
)}}
>
<
View
style
=
{{
width
:
WIDTHXD
(
600
),
height
:
HEIGHTXD
(
85
)}}
>
<
RadioForm
<
RadioForm
radio_props
=
{
RadioBuySale
}
radio_props
=
{
props
.
language
.
language
==
'vi'
?
RadioBuySale
:
RadioBuySaleEN
}
labelStyle
=
{{
fontSize
:
getFontXD
(
42
)}}
labelStyle
=
{{
fontSize
:
getFontXD
(
42
)}}
formHorizontal
=
{
true
}
formHorizontal
=
{
true
}
style
=
{
styles
.
row
}
style
=
{
styles
.
row
}
...
@@ -158,4 +162,11 @@ const styles = StyleSheet.create({
...
@@ -158,4 +162,11 @@ const styles = StyleSheet.create({
fontSize
:
getFontXD
(
48
),
fontSize
:
getFontXD
(
48
),
},
},
});
});
export
default
CalculatorProfitLossView
;
const
mapStateToProps
=
(
state
)
=>
{
return
{
language
:
state
.
languageReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{})(
CalculatorProfitLossView
);
src/Screens/Tool/ConvertUnit.js
View file @
842e47f3
...
@@ -5,14 +5,19 @@ import HeaderBack from '../../components/Header/HeaderBack';
...
@@ -5,14 +5,19 @@ import HeaderBack from '../../components/Header/HeaderBack';
import
PickerItem
from
'../../components/Picker/PickerItem'
;
import
PickerItem
from
'../../components/Picker/PickerItem'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
AppText
from
'../../components/AppText'
;
import
AppText
from
'../../components/AppText'
;
import
{
floatToPriceVnd
,
getFontXD
,
HEIGHTXD
,
toPriceVnd
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
{
floatToPriceVnd
,
getFontXD
,
HEIGHTXD
,
toPriceVnd
,
WIDTHXD
,
}
from
'../../Config/Functions'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
{
getUnitList
}
from
'../../apis/Functions/Transaction'
;
import
{
getUnitList
}
from
'../../apis/Functions/Transaction'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
{
hideLoading
,
showLoading
}
from
'../../actions/loadingAction'
;
import
{
hideLoading
,
showLoading
}
from
'../../actions/loadingAction'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
const
ConvertUnit
=
(
props
)
=>
{
const
ConvertUnit
=
(
props
)
=>
{
const
[
fromUnitList
,
setFromUnitList
]
=
useState
([]);
const
[
fromUnitList
,
setFromUnitList
]
=
useState
([]);
const
[
toUnitList
,
setToUnitList
]
=
useState
([]);
const
[
toUnitList
,
setToUnitList
]
=
useState
([]);
...
@@ -41,7 +46,7 @@ const ConvertUnit = (props) => {
...
@@ -41,7 +46,7 @@ const ConvertUnit = (props) => {
if
(
res
.
status
==
200
&&
res
.
data
.
code
==
200
)
{
if
(
res
.
status
==
200
&&
res
.
data
.
code
==
200
)
{
setFromUnitList
(
res
.
data
.
data
);
setFromUnitList
(
res
.
data
.
data
);
setFromUnit
(
res
.
data
.
data
[
0
]);
setFromUnit
(
res
.
data
.
data
[
0
]);
onChangeFromUnit
(
''
,
res
.
data
.
data
[
0
])
onChangeFromUnit
(
''
,
res
.
data
.
data
[
0
]);
}
else
{
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Can_not_get_data'
));
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Can_not_get_data'
));
}
}
...
@@ -51,7 +56,6 @@ const ConvertUnit = (props) => {
...
@@ -51,7 +56,6 @@ const ConvertUnit = (props) => {
const
onChangeNumber
=
(
string
)
=>
{
const
onChangeNumber
=
(
string
)
=>
{
let
number
=
string
.
toString
().
split
(
','
).
join
(
''
);
let
number
=
string
.
toString
().
split
(
','
).
join
(
''
);
setNumber
(
number
);
setNumber
(
number
);
};
};
const
onChangeFromUnit
=
(
value
,
item
)
=>
{
const
onChangeFromUnit
=
(
value
,
item
)
=>
{
...
@@ -76,17 +80,21 @@ const ConvertUnit = (props) => {
...
@@ -76,17 +80,21 @@ const ConvertUnit = (props) => {
const
calcultorResult
=
()
=>
{
const
calcultorResult
=
()
=>
{
if
(
number
&&
number
!=
''
&&
parseFloat
(
number
)
>
0
)
{
if
(
number
&&
number
!=
''
&&
parseFloat
(
number
)
>
0
)
{
let
result
=
parseFloat
(
number
)
*
toUnit
.
rate
;
let
result
=
parseFloat
(
number
)
*
toUnit
.
rate
;
setResult
(
`
${
floatToPriceVnd
(
number
.
toString
())}
${
fromUnit
.
name
}
=
${
floatToPriceVnd
(
result
.
toString
())}
${
toUnit
.
name
}
`
);
setResult
(
`
${
floatToPriceVnd
(
number
.
toString
())}
${
fromUnit
.
name
}
=
${
floatToPriceVnd
(
result
.
toString
())}
${
toUnit
.
name
}
`
,
);
}
else
{
}
else
{
setResult
(
''
)
setResult
(
''
);
}
}
};
};
return
(
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'ConvertUnit'
}
/
>
<
HeaderBack
title
=
{
'ConvertUnit'
}
/
>
<
View
style
=
{{
flex
:
1
,
paddingTop
:
20
,
paddingHorizontal
:
20
}}
>
<
View
style
=
{{
flex
:
1
,
paddingTop
:
20
,
paddingHorizontal
:
20
}}
>
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'Count'
}
/
>
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'Count'
}
/
>
<
View
style
=
{
styles
.
Item
}
>
<
View
style
=
{
styles
.
Item
}
>
<
View
style
=
{
styles
.
wrap
}
>
<
View
style
=
{
styles
.
wrap
}
>
<
TextInput
<
TextInput
...
@@ -184,6 +192,7 @@ const styles = StyleSheet.create({
...
@@ -184,6 +192,7 @@ const styles = StyleSheet.create({
shadowOpacity
:
0.2
,
shadowOpacity
:
0.2
,
shadowRadius
:
1.41
,
shadowRadius
:
1.41
,
elevation
:
2
,
elevation
:
2
,
color
:
R
.
colors
.
black
,
},
},
wrap
:
{
wrap
:
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
...
@@ -213,4 +222,3 @@ export default connect(mapStateToProps, {
...
@@ -213,4 +222,3 @@ export default connect(mapStateToProps, {
showLoading
,
showLoading
,
hideLoading
,
hideLoading
,
})(
ConvertUnit
);
})(
ConvertUnit
);
src/Screens/Tool/EscrowCalculator/EscrowCalculatorView.js
View file @
842e47f3
...
@@ -35,12 +35,15 @@ const EscrowCalculatorView = (props) => {
...
@@ -35,12 +35,15 @@ const EscrowCalculatorView = (props) => {
dataProduct
=
{
props
.
dataProduct
}
dataProduct
=
{
props
.
dataProduct
}
setProduct
=
{(
product
)
=>
{
setProduct
=
{(
product
)
=>
{
item
.
product
=
product
;
item
.
product
=
product
;
item
.
firstEscrow
=
parseFloat
(
item
.
lotNumber
)
*
product
.
escrow
;
item
.
firstEscrow
=
parseFloat
(
item
.
lotNumber
)
*
product
.
escrow
;
props
.
setItemInput
(
item
,
index
);
props
.
setItemInput
(
item
,
index
);
}}
}}
setLotNumber
=
{(
lotNumber
)
=>
{
setLotNumber
=
{(
lotNumber
)
=>
{
item
.
lotNumber
=
lotNumber
.
split
(
'.'
).
join
(
''
);
item
.
lotNumber
=
lotNumber
.
split
(
'.'
).
join
(
''
);
item
.
firstEscrow
=
item
.
product
?
parseFloat
(
item
.
lotNumber
)
*
item
.
product
.
escrow
:
0
;
item
.
firstEscrow
=
item
.
product
?
parseFloat
(
item
.
lotNumber
)
*
item
.
product
.
escrow
:
0
;
props
.
setItemInput
(
item
,
index
);
props
.
setItemInput
(
item
,
index
);
}}
}}
/
>
/
>
...
@@ -57,23 +60,26 @@ const EscrowCalculatorView = (props) => {
...
@@ -57,23 +60,26 @@ const EscrowCalculatorView = (props) => {
<
/View
>
<
/View
>
<
View
style
=
{{
paddingHorizontal
:
WIDTHXD
(
60
)}}
>
<
View
style
=
{{
paddingHorizontal
:
WIDTHXD
(
60
)}}
>
<
TextMoney
<
TextMoney
editable
=
{
false
}
title
=
{
I18n
.
t
(
'FirstEscrowTotal'
)}
value
=
{
props
.
firstEscrowTotal
}
titleStyle
=
{{
marginTop
:
HEIGHTXD
(
160
),
fontSize
:
getFontXD
(
39
),
}}
inputStyle
=
{{
backgroundColor
:
R
.
colors
.
gray7
}}
/
>
<
TextMoney
onChangeText
=
{(
val
)
=>
{
onChangeText
=
{(
val
)
=>
{
props
.
setFirstEscrow
(
val
.
split
(
'.'
).
join
(
''
));
props
.
setFirstEscrow
(
val
.
split
(
'.'
).
join
(
''
));
}}
}}
title
=
{
I18n
.
t
(
'
FirstEscrow
'
)}
title
=
{
I18n
.
t
(
'
AvailableMargin
'
)}
value
=
{
props
.
firstEscrow
}
value
=
{
props
.
firstEscrow
}
titleStyle
=
{{
titleStyle
=
{{
marginTop
:
HEIGHTXD
(
180
),
fontSize
:
getFontXD
(
39
),
fontSize
:
getFontXD
(
39
),
}}
}}
/
>
/
>
<
TextMoney
editable
=
{
false
}
title
=
{
I18n
.
t
(
'FirstEscrowTotal'
)}
value
=
{
props
.
firstEscrowTotal
}
titleStyle
=
{{
marginTop
:
HEIGHTXD
(
20
),
fontSize
:
getFontXD
(
39
)}}
inputStyle
=
{{
backgroundColor
:
R
.
colors
.
gray7
}}
/
>
<
Text
style
=
{
styles
.
textMessage
}
>
{
props
.
message
}
<
/Text
>
<
Text
style
=
{
styles
.
textMessage
}
>
{
props
.
message
}
<
/Text
>
<
/View
>
<
/View
>
...
@@ -144,7 +150,7 @@ const styles = StyleSheet.create({
...
@@ -144,7 +150,7 @@ const styles = StyleSheet.create({
shadowOpacity
:
0.25
,
shadowOpacity
:
0.25
,
shadowRadius
:
3.84
,
shadowRadius
:
3.84
,
elevation
:
3
,
elevation
:
3
,
borderRadius
:
30
,
borderRadius
:
WIDTHXD
(
144
)
,
},
},
btn
:
{
btn
:
{
width
:
WIDTHXD
(
428
),
width
:
WIDTHXD
(
428
),
...
...
src/Screens/Tool/EscrowCalculator/ItemEscrowCalculator.js
View file @
842e47f3
import
React
from
'react'
;
import
React
from
'react'
;
import
{
StyleSheet
,
Text
,
TouchableOpacity
,
View
}
from
'react-native'
;
import
{
StyleSheet
,
Text
,
TouchableOpacity
,
View
,
Dimensions
,
}
from
'react-native'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
{
import
{
...
@@ -12,27 +18,37 @@ import R from '../../../assets/R';
...
@@ -12,27 +18,37 @@ import R from '../../../assets/R';
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
Icon
from
'react-native-vector-icons/Entypo'
;
import
Icon
from
'react-native-vector-icons/Entypo'
;
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
ItemEscrowCalculator
=
(
props
)
=>
{
const
ItemEscrowCalculator
=
(
props
)
=>
{
return
(
return
(
<
View
style
=
{
styles
.
viewInput
}
>
<
View
style
=
{
styles
.
viewInput
}
>
<
View
style
=
{{
flexDirection
:
'row'
,
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
,
marginVertical
:
5
}}
>
<
Text
style
=
{
styles
.
textTitle
}
>
{
I18n
.
t
(
'Product'
)}
<
/Text
>
<
Text
style
=
{
styles
.
textTitle
}
>
{
I18n
.
t
(
'Product'
)}
<
/Text
>
<
PickerItem
<
PickerItem
data
=
{
props
.
dataProduct
}
data
=
{
props
.
dataProduct
}
onValueChange
=
{(
value
,
item
)
=>
{
onValueChange
=
{(
value
,
item
)
=>
{
props
.
setProduct
(
item
);
props
.
setProduct
(
item
);
}}
}}
width
=
{
width
/
2
-
30
}
iconSize
=
{
WIDTHXD
(
40
)}
iconSize
=
{
WIDTHXD
(
40
)}
iconColor
=
{
R
.
colors
.
black
}
iconColor
=
{
R
.
colors
.
black
}
/
>
/
>
<
/View
>
<
View
style
=
{{
width
:
20
}}
/
>
<
View
style
=
{{
flex
:
1
}}
>
<
TextMoney
<
TextMoney
onChangeText
=
{(
val
)
=>
{
onChangeText
=
{(
val
)
=>
{
props
.
setLotNumber
(
val
);
props
.
setLotNumber
(
val
);
}}
}}
title
=
{
I18n
.
t
(
'LotTransactionNumber'
)}
title
=
{
I18n
.
t
(
'LotTransactionNumber'
)}
value
=
{
toPriceVnd
(
props
.
item
.
lotNumber
)}
value
=
{
toPriceVnd
(
props
.
item
.
lotNumber
)}
titleStyle
=
{{
marginTop
:
HEIGHTXD
(
20
),
fontSize
:
getFontXD
(
39
)}}
titleStyle
=
{{
fontSize
:
getFontXD
(
39
)}}
/
>
/
>
<
/View
>
<
/View
>
<
TextMoney
<
TextMoney
onChangeText
=
{(
val
)
=>
{}}
onChangeText
=
{(
val
)
=>
{}}
title
=
{
I18n
.
t
(
'FirstEscrow'
)}
title
=
{
I18n
.
t
(
'FirstEscrow'
)}
...
@@ -52,6 +68,7 @@ const styles = StyleSheet.create({
...
@@ -52,6 +68,7 @@ const styles = StyleSheet.create({
borderColor
:
'#707070'
,
borderColor
:
'#707070'
,
paddingHorizontal
:
WIDTHXD
(
24
),
paddingHorizontal
:
WIDTHXD
(
24
),
paddingVertical
:
WIDTHXD
(
24
),
paddingVertical
:
WIDTHXD
(
24
),
},
},
textTitle
:
{
textTitle
:
{
fontSize
:
getFontXD
(
39
),
fontSize
:
getFontXD
(
39
),
...
...
src/Screens/Tool/ExchangeRate.js
View file @
842e47f3
...
@@ -56,6 +56,11 @@ const ExchangeRate = (props) => {
...
@@ -56,6 +56,11 @@ const ExchangeRate = (props) => {
}
else
if
(
!
priceExchange
)
setUsdTan
(
''
);
}
else
if
(
!
priceExchange
)
setUsdTan
(
''
);
};
};
const
onClick
=
()
=>
{
setPriceExchange
(
''
);
setUsdTan
(
''
);
};
return
(
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'ExchangeRate'
}
/
>
<
HeaderBack
title
=
{
'ExchangeRate'
}
/
>
...
@@ -76,6 +81,7 @@ const ExchangeRate = (props) => {
...
@@ -76,6 +81,7 @@ const ExchangeRate = (props) => {
<
TextField
<
TextField
isNumber
=
{
true
}
isNumber
=
{
true
}
maxLength
=
{
12
}
maxLength
=
{
12
}
value
=
{
priceExchange
}
onChangeText
=
{(
val
)
=>
setPriceExchange
(
val
)}
onChangeText
=
{(
val
)
=>
setPriceExchange
(
val
)}
title
=
{
I18n
.
t
(
'ConversionPrice'
)}
title
=
{
I18n
.
t
(
'ConversionPrice'
)}
/
>
/
>
...
@@ -85,7 +91,7 @@ const ExchangeRate = (props) => {
...
@@ -85,7 +91,7 @@ const ExchangeRate = (props) => {
title
=
{
I18n
.
t
(
'ConvertUSD'
)}
title
=
{
I18n
.
t
(
'ConvertUSD'
)}
/
>
/
>
<
View
style
=
{
styles
.
footer
}
>
<
View
style
=
{
styles
.
footer
}
>
<
TouchableOpacity
style
=
{
styles
.
btnContainer
}
>
<
TouchableOpacity
onPress
=
{
onClick
}
style
=
{
styles
.
btnContainer
}
>
<
AppText
style
=
{
styles
.
txtBtn
}
i18nKey
=
{
'Delete'
}
/
>
<
AppText
style
=
{
styles
.
txtBtn
}
i18nKey
=
{
'Delete'
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
...
...
src/Screens/Transaction/DueDate/Item.js
View file @
842e47f3
...
@@ -19,27 +19,37 @@ import I18n from '../../../helper/i18/i18n';
...
@@ -19,27 +19,37 @@ import I18n from '../../../helper/i18/i18n';
const
Item
=
(
props
)
=>
{
const
Item
=
(
props
)
=>
{
const
{
item
,
isEndItem
}
=
props
;
const
{
item
,
isEndItem
}
=
props
;
console
.
log
(
item
)
console
.
log
(
item
)
;
return
(
return
(
<
View
style
=
{[
styles
.
container
,
isEndItem
&&
{
marginBottom
:
HEIGHTXD
(
100
)}]}
>
<
View
style
=
{[
styles
.
container
,
isEndItem
&&
{
marginBottom
:
HEIGHTXD
(
100
)}]}
>
<
TouchableOpacity
onPress
=
{()
=>
props
.
onPress
(
item
)}
>
<
TouchableOpacity
onPress
=
{()
=>
props
.
onPress
(
item
)}
>
<
Block
flex
=
{
1
}
row
>
<
Block
flex
=
{
1
}
row
>
<
View
style
=
{
styles
.
wrapDate
}
>
<
View
style
=
{
styles
.
wrapDate
}
>
<
Image
source
=
{{
uri
:
item
.
commoditiy
.
image_path
}}
style
=
{
styles
.
imgIcon
}
/
>
<
Image
source
=
{{
uri
:
item
.
commoditiy
.
image_path
}}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
/View
>
<
Block
padding
=
{[
5
,
10
]}
space
=
{
'between'
}
flex
=
{
1
}
>
<
Block
padding
=
{[
0
,
10
]}
space
=
{
'between'
}
flex
=
{
1
}
>
<
View
<
View
style
=
{{
style
=
{{
flex
:
1
,
flex
:
1
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
justifyContent
:
'space-between'
,
}}
>
}}
>
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
txtBlack
,
{
flexWrap
:
'wrap'
,
flex
:
1
}]}
numberOfLines
=
{
1
}
ellipsizeMode
=
'tail'
>
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
txtBlack
,
{
flexWrap
:
'wrap'
,
flex
:
1
}]}
numberOfLines
=
{
1
}
ellipsizeMode
=
"tail"
>
{
item
.
contract_name
}
{
item
.
contract_name
}
<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
item
.
term
}
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
item
.
term
}
<
/Text
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
txtCode
}
>
{
`
${
I18n
.
t
(
'ContactCode'
)}
:
${
item
.
contract_code
}
`
}
<
/Text
>
<
Text
style
=
{
styles
.
txtCode
}
>
{
`
${
I18n
.
t
(
'ContactCode'
)}
:
${
item
.
contract_code
}
`
}
<
/Text
>
<
Text
style
=
{
styles
.
txt
}
>
{
item
.
open_interest_range
}
<
/Text
>
<
Text
style
=
{
styles
.
txt
}
>
{
item
.
open_interest_range
}
<
/Text
>
<
/Block
>
<
/Block
>
<
/Block
>
<
/Block
>
...
@@ -64,7 +74,7 @@ const styles = StyleSheet.create({
...
@@ -64,7 +74,7 @@ const styles = StyleSheet.create({
marginHorizontal
:
10
,
marginHorizontal
:
10
,
backgroundColor
:
R
.
colors
.
white
,
backgroundColor
:
R
.
colors
.
white
,
borderRadius
:
HEIGHTXD
(
30
),
borderRadius
:
HEIGHTXD
(
30
),
marginVertical
:
HEIGHTXD
(
15
)
marginVertical
:
HEIGHTXD
(
15
)
,
},
},
wrapLeft
:
{
wrapLeft
:
{
...
@@ -95,12 +105,12 @@ const styles = StyleSheet.create({
...
@@ -95,12 +105,12 @@ const styles = StyleSheet.create({
alignItems
:
'center'
,
alignItems
:
'center'
,
},
},
txtBlack
:
{
txtBlack
:
{
fontSize
:
getFontXD
(
50
),
fontSize
:
getFontXD
(
46
),
color
:
'black'
,
color
:
'black'
,
},
},
imgIcon
:
{
imgIcon
:
{
width
:
WIDTHXD
(
1
50
),
width
:
WIDTHXD
(
1
78
),
height
:
WIDTHXD
(
1
50
),
height
:
WIDTHXD
(
1
78
),
resizeMode
:
'cover'
,
resizeMode
:
'cover'
,
},
},
txtMoney
:
{
txtMoney
:
{
...
...
src/Screens/Transaction/Escrow/Item.js
View file @
842e47f3
...
@@ -15,29 +15,40 @@ import {
...
@@ -15,29 +15,40 @@ import {
}
from
'../../../Config/Functions'
;
}
from
'../../../Config/Functions'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
Block
from
'../../../components/Block'
;
import
Block
from
'../../../components/Block'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
Item
=
(
props
)
=>
{
const
Item
=
(
props
)
=>
{
const
{
item
,
isEndItem
}
=
props
;
const
{
item
,
isEndItem
}
=
props
;
return
(
return
(
<
View
style
=
{[
styles
.
container
,
isEndItem
&&
{
marginBottom
:
HEIGHTXD
(
100
)}]}
>
<
View
style
=
{[
styles
.
container
,
isEndItem
&&
{
marginBottom
:
HEIGHTXD
(
100
)}]}
>
<
TouchableOpacity
onPress
=
{()
=>
props
.
onPress
(
item
)}
>
<
TouchableOpacity
onPress
=
{()
=>
props
.
onPress
(
item
)}
>
<
Block
flex
=
{
1
}
row
>
<
Block
flex
=
{
1
}
row
>
<
View
style
=
{
styles
.
wrapDate
}
>
<
View
style
=
{
styles
.
wrapDate
}
>
<
Image
source
=
{{
uri
:
item
.
image_path
}}
style
=
{
styles
.
imgIcon
}
/
>
<
Image
source
=
{{
uri
:
item
.
image_path
}}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
/View
>
<
Block
padding
=
{[
5
,
10
]}
space
=
{
'between'
}
flex
=
{
1
}
>
<
Block
padding
=
{[
0
,
10
]
}
flex
=
{
1
}
>
<
View
<
View
style
=
{{
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
justifyContent
:
'space-between'
,
marginBottom
:
5
,
}}
>
}}
>
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
txtBlack
,
{
flexWrap
:
'wrap'
,
flex
:
1
}]}
numberOfLines
=
{
1
}
ellipsizeMode
=
'tail'
>
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
txtBlack
,
{
flexWrap
:
'wrap'
,
flex
:
1
}]}
numberOfLines
=
{
1
}
ellipsizeMode
=
"tail"
>
{
item
.
name
}
{
item
.
name
}
<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
item
.
escrow
>
0
?
toPriceVnd
(
item
.
escrow
)
:
0
}
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
item
.
escrow
>
0
?
toPriceVnd
(
item
.
escrow
)
:
0
}
<
/Text
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
txt
}
>
{
item
.
code
}
<
/Text
>
<
Text
style
=
{
styles
.
txt
}
>
{
' '
}
{
I18n
.
t
(
'code'
)}:
{
item
.
code
}
<
/Text
>
<
/Block
>
<
/Block
>
<
/Block
>
<
/Block
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
...
@@ -61,7 +72,7 @@ const styles = StyleSheet.create({
...
@@ -61,7 +72,7 @@ const styles = StyleSheet.create({
marginHorizontal
:
10
,
marginHorizontal
:
10
,
backgroundColor
:
R
.
colors
.
white
,
backgroundColor
:
R
.
colors
.
white
,
borderRadius
:
HEIGHTXD
(
30
),
borderRadius
:
HEIGHTXD
(
30
),
marginVertical
:
HEIGHTXD
(
15
)
marginVertical
:
HEIGHTXD
(
15
)
,
},
},
wrapLeft
:
{
wrapLeft
:
{
...
@@ -87,7 +98,7 @@ const styles = StyleSheet.create({
...
@@ -87,7 +98,7 @@ const styles = StyleSheet.create({
alignItems
:
'center'
,
alignItems
:
'center'
,
},
},
txtBlack
:
{
txtBlack
:
{
fontSize
:
getFontXD
(
50
),
fontSize
:
getFontXD
(
46
),
color
:
'black'
,
color
:
'black'
,
},
},
imgIcon
:
{
imgIcon
:
{
...
...
src/Screens/Transaction/PriceList/Item.js
View file @
842e47f3
...
@@ -15,27 +15,35 @@ import {
...
@@ -15,27 +15,35 @@ import {
}
from
'../../../Config/Functions'
;
}
from
'../../../Config/Functions'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
Block
from
'../../../components/Block'
;
import
Block
from
'../../../components/Block'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
Item
=
(
props
)
=>
{
const
Item
=
(
props
)
=>
{
const
{
item
,
isEndItem
}
=
props
;
const
{
item
,
isEndItem
}
=
props
;
console
.
log
(
'sss'
,
item
);
return
(
return
(
<
View
style
=
{[
styles
.
container
,
isEndItem
&&
{
marginBottom
:
HEIGHTXD
(
100
)}]}
>
<
View
style
=
{[
styles
.
container
,
isEndItem
&&
{
marginBottom
:
HEIGHTXD
(
100
)}]}
>
<
TouchableOpacity
onPress
=
{()
=>
props
.
onPress
(
item
)}
>
<
TouchableOpacity
onPress
=
{()
=>
props
.
onPress
(
item
)}
>
<
Block
flex
=
{
1
}
row
>
<
Block
flex
=
{
1
}
row
>
<
Image
source
=
{{
uri
:
item
.
image_path
}}
style
=
{
styles
.
imgIcon
}
/
>
<
Image
source
=
{{
uri
:
item
.
image_path
}}
style
=
{
styles
.
imgIcon
}
/
>
<
Block
padding
=
{[
0
,
WIDTHXD
(
40
)]}
space
=
{
'between'
}
flex
=
{
1
}
>
<
Block
padding
=
{[
0
,
WIDTHXD
(
40
)]}
space
=
{
'between'
}
flex
=
{
1
}
>
<
View
<
View
style
=
{{
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
}}
>
}}
>
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
txtBlack
,
{
flexWrap
:
'wrap'
,
flex
:
1
}]}
numberOfLines
=
{
1
}
ellipsizeMode
=
'tail'
>
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
txtBlack
,
{
flexWrap
:
'wrap'
,
flex
:
1
}]}
numberOfLines
=
{
1
}
ellipsizeMode
=
"tail"
>
{
item
.
name
}
{
item
.
name
}
<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
toPriceVnd
(
item
.
fee
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
toPriceVnd
(
item
.
fee
)}
<
/Text
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
txt
}
>
{
item
.
code
}
<
/Text
>
<
Text
style
=
{
styles
.
txt
}
>
{
I18n
.
t
(
'code'
)}:
{
item
.
code
}
<
/Text
>
<
Text
style
=
{
styles
.
txt
}
>
{
item
.
category
.
name
}
<
/Text
>
<
/Block
>
<
/Block
>
<
/Block
>
<
/Block
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
...
@@ -59,7 +67,7 @@ const styles = StyleSheet.create({
...
@@ -59,7 +67,7 @@ const styles = StyleSheet.create({
backgroundColor
:
R
.
colors
.
white
,
backgroundColor
:
R
.
colors
.
white
,
borderRadius
:
HEIGHTXD
(
30
),
borderRadius
:
HEIGHTXD
(
30
),
marginVertical
:
HEIGHTXD
(
15
),
marginVertical
:
HEIGHTXD
(
15
),
marginHorizontal
:
WIDTHXD
(
30
)
marginHorizontal
:
WIDTHXD
(
30
)
,
},
},
wrapLeft
:
{
wrapLeft
:
{
...
@@ -82,14 +90,14 @@ const styles = StyleSheet.create({
...
@@ -82,14 +90,14 @@ const styles = StyleSheet.create({
alignItems
:
'center'
,
alignItems
:
'center'
,
},
},
txtBlack
:
{
txtBlack
:
{
fontSize
:
getFontXD
(
50
),
fontSize
:
getFontXD
(
46
),
color
:
'black'
,
color
:
'black'
,
},
},
imgIcon
:
{
imgIcon
:
{
width
:
WIDTHXD
(
1
50
),
width
:
WIDTHXD
(
1
78
),
height
:
WIDTHXD
(
1
50
),
height
:
WIDTHXD
(
1
78
),
resizeMode
:
'cover'
,
resizeMode
:
'cover'
,
marginLeft
:
WIDTHXD
(
35
)
marginLeft
:
WIDTHXD
(
35
)
,
},
},
txtMoney
:
{
txtMoney
:
{
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
...
...
src/Screens/Transaction/ProductDetail/Tab/ContractDescription/ContractDescription.js
View file @
842e47f3
...
@@ -17,6 +17,7 @@ const ContractDescription = (props) => {
...
@@ -17,6 +17,7 @@ const ContractDescription = (props) => {
showLoading
();
showLoading
();
const
res
=
await
getContractDescription
(
props
.
route
.
params
.
id
);
const
res
=
await
getContractDescription
(
props
.
route
.
params
.
id
);
if
(
res
.
status
===
200
&&
res
.
data
.
code
===
200
)
{
if
(
res
.
status
===
200
&&
res
.
data
.
code
===
200
)
{
console
.
log
(
'Data'
,
res
.
data
.
data
);
setContractDescription
(
res
.
data
.
data
);
setContractDescription
(
res
.
data
.
data
);
}
else
{
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
...
...
src/Screens/Transaction/TimeTransaction/Item.js
View file @
842e47f3
import
React
from
'react'
;
import
React
from
'react'
;
import
{
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
Image
}
from
'react-native'
;
View
,
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../../Config/Functions'
;
Text
,
StyleSheet
,
TouchableOpacity
,
Image
,
}
from
'react-native'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
,
}
from
'../../../Config/Functions'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
Block
from
'../../../components/Block'
;
import
Block
from
'../../../components/Block'
;
const
Item
=
(
props
)
=>
{
const
Item
=
(
props
)
=>
{
const
{
item
,
isEndItem
}
=
props
;
const
{
item
,
isEndItem
}
=
props
;
return
(
return
(
<
View
style
=
{[
styles
.
container
,
isEndItem
&&
{
marginBottom
:
HEIGHTXD
(
100
)}]}
>
<
View
style
=
{[
styles
.
container
,
isEndItem
&&
{
marginBottom
:
HEIGHTXD
(
100
)}]}
>
<
TouchableOpacity
onPress
=
{()
=>
props
.
onPress
(
item
)}
>
<
TouchableOpacity
onPress
=
{()
=>
props
.
onPress
(
item
)}
>
<
Block
flex
=
{
1
}
row
>
<
Block
flex
=
{
1
}
row
>
<
View
style
=
{
styles
.
wrapDate
}
>
<
View
style
=
{
styles
.
wrapDate
}
>
<
Image
source
=
{{
uri
:
item
.
image_path
}}
style
=
{
styles
.
imgIcon
}
/
>
<
Image
source
=
{{
uri
:
item
.
image_path
}}
style
=
{
styles
.
imgIcon
}
/
>
<
/View
>
<
/View
>
<
Block
padding
=
{[
0
,
10
]}
space
=
{
'between'
}
flex
=
{
1
}
>
<
Block
padding
=
{[
0
,
10
]
}
flex
=
{
1
}
>
<
View
<
View
style
=
{{
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
}}
>
}}
>
<
Text
numberOfLines
=
{
2
}
style
=
{[
styles
.
txtBlack
,
{
flexWrap
:
'wrap'
,
flex
:
1
}]}
<
Text
numberOfLines
=
{
1
}
ellipsizeMode
=
'tail'
>
numberOfLines
=
{
2
}
style
=
{[
styles
.
txtBlack
,
{
flexWrap
:
'wrap'
,
flex
:
1
}]}
numberOfLines
=
{
1
}
ellipsizeMode
=
"tail"
>
{
item
.
name
}
{
item
.
name
}
<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
item
.
trans_time
}
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
item
.
trans_time
}
<
/Text
>
<
/View
>
<
/View
>
{
item
.
trans_session_list
.
map
((
sessionItem
)
=>
(
{
item
.
trans_session_list
.
map
((
sessionItem
)
=>
(
<
Text
style
=
{[
styles
.
txt
,
{
marginTop
:
HEIGHTXD
(
20
)}]}
>
{
sessionItem
}
<
/Text
>
<
Text
style
=
{[
styles
.
txt
,
{
marginTop
:
HEIGHTXD
(
20
)}]}
>
)
{
sessionItem
}
)}
<
/Text
>
))}
<
/Block
>
<
/Block
>
<
/Block
>
<
/Block
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
...
@@ -88,12 +81,12 @@ const styles = StyleSheet.create({
...
@@ -88,12 +81,12 @@ const styles = StyleSheet.create({
alignItems
:
'center'
,
alignItems
:
'center'
,
},
},
txtBlack
:
{
txtBlack
:
{
fontSize
:
getFontXD
(
50
),
fontSize
:
getFontXD
(
46
),
color
:
'black'
,
color
:
'black'
,
},
},
imgIcon
:
{
imgIcon
:
{
width
:
WIDTHXD
(
150
),
width
:
WIDTHXD
(
178
),
height
:
WIDTHXD
(
150
),
height
:
WIDTHXD
(
178
),
resizeMode
:
'cover'
,
resizeMode
:
'cover'
,
},
},
txtMoney
:
{
txtMoney
:
{
...
...
src/Screens/Transaction/Transaction.js
View file @
842e47f3
...
@@ -6,6 +6,7 @@ import Escrow from './Escrow/Escrow';
...
@@ -6,6 +6,7 @@ import Escrow from './Escrow/Escrow';
import
PriceList
from
'./PriceList/PriceList'
;
import
PriceList
from
'./PriceList/PriceList'
;
import
TimeTransaction
from
'./TimeTransaction/TimeTransaction'
;
import
TimeTransaction
from
'./TimeTransaction/TimeTransaction'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
{
connect
}
from
'react-redux'
;
import
{
createMaterialTopTabNavigator
}
from
'@react-navigation/material-top-tabs'
;
import
{
createMaterialTopTabNavigator
}
from
'@react-navigation/material-top-tabs'
;
const
Tab
=
createMaterialTopTabNavigator
();
const
Tab
=
createMaterialTopTabNavigator
();
...
@@ -29,22 +30,36 @@ const NewFeed = (props) => {
...
@@ -29,22 +30,36 @@ const NewFeed = (props) => {
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"PriceList"
name
=
"PriceList"
component
=
{
PriceList
}
component
=
{
PriceList
}
options
=
{{
tabBarLabel
:
'Bảng phí'
}}
options
=
{{
tabBarLabel
:
props
.
language
.
language
==
'vi'
?
'Bảng phí'
:
'PriceList'
,
}}
/
>
/
>
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"TimeTransaction"
name
=
"TimeTransaction"
component
=
{
TimeTransaction
}
component
=
{
TimeTransaction
}
options
=
{{
tabBarLabel
:
'Thời gian GD'
}}
options
=
{{
tabBarLabel
:
props
.
language
.
language
==
'vi'
?
'Thời gian GD'
:
'Time transace'
,
}}
/
>
/
>
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"Escrow"
name
=
"Escrow"
component
=
{
Escrow
}
component
=
{
Escrow
}
options
=
{{
tabBarLabel
:
'Ký quỹ'
}}
options
=
{{
tabBarLabel
:
props
.
language
.
language
==
'vi'
?
'Ký quỹ'
:
'Escrow'
,
}}
/
>
/
>
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"DueDate"
name
=
"DueDate"
component
=
{
DueDate
}
component
=
{
DueDate
}
options
=
{{
tabBarLabel
:
'Lịch đáo hạn'
}}
options
=
{{
tabBarLabel
:
props
.
language
.
language
==
'vi'
?
'Lịch đáo hạn'
:
'Due date'
,
}}
/
>
/
>
<
/Tab.Navigator
>
<
/Tab.Navigator
>
<
/View
>
<
/View
>
...
@@ -52,4 +67,10 @@ const NewFeed = (props) => {
...
@@ -52,4 +67,10 @@ const NewFeed = (props) => {
);
);
};
};
export
default
NewFeed
;
const
mapStateToProps
=
(
state
)
=>
{
return
{
language
:
state
.
languageReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{})(
NewFeed
);
src/Screens/VersionChecker/index.js
View file @
842e47f3
...
@@ -7,14 +7,22 @@ import {
...
@@ -7,14 +7,22 @@ import {
StyleSheet
,
StyleSheet
,
Image
,
Image
,
TouchableWithoutFeedback
,
TouchableWithoutFeedback
,
Linking
,
Platform
,
Linking
,
Platform
,
}
from
'react-native'
;
}
from
'react-native'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
{
getFontXD
,
getHeight
,
getWidth
,
HEIGHTXD
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
{
getFontXD
,
getHeight
,
getWidth
,
HEIGHTXD
,
WIDTHXD
,
}
from
'../../Config/Functions'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
DeviceInfo
from
'react-native-device-info'
;
import
DeviceInfo
from
'react-native-device-info'
;
import
{
getNewestVersionInfo
}
from
'../../apis/Functions/users'
;
import
{
getNewestVersionInfo
}
from
'../../apis/Functions/users'
;
import
InAppUpdate
from
'../../helper/InAppUpdate'
;
import
InAppUpdate
from
'../../helper/InAppUpdate'
;
import
{
connect
}
from
'react-redux'
;
const
VersionChecker
=
(
props
)
=>
{
const
VersionChecker
=
(
props
)
=>
{
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
...
@@ -31,10 +39,15 @@ const VersionChecker = (props) => {
...
@@ -31,10 +39,15 @@ const VersionChecker = (props) => {
});
});
if
((
res
.
data
.
code
=
200
&&
res
.
data
.
data
))
{
if
((
res
.
data
.
code
=
200
&&
res
.
data
.
data
))
{
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
data
.
data
[
0
].
version_name
!==
verCurrent
||
res
.
data
.
data
[
0
].
build
.
toString
()
!==
DeviceInfo
.
getBuildNumber
)
{
if
(
res
.
data
.
data
[
0
].
version_name
!==
verCurrent
||
res
.
data
.
data
[
0
].
build
.
toString
()
!==
DeviceInfo
.
getBuildNumber
)
{
setVersion
(
res
.
data
.
data
[
0
].
version_name
);
setVersion
(
res
.
data
.
data
[
0
].
version_name
);
setVisible
(
true
);
setVisible
(
true
);
setIsForceUpdate
(
res
.
data
.
data
[
0
].
is_require_update
==
0
?
false
:
true
);
setIsForceUpdate
(
res
.
data
.
data
[
0
].
is_require_update
==
0
?
false
:
true
,
);
}
}
}
}
};
};
...
@@ -44,7 +57,7 @@ const VersionChecker = (props) => {
...
@@ -44,7 +57,7 @@ const VersionChecker = (props) => {
setIsForceUpdate
(
isForceUpdate
);
setIsForceUpdate
(
isForceUpdate
);
};
};
const
_renderDivider
=
()
=>
<
View
style
=
{
styles
.
dividerStyle
}
/>
;
const
_renderDivider
=
()
=>
<
View
style
=
{
styles
.
dividerStyle
}
/>
;
const
onOutsidePressed
=
()
=>
{
const
onOutsidePressed
=
()
=>
{
setVisible
(
false
);
setVisible
(
false
);
...
@@ -53,17 +66,20 @@ const VersionChecker = (props) => {
...
@@ -53,17 +66,20 @@ const VersionChecker = (props) => {
const
onUpdatePressed
=
async
()
=>
{
const
onUpdatePressed
=
async
()
=>
{
try
{
try
{
if
(
Platform
.
OS
===
'ios'
)
{
if
(
Platform
.
OS
===
'ios'
)
{
Linking
.
openURL
(
'itms-apps://itunes.apple.com/us/app/dcv-invest/id1556621903?l=id'
);
Linking
.
openURL
(
'itms-apps://itunes.apple.com/us/app/dcv-invest/id1556621903?l=id'
,
);
}
else
{
}
else
{
// try {
// try {
// InAppUpdate.checkUpdate()
// InAppUpdate.checkUpdate()
// } catch(e) {
// } catch(e) {
// console.log(e)
// console.log(e)
// }
// }
Linking
.
openURL
(
'https://play.google.com/store/apps/details?id=com.dcv.invest'
);
Linking
.
openURL
(
}
'https://play.google.com/store/apps/details?id=com.dcv.invest'
,
}
catch
(
error
)
{
);
}
}
}
catch
(
error
)
{}
};
};
const
onRequestClose
=
()
=>
null
;
const
onRequestClose
=
()
=>
null
;
...
@@ -97,50 +113,76 @@ const VersionChecker = (props) => {
...
@@ -97,50 +113,76 @@ const VersionChecker = (props) => {
transparent
transparent
animationType
=
"fade"
animationType
=
"fade"
style
=
{{
position
:
'absolute'
}}
style
=
{{
position
:
'absolute'
}}
visible
=
{
visible
}
visible
=
{
visible
}
>
>
{
renderBackdrop
()}
{
renderBackdrop
()}
<
View
pointerEvents
=
"box-none"
style
=
{
styles
.
containerStyle
}
>
<
View
pointerEvents
=
"box-none"
style
=
{
styles
.
containerStyle
}
>
<
View
style
=
{
styles
.
imageUpgradeContainer
}
zIndex
=
{
100
}
>
<
View
style
=
{
styles
.
imageUpgradeContainer
}
zIndex
=
{
100
}
>
<
Image
<
Image
source
=
{
R
.
images
.
iconUpgrade
}
source
=
{
R
.
images
.
iconUpgrade
}
style
=
{[
styles
.
imageUpgradeStyle
,
{
tintColor
:
R
.
colors
.
main
}]}
/
>
style
=
{[
styles
.
imageUpgradeStyle
,
{
tintColor
:
R
.
colors
.
main
}]}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
contentContainerStyle
}
>
<
View
style
=
{
styles
.
contentContainerStyle
}
>
<
Text
style
=
{
styles
.
titleStyle
}
>
{
I18n
.
t
(
'Update'
)}
<
/Text
>
<
Text
style
=
{
styles
.
titleStyle
}
>
{
props
.
language
.
language
==
'vi'
?
'Cập nhật'
:
'Update'
}
<
/Text
>
<
Text
style
=
{
styles
.
versionLabelStyle
}
>
<
Text
style
=
{
styles
.
versionLabelStyle
}
>
{
I18n
.
t
(
'Version'
)}
{
I18n
.
t
(
'Version'
)}
{
': '
}
{
': '
}
{
version
}
{
version
}
<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
descStyle
}
>
{
I18n
.
t
(
'UpdateDescription'
)}
<
/Text
>
<
Text
style
=
{
styles
.
descStyle
}
>
{
' '
}
{
props
.
language
.
language
==
'vi'
?
'Đã có phiên bản DCVInvest mới. Cập nhật ngay để tiếp tục sử dụng và trải nghiệm những tính năng mới nhất của hệ thống!'
:
'A new version of DCVInvest is available. Update now to continue using and experiencing the latest system features!'
}
<
/Text
>
{
_renderDivider
()}
{
_renderDivider
()}
{
isForceUpdate
?
{
isForceUpdate
?
(
<
TouchableOpacity
onPress
=
{()
=>
onUpdatePressed
()}
style
=
{
styles
.
notNowContainerStyle
}
>
<
TouchableOpacity
<
Text
onPress
=
{()
=>
onUpdatePressed
()}
style
=
{[
styles
.
textNotNowStyle
,
{
color
:
R
.
colors
.
main
}]}
>
{
I18n
.
t
(
'Update'
)}
<
/Text
>
style
=
{
styles
.
notNowContainerStyle
}
>
<
Text
style
=
{[
styles
.
textNotNowStyle
,
{
color
:
R
.
colors
.
main
}]}
>
{
props
.
language
.
language
==
'vi'
?
'Cập nhật'
:
'Update'
}
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
:
)
:
(
<
View
style
=
{[
styles
.
notNowContainerStyle
,
{
<
View
style
=
{[
styles
.
notNowContainerStyle
,
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
marginHorizontal
:
WIDTHXD
(
100
),
marginHorizontal
:
WIDTHXD
(
100
),
}]}
>
},
<
TouchableOpacity
onPress
=
{()
=>
cancelUpdate
()}
]}
>
style
=
{[
styles
.
btnButton
,
{
paddingRight
:
WIDTHXD
(
60
)
}]}
>
<
TouchableOpacity
onPress
=
{()
=>
cancelUpdate
()}
style
=
{[
styles
.
btnButton
,
{
paddingRight
:
WIDTHXD
(
60
)}]}
>
<
Text
<
Text
style
=
{[
styles
.
textNotNowStyle
,
{
color
:
R
.
colors
.
color777
,
textAlign
:
'right'
}]}
>
{
I18n
.
t
(
'Cancel'
)}
<
/Text
>
style
=
{[
styles
.
textNotNowStyle
,
{
color
:
R
.
colors
.
color777
,
textAlign
:
'right'
},
]}
>
{
props
.
language
.
language
==
'vi'
?
'Bỏ qua'
:
'Cancel'
}
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
View
style
=
{
styles
.
dividerStyleVertical
}
><
/View
>
<
View
style
=
{
styles
.
dividerStyleVertical
}
><
/View
>
<
TouchableOpacity
onPress
=
{()
=>
onUpdatePressed
()}
<
TouchableOpacity
onPress
=
{()
=>
onUpdatePressed
()}
style
=
{[
styles
.
btnButton
,
{
paddingLeft
:
WIDTHXD
(
60
)}]}
>
style
=
{[
styles
.
btnButton
,
{
paddingLeft
:
WIDTHXD
(
60
)}]}
>
<
Text
<
Text
style
=
{[
styles
.
textNotNowStyle
,
{
color
:
R
.
colors
.
main
,
textAlign
:
'left'
}]}
>
{
I18n
.
t
(
'Update'
)}
<
/Text
>
style
=
{[
styles
.
textNotNowStyle
,
{
color
:
R
.
colors
.
main
,
textAlign
:
'left'
},
]}
>
{
I18n
.
t
(
'Update'
)}
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
}
)
}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/Modal
>
<
/Modal
>
...
@@ -245,4 +287,10 @@ const styles = StyleSheet.create({
...
@@ -245,4 +287,10 @@ const styles = StyleSheet.create({
},
},
});
});
export
default
VersionChecker
;
const
mapStateToProps
=
(
state
)
=>
{
return
{
language
:
state
.
languageReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{})(
VersionChecker
);
src/components/CountDown.js
0 → 100644
View file @
842e47f3
import
React
,
{
Component
,
useEffect
,
useState
}
from
'react'
;
import
{
View
,
Text
}
from
'react-native'
;
import
{
showAlert
,
TYPE
}
from
'./DropdownAlert'
;
import
I18n
from
'../helper/i18/i18n'
;
import
{
getFontXD
}
from
'../Config/Functions'
;
const
CountDown
=
(
props
)
=>
{
const
[
count
,
setCount
]
=
useState
(
300
);
useEffect
(()
=>
{
if
(
count
==
0
)
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Overtime'
));
},
[
count
]);
useEffect
(()
=>
{
clearTimeout
();
if
(
count
>
0
)
{
const
timer
=
setTimeout
(()
=>
{
setCount
(
count
-
1
);
},
1000
);
return
()
=>
clearTimeout
(
timer
);
}
});
const
secondToString
=
(
count
)
=>
{
const
temp
=
count
%
60
;
return
temp
<
10
?
`0
${
temp
}
`
:
temp
;
};
return
(
<
View
>
<
Text
style
=
{{
color
:
'#A2A2A2'
,
fontStyle
:
'italic'
,
fontSize
:
getFontXD
(
42
),
}}
>
0
{
parseInt
(
count
/
60
)}:{
secondToString
(
count
)}
<
/Text
>
<
/View
>
);
};
export
default
CountDown
;
src/components/Header/Drawer.js
View file @
842e47f3
...
@@ -36,6 +36,7 @@ import {
...
@@ -36,6 +36,7 @@ import {
ROSE
,
ROSE
,
HISTORY
,
HISTORY
,
CHOOSEMETHOD
,
CHOOSEMETHOD
,
WALLETWITHDRAW
,
}
from
'../../routers/ScreenNames'
;
}
from
'../../routers/ScreenNames'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
...
@@ -100,7 +101,7 @@ const menus = [
...
@@ -100,7 +101,7 @@ const menus = [
id
:
'62'
,
id
:
'62'
,
title
:
'Withdraw'
,
title
:
'Withdraw'
,
icon
:
R
.
images
.
iconWithdrawMenu
,
icon
:
R
.
images
.
iconWithdrawMenu
,
screen
:
WITHDRAW
,
screen
:
W
ALLETW
ITHDRAW
,
},
},
{
{
id
:
'63'
,
id
:
'63'
,
...
...
src/components/Header/HeaderHome.js
View file @
842e47f3
...
@@ -12,7 +12,7 @@ import {
...
@@ -12,7 +12,7 @@ import {
Alert
,
Alert
,
}
from
'react-native'
;
}
from
'react-native'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
{
getFontXD
,
HEIGHT
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
{
getFontXD
,
getWidth
,
HEIGHT
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
LinearGradient
from
'react-native-linear-gradient'
;
import
LinearGradient
from
'react-native-linear-gradient'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
HEIGHTXD
,
toPriceVnd
}
from
'../../Config/Functions'
;
import
{
HEIGHTXD
,
toPriceVnd
}
from
'../../Config/Functions'
;
...
@@ -195,14 +195,25 @@ const renderActions = (onClickDetail) => {
...
@@ -195,14 +195,25 @@ const renderActions = (onClickDetail) => {
<
AppText
i18nKey
=
{
'History'
}
style
=
{
styles
.
txt
}
/
>
<
AppText
i18nKey
=
{
'History'
}
style
=
{
styles
.
txt
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
View
<
View
style
=
{{
width
:
30
,
height
:
20
}}
>
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
}}
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
onClickDetail
()}
onPress
=
{()
=>
{
style
=
{
styles
.
containerBtn
}
>
onClickDetail
();
}}
style
=
{{
width
:
HEIGHTXD
(
160
),
height
:
HEIGHTXD
(
80
),
justifyContent
:
'center'
,
alignItems
:
'center'
,
}}
>
<
View
style
=
{
styles
.
containerBtn
}
>
<
Icon
name
=
{
'up'
}
size
=
{
18
}
color
=
{
R
.
colors
.
color777
}
/
>
<
Icon
name
=
{
'up'
}
size
=
{
18
}
color
=
{
R
.
colors
.
color777
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
@@ -280,14 +291,25 @@ const HeaderHome = (props) => {
...
@@ -280,14 +291,25 @@ const HeaderHome = (props) => {
{
detail
?
(
{
detail
?
(
renderActions
(
onClickDetail
)
renderActions
(
onClickDetail
)
)
:
(
)
:
(
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
View
<
View
style
=
{{
width
:
30
,
height
:
20
}}
>
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
}}
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{
onClickDetail
}
onPress
=
{()
=>
{
style
=
{
styles
.
containerBtn
}
>
onClickDetail
();
}}
style
=
{{
width
:
HEIGHTXD
(
160
),
height
:
HEIGHTXD
(
80
),
justifyContent
:
'center'
,
alignItems
:
'center'
,
}}
>
<
View
style
=
{
styles
.
containerBtn
}
>
<
Icon
name
=
{
'down'
}
size
=
{
18
}
color
=
{
R
.
colors
.
color777
}
/
>
<
Icon
name
=
{
'down'
}
size
=
{
18
}
color
=
{
R
.
colors
.
color777
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
)}
)}
<
/View
>
<
/View
>
...
@@ -317,22 +339,22 @@ const styles = StyleSheet.create({
...
@@ -317,22 +339,22 @@ const styles = StyleSheet.create({
borderBottomColor
:
'#EDEDF1'
,
borderBottomColor
:
'#EDEDF1'
,
},
},
containerBtn
:
{
containerBtn
:
{
position
:
'absolute'
,
width
:
HEIGHTXD
(
80
),
width
:
30
,
height
:
HEIGHTXD
(
80
),
height
:
30
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
backgroundColor
:
R
.
colors
.
white
,
backgroundColor
:
R
.
colors
.
white
,
borderRadius
:
20
,
borderRadius
:
HEIGHTXD
(
80
)
,
top
:
5
,
shadowColor
:
'#000'
,
shadowColor
:
'#000'
,
marginTop
:
15
,
shadowOffset
:
{
shadowOffset
:
{
width
:
0
,
width
:
1
,
height
:
1
,
height
:
2
,
},
},
shadowOpacity
:
0.
2
5
,
shadowOpacity
:
0.
5
5
,
shadowRadius
:
1.84
,
shadowRadius
:
1.84
,
elevation
:
1
,
elevation
:
3
,
},
},
img
:
{
img
:
{
height
:
Platform
.
OS
==
'ios'
?
HEIGHTXD
(
728
)
:
HEIGHTXD
(
808
),
height
:
Platform
.
OS
==
'ios'
?
HEIGHTXD
(
728
)
:
HEIGHTXD
(
808
),
...
@@ -343,7 +365,7 @@ const styles = StyleSheet.create({
...
@@ -343,7 +365,7 @@ const styles = StyleSheet.create({
},
},
containerTop
:
{
containerTop
:
{
backgroundColor
:
'white'
,
backgroundColor
:
'white'
,
width
:
'90%'
,
width
:
getWidth
()
-
40
,
borderRadius
:
10
,
borderRadius
:
10
,
shadowColor
:
'#000'
,
shadowColor
:
'#000'
,
shadowOffset
:
{
shadowOffset
:
{
...
...
src/components/Input/InputMoney.js
View file @
842e47f3
...
@@ -5,16 +5,27 @@ import R from '../../assets/R';
...
@@ -5,16 +5,27 @@ import R from '../../assets/R';
import
{
toPriceVnd
}
from
'../../Config/Functions'
;
import
{
toPriceVnd
}
from
'../../Config/Functions'
;
const
TextMoney
=
(
props
)
=>
{
const
TextMoney
=
(
props
)
=>
{
const
{
title
,
onChangeText
,
maxLength
,
value
,
editable
,
titleStyle
,
inputStyle
}
=
props
;
const
{
title
,
onChangeText
,
maxLength
,
value
,
editable
,
titleStyle
,
inputStyle
,
}
=
props
;
return
(
return
(
<
View
style
=
{{
marginVertical
:
5
}}
>
<
View
style
=
{{
marginVertical
:
5
}}
>
<
Text
<
Text
style
=
{[{
style
=
{[
{
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
color
:
R
.
colors
.
color777
,
marginBottom
:
5
,
marginBottom
:
5
,
},
titleStyle
&&
titleStyle
]}
>
},
titleStyle
&&
titleStyle
,
]}
>
{
title
?
title
:
''
}
{
title
?
title
:
''
}
<
/Text
>
<
/Text
>
<
TextInput
<
TextInput
...
@@ -25,7 +36,8 @@ const TextMoney = (props) => {
...
@@ -25,7 +36,8 @@ const TextMoney = (props) => {
value
=
{
toPriceVnd
(
value
)}
value
=
{
toPriceVnd
(
value
)}
keyboardType
=
{
'number-pad'
}
keyboardType
=
{
'number-pad'
}
onChangeText
=
{(
val
)
=>
onChangeText
(
val
.
split
(
','
).
join
(
''
))}
onChangeText
=
{(
val
)
=>
onChangeText
(
val
.
split
(
','
).
join
(
''
))}
style
=
{[{
style
=
{[
{
height
:
HEIGHTXD
(
109
),
height
:
HEIGHTXD
(
109
),
color
:
'black'
,
color
:
'black'
,
borderRadius
:
7
,
borderRadius
:
7
,
...
@@ -43,7 +55,9 @@ const TextMoney = (props) => {
...
@@ -43,7 +55,9 @@ const TextMoney = (props) => {
shadowOpacity
:
0.25
,
shadowOpacity
:
0.25
,
shadowRadius
:
1.84
,
shadowRadius
:
1.84
,
elevation
:
1
,
elevation
:
1
,
},
inputStyle
&&
inputStyle
]}
},
inputStyle
&&
inputStyle
,
]}
/
>
/
>
<
/View
>
<
/View
>
);
);
...
...
src/helper/FirebaseNotification.js
View file @
842e47f3
...
@@ -18,7 +18,6 @@ const FirebaseNotification = (props) => {
...
@@ -18,7 +18,6 @@ const FirebaseNotification = (props) => {
id
:
props
.
user
.
uid
,
id
:
props
.
user
.
uid
,
platform
:
Platform
.
OS
,
platform
:
Platform
.
OS
,
});
});
console
.
log
(
'res'
,
res
.
data
.
data
);
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
props
.
saveUserToRedux
(
res
.
data
.
data
);
}
}
...
...
src/helper/i18/locales/en.js
View file @
842e47f3
...
@@ -193,7 +193,7 @@ export default {
...
@@ -193,7 +193,7 @@ export default {
NothingChange
:
'Nothing change'
,
NothingChange
:
'Nothing change'
,
Tradding
:
'Tradding'
,
Tradding
:
'Tradding'
,
ContractDescription
:
'Contract description'
,
ContractDescription
:
'Contract description'
,
QualityStandard
:
'
Quality
Standard'
,
QualityStandard
:
'Standard'
,
CommodityTransactions
:
'Commodity transactions'
,
CommodityTransactions
:
'Commodity transactions'
,
CommodityCode
:
'Commodity code'
,
CommodityCode
:
'Commodity code'
,
Escrow
:
'Escrow'
,
Escrow
:
'Escrow'
,
...
@@ -238,7 +238,7 @@ export default {
...
@@ -238,7 +238,7 @@ export default {
FirstEscrowTotal
:
'First escrow total (VNĐ)'
,
FirstEscrowTotal
:
'First escrow total (VNĐ)'
,
Calculator
:
'Calculator'
,
Calculator
:
'Calculator'
,
Tool
:
'Tool'
,
Tool
:
'Tool'
,
_Sell
:
'Sell'
,
CaculatedDeposit
:
'Caculated deposit'
,
CaculatedDeposit
:
'Caculated deposit'
,
CaculatedProfitLoss
:
'Caculated profit loss'
,
CaculatedProfitLoss
:
'Caculated profit loss'
,
CaculatedStopLoss
:
'Caculated stop loss'
,
CaculatedStopLoss
:
'Caculated stop loss'
,
...
@@ -265,15 +265,17 @@ export default {
...
@@ -265,15 +265,17 @@ export default {
Sunday
:
'Sunday'
,
Sunday
:
'Sunday'
,
CalculatorProfitLoss
:
'Calculator profit and loss'
,
CalculatorProfitLoss
:
'Calculator profit and loss'
,
Buy
:
'Buy'
,
Buy
:
'Buy'
,
Sale
:
'S
ale
'
,
Sale
:
'S
ell
'
,
OpenPrice
:
'Open price'
,
OpenPrice
:
'Open price'
,
CloseStatusPrice
:
'Close stauts price'
,
CloseStatusPrice
:
'Close stauts price'
,
SlotNumber
:
'Slot number'
,
SlotNumber
:
'Slot number'
,
ProfitLoss
:
'Profit/Loss'
,
ProfitLoss
:
'Profit/Loss'
,
BUY_IN
:
'Buy in'
,
BUY_IN
:
'Buy in'
,
SELL_OUT
:
'Sell out'
,
SELL_OUT
:
'Sell out'
,
YouCanNotTransaction
:
'You can not trade the above contracts with the current available escrow'
,
YouCanNotTransaction
:
YouCanTransaction
:
'You can trade the above contracts with the current available escrow'
,
'You can not trade the above contracts with the current available escrow'
,
YouCanTransaction
:
'You can trade the above contracts with the current available escrow'
,
EnterContractInfo
:
'Enter contract information'
,
EnterContractInfo
:
'Enter contract information'
,
EnterFirstEscrow
:
'Enter first escrow'
,
EnterFirstEscrow
:
'Enter first escrow'
,
...
@@ -282,5 +284,9 @@ export default {
...
@@ -282,5 +284,9 @@ export default {
Count
:
'Count'
,
Count
:
'Count'
,
Systemmaintenance
:
'The system is maintenance'
,
Systemmaintenance
:
'The system is maintenance'
,
WaitUpdateCQG
:
'Waiting Update CQG'
,
WaitUpdateCQG
:
'Waiting Update CQG'
,
code
:
'Code'
,
AvailableMargin
:
'Available margin'
,
WarnMinReqestWithdraw
:
'The withdrawal amount must be more than 1 million dong'
,
Overtime
:
'Overtime OTP'
,
};
};
src/helper/i18/locales/vn.js
View file @
842e47f3
...
@@ -196,7 +196,7 @@ export default {
...
@@ -196,7 +196,7 @@ export default {
NothingChange
:
'Không có gì thay đổi'
,
NothingChange
:
'Không có gì thay đổi'
,
Tradding
:
'Giao dịch'
,
Tradding
:
'Giao dịch'
,
ContractDescription
:
'Đặc tả hợp đồng'
,
ContractDescription
:
'Đặc tả hợp đồng'
,
QualityStandard
:
'TIêu chuẩn
chất lượng
'
,
QualityStandard
:
'TIêu chuẩn'
,
CommodityTransactions
:
'Hàng hóa giao dịch'
,
CommodityTransactions
:
'Hàng hóa giao dịch'
,
CommodityCode
:
'Mã hàng hóa'
,
CommodityCode
:
'Mã hàng hóa'
,
Escrow
:
'Ký quỹ'
,
Escrow
:
'Ký quỹ'
,
...
@@ -267,7 +267,7 @@ export default {
...
@@ -267,7 +267,7 @@ export default {
BUY_IN
:
'Mua vào'
,
BUY_IN
:
'Mua vào'
,
SELL_OUT
:
'Bán ra'
,
SELL_OUT
:
'Bán ra'
,
EscrowCalculator
:
'Tính ký quỹ'
,
EscrowCalculator
:
'Tính ký quỹ'
,
FirstEscrowTotal
:
'
Ký quỹ khả dụng
'
,
FirstEscrowTotal
:
'
Tổng ký quỹ ban đầu (VNĐ)
'
,
YouCanNotTransaction
:
YouCanNotTransaction
:
'Bạn không thể giao dịch các hợp đồng kể trên với mức ký quỹ khả dụng hiện tại'
,
'Bạn không thể giao dịch các hợp đồng kể trên với mức ký quỹ khả dụng hiện tại'
,
YouCanTransaction
:
YouCanTransaction
:
...
@@ -280,4 +280,13 @@ export default {
...
@@ -280,4 +280,13 @@ export default {
Count
:
'Số lượng'
,
Count
:
'Số lượng'
,
Systemmaintenance
:
'Hệ thống đang bảo trì'
,
Systemmaintenance
:
'Hệ thống đang bảo trì'
,
WaitUpdateCQG
:
'Chờ cập nhật CQG'
,
WaitUpdateCQG
:
'Chờ cập nhật CQG'
,
FirstPriceRange
:
'Giới hạn giá ban đầu'
,
ExpandPriceRange
:
'Giới hạn giá mở rộng'
,
code
:
'Mã'
,
AvailableMargin
:
'Ký quỹ khả dụng (VNĐ) '
,
Calculator
:
'Tính'
,
_Sell
:
'Bán'
,
FirstEscrow
:
'Ký quỹ ban đầu (VNĐ) '
,
WarnMinReqestWithdraw
:
'Số tiền rút phải lớn hơn 1 triệu đồng'
,
Overtime
:
'Mã OTP hết hạn sử dụng'
,
};
};
src/routers/PlussModal.js
View file @
842e47f3
...
@@ -10,7 +10,7 @@ import {
...
@@ -10,7 +10,7 @@ import {
}
from
'react-native'
;
}
from
'react-native'
;
import
Icon
from
'react-native-vector-icons/Entypo'
;
import
Icon
from
'react-native-vector-icons/Entypo'
;
import
R
from
'../assets/R'
;
import
R
from
'../assets/R'
;
import
{
HEIGHTXD
,
WIDTHXD
,
getFontXD
}
from
'../Config/Functions'
;
import
{
HEIGHTXD
,
WIDTHXD
,
getFontXD
,
WIDTHXDICON
}
from
'../Config/Functions'
;
import
Modal
from
'react-native-modal'
;
import
Modal
from
'react-native-modal'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
...
@@ -37,7 +37,7 @@ const PlussModal = (props) => {
...
@@ -37,7 +37,7 @@ const PlussModal = (props) => {
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
wraper
}
>
<
View
style
=
{
styles
.
wraper
}
>
<
TouchableOpacity
onPress
=
{
toggleModal
}
style
=
{
styles
.
btn
}
>
<
TouchableOpacity
onPress
=
{
toggleModal
}
style
=
{
styles
.
btn
}
>
<
Icon
name
=
{
'plus'
}
size
=
{
27
}
color
=
{
R
.
colors
.
white
}
/
>
<
Icon
name
=
{
'plus'
}
size
=
{
HEIGHTXD
(
60
)
}
color
=
{
R
.
colors
.
white
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
...
@@ -95,8 +95,8 @@ export default PlussModal;
...
@@ -95,8 +95,8 @@ export default PlussModal;
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
btn
:
{
btn
:
{
backgroundColor
:
R
.
colors
.
main
,
backgroundColor
:
R
.
colors
.
main
,
width
:
WIDTHXD
(
144
),
width
:
WIDTHXD
ICON
(
135
),
height
:
WIDTHXD
(
144
),
height
:
WIDTHXD
ICON
(
135
),
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
shadowColor
:
'#000'
,
shadowColor
:
'#000'
,
...
@@ -107,21 +107,21 @@ const styles = StyleSheet.create({
...
@@ -107,21 +107,21 @@ const styles = StyleSheet.create({
shadowOpacity
:
0.25
,
shadowOpacity
:
0.25
,
shadowRadius
:
3.84
,
shadowRadius
:
3.84
,
elevation
:
3
,
elevation
:
3
,
borderRadius
:
30
,
borderRadius
:
WIDTHXDICON
(
144
)
,
},
},
container
:
{
container
:
{
flex
:
1
,
flex
:
1
,
},
},
wraper
:
{
wraper
:
{
backgroundColor
:
R
.
colors
.
white
,
backgroundColor
:
R
.
colors
.
white
,
width
:
WIDTHXD
(
160
),
width
:
WIDTHXD
ICON
(
144
),
height
:
WIDTHXD
(
160
),
height
:
WIDTHXD
ICON
(
144
),
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
position
:
'absolute'
,
position
:
'absolute'
,
top
:
-
20
,
top
:
-
HEIGHTXD
(
45
)
,
left
:
15
,
left
:
15
,
borderRadius
:
WIDTHXD
(
90
),
borderRadius
:
WIDTHXD
ICON
(
90
),
},
},
footer
:
{
footer
:
{
backgroundColor
:
'white'
,
backgroundColor
:
'white'
,
...
...
src/routers/TabNavigation.js
View file @
842e47f3
...
@@ -23,6 +23,7 @@ import {changeLanguage} from '../actions/language';
...
@@ -23,6 +23,7 @@ import {changeLanguage} from '../actions/language';
import
KEY
from
'../assets/AsynStorage'
;
import
KEY
from
'../assets/AsynStorage'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
{
DETAILNEW
}
from
'../routers/ScreenNames'
;
import
{
DETAILNEW
}
from
'../routers/ScreenNames'
;
import
{
getHeight
,
getWidth
}
from
'../Config/Functions'
;
const
Tab
=
createBottomTabNavigator
();
const
Tab
=
createBottomTabNavigator
();
...
@@ -31,6 +32,7 @@ const PayScreenComponent = () => {
...
@@ -31,6 +32,7 @@ const PayScreenComponent = () => {
};
};
const
TabNavigator
=
(
props
)
=>
{
const
TabNavigator
=
(
props
)
=>
{
console
.
log
(
getHeight
(),
getWidth
());
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
useEffect
(()
=>
{
useEffect
(()
=>
{
setInitLanguage
();
setInitLanguage
();
...
@@ -111,7 +113,8 @@ const TabNavigator = (props) => {
...
@@ -111,7 +113,8 @@ const TabNavigator = (props) => {
name
=
"Screen2"
name
=
"Screen2"
component
=
{
Transaction
}
component
=
{
Transaction
}
options
=
{{
options
=
{{
tabBarLabel
:
I18n
.
t
(
'Tradding'
),
tabBarLabel
:
props
.
language
.
language
==
'vi'
?
'Giao dịch'
:
'Tradding'
,
tabBarIcon
:
({
color
,
size
})
=>
(
tabBarIcon
:
({
color
,
size
})
=>
(
<
Image
<
Image
source
=
{
R
.
images
.
iconTransaction2
}
source
=
{
R
.
images
.
iconTransaction2
}
...
@@ -133,7 +136,8 @@ const TabNavigator = (props) => {
...
@@ -133,7 +136,8 @@ const TabNavigator = (props) => {
name
=
"Screen3"
name
=
"Screen3"
component
=
{
Notification
}
component
=
{
Notification
}
options
=
{{
options
=
{{
tabBarLabel
:
I18n
.
t
(
'Notification'
),
tabBarLabel
:
props
.
language
.
language
==
'vi'
?
'Thông báo'
:
'Notification'
,
tabBarIcon
:
({
color
,
size
})
=>
(
tabBarIcon
:
({
color
,
size
})
=>
(
<
Ionicons
<
Ionicons
name
=
"ios-notifications-outline"
name
=
"ios-notifications-outline"
...
@@ -147,7 +151,7 @@ const TabNavigator = (props) => {
...
@@ -147,7 +151,7 @@ const TabNavigator = (props) => {
name
=
"Screen4"
name
=
"Screen4"
component
=
{
NewFeed
}
component
=
{
NewFeed
}
options
=
{{
options
=
{{
tabBarLabel
:
I18n
.
t
(
'News'
)
,
tabBarLabel
:
props
.
language
.
language
==
'vi'
?
'Tin tức'
:
'News'
,
tabBarIcon
:
({
color
,
size
})
=>
(
tabBarIcon
:
({
color
,
size
})
=>
(
<
Ionicons
name
=
"newspaper-outline"
size
=
{
size
}
color
=
{
color
}
/
>
<
Ionicons
name
=
"newspaper-outline"
size
=
{
size
}
color
=
{
color
}
/
>
),
),
...
@@ -163,6 +167,7 @@ const mapStateToProps = (state) => {
...
@@ -163,6 +167,7 @@ const mapStateToProps = (state) => {
user
:
state
.
userReducer
,
user
:
state
.
userReducer
,
notifi
:
state
.
CountNotificationReducer
,
notifi
:
state
.
CountNotificationReducer
,
screenInit
:
state
.
ScreenInitReducer
,
screenInit
:
state
.
ScreenInitReducer
,
language
:
state
.
languageReducer
,
};
};
};
};
...
...
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