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
080112fa
Commit
080112fa
authored
May 14, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update code
parent
e87affda
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
23 deletions
+73
-23
index.js
index.js
+1
-0
Profile.js
src/Screens/AccountVerification/Tab/Profile.js
+1
-1
CaculatedStopLoss.js
src/Screens/Tool/CaculatedStopLoss.js
+47
-15
ConvertUnit.js
src/Screens/Tool/ConvertUnit.js
+23
-7
vn.js
src/helper/i18/locales/vn.js
+1
-0
No files found.
index.js
View file @
080112fa
...
@@ -6,4 +6,5 @@ import {AppRegistry} from 'react-native';
...
@@ -6,4 +6,5 @@ import {AppRegistry} from 'react-native';
import
App
from
'./App'
;
import
App
from
'./App'
;
import
{
name
as
appName
}
from
'./app.json'
;
import
{
name
as
appName
}
from
'./app.json'
;
AppRegistry
.
registerComponent
(
appName
,
()
=>
App
);
AppRegistry
.
registerComponent
(
appName
,
()
=>
App
);
src/Screens/AccountVerification/Tab/Profile.js
View file @
080112fa
...
@@ -97,7 +97,7 @@ const Profile = (props) => {
...
@@ -97,7 +97,7 @@ const Profile = (props) => {
const
res
=
await
uploadImage
(
const
res
=
await
uploadImage
(
createFormData
(
urlBack
,
{
createFormData
(
urlBack
,
{
scope
:
'VERIFY_USER'
,
scope
:
'VERIFY_USER'
,
field_name
:
'identity_
before
'
,
field_name
:
'identity_
after
'
,
platform
:
Platform
.
OS
,
platform
:
Platform
.
OS
,
}),
}),
);
);
...
...
src/Screens/Tool/CaculatedStopLoss.js
View file @
080112fa
...
@@ -25,8 +25,8 @@ import RadioForm, {
...
@@ -25,8 +25,8 @@ import RadioForm, {
}
from
'react-native-simple-radio-button'
;
}
from
'react-native-simple-radio-button'
;
var
radio_props
=
[
var
radio_props
=
[
{
label
:
'Mua'
,
value
:
0
},
{
label
:
'Mua'
,
value
:
'BUY'
},
{
label
:
'Bán'
,
value
:
1
},
{
label
:
'Bán'
,
value
:
'SALE'
},
];
];
const
dataType
=
[
const
dataType
=
[
...
@@ -45,13 +45,18 @@ const {width} = Dimensions.get('window');
...
@@ -45,13 +45,18 @@ const {width} = Dimensions.get('window');
const
CaculatedStopLoss
=
(
props
)
=>
{
const
CaculatedStopLoss
=
(
props
)
=>
{
const
[
product
,
setProduct
]
=
useState
();
const
[
product
,
setProduct
]
=
useState
();
const
[
type
,
setType
]
=
useState
(
'BUY'
);
const
[
type
,
setType
]
=
useState
(
'BUY'
);
const
[
lot
,
setLot
]
=
useState
(
'BUY'
);
const
[
lot
,
setLot
]
=
useState
(
0
);
const
[
priceOpen
,
setPriceOpen
]
=
useState
(
525
);
const
[
priceOpen
,
setPriceOpen
]
=
useState
(
0
);
const
[
fee
,
setFee
]
=
useState
(
0
);
const
[
fee
,
setFee
]
=
useState
(
0
);
const
[
surplus
,
setSurplus
]
=
useState
(
0
);
const
[
surplus
,
setSurplus
]
=
useState
(
0
);
const
[
inSession
,
setInSession
]
=
useState
(
0
);
const
[
inSession
,
setInSession
]
=
useState
(
0
);
const
[
priceClose
,
setPriceClose
]
=
useState
(
525
);
const
[
priceClose
,
setPriceClose
]
=
useState
(
0
);
const
[
priceSopLoss
,
setPriceSopLoss
]
=
useState
(
0
);
const
onClick
=
()
=>
{
console
.
log
(
'hello'
);
};
return
(
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
...
@@ -71,7 +76,6 @@ const CaculatedStopLoss = (props) => {
...
@@ -71,7 +76,6 @@ const CaculatedStopLoss = (props) => {
setProduct
(
items
);
setProduct
(
items
);
}}
}}
/
>
/
>
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'Tradding'
}
/
>
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'Tradding'
}
/
>
<
RadioForm
<
RadioForm
formHorizontal
=
{
true
}
formHorizontal
=
{
true
}
...
@@ -80,19 +84,47 @@ const CaculatedStopLoss = (props) => {
...
@@ -80,19 +84,47 @@ const CaculatedStopLoss = (props) => {
style
=
{
styles
.
row
}
style
=
{
styles
.
row
}
initial
=
{
0
}
initial
=
{
0
}
onPress
=
{(
value
)
=>
{
onPress
=
{(
value
)
=>
{
console
.
log
({
value
:
value
}
);
setType
(
value
);
}}
}}
/
>
/
>
<
TextField
title
=
{
I18n
.
t
(
'CountLotTradding'
)}
/
>
<
TextField
<
TextField
title
=
{
I18n
.
t
(
'PriceOpen'
)}
/
>
onChangeText
=
{(
val
)
=>
setLot
(
val
)}
<
TextField
title
=
{
I18n
.
t
(
'FeeTradding'
)}
/
>
isNumber
=
{
true
}
<
TextField
title
=
{
I18n
.
t
(
'SurpusInit'
)}
/
>
title
=
{
I18n
.
t
(
'CountLotTradding'
)}
<
TextField
title
=
{
I18n
.
t
(
'withdrawalsSession'
)}
/
>
/
>
<
TextField
title
=
{
I18n
.
t
(
'PriceClose'
)}
/
>
<
TextField
<
TextField
title
=
{
I18n
.
t
(
'PriceStopLoss'
)}
/
>
onChangeText
=
{(
val
)
=>
setPriceOpen
(
val
)}
isNumber
=
{
true
}
title
=
{
I18n
.
t
(
'PriceOpen'
)}
/
>
<
TextField
onChangeText
=
{(
val
)
=>
setFee
(
val
)}
isNumber
=
{
true
}
title
=
{
I18n
.
t
(
'FeeTradding'
)}
/
>
<
TextField
onChangeText
=
{(
val
)
=>
setSurplus
(
val
)}
isNumber
=
{
true
}
title
=
{
I18n
.
t
(
'SurpusInit'
)}
/
>
<
TextField
onChangeText
=
{(
val
)
=>
setInSession
(
val
)}
isNumber
=
{
true
}
title
=
{
I18n
.
t
(
'withdrawalsSession'
)}
/
>
<
TextField
onChangeText
=
{(
val
)
=>
setPriceClose
(
val
)}
isNumber
=
{
true
}
title
=
{
I18n
.
t
(
'PriceClose'
)}
/
>
<
TextField
onChangeText
=
{(
val
)
=>
setPriceSopLoss
(
val
)}
isNumber
=
{
true
}
title
=
{
I18n
.
t
(
'PriceStopLoss'
)}
/
>
<
AppText
style
=
{
styles
.
note
}
i18nKey
=
{
'noteStopLoss'
}
/
>
<
AppText
style
=
{
styles
.
note
}
i18nKey
=
{
'noteStopLoss'
}
/
>
<
View
style
=
{
styles
.
footer
}
>
<
View
style
=
{
styles
.
footer
}
>
<
TouchableOpacity
style
=
{
styles
.
btnContainer
}
>
<
TouchableOpacity
onPress
=
{
onClick
}
style
=
{
styles
.
btnContainer
}
>
<
AppText
style
=
{
styles
.
txtBtn
}
i18nKey
=
{
'Caculate'
}
/
>
<
AppText
style
=
{
styles
.
txtBtn
}
i18nKey
=
{
'Caculate'
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
...
...
src/Screens/Tool/ConvertUnit.js
View file @
080112fa
...
@@ -27,7 +27,15 @@ const dataType = [
...
@@ -27,7 +27,15 @@ const dataType = [
];
];
const
ConvertUnit
=
(
props
)
=>
{
const
ConvertUnit
=
(
props
)
=>
{
const
[
product
,
setProduct
]
=
useState
();
const
[
typeOne
,
setTypeOne
]
=
useState
();
const
[
typeTwo
,
setTypeTwo
]
=
useState
();
const
[
valueOne
,
setValueOne
]
=
useState
();
const
[
valueTwo
,
setValueTwo
]
=
useState
();
const
onClick
=
()
=>
{
console
.
log
(
'Heloo'
,
typeOne
,
typeTwo
,
valueOne
,
valueTwo
);
};
return
(
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'ConvertUnit'
}
/
>
<
HeaderBack
title
=
{
'ConvertUnit'
}
/
>
...
@@ -39,10 +47,14 @@ const ConvertUnit = (props) => {
...
@@ -39,10 +47,14 @@ const ConvertUnit = (props) => {
width
=
{
WIDTHXD
(
431
)}
width
=
{
WIDTHXD
(
431
)}
data
=
{
dataType
}
data
=
{
dataType
}
onValueChange
=
{(
value
,
items
)
=>
{
onValueChange
=
{(
value
,
items
)
=>
{
set
Product
(
items
);
set
TypeOne
(
items
);
}}
}}
/
>
/
>
<
TextInput
keyboardType
=
{
'number-pad'
}
style
=
{
styles
.
wrapInput
}
/
>
<
TextInput
onChangeText
=
{(
val
)
=>
setValueOne
(
val
)}
keyboardType
=
{
'number-pad'
}
style
=
{
styles
.
wrapInput
}
/
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
txtNote
}
>
1
KG
=
2
Pount
<
/Text
>
<
Text
style
=
{
styles
.
txtNote
}
>
1
KG
=
2
Pount
<
/Text
>
<
/View
>
<
/View
>
...
@@ -53,16 +65,20 @@ const ConvertUnit = (props) => {
...
@@ -53,16 +65,20 @@ const ConvertUnit = (props) => {
width
=
{
WIDTHXD
(
431
)}
width
=
{
WIDTHXD
(
431
)}
data
=
{
dataType
}
data
=
{
dataType
}
onValueChange
=
{(
value
,
items
)
=>
{
onValueChange
=
{(
value
,
items
)
=>
{
set
Product
(
items
);
set
TypeTwo
(
items
);
}}
}}
/
>
/
>
<
TextInput
keyboardType
=
{
'number-pad'
}
style
=
{
styles
.
wrapInput
}
/
>
<
TextInput
onChangeText
=
{(
val
)
=>
setValueTwo
(
val
)}
keyboardType
=
{
'number-pad'
}
style
=
{
styles
.
wrapInput
}
/
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
txtNote
}
>
1
Pount
=
0.5
KG
<
/Text
>
<
Text
style
=
{
styles
.
txtNote
}
>
1
Pount
=
0.5
KG
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
footer
}
>
<
View
style
=
{
styles
.
footer
}
>
<
TouchableOpacity
style
=
{
styles
.
btnContainer
}
>
<
TouchableOpacity
onPress
=
{
onClick
}
style
=
{
styles
.
btnContainer
}
>
<
AppText
style
=
{
styles
.
txtBtn
}
i18nKey
=
{
'Caculate'
}
/
>
<
AppText
style
=
{
styles
.
txtBtn
}
i18nKey
=
{
'Caculate'
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
...
@@ -75,7 +91,7 @@ const styles = StyleSheet.create({
...
@@ -75,7 +91,7 @@ const styles = StyleSheet.create({
txtTitle
:
{
txtTitle
:
{
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
color
:
R
.
colors
.
color777
,
margin
Top
:
15
,
margin
Bottom
:
15
,
},
},
note
:
{
note
:
{
fontSize
:
getFontXD
(
36
),
fontSize
:
getFontXD
(
36
),
...
...
src/helper/i18/locales/vn.js
View file @
080112fa
...
@@ -257,4 +257,5 @@ export default {
...
@@ -257,4 +257,5 @@ export default {
ConvertUSD
:
'Quy đổi USD/Tấn'
,
ConvertUSD
:
'Quy đổi USD/Tấn'
,
Saturday
:
'Thứ 7'
,
Saturday
:
'Thứ 7'
,
Sunday
:
'Chủ nhật'
,
Sunday
:
'Chủ nhật'
,
};
};
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