Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Dida Adams Arizona
Tia-dev
Commits
c09af89e
Commit
c09af89e
authored
Dec 01, 2022
by
qorri_di
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ENV-DEPLOYMENT' into 'ENV-PROD'
merger from Env deployment See merge request
!1630
parents
60f43ba6
35be4ba8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
167 additions
and
142 deletions
+167
-142
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+22
-16
CorporateAnnualTargetRO.js
src/container/RollingOutlook/CorporateAnnualTargetRO.js
+12
-12
ProfitLossRO.js
src/container/RollingOutlook/ProfitLossRO.js
+127
-113
Utils.js
src/library/Utils.js
+6
-1
No files found.
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
c09af89e
...
...
@@ -133,25 +133,29 @@ export default class CorporateAnnualTargetMR extends Component {
}
getParameterGroup
()
{
this
.
setState
({
loading
:
true
},
()
=>
{
api
.
create
().
getParameterByGroupName
({
"group_name"
:
'ACHIEVEMENT_KPI'
}).
then
((
response
)
=>
{
console
.
log
(
response
.
data
)
if
(
response
.
data
)
{
this
.
setState
({
parameterScore
:
response
.
data
.
data
})
this
.
setState
({
parameterScore
:
response
.
data
.
data
,
loading
:
false
})
}
})
})
}
getParameterGroupPerfom
()
{
this
.
setState
({
loading
:
true
},
()
=>
{
api
.
create
().
getParameterByGroupName
({
"group_name"
:
"PERFORMANCE_KPI"
}).
then
((
response
)
=>
{
console
.
log
(
response
.
data
)
if
(
response
.
data
)
{
this
.
setState
({
parameterPerfom
:
response
.
data
.
data
})
this
.
setState
({
parameterPerfom
:
response
.
data
.
data
,
loading
:
false
})
}
})
})
}
getLatestUpdate
()
{
...
...
@@ -582,7 +586,9 @@ export default class CorporateAnnualTargetMR extends Component {
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
};
// setTimeout(() => {
this
.
setState
({
maxAchList
:
defaultProps
})
this
.
setState
({
maxAchList
:
defaultProps
},
()
=>
{
this
.
getItemHierarki
()
})
// }, 300);
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
...
@@ -601,7 +607,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
this
.
getItemHierarki
()
})
}
...
...
src/container/RollingOutlook/CorporateAnnualTargetRO.js
View file @
c09af89e
...
...
@@ -826,14 +826,14 @@ export default class CorporateAnnualTargetRO extends Component {
}
else
{
let
convertID
=
-
1
if
(
tableMeta
.
rowData
[
1
1
].
value
==
'FORMULA'
)
{
if
(
tableMeta
.
rowData
[
1
0
].
value
==
'FORMULA'
)
{
let
indexIDReport
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
item
)
convertID
=
dataTable2
[
indexIDReport
][
31
]
convertID
=
dataTable2
[
indexIDReport
][
26
]
}
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
31
]
==
(
convertID
==
-
1
?
item
:
convertID
))
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
26
]
==
(
convertID
==
-
1
?
item
:
convertID
))
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
==
undefined
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
]
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
if
(
item
==
dataTable2
[
tableMeta
.
rowIndex
][
31
])
{
if
(
item
==
dataTable2
[
tableMeta
.
rowIndex
][
26
])
{
anjay
.
push
(
0
)
}
else
{
anjay
.
push
(
valuezz
==
""
?
"0"
:
valuezz
)
...
...
@@ -1445,7 +1445,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q2"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
...
@@ -1545,7 +1545,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q2"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
...
@@ -1645,7 +1645,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q2"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
...
@@ -1745,7 +1745,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
...
@@ -1845,7 +1845,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
...
@@ -1945,7 +1945,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
...
src/container/RollingOutlook/ProfitLossRO.js
View file @
c09af89e
...
...
@@ -11,6 +11,7 @@ import { ExcelRenderer } from 'react-excel-renderer';
import
Constant
from
'../../library/Constant'
;
import
UploadFile
from
"../../library/Upload"
;
import
{
Alert
}
from
'@material-ui/lab'
;
import
{
fixNumber
,
roundMath
}
from
"../../library/Utils"
;
const
LightTooltip
=
withStyles
((
theme
)
=>
({
tooltip
:
{
...
...
@@ -94,7 +95,7 @@ export default class ProfitLossROO extends Component {
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
// this.getSettingControl()
this
.
handleViewOnly
()
//
this.handleViewOnly()
}
handleViewOnly
()
{
...
...
@@ -135,6 +136,7 @@ export default class ProfitLossROO extends Component {
// this.getLatestUpdate()
// this.getSettingControl()
this
.
getItemHierarki
()
})
}
...
...
@@ -216,9 +218,9 @@ export default class ProfitLossROO extends Component {
"revision"
:
Number
(
this
.
props
.
revision
),
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
}
console
.
log
(
payload
);
console
.
log
(
"getItemHierarki payload"
,
payload
);
api
.
create
().
getRollingOutlookPL
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
"getItemHierarki getRollingOutlookPL"
,
response
);
let
dataTable
=
[]
let
err
=
false
...
...
@@ -313,7 +315,7 @@ export default class ProfitLossROO extends Component {
}
else
{
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
saveDraft
:
true
,
refresh
:
false
})
}
console
.
log
(
dataTable
);
console
.
log
(
"getItemHierarki dataTable"
,
dataTable
);
})
}
...
...
@@ -390,10 +392,10 @@ export default class ProfitLossROO extends Component {
"status"
:
type
,
"profit_loss"
:
data
}
console
.
log
(
payload
);
console
.
log
(
"backToRollingOutlook payload"
,
payload
);
// console.log(JSON.stringify(payload));
api
.
create
(
'UPLOAD'
).
createRollingOutlookPL
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
"backToRollingOutlook createRollingOutlookPL"
,
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
type
==
'submitted'
)
{
...
...
@@ -440,21 +442,22 @@ export default class ProfitLossROO extends Component {
"item_report_id"
:
i
[
1
]
===
undefined
?
0
:
i
[
1
],
"item_report"
:
i
[
2
]
===
undefined
?
""
:
String
(
i
[
2
]).
trim
(),
"notes"
:
i
[
3
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
""
:
String
(
i
[
3
]).
trim
(),
"january"
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
"0"
:
String
(
i
[
5
]
).
trim
(),
"february"
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]
).
trim
(),
"march"
:
i
[
7
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
7
]))
===
false
?
"0"
:
String
(
i
[
7
]
).
trim
(),
"april"
:
i
[
8
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
8
]))
===
false
?
"0"
:
String
(
i
[
8
]
).
trim
(),
"may"
:
i
[
9
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
9
]))
===
false
?
"0"
:
String
(
i
[
9
]
).
trim
(),
"june"
:
i
[
10
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
10
]))
===
false
?
"0"
:
String
(
i
[
10
]
).
trim
(),
"july"
:
i
[
11
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
11
]))
===
false
?
"0"
:
String
(
i
[
11
]
).
trim
(),
"august"
:
i
[
12
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
12
]))
===
false
?
"0"
:
String
(
i
[
12
]
).
trim
(),
"september"
:
i
[
13
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
13
]))
===
false
?
"0"
:
String
(
i
[
13
]
).
trim
(),
"october"
:
i
[
14
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
14
]))
===
false
?
"0"
:
String
(
i
[
14
]
).
trim
(),
"november"
:
i
[
15
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
15
]))
===
false
?
"0"
:
String
(
i
[
15
]
).
trim
(),
"december"
:
i
[
16
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
16
]))
===
false
?
"0"
:
String
(
i
[
16
]
).
trim
(),
"january"
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
5
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
5
]),
1
)
).
trim
(),
"february"
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
6
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
6
]),
1
)
).
trim
(),
"march"
:
i
[
7
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
7
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
7
]),
1
)
).
trim
(),
"april"
:
i
[
8
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
8
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
8
]),
1
)
).
trim
(),
"may"
:
i
[
9
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
9
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
9
]),
1
)
).
trim
(),
"june"
:
i
[
10
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
10
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
10
]),
1
)
).
trim
(),
"july"
:
i
[
11
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
11
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
11
]),
1
)
).
trim
(),
"august"
:
i
[
12
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
12
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
12
]),
1
)
).
trim
(),
"september"
:
i
[
13
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
13
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
13
]),
1
)
).
trim
(),
"october"
:
i
[
14
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
14
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
14
]),
1
)
).
trim
(),
"november"
:
i
[
15
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
15
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
15
]),
1
)
).
trim
(),
"december"
:
i
[
16
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
fixNumber
(
Number
(
i
[
16
]),
1
)))
===
false
?
"0"
:
String
(
fixNumber
(
Number
(
i
[
16
]),
1
)
).
trim
(),
})
}
})
console
.
log
(
"fileHandler payload"
,
payload
)
let
body
=
{
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
...
...
@@ -464,7 +467,7 @@ export default class ProfitLossROO extends Component {
status
:
'submitted'
,
profit_loss
:
payload
}
console
.
log
(
body
)
console
.
log
(
"fileHandler body"
,
body
)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
0
][
0
]
})
}
});
...
...
@@ -473,7 +476,7 @@ export default class ProfitLossROO extends Component {
checkUpload
()
{
api
.
create
().
checkImportRollingOutlookPL
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
console
.
log
(
"checkUpload Response"
,
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
visibleUpload
:
false
,
visiblePLRO
:
false
,
loading
:
true
})
...
...
@@ -513,7 +516,7 @@ export default class ProfitLossROO extends Component {
})
// console.log(this.state.buttonError)
})
console
.
log
(
dataTable
);
console
.
log
(
"checkUpload DataTable"
,
dataTable
);
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
...
...
@@ -551,6 +554,7 @@ export default class ProfitLossROO extends Component {
"current_year_total"
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
)),
})
})
console
.
log
(
"uploadProfitLossRO Data"
,
data
)
let
body
=
{
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"company_id"
:
this
.
props
.
company
.
company_id
,
...
...
@@ -561,9 +565,9 @@ export default class ProfitLossROO extends Component {
"status"
:
type
,
"profit_loss"
:
data
}
console
.
log
(
data
);
console
.
log
(
"uploadProfitLossRO Body"
,
body
);
api
.
create
(
'UPLOAD'
).
importRollingOutlookPL
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
"uploadProfitLossRO importRollingOutlookPL"
,
response
);
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -677,6 +681,7 @@ export default class ProfitLossROO extends Component {
console
.
log
(
dataTable2
);
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
console
.
log
(
"handleChange "
,
val
)
}
const
handleValue
=
(
value
,
data
)
=>
{
...
...
@@ -758,7 +763,7 @@ export default class ProfitLossROO extends Component {
}
else
if
(
opt
==
"kurang"
)
{
total
=
Number
(
total
)
-
Number
(
item
)
}
else
if
(
opt
==
"kali"
)
{
total
=
Number
(
total
)
*
Number
(
item
)
total
=
fixNumber
(
Number
(
total
),
1
)
*
fixNumber
(
Number
(
item
),
1
)
// angka yg diupload menjadi bilangan bulat
}
else
if
(
opt
==
"bagi"
)
{
total
=
R
.
equals
((
Number
(
total
)
/
Number
(
item
)),
NaN
)
?
'0'
:
(
R
.
equals
((
Number
(
total
)
/
Number
(
item
)),
Infinity
)
?
'0'
:
(
Number
(
total
)
/
Number
(
item
)
==
"-Infinity"
)
?
"0.0"
:
Number
(
total
)
/
Number
(
item
))
}
else
{
...
...
@@ -772,10 +777,14 @@ export default class ProfitLossROO extends Component {
// console.log(arrayJumlah);
// }
// if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] === "" || dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] === undefined || dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] === null) {
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
total
).
toFixed
(
1
)
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(total).toFixed(1)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
fixNumber
(
Number
(
total
),
1
)
//hasil dari penjumlahan/kali/pembagian menjadi bilangan bulat
// }
return
Number
(
total
)
}
const
handleTotal
=
(
val
,
tableMeta
)
=>
{
...
...
@@ -1721,7 +1730,8 @@ export default class ProfitLossROO extends Component {
)
}
}
},
{
},
{
name
:
this
.
props
.
quarter
==
'q3'
?
`Aug
${
this
.
props
.
periode
}
Actual`
:
`Aug
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
...
...
@@ -1819,8 +1829,8 @@ export default class ProfitLossROO extends Component {
)
}
}
},
{
name
:
this
.
props
.
quarter
==
'q3'
?
`Sep
${
this
.
props
.
periode
}
Actual`
:
`Sep
${
this
.
props
.
periode
}
`
,
},
{
name
:
this
.
props
.
quarter
==
'q3'
?
`Sep
${
this
.
props
.
periode
}
Actual`
:
`Sep
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
...
...
@@ -1917,8 +1927,9 @@ export default class ProfitLossROO extends Component {
)
}
}
},
{
name
:
`Oct
${
this
.
props
.
periode
}
`
,
},
{
name
:
`Oct
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
...
...
@@ -2015,8 +2026,9 @@ export default class ProfitLossROO extends Component {
)
}
}
},
{
name
:
`Nov
${
this
.
props
.
periode
}
`
,
},
{
name
:
`Nov
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
...
...
@@ -2510,7 +2522,8 @@ export default class ProfitLossROO extends Component {
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete3
<
/Typography
>
{
/*save & complete ini muncul setelah pencet tombol edit, kemudian setelah upload suatu file*/
}
<
/div
>
<
/button>
}
<
/div
>
...
...
@@ -2630,6 +2643,7 @@ export default class ProfitLossROO extends Component {
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
{
/*save & complete ini muncul setelah pencet tombol edit, kemudian setelah upload suatu file*/
}
<
/div
>
<
/button
>
<
/div
>
...
...
src/library/Utils.js
View file @
c09af89e
...
...
@@ -11,3 +11,8 @@ export function roundMath(number, decimalPlaces) {
const
factorOfTen
=
Math
.
pow
(
10
,
decimalPlaces
)
return
Math
.
round
(
number
*
factorOfTen
)
/
factorOfTen
}
export
function
fixNumber
(
num
,
decimalCount
=
2
)
{
const
output
=
Math
.
round
((
num
+
Number
.
EPSILON
)
*
(
Math
.
pow
(
10
,
decimalCount
)))
/
(
Math
.
pow
(
10
,
decimalCount
))
return
output
}
\ No newline at end of file
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