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
3c45b48f
Commit
3c45b48f
authored
Nov 03, 2020
by
r.kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
512e37e4
8ce64de1
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
377 additions
and
239 deletions
+377
-239
BudgetTahunan.js
src/container/BudgetTahunan.js
+45
-14
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+1
-1
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+2
-2
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+2
-2
HomePage.js
src/container/HomePage.js
+3
-1
FixedAssetsMovementMR.js
src/container/MonthlyReport/FixedAssetsMovementMR.js
+192
-161
OperatingIndicatorDetail.js
src/container/OprIndicator/OperatingIndicatorDetail.js
+2
-2
ProfitLossOLPA.js
src/container/OutlookPA/ProfitLossOLPA.js
+130
-56
No files found.
src/container/BudgetTahunan.js
View file @
3c45b48f
...
...
@@ -75,7 +75,9 @@ export default class BudgetTahunan extends Component {
scrollToMyRef
=
()
=>
window
.
scrollTo
(
0
,
this
.
myRef
.
current
.
offsetTop
)
componentDidMount
()
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
},
()
=>
{
document
.
body
.
style
.
overflow
=
'hidden'
;
})
this
.
props
.
selectIndex
(
'Master Budget & CAT'
)
if
(
this
.
props
.
location
.
state
!==
undefined
)
{
// console.log(this.props);
...
...
@@ -87,6 +89,10 @@ export default class BudgetTahunan extends Component {
}
}
componentWillUnmount
()
{
document
.
body
.
style
.
overflow
=
'unset'
;
}
checkApprover
()
{
api
.
create
().
checkApprover
().
then
(
response
=>
{
// console.log(response);
...
...
@@ -131,7 +137,9 @@ export default class BudgetTahunan extends Component {
//
})
}
else
{
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
dataTable
:
[],
checkApprover
:
false
,
lastRevision
:
""
,
visibleTableHistory
:
false
,
loading
:
false
})
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
dataTable
:
[],
checkApprover
:
false
,
lastRevision
:
""
,
visibleTableHistory
:
false
,
loading
:
false
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
...
@@ -195,10 +203,14 @@ export default class BudgetTahunan extends Component {
]
})
// console.log(dataTable);
this
.
setState
({
dataTable
,
loading
:
false
,
dataTableRevision
,
dataForRevision
:
response
.
data
.
data
})
this
.
setState
({
dataTable
,
loading
:
false
,
dataTableRevision
,
dataForRevision
:
response
.
data
.
data
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
}
else
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
})
}
...
...
@@ -368,7 +380,9 @@ export default class BudgetTahunan extends Component {
}
getSubmission
()
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
},
()
=>
{
document
.
body
.
style
.
overflow
=
'hidden'
;
})
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
...
...
@@ -384,7 +398,8 @@ export default class BudgetTahunan extends Component {
approverID
:
response
.
data
.
data
.
approve_id
,
pic
:
response
.
data
.
data
.
approver
==
null
?
''
:
response
.
data
.
data
.
approver
,
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
,
lastRevision
:
response
.
data
.
data
.
last_revision
,
btnApprove
:
response
.
data
.
data
.
is_submit
btnApprove
:
response
.
data
.
data
.
is_submit
,
// loading: false
},
()
=>
{
// console.log(this.state.lastStatus);
this
.
historyApproval
()
...
...
@@ -400,7 +415,9 @@ export default class BudgetTahunan extends Component {
})
})
}
else
{
this
.
setState
({
submissionID
:
null
,
loading
:
false
})
this
.
setState
({
submissionID
:
null
,
loading
:
false
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
}
})
...
...
@@ -430,7 +447,9 @@ export default class BudgetTahunan extends Component {
approvalSubmission
(
type
)
{
this
.
scrollToMyRef
()
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
},
()
=>
{
document
.
body
.
style
.
overflow
=
'hidden'
;
})
let
body
=
{
"approval_id"
:
this
.
props
.
location
.
state
==
undefined
?
this
.
state
.
approverID
:
this
.
state
.
rawData
.
approval_id
,
"status"
:
type
,
...
...
@@ -590,7 +609,9 @@ export default class BudgetTahunan extends Component {
}
saveToMasterBudget
(
data
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
},
()
=>
{
document
.
body
.
style
.
overflow
=
'hidden'
;
})
// console.log(JSON.stringify(data));
api
.
create
(
'UPLOAD'
).
createSubmitReport
(
data
).
then
(
response
=>
{
// console.log(response);
...
...
@@ -600,11 +621,13 @@ export default class BudgetTahunan extends Component {
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
})
...
...
@@ -620,7 +643,9 @@ export default class BudgetTahunan extends Component {
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_attachment?fileName=
${
fileurl
}
&&fileType=
${
fileType
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
})
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
...
...
@@ -631,7 +656,9 @@ export default class BudgetTahunan extends Component {
}
validate
()
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
},
()
=>
{
document
.
body
.
style
.
overflow
=
'hidden'
;
})
let
array
=
[]
let
canSubmit
=
true
this
.
state
.
dataTable
.
map
(
item
=>
{
...
...
@@ -660,7 +687,9 @@ export default class BudgetTahunan extends Component {
}
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Is Not Complete'
,
tipeAlert
:
'warning'
,
loading
:
false
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Is Not Complete'
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
// if (array.includes("not-yet" || "draft")) {
// console.log('gagal');
...
...
@@ -671,6 +700,7 @@ export default class BudgetTahunan extends Component {
}
validateRevision
()
{
this
.
scrollToMyRef
()
let
arrayRevisi
=
this
.
state
.
detailRevisiCheck
let
remarksKosong
=
0
arrayRevisi
.
map
((
item
,
index
)
=>
{
...
...
@@ -678,7 +708,8 @@ export default class BudgetTahunan extends Component {
remarksKosong
+=
1
}
})
if
(
remarksKosong
>
0
)
{
console
.
log
(
arrayRevisi
)
if
(
arrayRevisi
.
length
==
0
||
remarksKosong
>
0
)
{
this
.
setState
({
alert
:
true
,
messageAlert
:
'Remarks Cannot be Empty'
,
tipeAlert
:
'error'
})
}
else
{
this
.
setState
({
visibleRevision
:
false
},
()
=>
this
.
approvalSubmission
(
'revision'
))
...
...
@@ -916,7 +947,7 @@ export default class BudgetTahunan extends Component {
search
:
false
}
const
loadingComponent
=
(
<
div
style
=
{{
position
:
'
absolute
'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
div
style
=
{{
position
:
'
fixed
'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
PropagateLoader
// css={override}
size
=
{
20
}
...
...
src/container/BudgetTahunan/CashFlow.js
View file @
3c45b48f
...
...
@@ -2345,7 +2345,7 @@ export default class CashFlow extends Component {
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
3c45b48f
...
...
@@ -2262,7 +2262,7 @@ export default class CorporateAnnualTarget extends Component {
})}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
@@ -2379,7 +2379,7 @@ export default class CorporateAnnualTarget extends Component {
})}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
3c45b48f
...
...
@@ -2277,7 +2277,7 @@ export default class FixedAssetsMovement extends Component {
})}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
@@ -2390,7 +2390,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
src/container/HomePage.js
View file @
3c45b48f
...
...
@@ -90,6 +90,7 @@ class HomePage extends Component {
getDashboard
()
{
let
listDashboard
=
[]
let
rawData
=
[]
api
.
create
().
getDashboard
().
then
((
response
)
=>
{
// console.log(response);
if
(
String
(
response
.
data
.
status
).
toLocaleLowerCase
()
==
'success'
)
{
...
...
@@ -97,8 +98,9 @@ class HomePage extends Component {
data
.
map
((
item
,
index
)
=>
{
let
statusConvert
=
item
.
status
==
'approval_review'
?
'Waiting For Review'
:
item
.
status
==
'approval_proccess'
?
'Waiting For Approval'
:
titleCase
(
item
.
status
)
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
-
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
,
statusConvert
])
rawData
.
push
(
item
)
})
this
.
setState
({
listDashboard
,
rawData
:
response
.
data
.
data
})
this
.
setState
({
listDashboard
,
rawData
})
}
})
}
...
...
src/container/MonthlyReport/FixedAssetsMovementMR.js
View file @
3c45b48f
import
{
createMuiTheme
,
MuiThemeProvider
,
Paper
,
TableCell
,
Typography
}
from
'@material-ui/core'
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
,
Paper
,
createMuiTheme
,
MuiThemeProvider
,
TableCell
,
FormControlLabel
,
TextField
,
Input
,
Tooltip
,
withStyles
,
Snackbar
}
from
'@material-ui/core'
;
import
MUIDataTable
from
'mui-datatables'
;
import
React
,
{
Component
}
from
'react'
import
ReactTooltip
from
'react-tooltip'
;
import
Images
from
'../../assets/Images'
;
import
NumberFormat
from
'react-number-format'
;
import
api
from
'../../api'
;
import
PropagateLoader
from
"react-spinners/PropagateLoader"
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
import
UploadFile
from
"../../library/Upload"
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
{
Alert
}
from
'@material-ui/lab'
;
import
*
as
R
from
'ramda'
const
LightTooltip
=
withStyles
((
theme
)
=>
({
tooltip
:
{
backgroundColor
:
theme
.
palette
.
common
.
white
,
color
:
'rgba(0, 0, 0, 0.87)'
,
boxShadow
:
theme
.
shadows
[
1
],
fontSize
:
11
,
},
}))(
Tooltip
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable3
());
const
options
=
ct
.
customOptionsFixedColumn
();
const
style
=
{
position
:
"sticky"
,
left
:
0
,
zIndex
:
101
,
background
:
"white"
,
zIndex
:
101
,
};
const
style2
=
{
position
:
"sticky"
,
background
:
"white"
,
zIndex
:
100
,
top
:
0
zIndex
:
100
};
export
default
class
FixedAssetsMovementMR
extends
Component
{
...
...
@@ -131,8 +144,7 @@ export default class FixedAssetsMovementMR extends Component {
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
columns
=
[
{
const
columns
=
[{
name
:
"Account"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
...
...
@@ -144,13 +156,34 @@ export default class FixedAssetsMovementMR extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
width
:
300
}}
>
{
val
}
{
console
.
log
(
tableMeta
)}
{
tableMeta
.
rowData
[
24
]
?
tableMeta
.
rowData
[
24
].
length
>
0
?
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
LightTooltip
title
=
{
"Report Items Not Registered"
}
arrow
>
<
span
style
=
{{
fontSize
:
12
,
color
:
'red'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
/LightTooltip
>
<
/div
>
:
tableMeta
.
rowData
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
:
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
span
style
=
{{
fontSize
:
12
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
/div
>
:
tableMeta
.
rowData
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
:
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
span
style
=
{{
fontSize
:
12
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
/div
>
}
<
/div
>
)
}
}
},
{
},
{
name
:
`Month To Date (MTD)`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
...
...
@@ -197,8 +230,7 @@ export default class FixedAssetsMovementMR extends Component {
)
}
}
},
{
},
{
name
:
"Actual Previous Month"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
...
...
@@ -215,8 +247,7 @@ export default class FixedAssetsMovementMR extends Component {
)
}
}
},
{
},
{
name
:
`Variance`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
...
...
@@ -317,7 +348,7 @@ export default class FixedAssetsMovementMR extends Component {
)
}
}
},
}
]
// let data = [
// ["Total Assets", { a: "2", b: "3", c: "4" }, "5", { a: "6", b: "7", c: "8", d: "9", e: "10", f: "11" }],
...
...
src/container/OprIndicator/OperatingIndicatorDetail.js
View file @
3c45b48f
...
...
@@ -1968,7 +1968,7 @@ export default class BalanceSheet extends Component {
}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
@@ -2072,7 +2072,7 @@ export default class BalanceSheet extends Component {
})}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
src/container/OutlookPA/ProfitLossOLPA.js
View file @
3c45b48f
...
...
@@ -35,6 +35,19 @@ const style2 = {
background
:
"white"
,
zIndex
:
100
};
const
stylenotes
=
{
position
:
"sticky"
,
background
:
"white"
,
zIndex
:
101
,
left
:
350
};
const
styleNotesEmpty
=
{
position
:
"sticky"
,
background
:
"white"
,
zIndex
:
99
,
left
:
0
}
export
default
class
ProfitLossOLPA
extends
Component
{
constructor
(
props
)
{
...
...
@@ -104,6 +117,7 @@ export default class ProfitLossOLPA extends Component {
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
profit_loss
.
notes
===
""
?
null
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
total_actual_before
===
null
?
"0"
:
item
.
profit_loss
.
total_actual_before
===
""
?
"0"
:
item
.
profit_loss
.
total_actual_before
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
,
...
...
@@ -137,6 +151,7 @@ export default class ProfitLossOLPA extends Component {
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
profit_loss
.
notes
===
""
?
null
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
total_actual_before
===
null
?
"0"
:
item
.
profit_loss
.
total_actual_before
===
""
?
"0"
:
item
.
profit_loss
.
total_actual_before
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
,
...
...
@@ -200,20 +215,21 @@ export default class ProfitLossOLPA extends Component {
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
total_actual_before
:
String
(
Number
(
i
[
6
]).
toFixed
(
1
)),
january
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
february
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
march
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
april
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
may
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
june
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
july
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
august
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
september
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
october
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
notes
:
i
[
6
]
==
null
||
i
[
6
]
==
""
?
""
:
String
(
i
[
6
]),
total_actual_before
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
january
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
february
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
march
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
april
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
may
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
june
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
july
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
august
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
september
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
october
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
))
})
})
let
payload
=
{
...
...
@@ -262,20 +278,21 @@ export default class ProfitLossOLPA extends Component {
payload
.
push
({
item_report_id
:
i
[
0
]
===
undefined
?
""
:
String
(
i
[
0
]).
trim
(),
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
total_actual_before
:
i
[
2
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
2
]))
===
false
?
"0"
:
String
(
i
[
2
]).
trim
(),
january
:
i
[
3
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
"0"
:
String
(
i
[
3
]).
trim
(),
february
:
i
[
4
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
"0"
:
String
(
i
[
4
]).
trim
(),
march
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
"0"
:
String
(
i
[
5
]).
trim
(),
april
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
may
:
i
[
7
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
7
]))
===
false
?
"0"
:
String
(
i
[
7
]).
trim
(),
june
:
i
[
8
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
8
]))
===
false
?
"0"
:
String
(
i
[
8
]).
trim
(),
july
:
i
[
9
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
9
]))
===
false
?
"0"
:
String
(
i
[
9
]).
trim
(),
august
:
i
[
10
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
10
]))
===
false
?
"0"
:
String
(
i
[
10
]).
trim
(),
september
:
i
[
11
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
11
]))
===
false
?
"0"
:
String
(
i
[
11
]).
trim
(),
october
:
i
[
12
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
12
]))
===
false
?
"0"
:
String
(
i
[
12
]).
trim
(),
november
:
i
[
13
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
13
]))
===
false
?
"0"
:
String
(
i
[
13
]).
trim
(),
december
:
i
[
14
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
14
]))
===
false
?
"0"
:
String
(
i
[
14
]).
trim
(),
total_current_year
:
i
[
15
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
15
]))
===
false
?
"0"
:
String
(
i
[
15
]).
trim
(),
notes
:
i
[
2
]
===
undefined
?
""
:
String
(
i
[
2
]).
trim
(),
total_actual_before
:
i
[
3
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
"0"
:
String
(
i
[
3
]).
trim
(),
january
:
i
[
4
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
"0"
:
String
(
i
[
4
]).
trim
(),
february
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
"0"
:
String
(
i
[
5
]).
trim
(),
march
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
april
:
i
[
7
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
7
]))
===
false
?
"0"
:
String
(
i
[
7
]).
trim
(),
may
:
i
[
8
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
8
]))
===
false
?
"0"
:
String
(
i
[
8
]).
trim
(),
june
:
i
[
9
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
9
]))
===
false
?
"0"
:
String
(
i
[
9
]).
trim
(),
july
:
i
[
10
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
10
]))
===
false
?
"0"
:
String
(
i
[
10
]).
trim
(),
august
:
i
[
11
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
11
]))
===
false
?
"0"
:
String
(
i
[
11
]).
trim
(),
september
:
i
[
12
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
12
]))
===
false
?
"0"
:
String
(
i
[
12
]).
trim
(),
october
:
i
[
13
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
13
]))
===
false
?
"0"
:
String
(
i
[
13
]).
trim
(),
november
:
i
[
14
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
14
]))
===
false
?
"0"
:
String
(
i
[
14
]).
trim
(),
december
:
i
[
15
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
15
]))
===
false
?
"0"
:
String
(
i
[
15
]).
trim
(),
total_current_year
:
i
[
16
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
16
]))
===
false
?
"0"
:
String
(
i
[
16
]).
trim
()
})
}
})
...
...
@@ -306,6 +323,7 @@ export default class ProfitLossOLPA extends Component {
item
.
formula
,
item
.
level
,
item
.
item_report
,
item
.
notes
,
item
.
total_actual_before
,
item
.
january
,
item
.
february
,
...
...
@@ -343,20 +361,21 @@ export default class ProfitLossOLPA extends Component {
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
total_actual_before
:
String
(
Number
(
i
[
6
]).
toFixed
(
1
)),
january
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
february
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
march
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
april
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
may
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
june
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
july
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
august
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
september
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
october
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
))
notes
:
String
(
i
[
6
]),
total_actual_before
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
january
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
february
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
march
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
april
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
may
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
june
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
july
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
august
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
september
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
october
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
))
})
})
let
body
=
{
...
...
@@ -408,20 +427,21 @@ export default class ProfitLossOLPA extends Component {
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
total_actual_before
:
String
(
i
[
6
]),
january
:
i
[
0
]
===
3
&&
i
[
7
]
===
""
?
"0"
:
String
(
i
[
7
]),
february
:
i
[
0
]
===
3
&&
i
[
8
]
===
""
?
"0"
:
String
(
i
[
8
]),
march
:
i
[
0
]
===
3
&&
i
[
9
]
===
""
?
"0"
:
String
(
i
[
9
]),
april
:
i
[
0
]
===
3
&&
i
[
10
]
===
""
?
"0"
:
String
(
i
[
10
]),
may
:
i
[
0
]
===
3
&&
i
[
11
]
===
""
?
"0"
:
String
(
i
[
11
]),
june
:
i
[
0
]
===
3
&&
i
[
12
]
===
""
?
"0"
:
String
(
i
[
12
]),
july
:
i
[
0
]
===
3
&&
i
[
13
]
===
""
?
"0"
:
String
(
i
[
13
]),
august
:
i
[
0
]
===
3
&&
i
[
14
]
===
""
?
"0"
:
String
(
i
[
14
]),
september
:
i
[
0
]
===
3
&&
i
[
15
]
===
""
?
"0"
:
String
(
i
[
15
]),
october
:
i
[
0
]
===
3
&&
i
[
16
]
===
""
?
"0"
:
String
(
i
[
16
]),
november
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0"
:
String
(
i
[
17
]),
december
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0"
:
String
(
i
[
18
]),
total_current_year
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0"
:
String
(
i
[
19
])
notes
:
i
[
6
]
==
null
||
i
[
6
]
==
""
?
""
:
String
(
i
[
6
]),
total_actual_before
:
String
(
i
[
7
]),
january
:
i
[
0
]
===
3
&&
i
[
8
]
===
""
?
"0"
:
String
(
i
[
8
]),
february
:
i
[
0
]
===
3
&&
i
[
9
]
===
""
?
"0"
:
String
(
i
[
9
]),
march
:
i
[
0
]
===
3
&&
i
[
10
]
===
""
?
"0"
:
String
(
i
[
10
]),
april
:
i
[
0
]
===
3
&&
i
[
11
]
===
""
?
"0"
:
String
(
i
[
11
]),
may
:
i
[
0
]
===
3
&&
i
[
12
]
===
""
?
"0"
:
String
(
i
[
12
]),
june
:
i
[
0
]
===
3
&&
i
[
13
]
===
""
?
"0"
:
String
(
i
[
13
]),
july
:
i
[
0
]
===
3
&&
i
[
14
]
===
""
?
"0"
:
String
(
i
[
14
]),
august
:
i
[
0
]
===
3
&&
i
[
15
]
===
""
?
"0"
:
String
(
i
[
15
]),
september
:
i
[
0
]
===
3
&&
i
[
16
]
===
""
?
"0"
:
String
(
i
[
16
]),
october
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0"
:
String
(
i
[
17
]),
november
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0"
:
String
(
i
[
18
]),
december
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0"
:
String
(
i
[
19
]),
total_current_year
:
i
[
0
]
===
3
&&
i
[
20
]
===
""
?
"0"
:
String
(
i
[
20
])
})
})
let
payload
=
{
...
...
@@ -489,6 +509,11 @@ export default class ProfitLossOLPA extends Component {
}
// console.log(total);
}
const
handleNotes
=
(
value
,
tableMeta
)
=>
{
// console.log(value)
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
value
// console.log(dataTable2[tableMeta.rowIndex]);
}
const
handleValue
=
(
data
)
=>
{
let
total
=
0
...
...
@@ -610,6 +635,55 @@ export default class ProfitLossOLPA extends Component {
)
}
}
},
{
name
:
"Notes"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
dataTable2
.
length
>
0
?
<
TableCell
style
=
{{
...
stylenotes
,
top
:
0
,
zIndex
:
102
,
backgroundColor
:
'#1c71b8'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell>
:
<
TableCell
style
=
{{
...
styleNotesEmpty
,
top
:
0
,
zIndex
:
102
,
backgroundColor
:
'#1c71b8'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style
:
{
position
:
"sticky"
,
background
:
"white"
,
zIndex
:
101
,
left
:
350
}
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
flex
:
1
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
4
]
===
0
?
null
:
tableMeta
.
rowData
[
4
]
===
1
?
null
:
<
FormControlLabel
style
=
{{
margin
:
0
}}
// value={value}
control
=
{
<
Input
disableUnderline
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
?
false
:
true
)}
defaultValue
=
{
value
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleNotes
(
event
.
target
.
value
,
tableMeta
)
// console.log(dataTable2)
}}
/
>
}
/>
}
<
/div
>
<
/div
>
)
}
}
},
{
name
:
`31 Dec
${
Number
(
this
.
props
.
periode
)
-
1
}
Actual`
,
options
:
{
...
...
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