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
259b9b4a
Commit
259b9b4a
authored
Sep 12, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
tambahin icon download di managdoc See merge request
!289
parents
bd7e13f7
58c7ee4a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
236 additions
and
58 deletions
+236
-58
index.js
src/api/index.js
+2
-0
AuditTahunan.js
src/container/DocumentManagement/AuditTahunan.js
+35
-3
BOD.js
src/container/DocumentManagement/BOD.js
+35
-2
DocumentManagement.js
src/container/DocumentManagement/DocumentManagement.js
+30
-2
ManualBookETMS.js
src/container/DocumentManagement/ManualBookETMS.js
+35
-3
ManualBookTia.js
src/container/DocumentManagement/ManualBookTia.js
+35
-4
PopUpKonfirmasi.js
src/container/DocumentManagement/PopUpKonfirmasi.js
+1
-36
QReview.js
src/container/DocumentManagement/QReview.js
+63
-8
No files found.
src/api/index.js
View file @
259b9b4a
...
@@ -180,6 +180,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
...
@@ -180,6 +180,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
const
getAllDocument
=
(
body
)
=>
api
.
post
(
'document/get_all_document'
,
body
)
const
getAllDocument
=
(
body
)
=>
api
.
post
(
'document/get_all_document'
,
body
)
const
uploadDocument
=
(
body
)
=>
api
.
post
(
'document/upload_document'
,
body
)
const
uploadDocument
=
(
body
)
=>
api
.
post
(
'document/upload_document'
,
body
)
const
updateDocument
=
(
body
)
=>
api
.
post
(
'document/update_document'
,
body
)
const
updateDocument
=
(
body
)
=>
api
.
post
(
'document/update_document'
,
body
)
const
downloadDocument
=
(
body
)
=>
api
.
post
(
'document/download_document'
,
body
)
// ------
// ------
// STEP 3
// STEP 3
...
@@ -288,6 +289,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
...
@@ -288,6 +289,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
getAllDocument
,
getAllDocument
,
uploadDocument
,
uploadDocument
,
updateDocument
,
updateDocument
,
downloadDocument
,
createSubmitReport
,
createSubmitReport
,
getSubmission
getSubmission
}
}
...
...
src/container/DocumentManagement/AuditTahunan.js
View file @
259b9b4a
...
@@ -2,6 +2,8 @@ import React, { Component } from 'react'
...
@@ -2,6 +2,8 @@ import React, { Component } from 'react'
import
MUIDataTable
from
'mui-datatables'
import
MUIDataTable
from
'mui-datatables'
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
api
from
'../../api'
;
import
api
from
'../../api'
;
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
...
@@ -39,8 +41,9 @@ export default class AuditTahunan extends Component {
...
@@ -39,8 +41,9 @@ export default class AuditTahunan extends Component {
api
.
create
().
getAllDocument
(
payload
).
then
(
response
=>
{
api
.
create
().
getAllDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
let
dataTable
=
response
.
data
.
data
.
map
(
item
=>
{
let
dataTable
=
response
.
data
.
data
.
map
(
(
item
,
index
)
=>
{
return
[
return
[
index
,
item
.
document_name
,
item
.
document_name
,
item
.
description
,
item
.
description
,
item
.
company_name
,
item
.
company_name
,
...
@@ -56,8 +59,37 @@ export default class AuditTahunan extends Component {
...
@@ -56,8 +59,37 @@ export default class AuditTahunan extends Component {
}
}
render
()
{
render
()
{
let
columns
=
[
let
columns
=
[{
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Periode"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
name
:
"Action"
,
options
:
{
filter
:
false
,
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
console
.
log
(
tableMeta
)
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
/* {this.state.btnedit && <span> */
}
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginRight
:
15
}}
// onClick={() => console.log(tableMeta)}
// onClick={() => this.openPopUp(tableMeta.rowData, 'edit')}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
/* </span>} */
}
<
/div
>
);
}
}
},
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Periode"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
]
]
return
(
return
(
<
div
style
=
{{
width
:
'100%'
}}
>
<
div
style
=
{{
width
:
'100%'
}}
>
...
...
src/container/DocumentManagement/BOD.js
View file @
259b9b4a
...
@@ -2,6 +2,8 @@ import React, { Component } from 'react'
...
@@ -2,6 +2,8 @@ import React, { Component } from 'react'
import
MUIDataTable
from
'mui-datatables'
import
MUIDataTable
from
'mui-datatables'
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
api
from
'../../api'
;
import
api
from
'../../api'
;
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
...
@@ -45,8 +47,9 @@ export default class BOD extends Component {
...
@@ -45,8 +47,9 @@ export default class BOD extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
let
dataTable
=
response
.
data
.
data
.
map
(
item
=>
{
let
dataTable
=
response
.
data
.
data
.
map
(
(
item
,
index
)
=>
{
return
[
return
[
index
,
item
.
document_name
,
item
.
document_name
,
item
.
description
,
item
.
description
,
item
.
company_name
,
item
.
company_name
,
...
@@ -66,7 +69,37 @@ export default class BOD extends Component {
...
@@ -66,7 +69,37 @@ export default class BOD extends Component {
render
()
{
render
()
{
let
columns
=
[
let
columns
=
[
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Periode"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
{
name
:
"Action"
,
options
:
{
filter
:
false
,
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
console
.
log
(
tableMeta
)
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
/* {this.state.btnedit && <span> */
}
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginRight
:
15
}}
// onClick={() => console.log(tableMeta)}
// onClick={() => this.openPopUp(tableMeta.rowData, 'edit')}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
/* </span>} */
}
<
/div
>
);
}
}
},
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Periode"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
]
]
return
(
return
(
<
div
style
=
{{
width
:
'100%'
}}
>
<
div
style
=
{{
width
:
'100%'
}}
>
...
...
src/container/DocumentManagement/DocumentManagement.js
View file @
259b9b4a
...
@@ -143,6 +143,35 @@ export default class DocumentManagement extends Component {
...
@@ -143,6 +143,35 @@ export default class DocumentManagement extends Component {
this
.
setState
({
alert
:
false
})
this
.
setState
({
alert
:
false
})
}
}
getDownloadDocument
(
payload
){
// console.log(payload)
api
.
create
().
downloadDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
// this.getDataDocument(settingID)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
visibleCreate
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
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'
})
}
})
}
render
()
{
render
()
{
return
(
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
}}
>
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
}}
>
...
@@ -202,6 +231,7 @@ export default class DocumentManagement extends Component {
...
@@ -202,6 +231,7 @@ export default class DocumentManagement extends Component {
<
QReview
<
QReview
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
data
=
{
this
.
state
.
listData
[
this
.
state
.
tab
]}
refresh
=
{
this
.
state
.
refresh
}
refresh
=
{
this
.
state
.
refresh
}
getDownloadDocument
=
{
this
.
getDownloadDocument
.
bind
(
this
)}
/
>
/
>
:
:
this
.
state
.
id
===
68543
?
this
.
state
.
id
===
68543
?
...
@@ -226,8 +256,6 @@ export default class DocumentManagement extends Component {
...
@@ -226,8 +256,6 @@ export default class DocumentManagement extends Component {
{
this
.
state
.
konfirmasi
&&
(
{
this
.
state
.
konfirmasi
&&
(
<
PopUpKonfirmasi
<
PopUpKonfirmasi
onClickClosePopUp
=
{()
=>
this
.
setState
({
konfirmasi
:
false
})}
onClickClosePopUp
=
{()
=>
this
.
setState
({
konfirmasi
:
false
})}
// getList={() => this.getData.bind(this)}
// deleteAM={this.deleteAM.bind(this)}
uploadDocId
=
{
this
.
createUploadDocument
.
bind
(
this
)}
uploadDocId
=
{
this
.
createUploadDocument
.
bind
(
this
)}
/
>
/
>
)}
)}
...
...
src/container/DocumentManagement/ManualBookETMS.js
View file @
259b9b4a
...
@@ -2,6 +2,8 @@ import React, { Component } from 'react'
...
@@ -2,6 +2,8 @@ import React, { Component } from 'react'
import
MUIDataTable
from
'mui-datatables'
import
MUIDataTable
from
'mui-datatables'
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
api
from
'../../api'
;
import
api
from
'../../api'
;
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
...
@@ -38,8 +40,9 @@ export default class ManualBookETMS extends Component {
...
@@ -38,8 +40,9 @@ export default class ManualBookETMS extends Component {
api
.
create
().
getAllDocument
(
payload
).
then
(
response
=>
{
api
.
create
().
getAllDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
let
dataTable
=
response
.
data
.
data
.
map
(
item
=>
{
let
dataTable
=
response
.
data
.
data
.
map
(
(
item
,
index
)
=>
{
return
[
return
[
index
,
item
.
document_name
,
item
.
document_name
,
item
.
description
,
item
.
description
,
item
.
company_name
,
item
.
company_name
,
...
@@ -54,8 +57,37 @@ export default class ManualBookETMS extends Component {
...
@@ -54,8 +57,37 @@ export default class ManualBookETMS extends Component {
}
}
render
()
{
render
()
{
let
columns
=
[
let
columns
=
[{
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
name
:
"Action"
,
options
:
{
filter
:
false
,
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
console
.
log
(
tableMeta
)
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
/* {this.state.btnedit && <span> */
}
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginRight
:
15
}}
// onClick={() => console.log(tableMeta)}
// onClick={() => this.openPopUp(tableMeta.rowData, 'edit')}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
/* </span>} */
}
<
/div
>
);
}
}
},
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
]
]
return
(
return
(
<
div
style
=
{{
width
:
'100%'
}}
>
<
div
style
=
{{
width
:
'100%'
}}
>
...
...
src/container/DocumentManagement/ManualBookTia.js
View file @
259b9b4a
...
@@ -2,7 +2,8 @@ import React, { Component } from 'react'
...
@@ -2,7 +2,8 @@ import React, { Component } from 'react'
import
MUIDataTable
from
'mui-datatables'
import
MUIDataTable
from
'mui-datatables'
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
api
from
'../../api'
;
import
api
from
'../../api'
;
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -38,8 +39,9 @@ export default class ManualBookTia extends Component {
...
@@ -38,8 +39,9 @@ export default class ManualBookTia extends Component {
api
.
create
().
getAllDocument
(
payload
).
then
(
response
=>
{
api
.
create
().
getAllDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
let
dataTable
=
response
.
data
.
data
.
map
(
item
=>
{
let
dataTable
=
response
.
data
.
data
.
map
(
(
item
,
index
)
=>
{
return
[
return
[
index
,
item
.
document_name
,
item
.
document_name
,
item
.
description
,
item
.
description
,
item
.
company_name
,
item
.
company_name
,
...
@@ -55,8 +57,37 @@ export default class ManualBookTia extends Component {
...
@@ -55,8 +57,37 @@ export default class ManualBookTia extends Component {
}
}
render
()
{
render
()
{
let
columns
=
[
let
columns
=
[{
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
name
:
"Action"
,
options
:
{
filter
:
false
,
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
console
.
log
(
tableMeta
)
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
/* {this.state.btnedit && <span> */
}
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginRight
:
15
}}
// onClick={() => console.log(tableMeta)}
// onClick={() => this.openPopUp(tableMeta.rowData, 'edit')}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
/* </span>} */
}
<
/div
>
);
}
}
},
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
]
]
return
(
return
(
<
div
style
=
{{
width
:
'100%'
}}
>
<
div
style
=
{{
width
:
'100%'
}}
>
...
...
src/container/DocumentManagement/PopUpKonfirmasi.js
View file @
259b9b4a
...
@@ -4,50 +4,15 @@ import { Typography } from '@material-ui/core';
...
@@ -4,50 +4,15 @@ import { Typography } from '@material-ui/core';
import
api
from
"../../api"
;
import
api
from
"../../api"
;
import
Constant
from
'../../library/Constant'
;
import
Constant
from
'../../library/Constant'
;
export
default
class
PopUp
DeleteAM
extends
Component
{
export
default
class
PopUp
Konfirmasi
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
id
:
''
,
getApprovedBy
:
null
,
getTypes
:
null
,
}
}
}
}
componentDidMount
()
{
componentDidMount
()
{
}
}
// getDetailAM() {
// api.create().getDetailAM(this.props.data[1]).then(response => {
// console.log(response.data)
// if (response.data) {
// if (response.ok) {
// if (response.data.status === "success") {
// let data = response.data.data
// this.setState({
// id: data.approval_matrix_id,
// getTypes: data.approval_type_name,
// getApprovedBy: data.fullname
// })
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
// if (response.data.message.includes("Someone Logged In")) {
// setTimeout(() => {
// localStorage.removeItem(Constant.TOKEN)
// window.location.reload();
// }, 1000);
// }
// })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
// }
// })
// }
onClickUpload
()
{
onClickUpload
()
{
let
payload
=
this
.
props
.
data
let
payload
=
this
.
props
.
data
this
.
props
.
uploadDocId
(
payload
)
this
.
props
.
uploadDocId
(
payload
)
...
...
src/container/DocumentManagement/QReview.js
View file @
259b9b4a
...
@@ -5,6 +5,8 @@ import { createMuiTheme, MuiThemeProvider, Snackbar } from '@material-ui/core';
...
@@ -5,6 +5,8 @@ import { createMuiTheme, MuiThemeProvider, Snackbar } from '@material-ui/core';
import
api
from
'../../api'
;
import
api
from
'../../api'
;
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
Constant
from
'../../library/Constant'
;
import
Constant
from
'../../library/Constant'
;
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
import
CreateManagementDoc
from
'./CreateManagementDoc'
;
...
@@ -31,12 +33,12 @@ export default class QReview extends Component {
...
@@ -31,12 +33,12 @@ export default class QReview extends Component {
}
}
componentWillReceiveProps
(
props
)
{
componentWillReceiveProps
(
props
)
{
// console.log(props);
// console.log(props);
const
{
refresh
,
id
}
=
this
.
props
;
const
{
refresh
,
id
}
=
this
.
props
;
if
(
props
.
refresh
!==
refresh
)
{
if
(
props
.
refresh
!==
refresh
)
{
this
.
getData
()
this
.
getData
()
}
}
}
}
getData
()
{
getData
()
{
let
payload
=
{
let
payload
=
{
...
@@ -51,8 +53,9 @@ export default class QReview extends Component {
...
@@ -51,8 +53,9 @@ export default class QReview extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
let
dataTable
=
response
.
data
.
data
.
map
(
item
=>
{
let
dataTable
=
response
.
data
.
data
.
map
(
(
item
,
index
)
=>
{
return
[
return
[
index
,
item
.
document_name
,
item
.
document_name
,
item
.
description
,
item
.
description
,
item
.
company_name
,
item
.
company_name
,
...
@@ -83,9 +86,61 @@ export default class QReview extends Component {
...
@@ -83,9 +86,61 @@ export default class QReview extends Component {
})
})
}
}
openPopUp
(
index
,
type
){
if
(
type
===
'download'
)
{
const
formData
=
new
FormData
();
formData
.
append
(
"documentName"
,
index
[
1
]);
formData
.
append
(
"fileType"
,
index
[
5
]);
this
.
setState
({
formData
},
()
=>
{
this
.
props
.
getDownloadDocument
(
this
.
state
.
formData
)
})
}
}
downloadDoc
()
{
let
datax
=
this
.
state
.
index
console
.
log
(
datax
)
// let payload = {
// "documentName": this.state.typeId.approval_type_id,
// "fileType": this.state.order
// }
// this.props.getDownloadDocument(payload)
}
render
()
{
render
()
{
let
columns
=
[
let
columns
=
[{
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Periode"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
name
:
"Action"
,
options
:
{
filter
:
false
,
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
console
.
log
(
tableMeta
)
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
/* {this.state.btnedit && <span> */
}
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginRight
:
15
}}
// onClick={() => console.log(tableMeta)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
'download'
)}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
/* </span>} */
}
<
/div
>
);
}
}
},
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Periode"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
]
]
return
(
return
(
<
div
style
=
{{
width
:
'100%'
}}
>
<
div
style
=
{{
width
:
'100%'
}}
>
...
...
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