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
Hide 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
...
@@ -1021,7 +1021,7 @@ export default class SummaryOfTriputra extends Component {
...
@@ -1021,7 +1021,7 @@ export default class SummaryOfTriputra extends Component {
}
else
{
}
else
{
npatFyPersenLY
=
npatFyOl
/
npatFyLY
npatFyPersenLY
=
npatFyOl
/
npatFyLY
}
}
dataTable
.
push
([
dataTable
.
push
([
item
.
company_id
,
item
.
company_id
,
item
.
parent
,
item
.
parent
,
...
@@ -1191,87 +1191,179 @@ export default class SummaryOfTriputra extends Component {
...
@@ -1191,87 +1191,179 @@ export default class SummaryOfTriputra extends Component {
console
.
log
(
newPayload
);
console
.
log
(
newPayload
);
console
.
log
(
response
);
console
.
log
(
response
);
let
dataTable
=
[]
let
dataTable
=
[]
// if (response.data) {
if
(
response
.
data
)
{
// let res = response.data.data
let
res
=
response
.
data
.
data
// const handlePushChild = (item) => {
const
handlePushChild
=
(
item
)
=>
{
// let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
0
]
===
item
.
company_id
)
// if (indexIDzz === -1) {
if
(
indexIDzz
===
-
1
)
{
// dataTable.push([
dataTable
.
push
([
// item.type_report_id,
item
.
company_id
,
// item.id,
item
.
parent
,
// item.parent,
item
.
level
,
// item.formula,
item
.
company_name
,
// item.level,
item
.
revenue_one
,
// item.description,
item
.
revenue_two
,
// item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before,
item
.
revenue_three
,
// Number(item.ratio.january).toFixed(1),
item
.
revenue_four
,
// Number(item.ratio.february).toFixed(1),
item
.
revenue_five
,
// Number(item.ratio.march).toFixed(1),
item
.
revenue_six
,
// Number(item.ratio.april).toFixed(1),
item
.
revenue_seven
,
// Number(item.ratio.may).toFixed(1),
item
.
revenue_eight
,
// Number(item.ratio.june).toFixed(1),
item
.
revenue_nine
,
// Number(item.ratio.july).toFixed(1),
item
.
revenue_ten
,
// Number(item.ratio.august).toFixed(1),
item
.
revenue_twelve
,
// Number(item.ratio.september).toFixed(1),
item
.
ebitda_one
,
// Number(item.ratio.october).toFixed(1),
item
.
ebitda_two
,
// Number(item.ratio.november).toFixed(1),
item
.
ebitda_three
,
// Number(item.ratio.december).toFixed(1),
item
.
ebitda_four
,
// Number(item.ratio.total_current_year).toFixed(1),
item
.
ebitda_five
,
// Number(item.ratio.total_next_year).toFixed(1),
item
.
ebitda_six
,
// Number(item.ratio.total_more_year).toFixed(1),
item
.
ebitda_seven
,
// item.order,
item
.
ebitda_eight
,
// item.condition_it_should_be,
item
.
ebitda_nine
,
// item.condition_if_wrong
item
.
ebitda_ten
,
// ])
item
.
ebitda_twelve
,
// }
item
.
tpat_one
,
// if (item.children !== null) {
item
.
tpat_two
,
// if (item.children.length > 0) {
item
.
tpat_three
,
// item.children.map((items, indexs) => {
item
.
tpat_four
,
// handlePushChild(items)
item
.
tpat_five
,
// })
item
.
tpat_six
,
// }
item
.
tpat_seven
,
// }
item
.
tpat_eight
,
// }
item
.
tpat_nine
,
// res.map((item, index) => {
item
.
tpat_ten
,
// dataTable.push([
item
.
tpat_twelve
,
// item.type_report_id,
item
.
npat_one
,
// item.id,
item
.
npat_two
,
// item.parent,
item
.
npat_three
,
// item.formula,
item
.
npat_four
,
// item.level,
item
.
npat_five
,
// item.description,
item
.
npat_six
,
// item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before,
item
.
npat_seven
,
// Number(item.ratio.january).toFixed(1),
item
.
npat_eight
,
// Number(item.ratio.february).toFixed(1),
item
.
npat_nine
,
// Number(item.ratio.march).toFixed(1),
item
.
npat_ten
,
// Number(item.ratio.april).toFixed(1),
item
.
npat_twelve
,
// Number(item.ratio.may).toFixed(1),
item
.
total_asset_one
,
// Number(item.ratio.june).toFixed(1),
item
.
total_asset_two
,
// Number(item.ratio.july).toFixed(1),
item
.
total_asset_three
,
// Number(item.ratio.august).toFixed(1),
item
.
total_asset_four
,
// Number(item.ratio.september).toFixed(1),
item
.
total_asset_five
,
// Number(item.ratio.october).toFixed(1),
item
.
total_asset_six
,
// Number(item.ratio.november).toFixed(1),
item
.
total_asset_seven
,
// Number(item.ratio.december).toFixed(1),
item
.
total_asset_eight
,
// Number(item.ratio.total_current_year).toFixed(1),
item
.
total_asset_nine
,
// Number(item.ratio.total_next_year).toFixed(1),
item
.
total_asset_ten
,
// Number(item.ratio.total_more_year).toFixed(1),
item
.
total_asset_twelve
,
// item.order,
item
.
total_equity_one
,
// item.condition_it_should_be,
item
.
total_equity_two
,
// item.condition_if_wrong
item
.
total_equity_three
,
// ])
item
.
total_equity_four
,
// if (item.children !== null) {
item
.
total_equity_five
,
// if (item.children.length > 0) {
item
.
total_equity_six
,
// item.children.map((items, indexs) => {
item
.
total_equity_seven
,
// handlePushChild(items)
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
})
this
.
setState
({
dataTable
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
//
} else {
}
else
{
//
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
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