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
fe941fee
Commit
fe941fee
authored
Oct 30, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9c1525f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
5 deletions
+50
-5
index.js
src/api/index.js
+4
-0
ListOfCreditFacilitiesMR.js
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
+46
-5
No files found.
src/api/index.js
View file @
fe941fee
...
@@ -546,6 +546,9 @@ const create = (type = "") => {
...
@@ -546,6 +546,9 @@ const create = (type = "") => {
const
uploadSimulasiMROI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/monthly_report/import_monthly_report/other_currency_existing'
,
body
)
const
uploadSimulasiMROI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/monthly_report/import_monthly_report/other_currency_existing'
,
body
)
const
uploadSimulasiROOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/import_rolling_outlook/other_currency_existing'
,
body
)
const
uploadSimulasiROOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/import_rolling_outlook/other_currency_existing'
,
body
)
// Investment
const
getTypeOfInvestment
=
()
=>
api
.
get
(
'setting_type/get_all_setting_type_by_investment'
)
// Superadmin Approve
// Superadmin Approve
const
getListApprover
=
(
report
,
monthlyReportId
)
=>
api
.
get
(
`transaction/
${
report
}
/get_approver/
${
monthlyReportId
}
`
)
const
getListApprover
=
(
report
,
monthlyReportId
)
=>
api
.
get
(
`transaction/
${
report
}
/get_approver/
${
monthlyReportId
}
`
)
const
getIdToken
=
(
userId
)
=>
api
.
get
(
`transaction/get_token/
${
userId
}
`
)
const
getIdToken
=
(
userId
)
=>
api
.
get
(
`transaction/get_token/
${
userId
}
`
)
...
@@ -944,6 +947,7 @@ const create = (type = "") => {
...
@@ -944,6 +947,7 @@ const create = (type = "") => {
uploadSimulasiOperatingInd
,
uploadSimulasiOperatingInd
,
uploadSimulasiMROI
,
uploadSimulasiMROI
,
uploadSimulasiROOI
,
uploadSimulasiROOI
,
getTypeOfInvestment
}
}
}
}
...
...
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
View file @
fe941fee
...
@@ -104,6 +104,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -104,6 +104,7 @@ export default class ListOfCreditFacilities extends Component {
dataTableInvest
:
[],
dataTableInvest
:
[],
bankNameList
:
[],
bankNameList
:
[],
typeOfCreditList
:
[],
typeOfCreditList
:
[],
typeOfInvestmentList
:
[],
loading
:
false
,
loading
:
false
,
dataTableRatio
:
[],
dataTableRatio
:
[],
currentDate
:
format
(
new
Date
(),
'yyyy-MM-dd'
),
currentDate
:
format
(
new
Date
(),
'yyyy-MM-dd'
),
...
@@ -134,6 +135,47 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -134,6 +135,47 @@ export default class ListOfCreditFacilities extends Component {
this
.
getSubmission
()
this
.
getSubmission
()
this
.
getLatestUpdate
()
this
.
getLatestUpdate
()
this
.
handleViewOnly
()
this
.
handleViewOnly
()
this
.
getType
()
}
getType
()
{
api
.
create
().
getTypeOfInvestment
().
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
// // // console.log(data)
let
inputTypeOfInvesment
=
[]
data
.
investment
.
map
((
item
)
=>
{
inputTypeOfInvesment
.
push
({
value
:
item
.
value
})
})
let
defaultProps
=
{
options
:
inputTypeOfInvesment
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
};
// // // console.log(defaultProps)
this
.
setState
({
typeOfInvestmentList
:
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
)
{
...
@@ -1675,7 +1717,6 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1675,7 +1717,6 @@ export default class ListOfCreditFacilities extends Component {
if
(
column
!=
8
&&
column
!=
11
&&
column
!=
18
&&
column
!=
25
&&
column
!=
27
&&
column
!=
29
&&
column
!=
31
&&
column
!=
33
&&
column
!=
36
&&
column
!=
39
&&
column
!=
42
&&
column
!=
45
)
{
if
(
column
!=
8
&&
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
)
console
.
log
(
val
);
}
else
{
}
else
{
val
=
String
(
value
).
split
(
","
).
join
(
""
)
val
=
String
(
value
).
split
(
","
).
join
(
""
)
...
@@ -1719,6 +1760,7 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1719,6 +1760,7 @@ export default class ListOfCreditFacilities extends Component {
})
})
}
else
{
}
else
{
console
.
log
(
column
,
value
);
console
.
log
(
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)
...
@@ -1751,9 +1793,9 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -1751,9 +1793,9 @@ export default class ListOfCreditFacilities extends Component {
// dataTable2[tableMeta.rowIndex][column] = val
// dataTable2[tableMeta.rowIndex][column] = val
// }
// }
}
}
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
][
column
]);
//
console.log(dataTable2[tableMeta.rowIndex][column]);
console
.
log
(
value
)
//
console.log(value)
console
.
log
(
String
(
value
).
split
(
","
).
join
(
""
))
//
console.log(String(value).split(",").join(""))
}
}
const
handleValueDropDown
=
(
value
,
type
,
tableMeta
)
=>
{
const
handleValueDropDown
=
(
value
,
type
,
tableMeta
)
=>
{
...
@@ -4291,7 +4333,6 @@ export default class ListOfCreditFacilities extends Component {
...
@@ -4291,7 +4333,6 @@ 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
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
==
8
||
tableMeta
.
rowData
[
0
]
==
9
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
==
8
||
tableMeta
.
rowData
[
0
]
==
9
?
...
...
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