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
4d4f20cf
Commit
4d4f20cf
authored
Oct 19, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bakso mukidi
parent
f0581f98
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1668 additions
and
74 deletions
+1668
-74
index.js
src/api/index.js
+3
-1
SubHolding.js
src/container/Laporan/SubHolding.js
+87
-1
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+1578
-72
No files found.
src/api/index.js
View file @
4d4f20cf
...
@@ -223,6 +223,7 @@ const create = (type = "") => {
...
@@ -223,6 +223,7 @@ const create = (type = "") => {
const
uploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/import_operating_indicator'
,
body
)
const
uploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/import_operating_indicator'
,
body
)
const
getLastestUpdateOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_latest_update'
,
body
)
const
getLastestUpdateOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_latest_update'
,
body
)
const
getLastPeriodeOI
=
(
idCompany
)
=>
api
.
post
(
`transaction/master_budget/get_last_periode/
${
idCompany
}
`
)
const
getLastPeriodeOI
=
(
idCompany
)
=>
api
.
post
(
`transaction/master_budget/get_last_periode/
${
idCompany
}
`
)
const
getReportHierarkiPL
=
(
body
)
=>
api
.
post
(
'transaction/pl_detail/get_report_hierarki'
,
body
)
//CASH FLOW
//CASH FLOW
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/get_report_hierarki'
,
body
)
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/get_report_hierarki'
,
body
)
...
@@ -429,7 +430,8 @@ const create = (type = "") => {
...
@@ -429,7 +430,8 @@ const create = (type = "") => {
getSubmitOI
,
getSubmitOI
,
getLastPeriodOI
,
getLastPeriodOI
,
getDashboardUser
,
getDashboardUser
,
getDetailReportCF
getDetailReportCF
,
getReportHierarkiPL
}
}
}
}
...
...
src/container/Laporan/SubHolding.js
View file @
4d4f20cf
...
@@ -359,6 +359,92 @@ export default class SubHolding extends Component {
...
@@ -359,6 +359,92 @@ export default class SubHolding extends Component {
}
else
{
}
else
{
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
}
}
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
api
.
create
().
getReportHierarkiPL
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
let
dataTable
=
[]
console
.
log
(
response
)
let
res
=
response
.
data
.
data
const
handlePushChild
=
(
item
)
=>
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
profit_detail
.
total_actual_before
===
null
?
"0"
:
item
.
profit_detail
.
total_actual_before
===
""
?
"0"
:
item
.
profit_detail
.
total_actual_before
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
january
,
formula
:
item
.
profit_detail
.
january_formula
}
:
item
.
profit_detail
.
january
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
february
,
formula
:
item
.
profit_detail
.
february_formula
}
:
item
.
profit_detail
.
february
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
march
,
formula
:
item
.
profit_detail
.
march_formula
}
:
item
.
profit_detail
.
march
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
april
,
formula
:
item
.
profit_detail
.
april_formula
}
:
item
.
profit_detail
.
april
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
may
,
formula
:
item
.
profit_detail
.
may_formula
}
:
item
.
profit_detail
.
may
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
june
,
formula
:
item
.
profit_detail
.
june_formula
}
:
item
.
profit_detail
.
june
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
july
,
formula
:
item
.
profit_detail
.
july_formula
}
:
item
.
profit_detail
.
july
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
august
,
formula
:
item
.
profit_detail
.
august_formula
}
:
item
.
profit_detail
.
august
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
september
,
formula
:
item
.
profit_detail
.
september_formula
}
:
item
.
profit_detail
.
september
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
october
,
formula
:
item
.
profit_detail
.
october_formula
}
:
item
.
profit_detail
.
october
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
november
,
formula
:
item
.
profit_detail
.
november_formula
}
:
item
.
profit_detail
.
november
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
december
,
formula
:
item
.
profit_detail
.
december_formula
}
:
item
.
profit_detail
.
december
,
item
.
profit_detail
.
total_current_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
profit_detail
.
total_next_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
profit_detail
.
total_more_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
profit_detail
.
forecast_formula
==
null
?
[]
:
item
.
profit_detail
.
forecast_formula
])
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
.
profit_detail
.
total_actual_before
===
null
?
"0"
:
item
.
profit_detail
.
total_actual_before
===
""
?
"0"
:
item
.
profit_detail
.
total_actual_before
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
january
,
formula
:
item
.
profit_detail
.
january_formula
}
:
item
.
profit_detail
.
january
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
february
,
formula
:
item
.
profit_detail
.
february_formula
}
:
item
.
profit_detail
.
february
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
march
,
formula
:
item
.
profit_detail
.
march_formula
}
:
item
.
profit_detail
.
march
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
april
,
formula
:
item
.
profit_detail
.
april_formula
}
:
item
.
profit_detail
.
april
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
may
,
formula
:
item
.
profit_detail
.
may_formula
}
:
item
.
profit_detail
.
may
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
june
,
formula
:
item
.
profit_detail
.
june_formula
}
:
item
.
profit_detail
.
june
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
july
,
formula
:
item
.
profit_detail
.
july_formula
}
:
item
.
profit_detail
.
july
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
august
,
formula
:
item
.
profit_detail
.
august_formula
}
:
item
.
profit_detail
.
august
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
september
,
formula
:
item
.
profit_detail
.
september_formula
}
:
item
.
profit_detail
.
september
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
october
,
formula
:
item
.
profit_detail
.
october_formula
}
:
item
.
profit_detail
.
october
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
november
,
formula
:
item
.
profit_detail
.
november_formula
}
:
item
.
profit_detail
.
november
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
december
,
formula
:
item
.
profit_detail
.
december_formula
}
:
item
.
profit_detail
.
december
,
item
.
profit_detail
.
total_current_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
profit_detail
.
total_next_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
profit_detail
.
total_more_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
profit_detail
.
forecast_formula
==
null
?
[]
:
item
.
profit_detail
.
forecast_formula
])
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
{
}
else
{
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
}
}
...
@@ -467,7 +553,7 @@ export default class SubHolding extends Component {
...
@@ -467,7 +553,7 @@ export default class SubHolding extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
padding
:
'0px 20px 10px 20px'
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
padding
:
'0px 20px 10px 20px'
}}
>
<
div
><
/div
>
<
div
><
/div
>
{
this
.
state
.
previewDownload
&&
(
{
this
.
state
.
previewDownload
&&
(
<
div
style
=
{{
width
:
'50%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
div
style
=
{{
width
:
'50%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
...
...
src/container/Laporan/TableSubHolding.js
View file @
4d4f20cf
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