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
c3674eeb
Commit
c3674eeb
authored
Apr 23, 2021
by
Faisal Hamdi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'faisal' into 'master'
Faisal See merge request
!1443
parents
5a6e4c01
c67cd0ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
59 deletions
+5
-59
SubHolding.js
src/container/Laporan/SubHolding.js
+3
-57
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+2
-2
No files found.
src/container/Laporan/SubHolding.js
View file @
c3674eeb
...
...
@@ -2883,7 +2883,7 @@ export default class SubHolding extends Component {
})
}
else
if
(
this
.
state
.
report
.
value
===
11
)
{
let
dbCATPQ
=
[];
let
payloadCATPQ
=
{...
payload
,
report_id
:
1
7
,
quarter
:
this
.
state
.
quarter
.
name
}
let
payloadCATPQ
=
{...
payload
,
report_id
:
1
0
,
quarter
:
this
.
state
.
quarter
.
name
}
api
.
create
().
getReportCATPQ
(
payloadCATPQ
).
then
(
response
=>
{
console
.
log
(
payloadCATPQ
);
console
.
log
(
response
);
...
...
@@ -3016,54 +3016,6 @@ export default class SubHolding extends Component {
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 achivementYtd = 0
// if (item.formula_ytd == 'HIB') {
// let actual = item.corporate_annual_target.actual_ytd == "" ? 0 : Number(item.corporate_annual_target.actual_ytd)
// let target = item.corporate_annual_target.target_ytd == "" ? 0 : Number(item.corporate_annual_target.target_ytd)
// if (target < 0) {
// if (actual > target) {
// achivementYtd = (actual / target) - 1
// } else {
// achivementYtd = (actual / target)
// }
// } else if (target == 0) {
// if (target >= actual) {
// achivementYtd = 1.26
// } else {
// achivementYtd = 0
// }
// } else {
// if (actual == target) {
// achivementYtd = (actual / target)
// } else {
// achivementYtd = 2 - (actual / target)
// }
// }
// } else {
// let actual = item.corporate_annual_target.actual_ytd == "" ? 0 : Number(item.corporate_annual_target.actual_ytd)
// let target = item.corporate_annual_target.target_ytd == "" ? 0 : Number(item.corporate_annual_target.target_ytd)
// if (target < 0) {
// if (actual >= target) {
// achivementYtd = ((target - actual) / target) + 1
// } else {
// achivementYtd = (target - actual) / target
// }
// } else if (target == 0) {
// if (target <= actual) {
// achivementYtd = 1.26
// } else {
// achivementYtd = 0
// }
// } else {
// // if (actual <= target) {
// achivementYtd = (actual / target)
// // } else {
// // achivementYtd = 1 - (actual / target)
// // }
// }
// }
// total = String(total) == 'NaN' || String(total) == 'Infinity' || String(total) == '-Infinity' ? 0 : total
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(total) * 100
dbCATPA
.
push
([
item
.
type_report_id
,
item
.
id
,
...
...
@@ -3072,19 +3024,13 @@ export default class SubHolding extends Component {
item
.
level
,
item
.
description
,
item
.
corporate_annual_target
.
weight
==
""
?
Number
(
0
).
toFixed
(
1
)
:
Number
(
weight
).
toFixed
(
1
),
// item.uom,
// item.kpi_type,
// item.max_ach,
// item.formula_ytd,
parentTrue
?
item
.
corporate_annual_target
.
uom
:
item
.
uom
,
parentTrue
?
item
.
corporate_annual_target
.
jenis_kpi
==
""
?
null
:
item
.
corporate_annual_target
.
jenis_kpi
:
item
.
jenis_kpi
==
""
?
null
:
item
.
kpi_type
,
parentTrue
?
item
.
corporate_annual_target
.
max_ach
==
""
?
null
:
titleCase
(
item
.
corporate_annual_target
.
max_ach
)
:
item
.
max_ach
==
""
?
null
:
titleCase
(
item
.
max_ach
),
item
.
corporate_annual_target
.
formula_ytd
==
""
?
null
:
item
.
corporate_annual_target
.
formula_ytd
,
item
.
corporate_annual_target
.
formula_ytd
==
""
?
null
:
item
.
corporate_annual_target
.
formula_ytd
,
item
.
corporate_annual_target
.
actual_ytd
,
item
.
corporate_annual_target
.
target_ytd
,
item
.
corporate_annual_target
.
achivement_ytd
,
// isNaN(achivementYtd) || achivementYtd == 'Infinity' || achivementYtd == '-Infinity'? 0 : (Number(achivementYtd) * 100),
item
.
corporate_annual_target
.
score
,
item
.
corporate_annual_target
.
score_x_weight
,
item
.
order
...
...
@@ -3931,7 +3877,7 @@ export default class SubHolding extends Component {
}
}
else
if
(
this
.
state
.
report
.
value
===
11
)
{
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cat/quarterly/export_report?report_id=1
7
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&periode=
${
this
.
state
.
periode
.
periode
}
&&quarter=
${
this
.
state
.
quarter
.
name
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cat/quarterly/export_report?report_id=1
0
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&periode=
${
this
.
state
.
periode
.
periode
}
&&quarter=
${
this
.
state
.
quarter
.
name
}
`
)
console
.
log
(
res
);
res
=
await
res
.
blob
()
...
...
src/container/Laporan/TableSubHolding.js
View file @
c3674eeb
...
...
@@ -25045,7 +25045,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(
1
)}
value={Number(value).toFixed(
2
)}
/>
}
/>
...
...
@@ -25280,7 +25280,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(
1
)}
value={Number(value).toFixed(
2
)}
/>
}
/>
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