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
71de4600
Commit
71de4600
authored
Mar 25, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into riri
parents
c816f14d
64f43b0c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
723 additions
and
359 deletions
+723
-359
BudgetTahunan.js
src/container/BudgetTahunan.js
+1
-1
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+686
-341
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+36
-17
No files found.
src/container/BudgetTahunan.js
View file @
71de4600
...
...
@@ -296,7 +296,7 @@ export default class BudgetTahunan extends Component {
item
.
revision
,
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
status_approv
,
item
.
report_id
,
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
,
item
.
report_name
===
"Cash Flow"
?
item
.
is_can_upload
:
(
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
)
,
item
.
revision
]
})
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
71de4600
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
71de4600
...
...
@@ -129,6 +129,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
&&
checkPrevRev
})
// this.setState({ viewOnly: true })
}
getParameterGroup
()
{
...
...
@@ -717,7 +718,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
else
{
// if (actual <= target) {
totalAch
=
(
actual
/
target
)
totalAch
=
(
actual
/
target
)
// } else {
// totalAch = 1 - (actual / target)
// }
...
...
@@ -736,10 +737,10 @@ export default class CorporateAnnualTargetMR extends Component {
let
totalScore
=
0
let
achx100
=
item
[
9
]
==
'100%'
&&
(
item
[
8
]
==
'HIB'
||
item
[
8
]
==
'HIG'
)
?
Number
(
totalAch
)
/
100
>
1
?
1
:
Number
(
totalAch
)
/
100
:
Number
(
totalAch
)
/
100
// if (item[5] == "Max Quality drop from Bor-Barge") {
// console.log(listParameterFilter)
// console.log(listParameterFilter)
// console.log(listParameterFilterCompany)
// // console.log(Number(item.min_value))
// console.log(Number(item.max_value))
// console.log(Number(item.max_value))
// }
if
(
listParameterFilterCompany
.
length
==
0
)
{
listParameterFilter
.
map
((
items
,
index
)
=>
{
...
...
@@ -978,10 +979,19 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
forecast
==
undefined
)
{
// console.log(formulaAwal)
// console.log(tableMeta.rowData[17])
let
indexID
=
tableMeta
.
rowData
[
17
].
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
formulaAwal
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
))
if
(
indexID
!==
-
1
)
{
let
valuezz
=
tableMeta
.
rowData
[
17
][
indexID
].
value
let
convertID
=
-
1
if
(
tableMeta
.
rowData
[
10
]
==
'FORMULA'
)
{
let
indexIDReport
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
formulaAwal
)
convertID
=
dataTable2
[
indexIDReport
][
18
]
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
18
]
==
(
convertID
==
-
1
?
item
:
convertID
))
let
valuezz
=
dataTable2
[
indexID
][
column
].
value
==
undefined
?
dataTable2
[
indexID
][
column
]
:
dataTable2
[
indexID
][
column
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
else
{
let
indexID
=
tableMeta
.
rowData
[
17
].
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
formulaAwal
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
))
if
(
indexID
!==
-
1
)
{
let
valuezz
=
tableMeta
.
rowData
[
17
][
indexID
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
}
else
{
// // // console.log(dataTable2[tableMeta.rowIndex][30])
...
...
@@ -1010,7 +1020,12 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
else
{
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
18
]
==
item
)
let
convertID
=
-
1
if
(
tableMeta
.
rowData
[
10
]
==
'FORMULA'
)
{
let
indexIDReport
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
item
)
convertID
=
dataTable2
[
indexIDReport
][
18
]
}
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
18
]
==
(
convertID
==
-
1
?
item
:
convertID
))
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
indexID
][
column
].
value
==
undefined
?
dataTable2
[
indexID
][
column
]
:
dataTable2
[
indexID
][
column
].
value
if
(
item
==
dataTable2
[
tableMeta
.
rowIndex
][
18
])
{
...
...
@@ -1027,8 +1042,12 @@ export default class CorporateAnnualTargetMR extends Component {
}
})
// console.log(baru)
// console.log(anjay)
// if (tableMeta.rowData[10] == 'FORMULA') {
// // let indexIDReport = dataTable2.findIndex((val) => val[1] == item)
// // convertID = dataTable2[indexIDReport][18]
// console.log(baru)
// console.log(anjay)
// }
let
anjay2
=
[]
let
kurung
=
false
...
...
@@ -1148,12 +1167,12 @@ export default class CorporateAnnualTargetMR extends Component {
}
})
total
=
dataTable2
[
tableMeta
.
rowIndex
][
5
]
==
"ROIC"
?
"0"
:
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
total
if
(
dataTable2
[
tableMeta
.
rowIndex
][
5
]
==
"ROIC"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
0
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
Number
(
total
).
toFixed
(
1
)
}
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
total
//
if (dataTable2[tableMeta.rowIndex][5] == "ROIC") {
//
dataTable2[tableMeta.rowIndex][column] = 0
//
} else {
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
Number
(
total
).
toFixed
(
1
)
//
}
return
Number
(
total
).
toFixed
(
1
)
}
...
...
@@ -1314,7 +1333,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
else
{
// if (actual <= target) {
total
=
(
actual
/
target
)
total
=
(
actual
/
target
)
// } else {
// total = 1 - (actual / target)
// }
...
...
@@ -1644,7 +1663,7 @@ export default class CorporateAnnualTargetMR extends Component {
style
=
{{
color
:
this
.
state
.
get_for
==
'view'
?
"black"
:
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
],
tableMeta
)
?
"#5198ea"
:
'black'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
tableMeta
.
rowData
[
5
]
===
"ROIC"
?
Number
(
value
).
toFixed
(
1
)
:
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
Number
(
handleValueFormula
(
value
,
tableMeta
,
tableMeta
.
columnIndex
)).
toFixed
(
1
)
:
Number
(
value
).
toFixed
(
1
)}
value
=
{
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
Number
(
handleValueFormula
(
value
,
tableMeta
,
tableMeta
.
columnIndex
)).
toFixed
(
1
)
:
Number
(
value
).
toFixed
(
1
)}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
disabled
=
{
this
.
state
.
get_for
==
'view'
?
true
:
!
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
],
tableMeta
)}
decimalScale
=
{
1
}
...
...
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