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
8ef0cca2
Commit
8ef0cca2
authored
Mar 18, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
57b26a9a
fa46751c
Changes
1
Hide 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 @
8ef0cca2
...
@@ -287,7 +287,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -287,7 +287,7 @@ export default class BalanceSheetOLPA extends Component {
"status"
:
type
,
"status"
:
type
,
"balance_sheet"
:
data
"balance_sheet"
:
data
}
}
//
console.log(data);
console
.
log
(
data
);
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
this
.
props
.
saveToOLPA
(
payload
)
this
.
props
.
saveToOLPA
(
payload
)
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
...
@@ -348,7 +348,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -348,7 +348,7 @@ export default class BalanceSheetOLPA extends Component {
report_id
:
this
.
props
.
report_id
,
report_id
:
this
.
props
.
report_id
,
balance_sheet
:
payload
balance_sheet
:
payload
}
}
//
console.log(body)
console
.
log
(
body
)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
}
}
});
});
...
@@ -394,11 +394,11 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -394,11 +394,11 @@ export default class BalanceSheetOLPA extends Component {
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
24
].
length
>
0
)
{
if
(
item
[
24
].
length
>
0
)
{
//
console.log('masuk')
console
.
log
(
'masuk'
)
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
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 {
...
@@ -436,7 +436,7 @@ export default class BalanceSheetOLPA extends Component {
}
}
// console.log(JSON.stringify(body));
// console.log(JSON.stringify(body));
api
.
create
(
'UPLOAD'
).
uploadOLPA
(
body
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
uploadOLPA
(
body
).
then
(
response
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
...
@@ -516,6 +516,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -516,6 +516,7 @@ export default class BalanceSheetOLPA extends Component {
render
()
{
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
console
.
log
(
dataTable2
);
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
if
(
type
===
"actual"
)
{
if
(
type
===
"actual"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
...
@@ -1711,7 +1712,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -1711,7 +1712,7 @@ export default class BalanceSheetOLPA extends Component {
}
}
}
}
},
{
},
{
name
:
"Current Total"
,
name
:
`31 Dec
${
this
.
props
.
periode
}
Total`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
...
@@ -1749,7 +1750,6 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -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
)}
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
)}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
// console.log(dataTable2)
// console.log(dataTable2)
}}
}}
...
@@ -1758,37 +1758,37 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -1758,37 +1758,37 @@ export default class BalanceSheetOLPA extends Component {
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
2
?
// <span style={{ fontSize: 12, textAlign: 'right' }}>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
// <NumberFormat
<
NumberFormat
// thousandSeparator={true}
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}
disabled
=
{
true
}
// value={Number(handleValue(tableMeta)).toFixed(1)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
// />
// </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
>
<
/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
?
tableMeta
.
rowData
[
0
]
===
4
?
null
null
...
@@ -1800,7 +1800,8 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -1800,7 +1800,8 @@ export default class BalanceSheetOLPA extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
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 }}>
// <div style={{ flex: 1 }}>
// <FormControlLabel
// <FormControlLabel
...
@@ -1830,7 +1831,8 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -1830,7 +1831,8 @@ export default class BalanceSheetOLPA extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
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 }}>
// <div style={{ flex: 1 }}>
// <FormControlLabel
// <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