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
14822e98
Commit
14822e98
authored
Jul 21, 2022
by
muhammad ridwan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'env/ridwan' into 'ENV-DEV-CR-CAFRM'
fixed file download See merge request
!1616
parents
2b8f1d48
2dbe9a51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
RepotrCafrm.js
src/container/ReportCarfm/RepotrCafrm.js
+3
-3
No files found.
src/container/ReportCarfm/RepotrCafrm.js
View file @
14822e98
...
@@ -193,10 +193,10 @@ class RepotrCafrm extends Component {
...
@@ -193,10 +193,10 @@ class RepotrCafrm extends Component {
}
}
async
downloadData
()
{
async
downloadData
()
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/monitoring/export_cafrm_report?periode=
${
this
.
state
.
curYear
}
&months=
${
this
.
state
.
curMonth
}
`
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/monitoring/export_cafrm_report?periode=
${
this
.
state
.
curYear
}
&months=
${
this
.
state
.
curMonth
}
&status=
${
this
.
state
.
curStatus
}
`
console
.
log
(
url
);
console
.
log
(
url
);
let
res
=
await
fetch
(
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/monitoring/export_cafrm_report?periode=
${
this
.
state
.
curYear
}
&months=
${
this
.
state
.
curMonth
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/monitoring/export_cafrm_report?periode=
${
this
.
state
.
curYear
}
&months=
${
this
.
state
.
curMonth
}
&status=
${
this
.
state
.
curStatus
}
`
)
)
res
=
await
res
.
blob
()
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
...
@@ -204,7 +204,7 @@ class RepotrCafrm extends Component {
...
@@ -204,7 +204,7 @@ class RepotrCafrm extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
href
=
url
;
a
.
download
=
`Progress Report CARFM
${
this
.
state
.
curYear
}
-
${
this
.
state
.
curMonth
}
.xlsx`
;
a
.
download
=
`Progress Report CARFM
${
this
.
state
.
curYear
}
-
${
this
.
state
.
curMonth
}
-
${
this
.
state
.
defaultStatus
.
name
}
.xlsx`
;
a
.
click
();
a
.
click
();
}
}
}
}
...
...
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