Commit d251b13d authored by r.kurnia's avatar r.kurnia

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

parents b3463922 b44f0123
......@@ -103,7 +103,7 @@ export default class ProfitLoss extends Component {
"submission_id": this.props.submissionID
}
api.create().getDetailReportMB(payload).then(response => {
console.log(response);
// console.log(response);
let dataTable = []
this.setState({ visibleProfitLoss: true })
if (response.data) {
......@@ -289,7 +289,7 @@ export default class ProfitLoss extends Component {
fileHandler = (event) => {
let fileObj = event
ExcelRenderer(fileObj, (err, resp) => {
console.log(resp)
// console.log(resp)
if (err) {
// console.log(err);
}
......@@ -329,7 +329,7 @@ export default class ProfitLoss extends Component {
report_id: this.props.report_id,
profit_loss: payload
}
console.log(isi)
// console.log(isi)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
}
});
......@@ -338,7 +338,7 @@ export default class ProfitLoss extends Component {
checkUpload() {
api.create().checkUploadMB(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload));
console.log(response)
// console.log(response)
if (response.data) {
if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleProfitLoss: false, loading: true })
......@@ -465,7 +465,7 @@ export default class ProfitLoss extends Component {
handleValidate() {
let data = []
console.log(JSON.stringify(this.state.dataTable))
// console.log(JSON.stringify(this.state.dataTable))
this.state.dataTable.map(i => {
data.push({
item_report_id: i[1],
......
......@@ -281,47 +281,41 @@ export default class ProfitLossMR extends Component {
api.create().checkUploadMonthlyReportPL(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload));
console.log(response)
// if (response.data) {
// if (response.data.status === 'success') {
// this.setState({ visibleUpload: false, visibleProfitLoss: false, loading: true })
// let dataTable = response.data.data.map((item, index) => {
// return [
// item.item_report_id,
// item.type_report_id,
// item.item_report,
// item.parent,
// item.formula,
// item.level,
// item.notes,
// item.rolling_outlook,
// item.master_budget,
// item.rolling_budget,
// item.actual,
// item.ytd_actual,
// item.actual_previous_month,
// item.amount_act_vs_previous_month,
// item.percent_act_vs_previous_month,
// item.amount_act_vs_mb,
// item.percent_act_vs_mb,
// item.amount_act_vs_rb,
// item.percent_act_vs_rb,
// item.mtd_vs_previous_month,
// item.mtd_vs_mb,
// item.mtd_vs_rb,
// item.orders
// ]
// })
// this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
// this.state.dataTable.map(item => {
// if (item[24].length > 0) {
// // console.log('masuk')
// this.setState({ buttonError: true, errorPreview: true, editable: true })
// }
// })
// // console.log(this.state.buttonError)
// })
// }
// }
if (response.data) {
if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleProfitLoss: false, loading: true })
let dataTable = response.data.data.map((item, index) => {
return [
item.item_report_id,
item.item_report,
item.type_report_id,
item.formula,
item.level,
item.parent,
item.notes,
item.rolling_outlook,
item.master_budget,
item.rolling_budget,
item.actual,
item.ytd_actual,
item.actual_previous_month,
item.mtd_vs_mb,
item.mtd_vs_rb,
item.orders,
item.error
]
})
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => {
if (item[16].length > 0) {
// console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true })
}
})
// console.log(this.state.buttonError)
})
}
}
})
}
......
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