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
ee1aaf44
Commit
ee1aaf44
authored
Dec 24, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue lagi
parent
587548ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
32 deletions
+47
-32
OperatingIndicatorMR.js
src/container/MonthlyReport/OperatingIndicatorMR.js
+44
-29
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+3
-3
No files found.
src/container/MonthlyReport/OperatingIndicatorMR.js
View file @
ee1aaf44
...
...
@@ -63,6 +63,7 @@ export default class OperatingIndicatorMR extends Component {
editable
:
true
,
emptyData
:
false
,
templateNull
:
true
,
judulColumn
:
null
,
get_for
:
'view'
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -353,7 +354,7 @@ export default class OperatingIndicatorMR extends Component {
monthly_report
:
payload
}
console
.
log
(
body
)
this
.
setState
({
payload
:
body
,
buttonError
:
false
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
0
][
0
]
})
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
0
][
0
]
})
}
});
}
...
...
@@ -431,7 +432,7 @@ 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
,
monthly_report
:
data
}
console
.
log
(
data
);
console
.
log
(
body
);
// // console.log(JSON.stringify(body))
api
.
create
(
'UPLOAD'
).
uploadMonthlyReportOI
(
body
).
then
(
response
=>
{
// // console.log(response);
...
...
@@ -1374,6 +1375,11 @@ export default class OperatingIndicatorMR extends Component {
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Monthly
Report
Submission
<
/Typography
>
<
/div
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Snackbar
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
{
this
.
state
.
visibleOI
===
true
?
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
...
...
@@ -1463,7 +1469,7 @@ export default class OperatingIndicatorMR extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
,
marginTop
:
10
}}
>
Notes
:
{
this
.
state
.
notesUpdate
}
<
/Typography
>
<
/div
>
<
div
className
=
"grid grid-2x"
>
<
div
className
=
"col-1"
>
<
div
className
=
"col-1"
style
=
{{
paddingLeft
:
20
}}
>
<
button
className
=
"button"
type
=
"button"
...
...
@@ -1484,7 +1490,7 @@ export default class OperatingIndicatorMR extends Component {
<
/div
>
<
/button
>
<
/div
>
{
!
this
.
state
.
emptyData
&&
(
this
.
props
.
permission
.
create
||
this
.
props
.
permission
.
edit
)
&&
this
.
props
.
isSubmit
&&
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
{
!
this
.
state
.
emptyData
&&
(
this
.
props
.
permission
.
create
||
this
.
props
.
permission
.
edit
)
&&
this
.
props
.
isSubmit
&&
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
,
paddingRight
:
2
}}
>
{
this
.
state
.
get_for
==
'view'
&&
<
button
type
=
"button"
onClick
=
{()
=>
{
...
...
@@ -1492,7 +1498,7 @@ export default class OperatingIndicatorMR extends Component {
this
.
handleGetFor
(
'edit'
)
})
}}
style
=
{{
marginRight
:
2
0
}}
style
=
{{
marginRight
:
2
1
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Edit
<
/Typography
>
...
...
@@ -1517,19 +1523,23 @@ export default class OperatingIndicatorMR extends Component {
{
this
.
state
.
get_for
==
'edit'
&&
<
button
className
=
"button"
type
=
"button"
disabled
=
{
this
.
state
.
editable
}
//
disabled={this.state.editable}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
===
true
?
'default'
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
createData
(
"draft"
)
},
100
);
})}
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete !'
,
tipeAlert
:
'error'
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
createData
(
"draft"
)
},
100
);
})}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
{
this
.
state
.
editable
===
true
?
...
...
@@ -1543,15 +1553,19 @@ export default class OperatingIndicatorMR extends Component {
<
/button>
}
{
this
.
state
.
get_for
==
'edit'
&&
<
button
type
=
"button"
disabled
=
{
this
.
state
.
editable
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
createData
(
"submitted"
)
},
100
);
})}
// disabled={this.state.editable}
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete !'
,
tipeAlert
:
'error'
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
createData
(
"submitted"
)
},
100
);
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
===
true
?
'default'
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
...
...
@@ -1649,12 +1663,12 @@ export default class OperatingIndicatorMR extends Component {
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
===
true
?
'default'
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
disabled
=
{
this
.
state
.
editable
}
//
disabled={this.state.editable}
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
null
:
this
.
setState
({
loading
:
true
},
()
=>
{
...
...
@@ -1677,16 +1691,17 @@ export default class OperatingIndicatorMR extends Component {
type
=
"button"
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
null
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadOI
(
"submitted"
)
},
100
);
})}
disabled
=
{
this
.
state
.
editable
}
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete !'
,
tipeAlert
:
'error'
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadOI
(
"submitted"
)
},
100
);
})}
// disabled={this.state.editable}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
===
true
?
'default'
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
ee1aaf44
...
...
@@ -561,7 +561,7 @@ export default class ProfitLossMR extends Component {
let
err
=
false
this
.
state
.
dataTable
.
map
((
i
,
index
)
=>
{
if
(
i
[
0
]
===
3
&&
i
[
4
]
===
2
)
{
console
.
log
(
i
);
//
console.log(i);
if
(
i
[
19
]
===
""
&&
(
Number
(
i
[
14
])
<
this
.
state
.
minValue
||
Number
(
i
[
14
])
>
this
.
state
.
maxValue
))
{
console
.
log
(
'msk 1'
);
// console.log(i);
...
...
@@ -608,8 +608,8 @@ export default class ProfitLossMR extends Component {
}
// console.log(JSON.stringify(payload));
api
.
create
().
validateSubmitReportPL
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
.
data
.
data
.
result
)
console
.
log
(
err
);
//
console.log(response.data.data.result)
//
console.log(err);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
data
.
result
&&
err
===
false
)
{
...
...
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