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
8768c9e1
Commit
8768c9e1
authored
Dec 15, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
oi+ See merge request
!810
parents
b6e3007a
ce170460
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
207 additions
and
143 deletions
+207
-143
OperatingIndicatorMR.js
src/container/MonthlyReport/OperatingIndicatorMR.js
+172
-109
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+35
-34
No files found.
src/container/MonthlyReport/OperatingIndicatorMR.js
View file @
8768c9e1
...
@@ -59,6 +59,9 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -59,6 +59,9 @@ export default class OperatingIndicatorMR extends Component {
maxValue
:
0
,
maxValue
:
0
,
updateBy
:
'-'
,
updateBy
:
'-'
,
notesUpdate
:
'-'
,
notesUpdate
:
'-'
,
disabledSave
:
true
,
editable
:
true
,
emptyData
:
false
,
templateNull
:
true
templateNull
:
true
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
@@ -136,7 +139,7 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -136,7 +139,7 @@ export default class OperatingIndicatorMR extends Component {
}
}
getItemHierarki
()
{
getItemHierarki
()
{
this
.
setState
({
loading
:
true
})
let
payload
=
{
let
payload
=
{
"operating_indicator_id"
:
this
.
props
.
data
.
operatingIndID
,
"operating_indicator_id"
:
this
.
props
.
data
.
operatingIndID
,
"report_id"
:
this
.
props
.
data
.
report_id
,
"report_id"
:
this
.
props
.
data
.
report_id
,
...
@@ -211,11 +214,15 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -211,11 +214,15 @@ export default class OperatingIndicatorMR extends Component {
}
}
}
}
})
})
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
,
loading
:
false
},
()
=>
{
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
saveDraft
:
true
})
if
(
this
.
state
.
dataTable
.
length
==
0
)
{
this
.
setState
({
emptyData
:
true
})
}
}
})
})
}
}
console
.
log
(
dataTable
);
})
}
downloadTemplate
=
async
()
=>
{
downloadTemplate
=
async
()
=>
{
let
res
=
await
fetch
(
let
res
=
await
fetch
(
...
@@ -360,7 +367,7 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -360,7 +367,7 @@ export default class OperatingIndicatorMR extends Component {
item
.
error
item
.
error
]
]
})
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
templateNull
:
total
>
0
?
true
:
false
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
templateNull
:
total
>
0
?
true
:
false
})
}
}
}
}
})
})
...
@@ -412,12 +419,83 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -412,12 +419,83 @@ export default class OperatingIndicatorMR extends Component {
})
})
}
}
handleValidate
()
{
let
data
=
[]
let
err
=
false
this
.
state
.
dataTable
.
map
((
i
,
index
)
=>
{
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
]
})
})
// console.log(JSON.stringify(data));
data
.
map
(
i
=>
{
if
(
i
.
mtd_vs_mb
===
""
&&
(
Number
(
i
.
percent_act_vs_mb
)
<
this
.
state
.
minValue
||
Number
(
i
.
percent_act_vs_mb
)
>
this
.
state
.
maxValue
))
{
console
.
log
(
'msk 1'
);
err
=
true
}
else
if
(
i
.
mtd_vs_rb
===
""
&&
(
Number
(
i
.
percent_act_vs_rb
)
<
this
.
state
.
minValue
||
Number
(
i
.
percent_act_vs_rb
)
>
this
.
state
.
maxValue
))
{
console
.
log
(
'msk 2'
);
err
=
true
}
})
// console.log(JSON.stringify(data))
let
payload
=
{
"operating_indicator_id"
:
this
.
props
.
data
.
operatingIndID
,
"report_id"
:
this
.
props
.
data
.
report_id
,
"company_id"
:
this
.
props
.
data
.
company
.
company_id
,
"periode"
:
this
.
props
.
data
.
periode
,
"status"
:
"submitted"
,
"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(JSON.stringify(payload));
api
.
create
().
validateSubmitReportOI
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
data
.
result
&&
err
===
false
)
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
false
,
saveDraft
:
false
})
}
else
{
this
.
setState
({
loading
:
false
,
buttonError
:
true
,
editable
:
true
,
saveDraft
:
false
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
})
}
closeAlert
()
{
closeAlert
()
{
this
.
setState
({
alert
:
false
})
this
.
setState
({
alert
:
false
})
}
}
render
()
{
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
const
handleText
=
(
value
,
tableMeta
,
type
)
=>
{
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
+
type
]
=
value
}
const
handleValue
=
(
data
,
type
)
=>
{
const
handleValue
=
(
data
,
type
)
=>
{
let
total
=
0
let
total
=
0
dataTable2
.
map
((
item
,
index
)
=>
{
dataTable2
.
map
((
item
,
index
)
=>
{
...
@@ -1012,7 +1090,7 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -1012,7 +1090,7 @@ export default class OperatingIndicatorMR extends Component {
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
Number
(
tableMeta
.
rowData
[
12
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
12
])
>
this
.
state
.
maxValue
?
'red'
:
'black'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
suffix
=
{
'%'
}
suffix
=
{
'%'
}
...
@@ -1065,7 +1143,7 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -1065,7 +1143,7 @@ export default class OperatingIndicatorMR extends Component {
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
Number
(
tableMeta
.
rowData
[
14
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
])
>
this
.
state
.
maxValue
?
'red'
:
'black'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
...
@@ -1135,113 +1213,101 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -1135,113 +1213,101 @@ export default class OperatingIndicatorMR extends Component {
<
div
className
=
"grid grid-2x content-center"
>
<
div
className
=
"grid grid-2x content-center"
>
<
div
className
=
"col-1"
>
<
div
className
=
"col-1"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
Number
(
tableMeta
.
rowData
[
12
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
12
])
>=
this
.
state
.
maxValue
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
value
=
{
tableMeta
.
rowData
[
15
]
}
// value={value
}
control
=
{
control
=
{
<
NumberFormat
tableMeta
.
rowData
[
15
]
===
""
&&
(
Number
(
tableMeta
.
rowData
[
12
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
12
])
>
this
.
state
.
maxValue
)
?
thousandSeparator
=
{
true
}
<
LightTooltipError
title
=
{
"MTD Explanation vs Prev Month is Reqiured"
}
arrow
>
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
<
Input
disableUnderline
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
// disabled={false}
value
=
{
Number
(
tableMeta
.
rowData
[
15
]).
toFixed
(
1
)}
defaultValue
=
{
tableMeta
.
rowData
[
15
]}
inputProps
=
{{
style
:
{
color
:
"#5198ea"
,
textAlign
:
'right'
,
backgroundColor
:
'#ffac99'
}
}}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
handle
Change
(
event
.
target
.
value
,
tableMeta
)
handle
Text
(
event
.
target
.
value
,
tableMeta
,
0
)
}}
}}
/
>
/
>
}
<
/LightTooltipError
>
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
,
0
)).
toFixed
(
1
)}
/
>
<
/span>
:
:
<
div
style
=
{{
flex
:
1
}}
>
<
Input
<
FormControlLabel
disableUnderline
=
{
true
}
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
defaultValue
=
{
tableMeta
.
rowData
[
15
]}
value
=
{
Number
(
tableMeta
.
rowData
[
15
]).
toFixed
(
1
)}
inputProps
=
{{
style
:
{
color
:
Number
(
tableMeta
.
rowData
[
12
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
12
])
>
this
.
state
.
maxValue
?
"#5198ea"
:
'#5198ea'
,
textAlign
:
'right'
}
}}
onBlur
=
{(
event
)
=>
{
handleText
(
event
.
target
.
value
,
tableMeta
,
0
)
}}
/
>
/
>
}
}
/
>
/
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"col-2"
>
<
div
className
=
"col-2"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
Number
(
tableMeta
.
rowData
[
14
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
])
>=
this
.
state
.
maxValue
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
value
=
{
tableMeta
.
rowData
[
16
]
}
// value={value
}
control
=
{
control
=
{
<
NumberFormat
tableMeta
.
rowData
[
16
]
===
""
&&
(
Number
(
tableMeta
.
rowData
[
14
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
])
>
this
.
state
.
maxValue
)
?
thousandSeparator
=
{
true
}
<
LightTooltipError
title
=
{
"MTD Explanation vs Prev Month is Reqiured"
}
arrow
>
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
<
Input
disableUnderline
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
// disabled={false}
value
=
{
Number
(
tableMeta
.
rowData
[
16
]).
toFixed
(
1
)}
defaultValue
=
{
tableMeta
.
rowData
[
16
]}
inputProps
=
{{
style
:
{
color
:
"#5198ea"
,
textAlign
:
'right'
,
backgroundColor
:
'#ffac99'
}
}}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleText
(
event
.
target
.
value
,
tableMeta
,
1
)
}}
}}
/
>
/
>
}
<
/LightTooltipError
>
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
,
0
)).
toFixed
(
1
)}
/
>
<
/span>
:
:
<
div
style
=
{{
flex
:
1
}}
>
<
Input
<
FormControlLabel
disableUnderline
=
{
true
}
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
defaultValue
=
{
tableMeta
.
rowData
[
16
]}
value
=
{
Number
(
tableMeta
.
rowData
[
16
]).
toFixed
(
1
)}
inputProps
=
{{
style
:
{
color
:
Number
(
tableMeta
.
rowData
[
14
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
])
>
this
.
state
.
maxValue
?
"#5198ea"
:
'#5198ea'
,
textAlign
:
'right'
}
}}
onBlur
=
{(
event
)
=>
{
handleText
(
event
.
target
.
value
,
tableMeta
,
1
)
}}
/
>
/
>
}
}
/
>
/
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -1273,13 +1339,8 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -1273,13 +1339,8 @@ export default class OperatingIndicatorMR extends Component {
return
(
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Monthly
Report
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Monthly
Report
Submission
<
/Typography
>
<
/div
>
<
/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%'
}}
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
{
this
.
state
.
visibleOI
===
true
?
{
this
.
state
.
visibleOI
===
true
?
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
...
@@ -1377,11 +1438,12 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -1377,11 +1438,12 @@ export default class OperatingIndicatorMR extends Component {
cursor
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
}}
}}
onClick
=
{()
=>
{
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
this
.
props
.
getReport
()
}
},
100
);
}
}
)}
>
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
...
@@ -1394,6 +1456,7 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -1394,6 +1456,7 @@ export default class OperatingIndicatorMR extends Component {
onClick
=
{()
=>
onClick
=
{()
=>
this
.
setState
({
loading
:
true
,
editable
:
false
},
()
=>
{
this
.
setState
({
loading
:
true
,
editable
:
false
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
handleValidate
()
this
.
setState
({
loading
:
false
,
buttonError
:
false
})
this
.
setState
({
loading
:
false
,
buttonError
:
false
})
},
100
);
},
100
);
})
})
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
8768c9e1
...
@@ -197,7 +197,7 @@ export default class ProfitLossMR extends Component {
...
@@ -197,7 +197,7 @@ export default class ProfitLossMR extends Component {
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
,
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
,
item
.
profit_loss
.
actual
===
null
?
"0.0"
:
item
.
profit_loss
.
actual
===
""
?
"0.0"
:
item
.
profit_loss
.
actual
,
item
.
profit_loss
.
actual
===
null
?
"0.0"
:
item
.
profit_loss
.
actual
===
""
?
"0.0"
:
item
.
profit_loss
.
actual
,
item
.
profit_loss
.
ytd_actual
===
null
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
===
""
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
,
item
.
profit_loss
.
ytd_actual
===
null
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
===
""
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
,
item
.
profit_loss
.
actual_previous_month
===
null
?
"
0.0"
:
item
.
profit_loss
.
actual_previous_month
===
""
?
"0
.0"
:
item
.
profit_loss
.
actual_previous_month
,
item
.
profit_loss
.
actual_previous_month
===
null
?
"
5.0"
:
item
.
profit_loss
.
actual_previous_month
===
""
?
"5
.0"
:
item
.
profit_loss
.
actual_previous_month
,
item
.
profit_loss
.
amount_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
,
item
.
profit_loss
.
amount_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
,
item
.
profit_loss
.
percent_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
,
item
.
profit_loss
.
percent_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
,
item
.
profit_loss
.
amount_act_vs_mb
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_mb
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_mb
,
item
.
profit_loss
.
amount_act_vs_mb
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_mb
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_mb
,
...
@@ -232,7 +232,7 @@ export default class ProfitLossMR extends Component {
...
@@ -232,7 +232,7 @@ export default class ProfitLossMR extends Component {
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
,
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
,
item
.
profit_loss
.
actual
===
null
?
"0.0"
:
item
.
profit_loss
.
actual
===
""
?
"0.0"
:
item
.
profit_loss
.
actual
,
item
.
profit_loss
.
actual
===
null
?
"0.0"
:
item
.
profit_loss
.
actual
===
""
?
"0.0"
:
item
.
profit_loss
.
actual
,
item
.
profit_loss
.
ytd_actual
===
null
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
===
""
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
,
item
.
profit_loss
.
ytd_actual
===
null
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
===
""
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
,
item
.
profit_loss
.
actual_previous_month
===
null
?
"
0.0"
:
item
.
profit_loss
.
actual_previous_month
===
""
?
"0
.0"
:
item
.
profit_loss
.
actual_previous_month
,
item
.
profit_loss
.
actual_previous_month
===
null
?
"
5.0"
:
item
.
profit_loss
.
actual_previous_month
===
""
?
"5
.0"
:
item
.
profit_loss
.
actual_previous_month
,
item
.
profit_loss
.
amount_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
,
item
.
profit_loss
.
amount_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
,
item
.
profit_loss
.
percent_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
,
item
.
profit_loss
.
percent_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
,
item
.
profit_loss
.
amount_act_vs_mb
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_mb
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_mb
,
item
.
profit_loss
.
amount_act_vs_mb
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_mb
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_mb
,
...
@@ -1608,7 +1608,8 @@ export default class ProfitLossMR extends Component {
...
@@ -1608,7 +1608,8 @@ export default class ProfitLossMR extends Component {
}}
}}
/
>
/
>
}
}
/>
}
/
>
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
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