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
1d5db666
Commit
1d5db666
authored
Oct 27, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
locf
parent
9ae28b10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
696 additions
and
4 deletions
+696
-4
ListOfCreditFacilitiesMR.js
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
+696
-4
No files found.
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
View file @
1d5db666
...
...
@@ -1829,7 +1829,7 @@ export default class ListOfCreditFacilities extends Component {
})
}
let
columns
=
[
let
columns
LOCF
=
[
{
name
:
""
,
options
:
{
...
...
@@ -3950,6 +3950,698 @@ export default class ListOfCreditFacilities extends Component {
},
]
let
columnsInvesment
=
[
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
filter
:
false
,
display
:
this
.
state
.
get_for
==
'view'
?
false
:
true
,
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
key
=
{
columnMeta
.
index
}
style
=
{{
...
style
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#dbdbdb'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'left'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
// handleAction(tableMeta.rowData[2]) &&
<
div
style
=
{{
display
:
'flex'
}}
>
{
/* {tableMeta.rowData[6] === "Active" ? */
}
{
handleAction
(
tableMeta
.
rowData
[
0
],
tableMeta
,
'add'
)
&&
<
span
>
<
LightTooltip
title
=
{
'Add'
}
arrow
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
}}
// onClick={() => // // console.log(tableMeta.rowData[1])}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
})
handleTambah
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowIndex
)
}}
>
<
img
src
=
{
Images
.
add
}
/
>
<
/button
>
<
/LightTooltip
>
<
/span>
}
{
handleAction
(
tableMeta
.
rowData
[
0
],
tableMeta
,
'delete'
)
&&
<
span
>
<
LightTooltip
title
=
{
'Delete'
}
arrow
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginLeft
:
5
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
})
handleDelete
(
tableMeta
.
rowIndex
)
}}
>
<
img
src
=
{
Images
.
delete
}
style
=
{{
width
:
37
,
height
:
37
}}
/
>
<
/button
>
<
/LightTooltip
>
<
/span>
}
<
/div
>
);
}
}
},
{
name
:
"(Company) Name"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'center'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
val
}
<
/div
>
)
}
}
},
{
name
:
"Institution Name"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
width
:
150
}}
>
{
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
||
tableMeta
.
rowData
[
0
]
===
4
?
<
Typography
style
=
{{
color
:
'black'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
val
.
value
}
<
/Typography
>
:
<
Autocomplete
{...
this
.
state
.
bankNameList
}
id
=
"bankNameList"
onChange
=
{(
event
,
newInputValue
)
=>
handleChange
(
newInputValue
,
tableMeta
,
tableMeta
.
columnIndex
)}
debug
disableClearable
disabled
=
{
this
.
state
.
get_for
==
'view'
}
// disabled={!handleAction(tableMeta.rowData[2], tableMeta.rowData[0])}
value
=
{
handleValueDropDown
(
val
,
'bankName'
,
tableMeta
)}
style
=
{{
padding
:
0
,
margin
:
0
}}
renderInput
=
{(
params
)
=>
<
div
ref
=
{
params
.
InputProps
.
ref
}
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
textarea
style
=
{{
borderColor
:
'white'
,
width
:
150
,
textAlign
:
'center'
,
justifyContent
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
this
.
state
.
get_for
==
'view'
?
"black"
:
"#5198ea"
,
backgroundColor
:
tableMeta
.
rowData
[
6
]
==
null
&&
this
.
state
.
get_for
==
'edit'
?
'#ffac99'
:
'white'
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
/div
>
}
/
>
}
<
/div
>
)
}
}
},
{
name
:
"Type Of Investment"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
Autocomplete
{...
this
.
state
.
typeOfCreditList
}
id
=
"typeOfCreditList"
onChange
=
{(
event
,
newInputValue
)
=>
handleChange
(
newInputValue
,
tableMeta
,
tableMeta
.
columnIndex
)}
debug
value
=
{
handleValueDropDown
(
val
,
'typeOfCreditList'
,
tableMeta
)}
disableClearable
disabled
=
{
this
.
state
.
get_for
==
'view'
}
// disabled={!handleAction(tableMeta.rowData[2], tableMeta.rowData[0])}
style
=
{{
padding
:
0
,
margin
:
0
}}
renderInput
=
{(
params
)
=>
<
div
ref
=
{
params
.
InputProps
.
ref
}
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
textarea
style
=
{{
borderColor
:
'white'
,
width
:
96
,
textAlign
:
'center'
,
justifyContent
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
this
.
state
.
get_for
==
'view'
?
"black"
:
"#5198ea"
,
backgroundColor
:
tableMeta
.
rowData
[
7
]
==
null
&&
this
.
state
.
get_for
==
'edit'
?
'#ffac99'
:
'white'
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
/div
>
}
/
>
}
<
/div
>
)
}
}
},
{
name
:
"Remarks"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'left'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
?
null
:
<
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
:
tableMeta
.
rowData
[
8
]
==
''
&&
this
.
state
.
get_for
==
'edit'
?
'#ffac99'
:
'white'
}}
type
=
"text"
defaultValue
=
{
tableMeta
.
rowData
[
8
]}
onBlur
=
{(
event
)
=>
handleChange
(
event
.
target
.
value
,
tableMeta
,
tableMeta
.
columnIndex
)}
/
>
<
/div
>
// <Input
// disableUnderline={true}
// style={{ fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// disabled={tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9 || this.state.get_for == 'view'? true : false}
// defaultValue={tableMeta.rowData[8]}
// // disabled={false}
// multiline={true}
// inputProps={{
// style: {
// color: this.state.get_for == 'view'? "black" : "#5198ea",
// textAlign: 'center',
// backgroundColor: 'white'
// }
// }}
// />
// <ThemeProvider theme={theme}>
// <Input
// disableUnderline={true}
// style={{color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent', marginBottom: -105 }}
// type="text"
// placeholder=""
// disabled={tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9? true : false}
// defaultValue={tableMeta.rowData[8]}
// multiline
// rowsMax={3}
// onBlur={(event) => {
// // // // console.log(event.target.value)
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, tableMeta.columnIndex)
// // // // console.log(dataTable2)
// }}
// />
// </ThemeProvider>
}
<
/div
>
)
}
}
},
{
name
:
"Placement Date"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
==
8
||
tableMeta
.
rowData
[
0
]
==
9
?
null
:
<
DatePicker
margin
=
"normal"
id
=
"loanMatureDate"
// label="Valid To"
format
=
"dd-MM-yyyy"
value
=
{
val
}
disabled
=
{
this
.
state
.
get_for
==
'view'
}
onChange
=
{(
e
)
=>
handleChange
(
e
,
tableMeta
,
tableMeta
.
columnIndex
,
'date'
)}
// minDate={this.state.startDate}
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
inputProps
=
{{
style
:
{
marginTop
:
-
10
,
textAlign
:
'center'
,
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
this
.
state
.
get_for
==
'view'
?
"black"
:
'#5198ea'
,
backgroundColor
:
(
tableMeta
.
rowData
[
9
]
==
null
||
tableMeta
.
rowData
[
9
]
==
''
)
&&
this
.
state
.
get_for
==
'edit'
?
'#ffac99'
:
'white'
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#5198ea'
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
}
<
/div
>
)
}
}
},
{
name
:
"Tenor"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'left'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
?
null
:
<
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
:
tableMeta
.
rowData
[
8
]
==
''
&&
this
.
state
.
get_for
==
'edit'
?
'#ffac99'
:
'white'
}}
type
=
"text"
defaultValue
=
{
tableMeta
.
rowData
[
8
]}
onBlur
=
{(
event
)
=>
handleChange
(
event
.
target
.
value
,
tableMeta
,
tableMeta
.
columnIndex
)}
/
>
<
/div
>
// <Input
// disableUnderline={true}
// style={{ fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// disabled={tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9 || this.state.get_for == 'view'? true : false}
// defaultValue={tableMeta.rowData[8]}
// // disabled={false}
// multiline={true}
// inputProps={{
// style: {
// color: this.state.get_for == 'view'? "black" : "#5198ea",
// textAlign: 'center',
// backgroundColor: 'white'
// }
// }}
// />
// <ThemeProvider theme={theme}>
// <Input
// disableUnderline={true}
// style={{color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent', marginBottom: -105 }}
// type="text"
// placeholder=""
// disabled={tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9? true : false}
// defaultValue={tableMeta.rowData[8]}
// multiline
// rowsMax={3}
// onBlur={(event) => {
// // // // console.log(event.target.value)
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, tableMeta.columnIndex)
// // // // console.log(dataTable2)
// }}
// />
// </ThemeProvider>
}
<
/div
>
)
}
}
},
{
name
:
"Expected Return/Interest (%)"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
==
8
||
tableMeta
.
rowData
[
0
]
==
9
?
null
:
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
this
.
state
.
get_for
==
'view'
?
"black"
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
(
tableMeta
.
rowData
[
10
]
==
'0.00'
||
tableMeta
.
rowData
[
10
]
==
''
)
&&
this
.
state
.
get_for
==
'edit'
?
'#ffac99'
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
this
.
state
.
get_for
==
'view'
?
fixNumber
(
Number
(
value
),
2
)
:
this
.
props
.
defaultCurrency
.
id
==
1
?
fixNumber
(
Number
(
value
),
2
)
:
Number
(
value
)
==
0
?
"0.0"
:
Number
(
value
)}
disabled
=
{
this
.
state
.
get_for
==
'view'
}
// 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)}
decimalScale
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
1
:
16
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
,
tableMeta
.
columnIndex
)
// // // // console.log(tableMeta.rowData[0])
}}
/
>
}
/
>
}
<
/div
>
)
}
}
},
{
name
:
"Currency"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
==
8
||
tableMeta
.
rowData
[
0
]
==
9
?
null
:
<
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
:
tableMeta
.
rowData
[
11
]
==
''
&&
this
.
state
.
get_for
==
'edit'
?
'#ffac99'
:
'white'
}}
type
=
"text"
defaultValue
=
{
tableMeta
.
rowData
[
11
]}
onBlur
=
{(
event
)
=>
handleChange
(
event
.
target
.
value
,
tableMeta
,
tableMeta
.
columnIndex
)}
/
>
<
/div
>
// <ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme2}>
// <Input
// disableUnderline={true}
// style={{ width: 96, color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent', backgroundColor: tableMeta.rowData[11] == '' && this.state.get_for == 'edit'? '#ffac99' : 'white' }}
// type="text"
// placeholder=""
// disabled={this.state.get_for == 'view'}
// defaultValue={tableMeta.rowData[11]}
// onBlur={(event) => {
// // // // console.log(event.target.value)
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, tableMeta.columnIndex)
// // // // console.log(dataTable2)
// }}
// />
// </ThemeProvider>
}
<
/div
>
)
}
}
},
{
name
:
`Investment Amount (Original Currency)`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
// console.log(tableMeta);
return
(
<
div
className
=
"col-1"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"black"
,
fontSize
:
12
,
textAlign
:
'right'
,
fontWeight
:
'bold'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
decimalScale
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
1
:
16
}
value
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
fixNumber
(
Number
(
handleFormulaHardcode
(
tableMeta
.
rowData
[
12
],
tableMeta
,
12
)),
1
)
:
Number
(
handleFormulaHardcode
(
tableMeta
.
rowData
[
12
],
tableMeta
,
12
))
==
0
?
"0.0"
:
Number
(
handleFormulaHardcode
(
tableMeta
.
rowData
[
12
],
tableMeta
,
12
))}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
this
.
state
.
get_for
==
'view'
?
"black"
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
decimalScale
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
1
:
16
}
disabled
=
{
this
.
state
.
get_for
==
'view'
}
value
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
(
fixNumber
(
Number
(
tableMeta
.
rowData
[
12
]),
1
)
==
0.0
?
"0.0"
:
fixNumber
(
Number
(
tableMeta
.
rowData
[
12
]),
1
))
:
(
Number
(
tableMeta
.
rowData
[
12
])
==
0.0
?
"0.0"
:
Number
(
tableMeta
.
rowData
[
12
]))}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
,
12
)
}}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
/div
>
)
}
}
},
{
name
:
`Investment Amount (Original Currency)`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
// console.log(tableMeta);
return
(
<
div
className
=
"col-1"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"black"
,
fontSize
:
12
,
textAlign
:
'right'
,
fontWeight
:
'bold'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
decimalScale
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
1
:
16
}
value
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
fixNumber
(
Number
(
handleFormulaHardcode
(
tableMeta
.
rowData
[
12
],
tableMeta
,
12
)),
1
)
:
Number
(
handleFormulaHardcode
(
tableMeta
.
rowData
[
12
],
tableMeta
,
12
))
==
0
?
"0.0"
:
Number
(
handleFormulaHardcode
(
tableMeta
.
rowData
[
12
],
tableMeta
,
12
))}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
this
.
state
.
get_for
==
'view'
?
"black"
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
decimalScale
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
1
:
16
}
disabled
=
{
this
.
state
.
get_for
==
'view'
}
value
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
(
fixNumber
(
Number
(
tableMeta
.
rowData
[
12
]),
1
)
==
0.0
?
"0.0"
:
fixNumber
(
Number
(
tableMeta
.
rowData
[
12
]),
1
))
:
(
Number
(
tableMeta
.
rowData
[
12
])
==
0.0
?
"0.0"
:
Number
(
tableMeta
.
rowData
[
12
]))}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
,
12
)
}}
/
>
}
/
>
<
/div
>
}
<
/div
>
<
/div
>
)
}
}
},
{
name
:
"Notes"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
,
height
:
42
,
borderRight
:
'1px #fff solid'
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'left'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
?
null
:
<
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
[
45
]}
onBlur
=
{(
event
)
=>
handleChange
(
event
.
target
.
value
,
tableMeta
,
45
)}
/
>
<
/div
>
// <FormControlLabel
// style={{ margin: 0 }}
// control={
// <ThemeProvider theme={theme}>
// <Input
// disableUnderline={true}
// style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// multiline={true}
// defaultValue={tableMeta.rowData[45]}
// disabled={this.state.get_for == 'view'}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta, 45)
// }}
// />
// </ThemeProvider>
// }
// />
}
<
/div
>
)
}
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
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)'
}}
>
<
PropagateLoader
...
...
@@ -4070,7 +4762,7 @@ export default class ListOfCreditFacilities extends Component {
{
!
this
.
state
.
loading
&&
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
dataTable2
}
columns
=
{
columns
}
columns
=
{
columns
LOCF
}
options
=
{
options
}
/
>
<
/MuiThemeProvider>
}
...
...
@@ -4239,7 +4931,7 @@ export default class ListOfCreditFacilities extends Component {
{
!
this
.
state
.
loading
&&
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
dataTable2
}
columns
=
{
columns
}
columns
=
{
columns
Invesment
}
options
=
{
options
}
/
>
<
/MuiThemeProvider>
}
...
...
@@ -4470,7 +5162,7 @@ export default class ListOfCreditFacilities extends Component {
{
this
.
state
.
dataLoaded
&&
!
this
.
state
.
loading
&&
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
dataTable2
}
columns
=
{
columns
}
columns
=
{
columns
LOCF
}
options
=
{
options
}
/
>
<
/MuiThemeProvider>
}
...
...
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