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
fadd910f
Commit
fadd910f
authored
Dec 24, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
issue OI See merge request
!860
parents
af5a51a0
dc904c50
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
24 deletions
+29
-24
index.js
src/api/index.js
+3
-1
OperatingIndicatorMR.js
src/container/MonthlyReport/OperatingIndicatorMR.js
+26
-23
No files found.
src/api/index.js
View file @
fadd910f
...
...
@@ -254,6 +254,7 @@ const create = (type = "") => {
// Monthly
const
getMonthlyReport
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/get_all_report'
,
body
)
const
getMonthlyOI
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_oi/get_operating_indicator_id'
,
body
)
const
getMonthlyReportID
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/get_monthly_report_id'
,
body
)
const
getHierarkiMontlyReportBS
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportOI
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_oi/get_report_hierarki'
,
body
)
...
...
@@ -530,7 +531,8 @@ const create = (type = "") => {
getPerBSiMontlyReportLOCF
,
checkUploadMonthlyReportLOCF
,
uploadMonthlyReportLOCF
,
validateSubmitReportOI
validateSubmitReportOI
,
getMonthlyOI
}
}
...
...
src/container/MonthlyReport/OperatingIndicatorMR.js
View file @
fadd910f
...
...
@@ -84,7 +84,7 @@ export default class OperatingIndicatorMR extends Component {
getLatestUpdate
()
{
let
payload
=
{
"operating_indicator_id"
:
this
.
props
.
data
.
operatingIndID
,
"operating_indicator_id"
:
this
.
state
.
operatingIndIDMonthly
,
"report_id"
:
this
.
props
.
data
.
report_id
,
"company_id"
:
this
.
props
.
data
.
company
.
company_id
,
"periode"
:
this
.
props
.
data
.
periode
,
...
...
@@ -148,12 +148,14 @@ export default class OperatingIndicatorMR extends Component {
}
getOperatingIDMonthly
()
{
// console.log(this.props.data.operatingIndID);
let
payload
=
{
"company_id"
:
this
.
props
.
data
.
company
.
company_id
,
"periode"
:
this
.
props
.
data
.
periode
.
periode
,
"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
}
api
.
create
().
getOpetratingIndID
(
payload
).
then
(
response
=>
{
api
.
create
().
getMonthlyOI
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
)
{
if
(
response
.
data
.
data
)
{
this
.
setState
({
operatingIndIDMonthly
:
response
.
data
.
data
.
operating_indicator_id
}
,
()
=>
{
...
...
@@ -178,12 +180,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
);
api
.
create
().
getHierarkiMontlyReportOI
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
// console.log(JSON.stringify(response));
let
dataTable
=
[]
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
console
.
log
(
res
);
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
...
...
@@ -196,13 +199,13 @@ export default class OperatingIndicatorMR extends Component {
item
.
description
,
item
.
uom
===
""
?
null
:
item
.
uom
,
item
.
monthly_report
.
rolling_outlook
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
,
item
.
monthly_report
.
master_budget
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
master_budget
,
item
.
monthly_report
.
rolling_budget
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_
outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
rolling_budget
,
item
.
monthly_report
.
actual
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
actual
,
item
.
monthly_report
.
amount_act_vs_mb
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_mb
,
item
.
monthly_report
.
percent_act_vs_mb
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_mb
,
item
.
monthly_report
.
amount_act_vs_rb
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_rb
,
item
.
monthly_report
.
percent_act_vs_rb
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_rb
,
item
.
monthly_report
.
master_budget
===
null
?
"0.0"
:
item
.
monthly_report
.
master_budget
===
""
?
"0.0"
:
item
.
monthly_report
.
master_budget
,
item
.
monthly_report
.
rolling_budget
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_
budget
===
""
?
"0.0"
:
item
.
monthly_report
.
rolling_budget
,
item
.
monthly_report
.
actual
===
null
?
"0.0"
:
item
.
monthly_report
.
actual
===
""
?
"0.0"
:
item
.
monthly_report
.
actual
,
item
.
monthly_report
.
amount_act_vs_mb
===
null
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_mb
===
""
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_mb
,
item
.
monthly_report
.
percent_act_vs_mb
===
null
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_mb
===
""
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_mb
,
item
.
monthly_report
.
amount_act_vs_rb
===
null
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_rb
===
""
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_rb
,
item
.
monthly_report
.
percent_act_vs_rb
===
null
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_rb
===
""
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_rb
,
item
.
monthly_report
.
mtd_vs_mb
===
null
?
""
:
item
.
monthly_report
.
mtd_vs_mb
,
item
.
monthly_report
.
mtd_vs_rb
===
null
?
""
:
item
.
monthly_report
.
mtd_vs_rb
,
item
.
order
,
...
...
@@ -226,13 +229,13 @@ export default class OperatingIndicatorMR extends Component {
item
.
description
,
item
.
uom
===
""
?
null
:
item
.
uom
,
item
.
monthly_report
.
rolling_outlook
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
,
item
.
monthly_report
.
master_budget
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
master_budget
,
item
.
monthly_report
.
rolling_budget
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_
outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
rolling_budget
,
item
.
monthly_report
.
actual
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
actual
,
item
.
monthly_report
.
amount_act_vs_mb
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_mb
,
item
.
monthly_report
.
percent_act_vs_mb
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_mb
,
item
.
monthly_report
.
amount_act_vs_rb
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_rb
,
item
.
monthly_report
.
percent_act_vs_rb
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_outlook
===
""
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_rb
,
item
.
monthly_report
.
master_budget
===
null
?
"0.0"
:
item
.
monthly_report
.
master_budget
===
""
?
"0.0"
:
item
.
monthly_report
.
master_budget
,
item
.
monthly_report
.
rolling_budget
===
null
?
"0.0"
:
item
.
monthly_report
.
rolling_
budget
===
""
?
"0.0"
:
item
.
monthly_report
.
rolling_budget
,
item
.
monthly_report
.
actual
===
null
?
"0.0"
:
item
.
monthly_report
.
actual
===
""
?
"0.0"
:
item
.
monthly_report
.
actual
,
item
.
monthly_report
.
amount_act_vs_mb
===
null
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_mb
===
""
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_mb
,
item
.
monthly_report
.
percent_act_vs_mb
===
null
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_mb
===
""
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_mb
,
item
.
monthly_report
.
amount_act_vs_rb
===
null
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_rb
===
""
?
"0.0"
:
item
.
monthly_report
.
amount_act_vs_rb
,
item
.
monthly_report
.
percent_act_vs_rb
===
null
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_rb
===
""
?
"0.0"
:
item
.
monthly_report
.
percent_act_vs_rb
,
item
.
monthly_report
.
mtd_vs_mb
===
null
?
""
:
item
.
monthly_report
.
mtd_vs_mb
,
item
.
monthly_report
.
mtd_vs_rb
===
null
?
""
:
item
.
monthly_report
.
mtd_vs_rb
,
item
.
order
,
...
...
@@ -306,7 +309,7 @@ export default class OperatingIndicatorMR extends Component {
})
})
let
payload
=
{
"operating_indicator_id"
:
this
.
props
.
data
.
operatingIndID
,
"operating_indicator_id"
:
this
.
state
.
operatingIndIDMonthly
,
"report_id"
:
this
.
props
.
data
.
report_id
,
"company_id"
:
this
.
props
.
data
.
company
.
company_id
,
"periode"
:
this
.
props
.
data
.
periode
,
...
...
@@ -425,15 +428,15 @@ export default class OperatingIndicatorMR extends Component {
})
let
body
=
{
company_id
:
this
.
props
.
data
.
company
.
company_id
,
operating_indicator_id
:
this
.
props
.
data
.
operatingIndID
,
operating_indicator_id
:
this
.
state
.
operatingIndIDMonthly
,
periode
:
this
.
props
.
data
.
periode
,
report_id
:
this
.
props
.
data
.
report_id
,
status
:
type
,
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
,
monthly_report
:
data
}
console
.
log
(
body
);
//
//
console.log(JSON.stringify(body))
//
console.log(body);
// console.log(JSON.stringify(body))
api
.
create
(
'UPLOAD'
).
uploadMonthlyReportOI
(
body
).
then
(
response
=>
{
// // console.log(response);
this
.
setState
({
loading
:
false
})
...
...
@@ -482,7 +485,7 @@ export default class OperatingIndicatorMR extends Component {
// console.log(JSON.stringify(data))
let
payload
=
{
"operating_indicator_id"
:
this
.
props
.
data
.
operatingIndID
,
"operating_indicator_id"
:
this
.
state
.
operatingIndIDMonthly
,
"report_id"
:
this
.
props
.
data
.
report_id
,
"company_id"
:
this
.
props
.
data
.
company
.
company_id
,
"periode"
:
this
.
props
.
data
.
periode
,
...
...
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