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
27b3f058
Commit
27b3f058
authored
May 14, 2021
by
Nguyễn Thị Thúy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update calculator profit loss
parent
05ff171a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
CalculatorProfitLoss.js
...Screens/Tool/CalculatorProfitLoss/CalculatorProfitLoss.js
+2
-2
ItemCalculator.js
src/Screens/Tool/CalculatorProfitLoss/ItemCalculator.js
+2
-1
TextField.js
src/components/TextField.js
+2
-2
No files found.
src/Screens/Tool/CalculatorProfitLoss/CalculatorProfitLoss.js
View file @
27b3f058
...
...
@@ -53,8 +53,8 @@ const CalculatorProfitLoss = (props) => {
if
(
index
===
true
)
{
let
newData
=
[...
dataCalculator
]
newData
.
push
({
name
:
'Bạc'
,
status
:
'Mua'
,
name
:
product
.
name
,
status
:
RadioBuySale
[
transactionType
].
label
,
slot_number
:
6
,
profit_loss_usd
:
639324325
,
profit_loss_vnd
:
1234349235455
,
...
...
src/Screens/Tool/CalculatorProfitLoss/ItemCalculator.js
View file @
27b3f058
...
...
@@ -12,6 +12,7 @@ import Ionicons from 'react-native-vector-icons/Ionicons';
import
{
getFontXD
,
getLineHeightXD
,
HEIGHTXD
,
toPriceVnd
,
WIDTHXD
}
from
'../../../Config/Functions'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
TextField
from
'../../../components/TextField'
;
import
{
RadioBuySale
}
from
'../../../Config/constants'
;
const
ItemCalculator
=
(
props
)
=>
{
const
[
expanded
,
setExpanded
]
=
useState
(
true
);
...
...
@@ -59,7 +60,7 @@ const ItemCalculator = (props) => {
<
TextField
title
=
{
I18n
.
t
(
'Status'
)}
content
=
{
props
.
item
.
status
}
styleContent
=
{{
color
:
R
.
colors
.
green
}
}
color
=
{
props
.
item
.
status
==
RadioBuySale
[
0
].
label
?
R
.
colors
.
green
:
R
.
colors
.
red2
}
/
>
<
TextField
title
=
{
I18n
.
t
(
'SlotNumber'
)}
...
...
src/components/TextField.js
View file @
27b3f058
...
...
@@ -8,11 +8,11 @@ import R from '../assets/R';
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
}
from
'../Config/Functions'
;
const
TextField
=
(
props
)
=>
{
const
{
styleContent
}
=
props
const
{
color
}
=
props
return
(
<
View
style
=
{[
styles
.
row
,
{
paddingVertical
:
WIDTHXD
(
15
)
}]}
>
<
Text
style
=
{
styles
.
title
}
>
{
props
.
title
}
<
/Text
>
<
Text
style
=
{[
styles
.
content
,
styleContent
&&
{
styleContent
}]}
>
{
props
.
content
}
<
/Text
>
<
Text
style
=
{[
styles
.
content
,
color
&&
{
color
}]}
>
{
props
.
content
}
<
/Text
>
<
/View
>
)
}
...
...
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