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
42d054ba
Commit
42d054ba
authored
Feb 02, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
historical
parent
bf34a703
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1557 additions
and
222 deletions
+1557
-222
SummaryOfTriputra.js
src/container/SummaryTriputra/SummaryOfTriputra.js
+173
-81
TableSummaryTriputra.js
src/container/SummaryTriputra/TableSummaryTriputra.js
+1384
-141
No files found.
src/container/SummaryTriputra/SummaryOfTriputra.js
View file @
42d054ba
...
...
@@ -1191,87 +1191,179 @@ export default class SummaryOfTriputra extends Component {
console
.
log
(
newPayload
);
console
.
log
(
response
);
let
dataTable
=
[]
// if (response.data) {
// let res = response.data.data
// const handlePushChild = (item) => {
// let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
// if (indexIDzz === -1) {
// dataTable.push([
// item.type_report_id,
// item.id,
// item.parent,
// item.formula,
// item.level,
// item.description,
// item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before,
// Number(item.ratio.january).toFixed(1),
// Number(item.ratio.february).toFixed(1),
// Number(item.ratio.march).toFixed(1),
// Number(item.ratio.april).toFixed(1),
// Number(item.ratio.may).toFixed(1),
// Number(item.ratio.june).toFixed(1),
// Number(item.ratio.july).toFixed(1),
// Number(item.ratio.august).toFixed(1),
// Number(item.ratio.september).toFixed(1),
// Number(item.ratio.october).toFixed(1),
// Number(item.ratio.november).toFixed(1),
// Number(item.ratio.december).toFixed(1),
// Number(item.ratio.total_current_year).toFixed(1),
// Number(item.ratio.total_next_year).toFixed(1),
// Number(item.ratio.total_more_year).toFixed(1),
// item.order,
// item.condition_it_should_be,
// item.condition_if_wrong
// ])
// }
// if (item.children !== null) {
// if (item.children.length > 0) {
// item.children.map((items, indexs) => {
// handlePushChild(items)
// })
// }
// }
// }
// res.map((item, index) => {
// dataTable.push([
// item.type_report_id,
// item.id,
// item.parent,
// item.formula,
// item.level,
// item.description,
// item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before,
// Number(item.ratio.january).toFixed(1),
// Number(item.ratio.february).toFixed(1),
// Number(item.ratio.march).toFixed(1),
// Number(item.ratio.april).toFixed(1),
// Number(item.ratio.may).toFixed(1),
// Number(item.ratio.june).toFixed(1),
// Number(item.ratio.july).toFixed(1),
// Number(item.ratio.august).toFixed(1),
// Number(item.ratio.september).toFixed(1),
// Number(item.ratio.october).toFixed(1),
// Number(item.ratio.november).toFixed(1),
// Number(item.ratio.december).toFixed(1),
// Number(item.ratio.total_current_year).toFixed(1),
// Number(item.ratio.total_next_year).toFixed(1),
// Number(item.ratio.total_more_year).toFixed(1),
// item.order,
// item.condition_it_should_be,
// item.condition_if_wrong
// ])
// if (item.children !== null) {
// if (item.children.length > 0) {
// item.children.map((items, indexs) => {
// handlePushChild(items)
// })
// }
// }
// })
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
0
]
===
item
.
company_id
)
if
(
indexIDzz
===
-
1
)
{
dataTable
.
push
([
item
.
company_id
,
item
.
parent
,
item
.
level
,
item
.
company_name
,
item
.
revenue_one
,
item
.
revenue_two
,
item
.
revenue_three
,
item
.
revenue_four
,
item
.
revenue_five
,
item
.
revenue_six
,
item
.
revenue_seven
,
item
.
revenue_eight
,
item
.
revenue_nine
,
item
.
revenue_ten
,
item
.
revenue_twelve
,
item
.
ebitda_one
,
item
.
ebitda_two
,
item
.
ebitda_three
,
item
.
ebitda_four
,
item
.
ebitda_five
,
item
.
ebitda_six
,
item
.
ebitda_seven
,
item
.
ebitda_eight
,
item
.
ebitda_nine
,
item
.
ebitda_ten
,
item
.
ebitda_twelve
,
item
.
tpat_one
,
item
.
tpat_two
,
item
.
tpat_three
,
item
.
tpat_four
,
item
.
tpat_five
,
item
.
tpat_six
,
item
.
tpat_seven
,
item
.
tpat_eight
,
item
.
tpat_nine
,
item
.
tpat_ten
,
item
.
tpat_twelve
,
item
.
npat_one
,
item
.
npat_two
,
item
.
npat_three
,
item
.
npat_four
,
item
.
npat_five
,
item
.
npat_six
,
item
.
npat_seven
,
item
.
npat_eight
,
item
.
npat_nine
,
item
.
npat_ten
,
item
.
npat_twelve
,
item
.
total_asset_one
,
item
.
total_asset_two
,
item
.
total_asset_three
,
item
.
total_asset_four
,
item
.
total_asset_five
,
item
.
total_asset_six
,
item
.
total_asset_seven
,
item
.
total_asset_eight
,
item
.
total_asset_nine
,
item
.
total_asset_ten
,
item
.
total_asset_twelve
,
item
.
total_equity_one
,
item
.
total_equity_two
,
item
.
total_equity_three
,
item
.
total_equity_four
,
item
.
total_equity_five
,
item
.
total_equity_six
,
item
.
total_equity_seven
,
item
.
total_equity_eight
,
item
.
total_equity_nine
,
item
.
total_equity_ten
,
item
.
total_equity_twelve
,
item
.
order
,
])
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
}
}
res
.
map
((
item
,
index
)
=>
{
dataTable
.
push
([
item
.
company_id
,
item
.
parent
,
item
.
level
,
item
.
company_name
,
item
.
revenue_one
,
item
.
revenue_two
,
item
.
revenue_three
,
item
.
revenue_four
,
item
.
revenue_five
,
item
.
revenue_six
,
item
.
revenue_seven
,
item
.
revenue_eight
,
item
.
revenue_nine
,
item
.
revenue_ten
,
item
.
revenue_twelve
,
item
.
ebitda_one
,
item
.
ebitda_two
,
item
.
ebitda_three
,
item
.
ebitda_four
,
item
.
ebitda_five
,
item
.
ebitda_six
,
item
.
ebitda_seven
,
item
.
ebitda_eight
,
item
.
ebitda_nine
,
item
.
ebitda_ten
,
item
.
ebitda_twelve
,
item
.
tpat_one
,
item
.
tpat_two
,
item
.
tpat_three
,
item
.
tpat_four
,
item
.
tpat_five
,
item
.
tpat_six
,
item
.
tpat_seven
,
item
.
tpat_eight
,
item
.
tpat_nine
,
item
.
tpat_ten
,
item
.
tpat_twelve
,
item
.
npat_one
,
item
.
npat_two
,
item
.
npat_three
,
item
.
npat_four
,
item
.
npat_five
,
item
.
npat_six
,
item
.
npat_seven
,
item
.
npat_eight
,
item
.
npat_nine
,
item
.
npat_ten
,
item
.
npat_twelve
,
item
.
total_asset_one
,
item
.
total_asset_two
,
item
.
total_asset_three
,
item
.
total_asset_four
,
item
.
total_asset_five
,
item
.
total_asset_six
,
item
.
total_asset_seven
,
item
.
total_asset_eight
,
item
.
total_asset_nine
,
item
.
total_asset_ten
,
item
.
total_asset_twelve
,
item
.
total_equity_one
,
item
.
total_equity_two
,
item
.
total_equity_three
,
item
.
total_equity_four
,
item
.
total_equity_five
,
item
.
total_equity_six
,
item
.
total_equity_seven
,
item
.
total_equity_eight
,
item
.
total_equity_nine
,
item
.
total_equity_ten
,
item
.
total_equity_twelve
,
item
.
order
,
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
}
})
this
.
setState
({
dataTable
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
//
} else {
//
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
//
}
}
else
{
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
}
})
}
}
...
...
src/container/SummaryTriputra/TableSummaryTriputra.js
View file @
42d054ba
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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