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