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
fa46751c
Commit
fa46751c
authored
Mar 18, 2021
by
Faisal Hamdi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'faisal' into 'master'
olpa bs! See merge request
!1292
parents
a17c50f4
6d2ae3b2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
39 deletions
+41
-39
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+41
-39
No files found.
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
fa46751c
...
...
@@ -287,7 +287,7 @@ export default class BalanceSheetOLPA extends Component {
"status"
:
type
,
"balance_sheet"
:
data
}
//
console.log(data);
console
.
log
(
data
);
this
.
setState
({
loading
:
false
})
this
.
props
.
saveToOLPA
(
payload
)
this
.
props
.
onClickClose
()
...
...
@@ -348,7 +348,7 @@ export default class BalanceSheetOLPA extends Component {
report_id
:
this
.
props
.
report_id
,
balance_sheet
:
payload
}
//
console.log(body)
console
.
log
(
body
)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
}
});
...
...
@@ -394,11 +394,11 @@ export default class BalanceSheetOLPA extends Component {
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
24
].
length
>
0
)
{
//
console.log('masuk')
console
.
log
(
'masuk'
)
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
}
})
//
console.log(this.state.dataTable);
console
.
log
(
this
.
state
.
dataTable
);
})
}
}
...
...
@@ -436,7 +436,7 @@ export default class BalanceSheetOLPA extends Component {
}
// console.log(JSON.stringify(body));
api
.
create
(
'UPLOAD'
).
uploadOLPA
(
body
).
then
(
response
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
...
...
@@ -516,6 +516,7 @@ export default class BalanceSheetOLPA extends Component {
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
console
.
log
(
dataTable2
);
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
if
(
type
===
"actual"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
...
...
@@ -1711,7 +1712,7 @@ export default class BalanceSheetOLPA extends Component {
}
}
},
{
name
:
"Current Total"
,
name
:
`31 Dec
${
this
.
props
.
periode
}
Total`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
...
...
@@ -1749,7 +1750,6 @@ export default class BalanceSheetOLPA extends Component {
disabled
=
{
this
.
props
.
isApprover
==
true
?
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
)}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
// console.log(dataTable2)
}}
...
...
@@ -1758,37 +1758,37 @@ export default class BalanceSheetOLPA extends Component {
/
>
<
/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)).toFixed(1)}
// />
// </span>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
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
}
// disabled={this.props.isApprover == true ? 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)}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
// console.log(dataTable2)
}}
/
>
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/div
>
<
/span
>
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// // disabled={this.props.isApprover == true ? 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)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
...
...
@@ -1800,7 +1800,8 @@ export default class BalanceSheetOLPA extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleForecast
(
tableMeta
,
`
${
Number
(
this
.
props
.
periode
)}
`
,
19
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
/
>
// <div style={{ flex: 1 }}>
// <FormControlLabel
...
...
@@ -1830,7 +1831,8 @@ export default class BalanceSheetOLPA extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleForecast
(
tableMeta
,
`
${
Number
(
this
.
props
.
periode
)}
`
,
19
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
/
>
// <div style={{ flex: 1 }}>
// <FormControlLabel
...
...
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