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
3a855c6d
Commit
3a855c6d
authored
Apr 20, 2021
by
r.kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
31649cc3
19aa2c5b
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
115 additions
and
29 deletions
+115
-29
HomePage.js
src/container/HomePage.js
+5
-3
SubHolding.js
src/container/Laporan/SubHolding.js
+2
-2
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+87
-10
MonthlyReport.js
src/container/MonthlyReport.js
+2
-1
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+9
-6
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+2
-2
OutlookPA.js
src/container/OutlookPA.js
+2
-1
RollingOutlook.js
src/container/RollingOutlook.js
+2
-1
CorporateAnnualTargetRO.js
src/container/RollingOutlook/CorporateAnnualTargetRO.js
+4
-3
No files found.
src/container/HomePage.js
View file @
3a855c6d
...
...
@@ -185,6 +185,7 @@ class HomePage extends Component {
console
.
log
(
this
.
state
.
company
)
api
.
create
().
getListChildDashboardCAT
(
this
.
state
.
periodeCAT
.
value
,
this
.
state
.
monthCAT
.
month_id
).
then
((
res
)
=>
{
if
(
res
.
data
)
{
// console.log(res)
let
response
=
res
.
data
.
data
.
business_unit
let
data
=
[]
response
.
map
((
item
,
index
)
=>
{
...
...
@@ -212,13 +213,14 @@ class HomePage extends Component {
}
})
}
arrayChild
.
push
({
...
items
,
current_value
:
Number
(
items
.
current_value
).
toFixed
(
2
),
performanceColor
:
perfomanceScoreColor
})
arrayChild
.
push
({
...
items
,
current_value
:
Number
(
items
.
current_value
).
toFixed
(
2
),
performanceColor
:
perfomanceScoreColor
,
performanceScore
})
}
})
if
(
arrayChild
.
length
>
0
&&
String
(
item
.
item_business
).
toLocaleLowerCase
()
!=
'holding'
)
{
data
.
push
({
...
item
,
category
:
arrayChild
})
}
})
// console.log(this.state.parameterPerfom)
console
.
log
(
data
)
this
.
setState
({
dataDashboardCAT
:
data
,
loading
:
false
,
loading2
:
false
},
()
=>
{
setTimeout
(()
=>
{
...
...
@@ -914,7 +916,7 @@ class HomePage extends Component {
<
/div>
}
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
,
marginTop
:
items
.
total_kpi
==
null
?
50
:
0
}}
>
<
div
style
=
{{
backgroundColor
:
items
.
performanceColor
,
textAlign
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
,
width
:
40
,
height
:
21
}}
>
<
Typography
style
=
{{
textAlign
:
'center'
,
color
:
'#4b4b4b'
}}
>
{
items
.
performance
}
<
/Typography
>
<
Typography
style
=
{{
textAlign
:
'center'
,
color
:
'#4b4b4b'
}}
>
{
items
.
performance
Score
}
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
}}
>
...
...
@@ -1188,7 +1190,7 @@ class HomePage extends Component {
<
/div>
}
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
,
marginTop
:
items
.
total_kpi
==
null
?
50
:
0
}}
>
<
div
style
=
{{
backgroundColor
:
items
.
performanceColor
,
textAlign
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
,
width
:
40
,
height
:
21
}}
>
<
Typography
style
=
{{
textAlign
:
'center'
,
color
:
'#4b4b4b'
}}
>
{
items
.
performance
}
<
/Typography
>
<
Typography
style
=
{{
textAlign
:
'center'
,
color
:
'#4b4b4b'
}}
>
{
items
.
performance
Score
}
<
/Typography
>
<
/div
>
<
/div
>
{
!
this
.
state
.
loading3
&&
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
}}
>
...
...
src/container/Laporan/SubHolding.js
View file @
3a855c6d
...
...
@@ -2917,7 +2917,7 @@ export default class SubHolding extends Component {
item
.
corporate_annual_target
.
thisYearActualQx
,
item
.
corporate_annual_target
.
thisYearPercentAch
,
item
.
corporate_annual_target
.
thisYearPercentGrowthYoy
,
item
.
corporate_annual_target
.
thisYearScore
,
item
.
corporate_annual_target
.
thisYearScore
===
null
?
"0"
:
item
.
corporate_annual_target
.
thisYearScore
,
item
.
corporate_annual_target
.
thisYearScoreXWeight
,
item
.
corporate_annual_target
.
thisYearBudgetYtd
,
...
...
@@ -2927,7 +2927,7 @@ export default class SubHolding extends Component {
item
.
corporate_annual_target
.
thisYearBudgetFy
,
item
.
corporate_annual_target
.
thisYearOlFy
,
item
.
corporate_annual_target
.
thisYearPercentAchFy
,
item
.
corporate_annual_target
.
thisYearScoreFy
,
item
.
corporate_annual_target
.
thisYearScoreFy
===
null
?
"0"
:
item
.
corporate_annual_target
.
thisYearScoreFy
,
item
.
corporate_annual_target
.
thisYearScoreXWeightFy
,
item
.
orders
...
...
src/container/Laporan/TableSubHolding.js
View file @
3a855c6d
...
...
@@ -58,7 +58,7 @@ export default class TableSubHolding extends Component {
api.create().getParameterByGroupName({
"group_name": 'ACHIEVEMENT_KPI'
}).then((response) => {
console.log(response.data)
//
console.log(response.data)
if (response.data) {
this.setState({ parameterScore: response.data.data })
}
...
...
@@ -69,7 +69,7 @@ export default class TableSubHolding extends Component {
api.create().getParameterByGroupName({
"group_name": "PERFORMANCE_KPI"
}).then((response) => {
console.log(response.data)
//
console.log(response.data)
if (response.data) {
this.setState({ parameterPerfom: response.data.data }, () => {
this.handleTotalScore(this.props.dataTable)
...
...
@@ -24355,6 +24355,9 @@ export default class TableSubHolding extends Component {
},
]
const totalArray = (item) => {
console.log(item);
}
const columnCatPQ = [
{
name: "",
...
...
@@ -24683,7 +24686,7 @@ export default class TableSubHolding extends Component {
placeholder=""
suffix={`%`}
disabled={true}
value={
value
}
value={
tableMeta.rowData[15]
}
/>
}
/>
...
...
@@ -24728,7 +24731,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={
Number(value).toFixed(1)
}
value={
tableMeta.rowData[17]
}
/>
}
/>
...
...
@@ -24843,7 +24846,7 @@ export default class TableSubHolding extends Component {
placeholder=""
suffix={`%`}
disabled={true}
value={
value
}
value={
tableMeta.rowIndex[21]
}
/>
}
/>
...
...
@@ -24942,7 +24945,7 @@ export default class TableSubHolding extends Component {
placeholder=""
suffix={`%`}
disabled={true}
value={
value
}
value={
tableMeta.rowData[24]
}
/>
}
/>
...
...
@@ -24963,7 +24966,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={
Number(value).toFixed(1)
}
value={
tableMeta.rowData[25]
}
/>
}
/>
...
...
@@ -25001,6 +25004,66 @@ export default class TableSubHolding extends Component {
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}
]
...
...
@@ -25246,9 +25309,23 @@ export default class TableSubHolding extends Component {
<div style={{ width: 75, textAlign: 'right' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
<span style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}>
{value}
</span>
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={`%`}
disabled={true}
value={tableMeta.rowData[13]}
/>
}
/>
</div>
}
</div>
)
src/container/MonthlyReport.js
View file @
3a855c6d
...
...
@@ -236,7 +236,8 @@ export default class MonthlyReport extends Component {
item
.
revision
,
this
.
state
.
isApprovedMB
?
(
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
status_approv
)
:
"CLOSED"
,
item
.
report_id
,
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/MonthlyReport/CorporateAnnualTargetMR.js
View file @
3a855c6d
...
...
@@ -238,7 +238,7 @@ export default class CorporateAnnualTargetMR extends Component {
item
.
order
])
// let index = dataTable.findIndex((val) => val[5] == item.description)
console
.
log
(
index
,
length
-
1
)
//
console.log(index, length - 1)
if
(
index
==
length
-
1
&&
item
.
parent_name
==
"LEARNING & GROWTH PERSPECTIVE"
)
{
dataTable
.
push
([
4
,
...
...
@@ -677,6 +677,7 @@ export default class CorporateAnnualTargetMR extends Component {
let
total
=
0
let
perfomanceScore
=
''
let
totalWeight
=
0
// console.log(datatable2)
let
datatable3
=
datatable2
.
map
((
item
,
index
)
=>
{
// console.log(item[6])
//total weight
...
...
@@ -746,7 +747,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
totalAch
=
String
(
totalAch
)
==
'NaN'
||
String
(
totalAch
)
==
'Infinity'
||
String
(
totalAch
)
==
'-Infinity'
?
0
:
totalAch
totalAch
=
Number
(
totalAch
)
*
100
totalAch
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
13
]
:
Number
(
totalAch
)
*
100
//score
let
listParameter
=
this
.
state
.
parameterScore
...
...
@@ -756,7 +757,7 @@ export default class CorporateAnnualTargetMR extends Component {
let
listParameterFilter
=
listParameter
.
filter
((
val
)
=>
val
.
setting_type
==
String
(
parameterMix
).
toLocaleUpperCase
())
let
listParameterFilterCompany
=
listParameterFilter
.
filter
((
val
)
=>
val
.
company_id
==
this
.
props
.
company
.
company_id
)
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
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(listParameterFilterCompany)
...
...
@@ -776,7 +777,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
})
}
let
totalScorez
=
Number
(
totalScore
).
toFixed
(
0
)
let
totalScorez
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
14
]
:
Number
(
totalScore
).
toFixed
(
0
)
// if (item[5] == "Max Quality drop from Bor-Barge") {
// console.log(totalScorez)
// }
...
...
@@ -793,7 +794,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
else
{
totalSW
=
(
Number
(
totalScorez
)
*
Number
(
handlePercent
)
/
100
)
}
totalSW
=
Number
(
totalSW
).
toFixed
(
2
)
totalSW
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
15
]
:
Number
(
totalSW
).
toFixed
(
2
)
if
(
item
[
0
]
!==
1
&&
item
[
0
]
!==
4
)
{
total
+=
Number
(
totalSW
)
}
...
...
@@ -804,6 +805,8 @@ export default class CorporateAnnualTargetMR extends Component {
// console.log(listParameterFilterCompany);
// console.log(totalScorez)
// console.log(totalSW)
// console.log(item[12])
// console.log(item[5])
// console.log(total)
return
[
item
[
0
],
...
...
@@ -1373,7 +1376,7 @@ export default class CorporateAnnualTargetMR extends Component {
let
listParameterFilter
=
listParameter
.
filter
((
val
)
=>
val
.
setting_type
==
String
(
parameterMix
).
toLocaleUpperCase
()
&&
String
(
val
.
company_name
).
toLocaleLowerCase
()
===
"default"
)
let
listParameterFilterCompany
=
listParameterFilter
.
filter
((
val
)
=>
val
.
company_id
==
this
.
props
.
company
.
company_id
)
let
totalScore
=
0
let
achx100
=
tableMeta
.
rowData
[
9
]
==
'100%'
&&
(
tableMeta
.
rowData
[
8
]
==
'HIB'
||
tableMeta
.
rowData
[
8
]
==
'HIG'
)
?
Number
(
tableMeta
.
rowData
[
13
])
/
100
>
1
?
1
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
let
achx100
=
tableMeta
.
rowData
[
9
]
==
'100%'
&&
(
tableMeta
.
rowData
[
8
]
==
'HIB'
||
tableMeta
.
rowData
[
8
]
==
'HIG'
)
?
(
Number
(
tableMeta
.
rowData
[
13
])
/
100
>
1
?
1
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
)
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
if
(
listParameterFilterCompany
.
length
==
0
)
{
listParameterFilter
.
map
((
item
,
index
)
=>
{
if
(
Number
(
achx100
)
>=
Number
(
item
.
min_value
)
&&
Number
(
achx100
)
<=
Number
(
item
.
max_value
))
{
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
3a855c6d
...
...
@@ -136,8 +136,8 @@ export default class ProfitLossMR extends Component {
checkStatus
=
false
}
//
this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev })
this
.
setState
({
viewOnly
:
true
})
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
&&
checkPrevRev
})
//
this.setState({viewOnly: true})
}
handleGetFor
(
type
)
{
...
...
src/container/OutlookPA.js
View file @
3a855c6d
...
...
@@ -221,7 +221,8 @@ export default class OutlookPA extends Component {
item
.
revision
,
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
item
.
report_id
,
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
,
// 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/RollingOutlook.js
View file @
3a855c6d
...
...
@@ -267,7 +267,8 @@ export default class RollingOutlook extends Component {
item
.
revision
,
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
item
.
report_id
,
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
,
// 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/RollingOutlook/CorporateAnnualTargetRO.js
View file @
3a855c6d
...
...
@@ -89,7 +89,7 @@ export default class CorporateAnnualTargetRO extends Component {
let
checkLastStatus
=
false
let
checkStatus
=
false
let
checkPrevRev
=
false
console
.
log
(
'skuy'
);
if
(
this
.
props
.
isApprover
)
{
checkApprover
=
true
}
else
{
...
...
@@ -114,7 +114,8 @@ export default class CorporateAnnualTargetRO extends Component {
checkStatus
=
false
}
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
&&
checkPrevRev
})
// this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev })
this
.
setState
({
viewOnly
:
true
})
}
getItemHierarki
()
{
...
...
@@ -620,7 +621,7 @@ export default class CorporateAnnualTargetRO extends Component {
"october"
:
stateFR
?
i
[
0
]
==
3
?
String
(
i
[
20
])
:
String
(
Number
(
i
[
20
].
value
).
toFixed
(
1
))
:
String
(
i
[
20
]),
"november"
:
stateFR
?
i
[
0
]
==
3
?
String
(
i
[
21
])
:
String
(
Number
(
i
[
21
].
value
).
toFixed
(
1
))
:
String
(
i
[
21
]),
"december"
:
stateFR
?
i
[
0
]
==
3
?
String
(
i
[
22
])
:
String
(
Number
(
i
[
22
].
value
).
toFixed
(
1
))
:
String
(
i
[
22
]),
"
total_current_year
"
:
String
(
Number
(
i
[
23
]).
toFixed
(
1
))
==
""
?
"0.0"
:
String
(
Number
(
i
[
23
]).
toFixed
(
1
)),
"
current_year_total
"
:
String
(
Number
(
i
[
23
]).
toFixed
(
1
))
==
""
?
"0.0"
:
String
(
Number
(
i
[
23
]).
toFixed
(
1
)),
"strategic"
:
String
(
i
[
24
]),
"pic"
:
String
(
i
[
25
])
})
...
...
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