Commit d9798eee authored by rifkaki's avatar rifkaki

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

parents 83a5b6ee 01be1e41
......@@ -38,7 +38,7 @@ const create = (type = "") => {
'Content-Type': 'application/json',
},
// 40 second timeout...
timeout: 100000
timeout: 40000
})
break;
default:
......
......@@ -744,18 +744,25 @@ export default class BudgetTahunan extends Component {
})
// // console.log(JSON.stringify(data));
api.create('UPLOAD').createSubmitReport(data).then(response => {
// // console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.getSubmission()
if (response.ok) {
if (response.data.status === 'success') {
this.getSubmission()
} else {
this.setState({ loading: false }, () => {
this.getSubmission()
document.body.style.overflow = 'unset';
})
}
} else {
this.setState({ loading: false }, () => {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false}, () => {
this.getSubmission()
document.body.style.overflow = 'unset';
})
})
}
} else {
this.setState({ loading: false }, () => {
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false }, () => {
this.getSubmission()
document.body.style.overflow = 'unset';
})
......
......@@ -442,7 +442,7 @@ export default class BalanceSheet extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -183,7 +183,7 @@ export default class CashFlow extends Component {
// } else {
api.create().getDetailReportCF(payload).then(response => {
let dataTable = []
// console.log(response)
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status == 'success') {
......@@ -278,7 +278,7 @@ export default class CashFlow extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error', loading: false })
}
})
// }
......
......@@ -269,7 +269,7 @@ export default class CorporateAnnualTarget extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error', loading: false })
}
......@@ -670,7 +670,7 @@ export default class CorporateAnnualTarget extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -195,7 +195,7 @@ export default class FixedAssetsMovement extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error', loading: false })
}
})
}
......@@ -447,7 +447,7 @@ export default class FixedAssetsMovement extends Component {
} else {
// this.setState({ loading: false })
// alert(response.problem)
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -205,7 +205,7 @@ export default class ProfitLoss extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error', loading: false })
}
})
......@@ -447,7 +447,7 @@ export default class ProfitLoss extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error', loading: false })
}
})
}
......
......@@ -230,7 +230,7 @@ export default class TaxPlanning extends Component {
})
}
} else {
this.setState({ dataTable, loading: false, buttonError: true, editable: true })
this.setState({ dataTable, loading: false, buttonError: true, editable: true, alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error'})
}
})
}
......@@ -632,7 +632,7 @@ export default class TaxPlanning extends Component {
// alert(response.data.status)
}
} else {
this.setState({ loading: false, alert: true, messageAlert: response.problem, tipeAlert: 'error' })
this.setState({ loading: false, alert: true, messageAlert: 'Data is not saved, please check your Connection', tipeAlert: 'error' })
}
})
}
......
......@@ -1939,7 +1939,7 @@ export default class BalanceSheetMR extends Component {
type="button"
onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => {
this.props.onClickClose()
this.getItemHierarki()
}, 100);
})}
style={{
......
......@@ -83,11 +83,12 @@ export default class OperatingIndicatorMR extends Component {
"months": this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null
}
api.create().getLastestUpdateMROI(payload).then(response => {
// console.log(response.data)
console.log(response.data)
if (response.data) {
if (response.data.status === "success") {
this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update,
notesUpdate: response.data.data.notes_update === null ? '-' : response.data.data.notes_update
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -165,7 +166,7 @@ export default class OperatingIndicatorMR extends Component {
item.description,
item.uom === "" ? null : item.uom,
item.monthly_report.rolling_outlook === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.rolling_outlook,
item.monthly_report.master_budget === null ? "10.0" : item.monthly_report.rolling_outlook === "" ? "10.0" : item.monthly_report.master_budget,
item.monthly_report.master_budget === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.master_budget,
item.monthly_report.rolling_budget === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.rolling_budget,
item.monthly_report.actual === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.actual,
item.monthly_report.amount_act_vs_mb === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.amount_act_vs_mb,
......@@ -195,7 +196,7 @@ export default class OperatingIndicatorMR extends Component {
item.description,
item.uom === "" ? null : item.uom,
item.monthly_report.rolling_outlook === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.rolling_outlook,
item.monthly_report.master_budget === null ? "10.0" : item.monthly_report.rolling_outlook === "" ? "10.0" : item.monthly_report.master_budget,
item.monthly_report.master_budget === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.master_budget,
item.monthly_report.rolling_budget === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.rolling_budget,
item.monthly_report.actual === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.actual,
item.monthly_report.amount_act_vs_mb === null ? "0.0" : item.monthly_report.rolling_outlook === "" ? "0.0" : item.monthly_report.amount_act_vs_mb,
......@@ -1356,15 +1357,15 @@ export default class OperatingIndicatorMR extends Component {
this.props.data.report_id === 22 ? 'Jan' :
this.props.data.report_id === 23 ? 'Feb' :
this.props.data.report_id === 24 ? 'Mar' :
this.props.data.report_id === 23 ? 'Apr' :
this.props.data.report_id === 23 ? 'May' :
this.props.data.report_id === 23 ? 'Jun' :
this.props.data.report_id === 23 ? 'Jul' :
this.props.data.report_id === 23 ? 'Aug' :
this.props.data.report_id === 23 ? 'Sep' :
this.props.data.report_id === 23 ? 'Oct' :
this.props.data.report_id === 23 ? 'Nov' :
this.props.data.report_id === 23 ? 'Dec' : "" } {this.props.data.periode}
this.props.data.report_id === 25 ? 'Apr' :
this.props.data.report_id === 26 ? 'May' :
this.props.data.report_id === 27 ? 'Jun' :
this.props.data.report_id === 28 ? 'Jul' :
this.props.data.report_id === 29 ? 'Aug' :
this.props.data.report_id === 30 ? 'Sep' :
this.props.data.report_id === 31 ? 'Oct' :
this.props.data.report_id === 32 ? 'Nov' :
this.props.data.report_id === 33 ? 'Dec' : "" } {this.props.data.periode}
</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
......@@ -1427,6 +1428,7 @@ export default class OperatingIndicatorMR extends Component {
</MuiThemeProvider>
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10 }}>Notes : {this.state.notesUpdate}</Typography>
</div>
<div className="grid grid-2x">
<div className="col-1">
......@@ -1522,15 +1524,15 @@ export default class OperatingIndicatorMR extends Component {
this.props.data.report_id === 22 ? 'Jan' :
this.props.data.report_id === 23 ? 'Feb' :
this.props.data.report_id === 24 ? 'Mar' :
this.props.data.report_id === 23 ? 'Apr' :
this.props.data.report_id === 23 ? 'May' :
this.props.data.report_id === 23 ? 'Jun' :
this.props.data.report_id === 23 ? 'Jul' :
this.props.data.report_id === 23 ? 'Aug' :
this.props.data.report_id === 23 ? 'Sep' :
this.props.data.report_id === 23 ? 'Oct' :
this.props.data.report_id === 23 ? 'Nov' :
this.props.data.report_id === 23 ? 'Dec' : "" } {this.props.data.periode}
this.props.data.report_id === 25 ? 'Apr' :
this.props.data.report_id === 26 ? 'May' :
this.props.data.report_id === 27 ? 'Jun' :
this.props.data.report_id === 28 ? 'Jul' :
this.props.data.report_id === 29 ? 'Aug' :
this.props.data.report_id === 30 ? 'Sep' :
this.props.data.report_id === 31 ? 'Oct' :
this.props.data.report_id === 32 ? 'Nov' :
this.props.data.report_id === 33 ? 'Dec' : "" } {this.props.data.periode}
</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
......
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