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
985ad23a
Commit
985ad23a
authored
Feb 09, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'GGMAC' into 'master'
update issue locf and mb bs See merge request
!1130
parents
bbbaba34
dfe71b76
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
7 deletions
+36
-7
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+35
-6
ListOfCreditFacilities.js
src/container/MonthlyReport/ListOfCreditFacilities.js
+1
-1
No files found.
src/container/BudgetTahunan/BalanceSheet.js
View file @
985ad23a
...
@@ -140,7 +140,7 @@ export default class BalanceSheet extends Component {
...
@@ -140,7 +140,7 @@ export default class BalanceSheet extends Component {
"submission_id"
:
this
.
props
.
submissionID
"submission_id"
:
this
.
props
.
submissionID
}
}
let
response
=
await
api
.
create
().
getDetailReportMB
(
payload
)
let
response
=
await
api
.
create
().
getDetailReportMB
(
payload
)
//
console.log(response);
console
.
log
(
response
);
let
dataTable
=
[]
let
dataTable
=
[]
if
(
response
.
data
)
{
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
let
res
=
response
.
data
.
data
...
@@ -535,20 +535,36 @@ export default class BalanceSheet extends Component {
...
@@ -535,20 +535,36 @@ export default class BalanceSheet extends Component {
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
// console.log('masuk')
if
(
type
===
"actual"
)
{
if
(
type
===
"actual"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
).
toFixed
(
1
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
).
toFixed
(
1
)
}
else
{
}
else
{
// console.log('masuk2')
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
===
dataTable2
[
tableMeta
.
rowIndex
][
2
])
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
===
dataTable2
[
tableMeta
.
rowIndex
][
2
])
if
(
indexParent
>
0
)
{
if
(
indexParent
>
0
)
{
// console.log(indexParent)
// console.log(indexParent)
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
let
a
=
0
if
(
type
==
'r/e'
)
{
// console.log('masuk8')
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
value
=
Number
(
val
).
toFixed
(
1
)
}
else
{
// console.log('masuk9')
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
).
toFixed
(
1
)
}
let
jagain
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
]
let
jagain
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
]
a
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
===
undefined
?
(
0
+
Number
(
val
)).
toFixed
(
1
)
:
Number
(
jagain
+
Number
(
val
)).
toFixed
(
1
)
a
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
===
undefined
?
(
0
+
Number
(
val
)).
toFixed
(
1
)
:
Number
(
jagain
+
Number
(
val
)).
toFixed
(
1
)
}
else
{
}
else
{
// console.log('masuk3')
if
(
type
==
'r/e'
)
{
// console.log('masuk4')
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
value
=
Number
(
val
).
toFixed
(
1
)
}
else
{
// console.log('masuk5')
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
).
toFixed
(
1
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
).
toFixed
(
1
)
}
}
}
}
}
}
}
const
handleTotal
=
(
tableMeta
)
=>
{
const
handleTotal
=
(
tableMeta
)
=>
{
let
total
=
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
dataTable2
[
tableMeta
.
rowIndex
][
18
]
let
total
=
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
dataTable2
[
tableMeta
.
rowIndex
][
18
]
return
total
return
total
...
@@ -577,7 +593,12 @@ export default class BalanceSheet extends Component {
...
@@ -577,7 +593,12 @@ export default class BalanceSheet extends Component {
// console.log(tableMeta.rowIndex)
// console.log(tableMeta.rowIndex)
// console.log(total)
// console.log(total)
// dataTable2[tableMeta.rowIndex][column] = total
// dataTable2[tableMeta.rowIndex][column] = total
if
(
column
==
19
&&
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
)
{
total
=
tableMeta
.
rowData
[
7
].
value
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
tableMeta
.
rowData
[
7
].
value
}
else
{
total
=
handleValueFormula
(
dataTable2
[
tableMeta
.
rowIndex
][
column
],
tableMeta
,
column
,
periode
,
dataTable2
[
tableMeta
.
rowIndex
][
25
])
total
=
handleValueFormula
(
dataTable2
[
tableMeta
.
rowIndex
][
column
],
tableMeta
,
column
,
periode
,
dataTable2
[
tableMeta
.
rowIndex
][
25
])
}
// console.log(total)
// console.log(total)
return
total
return
total
}
}
...
@@ -969,8 +990,12 @@ export default class BalanceSheet extends Component {
...
@@ -969,8 +990,12 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
?
'#5198ea'
:
'black'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
?
'#5198ea'
:
'black'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
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
:
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
?
false
:
true
)
)}
disabled
=
{
this
.
props
.
isApprover
==
true
?
true
:
((
this
.
props
.
lastStatus
===
'SUBMIT'
||
this
.
props
.
lastStatus
===
'REVISION'
)
&&
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
?
false
:
true
)}
value
=
{
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
?
Number
(
value
.
value
).
toFixed
(
1
)
:
Number
(
handleValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
?
Number
(
value
.
value
).
toFixed
(
1
)
:
Number
(
handleValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
,
'r/e'
)
// console.log(dataTable2)
}}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -979,8 +1004,12 @@ export default class BalanceSheet extends Component {
...
@@ -979,8 +1004,12 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
?
'#5198ea'
:
'black'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
?
'#5198ea'
:
'black'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
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
:
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
?
false
:
true
)
)}
disabled
=
{
this
.
props
.
isApprover
==
true
?
true
:
((
this
.
props
.
lastStatus
===
'SUBMIT'
||
this
.
props
.
lastStatus
===
'REVISION'
)
&&
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
?
false
:
true
)}
value
=
{
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
?
Number
(
value
.
value
).
toFixed
(
1
)
:
Number
(
handleValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
?
Number
(
value
.
value
).
toFixed
(
1
)
:
Number
(
handleValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
,
'r/e'
)
// console.log(dataTable2)
}}
/>
/>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
...
...
src/container/MonthlyReport/ListOfCreditFacilities.js
View file @
985ad23a
...
@@ -2461,7 +2461,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -2461,7 +2461,7 @@ export default class ListOfCreditFacilities extends Component {
// </div>
// </div>
:
:
<
div
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
div
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
textarea
disabled
=
{
this
.
state
.
get_for
==
'view'
}
style
=
{{
borderColor
:
'white'
,
width
:
96
,
textAlign
:
'center'
,
justifyContent
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
this
.
state
.
get_for
==
'view'
?
"black"
:
"#5198ea"
,
backgroundColor
:
'transparent'
}}
type
=
"text"
defaultValue
=
{
tableMeta
.
rowData
[
18
]}
<
textarea
disabled
=
{
this
.
state
.
get_for
==
'view'
?
true
:
tableMeta
.
rowData
[
7
]
==
null
?
true
:
tableMeta
.
rowData
[
7
].
value
==
'Others'
?
false
:
true
}
style
=
{{
borderColor
:
'white'
,
width
:
96
,
textAlign
:
'center'
,
justifyContent
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
this
.
state
.
get_for
==
'view'
?
'black'
:
tableMeta
.
rowData
[
7
]
==
null
?
'black'
:
tableMeta
.
rowData
[
7
].
value
==
'Others'
?
'#5198ea'
:
'black'
,
backgroundColor
:
this
.
state
.
get_for
==
'view'
?
'white'
:
tableMeta
.
rowData
[
7
]
==
null
?
'white'
:
(
tableMeta
.
rowData
[
18
]
==
''
&&
tableMeta
.
rowData
[
7
].
value
==
'Others'
?
'#ffac99'
:
'white'
)
}}
type
=
"text"
defaultValue
=
{
tableMeta
.
rowData
[
18
]}
onBlur
=
{(
event
)
=>
handleChange
(
event
.
target
.
value
,
tableMeta
,
18
)}
/
>
onBlur
=
{(
event
)
=>
handleChange
(
event
.
target
.
value
,
tableMeta
,
18
)}
/
>
<
/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