Commit 4d393453 authored by Hardiansyah's avatar Hardiansyah

fix list history olpa

parent 5374e7cf
...@@ -740,7 +740,7 @@ export default class OutlookPA extends Component { ...@@ -740,7 +740,7 @@ export default class OutlookPA extends Component {
api.create().historyApprovalOLPA(body).then(response => { api.create().historyApprovalOLPA(body).then(response => {
// console.log(response); // console.log(response);
if (response.data.data.length > 0) { if (response.data.data.length > 0) {
let dataTableHistory = response.data.data.map(item => { const dataTable = response.data.data.map(item => {
return [ return [
item.pic, item.pic,
item.status_approval, item.status_approval,
...@@ -750,7 +750,11 @@ export default class OutlookPA extends Component { ...@@ -750,7 +750,11 @@ export default class OutlookPA extends Component {
item.history_approval_date item.history_approval_date
] ]
}) })
this.setState({ dataTableHistory, visibleTableHistory: true }) if (master_report_type_id === 2) {
this.setState({ dataTableHistoryCAT: dataTable, visibleTableHistoryCAT: true })
} else {
this.setState({ dataTableHistory: dataTable, visibleTableHistory: true })
}
} }
}) })
}) })
......
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