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
6082078f
Commit
6082078f
authored
Mar 19, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
terakhiir
parent
f54a12fa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
23 deletions
+25
-23
index.js
src/api/index.js
+3
-1
OperatingIndicatorRO.js
src/container/RollingOutlook/OperatingIndicatorRO.js
+22
-22
No files found.
src/api/index.js
View file @
6082078f
...
@@ -268,6 +268,7 @@ const create = (type = "") => {
...
@@ -268,6 +268,7 @@ const create = (type = "") => {
const
createRollingOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/create_rolling_outlook'
,
body
)
const
createRollingOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/create_rolling_outlook'
,
body
)
const
getLastestUpdateROOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/get_latest_update'
,
body
)
const
getLastestUpdateROOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/get_latest_update'
,
body
)
const
checkUploadRollingOutlookOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/check_import'
,
body
)
const
checkUploadRollingOutlookOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/check_import'
,
body
)
const
uploadRollingOutlookOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/import_rolling_outlook'
,
body
)
...
@@ -752,7 +753,8 @@ const create = (type = "") => {
...
@@ -752,7 +753,8 @@ const create = (type = "") => {
getHierarkiRollingOI
,
getHierarkiRollingOI
,
createRollingOI
,
createRollingOI
,
getLastestUpdateROOI
,
getLastestUpdateROOI
,
checkUploadRollingOutlookOI
checkUploadRollingOutlookOI
,
uploadRollingOutlookOI
}
}
}
}
...
...
src/container/RollingOutlook/OperatingIndicatorRO.js
View file @
6082078f
...
@@ -465,36 +465,36 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -465,36 +465,36 @@ export default class OperatingIndicatorRO extends Component {
// // console.log(this.state.dataTable)
// // console.log(this.state.dataTable)
this
.
state
.
dataTable
.
map
(
i
=>
{
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
data
.
push
({
"item_report_id"
:
i
[
1
],
item_report_id
:
i
[
1
],
"item_report"
:
String
(
i
[
5
]),
item_report
:
String
(
i
[
5
]),
"total_actual_before"
:
String
(
Number
(
i
[
7
]
==
null
?
"0"
:
i
[
7
]).
toFixed
(
1
)),
january
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
"january"
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
february
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
"february"
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
march
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
"march"
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
april
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
"april"
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
may
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
"may"
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
june
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
"june"
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
july
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
"july"
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
august
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
"august"
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
september
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
"september"
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
october
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
"october"
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
"november"
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
"december"
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
"total_current_year"
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
)),
})
})
})
})
let
body
=
{
let
body
=
{
company_id
:
this
.
props
.
data
.
company
.
company_id
,
company_id
:
this
.
props
.
data
.
company
.
company_id
,
operating_indicator_id
:
this
.
props
.
data
.
operatingIndID
,
operating_indicator_id
:
this
.
state
.
operatingIndIDRolling
,
periode
:
this
.
props
.
data
.
periode
,
periode
:
this
.
props
.
data
.
periode
,
quartal
:
this
.
props
.
quartal
,
report_id
:
this
.
props
.
data
.
report_id
,
report_id
:
this
.
props
.
data
.
report_id
,
status
:
type
,
status
:
type
,
rolling_outlook
:
data
rolling_outlook
:
data
}
}
// // console.log(data);
// // console.log(data);
// // console.log(JSON.stringify(body))
// // console.log(JSON.stringify(body))
api
.
create
(
'UPLOAD'
).
upload
OperatingInd
(
body
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
upload
RollingOutlookOI
(
body
).
then
(
response
=>
{
// //
console.log(response);
console
.
log
(
response
);
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
@@ -2280,9 +2280,9 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -2280,9 +2280,9 @@ export default class OperatingIndicatorRO extends Component {
outline
:
'none'
,
outline
:
'none'
,
marginRight
:
20
marginRight
:
20
}}
}}
disabled
=
{
this
.
state
.
editable
}
//
disabled={this.state.editable}
onClick
=
{()
=>
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
state
.
saveDraft
===
true
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete !'
,
tipeAlert
:
'error'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete !'
,
tipeAlert
:
'error'
})
:
:
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
...
@@ -2306,7 +2306,7 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -2306,7 +2306,7 @@ export default class OperatingIndicatorRO extends Component {
this
.
uploadOI
(
"submitted"
)
this
.
uploadOI
(
"submitted"
)
},
100
);
},
100
);
})}
})}
disabled
=
{
this
.
state
.
editable
}
//
disabled={this.state.editable}
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
'pointer'
,
...
...
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