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
1855aefd
Commit
1855aefd
authored
Dec 08, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue download data
parent
93c932ec
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
15 deletions
+39
-15
LOVMR.js
src/container/MonthlyReport/LOVMR.js
+4
-1
ListOfCreditFacilitiesMR.js
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
+7
-3
MonthlyReport.js
src/container/MonthlyReport/MonthlyReport.js
+28
-11
No files found.
src/container/MonthlyReport/LOVMR.js
View file @
1855aefd
...
...
@@ -288,6 +288,8 @@ export default class LOV extends Component {
console
.
log
(
lastArray
);
this
.
setState
({
dataTable
,
diff
:
lastArray
[
16
],
loanTotal
:
lastArray
[
17
],
perBS
:
lastArray
[
18
],
loading
:
false
,
visibleLOVMR
:
true
},
()
=>
{
this
.
props
.
sendToParent
(
dataTable
,
lastArray
,
'LOV'
)
})
}
})
...
...
@@ -478,6 +480,7 @@ export default class LOV extends Component {
this
.
setState
({
dataTable
,
diff
:
lastArray
[
16
],
loanTotal
:
lastArray
[
17
],
perBS
:
lastArray
[
18
],
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
dataDelete
:
[]
},
()
=>
{
this
.
props
.
sendToParent
(
dataTable
,
lastArray
,
'LOV'
,
'upload'
,
this
.
state
.
visibleLOVMR
)
})
console
.
log
(
this
.
state
.
visibleLOVMR
);
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
typeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
...
...
@@ -975,7 +978,7 @@ export default class LOV extends Component {
this
.
setState
({
dataTable
:
dataTable2
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
})
this
.
props
.
sendToParent
(
dataTable2
,
lastArray
,
'LOV'
,
'tambah'
)
this
.
props
.
sendToParent
(
dataTable2
,
lastArray
,
'LOV'
,
'tambah'
,
this
.
state
.
visibleLOVMR
)
},
500
)
})
}
...
...
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
View file @
1855aefd
...
...
@@ -158,8 +158,8 @@ export default class ListOfCreditFacilities extends Component {
}
dataTableForChild
(
data
,
array
,
params
,
type
,
visibleView
)
{
console
.
log
(
visibleView
);
console
.
log
(
type
);
//
console.log(visibleView);
//
console.log(type);
switch
(
params
)
{
case
"LOV"
:
console
.
log
(
data
);
...
...
@@ -1022,6 +1022,10 @@ export default class ListOfCreditFacilities extends Component {
handleCalculateLOV
=
()
=>
{
this
.
setState
({
loading
:
true
})
console
.
log
(
this
.
state
.
dataTablelov
);
console
.
log
(
this
.
state
.
dataTableLOV
);
console
.
log
(
this
.
state
.
tambahLOV
);
console
.
log
(
this
.
state
.
visibleParent
);
let
dataTable2
=
this
.
state
.
dataTablelov
==
undefined
||
this
.
state
.
tambahLOV
==
'tambah'
||
this
.
state
.
tambahLOV
==
'upload'
?
this
.
state
.
dataTableLOV
:
this
.
state
.
dataTablelov
let
data
=
[]
let
error
=
false
...
...
src/container/MonthlyReport/MonthlyReport.js
View file @
1855aefd
...
...
@@ -2356,9 +2356,10 @@ export default class MonthlyReport extends Component {
let
result
=
[]
console
.
log
(
'mulai hit'
)
for
(
const
items
of
selectReport
)
{
let
urlReport
=
items
===
8
?
"profit_loss"
:
items
===
12
?
"tax_planning"
:
items
===
7
?
"balance_sheet"
:
items
===
9
?
"fam"
:
items
===
13
?
"cash_flow"
:
items
===
1
1
?
"locf"
:
items
===
1
0
?
"cat"
:
null
let
urlReport
=
items
===
8
?
"profit_loss"
:
items
===
12
?
"tax_planning"
:
items
===
7
?
"balance_sheet"
:
items
===
9
?
"fam"
:
items
===
13
?
"cash_flow"
:
items
===
10
?
"cat"
:
null
let
datas
=
data
.
findIndex
((
val
)
=>
val
[
4
]
==
items
)
let
report
=
data
[
datas
]
if
(
items
!==
11
)
{
try
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/monthly_report/export_monthly_report?monthly_report_id=
${
monthlyReportId
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&months=
${
month
.
month_id
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
...
...
@@ -2370,7 +2371,23 @@ export default class MonthlyReport extends Component {
}
catch
(
error
)
{
alert
(
error
)
}
}
else
{
try
{
let
res1
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/locf/monthly_report/export_monthly_report?monthly_report_id=
${
monthlyReportId
===
null
?
""
:
monthlyReportId
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&months=
${
month
.
month_id
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
)
if
(
res1
.
status
===
200
)
{
let
res2
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/lov/monthly_report/export_monthly_report?monthly_report_id=
${
monthlyReportId
===
null
?
""
:
monthlyReportId
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&months=
${
month
.
month_id
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
)
if
(
res2
.
status
===
200
)
{
result
=
[...
result
,
res2
];
}
}
}
catch
(
error
)
{
alert
(
error
)
}
}
}
console
.
log
(
'ini result'
,
result
);
...
...
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