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
1bb99888
Commit
1bb99888
authored
Nov 25, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save oi
parent
784dbe20
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
index.js
src/api/index.js
+2
-0
OperatingIndicatorMR.js
src/container/MonthlyReport/OperatingIndicatorMR.js
+47
-0
No files found.
src/api/index.js
View file @
1bb99888
...
@@ -269,6 +269,7 @@ const create = (type = "") => {
...
@@ -269,6 +269,7 @@ const create = (type = "") => {
const
createMonthlyReportBS
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/create_monthly_report'
,
body
)
const
createMonthlyReportBS
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/create_monthly_report'
,
body
)
const
createMonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/create_monthly_report'
,
body
)
const
createMonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/create_monthly_report'
,
body
)
const
createMonthlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/create_monthly_report'
,
body
)
const
createMonthlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/create_monthly_report'
,
body
)
const
createMonthlyReportOI
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_oi/create_monthly_report'
,
body
)
const
checkUploadMonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/check_import'
,
body
)
const
checkUploadMonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/check_import'
,
body
)
...
@@ -410,6 +411,7 @@ const create = (type = "") => {
...
@@ -410,6 +411,7 @@ const create = (type = "") => {
createMonthlyReportTP
,
createMonthlyReportTP
,
createMonthlyReportPL
,
createMonthlyReportPL
,
createMonthlyReportFAM
,
createMonthlyReportFAM
,
createMonthlyReportOI
,
getSubmission
,
getSubmission
,
checkUploadMB
,
checkUploadMB
,
getAllOperatingInd
,
getAllOperatingInd
,
...
...
src/container/MonthlyReport/OperatingIndicatorMR.js
View file @
1bb99888
...
@@ -158,6 +158,53 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -158,6 +158,53 @@ export default class OperatingIndicatorMR extends Component {
}
}
}
}
backToMonthlyReport
(
type
)
{
// console.log(this.state.dataTable);
let
data
=
[]
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
"item_report_id"
:
i
[
1
],
"uom"
:
i
[
6
],
"rolling_outlook"
:
i
[
7
],
"master_budget"
:
i
[
8
],
"rolling_budget"
:
i
[
9
],
"actual"
:
i
[
10
],
"amount_act_vs_mb"
:
i
[
11
],
"percent_act_vs_mb"
:
i
[
12
],
"amount_act_vs_rb"
:
i
[
13
],
"percent_act_vs_rb"
:
i
[
14
],
"mtd_vs_mb"
:
i
[
15
],
"mtd_vs_rb"
:
i
[
16
]
})
})
let
payload
=
{
"monthly_report_id"
:
this
.
props
.
submissionID
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"status"
:
type
,
"months"
:
this
.
props
.
month
.
month_id
,
"operating_indicator"
:
data
}
api
.
create
(
'UPLOAD'
).
createMonthlyReportOI
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
saveToMonthlyReport
()
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
props
.
saveToMonthlyReport
()
})
}
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
})
}
render
()
{
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
const
handleValue
=
(
data
,
type
)
=>
{
const
handleValue
=
(
data
,
type
)
=>
{
...
...
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