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
c176db5b
Commit
c176db5b
authored
Feb 21, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue download
parent
6340b06a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
12 deletions
+25
-12
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+22
-10
DownloadReport.js
src/container/DownloadReport/DownloadReport.js
+1
-2
SubHolding.js
src/container/Reports/SubHolding.js
+2
-0
No files found.
src/container/BudgetTahunan/BudgetTahunan.js
View file @
c176db5b
...
@@ -2451,35 +2451,47 @@ export default class BudgetTahunan extends Component {
...
@@ -2451,35 +2451,47 @@ export default class BudgetTahunan extends Component {
if
(
selectReport
.
length
>
0
)
{
if
(
selectReport
.
length
>
0
)
{
let
result
=
[]
let
result
=
[]
console
.
log
(
'mulai hit'
)
console
.
log
(
'mulai hit'
)
for
(
const
items
of
selectReport
)
{
for
(
const
items
of
selectReport
)
{
let
datas
=
data
.
findIndex
((
val
)
=>
val
[
4
]
==
items
)
let
datas
=
data
.
findIndex
((
val
)
=>
val
[
4
]
==
items
)
let
report
=
data
[
datas
]
let
report
=
data
[
datas
]
if
(
items
===
6
)
{
if
(
items
===
6
)
{
let
resReal
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=
${
submissionID
}
&
&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&report_id=
${
report
[
4
]}
&
&download_file_report_id=
${
downloadedFileReportId
}
`
let
resReal
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=
${
submissionID
}
&
company_id=
${
company
.
company_id
}
&year=
${
periode
.
periode
}
&revision=
${
report
[
2
]}
&report_id=
${
report
[
4
]}
&download_file_report_id=
${
downloadedFileReportId
}
`
let
resNull
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=&&company_id=
${
company
.
company_id
}
&
&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&report_id=
${
report
[
4
]}
&
&download_file_report_id=
${
downloadedFileReportId
}
`
let
resNull
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=&&company_id=
${
company
.
company_id
}
&
year=
${
periode
.
periode
}
&revision=
${
report
[
2
]}
&report_id=
${
report
[
4
]}
&download_file_report_id=
${
downloadedFileReportId
}
`
let
res
=
await
fetch
(
let
res
=
await
fetch
(
this
.
props
.
submissionID
==
null
?
resNull
:
resReal
submissionID
==
null
?
resNull
:
resReal
)
)
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
}
console
.
log
(
res
)
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
result
=
[...
result
,
res
];
}
}
}
else
{
}
else
{
let
resReal
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/master_budget/export_master_budget?submission_id=
${
submissionID
}
&
&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&
&download_file_report_id=
${
downloadedFileReportId
}
`
let
resReal
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/master_budget/export_master_budget?submission_id=
${
submissionID
}
&
report_id=
${
report
[
4
]}
&company_id=
${
company
.
company_id
}
&year=
${
periode
.
periode
}
&revision=
${
report
[
2
]}
&download_file_report_id=
${
downloadedFileReportId
}
`
let
resNull
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/master_budget/export_master_budget?submission_id=&
&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&
&download_file_report_id=
${
downloadedFileReportId
}
`
let
resNull
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/master_budget/export_master_budget?submission_id=&
report_id=
${
report
[
4
]}
&company_id=
${
company
.
company_id
}
&year=
${
periode
.
periode
}
&revision=
${
report
[
2
]}
&download_file_report_id=
${
downloadedFileReportId
}
`
let
res
=
await
fetch
(
let
res
=
await
fetch
(
this
.
props
.
submissionID
==
null
?
resNull
:
resReal
submissionID
==
null
?
resNull
:
resReal
)
)
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
}
console
.
log
(
res
)
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
result
=
[...
result
,
res
];
}
}
}
}
}
}
console
.
log
(
'ini result'
,
result
);
console
.
log
(
'ini result'
,
result
);
// every untuk cek ke setiap result di dalam array
// every untuk cek ke setiap result di dalam array
if
(
result
.
every
((
e
)
=>
e
.
status
==
200
))
{
if
(
result
.
every
((
e
)
=>
e
.
status
==
200
))
{
this
.
handleZip
();
this
.
handleZip
();
}
}
// Promise untuk ngumpulin semua result yg statusnya 200
// Promise untuk ngumpulin semua result yg statusnya 200
...
...
src/container/DownloadReport/DownloadReport.js
View file @
c176db5b
...
@@ -173,7 +173,6 @@ class DownloadReport extends Component {
...
@@ -173,7 +173,6 @@ class DownloadReport extends Component {
let
res
=
await
fetch
(
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/download/zip-files?downloadedFileReportId=
${
idFile
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/download/zip-files?downloadedFileReportId=
${
idFile
}
`
)
)
console
.
log
(
res
);
res
=
await
res
.
blob
()
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
if
(
res
.
size
>
0
)
{
if
(
res
.
size
>
0
)
{
...
@@ -283,7 +282,7 @@ class DownloadReport extends Component {
...
@@ -283,7 +282,7 @@ class DownloadReport extends Component {
<
img
src
=
{
Images
.
zip
}
style
=
{{
width
:
80
,
margin
:
9
}}
/
>
<
img
src
=
{
Images
.
zip
}
style
=
{{
width
:
80
,
margin
:
9
}}
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
width
:
'
92
%'
,
background
:
'#D9D9D9'
,
borderRadius
:
10
,
marginBottom
:
15
,
borderBottomLeftRadius
:
0
,
borderTopLeftRadius
:
0
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
width
:
'
100
%'
,
background
:
'#D9D9D9'
,
borderRadius
:
10
,
marginBottom
:
15
,
borderBottomLeftRadius
:
0
,
borderTopLeftRadius
:
0
}}
>
<
div
style
=
{{
marginRight
:
10
}}
>
<
div
style
=
{{
marginRight
:
10
}}
>
<
Typography
style
=
{{
fontSize
:
18
,
color
:
'#273B80'
,
fontWeight
:
700
,
marginTop
:
10
,
marginLeft
:
10
}}
>
{
item
.
download_file_report_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
18
,
color
:
'#273B80'
,
fontWeight
:
700
,
marginTop
:
10
,
marginLeft
:
10
}}
>
{
item
.
download_file_report_name
}
<
/Typography
>
<
Typography
style
=
{{
marginLeft
:
10
,
marginTop
:
5
,
fontSize
:
11
,
marginBottom
:
10
}}
>
Last
Download
by
:
{
item
.
created_by
}
-
{
item
.
created_at
}
<
/Typography
>
<
Typography
style
=
{{
marginLeft
:
10
,
marginTop
:
5
,
fontSize
:
11
,
marginBottom
:
10
}}
>
Last
Download
by
:
{
item
.
created_by
}
-
{
item
.
created_at
}
<
/Typography
>
...
...
src/container/Reports/SubHolding.js
View file @
c176db5b
...
@@ -4007,7 +4007,9 @@ export default class SubHolding extends Component {
...
@@ -4007,7 +4007,9 @@ export default class SubHolding extends Component {
let
res
=
await
fetch
(
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/db_balance_sheet/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/db_balance_sheet/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
)
)
console
.
log
(
res
);
res
=
await
res
.
blob
()
res
=
await
res
.
blob
()
console
.
log
(
res
);
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
if
(
res
.
size
>
0
)
{
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
url
=
window
.
URL
.
createObjectURL
(
res
);
...
...
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