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
ec1bb599
Commit
ec1bb599
authored
Dec 18, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5f1c12ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
27 deletions
+53
-27
ListOfCreditFacilities.js
src/container/MonthlyReport/ListOfCreditFacilities.js
+53
-27
No files found.
src/container/MonthlyReport/ListOfCreditFacilities.js
View file @
ec1bb599
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
createMuiTheme
,
FormControlLabel
,
MuiThemeProvider
,
Paper
,
TableCell
,
Tooltip
,
Typography
,
withStyles
,
Input
,
ThemeProvider
}
from
'@material-ui/core'
import
{
createMuiTheme
,
FormControlLabel
,
MuiThemeProvider
,
Paper
,
TableCell
,
Tooltip
,
Typography
,
withStyles
,
Input
,
ThemeProvider
,
TextareaAutosize
}
from
'@material-ui/core'
import
MUIDataTable
from
'mui-datatables'
;
import
MUIDataTable
from
'mui-datatables'
;
import
Images
from
'../../assets/Images'
;
import
Images
from
'../../assets/Images'
;
import
api
from
'../../api'
;
import
api
from
'../../api'
;
...
@@ -794,7 +794,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -794,7 +794,7 @@ export default class ListOfCreditFacilities extends Component {
let
payload
=
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
this
.
props
.
revision
,
"revision"
:
this
.
props
.
revision
,
"periode"
:
this
.
props
.
periode
,
"periode"
:
2021
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"submission_id"
:
this
.
state
.
submissionID
"submission_id"
:
this
.
state
.
submissionID
}
}
...
@@ -1228,7 +1228,28 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1228,7 +1228,28 @@ export default class ListOfCreditFacilities extends Component {
})
})
console
.
log
(
dataTable2
)
console
.
log
(
dataTable2
)
}
else
{
}
else
{
if
(
value
.
value
!==
undefined
)
{
if
(
value
.
value
==
'Investment Loan'
)
{
dataTable2
[
tableMeta
.
rowIndex
][
16
]
=
0
dataTable2
[
tableMeta
.
rowIndex
][
17
]
=
0
dataTable2
[
tableMeta
.
rowIndex
][
18
]
=
""
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
0
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
0
}
else
if
(
value
.
value
==
'Revolving Loan (KMK)'
)
{
dataTable2
[
tableMeta
.
rowIndex
][
14
]
=
0
dataTable2
[
tableMeta
.
rowIndex
][
15
]
=
0
dataTable2
[
tableMeta
.
rowIndex
][
18
]
=
""
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
0
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
0
}
else
if
(
value
.
value
==
'others'
)
{
dataTable2
[
tableMeta
.
rowIndex
][
14
]
=
0
dataTable2
[
tableMeta
.
rowIndex
][
15
]
=
0
dataTable2
[
tableMeta
.
rowIndex
][
16
]
=
0
dataTable2
[
tableMeta
.
rowIndex
][
17
]
=
0
}
}
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
value
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
value
console
.
log
(
dataTable2
)
}
}
}
}
...
@@ -1238,7 +1259,6 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1238,7 +1259,6 @@ export default class ListOfCreditFacilities extends Component {
if
(
type
==
'bankName'
&&
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
!=
null
&&
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
!=
""
)
{
if
(
type
==
'bankName'
&&
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
!=
null
&&
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
!=
""
)
{
indexNyasar
=
true
indexNyasar
=
true
}
}
if
(
value
==
null
)
{
if
(
value
==
null
)
{
index
=
-
1
index
=
-
1
}
else
{
}
else
{
...
@@ -1524,7 +1544,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1524,7 +1544,7 @@ export default class ListOfCreditFacilities extends Component {
style
=
{{
padding
:
0
,
margin
:
0
}}
style
=
{{
padding
:
0
,
margin
:
0
}}
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
div
ref
=
{
params
.
InputProps
.
ref
}
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
div
ref
=
{
params
.
InputProps
.
ref
}
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
input
style
=
{{
borderColor
:
'white'
,
width
:
150
,
textAlign
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
])
?
"#5198ea"
:
"black
"
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
textarea
style
=
{{
borderColor
:
'white'
,
width
:
150
,
textAlign
:
'center'
,
justifyContent
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
"#5198ea
"
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
/div
>
<
/div
>
}
}
/
>
/
>
...
@@ -1558,7 +1578,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1558,7 +1578,7 @@ export default class ListOfCreditFacilities extends Component {
style
=
{{
padding
:
0
,
margin
:
0
}}
style
=
{{
padding
:
0
,
margin
:
0
}}
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
div
ref
=
{
params
.
InputProps
.
ref
}
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
div
ref
=
{
params
.
InputProps
.
ref
}
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
input
style
=
{{
borderColor
:
'white'
,
width
:
96
,
textAlign
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
])
?
"#5198ea"
:
"black
"
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
textarea
style
=
{{
borderColor
:
'white'
,
width
:
96
,
textAlign
:
'center'
,
justifyContent
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
"#5198ea
"
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
/div
>
<
/div
>
}
}
/
>
/
>
...
@@ -1581,22 +1601,28 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1581,22 +1601,28 @@ export default class ListOfCreditFacilities extends Component {
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
?
{
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
?
null
:
null
:
<
ThemeProvider
theme
=
{
theme
}
>
<
div
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
Input
<
textarea
style
=
{{
borderColor
:
'white'
,
width
:
96
,
textAlign
:
'center'
,
justifyContent
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
"#5198ea"
}}
type
=
"text"
defaultValue
=
{
tableMeta
.
rowData
[
8
]}
disableUnderline
=
{
true
}
onBlur
=
{(
event
)
=>
handleChange
(
event
.
target
.
value
,
tableMeta
,
tableMeta
.
columnIndex
)}
/
>
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'center'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
marginBottom
:
-
105
}}
<
/div
>
type
=
"text"
// <ThemeProvider theme={theme}>
placeholder
=
""
// <Input
disabled
=
{
tableMeta
.
rowData
[
0
]
==
8
||
tableMeta
.
rowData
[
0
]
==
9
?
true
:
false
}
// disableUnderline={true}
defaultValue
=
{
tableMeta
.
rowData
[
8
]}
// style={{color: "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent', marginBottom: -105 }}
onBlur
=
{(
event
)
=>
{
// type="text"
// // // console.log(event.target.value)
// placeholder=""
// updateValue(event.target.value)
// disabled={tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9? true : false}
handleChange
(
event
.
target
.
value
,
tableMeta
,
tableMeta
.
columnIndex
)
// defaultValue={tableMeta.rowData[8]}
// // // console.log(dataTable2)
// multiline
}}
// rowsMax={3}
/
>
// onBlur={(event) => {
<
/ThemeProvider
>
// // // // console.log(event.target.value)
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, tableMeta.columnIndex)
// // // // console.log(dataTable2)
// }}
// />
// </ThemeProvider>
}
}
<
/div
>
<
/div
>
...
@@ -1675,7 +1701,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1675,7 +1701,7 @@ export default class ListOfCreditFacilities extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
val
}
value
=
{
Number
(
val
).
toFixed
(
2
)
}
// 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)}
// 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)}
maxLength
=
{
4
}
maxLength
=
{
4
}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
...
@@ -3516,13 +3542,13 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -3516,13 +3542,13 @@ export default class ListOfCreditFacilities extends Component {
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
this
.
state
.
loading
&&
loadingComponent
}
{
this
.
state
.
loading
&&
loadingComponent
}
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
{
!
this
.
state
.
loading
&&
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
data
=
{
dataTable2
}
data
=
{
dataTable2
}
columns
=
{
columns
}
columns
=
{
columns
}
options
=
{
options
}
options
=
{
options
}
/
>
/
>
<
/MuiThemeProvider
>
<
/MuiThemeProvider>
}
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
,
paddingLeft
:
15
,
paddingRight
:
15
,
marginTop
:
5
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
,
paddingLeft
:
15
,
paddingRight
:
15
,
marginTop
:
5
}}
>
...
@@ -3530,7 +3556,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -3530,7 +3556,7 @@ export default class ListOfCreditFacilities extends Component {
<
div
style
=
{{
padding
:
5
}}
>
<
div
style
=
{{
padding
:
5
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Total
Outstanding
Loan
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Total
Outstanding
Loan
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
border
:
'1px solid black'
,
padding
:
5
}}
>
<
div
style
=
{{
border
:
'1px solid black'
,
padding
:
5
,
minWidth
:
200
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
state
.
totalOutStand
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
state
.
totalOutStand
}
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -3540,7 +3566,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -3540,7 +3566,7 @@ export default class ListOfCreditFacilities extends Component {
<
div
style
=
{{
padding
:
5
}}
>
<
div
style
=
{{
padding
:
5
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Diff
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Diff
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
borderStyle
:
'solid'
,
borderWidth
:
'0px 1px 1px 1px'
,
padding
:
5
}}
>
<
div
style
=
{{
borderStyle
:
'solid'
,
borderWidth
:
'0px 1px 1px 1px'
,
padding
:
5
,
minWidth
:
200
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
state
.
diff
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
state
.
diff
}
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -3660,7 +3686,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -3660,7 +3686,7 @@ export default class ListOfCreditFacilities extends Component {
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
this
.
state
.
loading
&&
loadingComponent
}
{
this
.
state
.
loading
&&
loadingComponent
}
{
this
.
state
.
dataLoaded
&&
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
{
this
.
state
.
dataLoaded
&&
!
this
.
state
.
loading
&&
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
data
=
{
dataTable2
}
data
=
{
dataTable2
}
columns
=
{
columns
}
columns
=
{
columns
}
...
...
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