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
d51a53e0
Commit
d51a53e0
authored
Nov 03, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
locf
parent
889f3b5a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
210 additions
and
207 deletions
+210
-207
ListOfCreditFacilitiesMR.js
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
+209
-206
MonthlyReport.js
src/container/MonthlyReport/MonthlyReport.js
+1
-1
No files found.
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
View file @
d51a53e0
...
@@ -104,7 +104,9 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -104,7 +104,9 @@ export default class ListOfCreditFacilities extends Component {
dataTableInvest
:
[],
dataTableInvest
:
[],
bankNameList
:
[],
bankNameList
:
[],
typeOfCreditList
:
[],
typeOfCreditList
:
[],
typeOfInvesmentList
:
[],
typeOfInvestmentList
:
[],
typeOfInvestmentList
:
[],
currencyList
:
[],
loading
:
false
,
loading
:
false
,
dataTableRatio
:
[],
dataTableRatio
:
[],
currentDate
:
format
(
new
Date
(),
'yyyy-MM-dd'
),
currentDate
:
format
(
new
Date
(),
'yyyy-MM-dd'
),
...
@@ -135,26 +137,34 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -135,26 +137,34 @@ export default class ListOfCreditFacilities extends Component {
this
.
getSubmission
()
this
.
getSubmission
()
this
.
getLatestUpdate
()
this
.
getLatestUpdate
()
this
.
handleViewOnly
()
this
.
handleViewOnly
()
this
.
getType
()
this
.
getTypeOfInvesment
()
this
.
getListCurrency
()
}
}
getType
()
{
getTypeOfInvesment
()
{
api
.
create
().
getTypeOfInvestment
().
then
(
response
=>
{
let
body
=
{
console
.
log
(
response
);
group
:
'INVESTMENT'
,
company_id
:
this
.
props
.
company
.
company_id
,
type
:
'TYPE_OF_INVESTEMENT'
,
currency_id
:
this
.
props
.
defaultCurrency
.
id
,
}
this
.
setState
({
dataLoaded
:
false
})
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
// // // console.log(data)
// // // console.log(data)
let
inpu
tTypeOfInves
ment
=
[]
let
inpu
TypeOfInvest
ment
=
[]
data
.
investment
.
map
((
item
)
=>
{
data
.
map
((
item
)
=>
{
inpu
tTypeOfInves
ment
.
push
({
inpu
TypeOfInvest
ment
.
push
({
value
:
item
.
value
value
:
`
${
item
.
value
}
`
})
})
})
})
let
defaultProps
=
{
let
defaultProps
=
{
options
:
inpu
tTypeOfInves
ment
,
options
:
inpu
TypeOfInvest
ment
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
};
};
// // // console.log(defaultProps)
// // // console.log(defaultProps)
...
@@ -178,6 +188,46 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -178,6 +188,46 @@ export default class ListOfCreditFacilities extends Component {
})
})
}
}
getListCurrency
()
{
this
.
setState
({
dataLoaded
:
false
})
api
.
create
().
getDataCurrency
().
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
inpuCurrency
=
[]
data
.
map
((
item
)
=>
{
inpuCurrency
.
push
({
currency_name
:
`
${
item
.
currency_name
}
`
})
})
console
.
log
(
data
);
let
defaultProps
=
{
options
:
inpuCurrency
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
currency_name
),
};
// // // console.log(defaultProps)
this
.
setState
({
currencyList
:
defaultProps
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
handleGetFor
(
type
)
{
handleGetFor
(
type
)
{
this
.
setState
({
get_for
:
type
},
()
=>
{
this
.
setState
({
get_for
:
type
},
()
=>
{
this
.
getPerBS
()
this
.
getPerBS
()
...
@@ -452,13 +502,14 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -452,13 +502,14 @@ export default class ListOfCreditFacilities extends Component {
"get_for"
:
this
.
state
.
get_for
"get_for"
:
this
.
state
.
get_for
}
}
api
.
create
().
getHierarkiMontlyReportInvesment
(
payload
).
then
(
response
=>
{
api
.
create
().
getHierarkiMontlyReportInvesment
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
//
console.log(payload);
console
.
log
(
response
);
console
.
log
(
response
);
let
dataTableInvest
=
[]
let
dataTableInvest
=
[]
if
(
response
.
data
)
{
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
let
res
=
response
.
data
.
data
res
.
map
((
item
,
index
)
=>
{
res
.
map
((
item
,
index
)
=>
{
let
tgl
=
String
(
item
.
lov
.
placement_date
).
split
(
'-'
)
let
tgl
=
String
(
item
.
lov
.
placement_date
).
split
(
'-'
)
let
currency
=
item
.
lov
.
currency
if
(
index
==
res
.
length
-
1
)
{
if
(
index
==
res
.
length
-
1
)
{
dataTableInvest
.
push
([
dataTableInvest
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
...
@@ -479,7 +530,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -479,7 +530,7 @@ export default class ListOfCreditFacilities extends Component {
item
.
lov
.
notes
,
item
.
lov
.
notes
,
index
index
],
],
[
9
,
""
,
""
,
""
,
""
,
""
,
{
value
:
"Grand Total"
},
""
,
""
,
""
,
""
,
"notes"
,
999999
],
[
9
,
""
,
""
,
""
,
""
,
""
,
{
value
:
"Grand Total"
},
""
,
""
,
""
,
""
,
"
"
,
""
,
""
,
""
,
"
notes"
,
999999
],
)
)
}
else
{
}
else
{
dataTableInvest
.
push
([
dataTableInvest
.
push
([
...
@@ -505,8 +556,8 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -505,8 +556,8 @@ export default class ListOfCreditFacilities extends Component {
})
})
if
(
dataTableInvest
.
length
==
0
&&
this
.
state
.
get_for
==
'edit'
)
{
if
(
dataTableInvest
.
length
==
0
&&
this
.
state
.
get_for
==
'edit'
)
{
dataTableInvest
.
push
(
dataTableInvest
.
push
(
[
3
,
""
,
""
,
""
,
""
,
this
.
props
.
company
.
company_name
,
""
,
null
,
""
,
null
,
"0.0"
,
"0.0"
,
""
,
""
,
""
,
0
],
[
3
,
""
,
""
,
""
,
""
,
this
.
props
.
company
.
company_name
,
""
,
null
,
""
,
null
,
"0.0"
,
"0.0"
,
""
,
""
,
""
,
""
,
0
],
[
9
,
""
,
""
,
""
,
""
,
""
,
{
value
:
"Grand Total"
},
""
,
""
,
""
,
""
,
"notes"
,
999999
],
[
9
,
""
,
""
,
""
,
""
,
""
,
{
value
:
"Grand Total"
},
""
,
""
,
""
,
""
,
"
"
,
""
,
""
,
""
,
"
notes"
,
999999
],
)
)
}
}
console
.
log
(
dataTableInvest
)
console
.
log
(
dataTableInvest
)
...
@@ -528,7 +579,6 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -528,7 +579,6 @@ export default class ListOfCreditFacilities extends Component {
}
}
// console.log(payload)
// console.log(payload)
api
.
create
().
getLastestUpdateMR
(
payload
).
then
(
response
=>
{
api
.
create
().
getLastestUpdateMR
(
payload
).
then
(
response
=>
{
console
.
log
(
JSON
.
stringify
(
response
))
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
...
@@ -1705,6 +1755,22 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1705,6 +1755,22 @@ export default class ListOfCreditFacilities extends Component {
}
}
}
}
const
handleActionInvesment
=
(
typeReport
,
tableMeta
,
typeButton
)
=>
{
if
(
typeReport
==
3
)
{
if
(
dataTableInvestment
.
length
==
2
)
{
if
(
typeButton
==
'addLov'
)
{
return
true
}
else
{
return
false
}
}
else
{
return
true
}
}
else
{
return
false
}
}
const
handleChange
=
(
value
,
tableMeta
,
column
,
typeChange
,
typeDrop
)
=>
{
const
handleChange
=
(
value
,
tableMeta
,
column
,
typeChange
,
typeDrop
)
=>
{
let
val
=
''
let
val
=
''
if
(
typeChange
==
'date'
)
{
if
(
typeChange
==
'date'
)
{
...
@@ -1752,15 +1818,15 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1752,15 +1818,15 @@ export default class ListOfCreditFacilities extends Component {
}
}
const
handleChangeInves
=
(
value
,
tableMeta
,
column
,
typeChange
,
typeDrop
)
=>
{
const
handleChangeInves
=
(
value
,
tableMeta
,
column
,
typeChange
,
typeDrop
)
=>
{
console
.
log
(
typeChange
,
value
);
let
val
=
''
let
val
=
''
if
(
typeChange
==
'date'
)
{
if
(
typeChange
==
'date'
)
{
dataTable
2
[
tableMeta
.
rowIndex
][
column
]
=
format
(
value
,
'yyyy-MM-dd'
)
dataTable
Investment
[
tableMeta
.
rowIndex
][
column
]
=
format
(
value
,
'yyyy-MM-dd'
)
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
})
})
}
else
{
}
else
{
console
.
log
(
column
,
value
);
dataTableInvestment
[
tableMeta
.
rowIndex
][
column
]
=
value
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
value
// if (column != 6 && column != 11 && column != 18 && column != 25 && column != 27 && column != 29 && column != 31 && column != 33 && column != 36 && column != 39 && column != 42 && column != 45) {
// if (column != 6 && column != 11 && column != 18 && column != 25 && column != 27 && column != 29 && column != 31 && column != 33 && column != 36 && column != 39 && column != 42 && column != 45) {
// val = String(value).split(",").join("")
// val = String(value).split(",").join("")
// val = this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 2) : Number(val)
// val = this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 2) : Number(val)
...
@@ -1819,23 +1885,23 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1819,23 +1885,23 @@ export default class ListOfCreditFacilities extends Component {
}
}
const
handleValueDropDownInves
=
(
value
,
type
,
tableMeta
)
=>
{
const
handleValueDropDownInves
=
(
value
,
type
,
tableMeta
)
=>
{
// let data = type == 'bankName' ? this.state.bankNameList.options : this.state.typeOfCredit
List.options
let
data
=
type
==
'typeOfInvestmentList'
?
this
.
state
.
typeOfInvestmentList
.
options
:
this
.
state
.
currency
List
.
options
//
let index = 0
let
index
=
0
// if (type == 'bankName
' && dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] != null && dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] != "") {
if
(
type
==
'typeOfInvestmentList
'
&&
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
{
//
index = data.findIndex((val) => String(val.value) == String(value.value))
index
=
data
.
findIndex
((
val
)
=>
String
(
val
.
value
)
==
String
(
value
.
value
))
//
}
}
//
if (index == -1) {
if
(
index
==
-
1
)
{
// dataTable2
[tableMeta.rowIndex][tableMeta.columnIndex] = null
dataTableInvestment
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
null
//
return null
return
null
//
} else {
}
else
{
// dataTable2
[tableMeta.rowIndex][tableMeta.columnIndex] = value
dataTableInvestment
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
value
//
return value
return
value
//
}
}
}
}
const
handleTableRatio
=
(
value
,
tableMeta
,
column
,
reportName
)
=>
{
const
handleTableRatio
=
(
value
,
tableMeta
,
column
,
reportName
)
=>
{
...
@@ -1890,43 +1956,26 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1890,43 +1956,26 @@ export default class ListOfCreditFacilities extends Component {
}
}
const
handleFormulaHardcodeInves
=
(
value
,
tableMeta
,
column
)
=>
{
const
handleFormulaHardcodeInves
=
(
value
,
tableMeta
,
column
)
=>
{
// console.log("------------coba------------------");
console
.
log
(
value
);
// console.log(tableMeta);
let
valuez
=
0
// console.log(tableMeta.rowData[0]);
if
(
tableMeta
.
rowData
[
0
]
==
8
)
{
// let valuez = 0
dataTableInvestment
.
map
((
item
,
index
)
=>
{
// if (tableMeta.rowData[0] == 8) {
if
(
item
[
6
].
value
.
includes
(
String
(
tableMeta
.
rowData
[
6
].
value
).
substr
(
6
,
tableMeta
.
rowData
[
6
].
length
))
&&
item
[
0
]
!=
8
)
{
// dataTable2.map((item, index) => {
valuez
+=
Number
(
item
[
column
])
// if (item[6].value.includes(String(tableMeta.rowData[6].value).substr(6, tableMeta.rowData[6].length)) && item[0] != 8) {
}
// valuez += Number(item[column])
})
// }
}
else
{
// })
dataTableInvestment
.
map
((
item
,
index
)
=>
{
// } else if (tableMeta.rowData[0] == 9) {
if
(
item
[
0
]
==
8
)
{
// dataTable2.map((item, index) => {
valuez
+=
Number
(
item
[
column
])
// if (item[0] == 8) {
}
// valuez += Number(item[column])
})
// }
}
// })
dataTableInvestment
[
tableMeta
.
rowIndex
][
column
]
=
valuez
// if (column == 22) {
return
valuez
// totalLoan = valuez
// }
// } else {
// if (column == 21) {
// valuez = Number(tableMeta.rowData[14]) + Number(tableMeta.rowData[16]) + Number(tableMeta.rowData[19])
// } else if (column == 22) {
// valuez = Number(tableMeta.rowData[15]) + Number(tableMeta.rowData[17]) + Number(tableMeta.rowData[20])
// } else if (column == 23) {
// valuez = Number(tableMeta.rowData[12]) - Number(tableMeta.rowData[21])
// } else if (column == 24) {
// valuez = Number(tableMeta.rowData[13]) - Number(tableMeta.rowData[22])
// }
// }
// dataTable2[tableMeta.rowIndex][column] = valuez
// return valuez
}
}
const
handleTambah
=
(
data
,
rowIndex
)
=>
{
const
handleTambah
=
(
data
,
rowIndex
)
=>
{
console
.
log
(
dataTable2
)
let
newData
=
[]
let
newData
=
[]
let
indexxx
=
0
let
indexxx
=
0
dataTable2
.
map
((
item
,
index
)
=>
{
dataTable2
.
map
((
item
,
index
)
=>
{
...
@@ -2004,12 +2053,14 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -2004,12 +2053,14 @@ export default class ListOfCreditFacilities extends Component {
// // console.log(dataTable2)
// // console.log(dataTable2)
let
newData
=
[]
let
newData
=
[]
let
indexxx
=
0
let
indexxx
=
0
dataTable2
.
map
((
item
,
index
)
=>
{
console
.
log
(
dataTableInvestment
);
dataTableInvestment
.
map
((
item
,
index
)
=>
{
console
.
log
(
item
,
index
);
indexxx
=
index
indexxx
=
index
if
(
item
[
6
]
==
"Grand Total"
)
{
if
(
item
[
6
]
==
"Grand Total"
)
{
item
[
4
6
]
=
999999
item
[
1
6
]
=
999999
}
else
{
}
else
{
item
[
4
6
]
=
indexxx
item
[
1
6
]
=
indexxx
}
}
newData
.
push
(
item
)
newData
.
push
(
item
)
if
(
index
==
rowIndex
)
{
if
(
index
==
rowIndex
)
{
...
@@ -2031,17 +2082,16 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -2031,17 +2082,16 @@ export default class ListOfCreditFacilities extends Component {
"0"
,
"0"
,
""
,
""
,
""
,
""
,
""
,
indexxx
],
indexxx
],
)
)
}
}
})
})
dataTable
2
=
newData
.
sort
((
a
,
b
)
=>
a
[
46
]
-
b
[
4
6
])
dataTable
Investment
=
newData
.
sort
((
a
,
b
)
=>
a
[
16
]
-
b
[
1
6
])
this
.
setState
({
dataTable
:
dataTable
2
},
()
=>
{
this
.
setState
({
dataTable
:
dataTable
Investment
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
console
.
log
(
dataTable
2
)
console
.
log
(
dataTable
Investment
)
},
500
)
},
500
)
})
})
}
}
...
@@ -2105,6 +2155,65 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -2105,6 +2155,65 @@ export default class ListOfCreditFacilities extends Component {
})
})
}
}
const
handleDeleteInvesment
=
(
index
)
=>
{
let
dataDelete
=
this
.
state
.
dataDelete
let
berapaInput
=
0
dataTableInvestment
.
map
((
items
,
indexs
)
=>
{
if
(
items
[
0
]
==
3
)
{
berapaInput
+=
1
}
})
dataDelete
.
push
(
dataTableInvestment
[
index
][
1
])
let
prevData
=
dataTableInvestment
[
index
-
1
]
==
undefined
?
null
:
dataTableInvestment
[
index
-
1
][
6
]
let
currentData
=
dataTableInvestment
[
index
][
6
]
let
nextData
=
dataTableInvestment
[
index
+
1
]
==
undefined
?
null
:
dataTableInvestment
[
index
+
1
][
6
]
if
(
nextData
==
null
)
{
dataTableInvestment
.
splice
(
index
,
1
)
}
else
if
(
nextData
.
value
.
includes
(
'Total'
))
{
if
(
prevData
!==
null
&&
currentData
==
null
)
{
dataTableInvestment
.
splice
(
index
,
1
)
}
else
if
(
prevData
!==
null
&&
prevData
.
value
==
currentData
.
value
)
{
dataTableInvestment
.
splice
(
index
,
1
)
}
else
if
(
dataTableInvestment
.
length
>
3
)
{
if
(
prevData
==
null
)
{
if
(
nextData
.
value
.
includes
(
'Grand'
))
{
dataTableInvestment
.
splice
(
index
,
1
)
}
else
{
dataTableInvestment
.
splice
(
index
,
2
)
}
}
else
{
dataTableInvestment
.
splice
(
index
,
2
)
}
}
else
if
(
dataTableInvestment
.
length
==
3
)
{
if
(
prevData
==
null
)
{
if
(
nextData
.
value
.
includes
(
'Grand'
))
{
dataTableInvestment
.
splice
(
index
,
1
)
}
else
{
dataTableInvestment
.
splice
(
index
,
3
)
dataTableInvestment
.
push
(
[
3
,
""
,
""
,
""
,
""
,
this
.
props
.
company
.
company_name
,
""
,
null
,
""
,
null
,
"0.0"
,
"0.0"
,
""
,
""
,
""
,
""
,
0
],
[
9
,
""
,
""
,
""
,
""
,
""
,
{
value
:
"Grand Total"
},
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
"notes"
,
999999
],
)
}
}
else
{
dataTableInvestment
.
splice
(
index
,
1
)
}
}
}
else
{
dataTableInvestment
.
splice
(
index
,
1
)
}
this
.
setState
({
dataTable
:
dataTableInvestment
,
dataDelete
},
()
=>
{
setTimeout
(()
=>
{
console
.
log
(
this
.
state
.
dataDelete
)
this
.
setState
({
loading
:
false
})
},
100
)
})
}
let
columnsLOCF
=
[
let
columnsLOCF
=
[
{
{
name
:
""
,
name
:
""
,
...
@@ -4260,10 +4369,8 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -4260,10 +4369,8 @@ export default class ListOfCreditFacilities extends Component {
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
// handleAction(tableMeta.rowData[2]) &&
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
/* {tableMeta.rowData[6] === "Active" ? */
}
{
handleActionInvesment
(
tableMeta
.
rowData
[
0
],
tableMeta
,
'addLov'
)
&&
<
span
>
{
handleAction
(
tableMeta
.
rowData
[
0
],
tableMeta
,
'add'
)
&&
<
span
>
<
LightTooltip
title
=
{
'Add'
}
arrow
>
<
LightTooltip
title
=
{
'Add'
}
arrow
>
<
button
<
button
style
=
{{
style
=
{{
...
@@ -4281,7 +4388,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -4281,7 +4388,7 @@ export default class ListOfCreditFacilities extends Component {
<
/button
>
<
/button
>
<
/LightTooltip
>
<
/LightTooltip
>
<
/span>
}
<
/span>
}
{
handleAction
(
tableMeta
.
rowData
[
0
],
tableMeta
,
'delete'
)
&&
<
span
>
{
handleAction
Invesment
(
tableMeta
.
rowData
[
0
],
tableMeta
,
'delete'
)
&&
<
span
>
<
LightTooltip
title
=
{
'Delete'
}
arrow
>
<
LightTooltip
title
=
{
'Delete'
}
arrow
>
<
button
<
button
style
=
{{
style
=
{{
...
@@ -4292,7 +4399,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -4292,7 +4399,7 @@ export default class ListOfCreditFacilities extends Component {
}}
}}
onClick
=
{()
=>
{
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
handleDelete
(
tableMeta
.
rowIndex
)
handleDelete
Invesment
(
tableMeta
.
rowIndex
)
}}
}}
>
>
<
img
src
=
{
Images
.
delete
}
style
=
{{
width
:
37
,
height
:
37
}}
/
>
<
img
src
=
{
Images
.
delete
}
style
=
{{
width
:
37
,
height
:
37
}}
/
>
...
@@ -4361,11 +4468,11 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -4361,11 +4468,11 @@ export default class ListOfCreditFacilities extends Component {
{
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
||
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
null
:
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
typeOf
Credi
tList
}
{...
this
.
state
.
typeOf
Investmen
tList
}
id
=
"typeOf
Credi
tList"
id
=
"typeOf
Investmen
tList"
onChange
=
{(
event
,
newInputValue
)
=>
handleChangeInves
(
newInputValue
,
tableMeta
,
tableMeta
.
columnIndex
)}
onChange
=
{(
event
,
newInputValue
)
=>
handleChangeInves
(
newInputValue
,
tableMeta
,
tableMeta
.
columnIndex
)}
debug
debug
value
=
{
handleValueDropDownInves
(
val
,
'typeOf
Credi
tList'
,
tableMeta
)}
value
=
{
handleValueDropDownInves
(
val
,
'typeOf
Investmen
tList'
,
tableMeta
)}
disableClearable
disableClearable
disabled
=
{
this
.
state
.
get_for
==
'view'
}
disabled
=
{
this
.
state
.
get_for
==
'view'
}
// disabled={!handleAction(tableMeta.rowData[2], tableMeta.rowData[0])}
// disabled={!handleAction(tableMeta.rowData[2], tableMeta.rowData[0])}
...
@@ -4602,30 +4709,26 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -4602,30 +4709,26 @@ export default class ListOfCreditFacilities extends Component {
),
),
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
// console.log(tableMeta);
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
==
8
||
tableMeta
.
rowData
[
0
]
==
9
?
{
tableMeta
.
rowData
[
0
]
===
8
||
tableMeta
.
rowData
[
0
]
===
9
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
null
:
<
div
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
Autocomplete
<
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
[
12
]
==
''
&&
this
.
state
.
get_for
==
'edit'
?
'#ffac99'
:
'white'
}}
type
=
"text"
defaultValue
=
{
tableMeta
.
rowData
[
12
]}
{...
this
.
state
.
currencyList
}
onBlur
=
{(
event
)
=>
handleChangeInves
(
event
.
target
.
value
,
tableMeta
,
tableMeta
.
columnIndex
)}
/
>
id
=
"currencyList"
onChange
=
{(
event
,
newInputValue
)
=>
handleChangeInves
(
newInputValue
,
tableMeta
,
tableMeta
.
columnIndex
)}
debug
value
=
{
handleValueDropDownInves
(
val
,
'currencyList'
,
tableMeta
)}
disableClearable
disabled
=
{
this
.
state
.
get_for
==
'view'
}
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
[
12
]
==
null
&&
this
.
state
.
get_for
==
'edit'
?
'#ffac99'
:
'white'
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
/div
>
<
/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
>
<
/div
>
)
)
...
@@ -4802,107 +4905,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -4802,107 +4905,7 @@ export default class ListOfCreditFacilities extends Component {
options
:
{
options
:
{
display
:
false
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
=
(
const
loadingComponent
=
(
...
...
src/container/MonthlyReport/MonthlyReport.js
View file @
d51a53e0
...
@@ -301,7 +301,7 @@ export default class MonthlyReport extends Component {
...
@@ -301,7 +301,7 @@ export default class MonthlyReport extends Component {
})
})
}
}
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
}
})
})
}
}
...
...
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