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
0e505294
Commit
0e505294
authored
Apr 18, 2021
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPdate
parent
2b305a40
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
70 deletions
+24
-70
SubHolding.js
src/container/Laporan/SubHolding.js
+17
-15
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+7
-55
No files found.
src/container/Laporan/SubHolding.js
View file @
0e505294
...
@@ -28,16 +28,16 @@ export default class SubHolding extends Component {
...
@@ -28,16 +28,16 @@ export default class SubHolding extends Component {
listPeriode
:
null
,
listPeriode
:
null
,
periode
:
null
,
periode
:
null
,
reportType
:
[
reportType
:
[
//
{ value: 2, label: 'DB Balance Sheet' },
{
value
:
2
,
label
:
'DB Balance Sheet'
},
//
{ value: 3, label: 'DB Profit & Loss' },
{
value
:
3
,
label
:
'DB Profit & Loss'
},
//
{ value: 1, label: 'DB Profit & Loss Detail' },
{
value
:
1
,
label
:
'DB Profit & Loss Detail'
},
//
{ value: 4, label: 'DB Ratio' },
{
value
:
4
,
label
:
'DB Ratio'
},
//
{ value: 5, label: 'DB Tax Planning' },
{
value
:
5
,
label
:
'DB Tax Planning'
},
//
{ value: 21, label: 'DB Operating Indicator' },
{
value
:
21
,
label
:
'DB Operating Indicator'
},
//
{ value: 6, label: 'Cash Flow - Summary' },
{
value
:
6
,
label
:
'Cash Flow - Summary'
},
//
{ value: 7, label: 'Balance Sheet - Summary' },
{
value
:
7
,
label
:
'Balance Sheet - Summary'
},
//
{ value: 8, label: 'Profit Loss - Summary' },
{
value
:
8
,
label
:
'Profit Loss - Summary'
},
//
{ value: 9, label: 'Financial Ratio - Summary' },
{
value
:
9
,
label
:
'Financial Ratio - Summary'
},
{
value
:
11
,
label
:
'CAT Performance Quarterly'
},
{
value
:
11
,
label
:
'CAT Performance Quarterly'
},
{
value
:
10
,
label
:
'CAT Performance Appraisal'
},
{
value
:
10
,
label
:
'CAT Performance Appraisal'
},
],
],
...
@@ -2896,6 +2896,7 @@ export default class SubHolding extends Component {
...
@@ -2896,6 +2896,7 @@ export default class SubHolding extends Component {
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
let
weight
=
String
(
item
.
corporate_annual_target
.
weight
).
substr
(
0
,
String
(
item
.
corporate_annual_target
.
weight
).
length
-
1
)
let
weight
=
String
(
item
.
corporate_annual_target
.
weight
).
substr
(
0
,
String
(
item
.
corporate_annual_target
.
weight
).
length
-
1
)
let
percentVar
=
Number
(
item
.
corporate_annual_target
.
thisYearOlFy
)
/
Number
(
item
.
corporate_annual_target
.
thisYearBudgetFy
)
let
percentVar
=
Number
(
item
.
corporate_annual_target
.
thisYearOlFy
)
/
Number
(
item
.
corporate_annual_target
.
thisYearBudgetFy
)
percentVar
=
String
(
percentVar
)
==
'NaN'
||
String
(
percentVar
)
==
'Infinity'
||
String
(
percentVar
)
==
'-Infinity'
?
0
:
percentVar
dbCATPQ
.
push
([
dbCATPQ
.
push
([
item
.
typeItemReportId
,
item
.
typeItemReportId
,
item
.
itemReportId
,
item
.
itemReportId
,
...
@@ -2925,7 +2926,7 @@ export default class SubHolding extends Component {
...
@@ -2925,7 +2926,7 @@ export default class SubHolding extends Component {
item
.
corporate_annual_target
.
thisYearBudgetFy
,
item
.
corporate_annual_target
.
thisYearBudgetFy
,
item
.
corporate_annual_target
.
thisYearOlFy
,
item
.
corporate_annual_target
.
thisYearOlFy
,
percentVar
,
percentVar
,
item
.
order
item
.
order
s
])
])
}
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
@@ -2966,7 +2967,7 @@ export default class SubHolding extends Component {
...
@@ -2966,7 +2967,7 @@ export default class SubHolding extends Component {
item
.
corporate_annual_target
.
thisYearBudgetFy
,
item
.
corporate_annual_target
.
thisYearBudgetFy
,
item
.
corporate_annual_target
.
thisYearOlFy
,
item
.
corporate_annual_target
.
thisYearOlFy
,
""
,
""
,
item
.
order
item
.
order
s
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
if
(
item
.
children
.
length
>
0
)
{
...
@@ -3898,8 +3899,9 @@ export default class SubHolding extends Component {
...
@@ -3898,8 +3899,9 @@ export default class SubHolding extends Component {
}
}
}
else
if
(
this
.
state
.
report
.
value
===
11
)
{
}
else
if
(
this
.
state
.
report
.
value
===
11
)
{
let
res
=
await
fetch
(
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cat/
performance_quarterly/export?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cat/
quarterly/export_report?report_id=17&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&quarter=
${
this
.
state
.
quarter
}
`
)
)
console
.
log
(
res
);
res
=
await
res
.
blob
()
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
if
(
res
.
size
>
0
)
{
if
(
res
.
size
>
0
)
{
...
@@ -3913,7 +3915,6 @@ export default class SubHolding extends Component {
...
@@ -3913,7 +3915,6 @@ export default class SubHolding extends Component {
let
res
=
await
fetch
(
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cat/performance_appraisal/export?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cat/performance_appraisal/export?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
)
)
console
.
log
(
res
);
res
=
await
res
.
blob
()
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
if
(
res
.
size
>
0
)
{
if
(
res
.
size
>
0
)
{
...
@@ -4131,6 +4132,7 @@ export default class SubHolding extends Component {
...
@@ -4131,6 +4132,7 @@ export default class SubHolding extends Component {
type
=
{
this
.
state
.
report
?
this
.
state
.
report
.
value
:
1
}
type
=
{
this
.
state
.
report
?
this
.
state
.
report
.
value
:
1
}
dataTable
=
{
this
.
state
.
dataTable
}
dataTable
=
{
this
.
state
.
dataTable
}
periode
=
{
this
.
state
.
periode
?
this
.
state
.
periode
.
periode
:
null
}
periode
=
{
this
.
state
.
periode
?
this
.
state
.
periode
.
periode
:
null
}
quarter
=
{
this
.
state
.
quarter
.
name
}
/
>
/
>
)}
)}
<
/div
>
<
/div
>
...
...
src/container/Laporan/TableSubHolding.js
View file @
0e505294
...
@@ -40,6 +40,8 @@ export default class TableSubHolding extends Component {
...
@@ -40,6 +40,8 @@ export default class TableSubHolding extends Component {
this.state = {
this.state = {
perfomanceScoreColor: '#fff',
perfomanceScoreColor: '#fff',
parameterScore: [],
parameterScore: [],
totalScore: 0,
perfomanceScore: ''
}
}
}
}
...
@@ -26644,7 +26646,7 @@ export default class TableSubHolding extends Component {
...
@@ -26644,7 +26646,7 @@ export default class TableSubHolding extends Component {
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#07a7d0', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#07a7d0', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="grid grid-3x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Actual
Q2"
}</span>
<span>{"Actual
"} {this.props.quarter
}</span>
</div>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"% Growth YoY"}</span>
<span>{"% Growth YoY"}</span>
...
@@ -26738,10 +26740,10 @@ export default class TableSubHolding extends Component {
...
@@ -26738,10 +26740,10 @@ export default class TableSubHolding extends Component {
<div className="grid grid-2x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="grid grid-2x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1 grid grid-5x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1 grid grid-5x" style={{ placeSelf: 'center', textAlign: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", color: '#000', backgroundColor: 'rgb(200 224 229)', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", color: '#000', backgroundColor: 'rgb(200 224 229)', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Plan
Q2 (Apr-Jun)"
}</span>
<span>{"Plan
"} {this.props.quarter
}</span>
</div>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"Actual
Q2 (Apr-Jun)"
}</span>
<span>{"Actual
"} {this.props.quarter
}</span>
</div>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#1c71b8', height: 44, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<span>{"% Ach"}</span>
<span>{"% Ach"}</span>
...
@@ -27109,56 +27111,6 @@ export default class TableSubHolding extends Component {
...
@@ -27109,56 +27111,6 @@ export default class TableSubHolding extends Component {
options: {
options: {
display: false
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
}
}
}
]
]
...
@@ -27524,7 +27476,7 @@ export default class TableSubHolding extends Component {
...
@@ -27524,7 +27476,7 @@ export default class TableSubHolding extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>TOTAL SCORE</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>TOTAL SCORE</Typography>
</div>
</div>
<div style={{ border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}>
<div style={{ border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>
100
</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>
{this.state.totalScore}
</Typography>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -27537,7 +27489,7 @@ export default class TableSubHolding extends Component {
...
@@ -27537,7 +27489,7 @@ export default class TableSubHolding extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>PERFOMANCE</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>PERFOMANCE</Typography>
</div>
</div>
<div style={{ borderStyle: 'solid', backgroundColor: this.state.perfomanceScoreColor, borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}>
<div style={{ borderStyle: 'solid', backgroundColor: this.state.perfomanceScoreColor, borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}>
<Typography style={{ fontSize: '11px', color: 'black', fontWeight: 'bold' }}>
100
</Typography>
<Typography style={{ fontSize: '11px', color: 'black', fontWeight: 'bold' }}>
{this.state.perfomanceScore}
</Typography>
</div>
</div>
</div>
</div>
</div>
</div>
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