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
b3763a9c
Commit
b3763a9c
authored
Jan 26, 2021
by
Rifka Kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
tp get mr See merge request
!1027
parents
a0cb23e1
c23598d9
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
154 additions
and
91 deletions
+154
-91
SubHolding.js
src/container/Laporan/SubHolding.js
+75
-77
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+79
-14
No files found.
src/container/Laporan/SubHolding.js
View file @
b3763a9c
...
@@ -733,9 +733,10 @@ export default class SubHolding extends Component {
...
@@ -733,9 +733,10 @@ export default class SubHolding extends Component {
}
}
}
}
})
})
this
.
setState
({
dataTable
,
loading
:
false
,
previewTable
:
true
,
previewDownload
:
true
},
()
=>
{
console
.
log
(
dataTable
)
console
.
log
(
this
.
state
.
dataTable
)
// this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
// this.getTaxPlanMR(payload)
this
.
setState
({
dataTable
},
()
=>
{
this
.
getTaxPlanMR
(
payload
)
})
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
...
@@ -1643,86 +1644,83 @@ export default class SubHolding extends Component {
...
@@ -1643,86 +1644,83 @@ export default class SubHolding extends Component {
}
}
getTaxPlanMR
(
payload
)
{
getTaxPlanMR
(
payload
)
{
let
payloadLast
=
{
"report_id"
:
this
.
state
.
report
.
value
,
"revision"
:
this
.
state
.
revisionType
,
"periode"
:
Number
(
this
.
state
.
periode
.
periode
)
-
1
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"submission_id"
:
this
.
state
.
submissionID
}
api
.
create
().
getReportTPMR
(
payload
).
then
(
response
=>
{
api
.
create
().
getReportTPMR
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
payload
);
console
.
log
(
response
);
console
.
log
(
response
);
let
dataTable
=
this
.
state
.
dataTable
let
dataTable
=
this
.
state
.
dataTable
// let dataTable2 = []
console
.
log
(
dataTable
)
// if (response.data) {
let
dataTable2
=
[]
// let res = response.data.data
if
(
response
.
data
)
{
// res.map((item,index) => {
let
res
=
response
.
data
.
data
// let indexID = dataTable.findIndex((val) => val[1] == item.id)
res
.
map
((
item
,
index
)
=>
{
// if (indexID != -1) {
let
indexID
=
dataTable
.
findIndex
((
val
)
=>
val
[
4
]
==
item
.
id
)
// const handlePushChild = (items) => {
console
.
log
(
indexID
)
// let indexIDzz = dataTable.findIndex((val) => val[1] === items.id)
if
(
indexID
!=
-
1
)
{
// // console.log(indexIDzz)
const
handlePushChild
=
(
items
)
=>
{
// if (indexIDzz != -1) {
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
4
]
===
items
.
id
)
// dataTable2.push([...dataTable[indexIDzz],
// console.log(indexIDzz)
// Number(items.balance_sheet.january).toFixed(1),
if
(
indexIDzz
!=
-
1
)
{
// Number(items.balance_sheet.february).toFixed(1),
dataTable2
.
push
([...
dataTable
[
indexIDzz
],
// Number(items.balance_sheet.march).toFixed(1),
Number
(
items
.
tax_planning_report
.
january
).
toFixed
(
1
),
// Number(items.balance_sheet.april).toFixed(1),
Number
(
items
.
tax_planning_report
.
february
).
toFixed
(
1
),
// Number(items.balance_sheet.may).toFixed(1),
Number
(
items
.
tax_planning_report
.
march
).
toFixed
(
1
),
// Number(items.balance_sheet.june).toFixed(1),
Number
(
items
.
tax_planning_report
.
april
).
toFixed
(
1
),
// Number(items.balance_sheet.july).toFixed(1),
Number
(
items
.
tax_planning_report
.
may
).
toFixed
(
1
),
// Number(items.balance_sheet.august).toFixed(1),
Number
(
items
.
tax_planning_report
.
june
).
toFixed
(
1
),
// Number(items.balance_sheet.september).toFixed(1),
Number
(
items
.
tax_planning_report
.
july
).
toFixed
(
1
),
// Number(items.balance_sheet.october).toFixed(1),
Number
(
items
.
tax_planning_report
.
august
).
toFixed
(
1
),
// Number(items.balance_sheet.november).toFixed(1),
Number
(
items
.
tax_planning_report
.
september
).
toFixed
(
1
),
// Number(items.balance_sheet.december).toFixed(1),
Number
(
items
.
tax_planning_report
.
october
).
toFixed
(
1
),
// ])
Number
(
items
.
tax_planning_report
.
november
).
toFixed
(
1
),
// }
Number
(
items
.
tax_planning_report
.
december
).
toFixed
(
1
),
// if (items.children !== null) {
Number
(
items
.
tax_planning_report
.
total_actual_before
).
toFixed
(
1
),
// if (items.children.length > 0) {
])
// items.children.map((itemss, indexss) => {
}
// handlePushChild(itemss)
if
(
items
.
children
!==
null
)
{
// })
if
(
items
.
children
.
length
>
0
)
{
// }
items
.
children
.
map
((
itemss
,
indexss
)
=>
{
// }
handlePushChild
(
itemss
)
// }
})
}
// dataTable2.push([...dataTable[indexID],
}
// Number(item.balance_sheet.january).toFixed(1),
}
// Number(item.balance_sheet.february).toFixed(1),
// Number(item.balance_sheet.march).toFixed(1),
dataTable2
.
push
([...
dataTable
[
indexID
],
// Number(item.balance_sheet.april).toFixed(1),
Number
(
item
.
tax_planning_report
.
january
).
toFixed
(
1
),
// Number(item.balance_sheet.may).toFixed(1),
Number
(
item
.
tax_planning_report
.
february
).
toFixed
(
1
),
// Number(item.balance_sheet.june).toFixed(1),
Number
(
item
.
tax_planning_report
.
march
).
toFixed
(
1
),
// Number(item.balance_sheet.july).toFixed(1),
Number
(
item
.
tax_planning_report
.
april
).
toFixed
(
1
),
// Number(item.balance_sheet.august).toFixed(1),
Number
(
item
.
tax_planning_report
.
may
).
toFixed
(
1
),
// Number(item.balance_sheet.september).toFixed(1),
Number
(
item
.
tax_planning_report
.
june
).
toFixed
(
1
),
// Number(item.balance_sheet.october).toFixed(1),
Number
(
item
.
tax_planning_report
.
july
).
toFixed
(
1
),
// Number(item.balance_sheet.november).toFixed(1),
Number
(
item
.
tax_planning_report
.
august
).
toFixed
(
1
),
// Number(item.balance_sheet.december).toFixed(1),
Number
(
item
.
tax_planning_report
.
september
).
toFixed
(
1
),
// ])
Number
(
item
.
tax_planning_report
.
october
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
november
).
toFixed
(
1
),
// if (item.children !== null) {
Number
(
item
.
tax_planning_report
.
december
).
toFixed
(
1
),
// if (item.children.length > 0) {
Number
(
item
.
tax_planning_report
.
total_actual_before
).
toFixed
(
1
),
// item.children.map((items, indexs) => {
])
// handlePushChild(items)
// })
if
(
item
.
children
!==
null
)
{
// }
if
(
item
.
children
.
length
>
0
)
{
// }
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
}
//
}
}
//
})
})
//
console.log(dataTable2)
console
.
log
(
dataTable2
)
// //
this.setState({ dataTable: dataTable2, previewTable: true, loading: false, previewDownload: true })
this
.
setState
({
dataTable
:
dataTable2
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
//
this.setState({ dataTable2 }, () => {
//
this.setState({ dataTable2 }, () => {
//
// console.log(this.state.dataTable2)
//
// console.log(this.state.dataTable2)
//
this.getTaxPlanLastMR(payloadLast)
//
this.getTaxPlanLastMR(payloadLast)
//
})
//
})
//
} else {
}
else
{
//
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
//
}
}
})
})
}
}
...
...
src/container/Laporan/TableSubHolding.js
View file @
b3763a9c
This diff is collapsed.
Click to expand it.
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