Commit bee26a2c authored by idlanirined's avatar idlanirined

iya

parent 1f1f4339
......@@ -173,7 +173,7 @@ export default class BudgetTahunan extends Component {
"report_type": "Master Budget",
}
api.create().getReportTypeBody(payload).then(response => {
// console.log(response);
console.log(response);
if (response.data) {
if (response.data.status === "success") {
let dataTable = response.data.data.map((item, index) => {
......@@ -190,7 +190,7 @@ export default class BudgetTahunan extends Component {
let dataTableRevision = response.data.data.map((item, index) => {
return [
item.report_id,
item.report_name,
item.report_name === 'CAT' ? 'Corporate Annual Target' : item.report_name,
""
]
})
......@@ -454,9 +454,15 @@ export default class BudgetTahunan extends Component {
}
clickDetail(item, id, revision, status) {
let items = ''
if (item === 'Corporate Annual Target') {
items = 'CAT'
} else {
items = item
}
// console.log(this.state.dataForRevision);
this.state.dataForRevision.map(i => {
if (i.report_name === item) {
if (i.report_name === items) {
if (i.revision !== revision) {
this.setState({ prevRevision: true })
} else {
......
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