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

add managdoc qreview

parent 289c9276
......@@ -25,12 +25,12 @@ export default class AuditTahunan extends Component {
}
componentWillReceiveProps(props) {
// console.log(props);
const { refresh, id } = this.props;
if (props.refresh !== refresh) {
this.getData()
// console.log(props);
const { refresh, id } = this.props;
if (props.refresh !== refresh) {
this.getData()
}
}
}
getData() {
let payload = {
......@@ -39,22 +39,22 @@ export default class AuditTahunan extends Component {
api.create().getAllDocument(payload).then(response => {
console.log(response)
if(response.problem){
if (response.problem){
alert(response.problem)
} else {
let dataTable = response.data.data.map(item => {
return [
item.document_name,
item.description,
item.company_name,
"",
item.document_type,
String(Number(item.document_size) / 1000 + ' MB'),
item.created_by,
item.created_at,
]
})
this.setState({ dataTable })
let dataTable = response.data.data.map(item => {
return [
item.document_name,
item.description,
item.company_name,
"",
item.document_type,
String(Number(item.document_size) / 1000 + ' MB'),
item.created_by,
item.created_at,
]
})
this.setState({ dataTable })
}
})
}
......
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