Commit f801a34a authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

baru icon download

parent 85241424
...@@ -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%' }}>
......
...@@ -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%' }}>
......
...@@ -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%' }}>
......
...@@ -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%' }}>
......
...@@ -20,38 +20,6 @@ export default class PopUpDeleteAM extends Component { ...@@ -20,38 +20,6 @@ export default class PopUpDeleteAM extends Component {
// } // }
console.log(this.props.data) console.log(this.props.data)
} }
// 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)
......
...@@ -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';
...@@ -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,
...@@ -84,8 +87,37 @@ export default class QReview extends Component { ...@@ -84,8 +87,37 @@ export default class QReview 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%' }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment