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
e4406dde
Commit
e4406dde
authored
May 19, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linking web phone
parent
1a31e058
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
178 additions
and
31 deletions
+178
-31
Info.plist
ios/Invest/Info.plist
+4
-0
Functions.js
src/Config/Functions.js
+30
-2
FeePro.js
src/Screens/Account/PacrtCQG/FeePro.js
+13
-0
Footer.js
src/Screens/Account/PacrtCQG/Footer.js
+3
-3
PacketCQG.js
src/Screens/Account/PacrtCQG/PacketCQG.js
+29
-6
WrapNomarl.js
src/Screens/Account/PacrtCQG/WrapNomarl.js
+15
-0
Login.js
src/Screens/Authen/Login.js
+8
-0
Home.js
src/Screens/Home/Home.js
+2
-0
CQG.js
src/Screens/Menu/Profile/Tab/CQG.js
+25
-5
ServiceCustomerView.js
src/Screens/ServiceCustomer/ServiceCustomerView.js
+26
-4
packetCQG.js
src/apis/Functions/packetCQG.js
+10
-0
url.js
src/apis/url.js
+3
-1
Drawer.js
src/components/Header/Drawer.js
+2
-6
HeaderHome.js
src/components/Header/HeaderHome.js
+3
-3
en.js
src/helper/i18/locales/en.js
+2
-0
vn.js
src/helper/i18/locales/vn.js
+3
-1
No files found.
ios/Invest/Info.plist
View file @
e4406dde
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
dcv.investcustomer.vn
<
/string
>
<
string
>
dcv.investcustomer.vn
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
string
>
en
<
/string
>
<
k
e
y
>
CFBundleDisplayName
<
/k
e
y
>
<
k
e
y
>
CFBundleDisplayName
<
/k
e
y
>
...
@@ -42,6 +44,8 @@
...
@@ -42,6 +44,8 @@
<
k
e
y
>
LSApplicationQueriesSchemes
<
/k
e
y
>
<
k
e
y
>
LSApplicationQueriesSchemes
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
itms-apps
<
/string
>
<
string
>
itms-apps
<
/string
>
<
string
>
tel
<
/string
>
<
string
>
telprompt
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
tru
e
/
>
...
...
src/Config/Functions.js
View file @
e4406dde
...
@@ -5,15 +5,43 @@ import {
...
@@ -5,15 +5,43 @@ import {
Alert
,
Alert
,
Text
,
Text
,
PermissionsAndroid
,
PermissionsAndroid
,
Linking
,
}
from
'react-native'
;
}
from
'react-native'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
I18n
from
'../helper/i18/i18n'
;
import
I18n
from
'../helper/i18/i18n'
;
import
AppText
from
'../components/AppText'
;
import
AppText
from
'../components/AppText'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
{
DETAILNEW
,
TABNAVIGATOR
}
from
'../routers/ScreenNames'
;
import
{
DETAILNEW
,
TABNAVIGATOR
,
AUTHEN
}
from
'../routers/ScreenNames'
;
import
R
from
'../assets/R'
;
import
R
from
'../assets/R'
;
export
const
logout
=
(
navigation
)
=>
{
AsyncStorage
.
clear
();
navigation
.
reset
({
index
:
1
,
routes
:
[{
name
:
AUTHEN
}],
});
};
export
const
callNumber
=
(
phone
)
=>
{
console
.
log
(
'callNumber ----> '
,
phone
);
let
phoneNumber
=
phone
;
if
(
Platform
.
OS
!==
'android'
)
{
phoneNumber
=
`telprompt:
${
phone
}
`
;
}
else
{
phoneNumber
=
`tel:
${
phone
}
`
;
}
Linking
.
canOpenURL
(
phoneNumber
)
.
then
((
supported
)
=>
{
if
(
!
supported
)
{
Alert
.
alert
(
'Phone number is not available'
);
}
else
{
return
Linking
.
openURL
(
phoneNumber
);
}
})
.
catch
((
err
)
=>
console
.
log
(
err
));
};
export
const
convertScreen
=
(
name
)
=>
{
export
const
convertScreen
=
(
name
)
=>
{
switch
(
name
)
{
switch
(
name
)
{
case
'CUSTOMER_NEWS'
:
case
'CUSTOMER_NEWS'
:
...
...
src/Screens/Account/PacrtCQG/FeePro.js
View file @
e4406dde
...
@@ -26,6 +26,19 @@ const FeePro = (props) => {
...
@@ -26,6 +26,19 @@ const FeePro = (props) => {
setListItem
(
newList
);
setListItem
(
newList
);
},
[
props
.
data
]);
},
[
props
.
data
]);
useEffect
(()
=>
{
const
newList
=
data
.
map
((
e
)
=>
{
console
.
log
(
props
.
listRegister
);
if
(
props
.
listRegister
.
includes
(
e
.
id
))
{
return
{...
e
,
selected
:
true
};
}
else
{
return
{...
e
,
selected
:
false
};
}
});
setListItem
(
newList
);
},
[
props
.
listRegister
]);
const
onSelected
=
(
selected
)
=>
{
const
onSelected
=
(
selected
)
=>
{
if
(
selected
.
id
==
10
)
{
if
(
selected
.
id
==
10
)
{
const
newList
=
listItem
.
map
((
e
)
=>
{
const
newList
=
listItem
.
map
((
e
)
=>
{
...
...
src/Screens/Account/PacrtCQG/Footer.js
View file @
e4406dde
...
@@ -9,6 +9,9 @@ const Footer = (props) => {
...
@@ -9,6 +9,9 @@ const Footer = (props) => {
return
(
return
(
<
View
style
=
{{
flex
:
1
,
paddingHorizontal
:
10
,
marginTop
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
paddingHorizontal
:
10
,
marginTop
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
marginVertical
:
5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
marginVertical
:
5
}}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
{
I18n
.
t
(
'Provisional'
)}:{
toPriceVnd
(
props
.
price
)}
<
/Text
>
<
AppText
i18nKey
=
{
'Open_account_demo'
}
style
=
{
styles
.
txtTitle
}
/
>
<
AppText
i18nKey
=
{
'Open_account_demo'
}
style
=
{
styles
.
txtTitle
}
/
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
onPress
=
{()
=>
...
@@ -17,9 +20,6 @@ const Footer = (props) => {
...
@@ -17,9 +20,6 @@ const Footer = (props) => {
<
AppText
i18nKey
=
{
'Here'
}
style
=
{
styles
.
txtLink
}
/
>
<
AppText
i18nKey
=
{
'Here'
}
style
=
{
styles
.
txtLink
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
txtTitle
}
>
{
I18n
.
t
(
'Provisional'
)}:{
toPriceVnd
(
props
.
price
)}
<
/Text
>
<
View
<
View
style
=
{{
style
=
{{
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
...
src/Screens/Account/PacrtCQG/PacketCQG.js
View file @
e4406dde
...
@@ -8,7 +8,11 @@ import ContainerTop from './ContainerTop';
...
@@ -8,7 +8,11 @@ import ContainerTop from './ContainerTop';
import
WrapNomarl
from
'./WrapNomarl'
;
import
WrapNomarl
from
'./WrapNomarl'
;
import
Footer
from
'./Footer'
;
import
Footer
from
'./Footer'
;
import
FeePro
from
'./FeePro'
;
import
FeePro
from
'./FeePro'
;
import
{
getListPacketCQG
,
openCQG
}
from
'../../../apis/Functions/packetCQG'
;
import
{
getListPacketCQG
,
openCQG
,
updateCQG
,
}
from
'../../../apis/Functions/packetCQG'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
...
@@ -24,6 +28,8 @@ const PacketCQG = (props) => {
...
@@ -24,6 +28,8 @@ const PacketCQG = (props) => {
const
[
feePro
,
setFeePro
]
=
useState
({
data
:
[],
title
:
''
});
const
[
feePro
,
setFeePro
]
=
useState
({
data
:
[],
title
:
''
});
const
[
totalMD
,
setTotalMD
]
=
useState
(
0
);
const
[
totalMD
,
setTotalMD
]
=
useState
(
0
);
const
[
totalTB
,
setTotalTB
]
=
useState
(
0
);
const
[
totalTB
,
setTotalTB
]
=
useState
(
0
);
const
[
isUpdate
,
setIsUpdate
]
=
useState
(
false
);
const
[
listRegister
,
setListRegister
]
=
useState
([]);
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
...
@@ -50,9 +56,14 @@ const PacketCQG = (props) => {
...
@@ -50,9 +56,14 @@ const PacketCQG = (props) => {
const
onClick
=
async
()
=>
{
const
onClick
=
async
()
=>
{
const
newList
=
listData
.
map
((
e
)
=>
e
.
id
);
const
newList
=
listData
.
map
((
e
)
=>
e
.
id
);
let
res
;
props
.
showLoading
();
props
.
showLoading
();
const
res
=
await
openCQG
({
packages
:
newList
});
if
(
isUpdate
)
{
res
=
await
updateCQG
({
packages
:
newList
});
}
else
{
res
=
await
openCQG
({
packages
:
newList
});
}
props
.
hideLoading
();
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
props
.
saveUserToRedux
(
res
.
data
.
data
);
...
@@ -117,14 +128,23 @@ const PacketCQG = (props) => {
...
@@ -117,14 +128,23 @@ const PacketCQG = (props) => {
};
};
const
getData
=
async
()
=>
{
const
getData
=
async
()
=>
{
const
res
=
await
getListPacketCQG
({});
const
res
=
await
getListPacketCQG
({});
console
.
log
(
res
.
data
.
data
.
fee
.
data
);
if
((
res
.
data
.
code
=
200
&&
res
.
data
.
data
))
{
if
((
res
.
data
.
code
=
200
&&
res
.
data
.
data
))
{
setListData
(
res
.
data
.
data
.
fee
.
data
);
setFee
(
res
.
data
.
data
.
fee
);
setFee
(
res
.
data
.
data
.
fee
);
setFeeConnect
(
res
.
data
.
data
.
fee_connect
);
setFeeConnect
(
res
.
data
.
data
.
fee_connect
);
setFeeNonPro
(
res
.
data
.
data
.
fee_pro
);
setFeeNonPro
(
res
.
data
.
data
.
fee_pro
);
setFeePro
(
res
.
data
.
data
.
fee_non_pro
);
setFeePro
(
res
.
data
.
data
.
fee_non_pro
);
if
(
res
.
data
.
package_register
.
length
>
0
)
{
setListData
(
res
.
data
.
package_register
);
const
temp
=
res
.
data
.
package_register
.
filter
(
(
e
)
=>
e
.
id
!=
1
&&
e
.
id
!=
2
,
);
const
listId
=
temp
.
map
((
e
)
=>
e
.
id
);
setListRegister
(
listId
);
setIsUpdate
(
true
);
}
else
{
setListData
(
res
.
data
.
data
.
fee
.
data
);
}
}
else
{
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
}
...
@@ -142,11 +162,13 @@ const PacketCQG = (props) => {
...
@@ -142,11 +162,13 @@ const PacketCQG = (props) => {
onRemovePacket
=
{
onRemovePacket
}
onRemovePacket
=
{
onRemovePacket
}
onChoosePacket
=
{
onChoosePacket
}
onChoosePacket
=
{
onChoosePacket
}
data
=
{
feeConnect
}
data
=
{
feeConnect
}
listRegister
=
{
listRegister
}
/
>
/
>
<
WrapNomarl
<
WrapNomarl
onRemovePacket
=
{
onRemovePacket
}
onRemovePacket
=
{
onRemovePacket
}
onChoosePacket
=
{
onChoosePacket
}
onChoosePacket
=
{
onChoosePacket
}
data
=
{
feeNonPro
}
data
=
{
feeNonPro
}
listRegister
=
{
listRegister
}
/
>
/
>
<
FeePro
<
FeePro
...
@@ -157,6 +179,7 @@ const PacketCQG = (props) => {
...
@@ -157,6 +179,7 @@ const PacketCQG = (props) => {
onRemoveAllMD
=
{
onRemoveAllMD
}
onRemoveAllMD
=
{
onRemoveAllMD
}
onRemoveAllTB
=
{
onRemoveAllTB
}
onRemoveAllTB
=
{
onRemoveAllTB
}
data
=
{
feePro
}
data
=
{
feePro
}
listRegister
=
{
listRegister
}
/
>
/
>
<
Footer
onClick
=
{
onClick
}
price
=
{
price
}
/
>
<
Footer
onClick
=
{
onClick
}
price
=
{
price
}
/
>
...
...
src/Screens/Account/PacrtCQG/WrapNomarl.js
View file @
e4406dde
...
@@ -19,6 +19,21 @@ const ContainerTop = (props) => {
...
@@ -19,6 +19,21 @@ const ContainerTop = (props) => {
setListItem
(
newList
);
setListItem
(
newList
);
},
[
props
.
data
]);
},
[
props
.
data
]);
useEffect
(()
=>
{
const
newList
=
data
.
map
((
e
)
=>
{
console
.
log
(
props
.
listRegister
);
if
(
props
.
listRegister
.
includes
(
e
.
id
))
{
console
.
log
(
'Chay vao day'
,
e
.
id
);
return
{...
e
,
selected
:
true
};
}
else
{
console
.
log
(
'Chay xuong duoi'
,
e
.
id
);
return
{...
e
,
selected
:
false
};
}
});
setListItem
(
newList
);
},
[
props
.
listRegister
]);
const
onSelected
=
(
selected
)
=>
{
const
onSelected
=
(
selected
)
=>
{
const
newList
=
listItem
.
map
((
e
)
=>
{
const
newList
=
listItem
.
map
((
e
)
=>
{
if
(
e
.
id
!=
selected
.
id
)
return
e
;
if
(
e
.
id
!=
selected
.
id
)
return
e
;
...
...
src/Screens/Authen/Login.js
View file @
e4406dde
...
@@ -81,6 +81,7 @@ const Login = (props) => {
...
@@ -81,6 +81,7 @@ const Login = (props) => {
});
});
props
.
hideLoading
();
props
.
hideLoading
();
if
(
res
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
const
jsonValue
=
JSON
.
stringify
({
email
,
pass
});
const
jsonValue
=
JSON
.
stringify
({
email
,
pass
});
AsyncStorage
.
setItem
(
KEY
.
TOKEN
,
res
.
data
.
data
.
token
);
AsyncStorage
.
setItem
(
KEY
.
TOKEN
,
res
.
data
.
data
.
token
);
...
@@ -95,6 +96,13 @@ const Login = (props) => {
...
@@ -95,6 +96,13 @@ const Login = (props) => {
}
}
}
else
{
}
else
{
showAlert
(
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Systemmaintenance'
),
);
}
}
else
{
showAlert
(
TYPE
.
WARN
,
TYPE
.
WARN
,
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
...
...
src/Screens/Home/Home.js
View file @
e4406dde
...
@@ -23,6 +23,8 @@ const Home = (props) => {
...
@@ -23,6 +23,8 @@ const Home = (props) => {
const
[
isSortPercent
,
setIsSortPercent
]
=
useState
(
null
);
const
[
isSortPercent
,
setIsSortPercent
]
=
useState
(
null
);
const
[
isSortPriceOpenClose
,
setIsSortPriceOpenClose
]
=
useState
(
null
);
const
[
isSortPriceOpenClose
,
setIsSortPriceOpenClose
]
=
useState
(
null
);
const
[
isSortPriceHighLow
,
setIsSortPriceHighLow
]
=
useState
(
null
);
const
[
isSortPriceHighLow
,
setIsSortPriceHighLow
]
=
useState
(
null
);
console
.
log
(
props
.
user
);
const
SORT_TYPE
=
{
const
SORT_TYPE
=
{
DESC
:
'DESC'
,
DESC
:
'DESC'
,
ASC
:
'ASC'
,
ASC
:
'ASC'
,
...
...
src/Screens/Menu/Profile/Tab/CQG.js
View file @
e4406dde
import
React
from
'react'
;
import
React
from
'react'
;
import
{
View
,
Text
,
TouchableOpacity
,
Image
,
StyleSheet
}
from
'react-native'
;
import
{
View
,
Text
,
TouchableOpacity
,
Image
,
StyleSheet
}
from
'react-native'
;
import
R
from
'../../../../assets/R'
;
import
R
from
'../../../../assets/R'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../../../Config/Functions'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
,
logout
,
}
from
'../../../../Config/Functions'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
AppText
from
'../../../../components/AppText'
;
import
AppText
from
'../../../../components/AppText'
;
import
I18n
from
'../../../../helper/i18/i18n'
;
import
I18n
from
'../../../../helper/i18/i18n'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
PACKETCQG
}
from
'../../../../routers/ScreenNames'
;
import
{
PACKETCQG
}
from
'../../../../routers/ScreenNames'
;
import
{
closeCQG
}
from
'../../../../apis/Functions/packetCQG'
;
import
{
showLoading
,
hideLoading
}
from
'../../../../actions/loadingAction'
;
import
{
showAlert
,
TYPE
}
from
'../../../../components/DropdownAlert'
;
const
Profile
=
(
props
)
=>
{
const
Profile
=
(
props
)
=>
{
const
onClickCLose
=
()
=>
{
console
.
log
(
'Close click'
);
};
const
navigation
=
useNavigation
();
const
navigation
=
useNavigation
();
const
onClickCLose
=
async
()
=>
{
props
.
showLoading
();
const
res
=
await
closeCQG
();
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
else
if
(
res
.
data
.
code
==
401
)
{
logout
(
navigation
);
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
};
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
{
props
.
user
.
status
==
6
?
(
{
props
.
user
.
status
==
6
?
(
...
@@ -145,4 +165,4 @@ const mapStateToProps = (state) => {
...
@@ -145,4 +165,4 @@ const mapStateToProps = (state) => {
user
:
state
.
userReducer
,
user
:
state
.
userReducer
,
};
};
};
};
export
default
connect
(
mapStateToProps
,
{})(
Profile
);
export
default
connect
(
mapStateToProps
,
{
showLoading
,
hideLoading
})(
Profile
);
src/Screens/ServiceCustomer/ServiceCustomerView.js
View file @
e4406dde
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
Platform
}
from
'react-native'
;
import
{
View
,
Text
,
StyleSheet
,
Platform
,
Linking
,
TouchableOpacity
,
}
from
'react-native'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
AppText
from
'../../components/AppText'
;
import
AppText
from
'../../components/AppText'
;
import
TextMulti
from
'../../components/Input/TextMulti'
;
import
TextMulti
from
'../../components/Input/TextMulti'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
,
callNumber
}
from
'../../Config/Functions'
;
import
{
TouchableOpacity
}
from
'react-native-gesture-handler'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
{
sendRequest
}
from
'../../apis/Functions/General'
;
import
{
sendRequest
}
from
'../../apis/Functions/General'
;
...
@@ -28,6 +34,7 @@ const ServiceCustomerView = (props) => {
...
@@ -28,6 +34,7 @@ const ServiceCustomerView = (props) => {
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
}
}
};
};
console
.
log
(
props
.
user
.
company_info
);
const
{
const
{
name
,
name
,
...
@@ -39,6 +46,7 @@ const ServiceCustomerView = (props) => {
...
@@ -39,6 +46,7 @@ const ServiceCustomerView = (props) => {
office_sat_time
,
office_sat_time
,
office_sun_time
,
office_sun_time
,
address
,
address
,
hotline_call
,
}
=
props
.
user
.
company_info
;
}
=
props
.
user
.
company_info
;
return
(
return
(
...
@@ -60,13 +68,21 @@ const ServiceCustomerView = (props) => {
...
@@ -60,13 +68,21 @@ const ServiceCustomerView = (props) => {
<
Text
style
=
{
styles
.
title
}
>
Email
:
<
/Text
>
<
Text
style
=
{
styles
.
title
}
>
Email
:
<
/Text
>
<
Text
style
=
{
styles
.
txtContent
}
>
{
email
}
<
/Text
>
<
Text
style
=
{
styles
.
txtContent
}
>
{
email
}
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
onPress
=
{
async
()
=>
{
const
supported
=
await
Linking
.
canOpenURL
(
website
);
if
(
supported
)
Linking
.
openURL
(
website
);
}}
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
Text
style
=
{
styles
.
title
}
>
Website
:
<
/Text
>
<
Text
style
=
{
styles
.
title
}
>
Website
:
<
/Text
>
<
Text
style
=
{
styles
.
txtContent
}
>
{
website
}
<
/Text
>
<
Text
style
=
{
styles
.
txtLink
}
>
{
website
}
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
AppText
i18nKey
=
{
'HotLine'
}
style
=
{
styles
.
title
}
/
>
<
AppText
i18nKey
=
{
'HotLine'
}
style
=
{
styles
.
title
}
/
>
<
TouchableOpacity
onPress
=
{()
=>
callNumber
(
hotline_call
)}
>
<
Text
style
=
{
styles
.
txtContent
}
>
{
hotline
}
<
/Text
>
<
Text
style
=
{
styles
.
txtContent
}
>
{
hotline
}
<
/Text
>
<
/TouchableOpacity
>
<
AppText
i18nKey
=
{
'WorkingTime'
}
style
=
{
styles
.
title
}
/
>
<
AppText
i18nKey
=
{
'WorkingTime'
}
style
=
{
styles
.
title
}
/
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
}}
>
...
@@ -122,6 +138,12 @@ const styles = StyleSheet.create({
...
@@ -122,6 +138,12 @@ const styles = StyleSheet.create({
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
marginTop
:
5
,
marginTop
:
5
,
},
},
txtLink
:
{
fontSize
:
getFontXD
(
42
),
marginTop
:
5
,
textDecorationLine
:
'underline'
,
color
:
R
.
colors
.
main
,
},
row
:
{
row
:
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
},
},
...
...
src/apis/Functions/packetCQG.js
View file @
e4406dde
...
@@ -11,3 +11,13 @@ export const openCQG = async (body) =>
...
@@ -11,3 +11,13 @@ export const openCQG = async (body) =>
PostData
(
url
.
urlOpenCQG
,
body
)
PostData
(
url
.
urlOpenCQG
,
body
)
.
then
((
res
)
=>
res
)
.
then
((
res
)
=>
res
)
.
catch
((
err
)
=>
err
);
.
catch
((
err
)
=>
err
);
export
const
closeCQG
=
async
(
body
)
=>
PostData
(
url
.
urlCloseCQG
,
body
)
.
then
((
res
)
=>
res
)
.
catch
((
err
)
=>
err
);
export
const
updateCQG
=
async
(
body
)
=>
PostData
(
url
.
urlUpdateCQG
,
body
)
.
then
((
res
)
=>
res
)
.
catch
((
err
)
=>
err
);
src/apis/url.js
View file @
e4406dde
export
const
root
=
'http://
api
.dcvinvest.com/'
;
export
const
root
=
'http://
services
.dcvinvest.com/'
;
export
default
{
export
default
{
urllogin
:
root
+
'api/auth/customer-login'
,
urllogin
:
root
+
'api/auth/customer-login'
,
urlRegistor
:
root
+
'api/auth/customer-register'
,
urlRegistor
:
root
+
'api/auth/customer-register'
,
...
@@ -57,4 +57,6 @@ export default {
...
@@ -57,4 +57,6 @@ export default {
urlProfitLost
:
root
+
'api/v1/customers/calculate-profit'
,
urlProfitLost
:
root
+
'api/v1/customers/calculate-profit'
,
urlGetListExchangeRate
:
root
+
'api/v1/customers/get-list-exchange-rate'
,
urlGetListExchangeRate
:
root
+
'api/v1/customers/get-list-exchange-rate'
,
urlCloseCQG
:
root
+
'api/v1/customers/cancel-open-cqg'
,
urlUpdateCQG
:
root
+
'api/v1/customers/update-open-cqg'
,
};
};
src/components/Header/Drawer.js
View file @
e4406dde
...
@@ -8,7 +8,7 @@ import {
...
@@ -8,7 +8,7 @@ import {
ScrollView
,
ScrollView
,
}
from
'react-native'
;
}
from
'react-native'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
{
HEIGHTXD
,
getFontXD
,
WIDTHXD
}
from
'../../Config/Functions'
;
import
{
HEIGHTXD
,
getFontXD
,
WIDTHXD
,
logout
}
from
'../../Config/Functions'
;
import
Icon
from
'react-native-vector-icons/MaterialIcons'
;
import
Icon
from
'react-native-vector-icons/MaterialIcons'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
DeviceInfo
from
'react-native-device-info'
;
import
DeviceInfo
from
'react-native-device-info'
;
...
@@ -298,12 +298,8 @@ const Drawer = (props) => {
...
@@ -298,12 +298,8 @@ const Drawer = (props) => {
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
{
onPress
=
{()
=>
{
AsyncStorage
.
clear
(
);
logout
(
navigate
);
props
.
toggleModal
();
props
.
toggleModal
();
navigate
.
reset
({
index
:
1
,
routes
:
[{
name
:
AUTHEN
}],
});
}}
}}
style
=
{
styles
.
footer
}
>
style
=
{
styles
.
footer
}
>
<
Icon
name
=
{
'logout'
}
size
=
{
25
}
color
=
{
'#F81515'
}
/
>
<
Icon
name
=
{
'logout'
}
size
=
{
25
}
color
=
{
'#F81515'
}
/
>
...
...
src/components/Header/HeaderHome.js
View file @
e4406dde
...
@@ -61,7 +61,7 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
...
@@ -61,7 +61,7 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
);
);
if
(
status
==
6
)
if
(
status
==
6
||
status
==
7
)
return
(
return
(
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{
styles
.
containerWallet
}
>
<
View
style
=
{
styles
.
containerWallet
}
>
...
@@ -100,12 +100,12 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
...
@@ -100,12 +100,12 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
<
View
style
=
{{
width
:
1
,
backgroundColor
:
'#EDEDF1'
,
height
:
'100%'
}}
/
>
<
View
style
=
{{
width
:
1
,
backgroundColor
:
'#EDEDF1'
,
height
:
'100%'
}}
/
>
<
View
style
=
{
styles
.
containerWallet
}
>
<
View
style
=
{
styles
.
containerWallet
}
>
<
AppText
<
AppText
i18nKey
=
{
'WaitOpen
CQG'
}
i18nKey
=
{
status
==
5
?
'WaitOpenCQG'
:
'WaitUpdate
CQG'
}
style
=
{[
styles
.
txtWhite
,
{
color
:
'#FFB721'
}]}
><
/AppText
>
style
=
{[
styles
.
txtWhite
,
{
color
:
'#FFB721'
}]}
><
/AppText
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
if
(
status
==
3
)
if
(
status
==
3
||
status
==
8
)
return
(
return
(
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{
styles
.
containerWallet
}
>
<
View
style
=
{
styles
.
containerWallet
}
>
...
...
src/helper/i18/locales/en.js
View file @
e4406dde
...
@@ -277,4 +277,6 @@ export default {
...
@@ -277,4 +277,6 @@ export default {
CloseAccount
:
'Close account'
,
CloseAccount
:
'Close account'
,
UpdatePacket
:
'Update packet'
,
UpdatePacket
:
'Update packet'
,
Count
:
'Count'
,
Count
:
'Count'
,
Systemmaintenance
:
'The system is maintenance'
,
WaitUpdateCQG
:
'Waiting Update CQG'
,
};
};
src/helper/i18/locales/vn.js
View file @
e4406dde
...
@@ -102,7 +102,7 @@ export default {
...
@@ -102,7 +102,7 @@ export default {
Open_account
:
'Mở tài khoản'
,
Open_account
:
'Mở tài khoản'
,
Provisional
:
'Tạm tính'
,
Provisional
:
'Tạm tính'
,
Here
:
'Tại đây'
,
Here
:
'Tại đây'
,
Open_account_demo
:
'
B
ạn có thể mở tài khoản thử'
,
Open_account_demo
:
'
Hoặc b
ạn có thể mở tài khoản thử'
,
Features_develop
:
'Không có dữ liệu!'
,
Features_develop
:
'Không có dữ liệu!'
,
Email
:
'Email'
,
Email
:
'Email'
,
Password
:
'Mật khẩu'
,
Password
:
'Mật khẩu'
,
...
@@ -272,4 +272,6 @@ export default {
...
@@ -272,4 +272,6 @@ export default {
CloseAccount
:
'Đóng tài khoản'
,
CloseAccount
:
'Đóng tài khoản'
,
UpdatePacket
:
'Cập nhật gói cước'
,
UpdatePacket
:
'Cập nhật gói cước'
,
Count
:
'Số lượng'
,
Count
:
'Số lượng'
,
Systemmaintenance
:
'Hệ thống đang bảo trì'
,
WaitUpdateCQG
:
'Chờ cập nhật CQG'
,
};
};
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