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
dfe9e7ff
Commit
dfe9e7ff
authored
Aug 13, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
download template BU See merge request
!65
parents
5158b3cf
5a143dbe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
UnitBisnis.js
src/container/MasterData/UnitBisnis.js
+25
-1
No files found.
src/container/MasterData/UnitBisnis.js
View file @
dfe9e7ff
...
@@ -132,6 +132,21 @@ export default class UnitBisnis extends Component {
...
@@ -132,6 +132,21 @@ export default class UnitBisnis extends Component {
})
})
}
}
downloadFile
=
async
()
=>
{
let
res
=
await
fetch
(
"https://trftia.eksad.com/tia-reporting-dev/public/attachment/download_file?fileName=BusinessUnitTemplate&&fileType=xlsx"
)
res
=
await
res
.
blob
()
console
.
log
(
res
)
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Template Business Unit.xlsx'
;
a
.
click
();
}
}
render
()
{
render
()
{
const
columns
=
[{
const
columns
=
[{
name
:
"Action"
,
name
:
"Action"
,
...
@@ -216,7 +231,16 @@ export default class UnitBisnis extends Component {
...
@@ -216,7 +231,16 @@ export default class UnitBisnis extends Component {
{
/* <input type="text" value={this.state.search} onChange={(e)=> this.setState({ search: e.target.value})} style={{ width: '100%'}} /> */
}
{
/* <input type="text" value={this.state.search} onChange={(e)=> this.setState({ search: e.target.value})} style={{ width: '100%'}} /> */
}
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'30%'
,
justifyContent
:
'space-around'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
div
style
=
{{
width
:
'30%'
,
justifyContent
:
'space-around'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
}}
onClick
=
{()
=>
this
.
downloadFile
()}
>
<
img
src
=
{
Images
.
template
}
/
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
...
...
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