Commit 8d6852a5 authored by r.kurnia's avatar r.kurnia

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into rifka

parents 95e326df cfc5dff3
...@@ -75,7 +75,18 @@ export default class SubHolding extends Component { ...@@ -75,7 +75,18 @@ export default class SubHolding extends Component {
this.setState({ userCompany: response.data.data.company }, () => { this.setState({ userCompany: response.data.data.company }, () => {
this.getCompanyActive() this.getCompanyActive()
}) })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
} }
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error'})
} }
} }
}) })
......
...@@ -95,7 +95,18 @@ export default class SummaryOfTriputra extends Component { ...@@ -95,7 +95,18 @@ export default class SummaryOfTriputra extends Component {
// this.getRevision() // this.getRevision()
// } // }
}) })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
} }
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
} }
}) })
} }
...@@ -129,7 +140,18 @@ export default class SummaryOfTriputra extends Component { ...@@ -129,7 +140,18 @@ export default class SummaryOfTriputra extends Component {
this.getDataTable() this.getDataTable()
}) })
console.log(this.state.month) console.log(this.state.month)
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
} }
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
} }
}) })
} }
...@@ -211,10 +233,63 @@ export default class SummaryOfTriputra extends Component { ...@@ -211,10 +233,63 @@ export default class SummaryOfTriputra extends Component {
console.log(response); console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
let res = [response.data.data] if (response.data.status === 'success') {
const handlePushChild = (item) => { let res = [response.data.data]
let indexIDzz = dataTable.findIndex((val) => val[0] === item.company_id) const handlePushChild = (item) => {
if (indexIDzz === -1) { let indexIDzz = dataTable.findIndex((val) => val[0] === item.company_id)
if (indexIDzz === -1) {
dataTable.push([
// item.company_id,
0,
item.parent,
item.level,
item.item_name,
item.revenue_act,
item.revenue_mb,
item.revenue_percent_of_mb,
item.ebitda_act,
item.ebitda_mb,
item.ebitda_percent_of_mb,
item.tpat_act,
item.tpat_mb,
item.tpat_percent_of_mb,
item.npat_act,
item.npat_mb,
item.npat_percent_of_mb,
item.cash_flow_cfo,
item.cash_flow_cfi,
item.cash_flow_cff,
item.cash_flow_cf,
item.os_bank_loan_ki,
item.os_bank_loan_wc,
item.os_bank_loan_other,
item.os_bank_loan_total,
item.os_shl,
item.balance_sheet_cash_bank,
item.balance_sheet_ca,
item.balance_sheet_cl,
item.balance_sheet_equity,
item.ratio_cr,
item.ratio_der,
item.ratio_debt_to_ebitda,
item.ratio_to_interest,
item.ratio_ar_days,
item.ratio_inv_days,
item.ratio_ap_days,
item.ratio_ccc,
item.is_approved == undefined ? true : item.is_approved,
// item.order,
])
}
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
}
}
}
res.map((item, index) => {
dataTable.push([ dataTable.push([
// item.company_id, // item.company_id,
0, 0,
...@@ -257,68 +332,26 @@ export default class SummaryOfTriputra extends Component { ...@@ -257,68 +332,26 @@ export default class SummaryOfTriputra extends Component {
item.is_approved == undefined ? true : item.is_approved, item.is_approved == undefined ? true : item.is_approved,
// item.order, // item.order,
]) ])
} if (item.children !== null) {
if (item.children !== null) { if (item.children.length > 0) {
if (item.children.length > 0) { item.children.map((items, indexs) => {
item.children.map((items, indexs) => { handlePushChild(items)
handlePushChild(items) })
}) }
} }
} })
} console.log(dataTable)
res.map((item, index) => { this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
dataTable.push([ } else {
// item.company_id, this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
0, if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
item.parent, setTimeout(() => {
item.level, localStorage.removeItem(Constant.TOKEN)
item.item_name, window.location.reload();
item.revenue_act, }, 1000);
item.revenue_mb,
item.revenue_percent_of_mb,
item.ebitda_act,
item.ebitda_mb,
item.ebitda_percent_of_mb,
item.tpat_act,
item.tpat_mb,
item.tpat_percent_of_mb,
item.npat_act,
item.npat_mb,
item.npat_percent_of_mb,
item.cash_flow_cfo,
item.cash_flow_cfi,
item.cash_flow_cff,
item.cash_flow_cf,
item.os_bank_loan_ki,
item.os_bank_loan_wc,
item.os_bank_loan_other,
item.os_bank_loan_total,
item.os_shl,
item.balance_sheet_cash_bank,
item.balance_sheet_ca,
item.balance_sheet_cl,
item.balance_sheet_equity,
item.ratio_cr,
item.ratio_der,
item.ratio_debt_to_ebitda,
item.ratio_to_interest,
item.ratio_ar_days,
item.ratio_inv_days,
item.ratio_ap_days,
item.ratio_ccc,
item.is_approved == undefined ? true : item.is_approved,
// item.order,
])
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
} }
} })
}) }
console.log(dataTable)
this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
} else { } else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false }) this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
} }
...@@ -329,10 +362,69 @@ export default class SummaryOfTriputra extends Component { ...@@ -329,10 +362,69 @@ export default class SummaryOfTriputra extends Component {
console.log(response); console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
let res = [response.data.data] if (response.data.status === 'success') {
const handlePushChild = (item) => { let res = [response.data.data]
let indexIDzz = dataTable.findIndex((val) => val[0] === item.company_id) const handlePushChild = (item) => {
if (indexIDzz === -1) { let indexIDzz = dataTable.findIndex((val) => val[0] === item.company_id)
if (indexIDzz === -1) {
dataTable.push([
0,
item.parent,
item.level,
item.item_name,
item.revenue_ytd_act,
item.revenue_ytd_mb,
item.revenue_ytd_percent_of_mb,
item.revenue_ytd_last_year,
item.revenue_ytd_percent_of_last_year,
item.revenue_fy_ol,
item.revenue_fy_mb,
item.revenue_fy_percent_of_mb,
item.revenue_fy_last_year,
item.revenue_fy_percent_of_last_year,
item.ebitda_ytd_act,
item.ebitda_ytd_mb,
item.ebitda_ytd_percent_of_mb,
item.ebitda_ytd_last_year,
item.ebitda_ytd_percent_of_last_year,
item.ebitda_fy_ol,
item.ebitda_fy_mb,
item.ebitda_fy_percent_of_mb,
item.ebitda_fy_last_year,
item.ebitda_fy_percent_of_last_year,
item.tpat_ytd_act,
item.tpat_ytd_mb,
item.tpat_ytd_percent_of_mb,
item.tpat_ytd_last_year,
item.tpat_ytd_percent_of_last_year,
item.tpat_fy_ol,
item.tpat_fy_mb,
item.tpat_fy_percent_of_mb,
item.tpat_fy_last_year,
item.tpat_fy_percent_of_last_year,
item.npat_ytd_act,
item.npat_ytd_mb,
item.npat_ytd_percent_of_mb,
item.npat_ytd_last_year,
item.npat_ytd_percent_of_last_year,
item.npat_fy_ol,
item.npat_fy_mb,
item.npat_fy_percent_of_mb,
item.npat_fy_last_year,
item.npat_fy_percent_of_last_year,
item.order,
item.is_approved == undefined ? true : item.is_approved,
])
}
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
}
}
}
res.map((item, index) => {
dataTable.push([ dataTable.push([
0, 0,
item.parent, item.parent,
...@@ -381,74 +473,26 @@ export default class SummaryOfTriputra extends Component { ...@@ -381,74 +473,26 @@ export default class SummaryOfTriputra extends Component {
item.order, item.order,
item.is_approved == undefined ? true : item.is_approved, item.is_approved == undefined ? true : item.is_approved,
]) ])
} if (item.children !== null) {
if (item.children !== null) { if (item.children.length > 0) {
if (item.children.length > 0) { item.children.map((items, indexs) => {
item.children.map((items, indexs) => { handlePushChild(items)
handlePushChild(items) })
}) }
} }
} })
} console.log(dataTable)
res.map((item, index) => { this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
dataTable.push([ } else {
0, this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
item.parent, if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
item.level, setTimeout(() => {
item.item_name, localStorage.removeItem(Constant.TOKEN)
item.revenue_ytd_act, window.location.reload();
item.revenue_ytd_mb, }, 1000);
item.revenue_ytd_percent_of_mb,
item.revenue_ytd_last_year,
item.revenue_ytd_percent_of_last_year,
item.revenue_fy_ol,
item.revenue_fy_mb,
item.revenue_fy_percent_of_mb,
item.revenue_fy_last_year,
item.revenue_fy_percent_of_last_year,
item.ebitda_ytd_act,
item.ebitda_ytd_mb,
item.ebitda_ytd_percent_of_mb,
item.ebitda_ytd_last_year,
item.ebitda_ytd_percent_of_last_year,
item.ebitda_fy_ol,
item.ebitda_fy_mb,
item.ebitda_fy_percent_of_mb,
item.ebitda_fy_last_year,
item.ebitda_fy_percent_of_last_year,
item.tpat_ytd_act,
item.tpat_ytd_mb,
item.tpat_ytd_percent_of_mb,
item.tpat_ytd_last_year,
item.tpat_ytd_percent_of_last_year,
item.tpat_fy_ol,
item.tpat_fy_mb,
item.tpat_fy_percent_of_mb,
item.tpat_fy_last_year,
item.tpat_fy_percent_of_last_year,
item.npat_ytd_act,
item.npat_ytd_mb,
item.npat_ytd_percent_of_mb,
item.npat_ytd_last_year,
item.npat_ytd_percent_of_last_year,
item.npat_fy_ol,
item.npat_fy_mb,
item.npat_fy_percent_of_mb,
item.npat_fy_last_year,
item.npat_fy_percent_of_last_year,
item.order,
item.is_approved == undefined ? true : item.is_approved,
])
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
} }
} })
}) }
console.log(dataTable)
this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
} else { } else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false }) this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
} }
...@@ -459,10 +503,74 @@ export default class SummaryOfTriputra extends Component { ...@@ -459,10 +503,74 @@ export default class SummaryOfTriputra extends Component {
console.log(response); console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
let res = [response.data.data] if (response.data.status === 'success') {
const handlePushChild = (item) => { let res = [response.data.data]
let indexIDzz = dataTable.findIndex((val) => val[0] === item.company_id) const handlePushChild = (item) => {
if (indexIDzz === -1) { let indexIDzz = dataTable.findIndex((val) => val[0] === item.company_id)
if (indexIDzz === -1) {
dataTable.push([
0,
item.parent,
item.level,
item.item_name,
item.revenue_last_year,
item.revenue_ol,
item.revenue_mb,
item.revenue_percent_of_mb,
item.revenue_next_year,
item.revenue_next_two_year,
item.ebitda_last_year,
item.ebitda_ol,
item.ebitda_mb,
item.ebitda_percent_of_mb,
item.ebitda_next_year,
item.ebitda_next_two_year,
item.tpat_last_year,
item.tpat_ol,
item.tpat_mb,
item.tpat_percent_of_mb,
item.tpat_next_year,
item.tpat_next_two_year,
item.npat_last_year,
item.npat_ol,
item.npat_mb,
item.npat_percent_of_mb,
item.npat_next_year,
item.npat_next_two_year,
item.roic_ol,
item.roic_next_year,
item.roic_next_two_year,
item.ebitda_margin_ol,
item.ebitda_margin_next_year,
item.ebitda_margin_next_two_year,
item.tpat_margin_ol,
item.tpat_margin_next_year,
item.tpat_margin_next_two_year,
item.percent_revenue_yoy_ol,
item.percent_revenue_yoy_next_year,
item.percent_revenue_yoy_next_two_year,
item.percent_ebitda_yoy_ol,
item.percent_ebitda_yoy_next_year,
item.percent_ebitda_yoy_next_two_year,
item.percent_tpat_yoy_ol,
item.percent_tpat_yoy_next_year,
item.percent_tpat_yoy_next_two_year,
item.percent_npat_yoy_ol,
item.percent_npat_yoy_next_year,
item.percent_npat_yoy_next_two_year,
item.is_approved == undefined ? true : item.is_approved,
// item.order,
])
}
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
}
}
}
res.map((item, index) => {
dataTable.push([ dataTable.push([
0, 0,
item.parent, item.parent,
...@@ -516,79 +624,26 @@ export default class SummaryOfTriputra extends Component { ...@@ -516,79 +624,26 @@ export default class SummaryOfTriputra extends Component {
item.is_approved == undefined ? true : item.is_approved, item.is_approved == undefined ? true : item.is_approved,
// item.order, // item.order,
]) ])
} if (item.children !== null) {
if (item.children !== null) { if (item.children.length > 0) {
if (item.children.length > 0) { item.children.map((items, indexs) => {
item.children.map((items, indexs) => { handlePushChild(items)
handlePushChild(items) })
}) }
} }
} })
} console.log(dataTable);
res.map((item, index) => { this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
dataTable.push([ } else {
0, this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
item.parent, if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
item.level, setTimeout(() => {
item.item_name, localStorage.removeItem(Constant.TOKEN)
item.revenue_last_year, window.location.reload();
item.revenue_ol, }, 1000);
item.revenue_mb,
item.revenue_percent_of_mb,
item.revenue_next_year,
item.revenue_next_two_year,
item.ebitda_last_year,
item.ebitda_ol,
item.ebitda_mb,
item.ebitda_percent_of_mb,
item.ebitda_next_year,
item.ebitda_next_two_year,
item.tpat_last_year,
item.tpat_ol,
item.tpat_mb,
item.tpat_percent_of_mb,
item.tpat_next_year,
item.tpat_next_two_year,
item.npat_last_year,
item.npat_ol,
item.npat_mb,
item.npat_percent_of_mb,
item.npat_next_year,
item.npat_next_two_year,
item.roic_ol,
item.roic_next_year,
item.roic_next_two_year,
item.ebitda_margin_ol,
item.ebitda_margin_next_year,
item.ebitda_margin_next_two_year,
item.tpat_margin_ol,
item.tpat_margin_next_year,
item.tpat_margin_next_two_year,
item.percent_revenue_yoy_ol,
item.percent_revenue_yoy_next_year,
item.percent_revenue_yoy_next_two_year,
item.percent_ebitda_yoy_ol,
item.percent_ebitda_yoy_next_year,
item.percent_ebitda_yoy_next_two_year,
item.percent_tpat_yoy_ol,
item.percent_tpat_yoy_next_year,
item.percent_tpat_yoy_next_two_year,
item.percent_npat_yoy_ol,
item.percent_npat_yoy_next_year,
item.percent_npat_yoy_next_two_year,
item.is_approved == undefined ? true : item.is_approved,
// item.order,
])
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
} }
} })
}) }
console.log(dataTable);
this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
} else { } else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false }) this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
} }
...@@ -599,11 +654,101 @@ export default class SummaryOfTriputra extends Component { ...@@ -599,11 +654,101 @@ export default class SummaryOfTriputra extends Component {
console.log(response); console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
let res = [response.data.data] if (response.data.status === 'success') {
console.log(res) let res = [response.data.data]
const handlePushChild = (item) => { console.log(res)
let indexIDzz = dataTable.findIndex((val) => val[0] === item.company_id) const handlePushChild = (item) => {
if (indexIDzz === -1) { let indexIDzz = dataTable.findIndex((val) => val[0] === item.company_id)
if (indexIDzz === -1) {
dataTable.push([
0,
item.parent,
item.level,
item.item_name,
item.revenue_last_ten_year,
item.revenue_last_nine_year,
item.revenue_last_eight_year,
item.revenue_last_seven_year,
item.revenue_last_six_year,
item.revenue_last_five_year,
item.revenue_last_four_year,
item.revenue_last_three_year,
item.revenue_last_two_year,
item.revenue_last_year,
// item.revenue,
0,
item.ebitda_last_ten_year,
item.ebitda_last_nine_year,
item.ebitda_last_eight_year,
item.ebitda_last_seven_year,
item.ebitda_last_six_year,
item.ebitda_last_five_year,
item.ebitda_last_four_year,
item.ebitda_last_three_year,
item.ebitda_last_two_year,
item.ebitda_last_year,
// item.ebitda,
0,
item.tpat_last_ten_year,
item.tpat_last_nine_year,
item.tpat_last_eight_year,
item.tpat_last_seven_year,
item.tpat_last_six_year,
item.tpat_last_five_year,
item.tpat_last_four_year,
item.tpat_last_three_year,
item.tpat_last_two_year,
item.tpat_last_year,
// item.tpat,
0,
item.npat_last_ten_year,
item.npat_last_nine_year,
item.npat_last_eight_year,
item.npat_last_seven_year,
item.npat_last_six_year,
item.npat_last_five_year,
item.npat_last_four_year,
item.npat_last_three_year,
item.npat_last_two_year,
item.npat_last_year,
// item.npat,
0,
item.total_asset_last_ten_year,
item.total_asset_last_nine_year,
item.total_asset_last_eight_year,
item.total_asset_last_seven_year,
item.total_asset_last_six_year,
item.total_asset_last_five_year,
item.total_asset_last_four_year,
item.total_asset_last_three_year,
item.total_asset_last_two_year,
item.total_asset_last_year,
// item.total_asset,
0,
item.total_equity_last_ten_year,
item.total_equity_last_nine_year,
item.total_equity_last_eight_year,
item.total_equity_last_seven_year,
item.total_equity_last_six_year,
item.total_equity_last_five_year,
item.total_equity_last_four_year,
item.total_equity_last_three_year,
item.total_equity_last_two_year,
item.total_equity_last_year,
// item.total_equity,
0,
item.order,
])
}
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
}
}
}
res.map((item, index) => {
dataTable.push([ dataTable.push([
0, 0,
item.parent, item.parent,
...@@ -619,8 +764,7 @@ export default class SummaryOfTriputra extends Component { ...@@ -619,8 +764,7 @@ export default class SummaryOfTriputra extends Component {
item.revenue_last_three_year, item.revenue_last_three_year,
item.revenue_last_two_year, item.revenue_last_two_year,
item.revenue_last_year, item.revenue_last_year,
// item.revenue, item.revenue,
0,
item.ebitda_last_ten_year, item.ebitda_last_ten_year,
item.ebitda_last_nine_year, item.ebitda_last_nine_year,
item.ebitda_last_eight_year, item.ebitda_last_eight_year,
...@@ -631,8 +775,7 @@ export default class SummaryOfTriputra extends Component { ...@@ -631,8 +775,7 @@ export default class SummaryOfTriputra extends Component {
item.ebitda_last_three_year, item.ebitda_last_three_year,
item.ebitda_last_two_year, item.ebitda_last_two_year,
item.ebitda_last_year, item.ebitda_last_year,
// item.ebitda, item.ebitda,
0,
item.tpat_last_ten_year, item.tpat_last_ten_year,
item.tpat_last_nine_year, item.tpat_last_nine_year,
item.tpat_last_eight_year, item.tpat_last_eight_year,
...@@ -643,8 +786,7 @@ export default class SummaryOfTriputra extends Component { ...@@ -643,8 +786,7 @@ export default class SummaryOfTriputra extends Component {
item.tpat_last_three_year, item.tpat_last_three_year,
item.tpat_last_two_year, item.tpat_last_two_year,
item.tpat_last_year, item.tpat_last_year,
// item.tpat, item.tpat,
0,
item.npat_last_ten_year, item.npat_last_ten_year,
item.npat_last_nine_year, item.npat_last_nine_year,
item.npat_last_eight_year, item.npat_last_eight_year,
...@@ -655,8 +797,7 @@ export default class SummaryOfTriputra extends Component { ...@@ -655,8 +797,7 @@ export default class SummaryOfTriputra extends Component {
item.npat_last_three_year, item.npat_last_three_year,
item.npat_last_two_year, item.npat_last_two_year,
item.npat_last_year, item.npat_last_year,
// item.npat, item.npat,
0,
item.total_asset_last_ten_year, item.total_asset_last_ten_year,
item.total_asset_last_nine_year, item.total_asset_last_nine_year,
item.total_asset_last_eight_year, item.total_asset_last_eight_year,
...@@ -667,8 +808,7 @@ export default class SummaryOfTriputra extends Component { ...@@ -667,8 +808,7 @@ export default class SummaryOfTriputra extends Component {
item.total_asset_last_three_year, item.total_asset_last_three_year,
item.total_asset_last_two_year, item.total_asset_last_two_year,
item.total_asset_last_year, item.total_asset_last_year,
// item.total_asset, item.total_asset,
0,
item.total_equity_last_ten_year, item.total_equity_last_ten_year,
item.total_equity_last_nine_year, item.total_equity_last_nine_year,
item.total_equity_last_eight_year, item.total_equity_last_eight_year,
...@@ -679,103 +819,29 @@ export default class SummaryOfTriputra extends Component { ...@@ -679,103 +819,29 @@ export default class SummaryOfTriputra extends Component {
item.total_equity_last_three_year, item.total_equity_last_three_year,
item.total_equity_last_two_year, item.total_equity_last_two_year,
item.total_equity_last_year, item.total_equity_last_year,
// item.total_equity, item.total_equity,
0,
item.order, item.order,
]) ])
} if (item.children !== null) {
if (item.children !== null) { if (item.children.length > 0) {
if (item.children.length > 0) { item.children.map((items, indexs) => {
item.children.map((items, indexs) => { handlePushChild(items)
handlePushChild(items) })
}) }
} }
} })
} console.log()
res.map((item, index) => { this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
dataTable.push([ } else {
0, this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
item.parent, if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
item.level, setTimeout(() => {
item.item_name, localStorage.removeItem(Constant.TOKEN)
item.revenue_last_ten_year, window.location.reload();
item.revenue_last_nine_year, }, 1000);
item.revenue_last_eight_year,
item.revenue_last_seven_year,
item.revenue_last_six_year,
item.revenue_last_five_year,
item.revenue_last_four_year,
item.revenue_last_three_year,
item.revenue_last_two_year,
item.revenue_last_year,
item.revenue,
item.ebitda_last_ten_year,
item.ebitda_last_nine_year,
item.ebitda_last_eight_year,
item.ebitda_last_seven_year,
item.ebitda_last_six_year,
item.ebitda_last_five_year,
item.ebitda_last_four_year,
item.ebitda_last_three_year,
item.ebitda_last_two_year,
item.ebitda_last_year,
item.ebitda,
item.tpat_last_ten_year,
item.tpat_last_nine_year,
item.tpat_last_eight_year,
item.tpat_last_seven_year,
item.tpat_last_six_year,
item.tpat_last_five_year,
item.tpat_last_four_year,
item.tpat_last_three_year,
item.tpat_last_two_year,
item.tpat_last_year,
item.tpat,
item.npat_last_ten_year,
item.npat_last_nine_year,
item.npat_last_eight_year,
item.npat_last_seven_year,
item.npat_last_six_year,
item.npat_last_five_year,
item.npat_last_four_year,
item.npat_last_three_year,
item.npat_last_two_year,
item.npat_last_year,
item.npat,
item.total_asset_last_ten_year,
item.total_asset_last_nine_year,
item.total_asset_last_eight_year,
item.total_asset_last_seven_year,
item.total_asset_last_six_year,
item.total_asset_last_five_year,
item.total_asset_last_four_year,
item.total_asset_last_three_year,
item.total_asset_last_two_year,
item.total_asset_last_year,
item.total_asset,
item.total_equity_last_ten_year,
item.total_equity_last_nine_year,
item.total_equity_last_eight_year,
item.total_equity_last_seven_year,
item.total_equity_last_six_year,
item.total_equity_last_five_year,
item.total_equity_last_four_year,
item.total_equity_last_three_year,
item.total_equity_last_two_year,
item.total_equity_last_year,
item.total_equity,
item.order,
])
if (item.children !== null) {
if (item.children.length > 0) {
item.children.map((items, indexs) => {
handlePushChild(items)
})
} }
} })
}) }
console.log()
this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
} else { } else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false }) this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
} }
......
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