Commit b684c83c authored by Riri Novita's avatar Riri Novita

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

parents 0153d656 99c11cb8
......@@ -683,7 +683,7 @@ class HomePage extends Component {
return (
<div>
<Typography style={{ color: '#656565', fontSize: '16px', marginTop: 20 }}>{item.item_business}</Typography>
<div style={{ display: 'flex', overflowX: 'scroll', width: this.props.width * 0.9 }}>
<div style={{ display: 'flex', overflowX: 'scroll', width: this.props.width * 0.95 }}>
{item.category.map((items, indexs) => {
return (
<Link to={{
......@@ -957,7 +957,7 @@ class HomePage extends Component {
return (
<div>
<Typography style={{ color: '#656565', fontSize: '16px', marginTop: 20 }}>{item.item_business}</Typography>
<div style={{ display: 'flex', overflowX: 'scroll', width: this.props.width * 0.9 }}>
<div style={{ display: 'flex', overflowX: 'scroll', width: this.props.width * 0.95 }}>
{item.category.map((items, indexs) => {
return (
<Link to={{
......
......@@ -63,6 +63,7 @@ export default class BalanceSheetRO extends Component {
componentDidMount() {
// this.getItemHierarki()
this.getLatestUpdate()
this.getSettingControl()
this.handleViewOnly()
}
......@@ -141,6 +142,39 @@ export default class BalanceSheetRO extends Component {
})
}
getLatestUpdate() {
let payload = {
"report_id": this.props.report_id,
"revision": Number(this.props.revision),
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"rolling_outlook_id": this.props.rollingOutlookID,
"quartal": this.props.quarter
}
api.create().getRollingOutlookLastUpdate(payload).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update,
notes: response.data.data.notes_update === null ? "" : response.data.data.notes_update
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
getItemHierarki() {
this.setState({ loading: true, judulColumn: null })
let payload = {
......@@ -291,7 +325,7 @@ export default class BalanceSheetRO extends Component {
console.log(type)
this.setState({get_for: type}, () => {
// this.getSettingControl()
// this.getLatestUpdate()
this.getLatestUpdate()
this.getItemHierarki()
})
}
......
This diff is collapsed.
......@@ -101,7 +101,7 @@ export default class ProfitLossROO extends Component {
componentDidMount() {
this.getItemHierarki()
// this.getLatestUpdate()
this.getLatestUpdate()
// this.getSettingControl()
this.handleViewOnly()
}
......@@ -182,38 +182,38 @@ export default class ProfitLossROO extends Component {
// })
// }
// getLatestUpdate() {
// let payload = {
// "report_id": this.props.report_id,
// "revision": Number(this.props.revision),
// "periode": this.props.periode,
// "company_id": this.props.company.company_id,
// "monthly_report_id": this.props.monthlyReportId,
// // "months": this.props.month.month_id
// }
// api.create().getLastestUpdateMR(payload).then(response => {
// console.log(response)
// if (response.data) {
// if (response.data.status === "success") {
// this.setState({
// 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 }, () => {
// if (response.data.message.includes("Someone Logged In")) {
// setTimeout(() => {
// localStorage.removeItem(Constant.TOKEN)
// window.location.reload();
// }, 1000);
// }
// })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
// }
// })
// }
getLatestUpdate() {
let payload = {
"report_id": this.props.report_id,
"revision": Number(this.props.revision),
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"rolling_outlook_id": this.props.rollingOutlookID,
"quartal": this.props.quarter
}
api.create().getRollingOutlookLastUpdate(payload).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.setState({
updateBy: response.data.data.latest_update === null ? '-' : response.data.data.latest_update,
notes: response.data.data.notes_update === null ? "" : response.data.data.notes_update
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
}
getItemHierarki() {
let payload = {
......
......@@ -136,13 +136,16 @@ export default class TaxPlanning extends Component {
"revision": Number(this.props.revision),
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"submission_id": this.props.submissionID
"rolling_outlook_id": this.props.rollingOutlookID,
"quartal": this.props.quarter
}
api.create().getLastestUpdateMB(payload).then(response => {
api.create().getRollingOutlookLastUpdate(payload).then(response => {
console.log(response);
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,
notes: response.data.data.notes_update === null ? "" : response.data.data.notes_update
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: 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