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
80c7dec5
Commit
80c7dec5
authored
Dec 24, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latest update
parent
dc904c50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
OperatingIndicatorMR.js
src/container/MonthlyReport/OperatingIndicatorMR.js
+12
-9
No files found.
src/container/MonthlyReport/OperatingIndicatorMR.js
View file @
80c7dec5
...
...
@@ -72,13 +72,13 @@ export default class OperatingIndicatorMR extends Component {
componentDidMount
()
{
// this.getItemHierarki()
this
.
getSettingControl
()
this
.
getLatestUpdate
()
//
this.getLatestUpdate()
}
handleGetFor
(
type
)
{
this
.
setState
({
get_for
:
type
},
()
=>
{
this
.
getSettingControl
()
this
.
getLatestUpdate
()
//
this.getLatestUpdate()
})
}
...
...
@@ -90,8 +90,9 @@ export default class OperatingIndicatorMR extends Component {
"periode"
:
this
.
props
.
data
.
periode
,
"months"
:
this
.
props
.
data
.
report_id
===
22
?
1
:
23
?
2
:
24
?
3
:
25
?
4
:
27
?
5
:
28
?
6
:
29
?
7
:
31
?
8
:
32
?
9
:
33
?
10
:
35
?
11
:
36
?
12
:
null
}
// console.log(payload);
api
.
create
().
getLastestUpdateMROI
(
payload
).
then
(
response
=>
{
console
.
log
(
response
.
data
)
//
console.log(response.data)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
...
...
@@ -122,7 +123,7 @@ export default class OperatingIndicatorMR extends Component {
}
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
...
...
@@ -155,15 +156,17 @@ export default class OperatingIndicatorMR extends Component {
"months"
:
this
.
props
.
data
.
report_id
===
22
?
1
:
23
?
2
:
24
?
3
:
25
?
4
:
27
?
5
:
28
?
6
:
29
?
7
:
31
?
8
:
32
?
9
:
33
?
10
:
35
?
11
:
36
?
12
:
null
}
api
.
create
().
getMonthlyOI
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
if
(
response
)
{
if
(
response
.
data
.
data
)
{
this
.
setState
({
operatingIndIDMonthly
:
response
.
data
.
data
.
operating_indicator_id
}
,
()
=>
{
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
})
}
else
{
this
.
setState
({
operatingIndIDMonthly
:
null
},
()
=>
{
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
})
}
}
...
...
@@ -180,13 +183,13 @@ export default class OperatingIndicatorMR extends Component {
"months"
:
this
.
props
.
data
.
report_id
===
22
?
1
:
23
?
2
:
24
?
3
:
25
?
4
:
27
?
5
:
28
?
6
:
29
?
7
:
31
?
8
:
32
?
9
:
33
?
10
:
35
?
11
:
36
?
12
:
null
,
"get_for"
:
this
.
state
.
get_for
}
console
.
log
(
payload
);
//
console.log(payload);
api
.
create
().
getHierarkiMontlyReportOI
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
let
dataTable
=
[]
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
console
.
log
(
res
);
//
console.log(res);
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
...
...
@@ -254,7 +257,7 @@ export default class OperatingIndicatorMR extends Component {
}
})
}
console
.
log
(
dataTable
);
//
console.log(dataTable);
})
}
...
...
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